generated from metaplex-foundation/solana-project-template
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update JS SDK for ValidationResultsOffset
- Loading branch information
Showing
15 changed files
with
153 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
clients/js/src/generated/types/baseValidationResultsOffset.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/** | ||
* This code was AUTOGENERATED using the kinobi library. | ||
* Please DO NOT EDIT THIS FILE, instead use visitors | ||
* to add features, then rerun kinobi to update it. | ||
* | ||
* @see https://github.com/metaplex-foundation/kinobi | ||
*/ | ||
|
||
import { | ||
GetDataEnumKind, | ||
GetDataEnumKindContent, | ||
Serializer, | ||
dataEnum, | ||
struct, | ||
tuple, | ||
u64, | ||
unit, | ||
} from '@metaplex-foundation/umi/serializers'; | ||
|
||
export type BaseValidationResultsOffset = | ||
| { __kind: 'NoOffset' } | ||
| { __kind: 'Anchor' } | ||
| { __kind: 'Custom'; fields: [bigint] }; | ||
|
||
export type BaseValidationResultsOffsetArgs = | ||
| { __kind: 'NoOffset' } | ||
| { __kind: 'Anchor' } | ||
| { __kind: 'Custom'; fields: [number | bigint] }; | ||
|
||
export function getBaseValidationResultsOffsetSerializer(): Serializer< | ||
BaseValidationResultsOffsetArgs, | ||
BaseValidationResultsOffset | ||
> { | ||
return dataEnum<BaseValidationResultsOffset>( | ||
[ | ||
['NoOffset', unit()], | ||
['Anchor', unit()], | ||
[ | ||
'Custom', | ||
struct<GetDataEnumKindContent<BaseValidationResultsOffset, 'Custom'>>([ | ||
['fields', tuple([u64()])], | ||
]), | ||
], | ||
], | ||
{ description: 'BaseValidationResultsOffset' } | ||
) as Serializer<BaseValidationResultsOffsetArgs, BaseValidationResultsOffset>; | ||
} | ||
|
||
// Data Enum Helpers. | ||
export function baseValidationResultsOffset( | ||
kind: 'NoOffset' | ||
): GetDataEnumKind<BaseValidationResultsOffsetArgs, 'NoOffset'>; | ||
export function baseValidationResultsOffset( | ||
kind: 'Anchor' | ||
): GetDataEnumKind<BaseValidationResultsOffsetArgs, 'Anchor'>; | ||
export function baseValidationResultsOffset( | ||
kind: 'Custom', | ||
data: GetDataEnumKindContent< | ||
BaseValidationResultsOffsetArgs, | ||
'Custom' | ||
>['fields'] | ||
): GetDataEnumKind<BaseValidationResultsOffsetArgs, 'Custom'>; | ||
export function baseValidationResultsOffset< | ||
K extends BaseValidationResultsOffsetArgs['__kind'] | ||
>( | ||
kind: K, | ||
data?: any | ||
): Extract<BaseValidationResultsOffsetArgs, { __kind: K }> { | ||
return Array.isArray(data) | ||
? { __kind: kind, fields: data } | ||
: { __kind: kind, ...(data ?? {}) }; | ||
} | ||
export function isBaseValidationResultsOffset< | ||
K extends BaseValidationResultsOffset['__kind'] | ||
>( | ||
kind: K, | ||
value: BaseValidationResultsOffset | ||
): value is BaseValidationResultsOffset & { __kind: K } { | ||
return value.__kind === kind; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.