@macalinao/clients-mpl-bubblegum 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/accounts/index.d.ts +2 -1
- package/dist/generated/accounts/treeConfig.d.ts +22 -7
- package/dist/generated/accounts/treeConfig.d.ts.map +1 -1
- package/dist/generated/accounts/treeConfig.js +7 -0
- package/dist/generated/accounts/treeConfig.js.map +1 -1
- package/dist/generated/accounts/voucher.d.ts +14 -7
- package/dist/generated/accounts/voucher.d.ts.map +1 -1
- package/dist/generated/accounts/voucher.js +7 -0
- package/dist/generated/accounts/voucher.js.map +1 -1
- package/dist/generated/errors/bubblegum.d.ts +0 -1
- package/dist/generated/errors/bubblegum.d.ts.map +1 -1
- package/dist/generated/errors/bubblegum.js +66 -59
- package/dist/generated/errors/bubblegum.js.map +1 -1
- package/dist/generated/errors/index.d.ts +2 -1
- package/dist/generated/index.d.ts +8 -1
- package/dist/generated/instructions/burn.d.ts +141 -17
- package/dist/generated/instructions/burn.d.ts.map +1 -1
- package/dist/generated/instructions/burn.js +23 -0
- package/dist/generated/instructions/burn.js.map +1 -1
- package/dist/generated/instructions/burnV2.d.ts +179 -31
- package/dist/generated/instructions/burnV2.d.ts.map +1 -1
- package/dist/generated/instructions/burnV2.js +21 -0
- package/dist/generated/instructions/burnV2.js.map +1 -1
- package/dist/generated/instructions/cancelRedeem.d.ts +99 -13
- package/dist/generated/instructions/cancelRedeem.d.ts.map +1 -1
- package/dist/generated/instructions/cancelRedeem.js +19 -0
- package/dist/generated/instructions/cancelRedeem.js.map +1 -1
- package/dist/generated/instructions/closeTreeV2.d.ts +85 -19
- package/dist/generated/instructions/closeTreeV2.d.ts.map +1 -1
- package/dist/generated/instructions/closeTreeV2.js +21 -0
- package/dist/generated/instructions/closeTreeV2.js.map +1 -1
- package/dist/generated/instructions/collectV2.d.ts +20 -7
- package/dist/generated/instructions/collectV2.d.ts.map +1 -1
- package/dist/generated/instructions/collectV2.js +10 -0
- package/dist/generated/instructions/collectV2.js.map +1 -1
- package/dist/generated/instructions/compress.d.ts +119 -9
- package/dist/generated/instructions/compress.d.ts.map +1 -1
- package/dist/generated/instructions/compress.js +21 -0
- package/dist/generated/instructions/compress.js.map +1 -1
- package/dist/generated/instructions/createTree.d.ts +117 -11
- package/dist/generated/instructions/createTree.d.ts.map +1 -1
- package/dist/generated/instructions/createTree.js +23 -0
- package/dist/generated/instructions/createTree.js.map +1 -1
- package/dist/generated/instructions/createTreeV2.d.ts +109 -14
- package/dist/generated/instructions/createTreeV2.d.ts.map +1 -1
- package/dist/generated/instructions/createTreeV2.js +23 -0
- package/dist/generated/instructions/createTreeV2.js.map +1 -1
- package/dist/generated/instructions/decompressV1.d.ts +106 -11
- package/dist/generated/instructions/decompressV1.d.ts.map +1 -1
- package/dist/generated/instructions/decompressV1.js +25 -0
- package/dist/generated/instructions/decompressV1.js.map +1 -1
- package/dist/generated/instructions/delegate.d.ts +140 -17
- package/dist/generated/instructions/delegate.d.ts.map +1 -1
- package/dist/generated/instructions/delegate.js +19 -0
- package/dist/generated/instructions/delegate.js.map +1 -1
- package/dist/generated/instructions/delegateAndFreezeV2.d.ts +171 -27
- package/dist/generated/instructions/delegateAndFreezeV2.d.ts.map +1 -1
- package/dist/generated/instructions/delegateAndFreezeV2.js +17 -0
- package/dist/generated/instructions/delegateAndFreezeV2.js.map +1 -1
- package/dist/generated/instructions/delegateV2.d.ts +169 -27
- package/dist/generated/instructions/delegateV2.d.ts.map +1 -1
- package/dist/generated/instructions/delegateV2.js +15 -0
- package/dist/generated/instructions/delegateV2.js.map +1 -1
- package/dist/generated/instructions/freezeV2.d.ts +174 -28
- package/dist/generated/instructions/freezeV2.d.ts.map +1 -1
- package/dist/generated/instructions/freezeV2.js +23 -0
- package/dist/generated/instructions/freezeV2.js.map +1 -1
- package/dist/generated/instructions/index.d.ts +2 -1
- package/dist/generated/instructions/mintToCollectionV1.d.ts +171 -20
- package/dist/generated/instructions/mintToCollectionV1.d.ts.map +1 -1
- package/dist/generated/instructions/mintToCollectionV1.js +23 -0
- package/dist/generated/instructions/mintToCollectionV1.js.map +1 -1
- package/dist/generated/instructions/mintV1.d.ts +109 -11
- package/dist/generated/instructions/mintV1.d.ts.map +1 -1
- package/dist/generated/instructions/mintV1.js +21 -0
- package/dist/generated/instructions/mintV1.js.map +1 -1
- package/dist/generated/instructions/mintV2.d.ts +163 -17
- package/dist/generated/instructions/mintV2.d.ts.map +1 -1
- package/dist/generated/instructions/mintV2.js +45 -0
- package/dist/generated/instructions/mintV2.js.map +1 -1
- package/dist/generated/instructions/redeem.d.ts +153 -17
- package/dist/generated/instructions/redeem.d.ts.map +1 -1
- package/dist/generated/instructions/redeem.js +23 -0
- package/dist/generated/instructions/redeem.js.map +1 -1
- package/dist/generated/instructions/setAndVerifyCollection.d.ts +222 -38
- package/dist/generated/instructions/setAndVerifyCollection.d.ts.map +1 -1
- package/dist/generated/instructions/setAndVerifyCollection.js +21 -0
- package/dist/generated/instructions/setAndVerifyCollection.js.map +1 -1
- package/dist/generated/instructions/setCollectionV2.d.ts +186 -39
- package/dist/generated/instructions/setCollectionV2.d.ts.map +1 -1
- package/dist/generated/instructions/setCollectionV2.js +21 -0
- package/dist/generated/instructions/setCollectionV2.js.map +1 -1
- package/dist/generated/instructions/setDecompressableState.d.ts +40 -9
- package/dist/generated/instructions/setDecompressableState.d.ts.map +1 -1
- package/dist/generated/instructions/setDecompressableState.js +13 -0
- package/dist/generated/instructions/setDecompressableState.js.map +1 -1
- package/dist/generated/instructions/setDecompressibleState.d.ts +41 -9
- package/dist/generated/instructions/setDecompressibleState.d.ts.map +1 -1
- package/dist/generated/instructions/setDecompressibleState.js +14 -0
- package/dist/generated/instructions/setDecompressibleState.js.map +1 -1
- package/dist/generated/instructions/setNonTransferableV2.d.ts +166 -31
- package/dist/generated/instructions/setNonTransferableV2.d.ts.map +1 -1
- package/dist/generated/instructions/setNonTransferableV2.js +23 -0
- package/dist/generated/instructions/setNonTransferableV2.js.map +1 -1
- package/dist/generated/instructions/setTreeDelegate.d.ts +65 -9
- package/dist/generated/instructions/setTreeDelegate.d.ts.map +1 -1
- package/dist/generated/instructions/setTreeDelegate.js +21 -0
- package/dist/generated/instructions/setTreeDelegate.js.map +1 -1
- package/dist/generated/instructions/thawAndRevokeV2.d.ts +158 -24
- package/dist/generated/instructions/thawAndRevokeV2.d.ts.map +1 -1
- package/dist/generated/instructions/thawAndRevokeV2.js +17 -0
- package/dist/generated/instructions/thawAndRevokeV2.js.map +1 -1
- package/dist/generated/instructions/thawV2.d.ts +166 -28
- package/dist/generated/instructions/thawV2.d.ts.map +1 -1
- package/dist/generated/instructions/thawV2.js +15 -0
- package/dist/generated/instructions/thawV2.js.map +1 -1
- package/dist/generated/instructions/transfer.d.ts +140 -17
- package/dist/generated/instructions/transfer.d.ts.map +1 -1
- package/dist/generated/instructions/transfer.js +19 -0
- package/dist/generated/instructions/transfer.js.map +1 -1
- package/dist/generated/instructions/transferV2.d.ts +167 -31
- package/dist/generated/instructions/transferV2.d.ts.map +1 -1
- package/dist/generated/instructions/transferV2.js +21 -0
- package/dist/generated/instructions/transferV2.js.map +1 -1
- package/dist/generated/instructions/unverifyCollection.d.ts +215 -38
- package/dist/generated/instructions/unverifyCollection.d.ts.map +1 -1
- package/dist/generated/instructions/unverifyCollection.js +19 -0
- package/dist/generated/instructions/unverifyCollection.js.map +1 -1
- package/dist/generated/instructions/unverifyCreator.d.ts +161 -17
- package/dist/generated/instructions/unverifyCreator.d.ts.map +1 -1
- package/dist/generated/instructions/unverifyCreator.js +19 -0
- package/dist/generated/instructions/unverifyCreator.js.map +1 -1
- package/dist/generated/instructions/unverifyCreatorV2.d.ts +143 -21
- package/dist/generated/instructions/unverifyCreatorV2.d.ts.map +1 -1
- package/dist/generated/instructions/unverifyCreatorV2.js +19 -0
- package/dist/generated/instructions/unverifyCreatorV2.js.map +1 -1
- package/dist/generated/instructions/updateAssetDataV2.d.ts +180 -28
- package/dist/generated/instructions/updateAssetDataV2.d.ts.map +1 -1
- package/dist/generated/instructions/updateAssetDataV2.js +21 -0
- package/dist/generated/instructions/updateAssetDataV2.js.map +1 -1
- package/dist/generated/instructions/updateMetadata.d.ts +183 -28
- package/dist/generated/instructions/updateMetadata.d.ts.map +1 -1
- package/dist/generated/instructions/updateMetadata.js +21 -0
- package/dist/generated/instructions/updateMetadata.js.map +1 -1
- package/dist/generated/instructions/updateMetadataV2.d.ts +162 -27
- package/dist/generated/instructions/updateMetadataV2.d.ts.map +1 -1
- package/dist/generated/instructions/updateMetadataV2.js +19 -0
- package/dist/generated/instructions/updateMetadataV2.js.map +1 -1
- package/dist/generated/instructions/verifyCollection.d.ts +215 -38
- package/dist/generated/instructions/verifyCollection.d.ts.map +1 -1
- package/dist/generated/instructions/verifyCollection.js +19 -0
- package/dist/generated/instructions/verifyCollection.js.map +1 -1
- package/dist/generated/instructions/verifyCreator.d.ts +161 -17
- package/dist/generated/instructions/verifyCreator.d.ts.map +1 -1
- package/dist/generated/instructions/verifyCreator.js +19 -0
- package/dist/generated/instructions/verifyCreator.js.map +1 -1
- package/dist/generated/instructions/verifyCreatorV2.d.ts +143 -21
- package/dist/generated/instructions/verifyCreatorV2.d.ts.map +1 -1
- package/dist/generated/instructions/verifyCreatorV2.js +19 -0
- package/dist/generated/instructions/verifyCreatorV2.js.map +1 -1
- package/dist/generated/pdas/assetId.d.ts +2 -3
- package/dist/generated/pdas/assetId.d.ts.map +1 -1
- package/dist/generated/pdas/assetId.js +7 -0
- package/dist/generated/pdas/assetId.js.map +1 -1
- package/dist/generated/pdas/bubblegumSigner.d.ts +0 -1
- package/dist/generated/pdas/bubblegumSigner.d.ts.map +1 -1
- package/dist/generated/pdas/bubblegumSigner.js +7 -0
- package/dist/generated/pdas/bubblegumSigner.js.map +1 -1
- package/dist/generated/pdas/index.d.ts +2 -1
- package/dist/generated/pdas/masterEdition.d.ts +2 -3
- package/dist/generated/pdas/masterEdition.d.ts.map +1 -1
- package/dist/generated/pdas/masterEdition.js +7 -0
- package/dist/generated/pdas/masterEdition.js.map +1 -1
- package/dist/generated/pdas/metadata.d.ts +2 -3
- package/dist/generated/pdas/metadata.d.ts.map +1 -1
- package/dist/generated/pdas/metadata.js +7 -0
- package/dist/generated/pdas/metadata.js.map +1 -1
- package/dist/generated/pdas/mintAuthority.d.ts +2 -3
- package/dist/generated/pdas/mintAuthority.d.ts.map +1 -1
- package/dist/generated/pdas/mintAuthority.js +7 -0
- package/dist/generated/pdas/mintAuthority.js.map +1 -1
- package/dist/generated/pdas/treeConfig.d.ts +2 -3
- package/dist/generated/pdas/treeConfig.d.ts.map +1 -1
- package/dist/generated/pdas/treeConfig.js +7 -0
- package/dist/generated/pdas/treeConfig.js.map +1 -1
- package/dist/generated/pdas/voucher.d.ts +2 -3
- package/dist/generated/pdas/voucher.d.ts.map +1 -1
- package/dist/generated/pdas/voucher.js +7 -0
- package/dist/generated/pdas/voucher.js.map +1 -1
- package/dist/generated/programs/bubblegum.d.ts +17 -12
- package/dist/generated/programs/bubblegum.d.ts.map +1 -1
- package/dist/generated/programs/bubblegum.js +11 -1
- package/dist/generated/programs/bubblegum.js.map +1 -1
- package/dist/generated/programs/index.d.ts +2 -1
- package/dist/generated/programs/mplTokenMetadata.d.ts +8 -8
- package/dist/generated/programs/mplTokenMetadata.d.ts.map +1 -1
- package/dist/generated/programs/mplTokenMetadata.js +7 -0
- package/dist/generated/programs/mplTokenMetadata.js.map +1 -1
- package/dist/generated/types/assetDataSchema.d.ts +4 -1
- package/dist/generated/types/assetDataSchema.d.ts.map +1 -1
- package/dist/generated/types/assetDataSchema.js +11 -0
- package/dist/generated/types/assetDataSchema.js.map +1 -1
- package/dist/generated/types/bubblegumEventType.d.ts +4 -1
- package/dist/generated/types/bubblegumEventType.d.ts.map +1 -1
- package/dist/generated/types/bubblegumEventType.js +11 -0
- package/dist/generated/types/bubblegumEventType.js.map +1 -1
- package/dist/generated/types/collection.d.ts +9 -3
- package/dist/generated/types/collection.d.ts.map +1 -1
- package/dist/generated/types/collection.js +7 -0
- package/dist/generated/types/collection.js.map +1 -1
- package/dist/generated/types/creator.d.ts +9 -7
- package/dist/generated/types/creator.d.ts.map +1 -1
- package/dist/generated/types/creator.js +7 -0
- package/dist/generated/types/creator.js.map +1 -1
- package/dist/generated/types/decompressibleState.d.ts +5 -1
- package/dist/generated/types/decompressibleState.d.ts.map +1 -1
- package/dist/generated/types/decompressibleState.js +12 -0
- package/dist/generated/types/decompressibleState.js.map +1 -1
- package/dist/generated/types/index.d.ts +2 -1
- package/dist/generated/types/instructionName.d.ts +4 -1
- package/dist/generated/types/instructionName.d.ts.map +1 -1
- package/dist/generated/types/instructionName.js +11 -0
- package/dist/generated/types/instructionName.js.map +1 -1
- package/dist/generated/types/leafSchema.d.ts +51 -13
- package/dist/generated/types/leafSchema.d.ts.map +1 -1
- package/dist/generated/types/leafSchema.js +7 -0
- package/dist/generated/types/leafSchema.js.map +1 -1
- package/dist/generated/types/metadataArgs.d.ts +19 -7
- package/dist/generated/types/metadataArgs.d.ts.map +1 -1
- package/dist/generated/types/metadataArgs.js +7 -0
- package/dist/generated/types/metadataArgs.js.map +1 -1
- package/dist/generated/types/metadataArgsV2.d.ts +14 -7
- package/dist/generated/types/metadataArgsV2.d.ts.map +1 -1
- package/dist/generated/types/metadataArgsV2.js +7 -0
- package/dist/generated/types/metadataArgsV2.js.map +1 -1
- package/dist/generated/types/tokenProgramVersion.d.ts +1 -1
- package/dist/generated/types/tokenProgramVersion.d.ts.map +1 -1
- package/dist/generated/types/tokenProgramVersion.js +8 -0
- package/dist/generated/types/tokenProgramVersion.js.map +1 -1
- package/dist/generated/types/tokenStandard.d.ts +5 -1
- package/dist/generated/types/tokenStandard.d.ts.map +1 -1
- package/dist/generated/types/tokenStandard.js +12 -0
- package/dist/generated/types/tokenStandard.js.map +1 -1
- package/dist/generated/types/updateArgs.d.ts +26 -7
- package/dist/generated/types/updateArgs.d.ts.map +1 -1
- package/dist/generated/types/updateArgs.js +7 -0
- package/dist/generated/types/updateArgs.js.map +1 -1
- package/dist/generated/types/useMethod.d.ts +1 -1
- package/dist/generated/types/useMethod.d.ts.map +1 -1
- package/dist/generated/types/useMethod.js +8 -0
- package/dist/generated/types/useMethod.js.map +1 -1
- package/dist/generated/types/uses.d.ts +16 -5
- package/dist/generated/types/uses.d.ts.map +1 -1
- package/dist/generated/types/uses.js +7 -0
- package/dist/generated/types/uses.js.map +1 -1
- package/dist/generated/types/version.d.ts +5 -1
- package/dist/generated/types/version.d.ts.map +1 -1
- package/dist/generated/types/version.js +12 -0
- package/dist/generated/types/version.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +6 -6
- package/src/generated/accounts/treeConfig.ts +36 -27
- package/src/generated/accounts/voucher.ts +30 -23
- package/src/generated/errors/bubblegum.ts +121 -154
- package/src/generated/instructions/burn.ts +157 -35
- package/src/generated/instructions/burnV2.ts +197 -52
- package/src/generated/instructions/cancelRedeem.ts +116 -32
- package/src/generated/instructions/closeTreeV2.ts +96 -35
- package/src/generated/instructions/collectV2.ts +34 -23
- package/src/generated/instructions/compress.ts +136 -30
- package/src/generated/instructions/createTree.ts +137 -33
- package/src/generated/instructions/createTreeV2.ts +128 -36
- package/src/generated/instructions/decompressV1.ts +124 -31
- package/src/generated/instructions/delegate.ts +159 -38
- package/src/generated/instructions/delegateAndFreezeV2.ts +191 -51
- package/src/generated/instructions/delegateV2.ts +189 -51
- package/src/generated/instructions/freezeV2.ts +193 -49
- package/src/generated/instructions/mintToCollectionV1.ts +186 -37
- package/src/generated/instructions/mintV1.ts +127 -31
- package/src/generated/instructions/mintV2.ts +184 -45
- package/src/generated/instructions/redeem.ts +172 -38
- package/src/generated/instructions/setAndVerifyCollection.ts +236 -54
- package/src/generated/instructions/setCollectionV2.ts +202 -58
- package/src/generated/instructions/setDecompressableState.ts +59 -31
- package/src/generated/instructions/setDecompressibleState.ts +60 -31
- package/src/generated/instructions/setNonTransferableV2.ts +184 -52
- package/src/generated/instructions/setTreeDelegate.ts +82 -28
- package/src/generated/instructions/thawAndRevokeV2.ts +179 -48
- package/src/generated/instructions/thawV2.ts +185 -49
- package/src/generated/instructions/transfer.ts +156 -35
- package/src/generated/instructions/transferV2.ts +185 -52
- package/src/generated/instructions/unverifyCollection.ts +229 -54
- package/src/generated/instructions/unverifyCreator.ts +181 -39
- package/src/generated/instructions/unverifyCreatorV2.ts +164 -46
- package/src/generated/instructions/updateAssetDataV2.ts +200 -50
- package/src/generated/instructions/updateMetadata.ts +200 -52
- package/src/generated/instructions/updateMetadataV2.ts +183 -54
- package/src/generated/instructions/verifyCollection.ts +229 -54
- package/src/generated/instructions/verifyCreator.ts +181 -39
- package/src/generated/instructions/verifyCreatorV2.ts +164 -46
- package/src/generated/pdas/assetId.ts +4 -3
- package/src/generated/pdas/bubblegumSigner.ts +6 -2
- package/src/generated/pdas/masterEdition.ts +4 -3
- package/src/generated/pdas/metadata.ts +4 -3
- package/src/generated/pdas/mintAuthority.ts +8 -4
- package/src/generated/pdas/treeConfig.ts +8 -4
- package/src/generated/pdas/voucher.ts +4 -3
- package/src/generated/programs/bubblegum.ts +146 -144
- package/src/generated/programs/mplTokenMetadata.ts +5 -10
- package/src/generated/types/assetDataSchema.ts +14 -8
- package/src/generated/types/bubblegumEventType.ts +13 -7
- package/src/generated/types/collection.ts +13 -8
- package/src/generated/types/creator.ts +11 -10
- package/src/generated/types/decompressibleState.ts +14 -7
- package/src/generated/types/instructionName.ts +46 -40
- package/src/generated/types/leafSchema.ts +59 -22
- package/src/generated/types/metadataArgs.ts +35 -27
- package/src/generated/types/metadataArgsV2.ts +23 -20
- package/src/generated/types/tokenProgramVersion.ts +10 -7
- package/src/generated/types/tokenStandard.ts +16 -9
- package/src/generated/types/updateArgs.ts +36 -15
- package/src/generated/types/useMethod.ts +11 -8
- package/src/generated/types/uses.ts +24 -11
- package/src/generated/types/version.ts +14 -7
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { combineCodec, getEnumDecoder, getEnumEncoder } from "@solana/kit";
|
|
2
2
|
//#region src/generated/types/decompressibleState.ts
|
|
3
|
+
/**
|
|
4
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
5
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
6
|
+
* to add features, then rerun Codama to update it.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/codama-idl/codama
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Whether leaves in a tree may be redeemed and decompressed into
|
|
12
|
+
* regular SPL/Token Metadata NFTs. Set per-tree with
|
|
13
|
+
* `setDecompressibleState`.
|
|
14
|
+
*/
|
|
3
15
|
let DecompressibleState = /* @__PURE__ */ function(DecompressibleState) {
|
|
4
16
|
DecompressibleState[DecompressibleState["Enabled"] = 0] = "Enabled";
|
|
5
17
|
DecompressibleState[DecompressibleState["Disabled"] = 1] = "Disabled";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decompressibleState.js","names":[],"sources":["../../../src/generated/types/decompressibleState.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport
|
|
1
|
+
{"version":3,"file":"decompressibleState.js","names":[],"sources":["../../../src/generated/types/decompressibleState.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getEnumDecoder,\n getEnumEncoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"@solana/kit\";\n\n/**\n * Whether leaves in a tree may be redeemed and decompressed into\n * regular SPL/Token Metadata NFTs. Set per-tree with\n * `setDecompressibleState`.\n */\nexport enum DecompressibleState {\n Enabled,\n Disabled,\n}\n\nexport type DecompressibleStateArgs = DecompressibleState;\n\nexport function getDecompressibleStateEncoder(): FixedSizeEncoder<DecompressibleStateArgs> {\n return getEnumEncoder(DecompressibleState);\n}\n\nexport function getDecompressibleStateDecoder(): FixedSizeDecoder<DecompressibleState> {\n return getEnumDecoder(DecompressibleState);\n}\n\nexport function getDecompressibleStateCodec(): FixedSizeCodec<\n DecompressibleStateArgs,\n DecompressibleState\n> {\n return combineCodec(\n getDecompressibleStateEncoder(),\n getDecompressibleStateDecoder(),\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAsBA,IAAY,sBAAL,yBAAA,qBAAA;CACL,oBAAA,oBAAA,aAAA,KAAA;CACA,oBAAA,oBAAA,cAAA,KAAA;;AACF,EAAA,CAAA,CAAA;AAIA,SAAgB,gCAA2E;CACzF,OAAO,eAAe,mBAAmB;AAC3C;AAEA,SAAgB,gCAAuE;CACrF,OAAO,eAAe,mBAAmB;AAC3C;AAEA,SAAgB,8BAGd;CACA,OAAO,aACL,8BAA8B,GAC9B,8BAA8B,CAChC;AACF"}
|
|
@@ -12,4 +12,5 @@ import { TokenStandard, TokenStandardArgs, getTokenStandardCodec, getTokenStanda
|
|
|
12
12
|
import { UpdateArgs, UpdateArgsArgs, getUpdateArgsCodec, getUpdateArgsDecoder, getUpdateArgsEncoder } from "./updateArgs.js";
|
|
13
13
|
import { UseMethod, UseMethodArgs, getUseMethodCodec, getUseMethodDecoder, getUseMethodEncoder } from "./useMethod.js";
|
|
14
14
|
import { Uses, UsesArgs, getUsesCodec, getUsesDecoder, getUsesEncoder } from "./uses.js";
|
|
15
|
-
import { Version, VersionArgs, getVersionCodec, getVersionDecoder, getVersionEncoder } from "./version.js";
|
|
15
|
+
import { Version, VersionArgs, getVersionCodec, getVersionDecoder, getVersionEncoder } from "./version.js";
|
|
16
|
+
export { AssetDataSchema, AssetDataSchemaArgs, BubblegumEventType, BubblegumEventTypeArgs, Collection, CollectionArgs, Creator, CreatorArgs, DecompressibleState, DecompressibleStateArgs, InstructionName, InstructionNameArgs, LeafSchema, LeafSchemaArgs, MetadataArgs, MetadataArgsArgs, MetadataArgsV2, MetadataArgsV2Args, TokenProgramVersion, TokenProgramVersionArgs, TokenStandard, TokenStandardArgs, UpdateArgs, UpdateArgsArgs, UseMethod, UseMethodArgs, Uses, UsesArgs, Version, VersionArgs, getAssetDataSchemaCodec, getAssetDataSchemaDecoder, getAssetDataSchemaEncoder, getBubblegumEventTypeCodec, getBubblegumEventTypeDecoder, getBubblegumEventTypeEncoder, getCollectionCodec, getCollectionDecoder, getCollectionEncoder, getCreatorCodec, getCreatorDecoder, getCreatorEncoder, getDecompressibleStateCodec, getDecompressibleStateDecoder, getDecompressibleStateEncoder, getInstructionNameCodec, getInstructionNameDecoder, getInstructionNameEncoder, getLeafSchemaCodec, getLeafSchemaDecoder, getLeafSchemaEncoder, getMetadataArgsCodec, getMetadataArgsDecoder, getMetadataArgsEncoder, getMetadataArgsV2Codec, getMetadataArgsV2Decoder, getMetadataArgsV2Encoder, getTokenProgramVersionCodec, getTokenProgramVersionDecoder, getTokenProgramVersionEncoder, getTokenStandardCodec, getTokenStandardDecoder, getTokenStandardEncoder, getUpdateArgsCodec, getUpdateArgsDecoder, getUpdateArgsEncoder, getUseMethodCodec, getUseMethodDecoder, getUseMethodEncoder, getUsesCodec, getUsesDecoder, getUsesEncoder, getVersionCodec, getVersionDecoder, getVersionEncoder, isLeafSchema, leafSchema };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder } from "@solana/kit";
|
|
2
|
-
|
|
3
2
|
//#region src/generated/types/instructionName.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Discriminator identifying which Bubblegum instruction produced a
|
|
5
|
+
* logged event, read back by off-chain indexers.
|
|
6
|
+
*/
|
|
4
7
|
declare enum InstructionName {
|
|
5
8
|
Unknown = 0,
|
|
6
9
|
MintV1 = 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructionName.d.ts","names":[],"sources":["../../../src/generated/types/instructionName.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"instructionName.d.ts","names":[],"sources":["../../../src/generated/types/instructionName.ts"],"mappings":";;;;;;aAqBY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU,sBAAsB;iBAElB,6BAA6B,iBAAiB;iBAI9C,6BAA6B,iBAAiB;iBAI9C,2BAA2B,eACzC,qBACA"}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { combineCodec, getEnumDecoder, getEnumEncoder } from "@solana/kit";
|
|
2
2
|
//#region src/generated/types/instructionName.ts
|
|
3
|
+
/**
|
|
4
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
5
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
6
|
+
* to add features, then rerun Codama to update it.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/codama-idl/codama
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Discriminator identifying which Bubblegum instruction produced a
|
|
12
|
+
* logged event, read back by off-chain indexers.
|
|
13
|
+
*/
|
|
3
14
|
let InstructionName = /* @__PURE__ */ function(InstructionName) {
|
|
4
15
|
InstructionName[InstructionName["Unknown"] = 0] = "Unknown";
|
|
5
16
|
InstructionName[InstructionName["MintV1"] = 1] = "MintV1";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructionName.js","names":[],"sources":["../../../src/generated/types/instructionName.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport
|
|
1
|
+
{"version":3,"file":"instructionName.js","names":[],"sources":["../../../src/generated/types/instructionName.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getEnumDecoder,\n getEnumEncoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"@solana/kit\";\n\n/**\n * Discriminator identifying which Bubblegum instruction produced a\n * logged event, read back by off-chain indexers.\n */\nexport enum InstructionName {\n Unknown,\n MintV1,\n Redeem,\n CancelRedeem,\n Transfer,\n Delegate,\n DecompressV1,\n Compress,\n Burn,\n CreateTree,\n VerifyCreator,\n UnverifyCreator,\n VerifyCollection,\n UnverifyCollection,\n SetAndVerifyCollection,\n MintToCollectionV1,\n SetDecompressibleState,\n UpdateMetadata,\n BurnV2,\n CollectV2,\n CreateTreeV2,\n DelegateAndFreezeV2,\n DelegateV2,\n FreezeV2,\n MintV2,\n SetCollectionV2,\n SetNonTransferableV2,\n ThawAndRevokeV2,\n ThawV2,\n TransferV2,\n UnverifyCreatorV2,\n UpdateAssetDataV2,\n UpdateMetadataV2,\n VerifyCreatorV2,\n CloseTreeV2,\n}\n\nexport type InstructionNameArgs = InstructionName;\n\nexport function getInstructionNameEncoder(): FixedSizeEncoder<InstructionNameArgs> {\n return getEnumEncoder(InstructionName);\n}\n\nexport function getInstructionNameDecoder(): FixedSizeDecoder<InstructionName> {\n return getEnumDecoder(InstructionName);\n}\n\nexport function getInstructionNameCodec(): FixedSizeCodec<\n InstructionNameArgs,\n InstructionName\n> {\n return combineCodec(getInstructionNameEncoder(), getInstructionNameDecoder());\n}\n"],"mappings":";;;;;;;;;;;;;AAqBA,IAAY,kBAAL,yBAAA,iBAAA;CACL,gBAAA,gBAAA,aAAA,KAAA;CACA,gBAAA,gBAAA,YAAA,KAAA;CACA,gBAAA,gBAAA,YAAA,KAAA;CACA,gBAAA,gBAAA,kBAAA,KAAA;CACA,gBAAA,gBAAA,cAAA,KAAA;CACA,gBAAA,gBAAA,cAAA,KAAA;CACA,gBAAA,gBAAA,kBAAA,KAAA;CACA,gBAAA,gBAAA,cAAA,KAAA;CACA,gBAAA,gBAAA,UAAA,KAAA;CACA,gBAAA,gBAAA,gBAAA,KAAA;CACA,gBAAA,gBAAA,mBAAA,MAAA;CACA,gBAAA,gBAAA,qBAAA,MAAA;CACA,gBAAA,gBAAA,sBAAA,MAAA;CACA,gBAAA,gBAAA,wBAAA,MAAA;CACA,gBAAA,gBAAA,4BAAA,MAAA;CACA,gBAAA,gBAAA,wBAAA,MAAA;CACA,gBAAA,gBAAA,4BAAA,MAAA;CACA,gBAAA,gBAAA,oBAAA,MAAA;CACA,gBAAA,gBAAA,YAAA,MAAA;CACA,gBAAA,gBAAA,eAAA,MAAA;CACA,gBAAA,gBAAA,kBAAA,MAAA;CACA,gBAAA,gBAAA,yBAAA,MAAA;CACA,gBAAA,gBAAA,gBAAA,MAAA;CACA,gBAAA,gBAAA,cAAA,MAAA;CACA,gBAAA,gBAAA,YAAA,MAAA;CACA,gBAAA,gBAAA,qBAAA,MAAA;CACA,gBAAA,gBAAA,0BAAA,MAAA;CACA,gBAAA,gBAAA,qBAAA,MAAA;CACA,gBAAA,gBAAA,YAAA,MAAA;CACA,gBAAA,gBAAA,gBAAA,MAAA;CACA,gBAAA,gBAAA,uBAAA,MAAA;CACA,gBAAA,gBAAA,uBAAA,MAAA;CACA,gBAAA,gBAAA,sBAAA,MAAA;CACA,gBAAA,gBAAA,qBAAA,MAAA;CACA,gBAAA,gBAAA,iBAAA,MAAA;;AACF,EAAA,CAAA,CAAA;AAIA,SAAgB,4BAAmE;CACjF,OAAO,eAAe,eAAe;AACvC;AAEA,SAAgB,4BAA+D;CAC7E,OAAO,eAAe,eAAe;AACvC;AAEA,SAAgB,0BAGd;CACA,OAAO,aAAa,0BAA0B,GAAG,0BAA0B,CAAC;AAC9E"}
|
|
@@ -1,44 +1,82 @@
|
|
|
1
1
|
import { Address, Codec, Decoder, Encoder, GetDiscriminatedUnionVariant, GetDiscriminatedUnionVariantContent } from "@solana/kit";
|
|
2
|
-
|
|
3
2
|
//#region src/generated/types/leafSchema.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The canonical on-chain representation of a compressed NFT leaf,
|
|
5
|
+
* hashed to produce the value stored at a tree's leaf node.
|
|
6
|
+
*
|
|
7
|
+
* `V1` is produced by `mintV1`/`mintToCollectionV1` and the legacy
|
|
8
|
+
* instruction family; `V2` is produced by `mintV2` and adds
|
|
9
|
+
* `collectionHash`, `assetDataHash` and `flags` to support MPL Core
|
|
10
|
+
* collections and freezing/non-transferable assets.
|
|
11
|
+
*/
|
|
4
12
|
type LeafSchema = {
|
|
5
13
|
__kind: "V1";
|
|
14
|
+
/** Asset id of the leaf, derived from the tree address and `nonce`. */
|
|
6
15
|
id: Address;
|
|
16
|
+
/** Current owner of the leaf. */
|
|
7
17
|
owner: Address;
|
|
18
|
+
/** Current delegate of the leaf (equal to `owner` when unset). */
|
|
8
19
|
delegate: Address;
|
|
20
|
+
/** Tree-scoped nonce assigned to the leaf when it was minted; part of the asset id derivation. */
|
|
9
21
|
nonce: bigint;
|
|
10
|
-
|
|
11
|
-
|
|
22
|
+
/** Keccak256 hash of the leaf's metadata (`MetadataArgs`/`MetadataArgsV2`). */
|
|
23
|
+
dataHash: Array<number>;
|
|
24
|
+
/** Keccak256 hash of the leaf's creators array. */
|
|
25
|
+
creatorHash: Array<number>;
|
|
12
26
|
} | {
|
|
13
27
|
__kind: "V2";
|
|
28
|
+
/** Asset id of the leaf, derived from the tree address and `nonce`. */
|
|
14
29
|
id: Address;
|
|
30
|
+
/** Current owner of the leaf. */
|
|
15
31
|
owner: Address;
|
|
32
|
+
/** Current delegate of the leaf (equal to `owner` when unset). */
|
|
16
33
|
delegate: Address;
|
|
34
|
+
/** Tree-scoped nonce assigned to the leaf when it was minted; part of the asset id derivation. */
|
|
17
35
|
nonce: bigint;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
36
|
+
/** Keccak256 hash of the leaf's metadata (`MetadataArgs`/`MetadataArgsV2`). */
|
|
37
|
+
dataHash: Array<number>;
|
|
38
|
+
/** Keccak256 hash of the leaf's creators array. */
|
|
39
|
+
creatorHash: Array<number>;
|
|
40
|
+
/** Hash of the leaf's MPL Core collection reference, if any (V2 only). */
|
|
41
|
+
collectionHash: Array<number>;
|
|
42
|
+
/** Hash of the leaf's optional off-chain asset data, if any (V2 only). */
|
|
43
|
+
assetDataHash: Array<number>;
|
|
44
|
+
/** Packed status bits for the leaf, e.g. frozen and non-transferable (V2 only). */
|
|
22
45
|
flags: number;
|
|
23
46
|
};
|
|
24
47
|
type LeafSchemaArgs = {
|
|
25
48
|
__kind: "V1";
|
|
49
|
+
/** Asset id of the leaf, derived from the tree address and `nonce`. */
|
|
26
50
|
id: Address;
|
|
51
|
+
/** Current owner of the leaf. */
|
|
27
52
|
owner: Address;
|
|
53
|
+
/** Current delegate of the leaf (equal to `owner` when unset). */
|
|
28
54
|
delegate: Address;
|
|
55
|
+
/** Tree-scoped nonce assigned to the leaf when it was minted; part of the asset id derivation. */
|
|
29
56
|
nonce: number | bigint;
|
|
30
|
-
|
|
31
|
-
|
|
57
|
+
/** Keccak256 hash of the leaf's metadata (`MetadataArgs`/`MetadataArgsV2`). */
|
|
58
|
+
dataHash: Array<number>;
|
|
59
|
+
/** Keccak256 hash of the leaf's creators array. */
|
|
60
|
+
creatorHash: Array<number>;
|
|
32
61
|
} | {
|
|
33
62
|
__kind: "V2";
|
|
63
|
+
/** Asset id of the leaf, derived from the tree address and `nonce`. */
|
|
34
64
|
id: Address;
|
|
65
|
+
/** Current owner of the leaf. */
|
|
35
66
|
owner: Address;
|
|
67
|
+
/** Current delegate of the leaf (equal to `owner` when unset). */
|
|
36
68
|
delegate: Address;
|
|
69
|
+
/** Tree-scoped nonce assigned to the leaf when it was minted; part of the asset id derivation. */
|
|
37
70
|
nonce: number | bigint;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
71
|
+
/** Keccak256 hash of the leaf's metadata (`MetadataArgs`/`MetadataArgsV2`). */
|
|
72
|
+
dataHash: Array<number>;
|
|
73
|
+
/** Keccak256 hash of the leaf's creators array. */
|
|
74
|
+
creatorHash: Array<number>;
|
|
75
|
+
/** Hash of the leaf's MPL Core collection reference, if any (V2 only). */
|
|
76
|
+
collectionHash: Array<number>;
|
|
77
|
+
/** Hash of the leaf's optional off-chain asset data, if any (V2 only). */
|
|
78
|
+
assetDataHash: Array<number>;
|
|
79
|
+
/** Packed status bits for the leaf, e.g. frozen and non-transferable (V2 only). */
|
|
42
80
|
flags: number;
|
|
43
81
|
};
|
|
44
82
|
declare function getLeafSchemaEncoder(): Encoder<LeafSchemaArgs>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leafSchema.d.ts","names":[],"sources":["../../../src/generated/types/leafSchema.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"leafSchema.d.ts","names":[],"sources":["../../../src/generated/types/leafSchema.ts"],"mappings":";;;;;;;;;;;KAuCY;EAEN;;EAEA,IAAI;;EAEJ,OAAO;;EAEP,UAAU;;EAEV;;EAEA,UAAU;;EAEV,aAAa;;EAGb;;EAEA,IAAI;;EAEJ,OAAO;;EAEP,UAAU;;EAEV;;EAEA,UAAU;;EAEV,aAAa;;EAEb,gBAAgB;;EAEhB,eAAe;;EAEf;;KAGM;EAEN;;EAEA,IAAI;;EAEJ,OAAO;;EAEP,UAAU;;EAEV;;EAEA,UAAU;;EAEV,aAAa;;EAGb;;EAEA,IAAI;;EAEJ,OAAO;;EAEP,UAAU;;EAEV;;EAEA,UAAU;;EAEV,aAAa;;EAEb,gBAAgB;;EAEhB,eAAe;;EAEf;;iBAGU,wBAAwB,QAAQ;iBA8BhC,wBAAwB,QAAQ;iBA8BhC,sBAAsB,MAAM,gBAAgB;iBAK5C,WACd,YACA,MAAM,oCAAoC,kCACzC,6BAA6B;iBAChB,WACd,YACA,MAAM,oCAAoC,kCACzC,6BAA6B;iBAUhB,aAAa,UAAU,sBACrC,MAAM,GACN,OAAO,aACN,SAAS;EAAe,QAAQ"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { combineCodec, getAddressDecoder, getAddressEncoder, getArrayDecoder, getArrayEncoder, getDiscriminatedUnionDecoder, getDiscriminatedUnionEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder } from "@solana/kit";
|
|
2
2
|
//#region src/generated/types/leafSchema.ts
|
|
3
|
+
/**
|
|
4
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
5
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
6
|
+
* to add features, then rerun Codama to update it.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/codama-idl/codama
|
|
9
|
+
*/
|
|
3
10
|
function getLeafSchemaEncoder() {
|
|
4
11
|
return getDiscriminatedUnionEncoder([["V1", getStructEncoder([
|
|
5
12
|
["id", getAddressEncoder()],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leafSchema.js","names":[],"sources":["../../../src/generated/types/leafSchema.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport
|
|
1
|
+
{"version":3,"file":"leafSchema.js","names":[],"sources":["../../../src/generated/types/leafSchema.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getAddressDecoder,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getDiscriminatedUnionDecoder,\n getDiscriminatedUnionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type GetDiscriminatedUnionVariant,\n type GetDiscriminatedUnionVariantContent,\n} from \"@solana/kit\";\n\n/**\n * The canonical on-chain representation of a compressed NFT leaf,\n * hashed to produce the value stored at a tree's leaf node.\n *\n * `V1` is produced by `mintV1`/`mintToCollectionV1` and the legacy\n * instruction family; `V2` is produced by `mintV2` and adds\n * `collectionHash`, `assetDataHash` and `flags` to support MPL Core\n * collections and freezing/non-transferable assets.\n */\nexport type LeafSchema =\n | {\n __kind: \"V1\";\n /** Asset id of the leaf, derived from the tree address and `nonce`. */\n id: Address;\n /** Current owner of the leaf. */\n owner: Address;\n /** Current delegate of the leaf (equal to `owner` when unset). */\n delegate: Address;\n /** Tree-scoped nonce assigned to the leaf when it was minted; part of the asset id derivation. */\n nonce: bigint;\n /** Keccak256 hash of the leaf's metadata (`MetadataArgs`/`MetadataArgsV2`). */\n dataHash: Array<number>;\n /** Keccak256 hash of the leaf's creators array. */\n creatorHash: Array<number>;\n }\n | {\n __kind: \"V2\";\n /** Asset id of the leaf, derived from the tree address and `nonce`. */\n id: Address;\n /** Current owner of the leaf. */\n owner: Address;\n /** Current delegate of the leaf (equal to `owner` when unset). */\n delegate: Address;\n /** Tree-scoped nonce assigned to the leaf when it was minted; part of the asset id derivation. */\n nonce: bigint;\n /** Keccak256 hash of the leaf's metadata (`MetadataArgs`/`MetadataArgsV2`). */\n dataHash: Array<number>;\n /** Keccak256 hash of the leaf's creators array. */\n creatorHash: Array<number>;\n /** Hash of the leaf's MPL Core collection reference, if any (V2 only). */\n collectionHash: Array<number>;\n /** Hash of the leaf's optional off-chain asset data, if any (V2 only). */\n assetDataHash: Array<number>;\n /** Packed status bits for the leaf, e.g. frozen and non-transferable (V2 only). */\n flags: number;\n };\n\nexport type LeafSchemaArgs =\n | {\n __kind: \"V1\";\n /** Asset id of the leaf, derived from the tree address and `nonce`. */\n id: Address;\n /** Current owner of the leaf. */\n owner: Address;\n /** Current delegate of the leaf (equal to `owner` when unset). */\n delegate: Address;\n /** Tree-scoped nonce assigned to the leaf when it was minted; part of the asset id derivation. */\n nonce: number | bigint;\n /** Keccak256 hash of the leaf's metadata (`MetadataArgs`/`MetadataArgsV2`). */\n dataHash: Array<number>;\n /** Keccak256 hash of the leaf's creators array. */\n creatorHash: Array<number>;\n }\n | {\n __kind: \"V2\";\n /** Asset id of the leaf, derived from the tree address and `nonce`. */\n id: Address;\n /** Current owner of the leaf. */\n owner: Address;\n /** Current delegate of the leaf (equal to `owner` when unset). */\n delegate: Address;\n /** Tree-scoped nonce assigned to the leaf when it was minted; part of the asset id derivation. */\n nonce: number | bigint;\n /** Keccak256 hash of the leaf's metadata (`MetadataArgs`/`MetadataArgsV2`). */\n dataHash: Array<number>;\n /** Keccak256 hash of the leaf's creators array. */\n creatorHash: Array<number>;\n /** Hash of the leaf's MPL Core collection reference, if any (V2 only). */\n collectionHash: Array<number>;\n /** Hash of the leaf's optional off-chain asset data, if any (V2 only). */\n assetDataHash: Array<number>;\n /** Packed status bits for the leaf, e.g. frozen and non-transferable (V2 only). */\n flags: number;\n };\n\nexport function getLeafSchemaEncoder(): Encoder<LeafSchemaArgs> {\n return getDiscriminatedUnionEncoder([\n [\n \"V1\",\n getStructEncoder([\n [\"id\", getAddressEncoder()],\n [\"owner\", getAddressEncoder()],\n [\"delegate\", getAddressEncoder()],\n [\"nonce\", getU64Encoder()],\n [\"dataHash\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"creatorHash\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n ]),\n ],\n [\n \"V2\",\n getStructEncoder([\n [\"id\", getAddressEncoder()],\n [\"owner\", getAddressEncoder()],\n [\"delegate\", getAddressEncoder()],\n [\"nonce\", getU64Encoder()],\n [\"dataHash\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"creatorHash\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"collectionHash\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"assetDataHash\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"flags\", getU8Encoder()],\n ]),\n ],\n ]);\n}\n\nexport function getLeafSchemaDecoder(): Decoder<LeafSchema> {\n return getDiscriminatedUnionDecoder([\n [\n \"V1\",\n getStructDecoder([\n [\"id\", getAddressDecoder()],\n [\"owner\", getAddressDecoder()],\n [\"delegate\", getAddressDecoder()],\n [\"nonce\", getU64Decoder()],\n [\"dataHash\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"creatorHash\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n ]),\n ],\n [\n \"V2\",\n getStructDecoder([\n [\"id\", getAddressDecoder()],\n [\"owner\", getAddressDecoder()],\n [\"delegate\", getAddressDecoder()],\n [\"nonce\", getU64Decoder()],\n [\"dataHash\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"creatorHash\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"collectionHash\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"assetDataHash\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"flags\", getU8Decoder()],\n ]),\n ],\n ]);\n}\n\nexport function getLeafSchemaCodec(): Codec<LeafSchemaArgs, LeafSchema> {\n return combineCodec(getLeafSchemaEncoder(), getLeafSchemaDecoder());\n}\n\n// Data Enum Helpers.\nexport function leafSchema(\n kind: \"V1\",\n data: GetDiscriminatedUnionVariantContent<LeafSchemaArgs, \"__kind\", \"V1\">,\n): GetDiscriminatedUnionVariant<LeafSchemaArgs, \"__kind\", \"V1\">;\nexport function leafSchema(\n kind: \"V2\",\n data: GetDiscriminatedUnionVariantContent<LeafSchemaArgs, \"__kind\", \"V2\">,\n): GetDiscriminatedUnionVariant<LeafSchemaArgs, \"__kind\", \"V2\">;\nexport function leafSchema<K extends LeafSchemaArgs[\"__kind\"], Data>(\n kind: K,\n data?: Data,\n) {\n return Array.isArray(data)\n ? { __kind: kind, fields: data }\n : { __kind: kind, ...(data ?? {}) };\n}\n\nexport function isLeafSchema<K extends LeafSchema[\"__kind\"]>(\n kind: K,\n value: LeafSchema,\n): value is LeafSchema & { __kind: K } {\n return value.__kind === kind;\n}\n"],"mappings":";;;;;;;;;AAmHA,SAAgB,uBAAgD;CAC9D,OAAO,6BAA6B,CAClC,CACE,MACA,iBAAiB;EACf,CAAC,MAAM,kBAAkB,CAAC;EAC1B,CAAC,SAAS,kBAAkB,CAAC;EAC7B,CAAC,YAAY,kBAAkB,CAAC;EAChC,CAAC,SAAS,cAAc,CAAC;EACzB,CAAC,YAAY,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC1D,CAAC,eAAe,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;CAC/D,CAAC,CACH,GACA,CACE,MACA,iBAAiB;EACf,CAAC,MAAM,kBAAkB,CAAC;EAC1B,CAAC,SAAS,kBAAkB,CAAC;EAC7B,CAAC,YAAY,kBAAkB,CAAC;EAChC,CAAC,SAAS,cAAc,CAAC;EACzB,CAAC,YAAY,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC1D,CAAC,eAAe,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC7D,CAAC,kBAAkB,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAChE,CAAC,iBAAiB,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC/D,CAAC,SAAS,aAAa,CAAC;CAC1B,CAAC,CACH,CACF,CAAC;AACH;AAEA,SAAgB,uBAA4C;CAC1D,OAAO,6BAA6B,CAClC,CACE,MACA,iBAAiB;EACf,CAAC,MAAM,kBAAkB,CAAC;EAC1B,CAAC,SAAS,kBAAkB,CAAC;EAC7B,CAAC,YAAY,kBAAkB,CAAC;EAChC,CAAC,SAAS,cAAc,CAAC;EACzB,CAAC,YAAY,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC1D,CAAC,eAAe,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;CAC/D,CAAC,CACH,GACA,CACE,MACA,iBAAiB;EACf,CAAC,MAAM,kBAAkB,CAAC;EAC1B,CAAC,SAAS,kBAAkB,CAAC;EAC7B,CAAC,YAAY,kBAAkB,CAAC;EAChC,CAAC,SAAS,cAAc,CAAC;EACzB,CAAC,YAAY,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC1D,CAAC,eAAe,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC7D,CAAC,kBAAkB,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAChE,CAAC,iBAAiB,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC/D,CAAC,SAAS,aAAa,CAAC;CAC1B,CAAC,CACH,CACF,CAAC;AACH;AAEA,SAAgB,qBAAwD;CACtE,OAAO,aAAa,qBAAqB,GAAG,qBAAqB,CAAC;AACpE;AAWA,SAAgB,WACd,MACA,MACA;CACA,OAAO,MAAM,QAAQ,IAAI,IACrB;EAAE,QAAQ;EAAM,QAAQ;CAAK,IAC7B;EAAE,QAAQ;EAAM,GAAI,QAAQ,CAAC;CAAG;AACtC;AAEA,SAAgB,aACd,MACA,OACqC;CACrC,OAAO,MAAM,WAAW;AAC1B"}
|
|
@@ -3,10 +3,18 @@ import { Creator, CreatorArgs } from "./creator.js";
|
|
|
3
3
|
import { TokenProgramVersion, TokenProgramVersionArgs } from "./tokenProgramVersion.js";
|
|
4
4
|
import { TokenStandard, TokenStandardArgs } from "./tokenStandard.js";
|
|
5
5
|
import { Uses, UsesArgs } from "./uses.js";
|
|
6
|
+
import "./index.js";
|
|
6
7
|
import { Codec, Decoder, Encoder, Option, OptionOrNullable } from "@solana/kit";
|
|
7
|
-
|
|
8
8
|
//#region src/generated/types/metadataArgs.d.ts
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Metadata for a V1 (`LeafSchema` V1) compressed NFT leaf.
|
|
11
|
+
*
|
|
12
|
+
* Mirrors the fields of a Token Metadata `Metadata` account closely
|
|
13
|
+
* enough that a leaf can be decompressed into one. Hashed (along with
|
|
14
|
+
* `creators`) to produce the `dataHash`/`creatorHash` used to verify
|
|
15
|
+
* the leaf on every mutating instruction.
|
|
16
|
+
*/
|
|
17
|
+
type MetadataArgs = {
|
|
10
18
|
/** The name of the asset */
|
|
11
19
|
name: string;
|
|
12
20
|
/** The symbol for the asset */
|
|
@@ -27,10 +35,12 @@ interface MetadataArgs {
|
|
|
27
35
|
collection: Option<Collection>;
|
|
28
36
|
/** Uses */
|
|
29
37
|
uses: Option<Uses>;
|
|
38
|
+
/** Which SPL token program a decompressed version of this leaf's mint should use. */
|
|
30
39
|
tokenProgramVersion: TokenProgramVersion;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
40
|
+
/** Creators of the asset and their royalty shares; hashed to produce `creatorHash`. */
|
|
41
|
+
creators: Array<Creator>;
|
|
42
|
+
};
|
|
43
|
+
type MetadataArgsArgs = {
|
|
34
44
|
/** The name of the asset */
|
|
35
45
|
name: string;
|
|
36
46
|
/** The symbol for the asset */
|
|
@@ -51,9 +61,11 @@ interface MetadataArgsArgs {
|
|
|
51
61
|
collection: OptionOrNullable<CollectionArgs>;
|
|
52
62
|
/** Uses */
|
|
53
63
|
uses: OptionOrNullable<UsesArgs>;
|
|
64
|
+
/** Which SPL token program a decompressed version of this leaf's mint should use. */
|
|
54
65
|
tokenProgramVersion: TokenProgramVersionArgs;
|
|
55
|
-
|
|
56
|
-
|
|
66
|
+
/** Creators of the asset and their royalty shares; hashed to produce `creatorHash`. */
|
|
67
|
+
creators: Array<CreatorArgs>;
|
|
68
|
+
};
|
|
57
69
|
declare function getMetadataArgsEncoder(): Encoder<MetadataArgsArgs>;
|
|
58
70
|
declare function getMetadataArgsDecoder(): Decoder<MetadataArgs>;
|
|
59
71
|
declare function getMetadataArgsCodec(): Codec<MetadataArgsArgs, MetadataArgs>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadataArgs.d.ts","names":[],"sources":["../../../src/generated/types/metadataArgs.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"metadataArgs.d.ts","names":[],"sources":["../../../src/generated/types/metadataArgs.ts"],"mappings":";;;;;;;;;;;;;;;;KAiEY;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,cAAc;;EAEd,eAAe,OAAO;;EAEtB,YAAY,OAAO;;EAEnB,MAAM,OAAO;;EAEb,qBAAqB;;EAErB,UAAU,MAAM;;KAGN;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,cAAc;;EAEd,eAAe,iBAAiB;;EAEhC,YAAY,iBAAiB;;EAE7B,MAAM,iBAAiB;;EAEvB,qBAAqB;;EAErB,UAAU,MAAM;;iBAGF,0BAA0B,QAAQ;iBAiBlC,0BAA0B,QAAQ;iBAiBlC,wBAAwB,MAAM,kBAAkB"}
|
|
@@ -5,6 +5,13 @@ import { getTokenStandardDecoder, getTokenStandardEncoder } from "./tokenStandar
|
|
|
5
5
|
import { getUsesDecoder, getUsesEncoder } from "./uses.js";
|
|
6
6
|
import { addDecoderSizePrefix, addEncoderSizePrefix, combineCodec, getArrayDecoder, getArrayEncoder, getBooleanDecoder, getBooleanEncoder, getOptionDecoder, getOptionEncoder, getStructDecoder, getStructEncoder, getU16Decoder, getU16Encoder, getU32Decoder, getU32Encoder, getU8Decoder, getU8Encoder, getUtf8Decoder, getUtf8Encoder } from "@solana/kit";
|
|
7
7
|
//#region src/generated/types/metadataArgs.ts
|
|
8
|
+
/**
|
|
9
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
10
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
11
|
+
* to add features, then rerun Codama to update it.
|
|
12
|
+
*
|
|
13
|
+
* @see https://github.com/codama-idl/codama
|
|
14
|
+
*/
|
|
8
15
|
function getMetadataArgsEncoder() {
|
|
9
16
|
return getStructEncoder([
|
|
10
17
|
["name", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadataArgs.js","names":[],"sources":["../../../src/generated/types/metadataArgs.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport
|
|
1
|
+
{"version":3,"file":"metadataArgs.js","names":[],"sources":["../../../src/generated/types/metadataArgs.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n getArrayDecoder,\n getArrayEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"@solana/kit\";\nimport {\n getCollectionDecoder,\n getCollectionEncoder,\n getCreatorDecoder,\n getCreatorEncoder,\n getTokenProgramVersionDecoder,\n getTokenProgramVersionEncoder,\n getTokenStandardDecoder,\n getTokenStandardEncoder,\n getUsesDecoder,\n getUsesEncoder,\n type Collection,\n type CollectionArgs,\n type Creator,\n type CreatorArgs,\n type TokenProgramVersion,\n type TokenProgramVersionArgs,\n type TokenStandard,\n type TokenStandardArgs,\n type Uses,\n type UsesArgs,\n} from \"./index.js\";\n\n/**\n * Metadata for a V1 (`LeafSchema` V1) compressed NFT leaf.\n *\n * Mirrors the fields of a Token Metadata `Metadata` account closely\n * enough that a leaf can be decompressed into one. Hashed (along with\n * `creators`) to produce the `dataHash`/`creatorHash` used to verify\n * the leaf on every mutating instruction.\n */\nexport type MetadataArgs = {\n /** The name of the asset */\n name: string;\n /** The symbol for the asset */\n symbol: string;\n /** URI pointing to JSON representing the asset */\n uri: string;\n /** Royalty basis points that goes to creators in secondary sales (0-10000) */\n sellerFeeBasisPoints: number;\n /** Immutable, once flipped, all sales of this metadata are considered secondary. */\n primarySaleHappened: boolean;\n /** Whether or not the data struct is mutable, default is not */\n isMutable: boolean;\n /** nonce for easy calculation of editions, if present */\n editionNonce: Option<number>;\n /** Token standard. Currently only `NonFungible` is allowed. */\n tokenStandard: Option<TokenStandard>;\n /** Collection */\n collection: Option<Collection>;\n /** Uses */\n uses: Option<Uses>;\n /** Which SPL token program a decompressed version of this leaf's mint should use. */\n tokenProgramVersion: TokenProgramVersion;\n /** Creators of the asset and their royalty shares; hashed to produce `creatorHash`. */\n creators: Array<Creator>;\n};\n\nexport type MetadataArgsArgs = {\n /** The name of the asset */\n name: string;\n /** The symbol for the asset */\n symbol: string;\n /** URI pointing to JSON representing the asset */\n uri: string;\n /** Royalty basis points that goes to creators in secondary sales (0-10000) */\n sellerFeeBasisPoints: number;\n /** Immutable, once flipped, all sales of this metadata are considered secondary. */\n primarySaleHappened: boolean;\n /** Whether or not the data struct is mutable, default is not */\n isMutable: boolean;\n /** nonce for easy calculation of editions, if present */\n editionNonce: OptionOrNullable<number>;\n /** Token standard. Currently only `NonFungible` is allowed. */\n tokenStandard: OptionOrNullable<TokenStandardArgs>;\n /** Collection */\n collection: OptionOrNullable<CollectionArgs>;\n /** Uses */\n uses: OptionOrNullable<UsesArgs>;\n /** Which SPL token program a decompressed version of this leaf's mint should use. */\n tokenProgramVersion: TokenProgramVersionArgs;\n /** Creators of the asset and their royalty shares; hashed to produce `creatorHash`. */\n creators: Array<CreatorArgs>;\n};\n\nexport function getMetadataArgsEncoder(): Encoder<MetadataArgsArgs> {\n return getStructEncoder([\n [\"name\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"symbol\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"uri\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"sellerFeeBasisPoints\", getU16Encoder()],\n [\"primarySaleHappened\", getBooleanEncoder()],\n [\"isMutable\", getBooleanEncoder()],\n [\"editionNonce\", getOptionEncoder(getU8Encoder())],\n [\"tokenStandard\", getOptionEncoder(getTokenStandardEncoder())],\n [\"collection\", getOptionEncoder(getCollectionEncoder())],\n [\"uses\", getOptionEncoder(getUsesEncoder())],\n [\"tokenProgramVersion\", getTokenProgramVersionEncoder()],\n [\"creators\", getArrayEncoder(getCreatorEncoder())],\n ]);\n}\n\nexport function getMetadataArgsDecoder(): Decoder<MetadataArgs> {\n return getStructDecoder([\n [\"name\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"symbol\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"uri\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"sellerFeeBasisPoints\", getU16Decoder()],\n [\"primarySaleHappened\", getBooleanDecoder()],\n [\"isMutable\", getBooleanDecoder()],\n [\"editionNonce\", getOptionDecoder(getU8Decoder())],\n [\"tokenStandard\", getOptionDecoder(getTokenStandardDecoder())],\n [\"collection\", getOptionDecoder(getCollectionDecoder())],\n [\"uses\", getOptionDecoder(getUsesDecoder())],\n [\"tokenProgramVersion\", getTokenProgramVersionDecoder()],\n [\"creators\", getArrayDecoder(getCreatorDecoder())],\n ]);\n}\n\nexport function getMetadataArgsCodec(): Codec<MetadataArgsArgs, MetadataArgs> {\n return combineCodec(getMetadataArgsEncoder(), getMetadataArgsDecoder());\n}\n"],"mappings":";;;;;;;;;;;;;;AAuHA,SAAgB,yBAAoD;CAClE,OAAO,iBAAiB;EACtB,CAAC,QAAQ,qBAAqB,eAAe,GAAG,cAAc,CAAC,CAAC;EAChE,CAAC,UAAU,qBAAqB,eAAe,GAAG,cAAc,CAAC,CAAC;EAClE,CAAC,OAAO,qBAAqB,eAAe,GAAG,cAAc,CAAC,CAAC;EAC/D,CAAC,wBAAwB,cAAc,CAAC;EACxC,CAAC,uBAAuB,kBAAkB,CAAC;EAC3C,CAAC,aAAa,kBAAkB,CAAC;EACjC,CAAC,gBAAgB,iBAAiB,aAAa,CAAC,CAAC;EACjD,CAAC,iBAAiB,iBAAiB,wBAAwB,CAAC,CAAC;EAC7D,CAAC,cAAc,iBAAiB,qBAAqB,CAAC,CAAC;EACvD,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC;EAC3C,CAAC,uBAAuB,8BAA8B,CAAC;EACvD,CAAC,YAAY,gBAAgB,kBAAkB,CAAC,CAAC;CACnD,CAAC;AACH;AAEA,SAAgB,yBAAgD;CAC9D,OAAO,iBAAiB;EACtB,CAAC,QAAQ,qBAAqB,eAAe,GAAG,cAAc,CAAC,CAAC;EAChE,CAAC,UAAU,qBAAqB,eAAe,GAAG,cAAc,CAAC,CAAC;EAClE,CAAC,OAAO,qBAAqB,eAAe,GAAG,cAAc,CAAC,CAAC;EAC/D,CAAC,wBAAwB,cAAc,CAAC;EACxC,CAAC,uBAAuB,kBAAkB,CAAC;EAC3C,CAAC,aAAa,kBAAkB,CAAC;EACjC,CAAC,gBAAgB,iBAAiB,aAAa,CAAC,CAAC;EACjD,CAAC,iBAAiB,iBAAiB,wBAAwB,CAAC,CAAC;EAC7D,CAAC,cAAc,iBAAiB,qBAAqB,CAAC,CAAC;EACvD,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC;EAC3C,CAAC,uBAAuB,8BAA8B,CAAC;EACvD,CAAC,YAAY,gBAAgB,kBAAkB,CAAC,CAAC;CACnD,CAAC;AACH;AAEA,SAAgB,uBAA8D;CAC5E,OAAO,aAAa,uBAAuB,GAAG,uBAAuB,CAAC;AACxE"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { Creator, CreatorArgs } from "./creator.js";
|
|
2
2
|
import { TokenStandard, TokenStandardArgs } from "./tokenStandard.js";
|
|
3
|
+
import "./index.js";
|
|
3
4
|
import { Address, Codec, Decoder, Encoder, Option, OptionOrNullable } from "@solana/kit";
|
|
4
|
-
|
|
5
5
|
//#region src/generated/types/metadataArgsV2.d.ts
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Metadata for a `LeafSchema` V2 compressed NFT leaf.
|
|
8
|
+
*
|
|
9
|
+
* Streamlined relative to `MetadataArgs`: it drops `editionNonce` and
|
|
10
|
+
* `uses`, and its `collection` is a plain, always-verified `Pubkey`
|
|
11
|
+
* rather than a `Collection` struct with a separate verified flag.
|
|
12
|
+
*/
|
|
13
|
+
type MetadataArgsV2 = {
|
|
7
14
|
/** The name of the asset */
|
|
8
15
|
name: string;
|
|
9
16
|
/** The symbol for the asset */
|
|
@@ -19,11 +26,11 @@ interface MetadataArgsV2 {
|
|
|
19
26
|
/** Token standard. Currently only `NonFungible` is allowed. */
|
|
20
27
|
tokenStandard: Option<TokenStandard>;
|
|
21
28
|
/** Creator array */
|
|
22
|
-
creators: Creator
|
|
29
|
+
creators: Array<Creator>;
|
|
23
30
|
/** Collection. Note in V2 its just a `Pubkey` and is always considered verified. */
|
|
24
31
|
collection: Option<Address>;
|
|
25
|
-
}
|
|
26
|
-
|
|
32
|
+
};
|
|
33
|
+
type MetadataArgsV2Args = {
|
|
27
34
|
/** The name of the asset */
|
|
28
35
|
name: string;
|
|
29
36
|
/** The symbol for the asset */
|
|
@@ -39,10 +46,10 @@ interface MetadataArgsV2Args {
|
|
|
39
46
|
/** Token standard. Currently only `NonFungible` is allowed. */
|
|
40
47
|
tokenStandard: OptionOrNullable<TokenStandardArgs>;
|
|
41
48
|
/** Creator array */
|
|
42
|
-
creators: CreatorArgs
|
|
49
|
+
creators: Array<CreatorArgs>;
|
|
43
50
|
/** Collection. Note in V2 its just a `Pubkey` and is always considered verified. */
|
|
44
51
|
collection: OptionOrNullable<Address>;
|
|
45
|
-
}
|
|
52
|
+
};
|
|
46
53
|
declare function getMetadataArgsV2Encoder(): Encoder<MetadataArgsV2Args>;
|
|
47
54
|
declare function getMetadataArgsV2Decoder(): Decoder<MetadataArgsV2>;
|
|
48
55
|
declare function getMetadataArgsV2Codec(): Codec<MetadataArgsV2Args, MetadataArgsV2>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadataArgsV2.d.ts","names":[],"sources":["../../../src/generated/types/metadataArgsV2.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"metadataArgsV2.d.ts","names":[],"sources":["../../../src/generated/types/metadataArgsV2.ts"],"mappings":";;;;;;;;;;;;KAqDY;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,eAAe,OAAO;;EAEtB,UAAU,MAAM;;EAEhB,YAAY,OAAO;;KAGT;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,eAAe,iBAAiB;;EAEhC,UAAU,MAAM;;EAEhB,YAAY,iBAAiB;;iBAGf,4BAA4B,QAAQ;iBAcpC,4BAA4B,QAAQ;iBAcpC,0BAA0B,MACxC,oBACA"}
|
|
@@ -2,6 +2,13 @@ import { getCreatorDecoder, getCreatorEncoder } from "./creator.js";
|
|
|
2
2
|
import { getTokenStandardDecoder, getTokenStandardEncoder } from "./tokenStandard.js";
|
|
3
3
|
import { addDecoderSizePrefix, addEncoderSizePrefix, combineCodec, getAddressDecoder, getAddressEncoder, getArrayDecoder, getArrayEncoder, getBooleanDecoder, getBooleanEncoder, getOptionDecoder, getOptionEncoder, getStructDecoder, getStructEncoder, getU16Decoder, getU16Encoder, getU32Decoder, getU32Encoder, getUtf8Decoder, getUtf8Encoder } from "@solana/kit";
|
|
4
4
|
//#region src/generated/types/metadataArgsV2.ts
|
|
5
|
+
/**
|
|
6
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
7
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
8
|
+
* to add features, then rerun Codama to update it.
|
|
9
|
+
*
|
|
10
|
+
* @see https://github.com/codama-idl/codama
|
|
11
|
+
*/
|
|
5
12
|
function getMetadataArgsV2Encoder() {
|
|
6
13
|
return getStructEncoder([
|
|
7
14
|
["name", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadataArgsV2.js","names":[],"sources":["../../../src/generated/types/metadataArgsV2.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport
|
|
1
|
+
{"version":3,"file":"metadataArgsV2.js","names":[],"sources":["../../../src/generated/types/metadataArgsV2.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n getAddressDecoder,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"@solana/kit\";\nimport {\n getCreatorDecoder,\n getCreatorEncoder,\n getTokenStandardDecoder,\n getTokenStandardEncoder,\n type Creator,\n type CreatorArgs,\n type TokenStandard,\n type TokenStandardArgs,\n} from \"./index.js\";\n\n/**\n * Metadata for a `LeafSchema` V2 compressed NFT leaf.\n *\n * Streamlined relative to `MetadataArgs`: it drops `editionNonce` and\n * `uses`, and its `collection` is a plain, always-verified `Pubkey`\n * rather than a `Collection` struct with a separate verified flag.\n */\nexport type MetadataArgsV2 = {\n /** The name of the asset */\n name: string;\n /** The symbol for the asset */\n symbol: string;\n /** URI pointing to JSON representing the asset */\n uri: string;\n /** Royalty basis points that goes to creators in secondary sales (0-10000) */\n sellerFeeBasisPoints: number;\n /** Immutable, once flipped, all sales of this metadata are considered secondary. */\n primarySaleHappened: boolean;\n /** Whether or not the data struct is mutable, default is not */\n isMutable: boolean;\n /** Token standard. Currently only `NonFungible` is allowed. */\n tokenStandard: Option<TokenStandard>;\n /** Creator array */\n creators: Array<Creator>;\n /** Collection. Note in V2 its just a `Pubkey` and is always considered verified. */\n collection: Option<Address>;\n};\n\nexport type MetadataArgsV2Args = {\n /** The name of the asset */\n name: string;\n /** The symbol for the asset */\n symbol: string;\n /** URI pointing to JSON representing the asset */\n uri: string;\n /** Royalty basis points that goes to creators in secondary sales (0-10000) */\n sellerFeeBasisPoints: number;\n /** Immutable, once flipped, all sales of this metadata are considered secondary. */\n primarySaleHappened: boolean;\n /** Whether or not the data struct is mutable, default is not */\n isMutable: boolean;\n /** Token standard. Currently only `NonFungible` is allowed. */\n tokenStandard: OptionOrNullable<TokenStandardArgs>;\n /** Creator array */\n creators: Array<CreatorArgs>;\n /** Collection. Note in V2 its just a `Pubkey` and is always considered verified. */\n collection: OptionOrNullable<Address>;\n};\n\nexport function getMetadataArgsV2Encoder(): Encoder<MetadataArgsV2Args> {\n return getStructEncoder([\n [\"name\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"symbol\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"uri\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"sellerFeeBasisPoints\", getU16Encoder()],\n [\"primarySaleHappened\", getBooleanEncoder()],\n [\"isMutable\", getBooleanEncoder()],\n [\"tokenStandard\", getOptionEncoder(getTokenStandardEncoder())],\n [\"creators\", getArrayEncoder(getCreatorEncoder())],\n [\"collection\", getOptionEncoder(getAddressEncoder())],\n ]);\n}\n\nexport function getMetadataArgsV2Decoder(): Decoder<MetadataArgsV2> {\n return getStructDecoder([\n [\"name\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"symbol\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"uri\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"sellerFeeBasisPoints\", getU16Decoder()],\n [\"primarySaleHappened\", getBooleanDecoder()],\n [\"isMutable\", getBooleanDecoder()],\n [\"tokenStandard\", getOptionDecoder(getTokenStandardDecoder())],\n [\"creators\", getArrayDecoder(getCreatorDecoder())],\n [\"collection\", getOptionDecoder(getAddressDecoder())],\n ]);\n}\n\nexport function getMetadataArgsV2Codec(): Codec<\n MetadataArgsV2Args,\n MetadataArgsV2\n> {\n return combineCodec(getMetadataArgsV2Encoder(), getMetadataArgsV2Decoder());\n}\n"],"mappings":";;;;;;;;;;;AA+FA,SAAgB,2BAAwD;CACtE,OAAO,iBAAiB;EACtB,CAAC,QAAQ,qBAAqB,eAAe,GAAG,cAAc,CAAC,CAAC;EAChE,CAAC,UAAU,qBAAqB,eAAe,GAAG,cAAc,CAAC,CAAC;EAClE,CAAC,OAAO,qBAAqB,eAAe,GAAG,cAAc,CAAC,CAAC;EAC/D,CAAC,wBAAwB,cAAc,CAAC;EACxC,CAAC,uBAAuB,kBAAkB,CAAC;EAC3C,CAAC,aAAa,kBAAkB,CAAC;EACjC,CAAC,iBAAiB,iBAAiB,wBAAwB,CAAC,CAAC;EAC7D,CAAC,YAAY,gBAAgB,kBAAkB,CAAC,CAAC;EACjD,CAAC,cAAc,iBAAiB,kBAAkB,CAAC,CAAC;CACtD,CAAC;AACH;AAEA,SAAgB,2BAAoD;CAClE,OAAO,iBAAiB;EACtB,CAAC,QAAQ,qBAAqB,eAAe,GAAG,cAAc,CAAC,CAAC;EAChE,CAAC,UAAU,qBAAqB,eAAe,GAAG,cAAc,CAAC,CAAC;EAClE,CAAC,OAAO,qBAAqB,eAAe,GAAG,cAAc,CAAC,CAAC;EAC/D,CAAC,wBAAwB,cAAc,CAAC;EACxC,CAAC,uBAAuB,kBAAkB,CAAC;EAC3C,CAAC,aAAa,kBAAkB,CAAC;EACjC,CAAC,iBAAiB,iBAAiB,wBAAwB,CAAC,CAAC;EAC7D,CAAC,YAAY,gBAAgB,kBAAkB,CAAC,CAAC;EACjD,CAAC,cAAc,iBAAiB,kBAAkB,CAAC,CAAC;CACtD,CAAC;AACH;AAEA,SAAgB,yBAGd;CACA,OAAO,aAAa,yBAAyB,GAAG,yBAAyB,CAAC;AAC5E"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder } from "@solana/kit";
|
|
2
|
-
|
|
3
2
|
//#region src/generated/types/tokenProgramVersion.d.ts
|
|
3
|
+
/** Which SPL token program a decompressed leaf's mint should use. */
|
|
4
4
|
declare enum TokenProgramVersion {
|
|
5
5
|
Original = 0,
|
|
6
6
|
Token2022 = 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenProgramVersion.d.ts","names":[],"sources":["../../../src/generated/types/tokenProgramVersion.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"tokenProgramVersion.d.ts","names":[],"sources":["../../../src/generated/types/tokenProgramVersion.ts"],"mappings":";;;aAkBY;EACV;EACA;;KAGU,0BAA0B;iBAEtB,iCAAiC,iBAAiB;iBAIlD,iCAAiC,iBAAiB;iBAIlD,+BAA+B,eAC7C,yBACA"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { combineCodec, getEnumDecoder, getEnumEncoder } from "@solana/kit";
|
|
2
2
|
//#region src/generated/types/tokenProgramVersion.ts
|
|
3
|
+
/**
|
|
4
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
5
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
6
|
+
* to add features, then rerun Codama to update it.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/codama-idl/codama
|
|
9
|
+
*/
|
|
10
|
+
/** Which SPL token program a decompressed leaf's mint should use. */
|
|
3
11
|
let TokenProgramVersion = /* @__PURE__ */ function(TokenProgramVersion) {
|
|
4
12
|
TokenProgramVersion[TokenProgramVersion["Original"] = 0] = "Original";
|
|
5
13
|
TokenProgramVersion[TokenProgramVersion["Token2022"] = 1] = "Token2022";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenProgramVersion.js","names":[],"sources":["../../../src/generated/types/tokenProgramVersion.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport
|
|
1
|
+
{"version":3,"file":"tokenProgramVersion.js","names":[],"sources":["../../../src/generated/types/tokenProgramVersion.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getEnumDecoder,\n getEnumEncoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"@solana/kit\";\n\n/** Which SPL token program a decompressed leaf's mint should use. */\nexport enum TokenProgramVersion {\n Original,\n Token2022,\n}\n\nexport type TokenProgramVersionArgs = TokenProgramVersion;\n\nexport function getTokenProgramVersionEncoder(): FixedSizeEncoder<TokenProgramVersionArgs> {\n return getEnumEncoder(TokenProgramVersion);\n}\n\nexport function getTokenProgramVersionDecoder(): FixedSizeDecoder<TokenProgramVersion> {\n return getEnumDecoder(TokenProgramVersion);\n}\n\nexport function getTokenProgramVersionCodec(): FixedSizeCodec<\n TokenProgramVersionArgs,\n TokenProgramVersion\n> {\n return combineCodec(\n getTokenProgramVersionEncoder(),\n getTokenProgramVersionDecoder(),\n );\n}\n"],"mappings":";;;;;;;;;;AAkBA,IAAY,sBAAL,yBAAA,qBAAA;CACL,oBAAA,oBAAA,cAAA,KAAA;CACA,oBAAA,oBAAA,eAAA,KAAA;;AACF,EAAA,CAAA,CAAA;AAIA,SAAgB,gCAA2E;CACzF,OAAO,eAAe,mBAAmB;AAC3C;AAEA,SAAgB,gCAAuE;CACrF,OAAO,eAAe,mBAAmB;AAC3C;AAEA,SAAgB,8BAGd;CACA,OAAO,aACL,8BAA8B,GAC9B,8BAA8B,CAChC;AACF"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder } from "@solana/kit";
|
|
2
|
-
|
|
3
2
|
//#region src/generated/types/tokenStandard.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Token Metadata token standard recorded on a leaf. Bubblegum
|
|
5
|
+
* currently only mints `NonFungible` assets; the other variants exist
|
|
6
|
+
* for compatibility with the wider Token Metadata type.
|
|
7
|
+
*/
|
|
4
8
|
declare enum TokenStandard {
|
|
5
9
|
NonFungible = 0,
|
|
6
10
|
FungibleAsset = 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenStandard.d.ts","names":[],"sources":["../../../src/generated/types/tokenStandard.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tokenStandard.d.ts","names":[],"sources":["../../../src/generated/types/tokenStandard.ts"],"mappings":";;;;;;;aAsBY;EACV;EACA;EACA;EACA;;KAGU,oBAAoB;iBAEhB,2BAA2B,iBAAiB;iBAI5C,2BAA2B,iBAAiB;iBAI5C,yBAAyB,eACvC,mBACA"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { combineCodec, getEnumDecoder, getEnumEncoder } from "@solana/kit";
|
|
2
2
|
//#region src/generated/types/tokenStandard.ts
|
|
3
|
+
/**
|
|
4
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
5
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
6
|
+
* to add features, then rerun Codama to update it.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/codama-idl/codama
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Token Metadata token standard recorded on a leaf. Bubblegum
|
|
12
|
+
* currently only mints `NonFungible` assets; the other variants exist
|
|
13
|
+
* for compatibility with the wider Token Metadata type.
|
|
14
|
+
*/
|
|
3
15
|
let TokenStandard = /* @__PURE__ */ function(TokenStandard) {
|
|
4
16
|
TokenStandard[TokenStandard["NonFungible"] = 0] = "NonFungible";
|
|
5
17
|
TokenStandard[TokenStandard["FungibleAsset"] = 1] = "FungibleAsset";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenStandard.js","names":[],"sources":["../../../src/generated/types/tokenStandard.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport
|
|
1
|
+
{"version":3,"file":"tokenStandard.js","names":[],"sources":["../../../src/generated/types/tokenStandard.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getEnumDecoder,\n getEnumEncoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"@solana/kit\";\n\n/**\n * Token Metadata token standard recorded on a leaf. Bubblegum\n * currently only mints `NonFungible` assets; the other variants exist\n * for compatibility with the wider Token Metadata type.\n */\nexport enum TokenStandard {\n NonFungible,\n FungibleAsset,\n Fungible,\n NonFungibleEdition,\n}\n\nexport type TokenStandardArgs = TokenStandard;\n\nexport function getTokenStandardEncoder(): FixedSizeEncoder<TokenStandardArgs> {\n return getEnumEncoder(TokenStandard);\n}\n\nexport function getTokenStandardDecoder(): FixedSizeDecoder<TokenStandard> {\n return getEnumDecoder(TokenStandard);\n}\n\nexport function getTokenStandardCodec(): FixedSizeCodec<\n TokenStandardArgs,\n TokenStandard\n> {\n return combineCodec(getTokenStandardEncoder(), getTokenStandardDecoder());\n}\n"],"mappings":";;;;;;;;;;;;;;AAsBA,IAAY,gBAAL,yBAAA,eAAA;CACL,cAAA,cAAA,iBAAA,KAAA;CACA,cAAA,cAAA,mBAAA,KAAA;CACA,cAAA,cAAA,cAAA,KAAA;CACA,cAAA,cAAA,wBAAA,KAAA;;AACF,EAAA,CAAA,CAAA;AAIA,SAAgB,0BAA+D;CAC7E,OAAO,eAAe,aAAa;AACrC;AAEA,SAAgB,0BAA2D;CACzE,OAAO,eAAe,aAAa;AACrC;AAEA,SAAgB,wBAGd;CACA,OAAO,aAAa,wBAAwB,GAAG,wBAAwB,CAAC;AAC1E"}
|