@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
|
@@ -5,6 +5,7 @@ import { MetadataSeeds, findMetadataPda } from "./pdas/metadata.js";
|
|
|
5
5
|
import { MintAuthoritySeeds, findMintAuthorityPda } from "./pdas/mintAuthority.js";
|
|
6
6
|
import { TreeConfigSeeds, findTreeConfigPda } from "./pdas/treeConfig.js";
|
|
7
7
|
import { VoucherSeeds, findVoucherPda } from "./pdas/voucher.js";
|
|
8
|
+
import "./pdas/index.js";
|
|
8
9
|
import { AssetDataSchema, AssetDataSchemaArgs, getAssetDataSchemaCodec, getAssetDataSchemaDecoder, getAssetDataSchemaEncoder } from "./types/assetDataSchema.js";
|
|
9
10
|
import { BubblegumEventType, BubblegumEventTypeArgs, getBubblegumEventTypeCodec, getBubblegumEventTypeDecoder, getBubblegumEventTypeEncoder } from "./types/bubblegumEventType.js";
|
|
10
11
|
import { Collection, CollectionArgs, getCollectionCodec, getCollectionDecoder, getCollectionEncoder } from "./types/collection.js";
|
|
@@ -20,11 +21,15 @@ import { UpdateArgs, UpdateArgsArgs, getUpdateArgsCodec, getUpdateArgsDecoder, g
|
|
|
20
21
|
import { UseMethod, UseMethodArgs, getUseMethodCodec, getUseMethodDecoder, getUseMethodEncoder } from "./types/useMethod.js";
|
|
21
22
|
import { Uses, UsesArgs, getUsesCodec, getUsesDecoder, getUsesEncoder } from "./types/uses.js";
|
|
22
23
|
import { Version, VersionArgs, getVersionCodec, getVersionDecoder, getVersionEncoder } from "./types/version.js";
|
|
24
|
+
import "./types/index.js";
|
|
23
25
|
import { TREE_CONFIG_DISCRIMINATOR, TreeConfig, TreeConfigArgs, decodeTreeConfig, fetchAllMaybeTreeConfig, fetchAllTreeConfig, fetchMaybeTreeConfig, fetchMaybeTreeConfigFromSeeds, fetchTreeConfig, fetchTreeConfigFromSeeds, getTreeConfigCodec, getTreeConfigDecoder, getTreeConfigDiscriminatorBytes, getTreeConfigEncoder } from "./accounts/treeConfig.js";
|
|
24
26
|
import { VOUCHER_DISCRIMINATOR, Voucher, VoucherArgs, decodeVoucher, fetchAllMaybeVoucher, fetchAllVoucher, fetchMaybeVoucher, fetchMaybeVoucherFromSeeds, fetchVoucher, fetchVoucherFromSeeds, getVoucherCodec, getVoucherDecoder, getVoucherDiscriminatorBytes, getVoucherEncoder } from "./accounts/voucher.js";
|
|
27
|
+
import "./accounts/index.js";
|
|
25
28
|
import { BUBBLEGUM_ERROR__ALREADY_IN_COLLECTION, BUBBLEGUM_ERROR__ALREADY_NOT_IN_COLLECTION, BUBBLEGUM_ERROR__ALREADY_UNVERIFIED, BUBBLEGUM_ERROR__ALREADY_VERIFIED, BUBBLEGUM_ERROR__ASSET_DATA_LENGTH_TOO_LONG, BUBBLEGUM_ERROR__ASSET_IS_FROZEN, BUBBLEGUM_ERROR__ASSET_IS_NON_TRANSFERABLE, BUBBLEGUM_ERROR__ASSET_IS_NOT_FROZEN, BUBBLEGUM_ERROR__ASSET_OWNER_MISMATCH, BUBBLEGUM_ERROR__COLLECTION_CANNOT_BE_VERIFIED_IN_THIS_INSTRUCTION, BUBBLEGUM_ERROR__COLLECTION_IS_FROZEN, BUBBLEGUM_ERROR__COLLECTION_MASTER_EDITION_ACCOUNT_INVALID, BUBBLEGUM_ERROR__COLLECTION_MISMATCH, BUBBLEGUM_ERROR__COLLECTION_MUST_BE_A_UNIQUE_MASTER_EDITION, BUBBLEGUM_ERROR__COLLECTION_MUST_BE_SIZED, BUBBLEGUM_ERROR__COLLECTION_MUST_HAVE_BUBBLEGUM_PLUGIN, BUBBLEGUM_ERROR__COLLECTION_NOT_FOUND, BUBBLEGUM_ERROR__CREATORS_TOO_LONG, BUBBLEGUM_ERROR__CREATOR_DID_NOT_UNVERIFY, BUBBLEGUM_ERROR__CREATOR_DID_NOT_VERIFY, BUBBLEGUM_ERROR__CREATOR_HASH_MISMATCH, BUBBLEGUM_ERROR__CREATOR_NOT_FOUND, BUBBLEGUM_ERROR__CREATOR_SHARE_TOTAL_MUST_BE100, BUBBLEGUM_ERROR__DATA_HASH_MISMATCH, BUBBLEGUM_ERROR__DECOMPRESSION_DISABLED, BUBBLEGUM_ERROR__DUPLICATE_CREATOR_ADDRESS, BUBBLEGUM_ERROR__HASHING_MISMATCH, BUBBLEGUM_ERROR__INCORRECT_OWNER, BUBBLEGUM_ERROR__INSUFFICIENT_MINT_CAPACITY, BUBBLEGUM_ERROR__INVALID_AUTHORITY, BUBBLEGUM_ERROR__INVALID_CANOPY_SIZE, BUBBLEGUM_ERROR__INVALID_COLLECTION_AUTHORITY, BUBBLEGUM_ERROR__INVALID_COMPRESSION_PROGRAM, BUBBLEGUM_ERROR__INVALID_DELEGATE_RECORD, BUBBLEGUM_ERROR__INVALID_LOG_WRAPPER, BUBBLEGUM_ERROR__INVALID_TOKEN_STANDARD, BUBBLEGUM_ERROR__LEAF_AUTHORITY_MUST_SIGN, BUBBLEGUM_ERROR__LEAF_MUST_BE_DELEGATED, BUBBLEGUM_ERROR__METADATA_BASIS_POINTS_TOO_HIGH, BUBBLEGUM_ERROR__METADATA_IMMUTABLE, BUBBLEGUM_ERROR__METADATA_MINT_MISMATCH, BUBBLEGUM_ERROR__METADATA_NAME_TOO_LONG, BUBBLEGUM_ERROR__METADATA_SYMBOL_TOO_LONG, BUBBLEGUM_ERROR__METADATA_URI_TOO_LONG, BUBBLEGUM_ERROR__MISSING_COLLECTION_ACCOUNT, BUBBLEGUM_ERROR__MISSING_COLLECTION_METADATA_ACCOUNT, BUBBLEGUM_ERROR__MISSING_COLLECTION_MINT_ACCOUNT, BUBBLEGUM_ERROR__MISSING_MPL_CORE_CPI_SIGNER_ACCOUNT, BUBBLEGUM_ERROR__NOT_AVAILABLE, BUBBLEGUM_ERROR__NO_CREATORS_PRESENT, BUBBLEGUM_ERROR__NUMERICAL_OVERFLOW_ERROR, BUBBLEGUM_ERROR__PRIMARY_SALE_CAN_ONLY_BE_FLIPPED_TO_TRUE, BUBBLEGUM_ERROR__PUBLIC_KEY_MISMATCH, BUBBLEGUM_ERROR__TREE_AUTHORITY_INCORRECT, BUBBLEGUM_ERROR__UNKNOWN_EXTERNAL_ERROR, BUBBLEGUM_ERROR__UNSUPPORTED_SCHEMA_VERSION, BUBBLEGUM_ERROR__UPDATE_AUTHORITY_INCORRECT, BubblegumError, getBubblegumErrorMessage, isBubblegumError } from "./errors/bubblegum.js";
|
|
29
|
+
import "./errors/index.js";
|
|
26
30
|
import { BUBBLEGUM_PROGRAM_ADDRESS, BubblegumAccount, BubblegumInstruction, BubblegumPlugin, BubblegumPluginAccounts, BubblegumPluginInstructions, BubblegumPluginPdas, BubblegumPluginRequirements, ParsedBubblegumInstruction, bubblegumProgram, identifyBubblegumAccount, identifyBubblegumInstruction, parseBubblegumInstruction } from "./programs/bubblegum.js";
|
|
27
31
|
import { MPL_TOKEN_METADATA_PROGRAM_ADDRESS, MplTokenMetadataPlugin, MplTokenMetadataPluginPdas, MplTokenMetadataPluginRequirements, mplTokenMetadataProgram } from "./programs/mplTokenMetadata.js";
|
|
32
|
+
import "./programs/index.js";
|
|
28
33
|
import { BURN_DISCRIMINATOR, BurnAsyncInput, BurnInput, BurnInstruction, BurnInstructionData, BurnInstructionDataArgs, ParsedBurnInstruction, getBurnDiscriminatorBytes, getBurnInstruction, getBurnInstructionAsync, getBurnInstructionDataCodec, getBurnInstructionDataDecoder, getBurnInstructionDataEncoder, parseBurnInstruction } from "./instructions/burn.js";
|
|
29
34
|
import { BURN_V2_DISCRIMINATOR, BurnV2AsyncInput, BurnV2Input, BurnV2Instruction, BurnV2InstructionData, BurnV2InstructionDataArgs, ParsedBurnV2Instruction, getBurnV2DiscriminatorBytes, getBurnV2Instruction, getBurnV2InstructionAsync, getBurnV2InstructionDataCodec, getBurnV2InstructionDataDecoder, getBurnV2InstructionDataEncoder, parseBurnV2Instruction } from "./instructions/burnV2.js";
|
|
30
35
|
import { CANCEL_REDEEM_DISCRIMINATOR, CancelRedeemAsyncInput, CancelRedeemInput, CancelRedeemInstruction, CancelRedeemInstructionData, CancelRedeemInstructionDataArgs, ParsedCancelRedeemInstruction, getCancelRedeemDiscriminatorBytes, getCancelRedeemInstruction, getCancelRedeemInstructionAsync, getCancelRedeemInstructionDataCodec, getCancelRedeemInstructionDataDecoder, getCancelRedeemInstructionDataEncoder, parseCancelRedeemInstruction } from "./instructions/cancelRedeem.js";
|
|
@@ -60,4 +65,6 @@ import { ParsedUpdateMetadataInstruction, UPDATE_METADATA_DISCRIMINATOR, UpdateM
|
|
|
60
65
|
import { ParsedUpdateMetadataV2Instruction, UPDATE_METADATA_V2_DISCRIMINATOR, UpdateMetadataV2AsyncInput, UpdateMetadataV2Input, UpdateMetadataV2Instruction, UpdateMetadataV2InstructionData, UpdateMetadataV2InstructionDataArgs, getUpdateMetadataV2DiscriminatorBytes, getUpdateMetadataV2Instruction, getUpdateMetadataV2InstructionAsync, getUpdateMetadataV2InstructionDataCodec, getUpdateMetadataV2InstructionDataDecoder, getUpdateMetadataV2InstructionDataEncoder, parseUpdateMetadataV2Instruction } from "./instructions/updateMetadataV2.js";
|
|
61
66
|
import { ParsedVerifyCollectionInstruction, VERIFY_COLLECTION_DISCRIMINATOR, VerifyCollectionAsyncInput, VerifyCollectionInput, VerifyCollectionInstruction, VerifyCollectionInstructionData, VerifyCollectionInstructionDataArgs, getVerifyCollectionDiscriminatorBytes, getVerifyCollectionInstruction, getVerifyCollectionInstructionAsync, getVerifyCollectionInstructionDataCodec, getVerifyCollectionInstructionDataDecoder, getVerifyCollectionInstructionDataEncoder, parseVerifyCollectionInstruction } from "./instructions/verifyCollection.js";
|
|
62
67
|
import { ParsedVerifyCreatorInstruction, VERIFY_CREATOR_DISCRIMINATOR, VerifyCreatorAsyncInput, VerifyCreatorInput, VerifyCreatorInstruction, VerifyCreatorInstructionData, VerifyCreatorInstructionDataArgs, getVerifyCreatorDiscriminatorBytes, getVerifyCreatorInstruction, getVerifyCreatorInstructionAsync, getVerifyCreatorInstructionDataCodec, getVerifyCreatorInstructionDataDecoder, getVerifyCreatorInstructionDataEncoder, parseVerifyCreatorInstruction } from "./instructions/verifyCreator.js";
|
|
63
|
-
import { ParsedVerifyCreatorV2Instruction, VERIFY_CREATOR_V2_DISCRIMINATOR, VerifyCreatorV2AsyncInput, VerifyCreatorV2Input, VerifyCreatorV2Instruction, VerifyCreatorV2InstructionData, VerifyCreatorV2InstructionDataArgs, getVerifyCreatorV2DiscriminatorBytes, getVerifyCreatorV2Instruction, getVerifyCreatorV2InstructionAsync, getVerifyCreatorV2InstructionDataCodec, getVerifyCreatorV2InstructionDataDecoder, getVerifyCreatorV2InstructionDataEncoder, parseVerifyCreatorV2Instruction } from "./instructions/verifyCreatorV2.js";
|
|
68
|
+
import { ParsedVerifyCreatorV2Instruction, VERIFY_CREATOR_V2_DISCRIMINATOR, VerifyCreatorV2AsyncInput, VerifyCreatorV2Input, VerifyCreatorV2Instruction, VerifyCreatorV2InstructionData, VerifyCreatorV2InstructionDataArgs, getVerifyCreatorV2DiscriminatorBytes, getVerifyCreatorV2Instruction, getVerifyCreatorV2InstructionAsync, getVerifyCreatorV2InstructionDataCodec, getVerifyCreatorV2InstructionDataDecoder, getVerifyCreatorV2InstructionDataEncoder, parseVerifyCreatorV2Instruction } from "./instructions/verifyCreatorV2.js";
|
|
69
|
+
import "./instructions/index.js";
|
|
70
|
+
export { AssetDataSchema, AssetDataSchemaArgs, AssetIdSeeds, BUBBLEGUM_ERROR__ALREADY_IN_COLLECTION, BUBBLEGUM_ERROR__ALREADY_NOT_IN_COLLECTION, BUBBLEGUM_ERROR__ALREADY_UNVERIFIED, BUBBLEGUM_ERROR__ALREADY_VERIFIED, BUBBLEGUM_ERROR__ASSET_DATA_LENGTH_TOO_LONG, BUBBLEGUM_ERROR__ASSET_IS_FROZEN, BUBBLEGUM_ERROR__ASSET_IS_NON_TRANSFERABLE, BUBBLEGUM_ERROR__ASSET_IS_NOT_FROZEN, BUBBLEGUM_ERROR__ASSET_OWNER_MISMATCH, BUBBLEGUM_ERROR__COLLECTION_CANNOT_BE_VERIFIED_IN_THIS_INSTRUCTION, BUBBLEGUM_ERROR__COLLECTION_IS_FROZEN, BUBBLEGUM_ERROR__COLLECTION_MASTER_EDITION_ACCOUNT_INVALID, BUBBLEGUM_ERROR__COLLECTION_MISMATCH, BUBBLEGUM_ERROR__COLLECTION_MUST_BE_A_UNIQUE_MASTER_EDITION, BUBBLEGUM_ERROR__COLLECTION_MUST_BE_SIZED, BUBBLEGUM_ERROR__COLLECTION_MUST_HAVE_BUBBLEGUM_PLUGIN, BUBBLEGUM_ERROR__COLLECTION_NOT_FOUND, BUBBLEGUM_ERROR__CREATORS_TOO_LONG, BUBBLEGUM_ERROR__CREATOR_DID_NOT_UNVERIFY, BUBBLEGUM_ERROR__CREATOR_DID_NOT_VERIFY, BUBBLEGUM_ERROR__CREATOR_HASH_MISMATCH, BUBBLEGUM_ERROR__CREATOR_NOT_FOUND, BUBBLEGUM_ERROR__CREATOR_SHARE_TOTAL_MUST_BE100, BUBBLEGUM_ERROR__DATA_HASH_MISMATCH, BUBBLEGUM_ERROR__DECOMPRESSION_DISABLED, BUBBLEGUM_ERROR__DUPLICATE_CREATOR_ADDRESS, BUBBLEGUM_ERROR__HASHING_MISMATCH, BUBBLEGUM_ERROR__INCORRECT_OWNER, BUBBLEGUM_ERROR__INSUFFICIENT_MINT_CAPACITY, BUBBLEGUM_ERROR__INVALID_AUTHORITY, BUBBLEGUM_ERROR__INVALID_CANOPY_SIZE, BUBBLEGUM_ERROR__INVALID_COLLECTION_AUTHORITY, BUBBLEGUM_ERROR__INVALID_COMPRESSION_PROGRAM, BUBBLEGUM_ERROR__INVALID_DELEGATE_RECORD, BUBBLEGUM_ERROR__INVALID_LOG_WRAPPER, BUBBLEGUM_ERROR__INVALID_TOKEN_STANDARD, BUBBLEGUM_ERROR__LEAF_AUTHORITY_MUST_SIGN, BUBBLEGUM_ERROR__LEAF_MUST_BE_DELEGATED, BUBBLEGUM_ERROR__METADATA_BASIS_POINTS_TOO_HIGH, BUBBLEGUM_ERROR__METADATA_IMMUTABLE, BUBBLEGUM_ERROR__METADATA_MINT_MISMATCH, BUBBLEGUM_ERROR__METADATA_NAME_TOO_LONG, BUBBLEGUM_ERROR__METADATA_SYMBOL_TOO_LONG, BUBBLEGUM_ERROR__METADATA_URI_TOO_LONG, BUBBLEGUM_ERROR__MISSING_COLLECTION_ACCOUNT, BUBBLEGUM_ERROR__MISSING_COLLECTION_METADATA_ACCOUNT, BUBBLEGUM_ERROR__MISSING_COLLECTION_MINT_ACCOUNT, BUBBLEGUM_ERROR__MISSING_MPL_CORE_CPI_SIGNER_ACCOUNT, BUBBLEGUM_ERROR__NOT_AVAILABLE, BUBBLEGUM_ERROR__NO_CREATORS_PRESENT, BUBBLEGUM_ERROR__NUMERICAL_OVERFLOW_ERROR, BUBBLEGUM_ERROR__PRIMARY_SALE_CAN_ONLY_BE_FLIPPED_TO_TRUE, BUBBLEGUM_ERROR__PUBLIC_KEY_MISMATCH, BUBBLEGUM_ERROR__TREE_AUTHORITY_INCORRECT, BUBBLEGUM_ERROR__UNKNOWN_EXTERNAL_ERROR, BUBBLEGUM_ERROR__UNSUPPORTED_SCHEMA_VERSION, BUBBLEGUM_ERROR__UPDATE_AUTHORITY_INCORRECT, BUBBLEGUM_PROGRAM_ADDRESS, BURN_DISCRIMINATOR, BURN_V2_DISCRIMINATOR, BubblegumAccount, BubblegumError, BubblegumEventType, BubblegumEventTypeArgs, BubblegumInstruction, BubblegumPlugin, BubblegumPluginAccounts, BubblegumPluginInstructions, BubblegumPluginPdas, BubblegumPluginRequirements, BurnAsyncInput, BurnInput, BurnInstruction, BurnInstructionData, BurnInstructionDataArgs, BurnV2AsyncInput, BurnV2Input, BurnV2Instruction, BurnV2InstructionData, BurnV2InstructionDataArgs, CANCEL_REDEEM_DISCRIMINATOR, CLOSE_TREE_V2_DISCRIMINATOR, COLLECT_V2_DISCRIMINATOR, COMPRESS_DISCRIMINATOR, CREATE_TREE_DISCRIMINATOR, CREATE_TREE_V2_DISCRIMINATOR, CancelRedeemAsyncInput, CancelRedeemInput, CancelRedeemInstruction, CancelRedeemInstructionData, CancelRedeemInstructionDataArgs, CloseTreeV2AsyncInput, CloseTreeV2Input, CloseTreeV2Instruction, CloseTreeV2InstructionData, CloseTreeV2InstructionDataArgs, CollectV2Input, CollectV2Instruction, CollectV2InstructionData, CollectV2InstructionDataArgs, Collection, CollectionArgs, CompressAsyncInput, CompressInput, CompressInstruction, CompressInstructionData, CompressInstructionDataArgs, CreateTreeAsyncInput, CreateTreeInput, CreateTreeInstruction, CreateTreeInstructionData, CreateTreeInstructionDataArgs, CreateTreeV2AsyncInput, CreateTreeV2Input, CreateTreeV2Instruction, CreateTreeV2InstructionData, CreateTreeV2InstructionDataArgs, Creator, CreatorArgs, DECOMPRESS_V1_DISCRIMINATOR, DELEGATE_AND_FREEZE_V2_DISCRIMINATOR, DELEGATE_DISCRIMINATOR, DELEGATE_V2_DISCRIMINATOR, DecompressV1AsyncInput, DecompressV1Input, DecompressV1Instruction, DecompressV1InstructionData, DecompressV1InstructionDataArgs, DecompressibleState, DecompressibleStateArgs, DelegateAndFreezeV2AsyncInput, DelegateAndFreezeV2Input, DelegateAndFreezeV2Instruction, DelegateAndFreezeV2InstructionData, DelegateAndFreezeV2InstructionDataArgs, DelegateAsyncInput, DelegateInput, DelegateInstruction, DelegateInstructionData, DelegateInstructionDataArgs, DelegateV2AsyncInput, DelegateV2Input, DelegateV2Instruction, DelegateV2InstructionData, DelegateV2InstructionDataArgs, FREEZE_V2_DISCRIMINATOR, FreezeV2AsyncInput, FreezeV2Input, FreezeV2Instruction, FreezeV2InstructionData, FreezeV2InstructionDataArgs, InstructionName, InstructionNameArgs, LeafSchema, LeafSchemaArgs, MINT_TO_COLLECTION_V1_DISCRIMINATOR, MINT_V1_DISCRIMINATOR, MINT_V2_DISCRIMINATOR, MPL_TOKEN_METADATA_PROGRAM_ADDRESS, MasterEditionSeeds, MetadataArgs, MetadataArgsArgs, MetadataArgsV2, MetadataArgsV2Args, MetadataSeeds, MintAuthoritySeeds, MintToCollectionV1AsyncInput, MintToCollectionV1Input, MintToCollectionV1Instruction, MintToCollectionV1InstructionData, MintToCollectionV1InstructionDataArgs, MintV1AsyncInput, MintV1Input, MintV1Instruction, MintV1InstructionData, MintV1InstructionDataArgs, MintV2AsyncInput, MintV2Input, MintV2Instruction, MintV2InstructionData, MintV2InstructionDataArgs, MplTokenMetadataPlugin, MplTokenMetadataPluginPdas, MplTokenMetadataPluginRequirements, ParsedBubblegumInstruction, ParsedBurnInstruction, ParsedBurnV2Instruction, ParsedCancelRedeemInstruction, ParsedCloseTreeV2Instruction, ParsedCollectV2Instruction, ParsedCompressInstruction, ParsedCreateTreeInstruction, ParsedCreateTreeV2Instruction, ParsedDecompressV1Instruction, ParsedDelegateAndFreezeV2Instruction, ParsedDelegateInstruction, ParsedDelegateV2Instruction, ParsedFreezeV2Instruction, ParsedMintToCollectionV1Instruction, ParsedMintV1Instruction, ParsedMintV2Instruction, ParsedRedeemInstruction, ParsedSetAndVerifyCollectionInstruction, ParsedSetCollectionV2Instruction, ParsedSetDecompressableStateInstruction, ParsedSetDecompressibleStateInstruction, ParsedSetNonTransferableV2Instruction, ParsedSetTreeDelegateInstruction, ParsedThawAndRevokeV2Instruction, ParsedThawV2Instruction, ParsedTransferInstruction, ParsedTransferV2Instruction, ParsedUnverifyCollectionInstruction, ParsedUnverifyCreatorInstruction, ParsedUnverifyCreatorV2Instruction, ParsedUpdateAssetDataV2Instruction, ParsedUpdateMetadataInstruction, ParsedUpdateMetadataV2Instruction, ParsedVerifyCollectionInstruction, ParsedVerifyCreatorInstruction, ParsedVerifyCreatorV2Instruction, REDEEM_DISCRIMINATOR, RedeemAsyncInput, RedeemInput, RedeemInstruction, RedeemInstructionData, RedeemInstructionDataArgs, SET_AND_VERIFY_COLLECTION_DISCRIMINATOR, SET_COLLECTION_V2_DISCRIMINATOR, SET_DECOMPRESSABLE_STATE_DISCRIMINATOR, SET_DECOMPRESSIBLE_STATE_DISCRIMINATOR, SET_NON_TRANSFERABLE_V2_DISCRIMINATOR, SET_TREE_DELEGATE_DISCRIMINATOR, SetAndVerifyCollectionAsyncInput, SetAndVerifyCollectionInput, SetAndVerifyCollectionInstruction, SetAndVerifyCollectionInstructionData, SetAndVerifyCollectionInstructionDataArgs, SetCollectionV2AsyncInput, SetCollectionV2Input, SetCollectionV2Instruction, SetCollectionV2InstructionData, SetCollectionV2InstructionDataArgs, SetDecompressableStateInput, SetDecompressableStateInstruction, SetDecompressableStateInstructionData, SetDecompressableStateInstructionDataArgs, SetDecompressibleStateInput, SetDecompressibleStateInstruction, SetDecompressibleStateInstructionData, SetDecompressibleStateInstructionDataArgs, SetNonTransferableV2AsyncInput, SetNonTransferableV2Input, SetNonTransferableV2Instruction, SetNonTransferableV2InstructionData, SetNonTransferableV2InstructionDataArgs, SetTreeDelegateAsyncInput, SetTreeDelegateInput, SetTreeDelegateInstruction, SetTreeDelegateInstructionData, SetTreeDelegateInstructionDataArgs, THAW_AND_REVOKE_V2_DISCRIMINATOR, THAW_V2_DISCRIMINATOR, TRANSFER_DISCRIMINATOR, TRANSFER_V2_DISCRIMINATOR, TREE_CONFIG_DISCRIMINATOR, ThawAndRevokeV2AsyncInput, ThawAndRevokeV2Input, ThawAndRevokeV2Instruction, ThawAndRevokeV2InstructionData, ThawAndRevokeV2InstructionDataArgs, ThawV2AsyncInput, ThawV2Input, ThawV2Instruction, ThawV2InstructionData, ThawV2InstructionDataArgs, TokenProgramVersion, TokenProgramVersionArgs, TokenStandard, TokenStandardArgs, TransferAsyncInput, TransferInput, TransferInstruction, TransferInstructionData, TransferInstructionDataArgs, TransferV2AsyncInput, TransferV2Input, TransferV2Instruction, TransferV2InstructionData, TransferV2InstructionDataArgs, TreeConfig, TreeConfigArgs, TreeConfigSeeds, UNVERIFY_COLLECTION_DISCRIMINATOR, UNVERIFY_CREATOR_DISCRIMINATOR, UNVERIFY_CREATOR_V2_DISCRIMINATOR, UPDATE_ASSET_DATA_V2_DISCRIMINATOR, UPDATE_METADATA_DISCRIMINATOR, UPDATE_METADATA_V2_DISCRIMINATOR, UnverifyCollectionAsyncInput, UnverifyCollectionInput, UnverifyCollectionInstruction, UnverifyCollectionInstructionData, UnverifyCollectionInstructionDataArgs, UnverifyCreatorAsyncInput, UnverifyCreatorInput, UnverifyCreatorInstruction, UnverifyCreatorInstructionData, UnverifyCreatorInstructionDataArgs, UnverifyCreatorV2AsyncInput, UnverifyCreatorV2Input, UnverifyCreatorV2Instruction, UnverifyCreatorV2InstructionData, UnverifyCreatorV2InstructionDataArgs, UpdateArgs, UpdateArgsArgs, UpdateAssetDataV2AsyncInput, UpdateAssetDataV2Input, UpdateAssetDataV2Instruction, UpdateAssetDataV2InstructionData, UpdateAssetDataV2InstructionDataArgs, UpdateMetadataAsyncInput, UpdateMetadataInput, UpdateMetadataInstruction, UpdateMetadataInstructionData, UpdateMetadataInstructionDataArgs, UpdateMetadataV2AsyncInput, UpdateMetadataV2Input, UpdateMetadataV2Instruction, UpdateMetadataV2InstructionData, UpdateMetadataV2InstructionDataArgs, UseMethod, UseMethodArgs, Uses, UsesArgs, VERIFY_COLLECTION_DISCRIMINATOR, VERIFY_CREATOR_DISCRIMINATOR, VERIFY_CREATOR_V2_DISCRIMINATOR, VOUCHER_DISCRIMINATOR, VerifyCollectionAsyncInput, VerifyCollectionInput, VerifyCollectionInstruction, VerifyCollectionInstructionData, VerifyCollectionInstructionDataArgs, VerifyCreatorAsyncInput, VerifyCreatorInput, VerifyCreatorInstruction, VerifyCreatorInstructionData, VerifyCreatorInstructionDataArgs, VerifyCreatorV2AsyncInput, VerifyCreatorV2Input, VerifyCreatorV2Instruction, VerifyCreatorV2InstructionData, VerifyCreatorV2InstructionDataArgs, Version, VersionArgs, Voucher, VoucherArgs, VoucherSeeds, bubblegumProgram, decodeTreeConfig, decodeVoucher, fetchAllMaybeTreeConfig, fetchAllMaybeVoucher, fetchAllTreeConfig, fetchAllVoucher, fetchMaybeTreeConfig, fetchMaybeTreeConfigFromSeeds, fetchMaybeVoucher, fetchMaybeVoucherFromSeeds, fetchTreeConfig, fetchTreeConfigFromSeeds, fetchVoucher, fetchVoucherFromSeeds, findAssetIdPda, findBubblegumSignerPda, findMasterEditionPda, findMetadataPda, findMintAuthorityPda, findTreeConfigPda, findVoucherPda, getAssetDataSchemaCodec, getAssetDataSchemaDecoder, getAssetDataSchemaEncoder, getBubblegumErrorMessage, getBubblegumEventTypeCodec, getBubblegumEventTypeDecoder, getBubblegumEventTypeEncoder, getBurnDiscriminatorBytes, getBurnInstruction, getBurnInstructionAsync, getBurnInstructionDataCodec, getBurnInstructionDataDecoder, getBurnInstructionDataEncoder, getBurnV2DiscriminatorBytes, getBurnV2Instruction, getBurnV2InstructionAsync, getBurnV2InstructionDataCodec, getBurnV2InstructionDataDecoder, getBurnV2InstructionDataEncoder, getCancelRedeemDiscriminatorBytes, getCancelRedeemInstruction, getCancelRedeemInstructionAsync, getCancelRedeemInstructionDataCodec, getCancelRedeemInstructionDataDecoder, getCancelRedeemInstructionDataEncoder, getCloseTreeV2DiscriminatorBytes, getCloseTreeV2Instruction, getCloseTreeV2InstructionAsync, getCloseTreeV2InstructionDataCodec, getCloseTreeV2InstructionDataDecoder, getCloseTreeV2InstructionDataEncoder, getCollectV2DiscriminatorBytes, getCollectV2Instruction, getCollectV2InstructionDataCodec, getCollectV2InstructionDataDecoder, getCollectV2InstructionDataEncoder, getCollectionCodec, getCollectionDecoder, getCollectionEncoder, getCompressDiscriminatorBytes, getCompressInstruction, getCompressInstructionAsync, getCompressInstructionDataCodec, getCompressInstructionDataDecoder, getCompressInstructionDataEncoder, getCreateTreeDiscriminatorBytes, getCreateTreeInstruction, getCreateTreeInstructionAsync, getCreateTreeInstructionDataCodec, getCreateTreeInstructionDataDecoder, getCreateTreeInstructionDataEncoder, getCreateTreeV2DiscriminatorBytes, getCreateTreeV2Instruction, getCreateTreeV2InstructionAsync, getCreateTreeV2InstructionDataCodec, getCreateTreeV2InstructionDataDecoder, getCreateTreeV2InstructionDataEncoder, getCreatorCodec, getCreatorDecoder, getCreatorEncoder, getDecompressV1DiscriminatorBytes, getDecompressV1Instruction, getDecompressV1InstructionAsync, getDecompressV1InstructionDataCodec, getDecompressV1InstructionDataDecoder, getDecompressV1InstructionDataEncoder, getDecompressibleStateCodec, getDecompressibleStateDecoder, getDecompressibleStateEncoder, getDelegateAndFreezeV2DiscriminatorBytes, getDelegateAndFreezeV2Instruction, getDelegateAndFreezeV2InstructionAsync, getDelegateAndFreezeV2InstructionDataCodec, getDelegateAndFreezeV2InstructionDataDecoder, getDelegateAndFreezeV2InstructionDataEncoder, getDelegateDiscriminatorBytes, getDelegateInstruction, getDelegateInstructionAsync, getDelegateInstructionDataCodec, getDelegateInstructionDataDecoder, getDelegateInstructionDataEncoder, getDelegateV2DiscriminatorBytes, getDelegateV2Instruction, getDelegateV2InstructionAsync, getDelegateV2InstructionDataCodec, getDelegateV2InstructionDataDecoder, getDelegateV2InstructionDataEncoder, getFreezeV2DiscriminatorBytes, getFreezeV2Instruction, getFreezeV2InstructionAsync, getFreezeV2InstructionDataCodec, getFreezeV2InstructionDataDecoder, getFreezeV2InstructionDataEncoder, getInstructionNameCodec, getInstructionNameDecoder, getInstructionNameEncoder, getLeafSchemaCodec, getLeafSchemaDecoder, getLeafSchemaEncoder, getMetadataArgsCodec, getMetadataArgsDecoder, getMetadataArgsEncoder, getMetadataArgsV2Codec, getMetadataArgsV2Decoder, getMetadataArgsV2Encoder, getMintToCollectionV1DiscriminatorBytes, getMintToCollectionV1Instruction, getMintToCollectionV1InstructionAsync, getMintToCollectionV1InstructionDataCodec, getMintToCollectionV1InstructionDataDecoder, getMintToCollectionV1InstructionDataEncoder, getMintV1DiscriminatorBytes, getMintV1Instruction, getMintV1InstructionAsync, getMintV1InstructionDataCodec, getMintV1InstructionDataDecoder, getMintV1InstructionDataEncoder, getMintV2DiscriminatorBytes, getMintV2Instruction, getMintV2InstructionAsync, getMintV2InstructionDataCodec, getMintV2InstructionDataDecoder, getMintV2InstructionDataEncoder, getRedeemDiscriminatorBytes, getRedeemInstruction, getRedeemInstructionAsync, getRedeemInstructionDataCodec, getRedeemInstructionDataDecoder, getRedeemInstructionDataEncoder, getSetAndVerifyCollectionDiscriminatorBytes, getSetAndVerifyCollectionInstruction, getSetAndVerifyCollectionInstructionAsync, getSetAndVerifyCollectionInstructionDataCodec, getSetAndVerifyCollectionInstructionDataDecoder, getSetAndVerifyCollectionInstructionDataEncoder, getSetCollectionV2DiscriminatorBytes, getSetCollectionV2Instruction, getSetCollectionV2InstructionAsync, getSetCollectionV2InstructionDataCodec, getSetCollectionV2InstructionDataDecoder, getSetCollectionV2InstructionDataEncoder, getSetDecompressableStateDiscriminatorBytes, getSetDecompressableStateInstruction, getSetDecompressableStateInstructionDataCodec, getSetDecompressableStateInstructionDataDecoder, getSetDecompressableStateInstructionDataEncoder, getSetDecompressibleStateDiscriminatorBytes, getSetDecompressibleStateInstruction, getSetDecompressibleStateInstructionDataCodec, getSetDecompressibleStateInstructionDataDecoder, getSetDecompressibleStateInstructionDataEncoder, getSetNonTransferableV2DiscriminatorBytes, getSetNonTransferableV2Instruction, getSetNonTransferableV2InstructionAsync, getSetNonTransferableV2InstructionDataCodec, getSetNonTransferableV2InstructionDataDecoder, getSetNonTransferableV2InstructionDataEncoder, getSetTreeDelegateDiscriminatorBytes, getSetTreeDelegateInstruction, getSetTreeDelegateInstructionAsync, getSetTreeDelegateInstructionDataCodec, getSetTreeDelegateInstructionDataDecoder, getSetTreeDelegateInstructionDataEncoder, getThawAndRevokeV2DiscriminatorBytes, getThawAndRevokeV2Instruction, getThawAndRevokeV2InstructionAsync, getThawAndRevokeV2InstructionDataCodec, getThawAndRevokeV2InstructionDataDecoder, getThawAndRevokeV2InstructionDataEncoder, getThawV2DiscriminatorBytes, getThawV2Instruction, getThawV2InstructionAsync, getThawV2InstructionDataCodec, getThawV2InstructionDataDecoder, getThawV2InstructionDataEncoder, getTokenProgramVersionCodec, getTokenProgramVersionDecoder, getTokenProgramVersionEncoder, getTokenStandardCodec, getTokenStandardDecoder, getTokenStandardEncoder, getTransferDiscriminatorBytes, getTransferInstruction, getTransferInstructionAsync, getTransferInstructionDataCodec, getTransferInstructionDataDecoder, getTransferInstructionDataEncoder, getTransferV2DiscriminatorBytes, getTransferV2Instruction, getTransferV2InstructionAsync, getTransferV2InstructionDataCodec, getTransferV2InstructionDataDecoder, getTransferV2InstructionDataEncoder, getTreeConfigCodec, getTreeConfigDecoder, getTreeConfigDiscriminatorBytes, getTreeConfigEncoder, getUnverifyCollectionDiscriminatorBytes, getUnverifyCollectionInstruction, getUnverifyCollectionInstructionAsync, getUnverifyCollectionInstructionDataCodec, getUnverifyCollectionInstructionDataDecoder, getUnverifyCollectionInstructionDataEncoder, getUnverifyCreatorDiscriminatorBytes, getUnverifyCreatorInstruction, getUnverifyCreatorInstructionAsync, getUnverifyCreatorInstructionDataCodec, getUnverifyCreatorInstructionDataDecoder, getUnverifyCreatorInstructionDataEncoder, getUnverifyCreatorV2DiscriminatorBytes, getUnverifyCreatorV2Instruction, getUnverifyCreatorV2InstructionAsync, getUnverifyCreatorV2InstructionDataCodec, getUnverifyCreatorV2InstructionDataDecoder, getUnverifyCreatorV2InstructionDataEncoder, getUpdateArgsCodec, getUpdateArgsDecoder, getUpdateArgsEncoder, getUpdateAssetDataV2DiscriminatorBytes, getUpdateAssetDataV2Instruction, getUpdateAssetDataV2InstructionAsync, getUpdateAssetDataV2InstructionDataCodec, getUpdateAssetDataV2InstructionDataDecoder, getUpdateAssetDataV2InstructionDataEncoder, getUpdateMetadataDiscriminatorBytes, getUpdateMetadataInstruction, getUpdateMetadataInstructionAsync, getUpdateMetadataInstructionDataCodec, getUpdateMetadataInstructionDataDecoder, getUpdateMetadataInstructionDataEncoder, getUpdateMetadataV2DiscriminatorBytes, getUpdateMetadataV2Instruction, getUpdateMetadataV2InstructionAsync, getUpdateMetadataV2InstructionDataCodec, getUpdateMetadataV2InstructionDataDecoder, getUpdateMetadataV2InstructionDataEncoder, getUseMethodCodec, getUseMethodDecoder, getUseMethodEncoder, getUsesCodec, getUsesDecoder, getUsesEncoder, getVerifyCollectionDiscriminatorBytes, getVerifyCollectionInstruction, getVerifyCollectionInstructionAsync, getVerifyCollectionInstructionDataCodec, getVerifyCollectionInstructionDataDecoder, getVerifyCollectionInstructionDataEncoder, getVerifyCreatorDiscriminatorBytes, getVerifyCreatorInstruction, getVerifyCreatorInstructionAsync, getVerifyCreatorInstructionDataCodec, getVerifyCreatorInstructionDataDecoder, getVerifyCreatorInstructionDataEncoder, getVerifyCreatorV2DiscriminatorBytes, getVerifyCreatorV2Instruction, getVerifyCreatorV2InstructionAsync, getVerifyCreatorV2InstructionDataCodec, getVerifyCreatorV2InstructionDataDecoder, getVerifyCreatorV2InstructionDataEncoder, getVersionCodec, getVersionDecoder, getVersionEncoder, getVoucherCodec, getVoucherDecoder, getVoucherDiscriminatorBytes, getVoucherEncoder, identifyBubblegumAccount, identifyBubblegumInstruction, isBubblegumError, isLeafSchema, leafSchema, mplTokenMetadataProgram, parseBubblegumInstruction, parseBurnInstruction, parseBurnV2Instruction, parseCancelRedeemInstruction, parseCloseTreeV2Instruction, parseCollectV2Instruction, parseCompressInstruction, parseCreateTreeInstruction, parseCreateTreeV2Instruction, parseDecompressV1Instruction, parseDelegateAndFreezeV2Instruction, parseDelegateInstruction, parseDelegateV2Instruction, parseFreezeV2Instruction, parseMintToCollectionV1Instruction, parseMintV1Instruction, parseMintV2Instruction, parseRedeemInstruction, parseSetAndVerifyCollectionInstruction, parseSetCollectionV2Instruction, parseSetDecompressableStateInstruction, parseSetDecompressibleStateInstruction, parseSetNonTransferableV2Instruction, parseSetTreeDelegateInstruction, parseThawAndRevokeV2Instruction, parseThawV2Instruction, parseTransferInstruction, parseTransferV2Instruction, parseUnverifyCollectionInstruction, parseUnverifyCreatorInstruction, parseUnverifyCreatorV2Instruction, parseUpdateAssetDataV2Instruction, parseUpdateMetadataInstruction, parseUpdateMetadataV2Instruction, parseVerifyCollectionInstruction, parseVerifyCreatorInstruction, parseVerifyCreatorV2Instruction };
|
|
@@ -1,75 +1,199 @@
|
|
|
1
1
|
import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/bubblegum.js";
|
|
2
|
+
import "../programs/index.js";
|
|
2
3
|
import { AccountMeta, Address, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlyAccount, ReadonlyUint8Array, WritableAccount } from "@solana/kit";
|
|
3
|
-
|
|
4
4
|
//#region src/generated/instructions/burn.d.ts
|
|
5
5
|
declare const BURN_DISCRIMINATOR: ReadonlyUint8Array;
|
|
6
6
|
declare function getBurnDiscriminatorBytes(): ReadonlyUint8Array;
|
|
7
7
|
type BurnInstruction<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, 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 ? ReadonlyAccount<TAccountTreeAuthority> : TAccountTreeAuthority, TAccountLeafOwner extends string ? ReadonlyAccount<TAccountLeafOwner> : TAccountLeafOwner, TAccountLeafDelegate extends string ? ReadonlyAccount<TAccountLeafDelegate> : TAccountLeafDelegate, TAccountMerkleTree extends string ? WritableAccount<TAccountMerkleTree> : TAccountMerkleTree, TAccountLogWrapper extends string ? ReadonlyAccount<TAccountLogWrapper> : TAccountLogWrapper, TAccountCompressionProgram extends string ? ReadonlyAccount<TAccountCompressionProgram> : TAccountCompressionProgram, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, ...TRemainingAccounts]>;
|
|
8
|
-
|
|
8
|
+
type BurnInstructionData = {
|
|
9
9
|
discriminator: ReadonlyUint8Array;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Current Merkle root of the tree, used together with the Merkle proof
|
|
12
|
+
* (passed as remaining accounts) to verify the leaf being operated on.
|
|
13
|
+
*/
|
|
14
|
+
root: Array<number>;
|
|
15
|
+
/**
|
|
16
|
+
* Keccak256 hash of the leaf's metadata, used together with `root` to
|
|
17
|
+
* verify the leaf before it is modified.
|
|
18
|
+
*/
|
|
19
|
+
dataHash: Array<number>;
|
|
20
|
+
/**
|
|
21
|
+
* Keccak256 hash of the leaf's creators array, used together with
|
|
22
|
+
* `root` to verify the leaf before it is modified.
|
|
23
|
+
*/
|
|
24
|
+
creatorHash: Array<number>;
|
|
25
|
+
/**
|
|
26
|
+
* Tree-scoped nonce identifying the leaf, equal to the tree's
|
|
27
|
+
* `numMinted` at the time the leaf was minted. Combined with the tree
|
|
28
|
+
* address to derive the leaf's asset id.
|
|
29
|
+
*/
|
|
13
30
|
nonce: bigint;
|
|
31
|
+
/**
|
|
32
|
+
* Position of the leaf within the Merkle tree, used with the Merkle
|
|
33
|
+
* proof to locate and verify the leaf.
|
|
34
|
+
*/
|
|
14
35
|
index: number;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
36
|
+
};
|
|
37
|
+
type BurnInstructionDataArgs = {
|
|
38
|
+
/**
|
|
39
|
+
* Current Merkle root of the tree, used together with the Merkle proof
|
|
40
|
+
* (passed as remaining accounts) to verify the leaf being operated on.
|
|
41
|
+
*/
|
|
42
|
+
root: Array<number>;
|
|
43
|
+
/**
|
|
44
|
+
* Keccak256 hash of the leaf's metadata, used together with `root` to
|
|
45
|
+
* verify the leaf before it is modified.
|
|
46
|
+
*/
|
|
47
|
+
dataHash: Array<number>;
|
|
48
|
+
/**
|
|
49
|
+
* Keccak256 hash of the leaf's creators array, used together with
|
|
50
|
+
* `root` to verify the leaf before it is modified.
|
|
51
|
+
*/
|
|
52
|
+
creatorHash: Array<number>;
|
|
53
|
+
/**
|
|
54
|
+
* Tree-scoped nonce identifying the leaf, equal to the tree's
|
|
55
|
+
* `numMinted` at the time the leaf was minted. Combined with the tree
|
|
56
|
+
* address to derive the leaf's asset id.
|
|
57
|
+
*/
|
|
20
58
|
nonce: number | bigint;
|
|
59
|
+
/**
|
|
60
|
+
* Position of the leaf within the Merkle tree, used with the Merkle
|
|
61
|
+
* proof to locate and verify the leaf.
|
|
62
|
+
*/
|
|
21
63
|
index: number;
|
|
22
|
-
}
|
|
64
|
+
};
|
|
23
65
|
declare function getBurnInstructionDataEncoder(): FixedSizeEncoder<BurnInstructionDataArgs>;
|
|
24
66
|
declare function getBurnInstructionDataDecoder(): FixedSizeDecoder<BurnInstructionData>;
|
|
25
67
|
declare function getBurnInstructionDataCodec(): FixedSizeCodec<BurnInstructionDataArgs, BurnInstructionData>;
|
|
26
|
-
|
|
68
|
+
type BurnAsyncInput<TAccountTreeAuthority extends string = string, TAccountLeafOwner extends string = string, TAccountLeafDelegate extends string = string, TAccountMerkleTree extends string = string, TAccountLogWrapper extends string = string, TAccountCompressionProgram extends string = string, TAccountSystemProgram extends string = string> = {
|
|
69
|
+
/**
|
|
70
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
71
|
+
* as the tree's authority for CPIs into the compression program.
|
|
72
|
+
*/
|
|
27
73
|
treeAuthority?: Address<TAccountTreeAuthority>;
|
|
74
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
28
75
|
leafOwner: Address<TAccountLeafOwner>;
|
|
76
|
+
/**
|
|
77
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
78
|
+
* delegate is set.
|
|
79
|
+
*/
|
|
29
80
|
leafDelegate: Address<TAccountLeafDelegate>;
|
|
81
|
+
/**
|
|
82
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
83
|
+
* owned by the account compression program.
|
|
84
|
+
*/
|
|
30
85
|
merkleTree: Address<TAccountMerkleTree>;
|
|
86
|
+
/**
|
|
87
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
88
|
+
* can reconstruct the tree.
|
|
89
|
+
*/
|
|
31
90
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
91
|
+
/**
|
|
92
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
93
|
+
* Merkle tree.
|
|
94
|
+
*/
|
|
32
95
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
96
|
+
/** The Solana System program. */
|
|
33
97
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
34
98
|
root: BurnInstructionDataArgs["root"];
|
|
35
99
|
dataHash: BurnInstructionDataArgs["dataHash"];
|
|
36
100
|
creatorHash: BurnInstructionDataArgs["creatorHash"];
|
|
37
101
|
nonce: BurnInstructionDataArgs["nonce"];
|
|
38
102
|
index: BurnInstructionDataArgs["index"];
|
|
39
|
-
}
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Burns a compressed NFT leaf, permanently removing it from the tree.
|
|
106
|
+
*
|
|
107
|
+
* The caller must be the leaf owner or delegate. The leaf's current state
|
|
108
|
+
* (root, dataHash, creatorHash, nonce, index) plus a Merkle proof passed
|
|
109
|
+
* as remaining accounts are required to prove the leaf exists before it
|
|
110
|
+
* is replaced with an empty node.
|
|
111
|
+
*/
|
|
40
112
|
declare function getBurnInstructionAsync<TAccountTreeAuthority extends string, TAccountLeafOwner extends string, TAccountLeafDelegate extends string, TAccountMerkleTree extends string, TAccountLogWrapper extends string, TAccountCompressionProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS>(input: BurnAsyncInput<TAccountTreeAuthority, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountLogWrapper, TAccountCompressionProgram, TAccountSystemProgram>, config?: {
|
|
41
113
|
programAddress?: TProgramAddress;
|
|
42
114
|
}): Promise<BurnInstruction<TProgramAddress, TAccountTreeAuthority, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountLogWrapper, TAccountCompressionProgram, TAccountSystemProgram>>;
|
|
43
|
-
|
|
115
|
+
type BurnInput<TAccountTreeAuthority extends string = string, TAccountLeafOwner extends string = string, TAccountLeafDelegate extends string = string, TAccountMerkleTree extends string = string, TAccountLogWrapper extends string = string, TAccountCompressionProgram extends string = string, TAccountSystemProgram extends string = string> = {
|
|
116
|
+
/**
|
|
117
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
118
|
+
* as the tree's authority for CPIs into the compression program.
|
|
119
|
+
*/
|
|
44
120
|
treeAuthority: Address<TAccountTreeAuthority>;
|
|
121
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
45
122
|
leafOwner: Address<TAccountLeafOwner>;
|
|
123
|
+
/**
|
|
124
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
125
|
+
* delegate is set.
|
|
126
|
+
*/
|
|
46
127
|
leafDelegate: Address<TAccountLeafDelegate>;
|
|
128
|
+
/**
|
|
129
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
130
|
+
* owned by the account compression program.
|
|
131
|
+
*/
|
|
47
132
|
merkleTree: Address<TAccountMerkleTree>;
|
|
133
|
+
/**
|
|
134
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
135
|
+
* can reconstruct the tree.
|
|
136
|
+
*/
|
|
48
137
|
logWrapper?: Address<TAccountLogWrapper>;
|
|
138
|
+
/**
|
|
139
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
140
|
+
* Merkle tree.
|
|
141
|
+
*/
|
|
49
142
|
compressionProgram?: Address<TAccountCompressionProgram>;
|
|
143
|
+
/** The Solana System program. */
|
|
50
144
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
51
145
|
root: BurnInstructionDataArgs["root"];
|
|
52
146
|
dataHash: BurnInstructionDataArgs["dataHash"];
|
|
53
147
|
creatorHash: BurnInstructionDataArgs["creatorHash"];
|
|
54
148
|
nonce: BurnInstructionDataArgs["nonce"];
|
|
55
149
|
index: BurnInstructionDataArgs["index"];
|
|
56
|
-
}
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Burns a compressed NFT leaf, permanently removing it from the tree.
|
|
153
|
+
*
|
|
154
|
+
* The caller must be the leaf owner or delegate. The leaf's current state
|
|
155
|
+
* (root, dataHash, creatorHash, nonce, index) plus a Merkle proof passed
|
|
156
|
+
* as remaining accounts are required to prove the leaf exists before it
|
|
157
|
+
* is replaced with an empty node.
|
|
158
|
+
*/
|
|
57
159
|
declare function getBurnInstruction<TAccountTreeAuthority extends string, TAccountLeafOwner extends string, TAccountLeafDelegate extends string, TAccountMerkleTree extends string, TAccountLogWrapper extends string, TAccountCompressionProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS>(input: BurnInput<TAccountTreeAuthority, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountLogWrapper, TAccountCompressionProgram, TAccountSystemProgram>, config?: {
|
|
58
160
|
programAddress?: TProgramAddress;
|
|
59
161
|
}): BurnInstruction<TProgramAddress, TAccountTreeAuthority, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountLogWrapper, TAccountCompressionProgram, TAccountSystemProgram>;
|
|
60
|
-
|
|
162
|
+
type ParsedBurnInstruction<TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
61
163
|
programAddress: Address<TProgram>;
|
|
62
164
|
accounts: {
|
|
165
|
+
/**
|
|
166
|
+
* The tree's `TreeConfig` PDA, which stores its configuration and acts
|
|
167
|
+
* as the tree's authority for CPIs into the compression program.
|
|
168
|
+
*/
|
|
63
169
|
treeAuthority: TAccountMetas[0];
|
|
170
|
+
/** Owner of the compressed NFT leaf being operated on. */
|
|
64
171
|
leafOwner: TAccountMetas[1];
|
|
172
|
+
/**
|
|
173
|
+
* Delegate authority for the leaf; defaults to the leaf owner when no
|
|
174
|
+
* delegate is set.
|
|
175
|
+
*/
|
|
65
176
|
leafDelegate: TAccountMetas[2];
|
|
177
|
+
/**
|
|
178
|
+
* The concurrent Merkle tree account storing the compressed leaves,
|
|
179
|
+
* owned by the account compression program.
|
|
180
|
+
*/
|
|
66
181
|
merkleTree: TAccountMetas[3];
|
|
182
|
+
/**
|
|
183
|
+
* The SPL/MPL Noop program, used to log leaf data so off-chain indexers
|
|
184
|
+
* can reconstruct the tree.
|
|
185
|
+
*/
|
|
67
186
|
logWrapper: TAccountMetas[4];
|
|
187
|
+
/**
|
|
188
|
+
* The SPL/MPL Account Compression program that owns and manages the
|
|
189
|
+
* Merkle tree.
|
|
190
|
+
*/
|
|
68
191
|
compressionProgram: TAccountMetas[5];
|
|
192
|
+
/** The Solana System program. */
|
|
69
193
|
systemProgram: TAccountMetas[6];
|
|
70
194
|
};
|
|
71
195
|
data: BurnInstructionData;
|
|
72
|
-
}
|
|
196
|
+
};
|
|
73
197
|
declare function parseBurnInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedBurnInstruction<TProgram, TAccountMetas>;
|
|
74
198
|
//#endregion
|
|
75
199
|
export { BURN_DISCRIMINATOR, BurnAsyncInput, BurnInput, BurnInstruction, BurnInstructionData, BurnInstructionDataArgs, ParsedBurnInstruction, getBurnDiscriminatorBytes, getBurnInstruction, getBurnInstructionAsync, getBurnInstructionDataCodec, getBurnInstructionDataDecoder, getBurnInstructionDataEncoder, parseBurnInstruction };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"burn.d.ts","names":[],"sources":["../../../src/generated/instructions/burn.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"burn.d.ts","names":[],"sources":["../../../src/generated/instructions/burn.ts"],"mappings":";;;;cA+Ca,oBAAoB;iBAIjB,6BAA6B;KAIjC,gBACV,iCAAiC,2BACjC,uCAAuC,8BACvC,mCAAmC,8BACnC,sCAAsC,8BACtC,oCAAoC,8BACpC,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,oCACI,gBAAgB,sBAChB,oBACJ,4CACI,gBAAgB,8BAChB,4BACJ,uCACI,gBAAgB,yBAChB,0BACD;KAIG;EACV,eAAe;;;;;EAKf,MAAM;;;;;EAKN,UAAU;;;;;EAKV,aAAa;;;;;;EAMb;;;;;EAKA;;KAGU;;;;;EAKV,MAAM;;;;;EAKN,UAAU;;;;;EAKV,aAAa;;;;;;EAMb;;;;;EAKA;;iBAGc,iCAAiC,iBAAiB;iBAclD,iCAAiC,iBAAiB;iBAWlD,+BAA+B,eAC7C,yBACA;KAQU,eACV,+CACA,2CACA,8CACA,4CACA,4CACA,oDACA;;;;;EAMA,gBAAgB,QAAQ;;EAExB,WAAW,QAAQ;;;;;EAKnB,cAAc,QAAQ;;;;;EAKtB,YAAY,QAAQ;;;;;EAKpB,aAAa,QAAQ;;;;;EAKrB,qBAAqB,QAAQ;;EAE7B,gBAAgB,QAAQ;EACxB,MAAM;EACN,UAAU;EACV,aAAa;EACb,OAAO;EACP,OAAO;;;;;;;;;;iBAWa,wBACpB,sCACA,kCACA,qCACA,mCACA,mCACA,2CACA,sCACA,wBAAwB,iBAAiB,2BAEzC,OAAO,eACL,uBACA,mBACA,sBACA,oBACA,oBACA,4BACA,wBAEF;EAAW,iBAAiB;IAC3B,QACD,gBACE,iBACA,uBACA,mBACA,sBACA,oBACA,oBACA,4BACA;KA4EQ,UACV,+CACA,2CACA,8CACA,4CACA,4CACA,oDACA;;;;;EAMA,eAAe,QAAQ;;EAEvB,WAAW,QAAQ;;;;;EAKnB,cAAc,QAAQ;;;;;EAKtB,YAAY,QAAQ;;;;;EAKpB,aAAa,QAAQ;;;;;EAKrB,qBAAqB,QAAQ;;EAE7B,gBAAgB,QAAQ;EACxB,MAAM;EACN,UAAU;EACV,aAAa;EACb,OAAO;EACP,OAAO;;;;;;;;;;iBAWO,mBACd,sCACA,kCACA,qCACA,mCACA,mCACA,2CACA,sCACA,wBAAwB,iBAAiB,2BAEzC,OAAO,UACL,uBACA,mBACA,sBACA,oBACA,oBACA,4BACA,wBAEF;EAAW,iBAAiB;IAC3B,gBACD,iBACA,uBACA,mBACA,sBACA,oBACA,oBACA,4BACA;KAmEU,sBACV,iCAAiC,2BACjC,+BAA+B,yBAAyB;EAExD,gBAAgB,QAAQ;EACxB;;;;;IAKE,eAAe;;IAEf,WAAW;;;;;IAKX,cAAc;;;;;IAKd,YAAY;;;;;IAKZ,YAAY;;;;;IAKZ,oBAAoB;;IAEpB,eAAe;;EAEjB,MAAM;;iBAGQ,qBACd,yBACA,+BAA+B,eAE/B,aAAa,YAAY,YACvB,wBAAwB,iBACxB,oBAAoB,sBACrB,sBAAsB,UAAU"}
|
|
@@ -3,6 +3,13 @@ import "../programs/bubblegum.js";
|
|
|
3
3
|
import { SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, combineCodec, fixDecoderSize, fixEncoderSize, getArrayDecoder, getArrayEncoder, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU32Decoder, getU32Encoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder } from "@solana/kit";
|
|
4
4
|
import { getAccountMetaFactory, getAddressFromResolvedInstructionAccount } from "@solana/program-client-core";
|
|
5
5
|
//#region src/generated/instructions/burn.ts
|
|
6
|
+
/**
|
|
7
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
8
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
9
|
+
* to add features, then rerun Codama to update it.
|
|
10
|
+
*
|
|
11
|
+
* @see https://github.com/codama-idl/codama
|
|
12
|
+
*/
|
|
6
13
|
const BURN_DISCRIMINATOR = new Uint8Array([
|
|
7
14
|
116,
|
|
8
15
|
110,
|
|
@@ -42,6 +49,14 @@ function getBurnInstructionDataDecoder() {
|
|
|
42
49
|
function getBurnInstructionDataCodec() {
|
|
43
50
|
return combineCodec(getBurnInstructionDataEncoder(), getBurnInstructionDataDecoder());
|
|
44
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Burns a compressed NFT leaf, permanently removing it from the tree.
|
|
54
|
+
*
|
|
55
|
+
* The caller must be the leaf owner or delegate. The leaf's current state
|
|
56
|
+
* (root, dataHash, creatorHash, nonce, index) plus a Merkle proof passed
|
|
57
|
+
* as remaining accounts are required to prove the leaf exists before it
|
|
58
|
+
* is replaced with an empty node.
|
|
59
|
+
*/
|
|
45
60
|
async function getBurnInstructionAsync(input, config) {
|
|
46
61
|
const programAddress = config?.programAddress ?? "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
|
|
47
62
|
const accounts = {
|
|
@@ -94,6 +109,14 @@ async function getBurnInstructionAsync(input, config) {
|
|
|
94
109
|
programAddress
|
|
95
110
|
});
|
|
96
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Burns a compressed NFT leaf, permanently removing it from the tree.
|
|
114
|
+
*
|
|
115
|
+
* The caller must be the leaf owner or delegate. The leaf's current state
|
|
116
|
+
* (root, dataHash, creatorHash, nonce, index) plus a Merkle proof passed
|
|
117
|
+
* as remaining accounts are required to prove the leaf exists before it
|
|
118
|
+
* is replaced with an empty node.
|
|
119
|
+
*/
|
|
97
120
|
function getBurnInstruction(input, config) {
|
|
98
121
|
const programAddress = config?.programAddress ?? "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
|
|
99
122
|
const accounts = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"burn.js","names":[],"sources":["../../../src/generated/instructions/burn.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 Address,\n FixedSizeCodec,\n FixedSizeDecoder,\n FixedSizeEncoder,\n Instruction,\n InstructionWithAccounts,\n InstructionWithData,\n ReadonlyAccount,\n ReadonlyUint8Array,\n WritableAccount,\n} from \"@solana/kit\";\nimport type { ResolvedInstructionAccount } from \"@solana/program-client-core\";\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\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\";\n\nexport const BURN_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n 116, 110, 29, 56, 107, 219, 42, 93,\n]);\n\nexport function getBurnDiscriminatorBytes(): ReadonlyUint8Array {\n return fixEncoderSize(getBytesEncoder(), 8).encode(BURN_DISCRIMINATOR);\n}\n\nexport type BurnInstruction<\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 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 ? ReadonlyAccount<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 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 BurnInstructionData {\n discriminator: ReadonlyUint8Array;\n root: number[];\n dataHash: number[];\n creatorHash: number[];\n nonce: bigint;\n index: number;\n}\n\nexport interface BurnInstructionDataArgs {\n root: number[];\n dataHash: number[];\n creatorHash: number[];\n nonce: number | bigint;\n index: number;\n}\n\nexport function getBurnInstructionDataEncoder(): FixedSizeEncoder<BurnInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"root\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"dataHash\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"creatorHash\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"nonce\", getU64Encoder()],\n [\"index\", getU32Encoder()],\n ]),\n (value) => ({ ...value, discriminator: BURN_DISCRIMINATOR }),\n );\n}\n\nexport function getBurnInstructionDataDecoder(): FixedSizeDecoder<BurnInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"root\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"dataHash\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"creatorHash\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"nonce\", getU64Decoder()],\n [\"index\", getU32Decoder()],\n ]);\n}\n\nexport function getBurnInstructionDataCodec(): FixedSizeCodec<\n BurnInstructionDataArgs,\n BurnInstructionData\n> {\n return combineCodec(\n getBurnInstructionDataEncoder(),\n getBurnInstructionDataDecoder(),\n );\n}\n\nexport interface BurnAsyncInput<\n TAccountTreeAuthority extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree 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 logWrapper?: Address<TAccountLogWrapper>;\n compressionProgram?: Address<TAccountCompressionProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n root: BurnInstructionDataArgs[\"root\"];\n dataHash: BurnInstructionDataArgs[\"dataHash\"];\n creatorHash: BurnInstructionDataArgs[\"creatorHash\"];\n nonce: BurnInstructionDataArgs[\"nonce\"];\n index: BurnInstructionDataArgs[\"index\"];\n}\n\nexport async function getBurnInstructionAsync<\n TAccountTreeAuthority extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree 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: BurnAsyncInput<\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n BurnInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\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: false },\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 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(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getBurnInstructionDataEncoder().encode(\n args as BurnInstructionDataArgs,\n ),\n programAddress,\n } as BurnInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport interface BurnInput<\n TAccountTreeAuthority extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree 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 logWrapper?: Address<TAccountLogWrapper>;\n compressionProgram?: Address<TAccountCompressionProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n root: BurnInstructionDataArgs[\"root\"];\n dataHash: BurnInstructionDataArgs[\"dataHash\"];\n creatorHash: BurnInstructionDataArgs[\"creatorHash\"];\n nonce: BurnInstructionDataArgs[\"nonce\"];\n index: BurnInstructionDataArgs[\"index\"];\n}\n\nexport function getBurnInstruction<\n TAccountTreeAuthority extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree 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: BurnInput<\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): BurnInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\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: false },\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 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(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getBurnInstructionDataEncoder().encode(\n args as BurnInstructionDataArgs,\n ),\n programAddress,\n } as BurnInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport interface ParsedBurnInstruction<\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 logWrapper: TAccountMetas[4];\n compressionProgram: TAccountMetas[5];\n systemProgram: TAccountMetas[6];\n };\n data: BurnInstructionData;\n}\n\nexport function parseBurnInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedBurnInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 7) {\n throw new SolanaError(\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n {\n actualAccountMetas: instruction.accounts.length,\n expectedAccountMetas: 7,\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 logWrapper: getNextAccount(),\n compressionProgram: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getBurnInstructionDataDecoder().decode(instruction.data),\n };\n}\n"],"mappings":";;;;;AAiDA,MAAa,qBAAyC,IAAI,WAAW;CACnE;CAAK;CAAK;CAAI;CAAI;CAAK;CAAK;CAAI;AAClC,CAAC;AAED,SAAgB,4BAAgD;CAC9D,OAAO,eAAe,gBAAgB,GAAG,CAAC,CAAC,CAAC,OAAO,kBAAkB;AACvE;AA6DA,SAAgB,gCAA2E;CACzF,OAAO,iBACL,iBAAiB;EACf,CAAC,iBAAiB,eAAe,gBAAgB,GAAG,CAAC,CAAC;EACtD,CAAC,QAAQ,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EACtD,CAAC,YAAY,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC1D,CAAC,eAAe,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC7D,CAAC,SAAS,cAAc,CAAC;EACzB,CAAC,SAAS,cAAc,CAAC;CAC3B,CAAC,IACA,WAAW;EAAE,GAAG;EAAO,eAAe;CAAmB,EAC5D;AACF;AAEA,SAAgB,gCAAuE;CACrF,OAAO,iBAAiB;EACtB,CAAC,iBAAiB,eAAe,gBAAgB,GAAG,CAAC,CAAC;EACtD,CAAC,QAAQ,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EACtD,CAAC,YAAY,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC1D,CAAC,eAAe,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC7D,CAAC,SAAS,cAAc,CAAC;EACzB,CAAC,SAAS,cAAc,CAAC;CAC3B,CAAC;AACH;AAEA,SAAgB,8BAGd;CACA,OAAO,aACL,8BAA8B,GAC9B,8BAA8B,CAChC;AACF;AAyBA,eAAsB,wBAUpB,OASA,QAYA;CAEA,MAAM,iBAAiB,QAAQ,kBAAA;CAe/B,MAAM,WAAW;EAXf,eAAe;GAAE,OAAO,MAAM,iBAAiB;GAAM,YAAY;EAAM;EACvE,WAAW;GAAE,OAAO,MAAM,aAAa;GAAM,YAAY;EAAM;EAC/D,cAAc;GAAE,OAAO,MAAM,gBAAgB;GAAM,YAAY;EAAM;EACrE,YAAY;GAAE,OAAO,MAAM,cAAc;GAAM,YAAY;EAAK;EAChE,YAAY;GAAE,OAAO,MAAM,cAAc;GAAM,YAAY;EAAM;EACjE,oBAAoB;GAClB,OAAO,MAAM,sBAAsB;GACnC,YAAY;EACd;EACA,eAAe;GAAE,OAAO,MAAM,iBAAiB;GAAM,YAAY;EAAM;CAEzC;CAMhC,MAAM,OAAO,EAAE,GAAG,MAAM;CAGxB,IAAI,CAAC,SAAS,cAAc,OAC1B,SAAS,cAAc,QAAQ,MAAM,kBAAkB,EACrD,YAAY,yCACV,cACA,SAAS,WAAW,KACtB,EACF,CAAC;CAEH,IAAI,CAAC,SAAS,WAAW,OACvB,SAAS,WAAW,QAClB;CAEJ,IAAI,CAAC,SAAS,mBAAmB,OAC/B,SAAS,mBAAmB,QAC1B;CAEJ,IAAI,CAAC,SAAS,cAAc,OAC1B,SAAS,cAAc,QACrB;CAGJ,MAAM,iBAAiB,sBAAsB,gBAAgB,WAAW;CACxE,OAAO,OAAO,OAAO;EACnB,UAAU;GACR,eAAe,iBAAiB,SAAS,aAAa;GACtD,eAAe,aAAa,SAAS,SAAS;GAC9C,eAAe,gBAAgB,SAAS,YAAY;GACpD,eAAe,cAAc,SAAS,UAAU;GAChD,eAAe,cAAc,SAAS,UAAU;GAChD,eAAe,sBAAsB,SAAS,kBAAkB;GAChE,eAAe,iBAAiB,SAAS,aAAa;EACxD;EACA,MAAM,8BAA8B,CAAC,CAAC,OACpC,IACF;EACA;CACF,CASC;AACH;AAyBA,SAAgB,mBAUd,OASA,QAUA;CAEA,MAAM,iBAAiB,QAAQ,kBAAA;CAe/B,MAAM,WAAW;EAXf,eAAe;GAAE,OAAO,MAAM,iBAAiB;GAAM,YAAY;EAAM;EACvE,WAAW;GAAE,OAAO,MAAM,aAAa;GAAM,YAAY;EAAM;EAC/D,cAAc;GAAE,OAAO,MAAM,gBAAgB;GAAM,YAAY;EAAM;EACrE,YAAY;GAAE,OAAO,MAAM,cAAc;GAAM,YAAY;EAAK;EAChE,YAAY;GAAE,OAAO,MAAM,cAAc;GAAM,YAAY;EAAM;EACjE,oBAAoB;GAClB,OAAO,MAAM,sBAAsB;GACnC,YAAY;EACd;EACA,eAAe;GAAE,OAAO,MAAM,iBAAiB;GAAM,YAAY;EAAM;CAEzC;CAMhC,MAAM,OAAO,EAAE,GAAG,MAAM;CAGxB,IAAI,CAAC,SAAS,WAAW,OACvB,SAAS,WAAW,QAClB;CAEJ,IAAI,CAAC,SAAS,mBAAmB,OAC/B,SAAS,mBAAmB,QAC1B;CAEJ,IAAI,CAAC,SAAS,cAAc,OAC1B,SAAS,cAAc,QACrB;CAGJ,MAAM,iBAAiB,sBAAsB,gBAAgB,WAAW;CACxE,OAAO,OAAO,OAAO;EACnB,UAAU;GACR,eAAe,iBAAiB,SAAS,aAAa;GACtD,eAAe,aAAa,SAAS,SAAS;GAC9C,eAAe,gBAAgB,SAAS,YAAY;GACpD,eAAe,cAAc,SAAS,UAAU;GAChD,eAAe,cAAc,SAAS,UAAU;GAChD,eAAe,sBAAsB,SAAS,kBAAkB;GAChE,eAAe,iBAAiB,SAAS,aAAa;EACxD;EACA,MAAM,8BAA8B,CAAC,CAAC,OACpC,IACF;EACA;CACF,CASC;AACH;AAmBA,SAAgB,qBAId,aAGgD;CAChD,IAAI,YAAY,SAAS,SAAS,GAChC,MAAM,IAAI,YACR,2DACA;EACE,oBAAoB,YAAY,SAAS;EACzC,sBAAsB;CACxB,CACF;CAEF,IAAI,eAAe;CACnB,MAAM,uBAAuB;EAC3B,MAAM,cAAe,YAAY,SAA2B;EAC5D,gBAAgB;EAChB,OAAO;CACT;CACA,OAAO;EACL,gBAAgB,YAAY;EAC5B,UAAU;GACR,eAAe,eAAe;GAC9B,WAAW,eAAe;GAC1B,cAAc,eAAe;GAC7B,YAAY,eAAe;GAC3B,YAAY,eAAe;GAC3B,oBAAoB,eAAe;GACnC,eAAe,eAAe;EAChC;EACA,MAAM,8BAA8B,CAAC,CAAC,OAAO,YAAY,IAAI;CAC/D;AACF"}
|
|
1
|
+
{"version":3,"file":"burn.js","names":[],"sources":["../../../src/generated/instructions/burn.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 getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n SolanaError,\n transformEncoder,\n type AccountMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\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\";\n\nexport const BURN_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n 116, 110, 29, 56, 107, 219, 42, 93,\n]);\n\nexport function getBurnDiscriminatorBytes(): ReadonlyUint8Array {\n return fixEncoderSize(getBytesEncoder(), 8).encode(BURN_DISCRIMINATOR);\n}\n\nexport type BurnInstruction<\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 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 ? ReadonlyAccount<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 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 BurnInstructionData = {\n discriminator: ReadonlyUint8Array;\n /**\n * Current Merkle root of the tree, used together with the Merkle proof\n * (passed as remaining accounts) to verify the leaf being operated on.\n */\n root: Array<number>;\n /**\n * Keccak256 hash of the leaf's metadata, used together with `root` to\n * verify the leaf before it is modified.\n */\n dataHash: Array<number>;\n /**\n * Keccak256 hash of the leaf's creators array, used together with\n * `root` to verify the leaf before it is modified.\n */\n creatorHash: Array<number>;\n /**\n * Tree-scoped nonce identifying the leaf, equal to the tree's\n * `numMinted` at the time the leaf was minted. Combined with the tree\n * address to derive the leaf's asset id.\n */\n nonce: bigint;\n /**\n * Position of the leaf within the Merkle tree, used with the Merkle\n * proof to locate and verify the leaf.\n */\n index: number;\n};\n\nexport type BurnInstructionDataArgs = {\n /**\n * Current Merkle root of the tree, used together with the Merkle proof\n * (passed as remaining accounts) to verify the leaf being operated on.\n */\n root: Array<number>;\n /**\n * Keccak256 hash of the leaf's metadata, used together with `root` to\n * verify the leaf before it is modified.\n */\n dataHash: Array<number>;\n /**\n * Keccak256 hash of the leaf's creators array, used together with\n * `root` to verify the leaf before it is modified.\n */\n creatorHash: Array<number>;\n /**\n * Tree-scoped nonce identifying the leaf, equal to the tree's\n * `numMinted` at the time the leaf was minted. Combined with the tree\n * address to derive the leaf's asset id.\n */\n nonce: number | bigint;\n /**\n * Position of the leaf within the Merkle tree, used with the Merkle\n * proof to locate and verify the leaf.\n */\n index: number;\n};\n\nexport function getBurnInstructionDataEncoder(): FixedSizeEncoder<BurnInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"root\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"dataHash\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"creatorHash\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"nonce\", getU64Encoder()],\n [\"index\", getU32Encoder()],\n ]),\n (value) => ({ ...value, discriminator: BURN_DISCRIMINATOR }),\n );\n}\n\nexport function getBurnInstructionDataDecoder(): FixedSizeDecoder<BurnInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"root\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"dataHash\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"creatorHash\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"nonce\", getU64Decoder()],\n [\"index\", getU32Decoder()],\n ]);\n}\n\nexport function getBurnInstructionDataCodec(): FixedSizeCodec<\n BurnInstructionDataArgs,\n BurnInstructionData\n> {\n return combineCodec(\n getBurnInstructionDataEncoder(),\n getBurnInstructionDataDecoder(),\n );\n}\n\nexport type BurnAsyncInput<\n TAccountTreeAuthority extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree 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 /**\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 root: BurnInstructionDataArgs[\"root\"];\n dataHash: BurnInstructionDataArgs[\"dataHash\"];\n creatorHash: BurnInstructionDataArgs[\"creatorHash\"];\n nonce: BurnInstructionDataArgs[\"nonce\"];\n index: BurnInstructionDataArgs[\"index\"];\n};\n\n/**\n * Burns a compressed NFT leaf, permanently removing it from the tree.\n *\n * The caller must be the leaf owner or delegate. The leaf's current state\n * (root, dataHash, creatorHash, nonce, index) plus a Merkle proof passed\n * as remaining accounts are required to prove the leaf exists before it\n * is replaced with an empty node.\n */\nexport async function getBurnInstructionAsync<\n TAccountTreeAuthority extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree 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: BurnAsyncInput<\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n BurnInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\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: false },\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 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(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getBurnInstructionDataEncoder().encode(\n args as BurnInstructionDataArgs,\n ),\n programAddress,\n } as BurnInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport type BurnInput<\n TAccountTreeAuthority extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree 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 /**\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 root: BurnInstructionDataArgs[\"root\"];\n dataHash: BurnInstructionDataArgs[\"dataHash\"];\n creatorHash: BurnInstructionDataArgs[\"creatorHash\"];\n nonce: BurnInstructionDataArgs[\"nonce\"];\n index: BurnInstructionDataArgs[\"index\"];\n};\n\n/**\n * Burns a compressed NFT leaf, permanently removing it from the tree.\n *\n * The caller must be the leaf owner or delegate. The leaf's current state\n * (root, dataHash, creatorHash, nonce, index) plus a Merkle proof passed\n * as remaining accounts are required to prove the leaf exists before it\n * is replaced with an empty node.\n */\nexport function getBurnInstruction<\n TAccountTreeAuthority extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree 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: BurnInput<\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): BurnInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\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: false },\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 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(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getBurnInstructionDataEncoder().encode(\n args as BurnInstructionDataArgs,\n ),\n programAddress,\n } as BurnInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedBurnInstruction<\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 /**\n * The SPL/MPL Noop program, used to log leaf data so off-chain indexers\n * can reconstruct the tree.\n */\n logWrapper: TAccountMetas[4];\n /**\n * The SPL/MPL Account Compression program that owns and manages the\n * Merkle tree.\n */\n compressionProgram: TAccountMetas[5];\n /** The Solana System program. */\n systemProgram: TAccountMetas[6];\n };\n data: BurnInstructionData;\n};\n\nexport function parseBurnInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedBurnInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 7) {\n throw new SolanaError(\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n {\n actualAccountMetas: instruction.accounts.length,\n expectedAccountMetas: 7,\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 logWrapper: getNextAccount(),\n compressionProgram: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getBurnInstructionDataDecoder().decode(instruction.data),\n };\n}\n"],"mappings":"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"}
|