@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
|
@@ -6,27 +6,6 @@
|
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type {
|
|
10
|
-
AccountMeta,
|
|
11
|
-
AccountSignerMeta,
|
|
12
|
-
Address,
|
|
13
|
-
Codec,
|
|
14
|
-
Decoder,
|
|
15
|
-
Encoder,
|
|
16
|
-
Instruction,
|
|
17
|
-
InstructionWithAccounts,
|
|
18
|
-
InstructionWithData,
|
|
19
|
-
Option,
|
|
20
|
-
OptionOrNullable,
|
|
21
|
-
ReadonlyAccount,
|
|
22
|
-
ReadonlySignerAccount,
|
|
23
|
-
ReadonlyUint8Array,
|
|
24
|
-
TransactionSigner,
|
|
25
|
-
WritableAccount,
|
|
26
|
-
WritableSignerAccount,
|
|
27
|
-
} from "@solana/kit";
|
|
28
|
-
import type { ResolvedInstructionAccount } from "@solana/program-client-core";
|
|
29
|
-
import type { AssetDataSchema, AssetDataSchemaArgs } from "../types/index.js";
|
|
30
9
|
import {
|
|
31
10
|
addDecoderSizePrefix,
|
|
32
11
|
addEncoderSizePrefix,
|
|
@@ -41,25 +20,45 @@ import {
|
|
|
41
20
|
getOptionEncoder,
|
|
42
21
|
getStructDecoder,
|
|
43
22
|
getStructEncoder,
|
|
44
|
-
getU8Decoder,
|
|
45
|
-
getU8Encoder,
|
|
46
23
|
getU32Decoder,
|
|
47
24
|
getU32Encoder,
|
|
48
25
|
getU64Decoder,
|
|
49
26
|
getU64Encoder,
|
|
27
|
+
getU8Decoder,
|
|
28
|
+
getU8Encoder,
|
|
50
29
|
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
51
30
|
SolanaError,
|
|
52
31
|
transformEncoder,
|
|
32
|
+
type AccountMeta,
|
|
33
|
+
type AccountSignerMeta,
|
|
34
|
+
type Address,
|
|
35
|
+
type Codec,
|
|
36
|
+
type Decoder,
|
|
37
|
+
type Encoder,
|
|
38
|
+
type Instruction,
|
|
39
|
+
type InstructionWithAccounts,
|
|
40
|
+
type InstructionWithData,
|
|
41
|
+
type Option,
|
|
42
|
+
type OptionOrNullable,
|
|
43
|
+
type ReadonlyAccount,
|
|
44
|
+
type ReadonlySignerAccount,
|
|
45
|
+
type ReadonlyUint8Array,
|
|
46
|
+
type TransactionSigner,
|
|
47
|
+
type WritableAccount,
|
|
48
|
+
type WritableSignerAccount,
|
|
53
49
|
} from "@solana/kit";
|
|
54
50
|
import {
|
|
55
51
|
getAccountMetaFactory,
|
|
56
52
|
getAddressFromResolvedInstructionAccount,
|
|
53
|
+
type ResolvedInstructionAccount,
|
|
57
54
|
} from "@solana/program-client-core";
|
|
58
55
|
import { findTreeConfigPda } from "../pdas/index.js";
|
|
59
56
|
import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
60
57
|
import {
|
|
61
58
|
getAssetDataSchemaDecoder,
|
|
62
59
|
getAssetDataSchemaEncoder,
|
|
60
|
+
type AssetDataSchema,
|
|
61
|
+
type AssetDataSchemaArgs,
|
|
63
62
|
} from "../types/index.js";
|
|
64
63
|
|
|
65
64
|
export const UPDATE_ASSET_DATA_V2_DISCRIMINATOR: ReadonlyUint8Array =
|
|
@@ -127,30 +126,92 @@ export type UpdateAssetDataV2Instruction<
|
|
|
127
126
|
]
|
|
128
127
|
>;
|
|
129
128
|
|
|
130
|
-
export
|
|
129
|
+
export type UpdateAssetDataV2InstructionData = {
|
|
131
130
|
discriminator: ReadonlyUint8Array;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
/**
|
|
132
|
+
* Current Merkle root of the tree, used together with the Merkle proof
|
|
133
|
+
* (passed as remaining accounts) to verify the leaf being operated on.
|
|
134
|
+
*/
|
|
135
|
+
root: Array<number>;
|
|
136
|
+
/**
|
|
137
|
+
* Keccak256 hash of the leaf's metadata, used together with `root` to
|
|
138
|
+
* verify the leaf before it is modified.
|
|
139
|
+
*/
|
|
140
|
+
dataHash: Array<number>;
|
|
141
|
+
/**
|
|
142
|
+
* Keccak256 hash of the leaf's creators array, used together with
|
|
143
|
+
* `root` to verify the leaf before it is modified.
|
|
144
|
+
*/
|
|
145
|
+
creatorHash: Array<number>;
|
|
146
|
+
/**
|
|
147
|
+
* Expected current `assetDataHash` of the leaf, if any, verified before
|
|
148
|
+
* it is replaced by `newAssetData`.
|
|
149
|
+
*/
|
|
150
|
+
previousAssetDataHash: Option<Array<number>>;
|
|
151
|
+
/**
|
|
152
|
+
* Expected current status flags (e.g. frozen, non-transferable) of the
|
|
153
|
+
* `LeafSchema` V2 leaf, verified before this instruction updates them.
|
|
154
|
+
*/
|
|
136
155
|
flags: Option<number>;
|
|
156
|
+
/**
|
|
157
|
+
* Tree-scoped nonce identifying the leaf, equal to the tree's
|
|
158
|
+
* `numMinted` at the time the leaf was minted. Combined with the tree
|
|
159
|
+
* address to derive the leaf's asset id.
|
|
160
|
+
*/
|
|
137
161
|
nonce: bigint;
|
|
162
|
+
/**
|
|
163
|
+
* Position of the leaf within the Merkle tree, used with the Merkle
|
|
164
|
+
* proof to locate and verify the leaf.
|
|
165
|
+
*/
|
|
138
166
|
index: number;
|
|
167
|
+
/** Optional raw asset data blob to associate with the asset. */
|
|
139
168
|
newAssetData: Option<ReadonlyUint8Array>;
|
|
169
|
+
/** Schema describing the format of `newAssetData`. */
|
|
140
170
|
newAssetDataSchema: Option<AssetDataSchema>;
|
|
141
|
-
}
|
|
171
|
+
};
|
|
142
172
|
|
|
143
|
-
export
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
173
|
+
export type UpdateAssetDataV2InstructionDataArgs = {
|
|
174
|
+
/**
|
|
175
|
+
* Current Merkle root of the tree, used together with the Merkle proof
|
|
176
|
+
* (passed as remaining accounts) to verify the leaf being operated on.
|
|
177
|
+
*/
|
|
178
|
+
root: Array<number>;
|
|
179
|
+
/**
|
|
180
|
+
* Keccak256 hash of the leaf's metadata, used together with `root` to
|
|
181
|
+
* verify the leaf before it is modified.
|
|
182
|
+
*/
|
|
183
|
+
dataHash: Array<number>;
|
|
184
|
+
/**
|
|
185
|
+
* Keccak256 hash of the leaf's creators array, used together with
|
|
186
|
+
* `root` to verify the leaf before it is modified.
|
|
187
|
+
*/
|
|
188
|
+
creatorHash: Array<number>;
|
|
189
|
+
/**
|
|
190
|
+
* Expected current `assetDataHash` of the leaf, if any, verified before
|
|
191
|
+
* it is replaced by `newAssetData`.
|
|
192
|
+
*/
|
|
193
|
+
previousAssetDataHash: OptionOrNullable<Array<number>>;
|
|
194
|
+
/**
|
|
195
|
+
* Expected current status flags (e.g. frozen, non-transferable) of the
|
|
196
|
+
* `LeafSchema` V2 leaf, verified before this instruction updates them.
|
|
197
|
+
*/
|
|
148
198
|
flags: OptionOrNullable<number>;
|
|
199
|
+
/**
|
|
200
|
+
* Tree-scoped nonce identifying the leaf, equal to the tree's
|
|
201
|
+
* `numMinted` at the time the leaf was minted. Combined with the tree
|
|
202
|
+
* address to derive the leaf's asset id.
|
|
203
|
+
*/
|
|
149
204
|
nonce: number | bigint;
|
|
205
|
+
/**
|
|
206
|
+
* Position of the leaf within the Merkle tree, used with the Merkle
|
|
207
|
+
* proof to locate and verify the leaf.
|
|
208
|
+
*/
|
|
150
209
|
index: number;
|
|
210
|
+
/** Optional raw asset data blob to associate with the asset. */
|
|
151
211
|
newAssetData: OptionOrNullable<ReadonlyUint8Array>;
|
|
212
|
+
/** Schema describing the format of `newAssetData`. */
|
|
152
213
|
newAssetDataSchema: OptionOrNullable<AssetDataSchemaArgs>;
|
|
153
|
-
}
|
|
214
|
+
};
|
|
154
215
|
|
|
155
216
|
export function getUpdateAssetDataV2InstructionDataEncoder(): Encoder<UpdateAssetDataV2InstructionDataArgs> {
|
|
156
217
|
return transformEncoder(
|
|
@@ -214,7 +275,7 @@ export function getUpdateAssetDataV2InstructionDataCodec(): Codec<
|
|
|
214
275
|
);
|
|
215
276
|
}
|
|
216
277
|
|
|
217
|
-
export
|
|
278
|
+
export type UpdateAssetDataV2AsyncInput<
|
|
218
279
|
TAccountTreeAuthority extends string = string,
|
|
219
280
|
TAccountPayer extends string = string,
|
|
220
281
|
TAccountAuthority extends string = string,
|
|
@@ -225,20 +286,45 @@ export interface UpdateAssetDataV2AsyncInput<
|
|
|
225
286
|
TAccountLogWrapper extends string = string,
|
|
226
287
|
TAccountCompressionProgram extends string = string,
|
|
227
288
|
TAccountSystemProgram extends string = string,
|
|
228
|
-
> {
|
|
289
|
+
> = {
|
|
290
|
+
/**
|
|
291
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
292
|
+
* as the tree's authority for CPIs into the compression program.
|
|
293
|
+
*/
|
|
229
294
|
treeAuthority?: Address<TAccountTreeAuthority>;
|
|
295
|
+
/** Account that pays for the transaction and any account rent. */
|
|
230
296
|
payer: TransactionSigner<TAccountPayer>;
|
|
231
297
|
/**
|
|
232
|
-
* Either collection authority or tree owner/delegate,
|
|
233
|
-
* whether the
|
|
298
|
+
* Either the collection authority or the tree owner/delegate,
|
|
299
|
+
* depending on whether the asset is in a verified collection.
|
|
300
|
+
* Defaults to `payer`.
|
|
234
301
|
*/
|
|
235
302
|
authority?: TransactionSigner<TAccountAuthority>;
|
|
303
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
236
304
|
leafOwner: Address<TAccountLeafOwner>;
|
|
305
|
+
/**
|
|
306
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
307
|
+
* delegate is set.
|
|
308
|
+
*/
|
|
237
309
|
leafDelegate?: Address<TAccountLeafDelegate>;
|
|
310
|
+
/**
|
|
311
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
312
|
+
* owned by the account compression program.
|
|
313
|
+
*/
|
|
238
314
|
merkleTree: Address<TAccountMerkleTree>;
|
|
315
|
+
/** MPL Core collection account the asset belongs to (V2 collections). */
|
|
239
316
|
coreCollection?: Address<TAccountCoreCollection>;
|
|
317
|
+
/**
|
|
318
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
319
|
+
* can reconstruct the tree.
|
|
320
|
+
*/
|
|
240
321
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
322
|
+
/**
|
|
323
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
324
|
+
* Merkle tree.
|
|
325
|
+
*/
|
|
241
326
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
327
|
+
/** The Solana System program. */
|
|
242
328
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
243
329
|
root: UpdateAssetDataV2InstructionDataArgs["root"];
|
|
244
330
|
dataHash: UpdateAssetDataV2InstructionDataArgs["dataHash"];
|
|
@@ -249,8 +335,15 @@ export interface UpdateAssetDataV2AsyncInput<
|
|
|
249
335
|
index: UpdateAssetDataV2InstructionDataArgs["index"];
|
|
250
336
|
newAssetData: UpdateAssetDataV2InstructionDataArgs["newAssetData"];
|
|
251
337
|
newAssetDataSchema: UpdateAssetDataV2InstructionDataArgs["newAssetDataSchema"];
|
|
252
|
-
}
|
|
338
|
+
};
|
|
253
339
|
|
|
340
|
+
/**
|
|
341
|
+
* Updates the off-chain asset data hash and status flags of a
|
|
342
|
+
* `LeafSchema` V2 leaf node.
|
|
343
|
+
*
|
|
344
|
+
* Callable by the collection authority, or the tree owner/delegate for
|
|
345
|
+
* assets not in a verified collection.
|
|
346
|
+
*/
|
|
254
347
|
export async function getUpdateAssetDataV2InstructionAsync<
|
|
255
348
|
TAccountTreeAuthority extends string,
|
|
256
349
|
TAccountPayer extends string,
|
|
@@ -374,7 +467,7 @@ export async function getUpdateAssetDataV2InstructionAsync<
|
|
|
374
467
|
>);
|
|
375
468
|
}
|
|
376
469
|
|
|
377
|
-
export
|
|
470
|
+
export type UpdateAssetDataV2Input<
|
|
378
471
|
TAccountTreeAuthority extends string = string,
|
|
379
472
|
TAccountPayer extends string = string,
|
|
380
473
|
TAccountAuthority extends string = string,
|
|
@@ -385,20 +478,45 @@ export interface UpdateAssetDataV2Input<
|
|
|
385
478
|
TAccountLogWrapper extends string = string,
|
|
386
479
|
TAccountCompressionProgram extends string = string,
|
|
387
480
|
TAccountSystemProgram extends string = string,
|
|
388
|
-
> {
|
|
481
|
+
> = {
|
|
482
|
+
/**
|
|
483
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
484
|
+
* as the tree's authority for CPIs into the compression program.
|
|
485
|
+
*/
|
|
389
486
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
487
|
+
/** Account that pays for the transaction and any account rent. */
|
|
390
488
|
payer: TransactionSigner<TAccountPayer>;
|
|
391
489
|
/**
|
|
392
|
-
* Either collection authority or tree owner/delegate,
|
|
393
|
-
* whether the
|
|
490
|
+
* Either the collection authority or the tree owner/delegate,
|
|
491
|
+
* depending on whether the asset is in a verified collection.
|
|
492
|
+
* Defaults to `payer`.
|
|
394
493
|
*/
|
|
395
494
|
authority?: TransactionSigner<TAccountAuthority>;
|
|
495
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
396
496
|
leafOwner: Address<TAccountLeafOwner>;
|
|
497
|
+
/**
|
|
498
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
499
|
+
* delegate is set.
|
|
500
|
+
*/
|
|
397
501
|
leafDelegate?: Address<TAccountLeafDelegate>;
|
|
502
|
+
/**
|
|
503
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
504
|
+
* owned by the account compression program.
|
|
505
|
+
*/
|
|
398
506
|
merkleTree: Address<TAccountMerkleTree>;
|
|
507
|
+
/** MPL Core collection account the asset belongs to (V2 collections). */
|
|
399
508
|
coreCollection?: Address<TAccountCoreCollection>;
|
|
509
|
+
/**
|
|
510
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
511
|
+
* can reconstruct the tree.
|
|
512
|
+
*/
|
|
400
513
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
514
|
+
/**
|
|
515
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
516
|
+
* Merkle tree.
|
|
517
|
+
*/
|
|
401
518
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
519
|
+
/** The Solana System program. */
|
|
402
520
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
403
521
|
root: UpdateAssetDataV2InstructionDataArgs["root"];
|
|
404
522
|
dataHash: UpdateAssetDataV2InstructionDataArgs["dataHash"];
|
|
@@ -409,8 +527,15 @@ export interface UpdateAssetDataV2Input<
|
|
|
409
527
|
index: UpdateAssetDataV2InstructionDataArgs["index"];
|
|
410
528
|
newAssetData: UpdateAssetDataV2InstructionDataArgs["newAssetData"];
|
|
411
529
|
newAssetDataSchema: UpdateAssetDataV2InstructionDataArgs["newAssetDataSchema"];
|
|
412
|
-
}
|
|
530
|
+
};
|
|
413
531
|
|
|
532
|
+
/**
|
|
533
|
+
* Updates the off-chain asset data hash and status flags of a
|
|
534
|
+
* `LeafSchema` V2 leaf node.
|
|
535
|
+
*
|
|
536
|
+
* Callable by the collection authority, or the tree owner/delegate for
|
|
537
|
+
* assets not in a verified collection.
|
|
538
|
+
*/
|
|
414
539
|
export function getUpdateAssetDataV2Instruction<
|
|
415
540
|
TAccountTreeAuthority extends string,
|
|
416
541
|
TAccountPayer extends string,
|
|
@@ -524,29 +649,54 @@ export function getUpdateAssetDataV2Instruction<
|
|
|
524
649
|
>);
|
|
525
650
|
}
|
|
526
651
|
|
|
527
|
-
export
|
|
652
|
+
export type ParsedUpdateAssetDataV2Instruction<
|
|
528
653
|
TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
|
|
529
654
|
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
530
|
-
> {
|
|
655
|
+
> = {
|
|
531
656
|
programAddress: Address<TProgram>;
|
|
532
657
|
accounts: {
|
|
658
|
+
/**
|
|
659
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
660
|
+
* as the tree's authority for CPIs into the compression program.
|
|
661
|
+
*/
|
|
533
662
|
treeAuthority: TAccountMetas[0];
|
|
663
|
+
/** Account that pays for the transaction and any account rent. */
|
|
534
664
|
payer: TAccountMetas[1];
|
|
535
665
|
/**
|
|
536
|
-
* Either collection authority or tree owner/delegate,
|
|
537
|
-
* whether the
|
|
666
|
+
* Either the collection authority or the tree owner/delegate,
|
|
667
|
+
* depending on whether the asset is in a verified collection.
|
|
668
|
+
* Defaults to `payer`.
|
|
538
669
|
*/
|
|
539
670
|
authority?: TAccountMetas[2] | undefined;
|
|
671
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
540
672
|
leafOwner: TAccountMetas[3];
|
|
673
|
+
/**
|
|
674
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
675
|
+
* delegate is set.
|
|
676
|
+
*/
|
|
541
677
|
leafDelegate?: TAccountMetas[4] | undefined;
|
|
678
|
+
/**
|
|
679
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
680
|
+
* owned by the account compression program.
|
|
681
|
+
*/
|
|
542
682
|
merkleTree: TAccountMetas[5];
|
|
683
|
+
/** MPL Core collection account the asset belongs to (V2 collections). */
|
|
543
684
|
coreCollection?: TAccountMetas[6] | undefined;
|
|
685
|
+
/**
|
|
686
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
687
|
+
* can reconstruct the tree.
|
|
688
|
+
*/
|
|
544
689
|
logWrapper: TAccountMetas[7];
|
|
690
|
+
/**
|
|
691
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
692
|
+
* Merkle tree.
|
|
693
|
+
*/
|
|
545
694
|
compressionProgram: TAccountMetas[8];
|
|
695
|
+
/** The Solana System program. */
|
|
546
696
|
systemProgram: TAccountMetas[9];
|
|
547
697
|
};
|
|
548
698
|
data: UpdateAssetDataV2InstructionData;
|
|
549
|
-
}
|
|
699
|
+
};
|
|
550
700
|
|
|
551
701
|
export function parseUpdateAssetDataV2Instruction<
|
|
552
702
|
TProgram extends string,
|