@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
|
-
FixedSizeCodec,
|
|
14
|
-
FixedSizeDecoder,
|
|
15
|
-
FixedSizeEncoder,
|
|
16
|
-
Instruction,
|
|
17
|
-
InstructionWithAccounts,
|
|
18
|
-
InstructionWithData,
|
|
19
|
-
ReadonlySignerAccount,
|
|
20
|
-
ReadonlyUint8Array,
|
|
21
|
-
TransactionSigner,
|
|
22
|
-
WritableAccount,
|
|
23
|
-
} from "@solana/kit";
|
|
24
|
-
import type { ResolvedInstructionAccount } from "@solana/program-client-core";
|
|
25
|
-
import type {
|
|
26
|
-
DecompressibleState,
|
|
27
|
-
DecompressibleStateArgs,
|
|
28
|
-
} from "../types/index.js";
|
|
29
9
|
import {
|
|
30
10
|
combineCodec,
|
|
31
11
|
fixDecoderSize,
|
|
@@ -37,12 +17,30 @@ import {
|
|
|
37
17
|
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
38
18
|
SolanaError,
|
|
39
19
|
transformEncoder,
|
|
20
|
+
type AccountMeta,
|
|
21
|
+
type AccountSignerMeta,
|
|
22
|
+
type Address,
|
|
23
|
+
type FixedSizeCodec,
|
|
24
|
+
type FixedSizeDecoder,
|
|
25
|
+
type FixedSizeEncoder,
|
|
26
|
+
type Instruction,
|
|
27
|
+
type InstructionWithAccounts,
|
|
28
|
+
type InstructionWithData,
|
|
29
|
+
type ReadonlySignerAccount,
|
|
30
|
+
type ReadonlyUint8Array,
|
|
31
|
+
type TransactionSigner,
|
|
32
|
+
type WritableAccount,
|
|
40
33
|
} from "@solana/kit";
|
|
41
|
-
import {
|
|
34
|
+
import {
|
|
35
|
+
getAccountMetaFactory,
|
|
36
|
+
type ResolvedInstructionAccount,
|
|
37
|
+
} from "@solana/program-client-core";
|
|
42
38
|
import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
43
39
|
import {
|
|
44
40
|
getDecompressibleStateDecoder,
|
|
45
41
|
getDecompressibleStateEncoder,
|
|
42
|
+
type DecompressibleState,
|
|
43
|
+
type DecompressibleStateArgs,
|
|
46
44
|
} from "../types/index.js";
|
|
47
45
|
|
|
48
46
|
export const SET_DECOMPRESSIBLE_STATE_DISCRIMINATOR: ReadonlyUint8Array =
|
|
@@ -74,14 +72,22 @@ export type SetDecompressibleStateInstruction<
|
|
|
74
72
|
]
|
|
75
73
|
>;
|
|
76
74
|
|
|
77
|
-
export
|
|
75
|
+
export type SetDecompressibleStateInstructionData = {
|
|
78
76
|
discriminator: ReadonlyUint8Array;
|
|
77
|
+
/**
|
|
78
|
+
* The new decompressible state to set on the tree: `Enabled` allows
|
|
79
|
+
* `redeem`/`decompressV1`, `Disabled` blocks them.
|
|
80
|
+
*/
|
|
79
81
|
decompressableState: DecompressibleState;
|
|
80
|
-
}
|
|
82
|
+
};
|
|
81
83
|
|
|
82
|
-
export
|
|
84
|
+
export type SetDecompressibleStateInstructionDataArgs = {
|
|
85
|
+
/**
|
|
86
|
+
* The new decompressible state to set on the tree: `Enabled` allows
|
|
87
|
+
* `redeem`/`decompressV1`, `Disabled` blocks them.
|
|
88
|
+
*/
|
|
83
89
|
decompressableState: DecompressibleStateArgs;
|
|
84
|
-
}
|
|
90
|
+
};
|
|
85
91
|
|
|
86
92
|
export function getSetDecompressibleStateInstructionDataEncoder(): FixedSizeEncoder<SetDecompressibleStateInstructionDataArgs> {
|
|
87
93
|
return transformEncoder(
|
|
@@ -113,15 +119,30 @@ export function getSetDecompressibleStateInstructionDataCodec(): FixedSizeCodec<
|
|
|
113
119
|
);
|
|
114
120
|
}
|
|
115
121
|
|
|
116
|
-
export
|
|
122
|
+
export type SetDecompressibleStateInput<
|
|
117
123
|
TAccountTreeAuthority extends string = string,
|
|
118
124
|
TAccountTreeCreator extends string = string,
|
|
119
|
-
> {
|
|
125
|
+
> = {
|
|
126
|
+
/**
|
|
127
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
128
|
+
* as the tree's authority for CPIs into the compression program.
|
|
129
|
+
*/
|
|
120
130
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
131
|
+
/**
|
|
132
|
+
* Creator of the tree, recorded in `TreeConfig` when the tree was
|
|
133
|
+
* created.
|
|
134
|
+
*/
|
|
121
135
|
treeCreator: TransactionSigner<TAccountTreeCreator>;
|
|
122
136
|
decompressableState: SetDecompressibleStateInstructionDataArgs["decompressableState"];
|
|
123
|
-
}
|
|
137
|
+
};
|
|
124
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Sets the `decompressible_state` of a tree.
|
|
141
|
+
*
|
|
142
|
+
* Controls whether leaves in the tree may be `redeem`ed and
|
|
143
|
+
* `decompressV1`'d into regular NFTs. Only the tree creator may call
|
|
144
|
+
* this instruction.
|
|
145
|
+
*/
|
|
125
146
|
export function getSetDecompressibleStateInstruction<
|
|
126
147
|
TAccountTreeAuthority extends string,
|
|
127
148
|
TAccountTreeCreator extends string,
|
|
@@ -170,17 +191,25 @@ export function getSetDecompressibleStateInstruction<
|
|
|
170
191
|
>);
|
|
171
192
|
}
|
|
172
193
|
|
|
173
|
-
export
|
|
194
|
+
export type ParsedSetDecompressibleStateInstruction<
|
|
174
195
|
TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
|
|
175
196
|
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
176
|
-
> {
|
|
197
|
+
> = {
|
|
177
198
|
programAddress: Address<TProgram>;
|
|
178
199
|
accounts: {
|
|
200
|
+
/**
|
|
201
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
202
|
+
* as the tree's authority for CPIs into the compression program.
|
|
203
|
+
*/
|
|
179
204
|
treeAuthority: TAccountMetas[0];
|
|
205
|
+
/**
|
|
206
|
+
* Creator of the tree, recorded in `TreeConfig` when the tree was
|
|
207
|
+
* created.
|
|
208
|
+
*/
|
|
180
209
|
treeCreator: TAccountMetas[1];
|
|
181
210
|
};
|
|
182
211
|
data: SetDecompressibleStateInstructionData;
|
|
183
|
-
}
|
|
212
|
+
};
|
|
184
213
|
|
|
185
214
|
export function parseSetDecompressibleStateInstruction<
|
|
186
215
|
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";
|
|
@@ -120,26 +118,84 @@ export type SetNonTransferableV2Instruction<
|
|
|
120
118
|
]
|
|
121
119
|
>;
|
|
122
120
|
|
|
123
|
-
export
|
|
121
|
+
export type SetNonTransferableV2InstructionData = {
|
|
124
122
|
discriminator: ReadonlyUint8Array;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
/**
|
|
124
|
+
* Current Merkle root of the tree, used together with the Merkle proof
|
|
125
|
+
* (passed as remaining accounts) to verify the leaf being operated on.
|
|
126
|
+
*/
|
|
127
|
+
root: Array<number>;
|
|
128
|
+
/**
|
|
129
|
+
* Keccak256 hash of the leaf's metadata, used together with `root` to
|
|
130
|
+
* verify the leaf before it is modified.
|
|
131
|
+
*/
|
|
132
|
+
dataHash: Array<number>;
|
|
133
|
+
/**
|
|
134
|
+
* Keccak256 hash of the leaf's creators array, used together with
|
|
135
|
+
* `root` to verify the leaf before it is modified.
|
|
136
|
+
*/
|
|
137
|
+
creatorHash: Array<number>;
|
|
138
|
+
/**
|
|
139
|
+
* Expected current `assetDataHash` of the `LeafSchema` V2 leaf, if any,
|
|
140
|
+
* carried through unchanged by this instruction.
|
|
141
|
+
*/
|
|
142
|
+
assetDataHash: Option<Array<number>>;
|
|
143
|
+
/**
|
|
144
|
+
* Expected current status flags (e.g. frozen, non-transferable) of the
|
|
145
|
+
* `LeafSchema` V2 leaf, verified before this instruction updates them.
|
|
146
|
+
*/
|
|
129
147
|
flags: Option<number>;
|
|
148
|
+
/**
|
|
149
|
+
* Tree-scoped nonce identifying the leaf, equal to the tree's
|
|
150
|
+
* `numMinted` at the time the leaf was minted. Combined with the tree
|
|
151
|
+
* address to derive the leaf's asset id.
|
|
152
|
+
*/
|
|
130
153
|
nonce: bigint;
|
|
154
|
+
/**
|
|
155
|
+
* Position of the leaf within the Merkle tree, used with the Merkle
|
|
156
|
+
* proof to locate and verify the leaf.
|
|
157
|
+
*/
|
|
131
158
|
index: number;
|
|
132
|
-
}
|
|
159
|
+
};
|
|
133
160
|
|
|
134
|
-
export
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
161
|
+
export type SetNonTransferableV2InstructionDataArgs = {
|
|
162
|
+
/**
|
|
163
|
+
* Current Merkle root of the tree, used together with the Merkle proof
|
|
164
|
+
* (passed as remaining accounts) to verify the leaf being operated on.
|
|
165
|
+
*/
|
|
166
|
+
root: Array<number>;
|
|
167
|
+
/**
|
|
168
|
+
* Keccak256 hash of the leaf's metadata, used together with `root` to
|
|
169
|
+
* verify the leaf before it is modified.
|
|
170
|
+
*/
|
|
171
|
+
dataHash: Array<number>;
|
|
172
|
+
/**
|
|
173
|
+
* Keccak256 hash of the leaf's creators array, used together with
|
|
174
|
+
* `root` to verify the leaf before it is modified.
|
|
175
|
+
*/
|
|
176
|
+
creatorHash: Array<number>;
|
|
177
|
+
/**
|
|
178
|
+
* Expected current `assetDataHash` of the `LeafSchema` V2 leaf, if any,
|
|
179
|
+
* carried through unchanged by this instruction.
|
|
180
|
+
*/
|
|
181
|
+
assetDataHash: OptionOrNullable<Array<number>>;
|
|
182
|
+
/**
|
|
183
|
+
* Expected current status flags (e.g. frozen, non-transferable) of the
|
|
184
|
+
* `LeafSchema` V2 leaf, verified before this instruction updates them.
|
|
185
|
+
*/
|
|
139
186
|
flags: OptionOrNullable<number>;
|
|
187
|
+
/**
|
|
188
|
+
* Tree-scoped nonce identifying the leaf, equal to the tree's
|
|
189
|
+
* `numMinted` at the time the leaf was minted. Combined with the tree
|
|
190
|
+
* address to derive the leaf's asset id.
|
|
191
|
+
*/
|
|
140
192
|
nonce: number | bigint;
|
|
193
|
+
/**
|
|
194
|
+
* Position of the leaf within the Merkle tree, used with the Merkle
|
|
195
|
+
* proof to locate and verify the leaf.
|
|
196
|
+
*/
|
|
141
197
|
index: number;
|
|
142
|
-
}
|
|
198
|
+
};
|
|
143
199
|
|
|
144
200
|
export function getSetNonTransferableV2InstructionDataEncoder(): Encoder<SetNonTransferableV2InstructionDataArgs> {
|
|
145
201
|
return transformEncoder(
|
|
@@ -189,7 +245,7 @@ export function getSetNonTransferableV2InstructionDataCodec(): Codec<
|
|
|
189
245
|
);
|
|
190
246
|
}
|
|
191
247
|
|
|
192
|
-
export
|
|
248
|
+
export type SetNonTransferableV2AsyncInput<
|
|
193
249
|
TAccountTreeAuthority extends string = string,
|
|
194
250
|
TAccountPayer extends string = string,
|
|
195
251
|
TAccountAuthority extends string = string,
|
|
@@ -200,21 +256,41 @@ export interface SetNonTransferableV2AsyncInput<
|
|
|
200
256
|
TAccountLogWrapper extends string = string,
|
|
201
257
|
TAccountCompressionProgram extends string = string,
|
|
202
258
|
TAccountSystemProgram extends string = string,
|
|
203
|
-
> {
|
|
259
|
+
> = {
|
|
260
|
+
/**
|
|
261
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
262
|
+
* as the tree's authority for CPIs into the compression program.
|
|
263
|
+
*/
|
|
204
264
|
treeAuthority?: Address<TAccountTreeAuthority>;
|
|
265
|
+
/** Account that pays for the transaction and any account rent. */
|
|
205
266
|
payer: TransactionSigner<TAccountPayer>;
|
|
206
267
|
/**
|
|
207
|
-
*
|
|
208
|
-
*
|
|
268
|
+
* Must be a permanent freeze delegate on the collection. Defaults to
|
|
269
|
+
* `payer`.
|
|
209
270
|
*/
|
|
210
271
|
authority?: TransactionSigner<TAccountAuthority>;
|
|
272
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
211
273
|
leafOwner: Address<TAccountLeafOwner>;
|
|
212
|
-
/** Defaults to `
|
|
274
|
+
/** Defaults to `leafOwner`. */
|
|
213
275
|
leafDelegate?: Address<TAccountLeafDelegate>;
|
|
276
|
+
/**
|
|
277
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
278
|
+
* owned by the account compression program.
|
|
279
|
+
*/
|
|
214
280
|
merkleTree: Address<TAccountMerkleTree>;
|
|
281
|
+
/** MPL Core collection account the asset belongs to (V2 collections). */
|
|
215
282
|
coreCollection: Address<TAccountCoreCollection>;
|
|
283
|
+
/**
|
|
284
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
285
|
+
* can reconstruct the tree.
|
|
286
|
+
*/
|
|
216
287
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
288
|
+
/**
|
|
289
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
290
|
+
* Merkle tree.
|
|
291
|
+
*/
|
|
217
292
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
293
|
+
/** The Solana System program. */
|
|
218
294
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
219
295
|
root: SetNonTransferableV2InstructionDataArgs["root"];
|
|
220
296
|
dataHash: SetNonTransferableV2InstructionDataArgs["dataHash"];
|
|
@@ -223,8 +299,16 @@ export interface SetNonTransferableV2AsyncInput<
|
|
|
223
299
|
flags: SetNonTransferableV2InstructionDataArgs["flags"];
|
|
224
300
|
nonce: SetNonTransferableV2InstructionDataArgs["nonce"];
|
|
225
301
|
index: SetNonTransferableV2InstructionDataArgs["index"];
|
|
226
|
-
}
|
|
302
|
+
};
|
|
227
303
|
|
|
304
|
+
/**
|
|
305
|
+
* Permanently sets the non-transferable flag on a `LeafSchema` V2 leaf
|
|
306
|
+
* node, making it soulbound.
|
|
307
|
+
*
|
|
308
|
+
* Unlike freezing, a non-transferable asset can still be burned by its
|
|
309
|
+
* owner; it just can no longer change owners. This flag cannot be
|
|
310
|
+
* unset once applied.
|
|
311
|
+
*/
|
|
228
312
|
export async function getSetNonTransferableV2InstructionAsync<
|
|
229
313
|
TAccountTreeAuthority extends string,
|
|
230
314
|
TAccountPayer extends string,
|
|
@@ -348,7 +432,7 @@ export async function getSetNonTransferableV2InstructionAsync<
|
|
|
348
432
|
>);
|
|
349
433
|
}
|
|
350
434
|
|
|
351
|
-
export
|
|
435
|
+
export type SetNonTransferableV2Input<
|
|
352
436
|
TAccountTreeAuthority extends string = string,
|
|
353
437
|
TAccountPayer extends string = string,
|
|
354
438
|
TAccountAuthority extends string = string,
|
|
@@ -359,21 +443,41 @@ export interface SetNonTransferableV2Input<
|
|
|
359
443
|
TAccountLogWrapper extends string = string,
|
|
360
444
|
TAccountCompressionProgram extends string = string,
|
|
361
445
|
TAccountSystemProgram extends string = string,
|
|
362
|
-
> {
|
|
446
|
+
> = {
|
|
447
|
+
/**
|
|
448
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
449
|
+
* as the tree's authority for CPIs into the compression program.
|
|
450
|
+
*/
|
|
363
451
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
452
|
+
/** Account that pays for the transaction and any account rent. */
|
|
364
453
|
payer: TransactionSigner<TAccountPayer>;
|
|
365
454
|
/**
|
|
366
|
-
*
|
|
367
|
-
*
|
|
455
|
+
* Must be a permanent freeze delegate on the collection. Defaults to
|
|
456
|
+
* `payer`.
|
|
368
457
|
*/
|
|
369
458
|
authority?: TransactionSigner<TAccountAuthority>;
|
|
459
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
370
460
|
leafOwner: Address<TAccountLeafOwner>;
|
|
371
|
-
/** Defaults to `
|
|
461
|
+
/** Defaults to `leafOwner`. */
|
|
372
462
|
leafDelegate?: Address<TAccountLeafDelegate>;
|
|
463
|
+
/**
|
|
464
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
465
|
+
* owned by the account compression program.
|
|
466
|
+
*/
|
|
373
467
|
merkleTree: Address<TAccountMerkleTree>;
|
|
468
|
+
/** MPL Core collection account the asset belongs to (V2 collections). */
|
|
374
469
|
coreCollection: Address<TAccountCoreCollection>;
|
|
470
|
+
/**
|
|
471
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
472
|
+
* can reconstruct the tree.
|
|
473
|
+
*/
|
|
375
474
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
475
|
+
/**
|
|
476
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
477
|
+
* Merkle tree.
|
|
478
|
+
*/
|
|
376
479
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
480
|
+
/** The Solana System program. */
|
|
377
481
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
378
482
|
root: SetNonTransferableV2InstructionDataArgs["root"];
|
|
379
483
|
dataHash: SetNonTransferableV2InstructionDataArgs["dataHash"];
|
|
@@ -382,8 +486,16 @@ export interface SetNonTransferableV2Input<
|
|
|
382
486
|
flags: SetNonTransferableV2InstructionDataArgs["flags"];
|
|
383
487
|
nonce: SetNonTransferableV2InstructionDataArgs["nonce"];
|
|
384
488
|
index: SetNonTransferableV2InstructionDataArgs["index"];
|
|
385
|
-
}
|
|
489
|
+
};
|
|
386
490
|
|
|
491
|
+
/**
|
|
492
|
+
* Permanently sets the non-transferable flag on a `LeafSchema` V2 leaf
|
|
493
|
+
* node, making it soulbound.
|
|
494
|
+
*
|
|
495
|
+
* Unlike freezing, a non-transferable asset can still be burned by its
|
|
496
|
+
* owner; it just can no longer change owners. This flag cannot be
|
|
497
|
+
* unset once applied.
|
|
498
|
+
*/
|
|
387
499
|
export function getSetNonTransferableV2Instruction<
|
|
388
500
|
TAccountTreeAuthority extends string,
|
|
389
501
|
TAccountPayer extends string,
|
|
@@ -497,30 +609,50 @@ export function getSetNonTransferableV2Instruction<
|
|
|
497
609
|
>);
|
|
498
610
|
}
|
|
499
611
|
|
|
500
|
-
export
|
|
612
|
+
export type ParsedSetNonTransferableV2Instruction<
|
|
501
613
|
TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
|
|
502
614
|
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
503
|
-
> {
|
|
615
|
+
> = {
|
|
504
616
|
programAddress: Address<TProgram>;
|
|
505
617
|
accounts: {
|
|
618
|
+
/**
|
|
619
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
620
|
+
* as the tree's authority for CPIs into the compression program.
|
|
621
|
+
*/
|
|
506
622
|
treeAuthority: TAccountMetas[0];
|
|
623
|
+
/** Account that pays for the transaction and any account rent. */
|
|
507
624
|
payer: TAccountMetas[1];
|
|
508
625
|
/**
|
|
509
|
-
*
|
|
510
|
-
*
|
|
626
|
+
* Must be a permanent freeze delegate on the collection. Defaults to
|
|
627
|
+
* `payer`.
|
|
511
628
|
*/
|
|
512
629
|
authority?: TAccountMetas[2] | undefined;
|
|
630
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
513
631
|
leafOwner: TAccountMetas[3];
|
|
514
|
-
/** Defaults to `
|
|
632
|
+
/** Defaults to `leafOwner`. */
|
|
515
633
|
leafDelegate?: TAccountMetas[4] | undefined;
|
|
634
|
+
/**
|
|
635
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
636
|
+
* owned by the account compression program.
|
|
637
|
+
*/
|
|
516
638
|
merkleTree: TAccountMetas[5];
|
|
639
|
+
/** MPL Core collection account the asset belongs to (V2 collections). */
|
|
517
640
|
coreCollection: TAccountMetas[6];
|
|
641
|
+
/**
|
|
642
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
643
|
+
* can reconstruct the tree.
|
|
644
|
+
*/
|
|
518
645
|
logWrapper: TAccountMetas[7];
|
|
646
|
+
/**
|
|
647
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
648
|
+
* Merkle tree.
|
|
649
|
+
*/
|
|
519
650
|
compressionProgram: TAccountMetas[8];
|
|
651
|
+
/** The Solana System program. */
|
|
520
652
|
systemProgram: TAccountMetas[9];
|
|
521
653
|
};
|
|
522
654
|
data: SetNonTransferableV2InstructionData;
|
|
523
|
-
}
|
|
655
|
+
};
|
|
524
656
|
|
|
525
657
|
export function parseSetNonTransferableV2Instruction<
|
|
526
658
|
TProgram extends string,
|
|
@@ -6,23 +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
|
-
FixedSizeCodec,
|
|
14
|
-
FixedSizeDecoder,
|
|
15
|
-
FixedSizeEncoder,
|
|
16
|
-
Instruction,
|
|
17
|
-
InstructionWithAccounts,
|
|
18
|
-
InstructionWithData,
|
|
19
|
-
ReadonlyAccount,
|
|
20
|
-
ReadonlySignerAccount,
|
|
21
|
-
ReadonlyUint8Array,
|
|
22
|
-
TransactionSigner,
|
|
23
|
-
WritableAccount,
|
|
24
|
-
} from "@solana/kit";
|
|
25
|
-
import type { ResolvedInstructionAccount } from "@solana/program-client-core";
|
|
26
9
|
import {
|
|
27
10
|
combineCodec,
|
|
28
11
|
fixDecoderSize,
|
|
@@ -34,10 +17,25 @@ import {
|
|
|
34
17
|
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
35
18
|
SolanaError,
|
|
36
19
|
transformEncoder,
|
|
20
|
+
type AccountMeta,
|
|
21
|
+
type AccountSignerMeta,
|
|
22
|
+
type Address,
|
|
23
|
+
type FixedSizeCodec,
|
|
24
|
+
type FixedSizeDecoder,
|
|
25
|
+
type FixedSizeEncoder,
|
|
26
|
+
type Instruction,
|
|
27
|
+
type InstructionWithAccounts,
|
|
28
|
+
type InstructionWithData,
|
|
29
|
+
type ReadonlyAccount,
|
|
30
|
+
type ReadonlySignerAccount,
|
|
31
|
+
type ReadonlyUint8Array,
|
|
32
|
+
type TransactionSigner,
|
|
33
|
+
type WritableAccount,
|
|
37
34
|
} from "@solana/kit";
|
|
38
35
|
import {
|
|
39
36
|
getAccountMetaFactory,
|
|
40
37
|
getAddressFromResolvedInstructionAccount,
|
|
38
|
+
type ResolvedInstructionAccount,
|
|
41
39
|
} from "@solana/program-client-core";
|
|
42
40
|
import { findTreeConfigPda } from "../pdas/index.js";
|
|
43
41
|
import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
@@ -84,9 +82,9 @@ export type SetTreeDelegateInstruction<
|
|
|
84
82
|
]
|
|
85
83
|
>;
|
|
86
84
|
|
|
87
|
-
export
|
|
85
|
+
export type SetTreeDelegateInstructionData = {
|
|
88
86
|
discriminator: ReadonlyUint8Array;
|
|
89
|
-
}
|
|
87
|
+
};
|
|
90
88
|
|
|
91
89
|
export type SetTreeDelegateInstructionDataArgs = {};
|
|
92
90
|
|
|
@@ -113,20 +111,41 @@ export function getSetTreeDelegateInstructionDataCodec(): FixedSizeCodec<
|
|
|
113
111
|
);
|
|
114
112
|
}
|
|
115
113
|
|
|
116
|
-
export
|
|
114
|
+
export type SetTreeDelegateAsyncInput<
|
|
117
115
|
TAccountTreeAuthority extends string = string,
|
|
118
116
|
TAccountTreeCreator extends string = string,
|
|
119
117
|
TAccountNewTreeDelegate extends string = string,
|
|
120
118
|
TAccountMerkleTree extends string = string,
|
|
121
119
|
TAccountSystemProgram extends string = string,
|
|
122
|
-
> {
|
|
120
|
+
> = {
|
|
121
|
+
/**
|
|
122
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
123
|
+
* as the tree's authority for CPIs into the compression program.
|
|
124
|
+
*/
|
|
123
125
|
treeAuthority?: Address<TAccountTreeAuthority>;
|
|
126
|
+
/**
|
|
127
|
+
* Creator of the tree, recorded in `TreeConfig` when the tree was
|
|
128
|
+
* created.
|
|
129
|
+
*/
|
|
124
130
|
treeCreator: TransactionSigner<TAccountTreeCreator>;
|
|
131
|
+
/** New delegate authority to set for the tree. */
|
|
125
132
|
newTreeDelegate: Address<TAccountNewTreeDelegate>;
|
|
133
|
+
/**
|
|
134
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
135
|
+
* owned by the account compression program.
|
|
136
|
+
*/
|
|
126
137
|
merkleTree: Address<TAccountMerkleTree>;
|
|
138
|
+
/** The Solana System program. */
|
|
127
139
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
128
|
-
}
|
|
140
|
+
};
|
|
129
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Sets a new delegate authority for a tree.
|
|
144
|
+
*
|
|
145
|
+
* Only the current tree creator may reassign the tree delegate, which
|
|
146
|
+
* is authorized to mint into the tree and manage it on the creator's
|
|
147
|
+
* behalf.
|
|
148
|
+
*/
|
|
130
149
|
export async function getSetTreeDelegateInstructionAsync<
|
|
131
150
|
TAccountTreeAuthority extends string,
|
|
132
151
|
TAccountTreeCreator extends string,
|
|
@@ -207,20 +226,41 @@ export async function getSetTreeDelegateInstructionAsync<
|
|
|
207
226
|
>);
|
|
208
227
|
}
|
|
209
228
|
|
|
210
|
-
export
|
|
229
|
+
export type SetTreeDelegateInput<
|
|
211
230
|
TAccountTreeAuthority extends string = string,
|
|
212
231
|
TAccountTreeCreator extends string = string,
|
|
213
232
|
TAccountNewTreeDelegate extends string = string,
|
|
214
233
|
TAccountMerkleTree extends string = string,
|
|
215
234
|
TAccountSystemProgram extends string = string,
|
|
216
|
-
> {
|
|
235
|
+
> = {
|
|
236
|
+
/**
|
|
237
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
238
|
+
* as the tree's authority for CPIs into the compression program.
|
|
239
|
+
*/
|
|
217
240
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
241
|
+
/**
|
|
242
|
+
* Creator of the tree, recorded in `TreeConfig` when the tree was
|
|
243
|
+
* created.
|
|
244
|
+
*/
|
|
218
245
|
treeCreator: TransactionSigner<TAccountTreeCreator>;
|
|
246
|
+
/** New delegate authority to set for the tree. */
|
|
219
247
|
newTreeDelegate: Address<TAccountNewTreeDelegate>;
|
|
248
|
+
/**
|
|
249
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
250
|
+
* owned by the account compression program.
|
|
251
|
+
*/
|
|
220
252
|
merkleTree: Address<TAccountMerkleTree>;
|
|
253
|
+
/** The Solana System program. */
|
|
221
254
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
222
|
-
}
|
|
255
|
+
};
|
|
223
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Sets a new delegate authority for a tree.
|
|
259
|
+
*
|
|
260
|
+
* Only the current tree creator may reassign the tree delegate, which
|
|
261
|
+
* is authorized to mint into the tree and manage it on the creator's
|
|
262
|
+
* behalf.
|
|
263
|
+
*/
|
|
224
264
|
export function getSetTreeDelegateInstruction<
|
|
225
265
|
TAccountTreeAuthority extends string,
|
|
226
266
|
TAccountTreeCreator extends string,
|
|
@@ -291,20 +331,34 @@ export function getSetTreeDelegateInstruction<
|
|
|
291
331
|
>);
|
|
292
332
|
}
|
|
293
333
|
|
|
294
|
-
export
|
|
334
|
+
export type ParsedSetTreeDelegateInstruction<
|
|
295
335
|
TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
|
|
296
336
|
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
297
|
-
> {
|
|
337
|
+
> = {
|
|
298
338
|
programAddress: Address<TProgram>;
|
|
299
339
|
accounts: {
|
|
340
|
+
/**
|
|
341
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
342
|
+
* as the tree's authority for CPIs into the compression program.
|
|
343
|
+
*/
|
|
300
344
|
treeAuthority: TAccountMetas[0];
|
|
345
|
+
/**
|
|
346
|
+
* Creator of the tree, recorded in `TreeConfig` when the tree was
|
|
347
|
+
* created.
|
|
348
|
+
*/
|
|
301
349
|
treeCreator: TAccountMetas[1];
|
|
350
|
+
/** New delegate authority to set for the tree. */
|
|
302
351
|
newTreeDelegate: TAccountMetas[2];
|
|
352
|
+
/**
|
|
353
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
354
|
+
* owned by the account compression program.
|
|
355
|
+
*/
|
|
303
356
|
merkleTree: TAccountMetas[3];
|
|
357
|
+
/** The Solana System program. */
|
|
304
358
|
systemProgram: TAccountMetas[4];
|
|
305
359
|
};
|
|
306
360
|
data: SetTreeDelegateInstructionData;
|
|
307
|
-
}
|
|
361
|
+
};
|
|
308
362
|
|
|
309
363
|
export function parseSetTreeDelegateInstruction<
|
|
310
364
|
TProgram extends string,
|