@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,26 +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
9
|
import {
|
|
30
10
|
combineCodec,
|
|
31
11
|
fixDecoderSize,
|
|
@@ -38,19 +18,37 @@ import {
|
|
|
38
18
|
getOptionEncoder,
|
|
39
19
|
getStructDecoder,
|
|
40
20
|
getStructEncoder,
|
|
41
|
-
getU8Decoder,
|
|
42
|
-
getU8Encoder,
|
|
43
21
|
getU32Decoder,
|
|
44
22
|
getU32Encoder,
|
|
45
23
|
getU64Decoder,
|
|
46
24
|
getU64Encoder,
|
|
25
|
+
getU8Decoder,
|
|
26
|
+
getU8Encoder,
|
|
47
27
|
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
48
28
|
SolanaError,
|
|
49
29
|
transformEncoder,
|
|
30
|
+
type AccountMeta,
|
|
31
|
+
type AccountSignerMeta,
|
|
32
|
+
type Address,
|
|
33
|
+
type Codec,
|
|
34
|
+
type Decoder,
|
|
35
|
+
type Encoder,
|
|
36
|
+
type Instruction,
|
|
37
|
+
type InstructionWithAccounts,
|
|
38
|
+
type InstructionWithData,
|
|
39
|
+
type Option,
|
|
40
|
+
type OptionOrNullable,
|
|
41
|
+
type ReadonlyAccount,
|
|
42
|
+
type ReadonlySignerAccount,
|
|
43
|
+
type ReadonlyUint8Array,
|
|
44
|
+
type TransactionSigner,
|
|
45
|
+
type WritableAccount,
|
|
46
|
+
type WritableSignerAccount,
|
|
50
47
|
} from "@solana/kit";
|
|
51
48
|
import {
|
|
52
49
|
getAccountMetaFactory,
|
|
53
50
|
getAddressFromResolvedInstructionAccount,
|
|
51
|
+
type ResolvedInstructionAccount,
|
|
54
52
|
} from "@solana/program-client-core";
|
|
55
53
|
import { findTreeConfigPda } from "../pdas/index.js";
|
|
56
54
|
import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
@@ -112,28 +110,94 @@ export type ThawAndRevokeV2Instruction<
|
|
|
112
110
|
]
|
|
113
111
|
>;
|
|
114
112
|
|
|
115
|
-
export
|
|
113
|
+
export type ThawAndRevokeV2InstructionData = {
|
|
116
114
|
discriminator: ReadonlyUint8Array;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
/**
|
|
116
|
+
* Current Merkle root of the tree, used together with the Merkle proof
|
|
117
|
+
* (passed as remaining accounts) to verify the leaf being operated on.
|
|
118
|
+
*/
|
|
119
|
+
root: Array<number>;
|
|
120
|
+
/**
|
|
121
|
+
* Keccak256 hash of the leaf's metadata, used together with `root` to
|
|
122
|
+
* verify the leaf before it is modified.
|
|
123
|
+
*/
|
|
124
|
+
dataHash: Array<number>;
|
|
125
|
+
/**
|
|
126
|
+
* Keccak256 hash of the leaf's creators array, used together with
|
|
127
|
+
* `root` to verify the leaf before it is modified.
|
|
128
|
+
*/
|
|
129
|
+
creatorHash: Array<number>;
|
|
130
|
+
/**
|
|
131
|
+
* Expected current `collectionHash` of the `LeafSchema` V2 leaf, if
|
|
132
|
+
* any, verified before this instruction updates the leaf.
|
|
133
|
+
*/
|
|
134
|
+
collectionHash: Option<Array<number>>;
|
|
135
|
+
/**
|
|
136
|
+
* Expected current `assetDataHash` of the `LeafSchema` V2 leaf, if any,
|
|
137
|
+
* carried through unchanged by this instruction.
|
|
138
|
+
*/
|
|
139
|
+
assetDataHash: Option<Array<number>>;
|
|
140
|
+
/**
|
|
141
|
+
* Expected current status flags (e.g. frozen, non-transferable) of the
|
|
142
|
+
* `LeafSchema` V2 leaf, verified before this instruction updates them.
|
|
143
|
+
*/
|
|
122
144
|
flags: Option<number>;
|
|
145
|
+
/**
|
|
146
|
+
* Tree-scoped nonce identifying the leaf, equal to the tree's
|
|
147
|
+
* `numMinted` at the time the leaf was minted. Combined with the tree
|
|
148
|
+
* address to derive the leaf's asset id.
|
|
149
|
+
*/
|
|
123
150
|
nonce: bigint;
|
|
151
|
+
/**
|
|
152
|
+
* Position of the leaf within the Merkle tree, used with the Merkle
|
|
153
|
+
* proof to locate and verify the leaf.
|
|
154
|
+
*/
|
|
124
155
|
index: number;
|
|
125
|
-
}
|
|
156
|
+
};
|
|
126
157
|
|
|
127
|
-
export
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
158
|
+
export type ThawAndRevokeV2InstructionDataArgs = {
|
|
159
|
+
/**
|
|
160
|
+
* Current Merkle root of the tree, used together with the Merkle proof
|
|
161
|
+
* (passed as remaining accounts) to verify the leaf being operated on.
|
|
162
|
+
*/
|
|
163
|
+
root: Array<number>;
|
|
164
|
+
/**
|
|
165
|
+
* Keccak256 hash of the leaf's metadata, used together with `root` to
|
|
166
|
+
* verify the leaf before it is modified.
|
|
167
|
+
*/
|
|
168
|
+
dataHash: Array<number>;
|
|
169
|
+
/**
|
|
170
|
+
* Keccak256 hash of the leaf's creators array, used together with
|
|
171
|
+
* `root` to verify the leaf before it is modified.
|
|
172
|
+
*/
|
|
173
|
+
creatorHash: Array<number>;
|
|
174
|
+
/**
|
|
175
|
+
* Expected current `collectionHash` of the `LeafSchema` V2 leaf, if
|
|
176
|
+
* any, verified before this instruction updates the leaf.
|
|
177
|
+
*/
|
|
178
|
+
collectionHash: OptionOrNullable<Array<number>>;
|
|
179
|
+
/**
|
|
180
|
+
* Expected current `assetDataHash` of the `LeafSchema` V2 leaf, if any,
|
|
181
|
+
* carried through unchanged by this instruction.
|
|
182
|
+
*/
|
|
183
|
+
assetDataHash: OptionOrNullable<Array<number>>;
|
|
184
|
+
/**
|
|
185
|
+
* Expected current status flags (e.g. frozen, non-transferable) of the
|
|
186
|
+
* `LeafSchema` V2 leaf, verified before this instruction updates them.
|
|
187
|
+
*/
|
|
133
188
|
flags: OptionOrNullable<number>;
|
|
189
|
+
/**
|
|
190
|
+
* Tree-scoped nonce identifying the leaf, equal to the tree's
|
|
191
|
+
* `numMinted` at the time the leaf was minted. Combined with the tree
|
|
192
|
+
* address to derive the leaf's asset id.
|
|
193
|
+
*/
|
|
134
194
|
nonce: number | bigint;
|
|
195
|
+
/**
|
|
196
|
+
* Position of the leaf within the Merkle tree, used with the Merkle
|
|
197
|
+
* proof to locate and verify the leaf.
|
|
198
|
+
*/
|
|
135
199
|
index: number;
|
|
136
|
-
}
|
|
200
|
+
};
|
|
137
201
|
|
|
138
202
|
export function getThawAndRevokeV2InstructionDataEncoder(): Encoder<ThawAndRevokeV2InstructionDataArgs> {
|
|
139
203
|
return transformEncoder(
|
|
@@ -188,7 +252,7 @@ export function getThawAndRevokeV2InstructionDataCodec(): Codec<
|
|
|
188
252
|
);
|
|
189
253
|
}
|
|
190
254
|
|
|
191
|
-
export
|
|
255
|
+
export type ThawAndRevokeV2AsyncInput<
|
|
192
256
|
TAccountTreeAuthority extends string = string,
|
|
193
257
|
TAccountPayer extends string = string,
|
|
194
258
|
TAccountLeafDelegate extends string = string,
|
|
@@ -197,15 +261,34 @@ export interface ThawAndRevokeV2AsyncInput<
|
|
|
197
261
|
TAccountLogWrapper extends string = string,
|
|
198
262
|
TAccountCompressionProgram extends string = string,
|
|
199
263
|
TAccountSystemProgram extends string = string,
|
|
200
|
-
> {
|
|
264
|
+
> = {
|
|
265
|
+
/**
|
|
266
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
267
|
+
* as the tree's authority for CPIs into the compression program.
|
|
268
|
+
*/
|
|
201
269
|
treeAuthority?: Address<TAccountTreeAuthority>;
|
|
270
|
+
/** Account that pays for the transaction and any account rent. */
|
|
202
271
|
payer: TransactionSigner<TAccountPayer>;
|
|
203
|
-
/** Optional leaf delegate, defaults to `payer
|
|
272
|
+
/** Optional leaf delegate, defaults to `payer`. */
|
|
204
273
|
leafDelegate?: TransactionSigner<TAccountLeafDelegate>;
|
|
274
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
205
275
|
leafOwner: Address<TAccountLeafOwner>;
|
|
276
|
+
/**
|
|
277
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
278
|
+
* owned by the account compression program.
|
|
279
|
+
*/
|
|
206
280
|
merkleTree: Address<TAccountMerkleTree>;
|
|
281
|
+
/**
|
|
282
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
283
|
+
* can reconstruct the tree.
|
|
284
|
+
*/
|
|
207
285
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
286
|
+
/**
|
|
287
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
288
|
+
* Merkle tree.
|
|
289
|
+
*/
|
|
208
290
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
291
|
+
/** The Solana System program. */
|
|
209
292
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
210
293
|
root: ThawAndRevokeV2InstructionDataArgs["root"];
|
|
211
294
|
dataHash: ThawAndRevokeV2InstructionDataArgs["dataHash"];
|
|
@@ -215,8 +298,13 @@ export interface ThawAndRevokeV2AsyncInput<
|
|
|
215
298
|
flags: ThawAndRevokeV2InstructionDataArgs["flags"];
|
|
216
299
|
nonce: ThawAndRevokeV2InstructionDataArgs["nonce"];
|
|
217
300
|
index: ThawAndRevokeV2InstructionDataArgs["index"];
|
|
218
|
-
}
|
|
301
|
+
};
|
|
219
302
|
|
|
303
|
+
/**
|
|
304
|
+
* Thaws a previously frozen `LeafSchema` V2 leaf node and revokes its
|
|
305
|
+
* delegate (resetting the delegate back to the leaf owner) in a single
|
|
306
|
+
* instruction.
|
|
307
|
+
*/
|
|
220
308
|
export async function getThawAndRevokeV2InstructionAsync<
|
|
221
309
|
TAccountTreeAuthority extends string,
|
|
222
310
|
TAccountPayer extends string,
|
|
@@ -328,7 +416,7 @@ export async function getThawAndRevokeV2InstructionAsync<
|
|
|
328
416
|
>);
|
|
329
417
|
}
|
|
330
418
|
|
|
331
|
-
export
|
|
419
|
+
export type ThawAndRevokeV2Input<
|
|
332
420
|
TAccountTreeAuthority extends string = string,
|
|
333
421
|
TAccountPayer extends string = string,
|
|
334
422
|
TAccountLeafDelegate extends string = string,
|
|
@@ -337,15 +425,34 @@ export interface ThawAndRevokeV2Input<
|
|
|
337
425
|
TAccountLogWrapper extends string = string,
|
|
338
426
|
TAccountCompressionProgram extends string = string,
|
|
339
427
|
TAccountSystemProgram extends string = string,
|
|
340
|
-
> {
|
|
428
|
+
> = {
|
|
429
|
+
/**
|
|
430
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
431
|
+
* as the tree's authority for CPIs into the compression program.
|
|
432
|
+
*/
|
|
341
433
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
434
|
+
/** Account that pays for the transaction and any account rent. */
|
|
342
435
|
payer: TransactionSigner<TAccountPayer>;
|
|
343
|
-
/** Optional leaf delegate, defaults to `payer
|
|
436
|
+
/** Optional leaf delegate, defaults to `payer`. */
|
|
344
437
|
leafDelegate?: TransactionSigner<TAccountLeafDelegate>;
|
|
438
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
345
439
|
leafOwner: Address<TAccountLeafOwner>;
|
|
440
|
+
/**
|
|
441
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
442
|
+
* owned by the account compression program.
|
|
443
|
+
*/
|
|
346
444
|
merkleTree: Address<TAccountMerkleTree>;
|
|
445
|
+
/**
|
|
446
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
447
|
+
* can reconstruct the tree.
|
|
448
|
+
*/
|
|
347
449
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
450
|
+
/**
|
|
451
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
452
|
+
* Merkle tree.
|
|
453
|
+
*/
|
|
348
454
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
455
|
+
/** The Solana System program. */
|
|
349
456
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
350
457
|
root: ThawAndRevokeV2InstructionDataArgs["root"];
|
|
351
458
|
dataHash: ThawAndRevokeV2InstructionDataArgs["dataHash"];
|
|
@@ -355,8 +462,13 @@ export interface ThawAndRevokeV2Input<
|
|
|
355
462
|
flags: ThawAndRevokeV2InstructionDataArgs["flags"];
|
|
356
463
|
nonce: ThawAndRevokeV2InstructionDataArgs["nonce"];
|
|
357
464
|
index: ThawAndRevokeV2InstructionDataArgs["index"];
|
|
358
|
-
}
|
|
465
|
+
};
|
|
359
466
|
|
|
467
|
+
/**
|
|
468
|
+
* Thaws a previously frozen `LeafSchema` V2 leaf node and revokes its
|
|
469
|
+
* delegate (resetting the delegate back to the leaf owner) in a single
|
|
470
|
+
* instruction.
|
|
471
|
+
*/
|
|
360
472
|
export function getThawAndRevokeV2Instruction<
|
|
361
473
|
TAccountTreeAuthority extends string,
|
|
362
474
|
TAccountPayer extends string,
|
|
@@ -458,24 +570,43 @@ export function getThawAndRevokeV2Instruction<
|
|
|
458
570
|
>);
|
|
459
571
|
}
|
|
460
572
|
|
|
461
|
-
export
|
|
573
|
+
export type ParsedThawAndRevokeV2Instruction<
|
|
462
574
|
TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
|
|
463
575
|
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
464
|
-
> {
|
|
576
|
+
> = {
|
|
465
577
|
programAddress: Address<TProgram>;
|
|
466
578
|
accounts: {
|
|
579
|
+
/**
|
|
580
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
581
|
+
* as the tree's authority for CPIs into the compression program.
|
|
582
|
+
*/
|
|
467
583
|
treeAuthority: TAccountMetas[0];
|
|
584
|
+
/** Account that pays for the transaction and any account rent. */
|
|
468
585
|
payer: TAccountMetas[1];
|
|
469
|
-
/** Optional leaf delegate, defaults to `payer
|
|
586
|
+
/** Optional leaf delegate, defaults to `payer`. */
|
|
470
587
|
leafDelegate?: TAccountMetas[2] | undefined;
|
|
588
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
471
589
|
leafOwner: TAccountMetas[3];
|
|
590
|
+
/**
|
|
591
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
592
|
+
* owned by the account compression program.
|
|
593
|
+
*/
|
|
472
594
|
merkleTree: TAccountMetas[4];
|
|
595
|
+
/**
|
|
596
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
597
|
+
* can reconstruct the tree.
|
|
598
|
+
*/
|
|
473
599
|
logWrapper: TAccountMetas[5];
|
|
600
|
+
/**
|
|
601
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
602
|
+
* Merkle tree.
|
|
603
|
+
*/
|
|
474
604
|
compressionProgram: TAccountMetas[6];
|
|
605
|
+
/** The Solana System program. */
|
|
475
606
|
systemProgram: TAccountMetas[7];
|
|
476
607
|
};
|
|
477
608
|
data: ThawAndRevokeV2InstructionData;
|
|
478
|
-
}
|
|
609
|
+
};
|
|
479
610
|
|
|
480
611
|
export function parseThawAndRevokeV2Instruction<
|
|
481
612
|
TProgram extends string,
|
|
@@ -6,26 +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
9
|
import {
|
|
30
10
|
combineCodec,
|
|
31
11
|
fixDecoderSize,
|
|
@@ -38,19 +18,37 @@ import {
|
|
|
38
18
|
getOptionEncoder,
|
|
39
19
|
getStructDecoder,
|
|
40
20
|
getStructEncoder,
|
|
41
|
-
getU8Decoder,
|
|
42
|
-
getU8Encoder,
|
|
43
21
|
getU32Decoder,
|
|
44
22
|
getU32Encoder,
|
|
45
23
|
getU64Decoder,
|
|
46
24
|
getU64Encoder,
|
|
25
|
+
getU8Decoder,
|
|
26
|
+
getU8Encoder,
|
|
47
27
|
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
48
28
|
SolanaError,
|
|
49
29
|
transformEncoder,
|
|
30
|
+
type AccountMeta,
|
|
31
|
+
type AccountSignerMeta,
|
|
32
|
+
type Address,
|
|
33
|
+
type Codec,
|
|
34
|
+
type Decoder,
|
|
35
|
+
type Encoder,
|
|
36
|
+
type Instruction,
|
|
37
|
+
type InstructionWithAccounts,
|
|
38
|
+
type InstructionWithData,
|
|
39
|
+
type Option,
|
|
40
|
+
type OptionOrNullable,
|
|
41
|
+
type ReadonlyAccount,
|
|
42
|
+
type ReadonlySignerAccount,
|
|
43
|
+
type ReadonlyUint8Array,
|
|
44
|
+
type TransactionSigner,
|
|
45
|
+
type WritableAccount,
|
|
46
|
+
type WritableSignerAccount,
|
|
50
47
|
} from "@solana/kit";
|
|
51
48
|
import {
|
|
52
49
|
getAccountMetaFactory,
|
|
53
50
|
getAddressFromResolvedInstructionAccount,
|
|
51
|
+
type ResolvedInstructionAccount,
|
|
54
52
|
} from "@solana/program-client-core";
|
|
55
53
|
import { findTreeConfigPda } from "../pdas/index.js";
|
|
56
54
|
import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
@@ -119,26 +117,84 @@ export type ThawV2Instruction<
|
|
|
119
117
|
]
|
|
120
118
|
>;
|
|
121
119
|
|
|
122
|
-
export
|
|
120
|
+
export type ThawV2InstructionData = {
|
|
123
121
|
discriminator: ReadonlyUint8Array;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Current Merkle root of the tree, used together with the Merkle proof
|
|
124
|
+
* (passed as remaining accounts) to verify the leaf being operated on.
|
|
125
|
+
*/
|
|
126
|
+
root: Array<number>;
|
|
127
|
+
/**
|
|
128
|
+
* Keccak256 hash of the leaf's metadata, used together with `root` to
|
|
129
|
+
* verify the leaf before it is modified.
|
|
130
|
+
*/
|
|
131
|
+
dataHash: Array<number>;
|
|
132
|
+
/**
|
|
133
|
+
* Keccak256 hash of the leaf's creators array, used together with
|
|
134
|
+
* `root` to verify the leaf before it is modified.
|
|
135
|
+
*/
|
|
136
|
+
creatorHash: Array<number>;
|
|
137
|
+
/**
|
|
138
|
+
* Expected current `assetDataHash` of the `LeafSchema` V2 leaf, if any,
|
|
139
|
+
* carried through unchanged by this instruction.
|
|
140
|
+
*/
|
|
141
|
+
assetDataHash: Option<Array<number>>;
|
|
142
|
+
/**
|
|
143
|
+
* Expected current status flags (e.g. frozen, non-transferable) of the
|
|
144
|
+
* `LeafSchema` V2 leaf, verified before this instruction updates them.
|
|
145
|
+
*/
|
|
128
146
|
flags: Option<number>;
|
|
147
|
+
/**
|
|
148
|
+
* Tree-scoped nonce identifying the leaf, equal to the tree's
|
|
149
|
+
* `numMinted` at the time the leaf was minted. Combined with the tree
|
|
150
|
+
* address to derive the leaf's asset id.
|
|
151
|
+
*/
|
|
129
152
|
nonce: bigint;
|
|
153
|
+
/**
|
|
154
|
+
* Position of the leaf within the Merkle tree, used with the Merkle
|
|
155
|
+
* proof to locate and verify the leaf.
|
|
156
|
+
*/
|
|
130
157
|
index: number;
|
|
131
|
-
}
|
|
158
|
+
};
|
|
132
159
|
|
|
133
|
-
export
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
160
|
+
export type ThawV2InstructionDataArgs = {
|
|
161
|
+
/**
|
|
162
|
+
* Current Merkle root of the tree, used together with the Merkle proof
|
|
163
|
+
* (passed as remaining accounts) to verify the leaf being operated on.
|
|
164
|
+
*/
|
|
165
|
+
root: Array<number>;
|
|
166
|
+
/**
|
|
167
|
+
* Keccak256 hash of the leaf's metadata, used together with `root` to
|
|
168
|
+
* verify the leaf before it is modified.
|
|
169
|
+
*/
|
|
170
|
+
dataHash: Array<number>;
|
|
171
|
+
/**
|
|
172
|
+
* Keccak256 hash of the leaf's creators array, used together with
|
|
173
|
+
* `root` to verify the leaf before it is modified.
|
|
174
|
+
*/
|
|
175
|
+
creatorHash: Array<number>;
|
|
176
|
+
/**
|
|
177
|
+
* Expected current `assetDataHash` of the `LeafSchema` V2 leaf, if any,
|
|
178
|
+
* carried through unchanged by this instruction.
|
|
179
|
+
*/
|
|
180
|
+
assetDataHash: OptionOrNullable<Array<number>>;
|
|
181
|
+
/**
|
|
182
|
+
* Expected current status flags (e.g. frozen, non-transferable) of the
|
|
183
|
+
* `LeafSchema` V2 leaf, verified before this instruction updates them.
|
|
184
|
+
*/
|
|
138
185
|
flags: OptionOrNullable<number>;
|
|
186
|
+
/**
|
|
187
|
+
* Tree-scoped nonce identifying the leaf, equal to the tree's
|
|
188
|
+
* `numMinted` at the time the leaf was minted. Combined with the tree
|
|
189
|
+
* address to derive the leaf's asset id.
|
|
190
|
+
*/
|
|
139
191
|
nonce: number | bigint;
|
|
192
|
+
/**
|
|
193
|
+
* Position of the leaf within the Merkle tree, used with the Merkle
|
|
194
|
+
* proof to locate and verify the leaf.
|
|
195
|
+
*/
|
|
140
196
|
index: number;
|
|
141
|
-
}
|
|
197
|
+
};
|
|
142
198
|
|
|
143
199
|
export function getThawV2InstructionDataEncoder(): Encoder<ThawV2InstructionDataArgs> {
|
|
144
200
|
return transformEncoder(
|
|
@@ -185,7 +241,7 @@ export function getThawV2InstructionDataCodec(): Codec<
|
|
|
185
241
|
);
|
|
186
242
|
}
|
|
187
243
|
|
|
188
|
-
export
|
|
244
|
+
export type ThawV2AsyncInput<
|
|
189
245
|
TAccountTreeAuthority extends string = string,
|
|
190
246
|
TAccountPayer extends string = string,
|
|
191
247
|
TAccountAuthority extends string = string,
|
|
@@ -196,20 +252,44 @@ export interface ThawV2AsyncInput<
|
|
|
196
252
|
TAccountLogWrapper extends string = string,
|
|
197
253
|
TAccountCompressionProgram extends string = string,
|
|
198
254
|
TAccountSystemProgram extends string = string,
|
|
199
|
-
> {
|
|
255
|
+
> = {
|
|
256
|
+
/**
|
|
257
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
258
|
+
* as the tree's authority for CPIs into the compression program.
|
|
259
|
+
*/
|
|
200
260
|
treeAuthority?: Address<TAccountTreeAuthority>;
|
|
261
|
+
/** Account that pays for the transaction and any account rent. */
|
|
201
262
|
payer: TransactionSigner<TAccountPayer>;
|
|
202
263
|
/**
|
|
203
|
-
* Optional authority, defaults to `payer`.
|
|
204
|
-
*
|
|
264
|
+
* Optional authority, defaults to `payer`. Must be either the leaf
|
|
265
|
+
* delegate or a permanent freeze delegate plugin on the collection.
|
|
205
266
|
*/
|
|
206
267
|
authority?: TransactionSigner<TAccountAuthority>;
|
|
268
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
207
269
|
leafOwner: Address<TAccountLeafOwner>;
|
|
270
|
+
/**
|
|
271
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
272
|
+
* delegate is set.
|
|
273
|
+
*/
|
|
208
274
|
leafDelegate: Address<TAccountLeafDelegate>;
|
|
275
|
+
/**
|
|
276
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
277
|
+
* owned by the account compression program.
|
|
278
|
+
*/
|
|
209
279
|
merkleTree: Address<TAccountMerkleTree>;
|
|
280
|
+
/** MPL Core collection account the asset belongs to (V2 collections). */
|
|
210
281
|
coreCollection?: Address<TAccountCoreCollection>;
|
|
282
|
+
/**
|
|
283
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
284
|
+
* can reconstruct the tree.
|
|
285
|
+
*/
|
|
211
286
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
287
|
+
/**
|
|
288
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
289
|
+
* Merkle tree.
|
|
290
|
+
*/
|
|
212
291
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
292
|
+
/** The Solana System program. */
|
|
213
293
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
214
294
|
root: ThawV2InstructionDataArgs["root"];
|
|
215
295
|
dataHash: ThawV2InstructionDataArgs["dataHash"];
|
|
@@ -218,8 +298,12 @@ export interface ThawV2AsyncInput<
|
|
|
218
298
|
flags: ThawV2InstructionDataArgs["flags"];
|
|
219
299
|
nonce: ThawV2InstructionDataArgs["nonce"];
|
|
220
300
|
index: ThawV2InstructionDataArgs["index"];
|
|
221
|
-
}
|
|
301
|
+
};
|
|
222
302
|
|
|
303
|
+
/**
|
|
304
|
+
* Thaws a previously frozen `LeafSchema` V2 leaf node, restoring its
|
|
305
|
+
* ability to be transferred or burned.
|
|
306
|
+
*/
|
|
223
307
|
export async function getThawV2InstructionAsync<
|
|
224
308
|
TAccountTreeAuthority extends string,
|
|
225
309
|
TAccountPayer extends string,
|
|
@@ -343,7 +427,7 @@ export async function getThawV2InstructionAsync<
|
|
|
343
427
|
>);
|
|
344
428
|
}
|
|
345
429
|
|
|
346
|
-
export
|
|
430
|
+
export type ThawV2Input<
|
|
347
431
|
TAccountTreeAuthority extends string = string,
|
|
348
432
|
TAccountPayer extends string = string,
|
|
349
433
|
TAccountAuthority extends string = string,
|
|
@@ -354,20 +438,44 @@ export interface ThawV2Input<
|
|
|
354
438
|
TAccountLogWrapper extends string = string,
|
|
355
439
|
TAccountCompressionProgram extends string = string,
|
|
356
440
|
TAccountSystemProgram extends string = string,
|
|
357
|
-
> {
|
|
441
|
+
> = {
|
|
442
|
+
/**
|
|
443
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
444
|
+
* as the tree's authority for CPIs into the compression program.
|
|
445
|
+
*/
|
|
358
446
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
447
|
+
/** Account that pays for the transaction and any account rent. */
|
|
359
448
|
payer: TransactionSigner<TAccountPayer>;
|
|
360
449
|
/**
|
|
361
|
-
* Optional authority, defaults to `payer`.
|
|
362
|
-
*
|
|
450
|
+
* Optional authority, defaults to `payer`. Must be either the leaf
|
|
451
|
+
* delegate or a permanent freeze delegate plugin on the collection.
|
|
363
452
|
*/
|
|
364
453
|
authority?: TransactionSigner<TAccountAuthority>;
|
|
454
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
365
455
|
leafOwner: Address<TAccountLeafOwner>;
|
|
456
|
+
/**
|
|
457
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
458
|
+
* delegate is set.
|
|
459
|
+
*/
|
|
366
460
|
leafDelegate: Address<TAccountLeafDelegate>;
|
|
461
|
+
/**
|
|
462
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
463
|
+
* owned by the account compression program.
|
|
464
|
+
*/
|
|
367
465
|
merkleTree: Address<TAccountMerkleTree>;
|
|
466
|
+
/** MPL Core collection account the asset belongs to (V2 collections). */
|
|
368
467
|
coreCollection?: Address<TAccountCoreCollection>;
|
|
468
|
+
/**
|
|
469
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
470
|
+
* can reconstruct the tree.
|
|
471
|
+
*/
|
|
369
472
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
473
|
+
/**
|
|
474
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
475
|
+
* Merkle tree.
|
|
476
|
+
*/
|
|
370
477
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
478
|
+
/** The Solana System program. */
|
|
371
479
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
372
480
|
root: ThawV2InstructionDataArgs["root"];
|
|
373
481
|
dataHash: ThawV2InstructionDataArgs["dataHash"];
|
|
@@ -376,8 +484,12 @@ export interface ThawV2Input<
|
|
|
376
484
|
flags: ThawV2InstructionDataArgs["flags"];
|
|
377
485
|
nonce: ThawV2InstructionDataArgs["nonce"];
|
|
378
486
|
index: ThawV2InstructionDataArgs["index"];
|
|
379
|
-
}
|
|
487
|
+
};
|
|
380
488
|
|
|
489
|
+
/**
|
|
490
|
+
* Thaws a previously frozen `LeafSchema` V2 leaf node, restoring its
|
|
491
|
+
* ability to be transferred or burned.
|
|
492
|
+
*/
|
|
381
493
|
export function getThawV2Instruction<
|
|
382
494
|
TAccountTreeAuthority extends string,
|
|
383
495
|
TAccountPayer extends string,
|
|
@@ -491,29 +603,53 @@ export function getThawV2Instruction<
|
|
|
491
603
|
>);
|
|
492
604
|
}
|
|
493
605
|
|
|
494
|
-
export
|
|
606
|
+
export type ParsedThawV2Instruction<
|
|
495
607
|
TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
|
|
496
608
|
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
497
|
-
> {
|
|
609
|
+
> = {
|
|
498
610
|
programAddress: Address<TProgram>;
|
|
499
611
|
accounts: {
|
|
612
|
+
/**
|
|
613
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
614
|
+
* as the tree's authority for CPIs into the compression program.
|
|
615
|
+
*/
|
|
500
616
|
treeAuthority: TAccountMetas[0];
|
|
617
|
+
/** Account that pays for the transaction and any account rent. */
|
|
501
618
|
payer: TAccountMetas[1];
|
|
502
619
|
/**
|
|
503
|
-
* Optional authority, defaults to `payer`.
|
|
504
|
-
*
|
|
620
|
+
* Optional authority, defaults to `payer`. Must be either the leaf
|
|
621
|
+
* delegate or a permanent freeze delegate plugin on the collection.
|
|
505
622
|
*/
|
|
506
623
|
authority?: TAccountMetas[2] | undefined;
|
|
624
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
507
625
|
leafOwner: TAccountMetas[3];
|
|
626
|
+
/**
|
|
627
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
628
|
+
* delegate is set.
|
|
629
|
+
*/
|
|
508
630
|
leafDelegate: TAccountMetas[4];
|
|
631
|
+
/**
|
|
632
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
633
|
+
* owned by the account compression program.
|
|
634
|
+
*/
|
|
509
635
|
merkleTree: TAccountMetas[5];
|
|
636
|
+
/** MPL Core collection account the asset belongs to (V2 collections). */
|
|
510
637
|
coreCollection?: TAccountMetas[6] | undefined;
|
|
638
|
+
/**
|
|
639
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
640
|
+
* can reconstruct the tree.
|
|
641
|
+
*/
|
|
511
642
|
logWrapper: TAccountMetas[7];
|
|
643
|
+
/**
|
|
644
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
645
|
+
* Merkle tree.
|
|
646
|
+
*/
|
|
512
647
|
compressionProgram: TAccountMetas[8];
|
|
648
|
+
/** The Solana System program. */
|
|
513
649
|
systemProgram: TAccountMetas[9];
|
|
514
650
|
};
|
|
515
651
|
data: ThawV2InstructionData;
|
|
516
|
-
}
|
|
652
|
+
};
|
|
517
653
|
|
|
518
654
|
export function parseThawV2Instruction<
|
|
519
655
|
TProgram extends string,
|