@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,24 +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
|
-
ReadonlyAccount,
|
|
20
|
-
ReadonlySignerAccount,
|
|
21
|
-
ReadonlyUint8Array,
|
|
22
|
-
TransactionSigner,
|
|
23
|
-
WritableAccount,
|
|
24
|
-
} from "@solana/kit";
|
|
25
|
-
import type { ResolvedInstructionAccount } from "@solana/program-client-core";
|
|
26
|
-
import type { MetadataArgs, MetadataArgsArgs } from "../types/index.js";
|
|
27
9
|
import {
|
|
28
10
|
address,
|
|
29
11
|
combineCodec,
|
|
@@ -36,10 +18,25 @@ import {
|
|
|
36
18
|
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
37
19
|
SolanaError,
|
|
38
20
|
transformEncoder,
|
|
21
|
+
type AccountMeta,
|
|
22
|
+
type AccountSignerMeta,
|
|
23
|
+
type Address,
|
|
24
|
+
type Codec,
|
|
25
|
+
type Decoder,
|
|
26
|
+
type Encoder,
|
|
27
|
+
type Instruction,
|
|
28
|
+
type InstructionWithAccounts,
|
|
29
|
+
type InstructionWithData,
|
|
30
|
+
type ReadonlyAccount,
|
|
31
|
+
type ReadonlySignerAccount,
|
|
32
|
+
type ReadonlyUint8Array,
|
|
33
|
+
type TransactionSigner,
|
|
34
|
+
type WritableAccount,
|
|
39
35
|
} from "@solana/kit";
|
|
40
36
|
import {
|
|
41
37
|
getAccountMetaFactory,
|
|
42
38
|
getAddressFromResolvedInstructionAccount,
|
|
39
|
+
type ResolvedInstructionAccount,
|
|
43
40
|
} from "@solana/program-client-core";
|
|
44
41
|
import {
|
|
45
42
|
findBubblegumSignerPda,
|
|
@@ -51,6 +48,8 @@ import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
|
51
48
|
import {
|
|
52
49
|
getMetadataArgsDecoder,
|
|
53
50
|
getMetadataArgsEncoder,
|
|
51
|
+
type MetadataArgs,
|
|
52
|
+
type MetadataArgsArgs,
|
|
54
53
|
} from "../types/index.js";
|
|
55
54
|
|
|
56
55
|
export const MINT_TO_COLLECTION_V1_DISCRIMINATOR: ReadonlyUint8Array =
|
|
@@ -145,14 +144,22 @@ export type MintToCollectionV1Instruction<
|
|
|
145
144
|
]
|
|
146
145
|
>;
|
|
147
146
|
|
|
148
|
-
export
|
|
147
|
+
export type MintToCollectionV1InstructionData = {
|
|
149
148
|
discriminator: ReadonlyUint8Array;
|
|
149
|
+
/**
|
|
150
|
+
* Metadata for the newly minted compressed NFT, which will be added to
|
|
151
|
+
* the collection identified by `collectionMint`.
|
|
152
|
+
*/
|
|
150
153
|
metadataArgs: MetadataArgs;
|
|
151
|
-
}
|
|
154
|
+
};
|
|
152
155
|
|
|
153
|
-
export
|
|
156
|
+
export type MintToCollectionV1InstructionDataArgs = {
|
|
157
|
+
/**
|
|
158
|
+
* Metadata for the newly minted compressed NFT, which will be added to
|
|
159
|
+
* the collection identified by `collectionMint`.
|
|
160
|
+
*/
|
|
154
161
|
metadataArgs: MetadataArgsArgs;
|
|
155
|
-
}
|
|
162
|
+
};
|
|
156
163
|
|
|
157
164
|
export function getMintToCollectionV1InstructionDataEncoder(): Encoder<MintToCollectionV1InstructionDataArgs> {
|
|
158
165
|
return transformEncoder(
|
|
@@ -184,7 +191,7 @@ export function getMintToCollectionV1InstructionDataCodec(): Codec<
|
|
|
184
191
|
);
|
|
185
192
|
}
|
|
186
193
|
|
|
187
|
-
export
|
|
194
|
+
export type MintToCollectionV1AsyncInput<
|
|
188
195
|
TAccountTreeAuthority extends string = string,
|
|
189
196
|
TAccountLeafOwner extends string = string,
|
|
190
197
|
TAccountLeafDelegate extends string = string,
|
|
@@ -201,30 +208,80 @@ export interface MintToCollectionV1AsyncInput<
|
|
|
201
208
|
TAccountCompressionProgram extends string = string,
|
|
202
209
|
TAccountTokenMetadataProgram extends string = string,
|
|
203
210
|
TAccountSystemProgram extends string = string,
|
|
204
|
-
> {
|
|
211
|
+
> = {
|
|
212
|
+
/**
|
|
213
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
214
|
+
* as the tree's authority for CPIs into the compression program.
|
|
215
|
+
*/
|
|
205
216
|
treeAuthority?: Address<TAccountTreeAuthority>;
|
|
217
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
206
218
|
leafOwner: Address<TAccountLeafOwner>;
|
|
219
|
+
/**
|
|
220
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
221
|
+
* delegate is set.
|
|
222
|
+
*/
|
|
207
223
|
leafDelegate: Address<TAccountLeafDelegate>;
|
|
224
|
+
/**
|
|
225
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
226
|
+
* owned by the account compression program.
|
|
227
|
+
*/
|
|
208
228
|
merkleTree: Address<TAccountMerkleTree>;
|
|
229
|
+
/** Account that pays for the transaction and any account rent. */
|
|
209
230
|
payer: TransactionSigner<TAccountPayer>;
|
|
231
|
+
/**
|
|
232
|
+
* Delegate authority of the tree, authorized to mint into and manage
|
|
233
|
+
* the tree on the creator's behalf.
|
|
234
|
+
*/
|
|
210
235
|
treeDelegate: TransactionSigner<TAccountTreeDelegate>;
|
|
236
|
+
/**
|
|
237
|
+
* Authority of the collection the asset is being added to or removed
|
|
238
|
+
* from (typically the collection's update authority or a delegate).
|
|
239
|
+
*/
|
|
211
240
|
collectionAuthority: TransactionSigner<TAccountCollectionAuthority>;
|
|
212
241
|
/**
|
|
213
|
-
* If there is no
|
|
214
|
-
*
|
|
242
|
+
* If there is no collection authority record PDA, pass the Bubblegum
|
|
243
|
+
* program address instead.
|
|
215
244
|
*/
|
|
216
245
|
collectionAuthorityRecordPda?: Address<TAccountCollectionAuthorityRecordPda>;
|
|
246
|
+
/** Mint account of the Token Metadata collection NFT. */
|
|
217
247
|
collectionMint: Address<TAccountCollectionMint>;
|
|
248
|
+
/** Metadata account of the Token Metadata collection NFT. */
|
|
218
249
|
collectionMetadata?: Address<TAccountCollectionMetadata>;
|
|
250
|
+
/** Master edition account of the Token Metadata collection NFT. */
|
|
219
251
|
editionAccount?: Address<TAccountEditionAccount>;
|
|
252
|
+
/**
|
|
253
|
+
* PDA Bubblegum uses to sign the CPI into the Token Metadata program
|
|
254
|
+
* that (un)verifies the collection.
|
|
255
|
+
*/
|
|
220
256
|
bubblegumSigner?: Address<TAccountBubblegumSigner>;
|
|
257
|
+
/**
|
|
258
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
259
|
+
* can reconstruct the tree.
|
|
260
|
+
*/
|
|
221
261
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
262
|
+
/**
|
|
263
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
264
|
+
* Merkle tree.
|
|
265
|
+
*/
|
|
222
266
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
267
|
+
/**
|
|
268
|
+
* The Token Metadata program, invoked to read or (un)verify the
|
|
269
|
+
* legacy collection accounts.
|
|
270
|
+
*/
|
|
223
271
|
tokenMetadataProgram?: Address<TAccountTokenMetadataProgram>;
|
|
272
|
+
/** The Solana System program. */
|
|
224
273
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
225
274
|
metadataArgs: MintToCollectionV1InstructionDataArgs["metadataArgs"];
|
|
226
|
-
}
|
|
275
|
+
};
|
|
227
276
|
|
|
277
|
+
/**
|
|
278
|
+
* Mints a new compressed NFT (V1) leaf and adds it to a verified Token
|
|
279
|
+
* Metadata collection in the same instruction.
|
|
280
|
+
*
|
|
281
|
+
* Behaves like `mintV1`, but also CPIs into the Token Metadata program
|
|
282
|
+
* (via the `bubblegumSigner` PDA) to mark the collection as verified on
|
|
283
|
+
* the resulting leaf's metadata.
|
|
284
|
+
*/
|
|
228
285
|
export async function getMintToCollectionV1InstructionAsync<
|
|
229
286
|
TAccountTreeAuthority extends string,
|
|
230
287
|
TAccountLeafOwner extends string,
|
|
@@ -431,7 +488,7 @@ export async function getMintToCollectionV1InstructionAsync<
|
|
|
431
488
|
>);
|
|
432
489
|
}
|
|
433
490
|
|
|
434
|
-
export
|
|
491
|
+
export type MintToCollectionV1Input<
|
|
435
492
|
TAccountTreeAuthority extends string = string,
|
|
436
493
|
TAccountLeafOwner extends string = string,
|
|
437
494
|
TAccountLeafDelegate extends string = string,
|
|
@@ -448,30 +505,80 @@ export interface MintToCollectionV1Input<
|
|
|
448
505
|
TAccountCompressionProgram extends string = string,
|
|
449
506
|
TAccountTokenMetadataProgram extends string = string,
|
|
450
507
|
TAccountSystemProgram extends string = string,
|
|
451
|
-
> {
|
|
508
|
+
> = {
|
|
509
|
+
/**
|
|
510
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
511
|
+
* as the tree's authority for CPIs into the compression program.
|
|
512
|
+
*/
|
|
452
513
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
514
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
453
515
|
leafOwner: Address<TAccountLeafOwner>;
|
|
516
|
+
/**
|
|
517
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
518
|
+
* delegate is set.
|
|
519
|
+
*/
|
|
454
520
|
leafDelegate: Address<TAccountLeafDelegate>;
|
|
521
|
+
/**
|
|
522
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
523
|
+
* owned by the account compression program.
|
|
524
|
+
*/
|
|
455
525
|
merkleTree: Address<TAccountMerkleTree>;
|
|
526
|
+
/** Account that pays for the transaction and any account rent. */
|
|
456
527
|
payer: TransactionSigner<TAccountPayer>;
|
|
528
|
+
/**
|
|
529
|
+
* Delegate authority of the tree, authorized to mint into and manage
|
|
530
|
+
* the tree on the creator's behalf.
|
|
531
|
+
*/
|
|
457
532
|
treeDelegate: TransactionSigner<TAccountTreeDelegate>;
|
|
533
|
+
/**
|
|
534
|
+
* Authority of the collection the asset is being added to or removed
|
|
535
|
+
* from (typically the collection's update authority or a delegate).
|
|
536
|
+
*/
|
|
458
537
|
collectionAuthority: TransactionSigner<TAccountCollectionAuthority>;
|
|
459
538
|
/**
|
|
460
|
-
* If there is no
|
|
461
|
-
*
|
|
539
|
+
* If there is no collection authority record PDA, pass the Bubblegum
|
|
540
|
+
* program address instead.
|
|
462
541
|
*/
|
|
463
542
|
collectionAuthorityRecordPda?: Address<TAccountCollectionAuthorityRecordPda>;
|
|
543
|
+
/** Mint account of the Token Metadata collection NFT. */
|
|
464
544
|
collectionMint: Address<TAccountCollectionMint>;
|
|
545
|
+
/** Metadata account of the Token Metadata collection NFT. */
|
|
465
546
|
collectionMetadata: Address<TAccountCollectionMetadata>;
|
|
547
|
+
/** Master edition account of the Token Metadata collection NFT. */
|
|
466
548
|
editionAccount: Address<TAccountEditionAccount>;
|
|
549
|
+
/**
|
|
550
|
+
* PDA Bubblegum uses to sign the CPI into the Token Metadata program
|
|
551
|
+
* that (un)verifies the collection.
|
|
552
|
+
*/
|
|
467
553
|
bubblegumSigner: Address<TAccountBubblegumSigner>;
|
|
554
|
+
/**
|
|
555
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
556
|
+
* can reconstruct the tree.
|
|
557
|
+
*/
|
|
468
558
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
559
|
+
/**
|
|
560
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
561
|
+
* Merkle tree.
|
|
562
|
+
*/
|
|
469
563
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
564
|
+
/**
|
|
565
|
+
* The Token Metadata program, invoked to read or (un)verify the
|
|
566
|
+
* legacy collection accounts.
|
|
567
|
+
*/
|
|
470
568
|
tokenMetadataProgram?: Address<TAccountTokenMetadataProgram>;
|
|
569
|
+
/** The Solana System program. */
|
|
471
570
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
472
571
|
metadataArgs: MintToCollectionV1InstructionDataArgs["metadataArgs"];
|
|
473
|
-
}
|
|
572
|
+
};
|
|
474
573
|
|
|
574
|
+
/**
|
|
575
|
+
* Mints a new compressed NFT (V1) leaf and adds it to a verified Token
|
|
576
|
+
* Metadata collection in the same instruction.
|
|
577
|
+
*
|
|
578
|
+
* Behaves like `mintV1`, but also CPIs into the Token Metadata program
|
|
579
|
+
* (via the `bubblegumSigner` PDA) to mark the collection as verified on
|
|
580
|
+
* the resulting leaf's metadata.
|
|
581
|
+
*/
|
|
475
582
|
export function getMintToCollectionV1Instruction<
|
|
476
583
|
TAccountTreeAuthority extends string,
|
|
477
584
|
TAccountLeafOwner extends string,
|
|
@@ -647,35 +754,77 @@ export function getMintToCollectionV1Instruction<
|
|
|
647
754
|
>);
|
|
648
755
|
}
|
|
649
756
|
|
|
650
|
-
export
|
|
757
|
+
export type ParsedMintToCollectionV1Instruction<
|
|
651
758
|
TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
|
|
652
759
|
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
653
|
-
> {
|
|
760
|
+
> = {
|
|
654
761
|
programAddress: Address<TProgram>;
|
|
655
762
|
accounts: {
|
|
763
|
+
/**
|
|
764
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
765
|
+
* as the tree's authority for CPIs into the compression program.
|
|
766
|
+
*/
|
|
656
767
|
treeAuthority: TAccountMetas[0];
|
|
768
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
657
769
|
leafOwner: TAccountMetas[1];
|
|
770
|
+
/**
|
|
771
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
772
|
+
* delegate is set.
|
|
773
|
+
*/
|
|
658
774
|
leafDelegate: TAccountMetas[2];
|
|
775
|
+
/**
|
|
776
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
777
|
+
* owned by the account compression program.
|
|
778
|
+
*/
|
|
659
779
|
merkleTree: TAccountMetas[3];
|
|
780
|
+
/** Account that pays for the transaction and any account rent. */
|
|
660
781
|
payer: TAccountMetas[4];
|
|
782
|
+
/**
|
|
783
|
+
* Delegate authority of the tree, authorized to mint into and manage
|
|
784
|
+
* the tree on the creator's behalf.
|
|
785
|
+
*/
|
|
661
786
|
treeDelegate: TAccountMetas[5];
|
|
787
|
+
/**
|
|
788
|
+
* Authority of the collection the asset is being added to or removed
|
|
789
|
+
* from (typically the collection's update authority or a delegate).
|
|
790
|
+
*/
|
|
662
791
|
collectionAuthority: TAccountMetas[6];
|
|
663
792
|
/**
|
|
664
|
-
* If there is no
|
|
665
|
-
*
|
|
793
|
+
* If there is no collection authority record PDA, pass the Bubblegum
|
|
794
|
+
* program address instead.
|
|
666
795
|
*/
|
|
667
796
|
collectionAuthorityRecordPda: TAccountMetas[7];
|
|
797
|
+
/** Mint account of the Token Metadata collection NFT. */
|
|
668
798
|
collectionMint: TAccountMetas[8];
|
|
799
|
+
/** Metadata account of the Token Metadata collection NFT. */
|
|
669
800
|
collectionMetadata: TAccountMetas[9];
|
|
801
|
+
/** Master edition account of the Token Metadata collection NFT. */
|
|
670
802
|
editionAccount: TAccountMetas[10];
|
|
803
|
+
/**
|
|
804
|
+
* PDA Bubblegum uses to sign the CPI into the Token Metadata program
|
|
805
|
+
* that (un)verifies the collection.
|
|
806
|
+
*/
|
|
671
807
|
bubblegumSigner: TAccountMetas[11];
|
|
808
|
+
/**
|
|
809
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
810
|
+
* can reconstruct the tree.
|
|
811
|
+
*/
|
|
672
812
|
logWrapper: TAccountMetas[12];
|
|
813
|
+
/**
|
|
814
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
815
|
+
* Merkle tree.
|
|
816
|
+
*/
|
|
673
817
|
compressionProgram: TAccountMetas[13];
|
|
818
|
+
/**
|
|
819
|
+
* The Token Metadata program, invoked to read or (un)verify the
|
|
820
|
+
* legacy collection accounts.
|
|
821
|
+
*/
|
|
674
822
|
tokenMetadataProgram: TAccountMetas[14];
|
|
823
|
+
/** The Solana System program. */
|
|
675
824
|
systemProgram: TAccountMetas[15];
|
|
676
825
|
};
|
|
677
826
|
data: MintToCollectionV1InstructionData;
|
|
678
|
-
}
|
|
827
|
+
};
|
|
679
828
|
|
|
680
829
|
export function parseMintToCollectionV1Instruction<
|
|
681
830
|
TProgram extends string,
|
|
@@ -6,24 +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
|
-
ReadonlyAccount,
|
|
20
|
-
ReadonlySignerAccount,
|
|
21
|
-
ReadonlyUint8Array,
|
|
22
|
-
TransactionSigner,
|
|
23
|
-
WritableAccount,
|
|
24
|
-
} from "@solana/kit";
|
|
25
|
-
import type { ResolvedInstructionAccount } from "@solana/program-client-core";
|
|
26
|
-
import type { MetadataArgs, MetadataArgsArgs } from "../types/index.js";
|
|
27
9
|
import {
|
|
28
10
|
combineCodec,
|
|
29
11
|
fixDecoderSize,
|
|
@@ -35,16 +17,33 @@ import {
|
|
|
35
17
|
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
36
18
|
SolanaError,
|
|
37
19
|
transformEncoder,
|
|
20
|
+
type AccountMeta,
|
|
21
|
+
type AccountSignerMeta,
|
|
22
|
+
type Address,
|
|
23
|
+
type Codec,
|
|
24
|
+
type Decoder,
|
|
25
|
+
type Encoder,
|
|
26
|
+
type Instruction,
|
|
27
|
+
type InstructionWithAccounts,
|
|
28
|
+
type InstructionWithData,
|
|
29
|
+
type ReadonlyAccount,
|
|
30
|
+
type ReadonlySignerAccount,
|
|
31
|
+
type ReadonlyUint8Array,
|
|
32
|
+
type TransactionSigner,
|
|
33
|
+
type WritableAccount,
|
|
38
34
|
} from "@solana/kit";
|
|
39
35
|
import {
|
|
40
36
|
getAccountMetaFactory,
|
|
41
37
|
getAddressFromResolvedInstructionAccount,
|
|
38
|
+
type ResolvedInstructionAccount,
|
|
42
39
|
} from "@solana/program-client-core";
|
|
43
40
|
import { findTreeConfigPda } from "../pdas/index.js";
|
|
44
41
|
import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
45
42
|
import {
|
|
46
43
|
getMetadataArgsDecoder,
|
|
47
44
|
getMetadataArgsEncoder,
|
|
45
|
+
type MetadataArgs,
|
|
46
|
+
type MetadataArgsArgs,
|
|
48
47
|
} from "../types/index.js";
|
|
49
48
|
|
|
50
49
|
export const MINT_V1_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([
|
|
@@ -107,14 +106,16 @@ export type MintV1Instruction<
|
|
|
107
106
|
]
|
|
108
107
|
>;
|
|
109
108
|
|
|
110
|
-
export
|
|
109
|
+
export type MintV1InstructionData = {
|
|
111
110
|
discriminator: ReadonlyUint8Array;
|
|
111
|
+
/** Metadata for the newly minted compressed NFT. */
|
|
112
112
|
message: MetadataArgs;
|
|
113
|
-
}
|
|
113
|
+
};
|
|
114
114
|
|
|
115
|
-
export
|
|
115
|
+
export type MintV1InstructionDataArgs = {
|
|
116
|
+
/** Metadata for the newly minted compressed NFT. */
|
|
116
117
|
message: MetadataArgsArgs;
|
|
117
|
-
}
|
|
118
|
+
};
|
|
118
119
|
|
|
119
120
|
export function getMintV1InstructionDataEncoder(): Encoder<MintV1InstructionDataArgs> {
|
|
120
121
|
return transformEncoder(
|
|
@@ -143,7 +144,7 @@ export function getMintV1InstructionDataCodec(): Codec<
|
|
|
143
144
|
);
|
|
144
145
|
}
|
|
145
146
|
|
|
146
|
-
export
|
|
147
|
+
export type MintV1AsyncInput<
|
|
147
148
|
TAccountTreeAuthority extends string = string,
|
|
148
149
|
TAccountLeafOwner extends string = string,
|
|
149
150
|
TAccountLeafDelegate extends string = string,
|
|
@@ -153,19 +154,53 @@ export interface MintV1AsyncInput<
|
|
|
153
154
|
TAccountLogWrapper extends string = string,
|
|
154
155
|
TAccountCompressionProgram extends string = string,
|
|
155
156
|
TAccountSystemProgram extends string = string,
|
|
156
|
-
> {
|
|
157
|
+
> = {
|
|
158
|
+
/**
|
|
159
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
160
|
+
* as the tree's authority for CPIs into the compression program.
|
|
161
|
+
*/
|
|
157
162
|
treeAuthority?: Address<TAccountTreeAuthority>;
|
|
163
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
158
164
|
leafOwner: Address<TAccountLeafOwner>;
|
|
165
|
+
/**
|
|
166
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
167
|
+
* delegate is set.
|
|
168
|
+
*/
|
|
159
169
|
leafDelegate: Address<TAccountLeafDelegate>;
|
|
170
|
+
/**
|
|
171
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
172
|
+
* owned by the account compression program.
|
|
173
|
+
*/
|
|
160
174
|
merkleTree: Address<TAccountMerkleTree>;
|
|
175
|
+
/** Account that pays for the transaction and any account rent. */
|
|
161
176
|
payer: TransactionSigner<TAccountPayer>;
|
|
177
|
+
/**
|
|
178
|
+
* Delegate authority of the tree, authorized to mint into and manage
|
|
179
|
+
* the tree on the creator's behalf.
|
|
180
|
+
*/
|
|
162
181
|
treeDelegate: TransactionSigner<TAccountTreeDelegate>;
|
|
182
|
+
/**
|
|
183
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
184
|
+
* can reconstruct the tree.
|
|
185
|
+
*/
|
|
163
186
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
187
|
+
/**
|
|
188
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
189
|
+
* Merkle tree.
|
|
190
|
+
*/
|
|
164
191
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
192
|
+
/** The Solana System program. */
|
|
165
193
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
166
194
|
message: MintV1InstructionDataArgs["message"];
|
|
167
|
-
}
|
|
195
|
+
};
|
|
168
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Mints a new compressed NFT (V1) leaf and appends it to the tree.
|
|
199
|
+
*
|
|
200
|
+
* The tree delegate (or, for public trees, any signer) supplies the
|
|
201
|
+
* leaf's `MetadataArgs`; Bubblegum hashes it, builds the `LeafSchema`,
|
|
202
|
+
* and appends the resulting leaf to the Merkle tree.
|
|
203
|
+
*/
|
|
169
204
|
export async function getMintV1InstructionAsync<
|
|
170
205
|
TAccountTreeAuthority extends string,
|
|
171
206
|
TAccountLeafOwner extends string,
|
|
@@ -283,7 +318,7 @@ export async function getMintV1InstructionAsync<
|
|
|
283
318
|
>);
|
|
284
319
|
}
|
|
285
320
|
|
|
286
|
-
export
|
|
321
|
+
export type MintV1Input<
|
|
287
322
|
TAccountTreeAuthority extends string = string,
|
|
288
323
|
TAccountLeafOwner extends string = string,
|
|
289
324
|
TAccountLeafDelegate extends string = string,
|
|
@@ -293,19 +328,53 @@ export interface MintV1Input<
|
|
|
293
328
|
TAccountLogWrapper extends string = string,
|
|
294
329
|
TAccountCompressionProgram extends string = string,
|
|
295
330
|
TAccountSystemProgram extends string = string,
|
|
296
|
-
> {
|
|
331
|
+
> = {
|
|
332
|
+
/**
|
|
333
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
334
|
+
* as the tree's authority for CPIs into the compression program.
|
|
335
|
+
*/
|
|
297
336
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
337
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
298
338
|
leafOwner: Address<TAccountLeafOwner>;
|
|
339
|
+
/**
|
|
340
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
341
|
+
* delegate is set.
|
|
342
|
+
*/
|
|
299
343
|
leafDelegate: Address<TAccountLeafDelegate>;
|
|
344
|
+
/**
|
|
345
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
346
|
+
* owned by the account compression program.
|
|
347
|
+
*/
|
|
300
348
|
merkleTree: Address<TAccountMerkleTree>;
|
|
349
|
+
/** Account that pays for the transaction and any account rent. */
|
|
301
350
|
payer: TransactionSigner<TAccountPayer>;
|
|
351
|
+
/**
|
|
352
|
+
* Delegate authority of the tree, authorized to mint into and manage
|
|
353
|
+
* the tree on the creator's behalf.
|
|
354
|
+
*/
|
|
302
355
|
treeDelegate: TransactionSigner<TAccountTreeDelegate>;
|
|
356
|
+
/**
|
|
357
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
358
|
+
* can reconstruct the tree.
|
|
359
|
+
*/
|
|
303
360
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
361
|
+
/**
|
|
362
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
363
|
+
* Merkle tree.
|
|
364
|
+
*/
|
|
304
365
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
366
|
+
/** The Solana System program. */
|
|
305
367
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
306
368
|
message: MintV1InstructionDataArgs["message"];
|
|
307
|
-
}
|
|
369
|
+
};
|
|
308
370
|
|
|
371
|
+
/**
|
|
372
|
+
* Mints a new compressed NFT (V1) leaf and appends it to the tree.
|
|
373
|
+
*
|
|
374
|
+
* The tree delegate (or, for public trees, any signer) supplies the
|
|
375
|
+
* leaf's `MetadataArgs`; Bubblegum hashes it, builds the `LeafSchema`,
|
|
376
|
+
* and appends the resulting leaf to the Merkle tree.
|
|
377
|
+
*/
|
|
309
378
|
export function getMintV1Instruction<
|
|
310
379
|
TAccountTreeAuthority extends string,
|
|
311
380
|
TAccountLeafOwner extends string,
|
|
@@ -413,24 +482,51 @@ export function getMintV1Instruction<
|
|
|
413
482
|
>);
|
|
414
483
|
}
|
|
415
484
|
|
|
416
|
-
export
|
|
485
|
+
export type ParsedMintV1Instruction<
|
|
417
486
|
TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
|
|
418
487
|
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
419
|
-
> {
|
|
488
|
+
> = {
|
|
420
489
|
programAddress: Address<TProgram>;
|
|
421
490
|
accounts: {
|
|
491
|
+
/**
|
|
492
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
493
|
+
* as the tree's authority for CPIs into the compression program.
|
|
494
|
+
*/
|
|
422
495
|
treeAuthority: TAccountMetas[0];
|
|
496
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
423
497
|
leafOwner: TAccountMetas[1];
|
|
498
|
+
/**
|
|
499
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
500
|
+
* delegate is set.
|
|
501
|
+
*/
|
|
424
502
|
leafDelegate: TAccountMetas[2];
|
|
503
|
+
/**
|
|
504
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
505
|
+
* owned by the account compression program.
|
|
506
|
+
*/
|
|
425
507
|
merkleTree: TAccountMetas[3];
|
|
508
|
+
/** Account that pays for the transaction and any account rent. */
|
|
426
509
|
payer: TAccountMetas[4];
|
|
510
|
+
/**
|
|
511
|
+
* Delegate authority of the tree, authorized to mint into and manage
|
|
512
|
+
* the tree on the creator's behalf.
|
|
513
|
+
*/
|
|
427
514
|
treeDelegate: TAccountMetas[5];
|
|
515
|
+
/**
|
|
516
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
517
|
+
* can reconstruct the tree.
|
|
518
|
+
*/
|
|
428
519
|
logWrapper: TAccountMetas[6];
|
|
520
|
+
/**
|
|
521
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
522
|
+
* Merkle tree.
|
|
523
|
+
*/
|
|
429
524
|
compressionProgram: TAccountMetas[7];
|
|
525
|
+
/** The Solana System program. */
|
|
430
526
|
systemProgram: TAccountMetas[8];
|
|
431
527
|
};
|
|
432
528
|
data: MintV1InstructionData;
|
|
433
|
-
}
|
|
529
|
+
};
|
|
434
530
|
|
|
435
531
|
export function parseMintV1Instruction<
|
|
436
532
|
TProgram extends string,
|