@macalinao/clients-mpl-bubblegum 0.3.0 → 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 +8 -12
- 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 +163 -44
- package/src/generated/instructions/burnV2.ts +205 -64
- package/src/generated/instructions/cancelRedeem.ts +122 -41
- package/src/generated/instructions/closeTreeV2.ts +102 -44
- package/src/generated/instructions/collectV2.ts +34 -23
- package/src/generated/instructions/compress.ts +146 -45
- package/src/generated/instructions/createTree.ts +143 -42
- package/src/generated/instructions/createTreeV2.ts +134 -45
- package/src/generated/instructions/decompressV1.ts +136 -49
- package/src/generated/instructions/delegate.ts +165 -47
- package/src/generated/instructions/delegateAndFreezeV2.ts +197 -60
- package/src/generated/instructions/delegateV2.ts +195 -60
- package/src/generated/instructions/freezeV2.ts +199 -58
- package/src/generated/instructions/mintToCollectionV1.ts +196 -52
- package/src/generated/instructions/mintV1.ts +133 -40
- package/src/generated/instructions/mintV2.ts +192 -57
- package/src/generated/instructions/redeem.ts +178 -47
- package/src/generated/instructions/setAndVerifyCollection.ts +246 -69
- package/src/generated/instructions/setCollectionV2.ts +212 -73
- package/src/generated/instructions/setDecompressableState.ts +59 -31
- package/src/generated/instructions/setDecompressibleState.ts +60 -31
- package/src/generated/instructions/setNonTransferableV2.ts +190 -61
- package/src/generated/instructions/setTreeDelegate.ts +84 -31
- package/src/generated/instructions/thawAndRevokeV2.ts +185 -57
- package/src/generated/instructions/thawV2.ts +191 -58
- package/src/generated/instructions/transfer.ts +162 -44
- package/src/generated/instructions/transferV2.ts +191 -61
- package/src/generated/instructions/unverifyCollection.ts +239 -69
- package/src/generated/instructions/unverifyCreator.ts +187 -48
- package/src/generated/instructions/unverifyCreatorV2.ts +170 -55
- package/src/generated/instructions/updateAssetDataV2.ts +206 -59
- package/src/generated/instructions/updateMetadata.ts +210 -67
- package/src/generated/instructions/updateMetadataV2.ts +189 -63
- package/src/generated/instructions/verifyCollection.ts +239 -69
- package/src/generated/instructions/verifyCreator.ts +187 -48
- package/src/generated/instructions/verifyCreatorV2.ts +170 -55
- 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 =
|
|
@@ -71,25 +70,20 @@ export type MintToCollectionV1Instruction<
|
|
|
71
70
|
TAccountPayer extends string | AccountMeta<string> = string,
|
|
72
71
|
TAccountTreeDelegate extends string | AccountMeta<string> = string,
|
|
73
72
|
TAccountCollectionAuthority extends string | AccountMeta<string> = string,
|
|
74
|
-
TAccountCollectionAuthorityRecordPda extends
|
|
75
|
-
|
|
76
|
-
| AccountMeta<string> = "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY",
|
|
73
|
+
TAccountCollectionAuthorityRecordPda extends string | AccountMeta<string> =
|
|
74
|
+
"BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY",
|
|
77
75
|
TAccountCollectionMint extends string | AccountMeta<string> = string,
|
|
78
76
|
TAccountCollectionMetadata extends string | AccountMeta<string> = string,
|
|
79
77
|
TAccountEditionAccount extends string | AccountMeta<string> = string,
|
|
80
78
|
TAccountBubblegumSigner extends string | AccountMeta<string> = string,
|
|
81
|
-
TAccountLogWrapper extends
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
| AccountMeta<string> = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",
|
|
90
|
-
TAccountSystemProgram extends
|
|
91
|
-
| string
|
|
92
|
-
| AccountMeta<string> = "11111111111111111111111111111111",
|
|
79
|
+
TAccountLogWrapper extends string | AccountMeta<string> =
|
|
80
|
+
"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV",
|
|
81
|
+
TAccountCompressionProgram extends string | AccountMeta<string> =
|
|
82
|
+
"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK",
|
|
83
|
+
TAccountTokenMetadataProgram extends string | AccountMeta<string> =
|
|
84
|
+
"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",
|
|
85
|
+
TAccountSystemProgram extends string | AccountMeta<string> =
|
|
86
|
+
"11111111111111111111111111111111",
|
|
93
87
|
TRemainingAccounts extends readonly AccountMeta<string>[] = [],
|
|
94
88
|
> = Instruction<TProgram> &
|
|
95
89
|
InstructionWithData<ReadonlyUint8Array> &
|
|
@@ -150,14 +144,22 @@ export type MintToCollectionV1Instruction<
|
|
|
150
144
|
]
|
|
151
145
|
>;
|
|
152
146
|
|
|
153
|
-
export
|
|
147
|
+
export type MintToCollectionV1InstructionData = {
|
|
154
148
|
discriminator: ReadonlyUint8Array;
|
|
149
|
+
/**
|
|
150
|
+
* Metadata for the newly minted compressed NFT, which will be added to
|
|
151
|
+
* the collection identified by `collectionMint`.
|
|
152
|
+
*/
|
|
155
153
|
metadataArgs: MetadataArgs;
|
|
156
|
-
}
|
|
154
|
+
};
|
|
157
155
|
|
|
158
|
-
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
|
+
*/
|
|
159
161
|
metadataArgs: MetadataArgsArgs;
|
|
160
|
-
}
|
|
162
|
+
};
|
|
161
163
|
|
|
162
164
|
export function getMintToCollectionV1InstructionDataEncoder(): Encoder<MintToCollectionV1InstructionDataArgs> {
|
|
163
165
|
return transformEncoder(
|
|
@@ -189,7 +191,7 @@ export function getMintToCollectionV1InstructionDataCodec(): Codec<
|
|
|
189
191
|
);
|
|
190
192
|
}
|
|
191
193
|
|
|
192
|
-
export
|
|
194
|
+
export type MintToCollectionV1AsyncInput<
|
|
193
195
|
TAccountTreeAuthority extends string = string,
|
|
194
196
|
TAccountLeafOwner extends string = string,
|
|
195
197
|
TAccountLeafDelegate extends string = string,
|
|
@@ -206,30 +208,80 @@ export interface MintToCollectionV1AsyncInput<
|
|
|
206
208
|
TAccountCompressionProgram extends string = string,
|
|
207
209
|
TAccountTokenMetadataProgram extends string = string,
|
|
208
210
|
TAccountSystemProgram extends string = string,
|
|
209
|
-
> {
|
|
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
|
+
*/
|
|
210
216
|
treeAuthority?: Address<TAccountTreeAuthority>;
|
|
217
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
211
218
|
leafOwner: Address<TAccountLeafOwner>;
|
|
219
|
+
/**
|
|
220
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
221
|
+
* delegate is set.
|
|
222
|
+
*/
|
|
212
223
|
leafDelegate: Address<TAccountLeafDelegate>;
|
|
224
|
+
/**
|
|
225
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
226
|
+
* owned by the account compression program.
|
|
227
|
+
*/
|
|
213
228
|
merkleTree: Address<TAccountMerkleTree>;
|
|
229
|
+
/** Account that pays for the transaction and any account rent. */
|
|
214
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
|
+
*/
|
|
215
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
|
+
*/
|
|
216
240
|
collectionAuthority: TransactionSigner<TAccountCollectionAuthority>;
|
|
217
241
|
/**
|
|
218
|
-
* If there is no
|
|
219
|
-
*
|
|
242
|
+
* If there is no collection authority record PDA, pass the Bubblegum
|
|
243
|
+
* program address instead.
|
|
220
244
|
*/
|
|
221
245
|
collectionAuthorityRecordPda?: Address<TAccountCollectionAuthorityRecordPda>;
|
|
246
|
+
/** Mint account of the Token Metadata collection NFT. */
|
|
222
247
|
collectionMint: Address<TAccountCollectionMint>;
|
|
248
|
+
/** Metadata account of the Token Metadata collection NFT. */
|
|
223
249
|
collectionMetadata?: Address<TAccountCollectionMetadata>;
|
|
250
|
+
/** Master edition account of the Token Metadata collection NFT. */
|
|
224
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
|
+
*/
|
|
225
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
|
+
*/
|
|
226
261
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
262
|
+
/**
|
|
263
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
264
|
+
* Merkle tree.
|
|
265
|
+
*/
|
|
227
266
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
267
|
+
/**
|
|
268
|
+
* The Token Metadata program, invoked to read or (un)verify the
|
|
269
|
+
* legacy collection accounts.
|
|
270
|
+
*/
|
|
228
271
|
tokenMetadataProgram?: Address<TAccountTokenMetadataProgram>;
|
|
272
|
+
/** The Solana System program. */
|
|
229
273
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
230
274
|
metadataArgs: MintToCollectionV1InstructionDataArgs["metadataArgs"];
|
|
231
|
-
}
|
|
275
|
+
};
|
|
232
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
|
+
*/
|
|
233
285
|
export async function getMintToCollectionV1InstructionAsync<
|
|
234
286
|
TAccountTreeAuthority extends string,
|
|
235
287
|
TAccountLeafOwner extends string,
|
|
@@ -436,7 +488,7 @@ export async function getMintToCollectionV1InstructionAsync<
|
|
|
436
488
|
>);
|
|
437
489
|
}
|
|
438
490
|
|
|
439
|
-
export
|
|
491
|
+
export type MintToCollectionV1Input<
|
|
440
492
|
TAccountTreeAuthority extends string = string,
|
|
441
493
|
TAccountLeafOwner extends string = string,
|
|
442
494
|
TAccountLeafDelegate extends string = string,
|
|
@@ -453,30 +505,80 @@ export interface MintToCollectionV1Input<
|
|
|
453
505
|
TAccountCompressionProgram extends string = string,
|
|
454
506
|
TAccountTokenMetadataProgram extends string = string,
|
|
455
507
|
TAccountSystemProgram extends string = string,
|
|
456
|
-
> {
|
|
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
|
+
*/
|
|
457
513
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
514
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
458
515
|
leafOwner: Address<TAccountLeafOwner>;
|
|
516
|
+
/**
|
|
517
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
518
|
+
* delegate is set.
|
|
519
|
+
*/
|
|
459
520
|
leafDelegate: Address<TAccountLeafDelegate>;
|
|
521
|
+
/**
|
|
522
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
523
|
+
* owned by the account compression program.
|
|
524
|
+
*/
|
|
460
525
|
merkleTree: Address<TAccountMerkleTree>;
|
|
526
|
+
/** Account that pays for the transaction and any account rent. */
|
|
461
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
|
+
*/
|
|
462
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
|
+
*/
|
|
463
537
|
collectionAuthority: TransactionSigner<TAccountCollectionAuthority>;
|
|
464
538
|
/**
|
|
465
|
-
* If there is no
|
|
466
|
-
*
|
|
539
|
+
* If there is no collection authority record PDA, pass the Bubblegum
|
|
540
|
+
* program address instead.
|
|
467
541
|
*/
|
|
468
542
|
collectionAuthorityRecordPda?: Address<TAccountCollectionAuthorityRecordPda>;
|
|
543
|
+
/** Mint account of the Token Metadata collection NFT. */
|
|
469
544
|
collectionMint: Address<TAccountCollectionMint>;
|
|
545
|
+
/** Metadata account of the Token Metadata collection NFT. */
|
|
470
546
|
collectionMetadata: Address<TAccountCollectionMetadata>;
|
|
547
|
+
/** Master edition account of the Token Metadata collection NFT. */
|
|
471
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
|
+
*/
|
|
472
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
|
+
*/
|
|
473
558
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
559
|
+
/**
|
|
560
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
561
|
+
* Merkle tree.
|
|
562
|
+
*/
|
|
474
563
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
564
|
+
/**
|
|
565
|
+
* The Token Metadata program, invoked to read or (un)verify the
|
|
566
|
+
* legacy collection accounts.
|
|
567
|
+
*/
|
|
475
568
|
tokenMetadataProgram?: Address<TAccountTokenMetadataProgram>;
|
|
569
|
+
/** The Solana System program. */
|
|
476
570
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
477
571
|
metadataArgs: MintToCollectionV1InstructionDataArgs["metadataArgs"];
|
|
478
|
-
}
|
|
572
|
+
};
|
|
479
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
|
+
*/
|
|
480
582
|
export function getMintToCollectionV1Instruction<
|
|
481
583
|
TAccountTreeAuthority extends string,
|
|
482
584
|
TAccountLeafOwner extends string,
|
|
@@ -652,35 +754,77 @@ export function getMintToCollectionV1Instruction<
|
|
|
652
754
|
>);
|
|
653
755
|
}
|
|
654
756
|
|
|
655
|
-
export
|
|
757
|
+
export type ParsedMintToCollectionV1Instruction<
|
|
656
758
|
TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
|
|
657
759
|
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
658
|
-
> {
|
|
760
|
+
> = {
|
|
659
761
|
programAddress: Address<TProgram>;
|
|
660
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
|
+
*/
|
|
661
767
|
treeAuthority: TAccountMetas[0];
|
|
768
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
662
769
|
leafOwner: TAccountMetas[1];
|
|
770
|
+
/**
|
|
771
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
772
|
+
* delegate is set.
|
|
773
|
+
*/
|
|
663
774
|
leafDelegate: TAccountMetas[2];
|
|
775
|
+
/**
|
|
776
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
777
|
+
* owned by the account compression program.
|
|
778
|
+
*/
|
|
664
779
|
merkleTree: TAccountMetas[3];
|
|
780
|
+
/** Account that pays for the transaction and any account rent. */
|
|
665
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
|
+
*/
|
|
666
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
|
+
*/
|
|
667
791
|
collectionAuthority: TAccountMetas[6];
|
|
668
792
|
/**
|
|
669
|
-
* If there is no
|
|
670
|
-
*
|
|
793
|
+
* If there is no collection authority record PDA, pass the Bubblegum
|
|
794
|
+
* program address instead.
|
|
671
795
|
*/
|
|
672
796
|
collectionAuthorityRecordPda: TAccountMetas[7];
|
|
797
|
+
/** Mint account of the Token Metadata collection NFT. */
|
|
673
798
|
collectionMint: TAccountMetas[8];
|
|
799
|
+
/** Metadata account of the Token Metadata collection NFT. */
|
|
674
800
|
collectionMetadata: TAccountMetas[9];
|
|
801
|
+
/** Master edition account of the Token Metadata collection NFT. */
|
|
675
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
|
+
*/
|
|
676
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
|
+
*/
|
|
677
812
|
logWrapper: TAccountMetas[12];
|
|
813
|
+
/**
|
|
814
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
815
|
+
* Merkle tree.
|
|
816
|
+
*/
|
|
678
817
|
compressionProgram: TAccountMetas[13];
|
|
818
|
+
/**
|
|
819
|
+
* The Token Metadata program, invoked to read or (un)verify the
|
|
820
|
+
* legacy collection accounts.
|
|
821
|
+
*/
|
|
679
822
|
tokenMetadataProgram: TAccountMetas[14];
|
|
823
|
+
/** The Solana System program. */
|
|
680
824
|
systemProgram: TAccountMetas[15];
|
|
681
825
|
};
|
|
682
826
|
data: MintToCollectionV1InstructionData;
|
|
683
|
-
}
|
|
827
|
+
};
|
|
684
828
|
|
|
685
829
|
export function parseMintToCollectionV1Instruction<
|
|
686
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([
|
|
@@ -63,15 +62,12 @@ export type MintV1Instruction<
|
|
|
63
62
|
TAccountMerkleTree extends string | AccountMeta<string> = string,
|
|
64
63
|
TAccountPayer extends string | AccountMeta<string> = string,
|
|
65
64
|
TAccountTreeDelegate extends string | AccountMeta<string> = string,
|
|
66
|
-
TAccountLogWrapper extends
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
TAccountSystemProgram extends
|
|
73
|
-
| string
|
|
74
|
-
| AccountMeta<string> = "11111111111111111111111111111111",
|
|
65
|
+
TAccountLogWrapper extends string | AccountMeta<string> =
|
|
66
|
+
"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV",
|
|
67
|
+
TAccountCompressionProgram extends string | AccountMeta<string> =
|
|
68
|
+
"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK",
|
|
69
|
+
TAccountSystemProgram extends string | AccountMeta<string> =
|
|
70
|
+
"11111111111111111111111111111111",
|
|
75
71
|
TRemainingAccounts extends readonly AccountMeta<string>[] = [],
|
|
76
72
|
> = Instruction<TProgram> &
|
|
77
73
|
InstructionWithData<ReadonlyUint8Array> &
|
|
@@ -110,14 +106,16 @@ export type MintV1Instruction<
|
|
|
110
106
|
]
|
|
111
107
|
>;
|
|
112
108
|
|
|
113
|
-
export
|
|
109
|
+
export type MintV1InstructionData = {
|
|
114
110
|
discriminator: ReadonlyUint8Array;
|
|
111
|
+
/** Metadata for the newly minted compressed NFT. */
|
|
115
112
|
message: MetadataArgs;
|
|
116
|
-
}
|
|
113
|
+
};
|
|
117
114
|
|
|
118
|
-
export
|
|
115
|
+
export type MintV1InstructionDataArgs = {
|
|
116
|
+
/** Metadata for the newly minted compressed NFT. */
|
|
119
117
|
message: MetadataArgsArgs;
|
|
120
|
-
}
|
|
118
|
+
};
|
|
121
119
|
|
|
122
120
|
export function getMintV1InstructionDataEncoder(): Encoder<MintV1InstructionDataArgs> {
|
|
123
121
|
return transformEncoder(
|
|
@@ -146,7 +144,7 @@ export function getMintV1InstructionDataCodec(): Codec<
|
|
|
146
144
|
);
|
|
147
145
|
}
|
|
148
146
|
|
|
149
|
-
export
|
|
147
|
+
export type MintV1AsyncInput<
|
|
150
148
|
TAccountTreeAuthority extends string = string,
|
|
151
149
|
TAccountLeafOwner extends string = string,
|
|
152
150
|
TAccountLeafDelegate extends string = string,
|
|
@@ -156,19 +154,53 @@ export interface MintV1AsyncInput<
|
|
|
156
154
|
TAccountLogWrapper extends string = string,
|
|
157
155
|
TAccountCompressionProgram extends string = string,
|
|
158
156
|
TAccountSystemProgram extends string = string,
|
|
159
|
-
> {
|
|
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
|
+
*/
|
|
160
162
|
treeAuthority?: Address<TAccountTreeAuthority>;
|
|
163
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
161
164
|
leafOwner: Address<TAccountLeafOwner>;
|
|
165
|
+
/**
|
|
166
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
167
|
+
* delegate is set.
|
|
168
|
+
*/
|
|
162
169
|
leafDelegate: Address<TAccountLeafDelegate>;
|
|
170
|
+
/**
|
|
171
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
172
|
+
* owned by the account compression program.
|
|
173
|
+
*/
|
|
163
174
|
merkleTree: Address<TAccountMerkleTree>;
|
|
175
|
+
/** Account that pays for the transaction and any account rent. */
|
|
164
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
|
+
*/
|
|
165
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
|
+
*/
|
|
166
186
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
187
|
+
/**
|
|
188
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
189
|
+
* Merkle tree.
|
|
190
|
+
*/
|
|
167
191
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
192
|
+
/** The Solana System program. */
|
|
168
193
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
169
194
|
message: MintV1InstructionDataArgs["message"];
|
|
170
|
-
}
|
|
195
|
+
};
|
|
171
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
|
+
*/
|
|
172
204
|
export async function getMintV1InstructionAsync<
|
|
173
205
|
TAccountTreeAuthority extends string,
|
|
174
206
|
TAccountLeafOwner extends string,
|
|
@@ -286,7 +318,7 @@ export async function getMintV1InstructionAsync<
|
|
|
286
318
|
>);
|
|
287
319
|
}
|
|
288
320
|
|
|
289
|
-
export
|
|
321
|
+
export type MintV1Input<
|
|
290
322
|
TAccountTreeAuthority extends string = string,
|
|
291
323
|
TAccountLeafOwner extends string = string,
|
|
292
324
|
TAccountLeafDelegate extends string = string,
|
|
@@ -296,19 +328,53 @@ export interface MintV1Input<
|
|
|
296
328
|
TAccountLogWrapper extends string = string,
|
|
297
329
|
TAccountCompressionProgram extends string = string,
|
|
298
330
|
TAccountSystemProgram extends string = string,
|
|
299
|
-
> {
|
|
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
|
+
*/
|
|
300
336
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
337
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
301
338
|
leafOwner: Address<TAccountLeafOwner>;
|
|
339
|
+
/**
|
|
340
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
341
|
+
* delegate is set.
|
|
342
|
+
*/
|
|
302
343
|
leafDelegate: Address<TAccountLeafDelegate>;
|
|
344
|
+
/**
|
|
345
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
346
|
+
* owned by the account compression program.
|
|
347
|
+
*/
|
|
303
348
|
merkleTree: Address<TAccountMerkleTree>;
|
|
349
|
+
/** Account that pays for the transaction and any account rent. */
|
|
304
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
|
+
*/
|
|
305
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
|
+
*/
|
|
306
360
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
361
|
+
/**
|
|
362
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
363
|
+
* Merkle tree.
|
|
364
|
+
*/
|
|
307
365
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
366
|
+
/** The Solana System program. */
|
|
308
367
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
309
368
|
message: MintV1InstructionDataArgs["message"];
|
|
310
|
-
}
|
|
369
|
+
};
|
|
311
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
|
+
*/
|
|
312
378
|
export function getMintV1Instruction<
|
|
313
379
|
TAccountTreeAuthority extends string,
|
|
314
380
|
TAccountLeafOwner extends string,
|
|
@@ -416,24 +482,51 @@ export function getMintV1Instruction<
|
|
|
416
482
|
>);
|
|
417
483
|
}
|
|
418
484
|
|
|
419
|
-
export
|
|
485
|
+
export type ParsedMintV1Instruction<
|
|
420
486
|
TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
|
|
421
487
|
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
422
|
-
> {
|
|
488
|
+
> = {
|
|
423
489
|
programAddress: Address<TProgram>;
|
|
424
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
|
+
*/
|
|
425
495
|
treeAuthority: TAccountMetas[0];
|
|
496
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
426
497
|
leafOwner: TAccountMetas[1];
|
|
498
|
+
/**
|
|
499
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
500
|
+
* delegate is set.
|
|
501
|
+
*/
|
|
427
502
|
leafDelegate: TAccountMetas[2];
|
|
503
|
+
/**
|
|
504
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
505
|
+
* owned by the account compression program.
|
|
506
|
+
*/
|
|
428
507
|
merkleTree: TAccountMetas[3];
|
|
508
|
+
/** Account that pays for the transaction and any account rent. */
|
|
429
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
|
+
*/
|
|
430
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
|
+
*/
|
|
431
519
|
logWrapper: TAccountMetas[6];
|
|
520
|
+
/**
|
|
521
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
522
|
+
* Merkle tree.
|
|
523
|
+
*/
|
|
432
524
|
compressionProgram: TAccountMetas[7];
|
|
525
|
+
/** The Solana System program. */
|
|
433
526
|
systemProgram: TAccountMetas[8];
|
|
434
527
|
};
|
|
435
528
|
data: MintV1InstructionData;
|
|
436
|
-
}
|
|
529
|
+
};
|
|
437
530
|
|
|
438
531
|
export function parseMintV1Instruction<
|
|
439
532
|
TProgram extends string,
|