@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,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,
|
|
@@ -33,19 +16,34 @@ import {
|
|
|
33
16
|
getBytesEncoder,
|
|
34
17
|
getStructDecoder,
|
|
35
18
|
getStructEncoder,
|
|
36
|
-
getU8Decoder,
|
|
37
|
-
getU8Encoder,
|
|
38
19
|
getU32Decoder,
|
|
39
20
|
getU32Encoder,
|
|
40
21
|
getU64Decoder,
|
|
41
22
|
getU64Encoder,
|
|
23
|
+
getU8Decoder,
|
|
24
|
+
getU8Encoder,
|
|
42
25
|
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
43
26
|
SolanaError,
|
|
44
27
|
transformEncoder,
|
|
28
|
+
type AccountMeta,
|
|
29
|
+
type AccountSignerMeta,
|
|
30
|
+
type Address,
|
|
31
|
+
type FixedSizeCodec,
|
|
32
|
+
type FixedSizeDecoder,
|
|
33
|
+
type FixedSizeEncoder,
|
|
34
|
+
type Instruction,
|
|
35
|
+
type InstructionWithAccounts,
|
|
36
|
+
type InstructionWithData,
|
|
37
|
+
type ReadonlyAccount,
|
|
38
|
+
type ReadonlySignerAccount,
|
|
39
|
+
type ReadonlyUint8Array,
|
|
40
|
+
type TransactionSigner,
|
|
41
|
+
type WritableAccount,
|
|
45
42
|
} from "@solana/kit";
|
|
46
43
|
import {
|
|
47
44
|
getAccountMetaFactory,
|
|
48
45
|
getAddressFromResolvedInstructionAccount,
|
|
46
|
+
type ResolvedInstructionAccount,
|
|
49
47
|
} from "@solana/program-client-core";
|
|
50
48
|
import { findTreeConfigPda } from "../pdas/index.js";
|
|
51
49
|
import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
@@ -105,22 +103,64 @@ export type DelegateInstruction<
|
|
|
105
103
|
]
|
|
106
104
|
>;
|
|
107
105
|
|
|
108
|
-
export
|
|
106
|
+
export type DelegateInstructionData = {
|
|
109
107
|
discriminator: ReadonlyUint8Array;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Current Merkle root of the tree, used together with the Merkle proof
|
|
110
|
+
* (passed as remaining accounts) to verify the leaf being operated on.
|
|
111
|
+
*/
|
|
112
|
+
root: Array<number>;
|
|
113
|
+
/**
|
|
114
|
+
* Keccak256 hash of the leaf's metadata, used together with `root` to
|
|
115
|
+
* verify the leaf before it is modified.
|
|
116
|
+
*/
|
|
117
|
+
dataHash: Array<number>;
|
|
118
|
+
/**
|
|
119
|
+
* Keccak256 hash of the leaf's creators array, used together with
|
|
120
|
+
* `root` to verify the leaf before it is modified.
|
|
121
|
+
*/
|
|
122
|
+
creatorHash: Array<number>;
|
|
123
|
+
/**
|
|
124
|
+
* Tree-scoped nonce identifying the leaf, equal to the tree's
|
|
125
|
+
* `numMinted` at the time the leaf was minted. Combined with the tree
|
|
126
|
+
* address to derive the leaf's asset id.
|
|
127
|
+
*/
|
|
113
128
|
nonce: bigint;
|
|
129
|
+
/**
|
|
130
|
+
* Position of the leaf within the Merkle tree, used with the Merkle
|
|
131
|
+
* proof to locate and verify the leaf.
|
|
132
|
+
*/
|
|
114
133
|
index: number;
|
|
115
|
-
}
|
|
134
|
+
};
|
|
116
135
|
|
|
117
|
-
export
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
136
|
+
export type DelegateInstructionDataArgs = {
|
|
137
|
+
/**
|
|
138
|
+
* Current Merkle root of the tree, used together with the Merkle proof
|
|
139
|
+
* (passed as remaining accounts) to verify the leaf being operated on.
|
|
140
|
+
*/
|
|
141
|
+
root: Array<number>;
|
|
142
|
+
/**
|
|
143
|
+
* Keccak256 hash of the leaf's metadata, used together with `root` to
|
|
144
|
+
* verify the leaf before it is modified.
|
|
145
|
+
*/
|
|
146
|
+
dataHash: Array<number>;
|
|
147
|
+
/**
|
|
148
|
+
* Keccak256 hash of the leaf's creators array, used together with
|
|
149
|
+
* `root` to verify the leaf before it is modified.
|
|
150
|
+
*/
|
|
151
|
+
creatorHash: Array<number>;
|
|
152
|
+
/**
|
|
153
|
+
* Tree-scoped nonce identifying the leaf, equal to the tree's
|
|
154
|
+
* `numMinted` at the time the leaf was minted. Combined with the tree
|
|
155
|
+
* address to derive the leaf's asset id.
|
|
156
|
+
*/
|
|
121
157
|
nonce: number | bigint;
|
|
158
|
+
/**
|
|
159
|
+
* Position of the leaf within the Merkle tree, used with the Merkle
|
|
160
|
+
* proof to locate and verify the leaf.
|
|
161
|
+
*/
|
|
122
162
|
index: number;
|
|
123
|
-
}
|
|
163
|
+
};
|
|
124
164
|
|
|
125
165
|
export function getDelegateInstructionDataEncoder(): FixedSizeEncoder<DelegateInstructionDataArgs> {
|
|
126
166
|
return transformEncoder(
|
|
@@ -157,7 +197,7 @@ export function getDelegateInstructionDataCodec(): FixedSizeCodec<
|
|
|
157
197
|
);
|
|
158
198
|
}
|
|
159
199
|
|
|
160
|
-
export
|
|
200
|
+
export type DelegateAsyncInput<
|
|
161
201
|
TAccountTreeAuthority extends string = string,
|
|
162
202
|
TAccountLeafOwner extends string = string,
|
|
163
203
|
TAccountPreviousLeafDelegate extends string = string,
|
|
@@ -166,22 +206,51 @@ export interface DelegateAsyncInput<
|
|
|
166
206
|
TAccountLogWrapper extends string = string,
|
|
167
207
|
TAccountCompressionProgram extends string = string,
|
|
168
208
|
TAccountSystemProgram extends string = string,
|
|
169
|
-
> {
|
|
209
|
+
> = {
|
|
210
|
+
/**
|
|
211
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
212
|
+
* as the tree's authority for CPIs into the compression program.
|
|
213
|
+
*/
|
|
170
214
|
treeAuthority?: Address<TAccountTreeAuthority>;
|
|
215
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
171
216
|
leafOwner: TransactionSigner<TAccountLeafOwner>;
|
|
217
|
+
/** The leaf's delegate before this instruction runs. */
|
|
172
218
|
previousLeafDelegate: Address<TAccountPreviousLeafDelegate>;
|
|
219
|
+
/**
|
|
220
|
+
* Delegate to set on the leaf; pass the leaf owner to clear an
|
|
221
|
+
* existing delegate.
|
|
222
|
+
*/
|
|
173
223
|
newLeafDelegate: Address<TAccountNewLeafDelegate>;
|
|
224
|
+
/**
|
|
225
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
226
|
+
* owned by the account compression program.
|
|
227
|
+
*/
|
|
174
228
|
merkleTree: Address<TAccountMerkleTree>;
|
|
229
|
+
/**
|
|
230
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
231
|
+
* can reconstruct the tree.
|
|
232
|
+
*/
|
|
175
233
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
234
|
+
/**
|
|
235
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
236
|
+
* Merkle tree.
|
|
237
|
+
*/
|
|
176
238
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
239
|
+
/** The Solana System program. */
|
|
177
240
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
178
241
|
root: DelegateInstructionDataArgs["root"];
|
|
179
242
|
dataHash: DelegateInstructionDataArgs["dataHash"];
|
|
180
243
|
creatorHash: DelegateInstructionDataArgs["creatorHash"];
|
|
181
244
|
nonce: DelegateInstructionDataArgs["nonce"];
|
|
182
245
|
index: DelegateInstructionDataArgs["index"];
|
|
183
|
-
}
|
|
246
|
+
};
|
|
184
247
|
|
|
248
|
+
/**
|
|
249
|
+
* Sets (or clears) the delegate authority for a compressed NFT leaf.
|
|
250
|
+
*
|
|
251
|
+
* The delegate may transfer or burn the leaf on the owner's behalf.
|
|
252
|
+
* Pass the leaf owner as `newLeafDelegate` to clear an existing delegate.
|
|
253
|
+
*/
|
|
185
254
|
export async function getDelegateInstructionAsync<
|
|
186
255
|
TAccountTreeAuthority extends string,
|
|
187
256
|
TAccountLeafOwner extends string,
|
|
@@ -299,7 +368,7 @@ export async function getDelegateInstructionAsync<
|
|
|
299
368
|
>);
|
|
300
369
|
}
|
|
301
370
|
|
|
302
|
-
export
|
|
371
|
+
export type DelegateInput<
|
|
303
372
|
TAccountTreeAuthority extends string = string,
|
|
304
373
|
TAccountLeafOwner extends string = string,
|
|
305
374
|
TAccountPreviousLeafDelegate extends string = string,
|
|
@@ -308,22 +377,51 @@ export interface DelegateInput<
|
|
|
308
377
|
TAccountLogWrapper extends string = string,
|
|
309
378
|
TAccountCompressionProgram extends string = string,
|
|
310
379
|
TAccountSystemProgram extends string = string,
|
|
311
|
-
> {
|
|
380
|
+
> = {
|
|
381
|
+
/**
|
|
382
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
383
|
+
* as the tree's authority for CPIs into the compression program.
|
|
384
|
+
*/
|
|
312
385
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
386
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
313
387
|
leafOwner: TransactionSigner<TAccountLeafOwner>;
|
|
388
|
+
/** The leaf's delegate before this instruction runs. */
|
|
314
389
|
previousLeafDelegate: Address<TAccountPreviousLeafDelegate>;
|
|
390
|
+
/**
|
|
391
|
+
* Delegate to set on the leaf; pass the leaf owner to clear an
|
|
392
|
+
* existing delegate.
|
|
393
|
+
*/
|
|
315
394
|
newLeafDelegate: Address<TAccountNewLeafDelegate>;
|
|
395
|
+
/**
|
|
396
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
397
|
+
* owned by the account compression program.
|
|
398
|
+
*/
|
|
316
399
|
merkleTree: Address<TAccountMerkleTree>;
|
|
400
|
+
/**
|
|
401
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
402
|
+
* can reconstruct the tree.
|
|
403
|
+
*/
|
|
317
404
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
405
|
+
/**
|
|
406
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
407
|
+
* Merkle tree.
|
|
408
|
+
*/
|
|
318
409
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
410
|
+
/** The Solana System program. */
|
|
319
411
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
320
412
|
root: DelegateInstructionDataArgs["root"];
|
|
321
413
|
dataHash: DelegateInstructionDataArgs["dataHash"];
|
|
322
414
|
creatorHash: DelegateInstructionDataArgs["creatorHash"];
|
|
323
415
|
nonce: DelegateInstructionDataArgs["nonce"];
|
|
324
416
|
index: DelegateInstructionDataArgs["index"];
|
|
325
|
-
}
|
|
417
|
+
};
|
|
326
418
|
|
|
419
|
+
/**
|
|
420
|
+
* Sets (or clears) the delegate authority for a compressed NFT leaf.
|
|
421
|
+
*
|
|
422
|
+
* The delegate may transfer or burn the leaf on the owner's behalf.
|
|
423
|
+
* Pass the leaf owner as `newLeafDelegate` to clear an existing delegate.
|
|
424
|
+
*/
|
|
327
425
|
export function getDelegateInstruction<
|
|
328
426
|
TAccountTreeAuthority extends string,
|
|
329
427
|
TAccountLeafOwner extends string,
|
|
@@ -431,23 +529,46 @@ export function getDelegateInstruction<
|
|
|
431
529
|
>);
|
|
432
530
|
}
|
|
433
531
|
|
|
434
|
-
export
|
|
532
|
+
export type ParsedDelegateInstruction<
|
|
435
533
|
TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
|
|
436
534
|
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
437
|
-
> {
|
|
535
|
+
> = {
|
|
438
536
|
programAddress: Address<TProgram>;
|
|
439
537
|
accounts: {
|
|
538
|
+
/**
|
|
539
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
540
|
+
* as the tree's authority for CPIs into the compression program.
|
|
541
|
+
*/
|
|
440
542
|
treeAuthority: TAccountMetas[0];
|
|
543
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
441
544
|
leafOwner: TAccountMetas[1];
|
|
545
|
+
/** The leaf's delegate before this instruction runs. */
|
|
442
546
|
previousLeafDelegate: TAccountMetas[2];
|
|
547
|
+
/**
|
|
548
|
+
* Delegate to set on the leaf; pass the leaf owner to clear an
|
|
549
|
+
* existing delegate.
|
|
550
|
+
*/
|
|
443
551
|
newLeafDelegate: TAccountMetas[3];
|
|
552
|
+
/**
|
|
553
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
554
|
+
* owned by the account compression program.
|
|
555
|
+
*/
|
|
444
556
|
merkleTree: TAccountMetas[4];
|
|
557
|
+
/**
|
|
558
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
559
|
+
* can reconstruct the tree.
|
|
560
|
+
*/
|
|
445
561
|
logWrapper: TAccountMetas[5];
|
|
562
|
+
/**
|
|
563
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
564
|
+
* Merkle tree.
|
|
565
|
+
*/
|
|
446
566
|
compressionProgram: TAccountMetas[6];
|
|
567
|
+
/** The Solana System program. */
|
|
447
568
|
systemProgram: TAccountMetas[7];
|
|
448
569
|
};
|
|
449
570
|
data: DelegateInstructionData;
|
|
450
|
-
}
|
|
571
|
+
};
|
|
451
572
|
|
|
452
573
|
export function parseDelegateInstruction<
|
|
453
574
|
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";
|
|
@@ -116,28 +114,94 @@ export type DelegateAndFreezeV2Instruction<
|
|
|
116
114
|
]
|
|
117
115
|
>;
|
|
118
116
|
|
|
119
|
-
export
|
|
117
|
+
export type DelegateAndFreezeV2InstructionData = {
|
|
120
118
|
discriminator: ReadonlyUint8Array;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Current Merkle root of the tree, used together with the Merkle proof
|
|
121
|
+
* (passed as remaining accounts) to verify the leaf being operated on.
|
|
122
|
+
*/
|
|
123
|
+
root: Array<number>;
|
|
124
|
+
/**
|
|
125
|
+
* Keccak256 hash of the leaf's metadata, used together with `root` to
|
|
126
|
+
* verify the leaf before it is modified.
|
|
127
|
+
*/
|
|
128
|
+
dataHash: Array<number>;
|
|
129
|
+
/**
|
|
130
|
+
* Keccak256 hash of the leaf's creators array, used together with
|
|
131
|
+
* `root` to verify the leaf before it is modified.
|
|
132
|
+
*/
|
|
133
|
+
creatorHash: Array<number>;
|
|
134
|
+
/**
|
|
135
|
+
* Expected current `collectionHash` of the `LeafSchema` V2 leaf, if
|
|
136
|
+
* any, verified before this instruction updates the leaf.
|
|
137
|
+
*/
|
|
138
|
+
collectionHash: Option<Array<number>>;
|
|
139
|
+
/**
|
|
140
|
+
* Expected current `assetDataHash` of the `LeafSchema` V2 leaf, if any,
|
|
141
|
+
* carried through unchanged by this instruction.
|
|
142
|
+
*/
|
|
143
|
+
assetDataHash: Option<Array<number>>;
|
|
144
|
+
/**
|
|
145
|
+
* Expected current status flags (e.g. frozen, non-transferable) of the
|
|
146
|
+
* `LeafSchema` V2 leaf, verified before this instruction updates them.
|
|
147
|
+
*/
|
|
126
148
|
flags: Option<number>;
|
|
149
|
+
/**
|
|
150
|
+
* Tree-scoped nonce identifying the leaf, equal to the tree's
|
|
151
|
+
* `numMinted` at the time the leaf was minted. Combined with the tree
|
|
152
|
+
* address to derive the leaf's asset id.
|
|
153
|
+
*/
|
|
127
154
|
nonce: bigint;
|
|
155
|
+
/**
|
|
156
|
+
* Position of the leaf within the Merkle tree, used with the Merkle
|
|
157
|
+
* proof to locate and verify the leaf.
|
|
158
|
+
*/
|
|
128
159
|
index: number;
|
|
129
|
-
}
|
|
160
|
+
};
|
|
130
161
|
|
|
131
|
-
export
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
162
|
+
export type DelegateAndFreezeV2InstructionDataArgs = {
|
|
163
|
+
/**
|
|
164
|
+
* Current Merkle root of the tree, used together with the Merkle proof
|
|
165
|
+
* (passed as remaining accounts) to verify the leaf being operated on.
|
|
166
|
+
*/
|
|
167
|
+
root: Array<number>;
|
|
168
|
+
/**
|
|
169
|
+
* Keccak256 hash of the leaf's metadata, used together with `root` to
|
|
170
|
+
* verify the leaf before it is modified.
|
|
171
|
+
*/
|
|
172
|
+
dataHash: Array<number>;
|
|
173
|
+
/**
|
|
174
|
+
* Keccak256 hash of the leaf's creators array, used together with
|
|
175
|
+
* `root` to verify the leaf before it is modified.
|
|
176
|
+
*/
|
|
177
|
+
creatorHash: Array<number>;
|
|
178
|
+
/**
|
|
179
|
+
* Expected current `collectionHash` of the `LeafSchema` V2 leaf, if
|
|
180
|
+
* any, verified before this instruction updates the leaf.
|
|
181
|
+
*/
|
|
182
|
+
collectionHash: OptionOrNullable<Array<number>>;
|
|
183
|
+
/**
|
|
184
|
+
* Expected current `assetDataHash` of the `LeafSchema` V2 leaf, if any,
|
|
185
|
+
* carried through unchanged by this instruction.
|
|
186
|
+
*/
|
|
187
|
+
assetDataHash: OptionOrNullable<Array<number>>;
|
|
188
|
+
/**
|
|
189
|
+
* Expected current status flags (e.g. frozen, non-transferable) of the
|
|
190
|
+
* `LeafSchema` V2 leaf, verified before this instruction updates them.
|
|
191
|
+
*/
|
|
137
192
|
flags: OptionOrNullable<number>;
|
|
193
|
+
/**
|
|
194
|
+
* Tree-scoped nonce identifying the leaf, equal to the tree's
|
|
195
|
+
* `numMinted` at the time the leaf was minted. Combined with the tree
|
|
196
|
+
* address to derive the leaf's asset id.
|
|
197
|
+
*/
|
|
138
198
|
nonce: number | bigint;
|
|
199
|
+
/**
|
|
200
|
+
* Position of the leaf within the Merkle tree, used with the Merkle
|
|
201
|
+
* proof to locate and verify the leaf.
|
|
202
|
+
*/
|
|
139
203
|
index: number;
|
|
140
|
-
}
|
|
204
|
+
};
|
|
141
205
|
|
|
142
206
|
export function getDelegateAndFreezeV2InstructionDataEncoder(): Encoder<DelegateAndFreezeV2InstructionDataArgs> {
|
|
143
207
|
return transformEncoder(
|
|
@@ -195,7 +259,7 @@ export function getDelegateAndFreezeV2InstructionDataCodec(): Codec<
|
|
|
195
259
|
);
|
|
196
260
|
}
|
|
197
261
|
|
|
198
|
-
export
|
|
262
|
+
export type DelegateAndFreezeV2AsyncInput<
|
|
199
263
|
TAccountTreeAuthority extends string = string,
|
|
200
264
|
TAccountPayer extends string = string,
|
|
201
265
|
TAccountLeafOwner extends string = string,
|
|
@@ -205,17 +269,39 @@ export interface DelegateAndFreezeV2AsyncInput<
|
|
|
205
269
|
TAccountLogWrapper extends string = string,
|
|
206
270
|
TAccountCompressionProgram extends string = string,
|
|
207
271
|
TAccountSystemProgram extends string = string,
|
|
208
|
-
> {
|
|
272
|
+
> = {
|
|
273
|
+
/**
|
|
274
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
275
|
+
* as the tree's authority for CPIs into the compression program.
|
|
276
|
+
*/
|
|
209
277
|
treeAuthority?: Address<TAccountTreeAuthority>;
|
|
278
|
+
/** Account that pays for the transaction and any account rent. */
|
|
210
279
|
payer: TransactionSigner<TAccountPayer>;
|
|
211
|
-
/** Optional leaf owner, defaults to `payer
|
|
280
|
+
/** Optional leaf owner, defaults to `payer`. */
|
|
212
281
|
leafOwner?: TransactionSigner<TAccountLeafOwner>;
|
|
213
|
-
/** Defaults to `
|
|
282
|
+
/** Defaults to `leafOwner`. */
|
|
214
283
|
previousLeafDelegate?: Address<TAccountPreviousLeafDelegate>;
|
|
284
|
+
/**
|
|
285
|
+
* Delegate to set on the leaf; pass the leaf owner to clear an
|
|
286
|
+
* existing delegate.
|
|
287
|
+
*/
|
|
215
288
|
newLeafDelegate: Address<TAccountNewLeafDelegate>;
|
|
289
|
+
/**
|
|
290
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
291
|
+
* owned by the account compression program.
|
|
292
|
+
*/
|
|
216
293
|
merkleTree: Address<TAccountMerkleTree>;
|
|
294
|
+
/**
|
|
295
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
296
|
+
* can reconstruct the tree.
|
|
297
|
+
*/
|
|
217
298
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
299
|
+
/**
|
|
300
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
301
|
+
* Merkle tree.
|
|
302
|
+
*/
|
|
218
303
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
304
|
+
/** The Solana System program. */
|
|
219
305
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
220
306
|
root: DelegateAndFreezeV2InstructionDataArgs["root"];
|
|
221
307
|
dataHash: DelegateAndFreezeV2InstructionDataArgs["dataHash"];
|
|
@@ -225,8 +311,13 @@ export interface DelegateAndFreezeV2AsyncInput<
|
|
|
225
311
|
flags: DelegateAndFreezeV2InstructionDataArgs["flags"];
|
|
226
312
|
nonce: DelegateAndFreezeV2InstructionDataArgs["nonce"];
|
|
227
313
|
index: DelegateAndFreezeV2InstructionDataArgs["index"];
|
|
228
|
-
}
|
|
314
|
+
};
|
|
229
315
|
|
|
316
|
+
/**
|
|
317
|
+
* Delegates and freezes a `LeafSchema` V2 leaf node in a single
|
|
318
|
+
* instruction, preventing it from being transferred or burned while
|
|
319
|
+
* frozen.
|
|
320
|
+
*/
|
|
230
321
|
export async function getDelegateAndFreezeV2InstructionAsync<
|
|
231
322
|
TAccountTreeAuthority extends string,
|
|
232
323
|
TAccountPayer extends string,
|
|
@@ -350,7 +441,7 @@ export async function getDelegateAndFreezeV2InstructionAsync<
|
|
|
350
441
|
>);
|
|
351
442
|
}
|
|
352
443
|
|
|
353
|
-
export
|
|
444
|
+
export type DelegateAndFreezeV2Input<
|
|
354
445
|
TAccountTreeAuthority extends string = string,
|
|
355
446
|
TAccountPayer extends string = string,
|
|
356
447
|
TAccountLeafOwner extends string = string,
|
|
@@ -360,17 +451,39 @@ export interface DelegateAndFreezeV2Input<
|
|
|
360
451
|
TAccountLogWrapper extends string = string,
|
|
361
452
|
TAccountCompressionProgram extends string = string,
|
|
362
453
|
TAccountSystemProgram extends string = string,
|
|
363
|
-
> {
|
|
454
|
+
> = {
|
|
455
|
+
/**
|
|
456
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
457
|
+
* as the tree's authority for CPIs into the compression program.
|
|
458
|
+
*/
|
|
364
459
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
460
|
+
/** Account that pays for the transaction and any account rent. */
|
|
365
461
|
payer: TransactionSigner<TAccountPayer>;
|
|
366
|
-
/** Optional leaf owner, defaults to `payer
|
|
462
|
+
/** Optional leaf owner, defaults to `payer`. */
|
|
367
463
|
leafOwner?: TransactionSigner<TAccountLeafOwner>;
|
|
368
|
-
/** Defaults to `
|
|
464
|
+
/** Defaults to `leafOwner`. */
|
|
369
465
|
previousLeafDelegate?: Address<TAccountPreviousLeafDelegate>;
|
|
466
|
+
/**
|
|
467
|
+
* Delegate to set on the leaf; pass the leaf owner to clear an
|
|
468
|
+
* existing delegate.
|
|
469
|
+
*/
|
|
370
470
|
newLeafDelegate: Address<TAccountNewLeafDelegate>;
|
|
471
|
+
/**
|
|
472
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
473
|
+
* owned by the account compression program.
|
|
474
|
+
*/
|
|
371
475
|
merkleTree: Address<TAccountMerkleTree>;
|
|
476
|
+
/**
|
|
477
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
478
|
+
* can reconstruct the tree.
|
|
479
|
+
*/
|
|
372
480
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
481
|
+
/**
|
|
482
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
483
|
+
* Merkle tree.
|
|
484
|
+
*/
|
|
373
485
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
486
|
+
/** The Solana System program. */
|
|
374
487
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
375
488
|
root: DelegateAndFreezeV2InstructionDataArgs["root"];
|
|
376
489
|
dataHash: DelegateAndFreezeV2InstructionDataArgs["dataHash"];
|
|
@@ -380,8 +493,13 @@ export interface DelegateAndFreezeV2Input<
|
|
|
380
493
|
flags: DelegateAndFreezeV2InstructionDataArgs["flags"];
|
|
381
494
|
nonce: DelegateAndFreezeV2InstructionDataArgs["nonce"];
|
|
382
495
|
index: DelegateAndFreezeV2InstructionDataArgs["index"];
|
|
383
|
-
}
|
|
496
|
+
};
|
|
384
497
|
|
|
498
|
+
/**
|
|
499
|
+
* Delegates and freezes a `LeafSchema` V2 leaf node in a single
|
|
500
|
+
* instruction, preventing it from being transferred or burned while
|
|
501
|
+
* frozen.
|
|
502
|
+
*/
|
|
385
503
|
export function getDelegateAndFreezeV2Instruction<
|
|
386
504
|
TAccountTreeAuthority extends string,
|
|
387
505
|
TAccountPayer extends string,
|
|
@@ -495,26 +613,48 @@ export function getDelegateAndFreezeV2Instruction<
|
|
|
495
613
|
>);
|
|
496
614
|
}
|
|
497
615
|
|
|
498
|
-
export
|
|
616
|
+
export type ParsedDelegateAndFreezeV2Instruction<
|
|
499
617
|
TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
|
|
500
618
|
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
501
|
-
> {
|
|
619
|
+
> = {
|
|
502
620
|
programAddress: Address<TProgram>;
|
|
503
621
|
accounts: {
|
|
622
|
+
/**
|
|
623
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
624
|
+
* as the tree's authority for CPIs into the compression program.
|
|
625
|
+
*/
|
|
504
626
|
treeAuthority: TAccountMetas[0];
|
|
627
|
+
/** Account that pays for the transaction and any account rent. */
|
|
505
628
|
payer: TAccountMetas[1];
|
|
506
|
-
/** Optional leaf owner, defaults to `payer
|
|
629
|
+
/** Optional leaf owner, defaults to `payer`. */
|
|
507
630
|
leafOwner?: TAccountMetas[2] | undefined;
|
|
508
|
-
/** Defaults to `
|
|
631
|
+
/** Defaults to `leafOwner`. */
|
|
509
632
|
previousLeafDelegate?: TAccountMetas[3] | undefined;
|
|
633
|
+
/**
|
|
634
|
+
* Delegate to set on the leaf; pass the leaf owner to clear an
|
|
635
|
+
* existing delegate.
|
|
636
|
+
*/
|
|
510
637
|
newLeafDelegate: TAccountMetas[4];
|
|
638
|
+
/**
|
|
639
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
640
|
+
* owned by the account compression program.
|
|
641
|
+
*/
|
|
511
642
|
merkleTree: TAccountMetas[5];
|
|
643
|
+
/**
|
|
644
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
645
|
+
* can reconstruct the tree.
|
|
646
|
+
*/
|
|
512
647
|
logWrapper: TAccountMetas[6];
|
|
648
|
+
/**
|
|
649
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
650
|
+
* Merkle tree.
|
|
651
|
+
*/
|
|
513
652
|
compressionProgram: TAccountMetas[7];
|
|
653
|
+
/** The Solana System program. */
|
|
514
654
|
systemProgram: TAccountMetas[8];
|
|
515
655
|
};
|
|
516
656
|
data: DelegateAndFreezeV2InstructionData;
|
|
517
|
-
}
|
|
657
|
+
};
|
|
518
658
|
|
|
519
659
|
export function parseDelegateAndFreezeV2Instruction<
|
|
520
660
|
TProgram extends string,
|