@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
|
@@ -1,66 +1,164 @@
|
|
|
1
1
|
import { MetadataArgs, MetadataArgsArgs } from "../types/metadataArgs.js";
|
|
2
|
+
import "../types/index.js";
|
|
2
3
|
import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/bubblegum.js";
|
|
4
|
+
import "../programs/index.js";
|
|
3
5
|
import { AccountMeta, AccountSignerMeta, Address, Codec, Decoder, Encoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlyAccount, ReadonlySignerAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount } from "@solana/kit";
|
|
4
|
-
|
|
5
6
|
//#region src/generated/instructions/mintV1.d.ts
|
|
6
7
|
declare const MINT_V1_DISCRIMINATOR: ReadonlyUint8Array;
|
|
7
8
|
declare function getMintV1DiscriminatorBytes(): ReadonlyUint8Array;
|
|
8
9
|
type MintV1Instruction<TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS, TAccountTreeAuthority extends string | AccountMeta<string> = string, TAccountLeafOwner extends string | AccountMeta<string> = string, TAccountLeafDelegate extends string | AccountMeta<string> = string, TAccountMerkleTree extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountTreeDelegate extends string | AccountMeta<string> = string, TAccountLogWrapper extends string | AccountMeta<string> = "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV", TAccountCompressionProgram extends string | AccountMeta<string> = "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountTreeAuthority extends string ? WritableAccount<TAccountTreeAuthority> : TAccountTreeAuthority, TAccountLeafOwner extends string ? ReadonlyAccount<TAccountLeafOwner> : TAccountLeafOwner, TAccountLeafDelegate extends string ? ReadonlyAccount<TAccountLeafDelegate> : TAccountLeafDelegate, TAccountMerkleTree extends string ? WritableAccount<TAccountMerkleTree> : TAccountMerkleTree, TAccountPayer extends string ? ReadonlySignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer> : TAccountPayer, TAccountTreeDelegate extends string ? ReadonlySignerAccount<TAccountTreeDelegate> & AccountSignerMeta<TAccountTreeDelegate> : TAccountTreeDelegate, TAccountLogWrapper extends string ? ReadonlyAccount<TAccountLogWrapper> : TAccountLogWrapper, TAccountCompressionProgram extends string ? ReadonlyAccount<TAccountCompressionProgram> : TAccountCompressionProgram, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, ...TRemainingAccounts]>;
|
|
9
|
-
|
|
10
|
+
type MintV1InstructionData = {
|
|
10
11
|
discriminator: ReadonlyUint8Array;
|
|
12
|
+
/** Metadata for the newly minted compressed NFT. */
|
|
11
13
|
message: MetadataArgs;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
+
};
|
|
15
|
+
type MintV1InstructionDataArgs = {
|
|
16
|
+
/** Metadata for the newly minted compressed NFT. */
|
|
14
17
|
message: MetadataArgsArgs;
|
|
15
|
-
}
|
|
18
|
+
};
|
|
16
19
|
declare function getMintV1InstructionDataEncoder(): Encoder<MintV1InstructionDataArgs>;
|
|
17
20
|
declare function getMintV1InstructionDataDecoder(): Decoder<MintV1InstructionData>;
|
|
18
21
|
declare function getMintV1InstructionDataCodec(): Codec<MintV1InstructionDataArgs, MintV1InstructionData>;
|
|
19
|
-
|
|
22
|
+
type MintV1AsyncInput<TAccountTreeAuthority extends string = string, TAccountLeafOwner extends string = string, TAccountLeafDelegate extends string = string, TAccountMerkleTree extends string = string, TAccountPayer extends string = string, TAccountTreeDelegate extends string = string, TAccountLogWrapper extends string = string, TAccountCompressionProgram extends string = string, TAccountSystemProgram extends string = string> = {
|
|
23
|
+
/**
|
|
24
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
25
|
+
* as the tree's authority for CPIs into the compression program.
|
|
26
|
+
*/
|
|
20
27
|
treeAuthority?: Address<TAccountTreeAuthority>;
|
|
28
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
21
29
|
leafOwner: Address<TAccountLeafOwner>;
|
|
30
|
+
/**
|
|
31
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
32
|
+
* delegate is set.
|
|
33
|
+
*/
|
|
22
34
|
leafDelegate: Address<TAccountLeafDelegate>;
|
|
35
|
+
/**
|
|
36
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
37
|
+
* owned by the account compression program.
|
|
38
|
+
*/
|
|
23
39
|
merkleTree: Address<TAccountMerkleTree>;
|
|
40
|
+
/** Account that pays for the transaction and any account rent. */
|
|
24
41
|
payer: TransactionSigner<TAccountPayer>;
|
|
42
|
+
/**
|
|
43
|
+
* Delegate authority of the tree, authorized to mint into and manage
|
|
44
|
+
* the tree on the creator's behalf.
|
|
45
|
+
*/
|
|
25
46
|
treeDelegate: TransactionSigner<TAccountTreeDelegate>;
|
|
47
|
+
/**
|
|
48
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
49
|
+
* can reconstruct the tree.
|
|
50
|
+
*/
|
|
26
51
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
52
|
+
/**
|
|
53
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
54
|
+
* Merkle tree.
|
|
55
|
+
*/
|
|
27
56
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
57
|
+
/** The Solana System program. */
|
|
28
58
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
29
59
|
message: MintV1InstructionDataArgs["message"];
|
|
30
|
-
}
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Mints a new compressed NFT (V1) leaf and appends it to the tree.
|
|
63
|
+
*
|
|
64
|
+
* The tree delegate (or, for public trees, any signer) supplies the
|
|
65
|
+
* leaf's `MetadataArgs`; Bubblegum hashes it, builds the `LeafSchema`,
|
|
66
|
+
* and appends the resulting leaf to the Merkle tree.
|
|
67
|
+
*/
|
|
31
68
|
declare function getMintV1InstructionAsync<TAccountTreeAuthority extends string, TAccountLeafOwner extends string, TAccountLeafDelegate extends string, TAccountMerkleTree extends string, TAccountPayer extends string, TAccountTreeDelegate extends string, TAccountLogWrapper extends string, TAccountCompressionProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS>(input: MintV1AsyncInput<TAccountTreeAuthority, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountPayer, TAccountTreeDelegate, TAccountLogWrapper, TAccountCompressionProgram, TAccountSystemProgram>, config?: {
|
|
32
69
|
programAddress?: TProgramAddress;
|
|
33
70
|
}): Promise<MintV1Instruction<TProgramAddress, TAccountTreeAuthority, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountPayer, TAccountTreeDelegate, TAccountLogWrapper, TAccountCompressionProgram, TAccountSystemProgram>>;
|
|
34
|
-
|
|
71
|
+
type MintV1Input<TAccountTreeAuthority extends string = string, TAccountLeafOwner extends string = string, TAccountLeafDelegate extends string = string, TAccountMerkleTree extends string = string, TAccountPayer extends string = string, TAccountTreeDelegate extends string = string, TAccountLogWrapper extends string = string, TAccountCompressionProgram extends string = string, TAccountSystemProgram extends string = string> = {
|
|
72
|
+
/**
|
|
73
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
74
|
+
* as the tree's authority for CPIs into the compression program.
|
|
75
|
+
*/
|
|
35
76
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
77
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
36
78
|
leafOwner: Address<TAccountLeafOwner>;
|
|
79
|
+
/**
|
|
80
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
81
|
+
* delegate is set.
|
|
82
|
+
*/
|
|
37
83
|
leafDelegate: Address<TAccountLeafDelegate>;
|
|
84
|
+
/**
|
|
85
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
86
|
+
* owned by the account compression program.
|
|
87
|
+
*/
|
|
38
88
|
merkleTree: Address<TAccountMerkleTree>;
|
|
89
|
+
/** Account that pays for the transaction and any account rent. */
|
|
39
90
|
payer: TransactionSigner<TAccountPayer>;
|
|
91
|
+
/**
|
|
92
|
+
* Delegate authority of the tree, authorized to mint into and manage
|
|
93
|
+
* the tree on the creator's behalf.
|
|
94
|
+
*/
|
|
40
95
|
treeDelegate: TransactionSigner<TAccountTreeDelegate>;
|
|
96
|
+
/**
|
|
97
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
98
|
+
* can reconstruct the tree.
|
|
99
|
+
*/
|
|
41
100
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
101
|
+
/**
|
|
102
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
103
|
+
* Merkle tree.
|
|
104
|
+
*/
|
|
42
105
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
106
|
+
/** The Solana System program. */
|
|
43
107
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
44
108
|
message: MintV1InstructionDataArgs["message"];
|
|
45
|
-
}
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Mints a new compressed NFT (V1) leaf and appends it to the tree.
|
|
112
|
+
*
|
|
113
|
+
* The tree delegate (or, for public trees, any signer) supplies the
|
|
114
|
+
* leaf's `MetadataArgs`; Bubblegum hashes it, builds the `LeafSchema`,
|
|
115
|
+
* and appends the resulting leaf to the Merkle tree.
|
|
116
|
+
*/
|
|
46
117
|
declare function getMintV1Instruction<TAccountTreeAuthority extends string, TAccountLeafOwner extends string, TAccountLeafDelegate extends string, TAccountMerkleTree extends string, TAccountPayer extends string, TAccountTreeDelegate extends string, TAccountLogWrapper extends string, TAccountCompressionProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS>(input: MintV1Input<TAccountTreeAuthority, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountPayer, TAccountTreeDelegate, TAccountLogWrapper, TAccountCompressionProgram, TAccountSystemProgram>, config?: {
|
|
47
118
|
programAddress?: TProgramAddress;
|
|
48
119
|
}): MintV1Instruction<TProgramAddress, TAccountTreeAuthority, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountPayer, TAccountTreeDelegate, TAccountLogWrapper, TAccountCompressionProgram, TAccountSystemProgram>;
|
|
49
|
-
|
|
120
|
+
type ParsedMintV1Instruction<TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
50
121
|
programAddress: Address<TProgram>;
|
|
51
122
|
accounts: {
|
|
123
|
+
/**
|
|
124
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
125
|
+
* as the tree's authority for CPIs into the compression program.
|
|
126
|
+
*/
|
|
52
127
|
treeAuthority: TAccountMetas[0];
|
|
128
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
53
129
|
leafOwner: TAccountMetas[1];
|
|
130
|
+
/**
|
|
131
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
132
|
+
* delegate is set.
|
|
133
|
+
*/
|
|
54
134
|
leafDelegate: TAccountMetas[2];
|
|
135
|
+
/**
|
|
136
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
137
|
+
* owned by the account compression program.
|
|
138
|
+
*/
|
|
55
139
|
merkleTree: TAccountMetas[3];
|
|
140
|
+
/** Account that pays for the transaction and any account rent. */
|
|
56
141
|
payer: TAccountMetas[4];
|
|
142
|
+
/**
|
|
143
|
+
* Delegate authority of the tree, authorized to mint into and manage
|
|
144
|
+
* the tree on the creator's behalf.
|
|
145
|
+
*/
|
|
57
146
|
treeDelegate: TAccountMetas[5];
|
|
147
|
+
/**
|
|
148
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
149
|
+
* can reconstruct the tree.
|
|
150
|
+
*/
|
|
58
151
|
logWrapper: TAccountMetas[6];
|
|
152
|
+
/**
|
|
153
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
154
|
+
* Merkle tree.
|
|
155
|
+
*/
|
|
59
156
|
compressionProgram: TAccountMetas[7];
|
|
157
|
+
/** The Solana System program. */
|
|
60
158
|
systemProgram: TAccountMetas[8];
|
|
61
159
|
};
|
|
62
160
|
data: MintV1InstructionData;
|
|
63
|
-
}
|
|
161
|
+
};
|
|
64
162
|
declare function parseMintV1Instruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedMintV1Instruction<TProgram, TAccountMetas>;
|
|
65
163
|
//#endregion
|
|
66
164
|
export { MINT_V1_DISCRIMINATOR, MintV1AsyncInput, MintV1Input, MintV1Instruction, MintV1InstructionData, MintV1InstructionDataArgs, ParsedMintV1Instruction, getMintV1DiscriminatorBytes, getMintV1Instruction, getMintV1InstructionAsync, getMintV1InstructionDataCodec, getMintV1InstructionDataDecoder, getMintV1InstructionDataEncoder, parseMintV1Instruction };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintV1.d.ts","names":[],"sources":["../../../src/generated/instructions/mintV1.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"mintV1.d.ts","names":[],"sources":["../../../src/generated/instructions/mintV1.ts"],"mappings":";;;;;;cAgDa,uBAAuB;iBAIpB,+BAA+B;KAInC,kBACV,iCAAiC,2BACjC,uCAAuC,8BACvC,mCAAmC,8BACnC,sCAAsC,8BACtC,oCAAoC,8BACpC,+BAA+B,8BAC/B,sCAAsC,8BACtC,oCAAoC,qEAEpC,4CAA4C,qEAE5C,uCAAuC,0DAEvC,oCAAoC,8BAClC,YAAY,YACd,oBAAoB,sBACpB,yBAEI,uCACI,gBAAgB,yBAChB,uBACJ,mCACI,gBAAgB,qBAChB,mBACJ,sCACI,gBAAgB,wBAChB,sBACJ,oCACI,gBAAgB,sBAChB,oBACJ,+BACI,sBAAsB,iBACpB,kBAAkB,iBACpB,eACJ,sCACI,sBAAsB,wBACpB,kBAAkB,wBACpB,sBACJ,oCACI,gBAAgB,sBAChB,oBACJ,4CACI,gBAAgB,8BAChB,4BACJ,uCACI,gBAAgB,yBAChB,0BACD;KAIG;EACV,eAAe;;EAEf,SAAS;;KAGC;;EAEV,SAAS;;iBAGK,mCAAmC,QAAQ;iBAU3C,mCAAmC,QAAQ;iBAO3C,iCAAiC,MAC/C,2BACA;KAQU,iBACV,+CACA,2CACA,8CACA,4CACA,uCACA,8CACA,4CACA,oDACA;;;;;EAMA,gBAAgB,QAAQ;;EAExB,WAAW,QAAQ;;;;;EAKnB,cAAc,QAAQ;;;;;EAKtB,YAAY,QAAQ;;EAEpB,OAAO,kBAAkB;;;;;EAKzB,cAAc,kBAAkB;;;;;EAKhC,aAAa,QAAQ;;;;;EAKrB,qBAAqB,QAAQ;;EAE7B,gBAAgB,QAAQ;EACxB,SAAS;;;;;;;;;iBAUW,0BACpB,sCACA,kCACA,qCACA,mCACA,8BACA,qCACA,mCACA,2CACA,sCACA,wBAAwB,iBAAiB,2BAEzC,OAAO,iBACL,uBACA,mBACA,sBACA,oBACA,eACA,sBACA,oBACA,4BACA,wBAEF;EAAW,iBAAiB;IAC3B,QACD,kBACE,iBACA,uBACA,mBACA,sBACA,oBACA,eACA,sBACA,oBACA,4BACA;KAkFQ,YACV,+CACA,2CACA,8CACA,4CACA,uCACA,8CACA,4CACA,oDACA;;;;;EAMA,eAAe,QAAQ;;EAEvB,WAAW,QAAQ;;;;;EAKnB,cAAc,QAAQ;;;;;EAKtB,YAAY,QAAQ;;EAEpB,OAAO,kBAAkB;;;;;EAKzB,cAAc,kBAAkB;;;;;EAKhC,aAAa,QAAQ;;;;;EAKrB,qBAAqB,QAAQ;;EAE7B,gBAAgB,QAAQ;EACxB,SAAS;;;;;;;;;iBAUK,qBACd,sCACA,kCACA,qCACA,mCACA,8BACA,qCACA,mCACA,2CACA,sCACA,wBAAwB,iBAAiB,2BAEzC,OAAO,YACL,uBACA,mBACA,sBACA,oBACA,eACA,sBACA,oBACA,4BACA,wBAEF;EAAW,iBAAiB;IAC3B,kBACD,iBACA,uBACA,mBACA,sBACA,oBACA,eACA,sBACA,oBACA,4BACA;KAyEU,wBACV,iCAAiC,2BACjC,+BAA+B,yBAAyB;EAExD,gBAAgB,QAAQ;EACxB;;;;;IAKE,eAAe;;IAEf,WAAW;;;;;IAKX,cAAc;;;;;IAKd,YAAY;;IAEZ,OAAO;;;;;IAKP,cAAc;;;;;IAKd,YAAY;;;;;IAKZ,oBAAoB;;IAEpB,eAAe;;EAEjB,MAAM;;iBAGQ,uBACd,yBACA,+BAA+B,eAE/B,aAAa,YAAY,YACvB,wBAAwB,iBACxB,oBAAoB,sBACrB,wBAAwB,UAAU"}
|
|
@@ -4,6 +4,13 @@ import "../programs/bubblegum.js";
|
|
|
4
4
|
import { SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, transformEncoder } from "@solana/kit";
|
|
5
5
|
import { getAccountMetaFactory, getAddressFromResolvedInstructionAccount } from "@solana/program-client-core";
|
|
6
6
|
//#region src/generated/instructions/mintV1.ts
|
|
7
|
+
/**
|
|
8
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
9
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
10
|
+
* to add features, then rerun Codama to update it.
|
|
11
|
+
*
|
|
12
|
+
* @see https://github.com/codama-idl/codama
|
|
13
|
+
*/
|
|
7
14
|
const MINT_V1_DISCRIMINATOR = new Uint8Array([
|
|
8
15
|
145,
|
|
9
16
|
98,
|
|
@@ -29,6 +36,13 @@ function getMintV1InstructionDataDecoder() {
|
|
|
29
36
|
function getMintV1InstructionDataCodec() {
|
|
30
37
|
return combineCodec(getMintV1InstructionDataEncoder(), getMintV1InstructionDataDecoder());
|
|
31
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Mints a new compressed NFT (V1) leaf and appends it to the tree.
|
|
41
|
+
*
|
|
42
|
+
* The tree delegate (or, for public trees, any signer) supplies the
|
|
43
|
+
* leaf's `MetadataArgs`; Bubblegum hashes it, builds the `LeafSchema`,
|
|
44
|
+
* and appends the resulting leaf to the Merkle tree.
|
|
45
|
+
*/
|
|
32
46
|
async function getMintV1InstructionAsync(input, config) {
|
|
33
47
|
const programAddress = config?.programAddress ?? "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
|
|
34
48
|
const accounts = {
|
|
@@ -91,6 +105,13 @@ async function getMintV1InstructionAsync(input, config) {
|
|
|
91
105
|
programAddress
|
|
92
106
|
});
|
|
93
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Mints a new compressed NFT (V1) leaf and appends it to the tree.
|
|
110
|
+
*
|
|
111
|
+
* The tree delegate (or, for public trees, any signer) supplies the
|
|
112
|
+
* leaf's `MetadataArgs`; Bubblegum hashes it, builds the `LeafSchema`,
|
|
113
|
+
* and appends the resulting leaf to the Merkle tree.
|
|
114
|
+
*/
|
|
94
115
|
function getMintV1Instruction(input, config) {
|
|
95
116
|
const programAddress = config?.programAddress ?? "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
|
|
96
117
|
const accounts = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintV1.js","names":[],"sources":["../../../src/generated/instructions/mintV1.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport type {\n AccountMeta,\n AccountSignerMeta,\n Address,\n Codec,\n Decoder,\n Encoder,\n Instruction,\n InstructionWithAccounts,\n InstructionWithData,\n ReadonlyAccount,\n ReadonlySignerAccount,\n ReadonlyUint8Array,\n TransactionSigner,\n WritableAccount,\n} from \"@solana/kit\";\nimport type { ResolvedInstructionAccount } from \"@solana/program-client-core\";\nimport type { MetadataArgs, MetadataArgsArgs } from \"../types/index.js\";\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n SolanaError,\n transformEncoder,\n} from \"@solana/kit\";\nimport {\n getAccountMetaFactory,\n getAddressFromResolvedInstructionAccount,\n} from \"@solana/program-client-core\";\nimport { findTreeConfigPda } from \"../pdas/index.js\";\nimport { BUBBLEGUM_PROGRAM_ADDRESS } from \"../programs/index.js\";\nimport {\n getMetadataArgsDecoder,\n getMetadataArgsEncoder,\n} from \"../types/index.js\";\n\nexport const MINT_V1_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n 145, 98, 192, 118, 184, 147, 118, 104,\n]);\n\nexport function getMintV1DiscriminatorBytes(): ReadonlyUint8Array {\n return fixEncoderSize(getBytesEncoder(), 8).encode(MINT_V1_DISCRIMINATOR);\n}\n\nexport type MintV1Instruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountTreeAuthority extends string | AccountMeta<string> = string,\n TAccountLeafOwner extends string | AccountMeta<string> = string,\n TAccountLeafDelegate extends string | AccountMeta<string> = string,\n TAccountMerkleTree extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountTreeDelegate extends string | AccountMeta<string> = string,\n TAccountLogWrapper extends string | AccountMeta<string> =\n \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\",\n TAccountCompressionProgram extends string | AccountMeta<string> =\n \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\",\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountTreeAuthority extends string\n ? WritableAccount<TAccountTreeAuthority>\n : TAccountTreeAuthority,\n TAccountLeafOwner extends string\n ? ReadonlyAccount<TAccountLeafOwner>\n : TAccountLeafOwner,\n TAccountLeafDelegate extends string\n ? ReadonlyAccount<TAccountLeafDelegate>\n : TAccountLeafDelegate,\n TAccountMerkleTree extends string\n ? WritableAccount<TAccountMerkleTree>\n : TAccountMerkleTree,\n TAccountPayer extends string\n ? ReadonlySignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountTreeDelegate extends string\n ? ReadonlySignerAccount<TAccountTreeDelegate> &\n AccountSignerMeta<TAccountTreeDelegate>\n : TAccountTreeDelegate,\n TAccountLogWrapper extends string\n ? ReadonlyAccount<TAccountLogWrapper>\n : TAccountLogWrapper,\n TAccountCompressionProgram extends string\n ? ReadonlyAccount<TAccountCompressionProgram>\n : TAccountCompressionProgram,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport interface MintV1InstructionData {\n discriminator: ReadonlyUint8Array;\n message: MetadataArgs;\n}\n\nexport interface MintV1InstructionDataArgs {\n message: MetadataArgsArgs;\n}\n\nexport function getMintV1InstructionDataEncoder(): Encoder<MintV1InstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"message\", getMetadataArgsEncoder()],\n ]),\n (value) => ({ ...value, discriminator: MINT_V1_DISCRIMINATOR }),\n );\n}\n\nexport function getMintV1InstructionDataDecoder(): Decoder<MintV1InstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"message\", getMetadataArgsDecoder()],\n ]);\n}\n\nexport function getMintV1InstructionDataCodec(): Codec<\n MintV1InstructionDataArgs,\n MintV1InstructionData\n> {\n return combineCodec(\n getMintV1InstructionDataEncoder(),\n getMintV1InstructionDataDecoder(),\n );\n}\n\nexport interface MintV1AsyncInput<\n TAccountTreeAuthority extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree extends string = string,\n TAccountPayer extends string = string,\n TAccountTreeDelegate extends string = string,\n TAccountLogWrapper extends string = string,\n TAccountCompressionProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> {\n treeAuthority?: Address<TAccountTreeAuthority>;\n leafOwner: Address<TAccountLeafOwner>;\n leafDelegate: Address<TAccountLeafDelegate>;\n merkleTree: Address<TAccountMerkleTree>;\n payer: TransactionSigner<TAccountPayer>;\n treeDelegate: TransactionSigner<TAccountTreeDelegate>;\n logWrapper?: Address<TAccountLogWrapper>;\n compressionProgram?: Address<TAccountCompressionProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n message: MintV1InstructionDataArgs[\"message\"];\n}\n\nexport async function getMintV1InstructionAsync<\n TAccountTreeAuthority extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree extends string,\n TAccountPayer extends string,\n TAccountTreeDelegate extends string,\n TAccountLogWrapper extends string,\n TAccountCompressionProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n>(\n input: MintV1AsyncInput<\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountTreeDelegate,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n MintV1Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountTreeDelegate,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? BUBBLEGUM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n treeAuthority: { value: input.treeAuthority ?? null, isWritable: true },\n leafOwner: { value: input.leafOwner ?? null, isWritable: false },\n leafDelegate: { value: input.leafDelegate ?? null, isWritable: false },\n merkleTree: { value: input.merkleTree ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: false },\n treeDelegate: { value: input.treeDelegate ?? null, isWritable: false },\n logWrapper: { value: input.logWrapper ?? null, isWritable: false },\n compressionProgram: {\n value: input.compressionProgram ?? null,\n isWritable: false,\n },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedInstructionAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.treeAuthority.value) {\n accounts.treeAuthority.value = await findTreeConfigPda({\n merkleTree: getAddressFromResolvedInstructionAccount(\n \"merkleTree\",\n accounts.merkleTree.value,\n ),\n });\n }\n if (!accounts.logWrapper.value) {\n accounts.logWrapper.value =\n \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\" as Address<\"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\">;\n }\n if (!accounts.compressionProgram.value) {\n accounts.compressionProgram.value =\n \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\" as Address<\"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(\"treeAuthority\", accounts.treeAuthority),\n getAccountMeta(\"leafOwner\", accounts.leafOwner),\n getAccountMeta(\"leafDelegate\", accounts.leafDelegate),\n getAccountMeta(\"merkleTree\", accounts.merkleTree),\n getAccountMeta(\"payer\", accounts.payer),\n getAccountMeta(\"treeDelegate\", accounts.treeDelegate),\n getAccountMeta(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getMintV1InstructionDataEncoder().encode(\n args as MintV1InstructionDataArgs,\n ),\n programAddress,\n } as MintV1Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountTreeDelegate,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport interface MintV1Input<\n TAccountTreeAuthority extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree extends string = string,\n TAccountPayer extends string = string,\n TAccountTreeDelegate extends string = string,\n TAccountLogWrapper extends string = string,\n TAccountCompressionProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> {\n treeAuthority: Address<TAccountTreeAuthority>;\n leafOwner: Address<TAccountLeafOwner>;\n leafDelegate: Address<TAccountLeafDelegate>;\n merkleTree: Address<TAccountMerkleTree>;\n payer: TransactionSigner<TAccountPayer>;\n treeDelegate: TransactionSigner<TAccountTreeDelegate>;\n logWrapper?: Address<TAccountLogWrapper>;\n compressionProgram?: Address<TAccountCompressionProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n message: MintV1InstructionDataArgs[\"message\"];\n}\n\nexport function getMintV1Instruction<\n TAccountTreeAuthority extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree extends string,\n TAccountPayer extends string,\n TAccountTreeDelegate extends string,\n TAccountLogWrapper extends string,\n TAccountCompressionProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n>(\n input: MintV1Input<\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountTreeDelegate,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): MintV1Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountTreeDelegate,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? BUBBLEGUM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n treeAuthority: { value: input.treeAuthority ?? null, isWritable: true },\n leafOwner: { value: input.leafOwner ?? null, isWritable: false },\n leafDelegate: { value: input.leafDelegate ?? null, isWritable: false },\n merkleTree: { value: input.merkleTree ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: false },\n treeDelegate: { value: input.treeDelegate ?? null, isWritable: false },\n logWrapper: { value: input.logWrapper ?? null, isWritable: false },\n compressionProgram: {\n value: input.compressionProgram ?? null,\n isWritable: false,\n },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedInstructionAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.logWrapper.value) {\n accounts.logWrapper.value =\n \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\" as Address<\"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\">;\n }\n if (!accounts.compressionProgram.value) {\n accounts.compressionProgram.value =\n \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\" as Address<\"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(\"treeAuthority\", accounts.treeAuthority),\n getAccountMeta(\"leafOwner\", accounts.leafOwner),\n getAccountMeta(\"leafDelegate\", accounts.leafDelegate),\n getAccountMeta(\"merkleTree\", accounts.merkleTree),\n getAccountMeta(\"payer\", accounts.payer),\n getAccountMeta(\"treeDelegate\", accounts.treeDelegate),\n getAccountMeta(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getMintV1InstructionDataEncoder().encode(\n args as MintV1InstructionDataArgs,\n ),\n programAddress,\n } as MintV1Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountTreeDelegate,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport interface ParsedMintV1Instruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> {\n programAddress: Address<TProgram>;\n accounts: {\n treeAuthority: TAccountMetas[0];\n leafOwner: TAccountMetas[1];\n leafDelegate: TAccountMetas[2];\n merkleTree: TAccountMetas[3];\n payer: TAccountMetas[4];\n treeDelegate: TAccountMetas[5];\n logWrapper: TAccountMetas[6];\n compressionProgram: TAccountMetas[7];\n systemProgram: TAccountMetas[8];\n };\n data: MintV1InstructionData;\n}\n\nexport function parseMintV1Instruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedMintV1Instruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 9) {\n throw new SolanaError(\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n {\n actualAccountMetas: instruction.accounts.length,\n expectedAccountMetas: 9,\n },\n );\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n treeAuthority: getNextAccount(),\n leafOwner: getNextAccount(),\n leafDelegate: getNextAccount(),\n merkleTree: getNextAccount(),\n payer: getNextAccount(),\n treeDelegate: getNextAccount(),\n logWrapper: getNextAccount(),\n compressionProgram: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getMintV1InstructionDataDecoder().decode(instruction.data),\n };\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"mintV1.js","names":[],"sources":["../../../src/generated/instructions/mintV1.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n SolanaError,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"@solana/kit\";\nimport {\n getAccountMetaFactory,\n getAddressFromResolvedInstructionAccount,\n type ResolvedInstructionAccount,\n} from \"@solana/program-client-core\";\nimport { findTreeConfigPda } from \"../pdas/index.js\";\nimport { BUBBLEGUM_PROGRAM_ADDRESS } from \"../programs/index.js\";\nimport {\n getMetadataArgsDecoder,\n getMetadataArgsEncoder,\n type MetadataArgs,\n type MetadataArgsArgs,\n} from \"../types/index.js\";\n\nexport const MINT_V1_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n 145, 98, 192, 118, 184, 147, 118, 104,\n]);\n\nexport function getMintV1DiscriminatorBytes(): ReadonlyUint8Array {\n return fixEncoderSize(getBytesEncoder(), 8).encode(MINT_V1_DISCRIMINATOR);\n}\n\nexport type MintV1Instruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountTreeAuthority extends string | AccountMeta<string> = string,\n TAccountLeafOwner extends string | AccountMeta<string> = string,\n TAccountLeafDelegate extends string | AccountMeta<string> = string,\n TAccountMerkleTree extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountTreeDelegate extends string | AccountMeta<string> = string,\n TAccountLogWrapper extends string | AccountMeta<string> =\n \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\",\n TAccountCompressionProgram extends string | AccountMeta<string> =\n \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\",\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountTreeAuthority extends string\n ? WritableAccount<TAccountTreeAuthority>\n : TAccountTreeAuthority,\n TAccountLeafOwner extends string\n ? ReadonlyAccount<TAccountLeafOwner>\n : TAccountLeafOwner,\n TAccountLeafDelegate extends string\n ? ReadonlyAccount<TAccountLeafDelegate>\n : TAccountLeafDelegate,\n TAccountMerkleTree extends string\n ? WritableAccount<TAccountMerkleTree>\n : TAccountMerkleTree,\n TAccountPayer extends string\n ? ReadonlySignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountTreeDelegate extends string\n ? ReadonlySignerAccount<TAccountTreeDelegate> &\n AccountSignerMeta<TAccountTreeDelegate>\n : TAccountTreeDelegate,\n TAccountLogWrapper extends string\n ? ReadonlyAccount<TAccountLogWrapper>\n : TAccountLogWrapper,\n TAccountCompressionProgram extends string\n ? ReadonlyAccount<TAccountCompressionProgram>\n : TAccountCompressionProgram,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type MintV1InstructionData = {\n discriminator: ReadonlyUint8Array;\n /** Metadata for the newly minted compressed NFT. */\n message: MetadataArgs;\n};\n\nexport type MintV1InstructionDataArgs = {\n /** Metadata for the newly minted compressed NFT. */\n message: MetadataArgsArgs;\n};\n\nexport function getMintV1InstructionDataEncoder(): Encoder<MintV1InstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"message\", getMetadataArgsEncoder()],\n ]),\n (value) => ({ ...value, discriminator: MINT_V1_DISCRIMINATOR }),\n );\n}\n\nexport function getMintV1InstructionDataDecoder(): Decoder<MintV1InstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"message\", getMetadataArgsDecoder()],\n ]);\n}\n\nexport function getMintV1InstructionDataCodec(): Codec<\n MintV1InstructionDataArgs,\n MintV1InstructionData\n> {\n return combineCodec(\n getMintV1InstructionDataEncoder(),\n getMintV1InstructionDataDecoder(),\n );\n}\n\nexport type MintV1AsyncInput<\n TAccountTreeAuthority extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree extends string = string,\n TAccountPayer extends string = string,\n TAccountTreeDelegate extends string = string,\n TAccountLogWrapper extends string = string,\n TAccountCompressionProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n /**\n * The tree's `TreeConfig` PDA, which stores its configuration and acts\n * as the tree's authority for CPIs into the compression program.\n */\n treeAuthority?: Address<TAccountTreeAuthority>;\n /** Owner of the compressed NFT leaf being operated on. */\n leafOwner: Address<TAccountLeafOwner>;\n /**\n * Delegate authority for the leaf; defaults to the leaf owner when no\n * delegate is set.\n */\n leafDelegate: Address<TAccountLeafDelegate>;\n /**\n * The concurrent Merkle tree account storing the compressed leaves,\n * owned by the account compression program.\n */\n merkleTree: Address<TAccountMerkleTree>;\n /** Account that pays for the transaction and any account rent. */\n payer: TransactionSigner<TAccountPayer>;\n /**\n * Delegate authority of the tree, authorized to mint into and manage\n * the tree on the creator's behalf.\n */\n treeDelegate: TransactionSigner<TAccountTreeDelegate>;\n /**\n * The SPL/MPL Noop program, used to log leaf data so off-chain indexers\n * can reconstruct the tree.\n */\n logWrapper?: Address<TAccountLogWrapper>;\n /**\n * The SPL/MPL Account Compression program that owns and manages the\n * Merkle tree.\n */\n compressionProgram?: Address<TAccountCompressionProgram>;\n /** The Solana System program. */\n systemProgram?: Address<TAccountSystemProgram>;\n message: MintV1InstructionDataArgs[\"message\"];\n};\n\n/**\n * Mints a new compressed NFT (V1) leaf and appends it to the tree.\n *\n * The tree delegate (or, for public trees, any signer) supplies the\n * leaf's `MetadataArgs`; Bubblegum hashes it, builds the `LeafSchema`,\n * and appends the resulting leaf to the Merkle tree.\n */\nexport async function getMintV1InstructionAsync<\n TAccountTreeAuthority extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree extends string,\n TAccountPayer extends string,\n TAccountTreeDelegate extends string,\n TAccountLogWrapper extends string,\n TAccountCompressionProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n>(\n input: MintV1AsyncInput<\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountTreeDelegate,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n MintV1Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountTreeDelegate,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? BUBBLEGUM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n treeAuthority: { value: input.treeAuthority ?? null, isWritable: true },\n leafOwner: { value: input.leafOwner ?? null, isWritable: false },\n leafDelegate: { value: input.leafDelegate ?? null, isWritable: false },\n merkleTree: { value: input.merkleTree ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: false },\n treeDelegate: { value: input.treeDelegate ?? null, isWritable: false },\n logWrapper: { value: input.logWrapper ?? null, isWritable: false },\n compressionProgram: {\n value: input.compressionProgram ?? null,\n isWritable: false,\n },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedInstructionAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.treeAuthority.value) {\n accounts.treeAuthority.value = await findTreeConfigPda({\n merkleTree: getAddressFromResolvedInstructionAccount(\n \"merkleTree\",\n accounts.merkleTree.value,\n ),\n });\n }\n if (!accounts.logWrapper.value) {\n accounts.logWrapper.value =\n \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\" as Address<\"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\">;\n }\n if (!accounts.compressionProgram.value) {\n accounts.compressionProgram.value =\n \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\" as Address<\"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(\"treeAuthority\", accounts.treeAuthority),\n getAccountMeta(\"leafOwner\", accounts.leafOwner),\n getAccountMeta(\"leafDelegate\", accounts.leafDelegate),\n getAccountMeta(\"merkleTree\", accounts.merkleTree),\n getAccountMeta(\"payer\", accounts.payer),\n getAccountMeta(\"treeDelegate\", accounts.treeDelegate),\n getAccountMeta(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getMintV1InstructionDataEncoder().encode(\n args as MintV1InstructionDataArgs,\n ),\n programAddress,\n } as MintV1Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountTreeDelegate,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport type MintV1Input<\n TAccountTreeAuthority extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree extends string = string,\n TAccountPayer extends string = string,\n TAccountTreeDelegate extends string = string,\n TAccountLogWrapper extends string = string,\n TAccountCompressionProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n /**\n * The tree's `TreeConfig` PDA, which stores its configuration and acts\n * as the tree's authority for CPIs into the compression program.\n */\n treeAuthority: Address<TAccountTreeAuthority>;\n /** Owner of the compressed NFT leaf being operated on. */\n leafOwner: Address<TAccountLeafOwner>;\n /**\n * Delegate authority for the leaf; defaults to the leaf owner when no\n * delegate is set.\n */\n leafDelegate: Address<TAccountLeafDelegate>;\n /**\n * The concurrent Merkle tree account storing the compressed leaves,\n * owned by the account compression program.\n */\n merkleTree: Address<TAccountMerkleTree>;\n /** Account that pays for the transaction and any account rent. */\n payer: TransactionSigner<TAccountPayer>;\n /**\n * Delegate authority of the tree, authorized to mint into and manage\n * the tree on the creator's behalf.\n */\n treeDelegate: TransactionSigner<TAccountTreeDelegate>;\n /**\n * The SPL/MPL Noop program, used to log leaf data so off-chain indexers\n * can reconstruct the tree.\n */\n logWrapper?: Address<TAccountLogWrapper>;\n /**\n * The SPL/MPL Account Compression program that owns and manages the\n * Merkle tree.\n */\n compressionProgram?: Address<TAccountCompressionProgram>;\n /** The Solana System program. */\n systemProgram?: Address<TAccountSystemProgram>;\n message: MintV1InstructionDataArgs[\"message\"];\n};\n\n/**\n * Mints a new compressed NFT (V1) leaf and appends it to the tree.\n *\n * The tree delegate (or, for public trees, any signer) supplies the\n * leaf's `MetadataArgs`; Bubblegum hashes it, builds the `LeafSchema`,\n * and appends the resulting leaf to the Merkle tree.\n */\nexport function getMintV1Instruction<\n TAccountTreeAuthority extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree extends string,\n TAccountPayer extends string,\n TAccountTreeDelegate extends string,\n TAccountLogWrapper extends string,\n TAccountCompressionProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n>(\n input: MintV1Input<\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountTreeDelegate,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): MintV1Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountTreeDelegate,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? BUBBLEGUM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n treeAuthority: { value: input.treeAuthority ?? null, isWritable: true },\n leafOwner: { value: input.leafOwner ?? null, isWritable: false },\n leafDelegate: { value: input.leafDelegate ?? null, isWritable: false },\n merkleTree: { value: input.merkleTree ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: false },\n treeDelegate: { value: input.treeDelegate ?? null, isWritable: false },\n logWrapper: { value: input.logWrapper ?? null, isWritable: false },\n compressionProgram: {\n value: input.compressionProgram ?? null,\n isWritable: false,\n },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedInstructionAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.logWrapper.value) {\n accounts.logWrapper.value =\n \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\" as Address<\"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\">;\n }\n if (!accounts.compressionProgram.value) {\n accounts.compressionProgram.value =\n \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\" as Address<\"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(\"treeAuthority\", accounts.treeAuthority),\n getAccountMeta(\"leafOwner\", accounts.leafOwner),\n getAccountMeta(\"leafDelegate\", accounts.leafDelegate),\n getAccountMeta(\"merkleTree\", accounts.merkleTree),\n getAccountMeta(\"payer\", accounts.payer),\n getAccountMeta(\"treeDelegate\", accounts.treeDelegate),\n getAccountMeta(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getMintV1InstructionDataEncoder().encode(\n args as MintV1InstructionDataArgs,\n ),\n programAddress,\n } as MintV1Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountTreeDelegate,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedMintV1Instruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /**\n * The tree's `TreeConfig` PDA, which stores its configuration and acts\n * as the tree's authority for CPIs into the compression program.\n */\n treeAuthority: TAccountMetas[0];\n /** Owner of the compressed NFT leaf being operated on. */\n leafOwner: TAccountMetas[1];\n /**\n * Delegate authority for the leaf; defaults to the leaf owner when no\n * delegate is set.\n */\n leafDelegate: TAccountMetas[2];\n /**\n * The concurrent Merkle tree account storing the compressed leaves,\n * owned by the account compression program.\n */\n merkleTree: TAccountMetas[3];\n /** Account that pays for the transaction and any account rent. */\n payer: TAccountMetas[4];\n /**\n * Delegate authority of the tree, authorized to mint into and manage\n * the tree on the creator's behalf.\n */\n treeDelegate: TAccountMetas[5];\n /**\n * The SPL/MPL Noop program, used to log leaf data so off-chain indexers\n * can reconstruct the tree.\n */\n logWrapper: TAccountMetas[6];\n /**\n * The SPL/MPL Account Compression program that owns and manages the\n * Merkle tree.\n */\n compressionProgram: TAccountMetas[7];\n /** The Solana System program. */\n systemProgram: TAccountMetas[8];\n };\n data: MintV1InstructionData;\n};\n\nexport function parseMintV1Instruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedMintV1Instruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 9) {\n throw new SolanaError(\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n {\n actualAccountMetas: instruction.accounts.length,\n expectedAccountMetas: 9,\n },\n );\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n treeAuthority: getNextAccount(),\n leafOwner: getNextAccount(),\n leafDelegate: getNextAccount(),\n merkleTree: getNextAccount(),\n payer: getNextAccount(),\n treeDelegate: getNextAccount(),\n logWrapper: getNextAccount(),\n compressionProgram: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getMintV1InstructionDataDecoder().decode(instruction.data),\n };\n}\n"],"mappings":"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"}
|
|
@@ -1,91 +1,237 @@
|
|
|
1
1
|
import { AssetDataSchema, AssetDataSchemaArgs } from "../types/assetDataSchema.js";
|
|
2
2
|
import { MetadataArgsV2, MetadataArgsV2Args } from "../types/metadataArgsV2.js";
|
|
3
|
+
import "../types/index.js";
|
|
3
4
|
import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/bubblegum.js";
|
|
5
|
+
import "../programs/index.js";
|
|
4
6
|
import { AccountMeta, AccountSignerMeta, Address, Codec, Decoder, Encoder, Instruction, InstructionWithAccounts, InstructionWithData, Option, OptionOrNullable, ReadonlyAccount, ReadonlySignerAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount, WritableSignerAccount } from "@solana/kit";
|
|
5
|
-
|
|
6
7
|
//#region src/generated/instructions/mintV2.d.ts
|
|
7
8
|
declare const MINT_V2_DISCRIMINATOR: ReadonlyUint8Array;
|
|
8
9
|
declare function getMintV2DiscriminatorBytes(): ReadonlyUint8Array;
|
|
9
10
|
type MintV2Instruction<TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS, TAccountTreeAuthority extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountTreeDelegate extends string | AccountMeta<string> = string, TAccountCollectionAuthority extends string | AccountMeta<string> = string, TAccountLeafOwner extends string | AccountMeta<string> = string, TAccountLeafDelegate extends string | AccountMeta<string> = string, TAccountMerkleTree extends string | AccountMeta<string> = string, TAccountCoreCollection extends string | AccountMeta<string> = string, TAccountMplCoreCpiSigner extends string | AccountMeta<string> = string, TAccountLogWrapper extends string | AccountMeta<string> = "mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3", TAccountCompressionProgram extends string | AccountMeta<string> = "mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW", TAccountMplCoreProgram extends string | AccountMeta<string> = "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountTreeAuthority extends string ? WritableAccount<TAccountTreeAuthority> : TAccountTreeAuthority, TAccountPayer extends string ? WritableSignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer> : TAccountPayer, TAccountTreeDelegate extends string ? ReadonlySignerAccount<TAccountTreeDelegate> & AccountSignerMeta<TAccountTreeDelegate> : TAccountTreeDelegate, TAccountCollectionAuthority extends string ? ReadonlySignerAccount<TAccountCollectionAuthority> & AccountSignerMeta<TAccountCollectionAuthority> : TAccountCollectionAuthority, TAccountLeafOwner extends string ? ReadonlyAccount<TAccountLeafOwner> : TAccountLeafOwner, TAccountLeafDelegate extends string ? ReadonlyAccount<TAccountLeafDelegate> : TAccountLeafDelegate, TAccountMerkleTree extends string ? WritableAccount<TAccountMerkleTree> : TAccountMerkleTree, TAccountCoreCollection extends string ? WritableAccount<TAccountCoreCollection> : TAccountCoreCollection, TAccountMplCoreCpiSigner extends string ? ReadonlyAccount<TAccountMplCoreCpiSigner> : TAccountMplCoreCpiSigner, TAccountLogWrapper extends string ? ReadonlyAccount<TAccountLogWrapper> : TAccountLogWrapper, TAccountCompressionProgram extends string ? ReadonlyAccount<TAccountCompressionProgram> : TAccountCompressionProgram, TAccountMplCoreProgram extends string ? ReadonlyAccount<TAccountMplCoreProgram> : TAccountMplCoreProgram, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, ...TRemainingAccounts]>;
|
|
10
|
-
|
|
11
|
+
type MintV2InstructionData = {
|
|
11
12
|
discriminator: ReadonlyUint8Array;
|
|
13
|
+
/** Metadata for the newly minted `LeafSchema` V2 asset. */
|
|
12
14
|
metadataArgs: MetadataArgsV2;
|
|
15
|
+
/**
|
|
16
|
+
* Optional raw asset data blob to associate with the newly minted
|
|
17
|
+
* asset. Reserved for future use.
|
|
18
|
+
*/
|
|
13
19
|
assetData: Option<ReadonlyUint8Array>;
|
|
20
|
+
/**
|
|
21
|
+
* Schema describing the format of `assetData`. Reserved for future
|
|
22
|
+
* use.
|
|
23
|
+
*/
|
|
14
24
|
assetDataSchema: Option<AssetDataSchema>;
|
|
15
|
-
}
|
|
16
|
-
|
|
25
|
+
};
|
|
26
|
+
type MintV2InstructionDataArgs = {
|
|
27
|
+
/** Metadata for the newly minted `LeafSchema` V2 asset. */
|
|
17
28
|
metadataArgs: MetadataArgsV2Args;
|
|
29
|
+
/**
|
|
30
|
+
* Optional raw asset data blob to associate with the newly minted
|
|
31
|
+
* asset. Reserved for future use.
|
|
32
|
+
*/
|
|
18
33
|
assetData: OptionOrNullable<ReadonlyUint8Array>;
|
|
34
|
+
/**
|
|
35
|
+
* Schema describing the format of `assetData`. Reserved for future
|
|
36
|
+
* use.
|
|
37
|
+
*/
|
|
19
38
|
assetDataSchema: OptionOrNullable<AssetDataSchemaArgs>;
|
|
20
|
-
}
|
|
39
|
+
};
|
|
21
40
|
declare function getMintV2InstructionDataEncoder(): Encoder<MintV2InstructionDataArgs>;
|
|
22
41
|
declare function getMintV2InstructionDataDecoder(): Decoder<MintV2InstructionData>;
|
|
23
42
|
declare function getMintV2InstructionDataCodec(): Codec<MintV2InstructionDataArgs, MintV2InstructionData>;
|
|
24
|
-
|
|
43
|
+
type MintV2AsyncInput<TAccountTreeAuthority extends string = string, TAccountPayer extends string = string, TAccountTreeDelegate extends string = string, TAccountCollectionAuthority extends string = string, TAccountLeafOwner extends string = string, TAccountLeafDelegate extends string = string, TAccountMerkleTree extends string = string, TAccountCoreCollection extends string = string, TAccountMplCoreCpiSigner extends string = string, TAccountLogWrapper extends string = string, TAccountCompressionProgram extends string = string, TAccountMplCoreProgram extends string = string, TAccountSystemProgram extends string = string> = {
|
|
44
|
+
/**
|
|
45
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
46
|
+
* as the tree's authority for CPIs into the compression program.
|
|
47
|
+
*/
|
|
25
48
|
treeAuthority?: Address<TAccountTreeAuthority>;
|
|
49
|
+
/** Account that pays for the transaction and any account rent. */
|
|
26
50
|
payer: TransactionSigner<TAccountPayer>;
|
|
27
|
-
/** Optional tree delegate, defaults to `payer
|
|
51
|
+
/** Optional tree delegate, defaults to `payer`. */
|
|
28
52
|
treeDelegate?: TransactionSigner<TAccountTreeDelegate>;
|
|
29
|
-
/** Optional collection authority, defaults to `
|
|
53
|
+
/** Optional collection authority, defaults to `treeDelegate`. */
|
|
30
54
|
collectionAuthority?: TransactionSigner<TAccountCollectionAuthority>;
|
|
55
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
31
56
|
leafOwner: Address<TAccountLeafOwner>;
|
|
57
|
+
/**
|
|
58
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
59
|
+
* delegate is set.
|
|
60
|
+
*/
|
|
32
61
|
leafDelegate?: Address<TAccountLeafDelegate>;
|
|
62
|
+
/**
|
|
63
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
64
|
+
* owned by the account compression program.
|
|
65
|
+
*/
|
|
33
66
|
merkleTree: Address<TAccountMerkleTree>;
|
|
67
|
+
/** MPL Core collection account the asset belongs to (V2 collections). */
|
|
34
68
|
coreCollection?: Address<TAccountCoreCollection>;
|
|
69
|
+
/**
|
|
70
|
+
* PDA Bubblegum uses to sign CPIs into the MPL Core program on behalf
|
|
71
|
+
* of a core collection.
|
|
72
|
+
*/
|
|
35
73
|
mplCoreCpiSigner?: Address<TAccountMplCoreCpiSigner>;
|
|
74
|
+
/**
|
|
75
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
76
|
+
* can reconstruct the tree.
|
|
77
|
+
*/
|
|
36
78
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
79
|
+
/**
|
|
80
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
81
|
+
* Merkle tree.
|
|
82
|
+
*/
|
|
37
83
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
84
|
+
/** The MPL Core program, invoked for V2 collection CPIs. */
|
|
38
85
|
mplCoreProgram?: Address<TAccountMplCoreProgram>;
|
|
86
|
+
/** The Solana System program. */
|
|
39
87
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
40
88
|
metadataArgs: MintV2InstructionDataArgs["metadataArgs"];
|
|
41
89
|
assetData: MintV2InstructionDataArgs["assetData"];
|
|
42
90
|
assetDataSchema: MintV2InstructionDataArgs["assetDataSchema"];
|
|
43
|
-
}
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Mints a new asset using `LeafSchema` V2 and optionally adds it to an
|
|
94
|
+
* MPL Core collection. Requires a tree created with `createTreeV2`.
|
|
95
|
+
*
|
|
96
|
+
* `LeafSchema` V2 enables new functionality over V1 minting:
|
|
97
|
+
*
|
|
98
|
+
* 1. Uses MPL Core collections instead of Token Metadata collections.
|
|
99
|
+
* 2. Uses the streamlined `MetadataArgsV2` arguments, which eliminate
|
|
100
|
+
* the collection verified flag: any collection included is
|
|
101
|
+
* automatically considered verified.
|
|
102
|
+
* 3. Allows plugins such as Royalties or Permanent Burn Delegate on the
|
|
103
|
+
* MPL Core collection to authorize operations on the Bubblegum
|
|
104
|
+
* asset. The `BubblegumV2` plugin must also be present on the MPL
|
|
105
|
+
* Core collection for it to be usable with Bubblegum.
|
|
106
|
+
* 4. Allows freezing/thawing of the asset, as well as marking it
|
|
107
|
+
* permanently non-transferable (soulbound).
|
|
108
|
+
* 5. Reserves (but does not yet use) an optional data blob and schema
|
|
109
|
+
* that can be associated with the asset.
|
|
110
|
+
*/
|
|
44
111
|
declare function getMintV2InstructionAsync<TAccountTreeAuthority extends string, TAccountPayer extends string, TAccountTreeDelegate extends string, TAccountCollectionAuthority extends string, TAccountLeafOwner extends string, TAccountLeafDelegate extends string, TAccountMerkleTree extends string, TAccountCoreCollection extends string, TAccountMplCoreCpiSigner extends string, TAccountLogWrapper extends string, TAccountCompressionProgram extends string, TAccountMplCoreProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS>(input: MintV2AsyncInput<TAccountTreeAuthority, TAccountPayer, TAccountTreeDelegate, TAccountCollectionAuthority, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountCoreCollection, TAccountMplCoreCpiSigner, TAccountLogWrapper, TAccountCompressionProgram, TAccountMplCoreProgram, TAccountSystemProgram>, config?: {
|
|
45
112
|
programAddress?: TProgramAddress;
|
|
46
113
|
}): Promise<MintV2Instruction<TProgramAddress, TAccountTreeAuthority, TAccountPayer, TAccountTreeDelegate, TAccountCollectionAuthority, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountCoreCollection, TAccountMplCoreCpiSigner, TAccountLogWrapper, TAccountCompressionProgram, TAccountMplCoreProgram, TAccountSystemProgram>>;
|
|
47
|
-
|
|
114
|
+
type MintV2Input<TAccountTreeAuthority extends string = string, TAccountPayer extends string = string, TAccountTreeDelegate extends string = string, TAccountCollectionAuthority extends string = string, TAccountLeafOwner extends string = string, TAccountLeafDelegate extends string = string, TAccountMerkleTree extends string = string, TAccountCoreCollection extends string = string, TAccountMplCoreCpiSigner extends string = string, TAccountLogWrapper extends string = string, TAccountCompressionProgram extends string = string, TAccountMplCoreProgram extends string = string, TAccountSystemProgram extends string = string> = {
|
|
115
|
+
/**
|
|
116
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
117
|
+
* as the tree's authority for CPIs into the compression program.
|
|
118
|
+
*/
|
|
48
119
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
120
|
+
/** Account that pays for the transaction and any account rent. */
|
|
49
121
|
payer: TransactionSigner<TAccountPayer>;
|
|
50
|
-
/** Optional tree delegate, defaults to `payer
|
|
122
|
+
/** Optional tree delegate, defaults to `payer`. */
|
|
51
123
|
treeDelegate?: TransactionSigner<TAccountTreeDelegate>;
|
|
52
|
-
/** Optional collection authority, defaults to `
|
|
124
|
+
/** Optional collection authority, defaults to `treeDelegate`. */
|
|
53
125
|
collectionAuthority?: TransactionSigner<TAccountCollectionAuthority>;
|
|
126
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
54
127
|
leafOwner: Address<TAccountLeafOwner>;
|
|
128
|
+
/**
|
|
129
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
130
|
+
* delegate is set.
|
|
131
|
+
*/
|
|
55
132
|
leafDelegate?: Address<TAccountLeafDelegate>;
|
|
133
|
+
/**
|
|
134
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
135
|
+
* owned by the account compression program.
|
|
136
|
+
*/
|
|
56
137
|
merkleTree: Address<TAccountMerkleTree>;
|
|
138
|
+
/** MPL Core collection account the asset belongs to (V2 collections). */
|
|
57
139
|
coreCollection?: Address<TAccountCoreCollection>;
|
|
140
|
+
/**
|
|
141
|
+
* PDA Bubblegum uses to sign CPIs into the MPL Core program on behalf
|
|
142
|
+
* of a core collection.
|
|
143
|
+
*/
|
|
58
144
|
mplCoreCpiSigner?: Address<TAccountMplCoreCpiSigner>;
|
|
145
|
+
/**
|
|
146
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
147
|
+
* can reconstruct the tree.
|
|
148
|
+
*/
|
|
59
149
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
150
|
+
/**
|
|
151
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
152
|
+
* Merkle tree.
|
|
153
|
+
*/
|
|
60
154
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
155
|
+
/** The MPL Core program, invoked for V2 collection CPIs. */
|
|
61
156
|
mplCoreProgram?: Address<TAccountMplCoreProgram>;
|
|
157
|
+
/** The Solana System program. */
|
|
62
158
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
63
159
|
metadataArgs: MintV2InstructionDataArgs["metadataArgs"];
|
|
64
160
|
assetData: MintV2InstructionDataArgs["assetData"];
|
|
65
161
|
assetDataSchema: MintV2InstructionDataArgs["assetDataSchema"];
|
|
66
|
-
}
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Mints a new asset using `LeafSchema` V2 and optionally adds it to an
|
|
165
|
+
* MPL Core collection. Requires a tree created with `createTreeV2`.
|
|
166
|
+
*
|
|
167
|
+
* `LeafSchema` V2 enables new functionality over V1 minting:
|
|
168
|
+
*
|
|
169
|
+
* 1. Uses MPL Core collections instead of Token Metadata collections.
|
|
170
|
+
* 2. Uses the streamlined `MetadataArgsV2` arguments, which eliminate
|
|
171
|
+
* the collection verified flag: any collection included is
|
|
172
|
+
* automatically considered verified.
|
|
173
|
+
* 3. Allows plugins such as Royalties or Permanent Burn Delegate on the
|
|
174
|
+
* MPL Core collection to authorize operations on the Bubblegum
|
|
175
|
+
* asset. The `BubblegumV2` plugin must also be present on the MPL
|
|
176
|
+
* Core collection for it to be usable with Bubblegum.
|
|
177
|
+
* 4. Allows freezing/thawing of the asset, as well as marking it
|
|
178
|
+
* permanently non-transferable (soulbound).
|
|
179
|
+
* 5. Reserves (but does not yet use) an optional data blob and schema
|
|
180
|
+
* that can be associated with the asset.
|
|
181
|
+
*/
|
|
67
182
|
declare function getMintV2Instruction<TAccountTreeAuthority extends string, TAccountPayer extends string, TAccountTreeDelegate extends string, TAccountCollectionAuthority extends string, TAccountLeafOwner extends string, TAccountLeafDelegate extends string, TAccountMerkleTree extends string, TAccountCoreCollection extends string, TAccountMplCoreCpiSigner extends string, TAccountLogWrapper extends string, TAccountCompressionProgram extends string, TAccountMplCoreProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS>(input: MintV2Input<TAccountTreeAuthority, TAccountPayer, TAccountTreeDelegate, TAccountCollectionAuthority, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountCoreCollection, TAccountMplCoreCpiSigner, TAccountLogWrapper, TAccountCompressionProgram, TAccountMplCoreProgram, TAccountSystemProgram>, config?: {
|
|
68
183
|
programAddress?: TProgramAddress;
|
|
69
184
|
}): MintV2Instruction<TProgramAddress, TAccountTreeAuthority, TAccountPayer, TAccountTreeDelegate, TAccountCollectionAuthority, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountCoreCollection, TAccountMplCoreCpiSigner, TAccountLogWrapper, TAccountCompressionProgram, TAccountMplCoreProgram, TAccountSystemProgram>;
|
|
70
|
-
|
|
185
|
+
type ParsedMintV2Instruction<TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
71
186
|
programAddress: Address<TProgram>;
|
|
72
187
|
accounts: {
|
|
188
|
+
/**
|
|
189
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
190
|
+
* as the tree's authority for CPIs into the compression program.
|
|
191
|
+
*/
|
|
73
192
|
treeAuthority: TAccountMetas[0];
|
|
74
|
-
|
|
75
|
-
|
|
193
|
+
/** Account that pays for the transaction and any account rent. */
|
|
194
|
+
payer: TAccountMetas[1];
|
|
195
|
+
/** Optional tree delegate, defaults to `payer`. */
|
|
196
|
+
treeDelegate?: TAccountMetas[2] | undefined;
|
|
197
|
+
/** Optional collection authority, defaults to `treeDelegate`. */
|
|
76
198
|
collectionAuthority?: TAccountMetas[3] | undefined;
|
|
199
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
77
200
|
leafOwner: TAccountMetas[4];
|
|
201
|
+
/**
|
|
202
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
203
|
+
* delegate is set.
|
|
204
|
+
*/
|
|
78
205
|
leafDelegate?: TAccountMetas[5] | undefined;
|
|
206
|
+
/**
|
|
207
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
208
|
+
* owned by the account compression program.
|
|
209
|
+
*/
|
|
79
210
|
merkleTree: TAccountMetas[6];
|
|
211
|
+
/** MPL Core collection account the asset belongs to (V2 collections). */
|
|
80
212
|
coreCollection?: TAccountMetas[7] | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* PDA Bubblegum uses to sign CPIs into the MPL Core program on behalf
|
|
215
|
+
* of a core collection.
|
|
216
|
+
*/
|
|
81
217
|
mplCoreCpiSigner?: TAccountMetas[8] | undefined;
|
|
218
|
+
/**
|
|
219
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
220
|
+
* can reconstruct the tree.
|
|
221
|
+
*/
|
|
82
222
|
logWrapper: TAccountMetas[9];
|
|
223
|
+
/**
|
|
224
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
225
|
+
* Merkle tree.
|
|
226
|
+
*/
|
|
83
227
|
compressionProgram: TAccountMetas[10];
|
|
228
|
+
/** The MPL Core program, invoked for V2 collection CPIs. */
|
|
84
229
|
mplCoreProgram: TAccountMetas[11];
|
|
230
|
+
/** The Solana System program. */
|
|
85
231
|
systemProgram: TAccountMetas[12];
|
|
86
232
|
};
|
|
87
233
|
data: MintV2InstructionData;
|
|
88
|
-
}
|
|
234
|
+
};
|
|
89
235
|
declare function parseMintV2Instruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedMintV2Instruction<TProgram, TAccountMetas>;
|
|
90
236
|
//#endregion
|
|
91
237
|
export { MINT_V2_DISCRIMINATOR, MintV2AsyncInput, MintV2Input, MintV2Instruction, MintV2InstructionData, MintV2InstructionDataArgs, ParsedMintV2Instruction, getMintV2DiscriminatorBytes, getMintV2Instruction, getMintV2InstructionAsync, getMintV2InstructionDataCodec, getMintV2InstructionDataDecoder, getMintV2InstructionDataEncoder, parseMintV2Instruction };
|