generated from metaplex-foundation/solana-project-template
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
16d762e
commit a0b9090
Showing
30 changed files
with
511 additions
and
83 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = [ | ||
"clients/rust", | ||
"programs/mpl-asset" | ||
] | ||
members = ["clients/rust", "programs/mpl-asset"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* 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 { Serializer, struct } from '@metaplex-foundation/umi/serializers'; | ||
|
||
export type AssetSigner = {}; | ||
|
||
export type AssetSignerArgs = AssetSigner; | ||
|
||
export function getAssetSignerSerializer(): Serializer< | ||
AssetSignerArgs, | ||
AssetSigner | ||
> { | ||
return struct<AssetSigner>([], { description: 'AssetSigner' }) as Serializer< | ||
AssetSignerArgs, | ||
AssetSigner | ||
>; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* 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 { PublicKey } from '@metaplex-foundation/umi'; | ||
import { | ||
Serializer, | ||
publicKey as publicKeySerializer, | ||
struct, | ||
} from '@metaplex-foundation/umi/serializers'; | ||
|
||
export type LegacyMetadata = { mint: PublicKey }; | ||
|
||
export type LegacyMetadataArgs = LegacyMetadata; | ||
|
||
export function getLegacyMetadataSerializer(): Serializer< | ||
LegacyMetadataArgs, | ||
LegacyMetadata | ||
> { | ||
return struct<LegacyMetadata>([['mint', publicKeySerializer()]], { | ||
description: 'LegacyMetadata', | ||
}) as Serializer<LegacyMetadataArgs, LegacyMetadata>; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/** | ||
* 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 { PublicKey } from '@metaplex-foundation/umi'; | ||
import { | ||
GetDataEnumKind, | ||
GetDataEnumKindContent, | ||
Serializer, | ||
array, | ||
dataEnum, | ||
publicKey as publicKeySerializer, | ||
struct, | ||
tuple, | ||
} from '@metaplex-foundation/umi/serializers'; | ||
|
||
export type RuleSet = | ||
| { __kind: 'ProgramAllowList'; fields: [Array<PublicKey>] } | ||
| { __kind: 'ProgramDenyList'; fields: [Array<PublicKey>] }; | ||
|
||
export type RuleSetArgs = RuleSet; | ||
|
||
export function getRuleSetSerializer(): Serializer<RuleSetArgs, RuleSet> { | ||
return dataEnum<RuleSet>( | ||
[ | ||
[ | ||
'ProgramAllowList', | ||
struct<GetDataEnumKindContent<RuleSet, 'ProgramAllowList'>>([ | ||
['fields', tuple([array(publicKeySerializer())])], | ||
]), | ||
], | ||
[ | ||
'ProgramDenyList', | ||
struct<GetDataEnumKindContent<RuleSet, 'ProgramDenyList'>>([ | ||
['fields', tuple([array(publicKeySerializer())])], | ||
]), | ||
], | ||
], | ||
{ description: 'RuleSet' } | ||
) as Serializer<RuleSetArgs, RuleSet>; | ||
} | ||
|
||
// Data Enum Helpers. | ||
export function ruleSet( | ||
kind: 'ProgramAllowList', | ||
data: GetDataEnumKindContent<RuleSetArgs, 'ProgramAllowList'>['fields'] | ||
): GetDataEnumKind<RuleSetArgs, 'ProgramAllowList'>; | ||
export function ruleSet( | ||
kind: 'ProgramDenyList', | ||
data: GetDataEnumKindContent<RuleSetArgs, 'ProgramDenyList'>['fields'] | ||
): GetDataEnumKind<RuleSetArgs, 'ProgramDenyList'>; | ||
export function ruleSet<K extends RuleSetArgs['__kind']>( | ||
kind: K, | ||
data?: any | ||
): Extract<RuleSetArgs, { __kind: K }> { | ||
return Array.isArray(data) | ||
? { __kind: kind, fields: data } | ||
: { __kind: kind, ...(data ?? {}) }; | ||
} | ||
export function isRuleSet<K extends RuleSet['__kind']>( | ||
kind: K, | ||
value: RuleSet | ||
): value is RuleSet & { __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
Oops, something went wrong.