@macalinao/clients-mpl-bubblegum 0.2.0 → 0.3.0
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 -10
- package/dist/generated/accounts/treeConfig.d.ts +42 -38
- package/dist/generated/accounts/treeConfig.d.ts.map +1 -1
- package/dist/generated/accounts/treeConfig.js +70 -53
- package/dist/generated/accounts/treeConfig.js.map +1 -1
- package/dist/generated/accounts/voucher.d.ts +33 -30
- package/dist/generated/accounts/voucher.d.ts.map +1 -1
- package/dist/generated/accounts/voucher.js +61 -45
- package/dist/generated/accounts/voucher.js.map +1 -1
- package/dist/generated/errors/bubblegum.d.ts +71 -74
- package/dist/generated/errors/bubblegum.d.ts.map +1 -1
- package/dist/generated/errors/bubblegum.js +126 -133
- package/dist/generated/errors/bubblegum.js.map +1 -1
- package/dist/generated/errors/index.d.ts +1 -9
- package/dist/generated/index.d.ts +63 -13
- package/dist/generated/instructions/burn.d.ts +70 -65
- package/dist/generated/instructions/burn.d.ts.map +1 -1
- package/dist/generated/instructions/burn.js +168 -98
- package/dist/generated/instructions/burn.js.map +1 -1
- package/dist/generated/instructions/burnV2.d.ts +107 -96
- package/dist/generated/instructions/burnV2.d.ts.map +1 -1
- package/dist/generated/instructions/burnV2.js +239 -136
- package/dist/generated/instructions/burnV2.js.map +1 -1
- package/dist/generated/instructions/cancelRedeem.d.ts +54 -53
- package/dist/generated/instructions/cancelRedeem.d.ts.map +1 -1
- package/dist/generated/instructions/cancelRedeem.js +154 -90
- package/dist/generated/instructions/cancelRedeem.js.map +1 -1
- package/dist/generated/instructions/closeTreeV2.d.ts +64 -60
- package/dist/generated/instructions/closeTreeV2.d.ts.map +1 -1
- package/dist/generated/instructions/closeTreeV2.js +152 -84
- package/dist/generated/instructions/closeTreeV2.js.map +1 -1
- package/dist/generated/instructions/collectV2.d.ts +28 -35
- package/dist/generated/instructions/collectV2.d.ts.map +1 -1
- package/dist/generated/instructions/collectV2.js +63 -60
- package/dist/generated/instructions/collectV2.js.map +1 -1
- package/dist/generated/instructions/compress.d.ts +71 -71
- package/dist/generated/instructions/compress.d.ts.map +1 -1
- package/dist/generated/instructions/compress.js +233 -116
- package/dist/generated/instructions/compress.js.map +1 -1
- package/dist/generated/instructions/createTree.d.ts +62 -59
- package/dist/generated/instructions/createTree.d.ts.map +1 -1
- package/dist/generated/instructions/createTree.js +164 -94
- package/dist/generated/instructions/createTree.js.map +1 -1
- package/dist/generated/instructions/createTreeV2.d.ts +64 -61
- package/dist/generated/instructions/createTreeV2.d.ts.map +1 -1
- package/dist/generated/instructions/createTreeV2.js +168 -100
- package/dist/generated/instructions/createTreeV2.js.map +1 -1
- package/dist/generated/instructions/decompressV1.d.ts +73 -72
- package/dist/generated/instructions/decompressV1.d.ts.map +1 -1
- package/dist/generated/instructions/decompressV1.js +251 -128
- package/dist/generated/instructions/decompressV1.js.map +1 -1
- package/dist/generated/instructions/delegate.d.ts +73 -68
- package/dist/generated/instructions/delegate.d.ts.map +1 -1
- package/dist/generated/instructions/delegate.js +179 -107
- package/dist/generated/instructions/delegate.js.map +1 -1
- package/dist/generated/instructions/delegateAndFreezeV2.d.ts +92 -84
- package/dist/generated/instructions/delegateAndFreezeV2.d.ts.map +1 -1
- package/dist/generated/instructions/delegateAndFreezeV2.js +201 -136
- package/dist/generated/instructions/delegateAndFreezeV2.js.map +1 -1
- package/dist/generated/instructions/delegateV2.d.ts +92 -84
- package/dist/generated/instructions/delegateV2.d.ts.map +1 -1
- package/dist/generated/instructions/delegateV2.js +200 -134
- package/dist/generated/instructions/delegateV2.js.map +1 -1
- package/dist/generated/instructions/freezeV2.d.ts +99 -88
- package/dist/generated/instructions/freezeV2.d.ts.map +1 -1
- package/dist/generated/instructions/freezeV2.js +209 -123
- package/dist/generated/instructions/freezeV2.js.map +1 -1
- package/dist/generated/instructions/index.d.ts +36 -44
- package/dist/generated/instructions/mintToCollectionV1.d.ts +94 -89
- package/dist/generated/instructions/mintToCollectionV1.d.ts.map +1 -1
- package/dist/generated/instructions/mintToCollectionV1.js +277 -139
- package/dist/generated/instructions/mintToCollectionV1.js.map +1 -1
- package/dist/generated/instructions/mintV1.d.ts +61 -60
- package/dist/generated/instructions/mintV1.d.ts.map +1 -1
- package/dist/generated/instructions/mintV1.js +177 -97
- package/dist/generated/instructions/mintV1.js.map +1 -1
- package/dist/generated/instructions/mintV2.d.ts +86 -82
- package/dist/generated/instructions/mintV2.d.ts.map +1 -1
- package/dist/generated/instructions/mintV2.js +244 -135
- package/dist/generated/instructions/mintV2.js.map +1 -1
- package/dist/generated/instructions/redeem.d.ts +73 -68
- package/dist/generated/instructions/redeem.d.ts.map +1 -1
- package/dist/generated/instructions/redeem.js +179 -101
- package/dist/generated/instructions/redeem.js.map +1 -1
- package/dist/generated/instructions/setAndVerifyCollection.d.ts +133 -117
- package/dist/generated/instructions/setAndVerifyCollection.d.ts.map +1 -1
- package/dist/generated/instructions/setAndVerifyCollection.js +295 -151
- package/dist/generated/instructions/setAndVerifyCollection.js.map +1 -1
- package/dist/generated/instructions/setCollectionV2.d.ts +125 -110
- package/dist/generated/instructions/setCollectionV2.d.ts.map +1 -1
- package/dist/generated/instructions/setCollectionV2.js +257 -146
- package/dist/generated/instructions/setCollectionV2.js.map +1 -1
- package/dist/generated/instructions/setDecompressableState.d.ts +32 -39
- package/dist/generated/instructions/setDecompressableState.d.ts.map +1 -1
- package/dist/generated/instructions/setDecompressableState.js +66 -69
- package/dist/generated/instructions/setDecompressableState.js.map +1 -1
- package/dist/generated/instructions/setDecompressibleState.d.ts +32 -39
- package/dist/generated/instructions/setDecompressibleState.d.ts.map +1 -1
- package/dist/generated/instructions/setDecompressibleState.js +66 -69
- package/dist/generated/instructions/setDecompressibleState.js.map +1 -1
- package/dist/generated/instructions/setNonTransferableV2.d.ts +101 -90
- package/dist/generated/instructions/setNonTransferableV2.d.ts.map +1 -1
- package/dist/generated/instructions/setNonTransferableV2.js +210 -125
- package/dist/generated/instructions/setNonTransferableV2.js.map +1 -1
- package/dist/generated/instructions/setTreeDelegate.d.ts +44 -44
- package/dist/generated/instructions/setTreeDelegate.d.ts.map +1 -1
- package/dist/generated/instructions/setTreeDelegate.js +127 -77
- package/dist/generated/instructions/setTreeDelegate.js.map +1 -1
- package/dist/generated/instructions/thawAndRevokeV2.d.ts +87 -79
- package/dist/generated/instructions/thawAndRevokeV2.d.ts.map +1 -1
- package/dist/generated/instructions/thawAndRevokeV2.js +190 -124
- package/dist/generated/instructions/thawAndRevokeV2.js.map +1 -1
- package/dist/generated/instructions/thawV2.d.ts +99 -88
- package/dist/generated/instructions/thawV2.d.ts.map +1 -1
- package/dist/generated/instructions/thawV2.js +209 -123
- package/dist/generated/instructions/thawV2.js.map +1 -1
- package/dist/generated/instructions/transfer.d.ts +73 -68
- package/dist/generated/instructions/transfer.d.ts.map +1 -1
- package/dist/generated/instructions/transfer.js +179 -101
- package/dist/generated/instructions/transfer.js.map +1 -1
- package/dist/generated/instructions/transferV2.d.ts +104 -93
- package/dist/generated/instructions/transferV2.d.ts.map +1 -1
- package/dist/generated/instructions/transferV2.js +220 -126
- package/dist/generated/instructions/transferV2.js.map +1 -1
- package/dist/generated/instructions/unverifyCollection.d.ts +129 -114
- package/dist/generated/instructions/unverifyCollection.d.ts.map +1 -1
- package/dist/generated/instructions/unverifyCollection.js +293 -146
- package/dist/generated/instructions/unverifyCollection.js.map +1 -1
- package/dist/generated/instructions/unverifyCreator.d.ts +81 -75
- package/dist/generated/instructions/unverifyCreator.d.ts.map +1 -1
- package/dist/generated/instructions/unverifyCreator.js +194 -106
- package/dist/generated/instructions/unverifyCreator.js.map +1 -1
- package/dist/generated/instructions/unverifyCreatorV2.d.ts +85 -79
- package/dist/generated/instructions/unverifyCreatorV2.d.ts.map +1 -1
- package/dist/generated/instructions/unverifyCreatorV2.js +198 -118
- package/dist/generated/instructions/unverifyCreatorV2.js.map +1 -1
- package/dist/generated/instructions/updateAssetDataV2.d.ts +108 -95
- package/dist/generated/instructions/updateAssetDataV2.d.ts.map +1 -1
- package/dist/generated/instructions/updateAssetDataV2.js +215 -136
- package/dist/generated/instructions/updateAssetDataV2.js.map +1 -1
- package/dist/generated/instructions/updateMetadata.d.ts +106 -96
- package/dist/generated/instructions/updateMetadata.d.ts.map +1 -1
- package/dist/generated/instructions/updateMetadata.js +243 -135
- package/dist/generated/instructions/updateMetadata.js.map +1 -1
- package/dist/generated/instructions/updateMetadataV2.d.ts +103 -91
- package/dist/generated/instructions/updateMetadataV2.d.ts.map +1 -1
- package/dist/generated/instructions/updateMetadataV2.js +212 -123
- package/dist/generated/instructions/updateMetadataV2.js.map +1 -1
- package/dist/generated/instructions/verifyCollection.d.ts +129 -114
- package/dist/generated/instructions/verifyCollection.d.ts.map +1 -1
- package/dist/generated/instructions/verifyCollection.js +293 -146
- package/dist/generated/instructions/verifyCollection.js.map +1 -1
- package/dist/generated/instructions/verifyCreator.d.ts +81 -75
- package/dist/generated/instructions/verifyCreator.d.ts.map +1 -1
- package/dist/generated/instructions/verifyCreator.js +193 -107
- package/dist/generated/instructions/verifyCreator.js.map +1 -1
- package/dist/generated/instructions/verifyCreatorV2.d.ts +85 -79
- package/dist/generated/instructions/verifyCreatorV2.d.ts.map +1 -1
- package/dist/generated/instructions/verifyCreatorV2.js +198 -118
- package/dist/generated/instructions/verifyCreatorV2.js.map +1 -1
- package/dist/generated/pdas/assetId.d.ts +16 -0
- package/dist/generated/pdas/assetId.d.ts.map +1 -0
- package/dist/generated/pdas/assetId.js +18 -0
- package/dist/generated/pdas/assetId.js.map +1 -0
- package/dist/generated/pdas/bubblegumSigner.d.ts +10 -0
- package/dist/generated/pdas/bubblegumSigner.d.ts.map +1 -0
- package/dist/generated/pdas/bubblegumSigner.js +14 -0
- package/dist/generated/pdas/bubblegumSigner.js.map +1 -0
- package/dist/generated/pdas/index.d.ts +7 -0
- package/dist/generated/pdas/masterEdition.d.ts +14 -0
- package/dist/generated/pdas/masterEdition.d.ts.map +1 -0
- package/dist/generated/pdas/masterEdition.js +19 -0
- package/dist/generated/pdas/masterEdition.js.map +1 -0
- package/dist/generated/pdas/metadata.d.ts +14 -0
- package/dist/generated/pdas/metadata.d.ts.map +1 -0
- package/dist/generated/pdas/metadata.js +18 -0
- package/dist/generated/pdas/metadata.js.map +1 -0
- package/dist/generated/pdas/mintAuthority.d.ts +14 -0
- package/dist/generated/pdas/mintAuthority.d.ts.map +1 -0
- package/dist/generated/pdas/mintAuthority.js +14 -0
- package/dist/generated/pdas/mintAuthority.js.map +1 -0
- package/dist/generated/pdas/treeConfig.d.ts +14 -0
- package/dist/generated/pdas/treeConfig.d.ts.map +1 -0
- package/dist/generated/pdas/treeConfig.js +14 -0
- package/dist/generated/pdas/treeConfig.js.map +1 -0
- package/dist/generated/pdas/voucher.d.ts +16 -0
- package/dist/generated/pdas/voucher.d.ts.map +1 -0
- package/dist/generated/pdas/voucher.js +18 -0
- package/dist/generated/pdas/voucher.js.map +1 -0
- package/dist/generated/programs/bubblegum.d.ts +186 -143
- package/dist/generated/programs/bubblegum.d.ts.map +1 -1
- package/dist/generated/programs/bubblegum.js +839 -561
- package/dist/generated/programs/bubblegum.js.map +1 -1
- package/dist/generated/programs/index.d.ts +2 -9
- package/dist/generated/programs/mplTokenMetadata.d.ts +20 -0
- package/dist/generated/programs/mplTokenMetadata.d.ts.map +1 -0
- package/dist/generated/programs/mplTokenMetadata.js +17 -0
- package/dist/generated/programs/mplTokenMetadata.js.map +1 -0
- package/dist/generated/types/assetDataSchema.d.ts +13 -16
- package/dist/generated/types/assetDataSchema.d.ts.map +1 -1
- package/dist/generated/types/assetDataSchema.js +16 -19
- package/dist/generated/types/assetDataSchema.js.map +1 -1
- package/dist/generated/types/bubblegumEventType.d.ts +12 -15
- package/dist/generated/types/bubblegumEventType.d.ts.map +1 -1
- package/dist/generated/types/bubblegumEventType.js +15 -18
- package/dist/generated/types/bubblegumEventType.js.map +1 -1
- package/dist/generated/types/collection.d.ts +12 -15
- package/dist/generated/types/collection.d.ts.map +1 -1
- package/dist/generated/types/collection.js +11 -20
- package/dist/generated/types/collection.js.map +1 -1
- package/dist/generated/types/creator.d.ts +18 -21
- package/dist/generated/types/creator.d.ts.map +1 -1
- package/dist/generated/types/creator.js +19 -22
- package/dist/generated/types/creator.js.map +1 -1
- package/dist/generated/types/decompressibleState.d.ts +12 -15
- package/dist/generated/types/decompressibleState.d.ts.map +1 -1
- package/dist/generated/types/decompressibleState.js +15 -18
- package/dist/generated/types/decompressibleState.js.map +1 -1
- package/dist/generated/types/index.d.ts +15 -23
- package/dist/generated/types/instructionName.d.ts +45 -48
- package/dist/generated/types/instructionName.d.ts.map +1 -1
- package/dist/generated/types/instructionName.js +48 -51
- package/dist/generated/types/instructionName.js.map +1 -1
- package/dist/generated/types/leafSchema.d.ts +48 -51
- package/dist/generated/types/leafSchema.d.ts.map +1 -1
- package/dist/generated/types/leafSchema.js +55 -72
- package/dist/generated/types/leafSchema.js.map +1 -1
- package/dist/generated/types/metadataArgs.d.ts +59 -58
- package/dist/generated/types/metadataArgs.d.ts.map +1 -1
- package/dist/generated/types/metadataArgs.js +42 -41
- package/dist/generated/types/metadataArgs.js.map +1 -1
- package/dist/generated/types/metadataArgsV2.d.ts +48 -50
- package/dist/generated/types/metadataArgsV2.d.ts.map +1 -1
- package/dist/generated/types/metadataArgsV2.js +33 -35
- package/dist/generated/types/metadataArgsV2.js.map +1 -1
- package/dist/generated/types/tokenProgramVersion.d.ts +12 -15
- package/dist/generated/types/tokenProgramVersion.d.ts.map +1 -1
- package/dist/generated/types/tokenProgramVersion.js +15 -18
- package/dist/generated/types/tokenProgramVersion.js.map +1 -1
- package/dist/generated/types/tokenStandard.d.ts +14 -17
- package/dist/generated/types/tokenStandard.d.ts.map +1 -1
- package/dist/generated/types/tokenStandard.js +17 -20
- package/dist/generated/types/tokenStandard.js.map +1 -1
- package/dist/generated/types/updateArgs.d.ts +25 -28
- package/dist/generated/types/updateArgs.d.ts.map +1 -1
- package/dist/generated/types/updateArgs.js +28 -49
- package/dist/generated/types/updateArgs.js.map +1 -1
- package/dist/generated/types/useMethod.d.ts +13 -16
- package/dist/generated/types/useMethod.d.ts.map +1 -1
- package/dist/generated/types/useMethod.js +16 -19
- package/dist/generated/types/useMethod.js.map +1 -1
- package/dist/generated/types/uses.d.ts +17 -20
- package/dist/generated/types/uses.d.ts.map +1 -1
- package/dist/generated/types/uses.js +20 -23
- package/dist/generated/types/uses.js.map +1 -1
- package/dist/generated/types/version.d.ts +12 -15
- package/dist/generated/types/version.d.ts.map +1 -1
- package/dist/generated/types/version.js +15 -18
- package/dist/generated/types/version.js.map +1 -1
- package/dist/index.d.ts +64 -8
- package/dist/index.js +64 -8
- package/package.json +7 -5
- package/src/generated/accounts/treeConfig.ts +22 -0
- package/src/generated/accounts/voucher.ts +22 -0
- package/src/generated/errors/bubblegum.ts +1 -1
- package/src/generated/index.ts +1 -0
- package/src/generated/instructions/burn.ts +155 -11
- package/src/generated/instructions/burnV2.ts +226 -16
- package/src/generated/instructions/cancelRedeem.ts +151 -11
- package/src/generated/instructions/closeTreeV2.ts +150 -11
- package/src/generated/instructions/collectV2.ts +3 -3
- package/src/generated/instructions/compress.ts +219 -18
- package/src/generated/instructions/createTree.ts +153 -11
- package/src/generated/instructions/createTreeV2.ts +154 -11
- package/src/generated/instructions/decompressV1.ts +258 -16
- package/src/generated/instructions/delegate.ts +170 -12
- package/src/generated/instructions/delegateAndFreezeV2.ts +184 -13
- package/src/generated/instructions/delegateV2.ts +184 -13
- package/src/generated/instructions/freezeV2.ts +188 -14
- package/src/generated/instructions/mintToCollectionV1.ts +296 -21
- package/src/generated/instructions/mintV1.ts +169 -13
- package/src/generated/instructions/mintV2.ts +231 -17
- package/src/generated/instructions/redeem.ts +164 -12
- package/src/generated/instructions/setAndVerifyCollection.ts +307 -21
- package/src/generated/instructions/setCollectionV2.ts +253 -19
- package/src/generated/instructions/setDecompressableState.ts +3 -3
- package/src/generated/instructions/setDecompressibleState.ts +3 -3
- package/src/generated/instructions/setNonTransferableV2.ts +189 -14
- package/src/generated/instructions/setTreeDelegate.ts +105 -7
- package/src/generated/instructions/thawAndRevokeV2.ts +168 -12
- package/src/generated/instructions/thawV2.ts +188 -14
- package/src/generated/instructions/transfer.ts +164 -12
- package/src/generated/instructions/transferV2.ts +198 -15
- package/src/generated/instructions/unverifyCollection.ts +306 -21
- package/src/generated/instructions/unverifyCreator.ts +174 -13
- package/src/generated/instructions/unverifyCreatorV2.ts +176 -13
- package/src/generated/instructions/updateAssetDataV2.ts +190 -14
- package/src/generated/instructions/updateMetadata.ts +233 -17
- package/src/generated/instructions/updateMetadataV2.ts +189 -14
- package/src/generated/instructions/verifyCollection.ts +306 -21
- package/src/generated/instructions/verifyCreator.ts +174 -13
- package/src/generated/instructions/verifyCreatorV2.ts +176 -13
- package/src/generated/pdas/assetId.ts +40 -0
- package/src/generated/pdas/bubblegumSigner.ts +23 -0
- package/{dist/generated/accounts/index.js → src/generated/pdas/index.ts} +6 -1
- package/src/generated/pdas/masterEdition.ts +38 -0
- package/src/generated/pdas/metadata.ts +37 -0
- package/src/generated/pdas/mintAuthority.ts +29 -0
- package/src/generated/pdas/treeConfig.ts +29 -0
- package/src/generated/pdas/voucher.ts +40 -0
- package/src/generated/programs/bubblegum.ts +208 -165
- package/src/generated/programs/index.ts +1 -0
- package/src/generated/programs/mplTokenMetadata.ts +42 -0
- package/dist/.tsbuildinfo +0 -1
- package/dist/generated/accounts/index.d.ts.map +0 -1
- package/dist/generated/accounts/index.js.map +0 -1
- package/dist/generated/errors/index.d.ts.map +0 -1
- package/dist/generated/errors/index.js +0 -9
- package/dist/generated/errors/index.js.map +0 -1
- package/dist/generated/index.d.ts.map +0 -1
- package/dist/generated/index.js +0 -13
- package/dist/generated/index.js.map +0 -1
- package/dist/generated/instructions/index.d.ts.map +0 -1
- package/dist/generated/instructions/index.js +0 -44
- package/dist/generated/instructions/index.js.map +0 -1
- package/dist/generated/programs/index.d.ts.map +0 -1
- package/dist/generated/programs/index.js +0 -9
- package/dist/generated/programs/index.js.map +0 -1
- package/dist/generated/types/index.d.ts.map +0 -1
- package/dist/generated/types/index.js +0 -23
- package/dist/generated/types/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,566 +1,844 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { findAssetIdPda } from "../pdas/assetId.js";
|
|
2
|
+
import { findBubblegumSignerPda } from "../pdas/bubblegumSigner.js";
|
|
3
|
+
import { findMintAuthorityPda } from "../pdas/mintAuthority.js";
|
|
4
|
+
import { findTreeConfigPda } from "../pdas/treeConfig.js";
|
|
5
|
+
import { findVoucherPda } from "../pdas/voucher.js";
|
|
6
|
+
import { getTreeConfigCodec } from "../accounts/treeConfig.js";
|
|
7
|
+
import { getVoucherCodec } from "../accounts/voucher.js";
|
|
8
|
+
import { getBurnInstructionAsync, parseBurnInstruction } from "../instructions/burn.js";
|
|
9
|
+
import { getBurnV2InstructionAsync, parseBurnV2Instruction } from "../instructions/burnV2.js";
|
|
10
|
+
import { getCancelRedeemInstructionAsync, parseCancelRedeemInstruction } from "../instructions/cancelRedeem.js";
|
|
11
|
+
import { getCloseTreeV2InstructionAsync, parseCloseTreeV2Instruction } from "../instructions/closeTreeV2.js";
|
|
12
|
+
import { getCollectV2Instruction, parseCollectV2Instruction } from "../instructions/collectV2.js";
|
|
13
|
+
import { getCompressInstructionAsync, parseCompressInstruction } from "../instructions/compress.js";
|
|
14
|
+
import { getCreateTreeInstructionAsync, parseCreateTreeInstruction } from "../instructions/createTree.js";
|
|
15
|
+
import { getCreateTreeV2InstructionAsync, parseCreateTreeV2Instruction } from "../instructions/createTreeV2.js";
|
|
16
|
+
import { getDecompressV1InstructionAsync, parseDecompressV1Instruction } from "../instructions/decompressV1.js";
|
|
17
|
+
import { getDelegateInstructionAsync, parseDelegateInstruction } from "../instructions/delegate.js";
|
|
18
|
+
import { getDelegateAndFreezeV2InstructionAsync, parseDelegateAndFreezeV2Instruction } from "../instructions/delegateAndFreezeV2.js";
|
|
19
|
+
import { getDelegateV2InstructionAsync, parseDelegateV2Instruction } from "../instructions/delegateV2.js";
|
|
20
|
+
import { getFreezeV2InstructionAsync, parseFreezeV2Instruction } from "../instructions/freezeV2.js";
|
|
21
|
+
import { getMintToCollectionV1InstructionAsync, parseMintToCollectionV1Instruction } from "../instructions/mintToCollectionV1.js";
|
|
22
|
+
import { getMintV1InstructionAsync, parseMintV1Instruction } from "../instructions/mintV1.js";
|
|
23
|
+
import { getMintV2InstructionAsync, parseMintV2Instruction } from "../instructions/mintV2.js";
|
|
24
|
+
import { getRedeemInstructionAsync, parseRedeemInstruction } from "../instructions/redeem.js";
|
|
25
|
+
import { getSetAndVerifyCollectionInstructionAsync, parseSetAndVerifyCollectionInstruction } from "../instructions/setAndVerifyCollection.js";
|
|
26
|
+
import { getSetCollectionV2InstructionAsync, parseSetCollectionV2Instruction } from "../instructions/setCollectionV2.js";
|
|
27
|
+
import { getSetDecompressableStateInstruction, parseSetDecompressableStateInstruction } from "../instructions/setDecompressableState.js";
|
|
28
|
+
import { getSetDecompressibleStateInstruction, parseSetDecompressibleStateInstruction } from "../instructions/setDecompressibleState.js";
|
|
29
|
+
import { getSetNonTransferableV2InstructionAsync, parseSetNonTransferableV2Instruction } from "../instructions/setNonTransferableV2.js";
|
|
30
|
+
import { getSetTreeDelegateInstructionAsync, parseSetTreeDelegateInstruction } from "../instructions/setTreeDelegate.js";
|
|
31
|
+
import { getThawAndRevokeV2InstructionAsync, parseThawAndRevokeV2Instruction } from "../instructions/thawAndRevokeV2.js";
|
|
32
|
+
import { getThawV2InstructionAsync, parseThawV2Instruction } from "../instructions/thawV2.js";
|
|
33
|
+
import { getTransferInstructionAsync, parseTransferInstruction } from "../instructions/transfer.js";
|
|
34
|
+
import { getTransferV2InstructionAsync, parseTransferV2Instruction } from "../instructions/transferV2.js";
|
|
35
|
+
import { getUnverifyCollectionInstructionAsync, parseUnverifyCollectionInstruction } from "../instructions/unverifyCollection.js";
|
|
36
|
+
import { getUnverifyCreatorInstructionAsync, parseUnverifyCreatorInstruction } from "../instructions/unverifyCreator.js";
|
|
37
|
+
import { getUnverifyCreatorV2InstructionAsync, parseUnverifyCreatorV2Instruction } from "../instructions/unverifyCreatorV2.js";
|
|
38
|
+
import { getUpdateAssetDataV2InstructionAsync, parseUpdateAssetDataV2Instruction } from "../instructions/updateAssetDataV2.js";
|
|
39
|
+
import { getUpdateMetadataInstructionAsync, parseUpdateMetadataInstruction } from "../instructions/updateMetadata.js";
|
|
40
|
+
import { getUpdateMetadataV2InstructionAsync, parseUpdateMetadataV2Instruction } from "../instructions/updateMetadataV2.js";
|
|
41
|
+
import { getVerifyCollectionInstructionAsync, parseVerifyCollectionInstruction } from "../instructions/verifyCollection.js";
|
|
42
|
+
import { getVerifyCreatorInstructionAsync, parseVerifyCreatorInstruction } from "../instructions/verifyCreator.js";
|
|
43
|
+
import { getVerifyCreatorV2InstructionAsync, parseVerifyCreatorV2Instruction } from "../instructions/verifyCreatorV2.js";
|
|
44
|
+
import { SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT, SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION, SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, SolanaError, assertIsInstructionWithAccounts, containsBytes, extendClient, fixEncoderSize, getBytesEncoder } from "@solana/kit";
|
|
45
|
+
import { addSelfFetchFunctions, addSelfPlanAndSendFunctions } from "@solana/program-client-core";
|
|
46
|
+
//#region src/generated/programs/bubblegum.ts
|
|
47
|
+
const BUBBLEGUM_PROGRAM_ADDRESS = "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
|
|
48
|
+
let BubblegumAccount = /* @__PURE__ */ function(BubblegumAccount) {
|
|
49
|
+
BubblegumAccount[BubblegumAccount["TreeConfig"] = 0] = "TreeConfig";
|
|
50
|
+
BubblegumAccount[BubblegumAccount["Voucher"] = 1] = "Voucher";
|
|
51
|
+
return BubblegumAccount;
|
|
52
|
+
}({});
|
|
53
|
+
function identifyBubblegumAccount(account) {
|
|
54
|
+
const data = "data" in account ? account.data : account;
|
|
55
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
56
|
+
122,
|
|
57
|
+
245,
|
|
58
|
+
175,
|
|
59
|
+
248,
|
|
60
|
+
171,
|
|
61
|
+
34,
|
|
62
|
+
0,
|
|
63
|
+
207
|
|
64
|
+
])), 0)) return 0;
|
|
65
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
66
|
+
191,
|
|
67
|
+
204,
|
|
68
|
+
149,
|
|
69
|
+
234,
|
|
70
|
+
213,
|
|
71
|
+
165,
|
|
72
|
+
13,
|
|
73
|
+
65
|
|
74
|
+
])), 0)) return 1;
|
|
75
|
+
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT, {
|
|
76
|
+
accountData: data,
|
|
77
|
+
programName: "bubblegum"
|
|
78
|
+
});
|
|
27
79
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
80
|
+
let BubblegumInstruction = /* @__PURE__ */ function(BubblegumInstruction) {
|
|
81
|
+
BubblegumInstruction[BubblegumInstruction["Burn"] = 0] = "Burn";
|
|
82
|
+
BubblegumInstruction[BubblegumInstruction["BurnV2"] = 1] = "BurnV2";
|
|
83
|
+
BubblegumInstruction[BubblegumInstruction["CancelRedeem"] = 2] = "CancelRedeem";
|
|
84
|
+
BubblegumInstruction[BubblegumInstruction["CloseTreeV2"] = 3] = "CloseTreeV2";
|
|
85
|
+
BubblegumInstruction[BubblegumInstruction["CollectV2"] = 4] = "CollectV2";
|
|
86
|
+
BubblegumInstruction[BubblegumInstruction["Compress"] = 5] = "Compress";
|
|
87
|
+
BubblegumInstruction[BubblegumInstruction["CreateTree"] = 6] = "CreateTree";
|
|
88
|
+
BubblegumInstruction[BubblegumInstruction["CreateTreeV2"] = 7] = "CreateTreeV2";
|
|
89
|
+
BubblegumInstruction[BubblegumInstruction["DecompressV1"] = 8] = "DecompressV1";
|
|
90
|
+
BubblegumInstruction[BubblegumInstruction["Delegate"] = 9] = "Delegate";
|
|
91
|
+
BubblegumInstruction[BubblegumInstruction["DelegateAndFreezeV2"] = 10] = "DelegateAndFreezeV2";
|
|
92
|
+
BubblegumInstruction[BubblegumInstruction["DelegateV2"] = 11] = "DelegateV2";
|
|
93
|
+
BubblegumInstruction[BubblegumInstruction["FreezeV2"] = 12] = "FreezeV2";
|
|
94
|
+
BubblegumInstruction[BubblegumInstruction["MintToCollectionV1"] = 13] = "MintToCollectionV1";
|
|
95
|
+
BubblegumInstruction[BubblegumInstruction["MintV1"] = 14] = "MintV1";
|
|
96
|
+
BubblegumInstruction[BubblegumInstruction["MintV2"] = 15] = "MintV2";
|
|
97
|
+
BubblegumInstruction[BubblegumInstruction["Redeem"] = 16] = "Redeem";
|
|
98
|
+
BubblegumInstruction[BubblegumInstruction["SetAndVerifyCollection"] = 17] = "SetAndVerifyCollection";
|
|
99
|
+
BubblegumInstruction[BubblegumInstruction["SetCollectionV2"] = 18] = "SetCollectionV2";
|
|
100
|
+
BubblegumInstruction[BubblegumInstruction["SetDecompressableState"] = 19] = "SetDecompressableState";
|
|
101
|
+
BubblegumInstruction[BubblegumInstruction["SetDecompressibleState"] = 20] = "SetDecompressibleState";
|
|
102
|
+
BubblegumInstruction[BubblegumInstruction["SetNonTransferableV2"] = 21] = "SetNonTransferableV2";
|
|
103
|
+
BubblegumInstruction[BubblegumInstruction["SetTreeDelegate"] = 22] = "SetTreeDelegate";
|
|
104
|
+
BubblegumInstruction[BubblegumInstruction["ThawAndRevokeV2"] = 23] = "ThawAndRevokeV2";
|
|
105
|
+
BubblegumInstruction[BubblegumInstruction["ThawV2"] = 24] = "ThawV2";
|
|
106
|
+
BubblegumInstruction[BubblegumInstruction["Transfer"] = 25] = "Transfer";
|
|
107
|
+
BubblegumInstruction[BubblegumInstruction["TransferV2"] = 26] = "TransferV2";
|
|
108
|
+
BubblegumInstruction[BubblegumInstruction["UnverifyCollection"] = 27] = "UnverifyCollection";
|
|
109
|
+
BubblegumInstruction[BubblegumInstruction["UnverifyCreator"] = 28] = "UnverifyCreator";
|
|
110
|
+
BubblegumInstruction[BubblegumInstruction["UnverifyCreatorV2"] = 29] = "UnverifyCreatorV2";
|
|
111
|
+
BubblegumInstruction[BubblegumInstruction["UpdateAssetDataV2"] = 30] = "UpdateAssetDataV2";
|
|
112
|
+
BubblegumInstruction[BubblegumInstruction["UpdateMetadata"] = 31] = "UpdateMetadata";
|
|
113
|
+
BubblegumInstruction[BubblegumInstruction["UpdateMetadataV2"] = 32] = "UpdateMetadataV2";
|
|
114
|
+
BubblegumInstruction[BubblegumInstruction["VerifyCollection"] = 33] = "VerifyCollection";
|
|
115
|
+
BubblegumInstruction[BubblegumInstruction["VerifyCreator"] = 34] = "VerifyCreator";
|
|
116
|
+
BubblegumInstruction[BubblegumInstruction["VerifyCreatorV2"] = 35] = "VerifyCreatorV2";
|
|
117
|
+
return BubblegumInstruction;
|
|
118
|
+
}({});
|
|
119
|
+
function identifyBubblegumInstruction(instruction) {
|
|
120
|
+
const data = "data" in instruction ? instruction.data : instruction;
|
|
121
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
122
|
+
116,
|
|
123
|
+
110,
|
|
124
|
+
29,
|
|
125
|
+
56,
|
|
126
|
+
107,
|
|
127
|
+
219,
|
|
128
|
+
42,
|
|
129
|
+
93
|
|
130
|
+
])), 0)) return 0;
|
|
131
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
132
|
+
115,
|
|
133
|
+
210,
|
|
134
|
+
34,
|
|
135
|
+
240,
|
|
136
|
+
232,
|
|
137
|
+
143,
|
|
138
|
+
183,
|
|
139
|
+
16
|
|
140
|
+
])), 0)) return 1;
|
|
141
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
142
|
+
111,
|
|
143
|
+
76,
|
|
144
|
+
232,
|
|
145
|
+
50,
|
|
146
|
+
39,
|
|
147
|
+
175,
|
|
148
|
+
48,
|
|
149
|
+
242
|
|
150
|
+
])), 0)) return 2;
|
|
151
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
152
|
+
45,
|
|
153
|
+
172,
|
|
154
|
+
6,
|
|
155
|
+
94,
|
|
156
|
+
28,
|
|
157
|
+
90,
|
|
158
|
+
157,
|
|
159
|
+
70
|
|
160
|
+
])), 0)) return 3;
|
|
161
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
162
|
+
21,
|
|
163
|
+
11,
|
|
164
|
+
159,
|
|
165
|
+
47,
|
|
166
|
+
4,
|
|
167
|
+
195,
|
|
168
|
+
106,
|
|
169
|
+
56
|
|
170
|
+
])), 0)) return 4;
|
|
171
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
172
|
+
82,
|
|
173
|
+
193,
|
|
174
|
+
176,
|
|
175
|
+
117,
|
|
176
|
+
176,
|
|
177
|
+
21,
|
|
178
|
+
115,
|
|
179
|
+
253
|
|
180
|
+
])), 0)) return 5;
|
|
181
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
182
|
+
165,
|
|
183
|
+
83,
|
|
184
|
+
136,
|
|
185
|
+
142,
|
|
186
|
+
89,
|
|
187
|
+
202,
|
|
188
|
+
47,
|
|
189
|
+
220
|
|
190
|
+
])), 0)) return 6;
|
|
191
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
192
|
+
55,
|
|
193
|
+
99,
|
|
194
|
+
95,
|
|
195
|
+
215,
|
|
196
|
+
142,
|
|
197
|
+
203,
|
|
198
|
+
227,
|
|
199
|
+
205
|
|
200
|
+
])), 0)) return 7;
|
|
201
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
202
|
+
54,
|
|
203
|
+
85,
|
|
204
|
+
76,
|
|
205
|
+
70,
|
|
206
|
+
228,
|
|
207
|
+
250,
|
|
208
|
+
164,
|
|
209
|
+
81
|
|
210
|
+
])), 0)) return 8;
|
|
211
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
212
|
+
90,
|
|
213
|
+
147,
|
|
214
|
+
75,
|
|
215
|
+
178,
|
|
216
|
+
85,
|
|
217
|
+
88,
|
|
218
|
+
4,
|
|
219
|
+
137
|
|
220
|
+
])), 0)) return 9;
|
|
221
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
222
|
+
17,
|
|
223
|
+
229,
|
|
224
|
+
35,
|
|
225
|
+
218,
|
|
226
|
+
190,
|
|
227
|
+
241,
|
|
228
|
+
250,
|
|
229
|
+
123
|
|
230
|
+
])), 0)) return 10;
|
|
231
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
232
|
+
95,
|
|
233
|
+
87,
|
|
234
|
+
125,
|
|
235
|
+
140,
|
|
236
|
+
181,
|
|
237
|
+
131,
|
|
238
|
+
128,
|
|
239
|
+
227
|
|
240
|
+
])), 0)) return 11;
|
|
241
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
242
|
+
200,
|
|
243
|
+
151,
|
|
244
|
+
244,
|
|
245
|
+
102,
|
|
246
|
+
16,
|
|
247
|
+
195,
|
|
248
|
+
255,
|
|
249
|
+
3
|
|
250
|
+
])), 0)) return 12;
|
|
251
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
252
|
+
153,
|
|
253
|
+
18,
|
|
254
|
+
178,
|
|
255
|
+
47,
|
|
256
|
+
197,
|
|
257
|
+
158,
|
|
258
|
+
86,
|
|
259
|
+
15
|
|
260
|
+
])), 0)) return 13;
|
|
261
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
262
|
+
145,
|
|
263
|
+
98,
|
|
264
|
+
192,
|
|
265
|
+
118,
|
|
266
|
+
184,
|
|
267
|
+
147,
|
|
268
|
+
118,
|
|
269
|
+
104
|
|
270
|
+
])), 0)) return 14;
|
|
271
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
272
|
+
120,
|
|
273
|
+
121,
|
|
274
|
+
23,
|
|
275
|
+
146,
|
|
276
|
+
173,
|
|
277
|
+
110,
|
|
278
|
+
199,
|
|
279
|
+
205
|
|
280
|
+
])), 0)) return 15;
|
|
281
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
282
|
+
184,
|
|
283
|
+
12,
|
|
284
|
+
86,
|
|
285
|
+
149,
|
|
286
|
+
70,
|
|
287
|
+
196,
|
|
288
|
+
97,
|
|
289
|
+
225
|
|
290
|
+
])), 0)) return 16;
|
|
291
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
292
|
+
235,
|
|
293
|
+
242,
|
|
294
|
+
121,
|
|
295
|
+
216,
|
|
296
|
+
158,
|
|
297
|
+
234,
|
|
298
|
+
180,
|
|
299
|
+
234
|
|
300
|
+
])), 0)) return 17;
|
|
301
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
302
|
+
229,
|
|
303
|
+
35,
|
|
304
|
+
61,
|
|
305
|
+
91,
|
|
306
|
+
15,
|
|
307
|
+
14,
|
|
308
|
+
99,
|
|
309
|
+
160
|
|
310
|
+
])), 0)) return 18;
|
|
311
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
312
|
+
18,
|
|
313
|
+
135,
|
|
314
|
+
238,
|
|
315
|
+
168,
|
|
316
|
+
246,
|
|
317
|
+
195,
|
|
318
|
+
61,
|
|
319
|
+
115
|
|
320
|
+
])), 0)) return 19;
|
|
321
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
322
|
+
82,
|
|
323
|
+
104,
|
|
324
|
+
152,
|
|
325
|
+
6,
|
|
326
|
+
149,
|
|
327
|
+
111,
|
|
328
|
+
100,
|
|
329
|
+
13
|
|
330
|
+
])), 0)) return 20;
|
|
331
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
332
|
+
181,
|
|
333
|
+
141,
|
|
334
|
+
206,
|
|
335
|
+
58,
|
|
336
|
+
242,
|
|
337
|
+
199,
|
|
338
|
+
152,
|
|
339
|
+
168
|
|
340
|
+
])), 0)) return 21;
|
|
341
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
342
|
+
253,
|
|
343
|
+
118,
|
|
344
|
+
66,
|
|
345
|
+
37,
|
|
346
|
+
190,
|
|
347
|
+
49,
|
|
348
|
+
154,
|
|
349
|
+
102
|
|
350
|
+
])), 0)) return 22;
|
|
351
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
352
|
+
86,
|
|
353
|
+
214,
|
|
354
|
+
190,
|
|
355
|
+
37,
|
|
356
|
+
167,
|
|
357
|
+
4,
|
|
358
|
+
28,
|
|
359
|
+
116
|
|
360
|
+
])), 0)) return 23;
|
|
361
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
362
|
+
96,
|
|
363
|
+
133,
|
|
364
|
+
101,
|
|
365
|
+
93,
|
|
366
|
+
82,
|
|
367
|
+
220,
|
|
368
|
+
146,
|
|
369
|
+
191
|
|
370
|
+
])), 0)) return 24;
|
|
371
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
372
|
+
163,
|
|
373
|
+
52,
|
|
374
|
+
200,
|
|
375
|
+
231,
|
|
376
|
+
140,
|
|
377
|
+
3,
|
|
378
|
+
69,
|
|
379
|
+
186
|
|
380
|
+
])), 0)) return 25;
|
|
381
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
382
|
+
119,
|
|
383
|
+
40,
|
|
384
|
+
6,
|
|
385
|
+
235,
|
|
386
|
+
234,
|
|
387
|
+
221,
|
|
388
|
+
248,
|
|
389
|
+
49
|
|
390
|
+
])), 0)) return 26;
|
|
391
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
392
|
+
250,
|
|
393
|
+
251,
|
|
394
|
+
42,
|
|
395
|
+
106,
|
|
396
|
+
41,
|
|
397
|
+
137,
|
|
398
|
+
186,
|
|
399
|
+
168
|
|
400
|
+
])), 0)) return 27;
|
|
401
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
402
|
+
107,
|
|
403
|
+
178,
|
|
404
|
+
57,
|
|
405
|
+
39,
|
|
406
|
+
105,
|
|
407
|
+
115,
|
|
408
|
+
112,
|
|
409
|
+
152
|
|
410
|
+
])), 0)) return 28;
|
|
411
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
412
|
+
174,
|
|
413
|
+
112,
|
|
414
|
+
29,
|
|
415
|
+
142,
|
|
416
|
+
230,
|
|
417
|
+
100,
|
|
418
|
+
239,
|
|
419
|
+
7
|
|
420
|
+
])), 0)) return 29;
|
|
421
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
422
|
+
59,
|
|
423
|
+
56,
|
|
424
|
+
111,
|
|
425
|
+
43,
|
|
426
|
+
95,
|
|
427
|
+
14,
|
|
428
|
+
11,
|
|
429
|
+
61
|
|
430
|
+
])), 0)) return 30;
|
|
431
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
432
|
+
170,
|
|
433
|
+
182,
|
|
434
|
+
43,
|
|
435
|
+
239,
|
|
436
|
+
97,
|
|
437
|
+
78,
|
|
438
|
+
225,
|
|
439
|
+
186
|
|
440
|
+
])), 0)) return 31;
|
|
441
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
442
|
+
43,
|
|
443
|
+
103,
|
|
444
|
+
89,
|
|
445
|
+
42,
|
|
446
|
+
121,
|
|
447
|
+
242,
|
|
448
|
+
62,
|
|
449
|
+
72
|
|
450
|
+
])), 0)) return 32;
|
|
451
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
452
|
+
56,
|
|
453
|
+
113,
|
|
454
|
+
101,
|
|
455
|
+
253,
|
|
456
|
+
79,
|
|
457
|
+
55,
|
|
458
|
+
122,
|
|
459
|
+
169
|
|
460
|
+
])), 0)) return 33;
|
|
461
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
462
|
+
52,
|
|
463
|
+
17,
|
|
464
|
+
96,
|
|
465
|
+
132,
|
|
466
|
+
71,
|
|
467
|
+
4,
|
|
468
|
+
85,
|
|
469
|
+
194
|
|
470
|
+
])), 0)) return 34;
|
|
471
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([
|
|
472
|
+
85,
|
|
473
|
+
138,
|
|
474
|
+
140,
|
|
475
|
+
42,
|
|
476
|
+
22,
|
|
477
|
+
241,
|
|
478
|
+
118,
|
|
479
|
+
102
|
|
480
|
+
])), 0)) return 35;
|
|
481
|
+
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION, {
|
|
482
|
+
instructionData: data,
|
|
483
|
+
programName: "bubblegum"
|
|
484
|
+
});
|
|
178
485
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
...parseUpdateMetadataInstruction(instruction),
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
case BubblegumInstruction.UpdateMetadataV2: {
|
|
407
|
-
assertIsInstructionWithAccounts(instruction);
|
|
408
|
-
return {
|
|
409
|
-
instructionType: BubblegumInstruction.UpdateMetadataV2,
|
|
410
|
-
...parseUpdateMetadataV2Instruction(instruction),
|
|
411
|
-
};
|
|
412
|
-
}
|
|
413
|
-
case BubblegumInstruction.VerifyCollection: {
|
|
414
|
-
assertIsInstructionWithAccounts(instruction);
|
|
415
|
-
return {
|
|
416
|
-
instructionType: BubblegumInstruction.VerifyCollection,
|
|
417
|
-
...parseVerifyCollectionInstruction(instruction),
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
case BubblegumInstruction.VerifyCreator: {
|
|
421
|
-
assertIsInstructionWithAccounts(instruction);
|
|
422
|
-
return {
|
|
423
|
-
instructionType: BubblegumInstruction.VerifyCreator,
|
|
424
|
-
...parseVerifyCreatorInstruction(instruction),
|
|
425
|
-
};
|
|
426
|
-
}
|
|
427
|
-
case BubblegumInstruction.VerifyCreatorV2: {
|
|
428
|
-
assertIsInstructionWithAccounts(instruction);
|
|
429
|
-
return {
|
|
430
|
-
instructionType: BubblegumInstruction.VerifyCreatorV2,
|
|
431
|
-
...parseVerifyCreatorV2Instruction(instruction),
|
|
432
|
-
};
|
|
433
|
-
}
|
|
434
|
-
default:
|
|
435
|
-
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, {
|
|
436
|
-
instructionType: instructionType,
|
|
437
|
-
programName: "bubblegum",
|
|
438
|
-
});
|
|
439
|
-
}
|
|
486
|
+
function parseBubblegumInstruction(instruction) {
|
|
487
|
+
const instructionType = identifyBubblegumInstruction(instruction);
|
|
488
|
+
switch (instructionType) {
|
|
489
|
+
case 0:
|
|
490
|
+
assertIsInstructionWithAccounts(instruction);
|
|
491
|
+
return {
|
|
492
|
+
instructionType: 0,
|
|
493
|
+
...parseBurnInstruction(instruction)
|
|
494
|
+
};
|
|
495
|
+
case 1:
|
|
496
|
+
assertIsInstructionWithAccounts(instruction);
|
|
497
|
+
return {
|
|
498
|
+
instructionType: 1,
|
|
499
|
+
...parseBurnV2Instruction(instruction)
|
|
500
|
+
};
|
|
501
|
+
case 2:
|
|
502
|
+
assertIsInstructionWithAccounts(instruction);
|
|
503
|
+
return {
|
|
504
|
+
instructionType: 2,
|
|
505
|
+
...parseCancelRedeemInstruction(instruction)
|
|
506
|
+
};
|
|
507
|
+
case 3:
|
|
508
|
+
assertIsInstructionWithAccounts(instruction);
|
|
509
|
+
return {
|
|
510
|
+
instructionType: 3,
|
|
511
|
+
...parseCloseTreeV2Instruction(instruction)
|
|
512
|
+
};
|
|
513
|
+
case 4:
|
|
514
|
+
assertIsInstructionWithAccounts(instruction);
|
|
515
|
+
return {
|
|
516
|
+
instructionType: 4,
|
|
517
|
+
...parseCollectV2Instruction(instruction)
|
|
518
|
+
};
|
|
519
|
+
case 5:
|
|
520
|
+
assertIsInstructionWithAccounts(instruction);
|
|
521
|
+
return {
|
|
522
|
+
instructionType: 5,
|
|
523
|
+
...parseCompressInstruction(instruction)
|
|
524
|
+
};
|
|
525
|
+
case 6:
|
|
526
|
+
assertIsInstructionWithAccounts(instruction);
|
|
527
|
+
return {
|
|
528
|
+
instructionType: 6,
|
|
529
|
+
...parseCreateTreeInstruction(instruction)
|
|
530
|
+
};
|
|
531
|
+
case 7:
|
|
532
|
+
assertIsInstructionWithAccounts(instruction);
|
|
533
|
+
return {
|
|
534
|
+
instructionType: 7,
|
|
535
|
+
...parseCreateTreeV2Instruction(instruction)
|
|
536
|
+
};
|
|
537
|
+
case 8:
|
|
538
|
+
assertIsInstructionWithAccounts(instruction);
|
|
539
|
+
return {
|
|
540
|
+
instructionType: 8,
|
|
541
|
+
...parseDecompressV1Instruction(instruction)
|
|
542
|
+
};
|
|
543
|
+
case 9:
|
|
544
|
+
assertIsInstructionWithAccounts(instruction);
|
|
545
|
+
return {
|
|
546
|
+
instructionType: 9,
|
|
547
|
+
...parseDelegateInstruction(instruction)
|
|
548
|
+
};
|
|
549
|
+
case 10:
|
|
550
|
+
assertIsInstructionWithAccounts(instruction);
|
|
551
|
+
return {
|
|
552
|
+
instructionType: 10,
|
|
553
|
+
...parseDelegateAndFreezeV2Instruction(instruction)
|
|
554
|
+
};
|
|
555
|
+
case 11:
|
|
556
|
+
assertIsInstructionWithAccounts(instruction);
|
|
557
|
+
return {
|
|
558
|
+
instructionType: 11,
|
|
559
|
+
...parseDelegateV2Instruction(instruction)
|
|
560
|
+
};
|
|
561
|
+
case 12:
|
|
562
|
+
assertIsInstructionWithAccounts(instruction);
|
|
563
|
+
return {
|
|
564
|
+
instructionType: 12,
|
|
565
|
+
...parseFreezeV2Instruction(instruction)
|
|
566
|
+
};
|
|
567
|
+
case 13:
|
|
568
|
+
assertIsInstructionWithAccounts(instruction);
|
|
569
|
+
return {
|
|
570
|
+
instructionType: 13,
|
|
571
|
+
...parseMintToCollectionV1Instruction(instruction)
|
|
572
|
+
};
|
|
573
|
+
case 14:
|
|
574
|
+
assertIsInstructionWithAccounts(instruction);
|
|
575
|
+
return {
|
|
576
|
+
instructionType: 14,
|
|
577
|
+
...parseMintV1Instruction(instruction)
|
|
578
|
+
};
|
|
579
|
+
case 15:
|
|
580
|
+
assertIsInstructionWithAccounts(instruction);
|
|
581
|
+
return {
|
|
582
|
+
instructionType: 15,
|
|
583
|
+
...parseMintV2Instruction(instruction)
|
|
584
|
+
};
|
|
585
|
+
case 16:
|
|
586
|
+
assertIsInstructionWithAccounts(instruction);
|
|
587
|
+
return {
|
|
588
|
+
instructionType: 16,
|
|
589
|
+
...parseRedeemInstruction(instruction)
|
|
590
|
+
};
|
|
591
|
+
case 17:
|
|
592
|
+
assertIsInstructionWithAccounts(instruction);
|
|
593
|
+
return {
|
|
594
|
+
instructionType: 17,
|
|
595
|
+
...parseSetAndVerifyCollectionInstruction(instruction)
|
|
596
|
+
};
|
|
597
|
+
case 18:
|
|
598
|
+
assertIsInstructionWithAccounts(instruction);
|
|
599
|
+
return {
|
|
600
|
+
instructionType: 18,
|
|
601
|
+
...parseSetCollectionV2Instruction(instruction)
|
|
602
|
+
};
|
|
603
|
+
case 19:
|
|
604
|
+
assertIsInstructionWithAccounts(instruction);
|
|
605
|
+
return {
|
|
606
|
+
instructionType: 19,
|
|
607
|
+
...parseSetDecompressableStateInstruction(instruction)
|
|
608
|
+
};
|
|
609
|
+
case 20:
|
|
610
|
+
assertIsInstructionWithAccounts(instruction);
|
|
611
|
+
return {
|
|
612
|
+
instructionType: 20,
|
|
613
|
+
...parseSetDecompressibleStateInstruction(instruction)
|
|
614
|
+
};
|
|
615
|
+
case 21:
|
|
616
|
+
assertIsInstructionWithAccounts(instruction);
|
|
617
|
+
return {
|
|
618
|
+
instructionType: 21,
|
|
619
|
+
...parseSetNonTransferableV2Instruction(instruction)
|
|
620
|
+
};
|
|
621
|
+
case 22:
|
|
622
|
+
assertIsInstructionWithAccounts(instruction);
|
|
623
|
+
return {
|
|
624
|
+
instructionType: 22,
|
|
625
|
+
...parseSetTreeDelegateInstruction(instruction)
|
|
626
|
+
};
|
|
627
|
+
case 23:
|
|
628
|
+
assertIsInstructionWithAccounts(instruction);
|
|
629
|
+
return {
|
|
630
|
+
instructionType: 23,
|
|
631
|
+
...parseThawAndRevokeV2Instruction(instruction)
|
|
632
|
+
};
|
|
633
|
+
case 24:
|
|
634
|
+
assertIsInstructionWithAccounts(instruction);
|
|
635
|
+
return {
|
|
636
|
+
instructionType: 24,
|
|
637
|
+
...parseThawV2Instruction(instruction)
|
|
638
|
+
};
|
|
639
|
+
case 25:
|
|
640
|
+
assertIsInstructionWithAccounts(instruction);
|
|
641
|
+
return {
|
|
642
|
+
instructionType: 25,
|
|
643
|
+
...parseTransferInstruction(instruction)
|
|
644
|
+
};
|
|
645
|
+
case 26:
|
|
646
|
+
assertIsInstructionWithAccounts(instruction);
|
|
647
|
+
return {
|
|
648
|
+
instructionType: 26,
|
|
649
|
+
...parseTransferV2Instruction(instruction)
|
|
650
|
+
};
|
|
651
|
+
case 27:
|
|
652
|
+
assertIsInstructionWithAccounts(instruction);
|
|
653
|
+
return {
|
|
654
|
+
instructionType: 27,
|
|
655
|
+
...parseUnverifyCollectionInstruction(instruction)
|
|
656
|
+
};
|
|
657
|
+
case 28:
|
|
658
|
+
assertIsInstructionWithAccounts(instruction);
|
|
659
|
+
return {
|
|
660
|
+
instructionType: 28,
|
|
661
|
+
...parseUnverifyCreatorInstruction(instruction)
|
|
662
|
+
};
|
|
663
|
+
case 29:
|
|
664
|
+
assertIsInstructionWithAccounts(instruction);
|
|
665
|
+
return {
|
|
666
|
+
instructionType: 29,
|
|
667
|
+
...parseUnverifyCreatorV2Instruction(instruction)
|
|
668
|
+
};
|
|
669
|
+
case 30:
|
|
670
|
+
assertIsInstructionWithAccounts(instruction);
|
|
671
|
+
return {
|
|
672
|
+
instructionType: 30,
|
|
673
|
+
...parseUpdateAssetDataV2Instruction(instruction)
|
|
674
|
+
};
|
|
675
|
+
case 31:
|
|
676
|
+
assertIsInstructionWithAccounts(instruction);
|
|
677
|
+
return {
|
|
678
|
+
instructionType: 31,
|
|
679
|
+
...parseUpdateMetadataInstruction(instruction)
|
|
680
|
+
};
|
|
681
|
+
case 32:
|
|
682
|
+
assertIsInstructionWithAccounts(instruction);
|
|
683
|
+
return {
|
|
684
|
+
instructionType: 32,
|
|
685
|
+
...parseUpdateMetadataV2Instruction(instruction)
|
|
686
|
+
};
|
|
687
|
+
case 33:
|
|
688
|
+
assertIsInstructionWithAccounts(instruction);
|
|
689
|
+
return {
|
|
690
|
+
instructionType: 33,
|
|
691
|
+
...parseVerifyCollectionInstruction(instruction)
|
|
692
|
+
};
|
|
693
|
+
case 34:
|
|
694
|
+
assertIsInstructionWithAccounts(instruction);
|
|
695
|
+
return {
|
|
696
|
+
instructionType: 34,
|
|
697
|
+
...parseVerifyCreatorInstruction(instruction)
|
|
698
|
+
};
|
|
699
|
+
case 35:
|
|
700
|
+
assertIsInstructionWithAccounts(instruction);
|
|
701
|
+
return {
|
|
702
|
+
instructionType: 35,
|
|
703
|
+
...parseVerifyCreatorV2Instruction(instruction)
|
|
704
|
+
};
|
|
705
|
+
default: throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, {
|
|
706
|
+
instructionType,
|
|
707
|
+
programName: "bubblegum"
|
|
708
|
+
});
|
|
709
|
+
}
|
|
440
710
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
711
|
+
function bubblegumProgram() {
|
|
712
|
+
return (client) => {
|
|
713
|
+
return extendClient(client, { bubblegum: {
|
|
714
|
+
accounts: {
|
|
715
|
+
treeConfig: addSelfFetchFunctions(client, getTreeConfigCodec()),
|
|
716
|
+
voucher: addSelfFetchFunctions(client, getVoucherCodec())
|
|
717
|
+
},
|
|
718
|
+
instructions: {
|
|
719
|
+
burn: (input) => addSelfPlanAndSendFunctions(client, getBurnInstructionAsync(input)),
|
|
720
|
+
burnV2: (input) => addSelfPlanAndSendFunctions(client, getBurnV2InstructionAsync({
|
|
721
|
+
...input,
|
|
722
|
+
payer: input.payer ?? client.payer
|
|
723
|
+
})),
|
|
724
|
+
cancelRedeem: (input) => addSelfPlanAndSendFunctions(client, getCancelRedeemInstructionAsync(input)),
|
|
725
|
+
closeTreeV2: (input) => addSelfPlanAndSendFunctions(client, getCloseTreeV2InstructionAsync(input)),
|
|
726
|
+
collectV2: (input) => addSelfPlanAndSendFunctions(client, getCollectV2Instruction(input)),
|
|
727
|
+
compress: (input) => addSelfPlanAndSendFunctions(client, getCompressInstructionAsync({
|
|
728
|
+
...input,
|
|
729
|
+
payer: input.payer ?? client.payer
|
|
730
|
+
})),
|
|
731
|
+
createTree: (input) => addSelfPlanAndSendFunctions(client, getCreateTreeInstructionAsync({
|
|
732
|
+
...input,
|
|
733
|
+
payer: input.payer ?? client.payer
|
|
734
|
+
})),
|
|
735
|
+
createTreeV2: (input) => addSelfPlanAndSendFunctions(client, getCreateTreeV2InstructionAsync({
|
|
736
|
+
...input,
|
|
737
|
+
payer: input.payer ?? client.payer
|
|
738
|
+
})),
|
|
739
|
+
decompressV1: (input) => addSelfPlanAndSendFunctions(client, getDecompressV1InstructionAsync(input)),
|
|
740
|
+
delegate: (input) => addSelfPlanAndSendFunctions(client, getDelegateInstructionAsync(input)),
|
|
741
|
+
delegateAndFreezeV2: (input) => addSelfPlanAndSendFunctions(client, getDelegateAndFreezeV2InstructionAsync({
|
|
742
|
+
...input,
|
|
743
|
+
payer: input.payer ?? client.payer
|
|
744
|
+
})),
|
|
745
|
+
delegateV2: (input) => addSelfPlanAndSendFunctions(client, getDelegateV2InstructionAsync({
|
|
746
|
+
...input,
|
|
747
|
+
payer: input.payer ?? client.payer
|
|
748
|
+
})),
|
|
749
|
+
freezeV2: (input) => addSelfPlanAndSendFunctions(client, getFreezeV2InstructionAsync({
|
|
750
|
+
...input,
|
|
751
|
+
payer: input.payer ?? client.payer
|
|
752
|
+
})),
|
|
753
|
+
mintToCollectionV1: (input) => addSelfPlanAndSendFunctions(client, getMintToCollectionV1InstructionAsync({
|
|
754
|
+
...input,
|
|
755
|
+
payer: input.payer ?? client.payer
|
|
756
|
+
})),
|
|
757
|
+
mintV1: (input) => addSelfPlanAndSendFunctions(client, getMintV1InstructionAsync({
|
|
758
|
+
...input,
|
|
759
|
+
payer: input.payer ?? client.payer
|
|
760
|
+
})),
|
|
761
|
+
mintV2: (input) => addSelfPlanAndSendFunctions(client, getMintV2InstructionAsync({
|
|
762
|
+
...input,
|
|
763
|
+
payer: input.payer ?? client.payer
|
|
764
|
+
})),
|
|
765
|
+
redeem: (input) => addSelfPlanAndSendFunctions(client, getRedeemInstructionAsync(input)),
|
|
766
|
+
setAndVerifyCollection: (input) => addSelfPlanAndSendFunctions(client, getSetAndVerifyCollectionInstructionAsync({
|
|
767
|
+
...input,
|
|
768
|
+
payer: input.payer ?? client.payer
|
|
769
|
+
})),
|
|
770
|
+
setCollectionV2: (input) => addSelfPlanAndSendFunctions(client, getSetCollectionV2InstructionAsync({
|
|
771
|
+
...input,
|
|
772
|
+
payer: input.payer ?? client.payer
|
|
773
|
+
})),
|
|
774
|
+
setDecompressableState: (input) => addSelfPlanAndSendFunctions(client, getSetDecompressableStateInstruction(input)),
|
|
775
|
+
setDecompressibleState: (input) => addSelfPlanAndSendFunctions(client, getSetDecompressibleStateInstruction(input)),
|
|
776
|
+
setNonTransferableV2: (input) => addSelfPlanAndSendFunctions(client, getSetNonTransferableV2InstructionAsync({
|
|
777
|
+
...input,
|
|
778
|
+
payer: input.payer ?? client.payer
|
|
779
|
+
})),
|
|
780
|
+
setTreeDelegate: (input) => addSelfPlanAndSendFunctions(client, getSetTreeDelegateInstructionAsync(input)),
|
|
781
|
+
thawAndRevokeV2: (input) => addSelfPlanAndSendFunctions(client, getThawAndRevokeV2InstructionAsync({
|
|
782
|
+
...input,
|
|
783
|
+
payer: input.payer ?? client.payer
|
|
784
|
+
})),
|
|
785
|
+
thawV2: (input) => addSelfPlanAndSendFunctions(client, getThawV2InstructionAsync({
|
|
786
|
+
...input,
|
|
787
|
+
payer: input.payer ?? client.payer
|
|
788
|
+
})),
|
|
789
|
+
transfer: (input) => addSelfPlanAndSendFunctions(client, getTransferInstructionAsync(input)),
|
|
790
|
+
transferV2: (input) => addSelfPlanAndSendFunctions(client, getTransferV2InstructionAsync({
|
|
791
|
+
...input,
|
|
792
|
+
payer: input.payer ?? client.payer
|
|
793
|
+
})),
|
|
794
|
+
unverifyCollection: (input) => addSelfPlanAndSendFunctions(client, getUnverifyCollectionInstructionAsync({
|
|
795
|
+
...input,
|
|
796
|
+
payer: input.payer ?? client.payer
|
|
797
|
+
})),
|
|
798
|
+
unverifyCreator: (input) => addSelfPlanAndSendFunctions(client, getUnverifyCreatorInstructionAsync({
|
|
799
|
+
...input,
|
|
800
|
+
payer: input.payer ?? client.payer
|
|
801
|
+
})),
|
|
802
|
+
unverifyCreatorV2: (input) => addSelfPlanAndSendFunctions(client, getUnverifyCreatorV2InstructionAsync({
|
|
803
|
+
...input,
|
|
804
|
+
payer: input.payer ?? client.payer
|
|
805
|
+
})),
|
|
806
|
+
updateAssetDataV2: (input) => addSelfPlanAndSendFunctions(client, getUpdateAssetDataV2InstructionAsync({
|
|
807
|
+
...input,
|
|
808
|
+
payer: input.payer ?? client.payer
|
|
809
|
+
})),
|
|
810
|
+
updateMetadata: (input) => addSelfPlanAndSendFunctions(client, getUpdateMetadataInstructionAsync({
|
|
811
|
+
...input,
|
|
812
|
+
payer: input.payer ?? client.payer
|
|
813
|
+
})),
|
|
814
|
+
updateMetadataV2: (input) => addSelfPlanAndSendFunctions(client, getUpdateMetadataV2InstructionAsync({
|
|
815
|
+
...input,
|
|
816
|
+
payer: input.payer ?? client.payer
|
|
817
|
+
})),
|
|
818
|
+
verifyCollection: (input) => addSelfPlanAndSendFunctions(client, getVerifyCollectionInstructionAsync({
|
|
819
|
+
...input,
|
|
820
|
+
payer: input.payer ?? client.payer
|
|
821
|
+
})),
|
|
822
|
+
verifyCreator: (input) => addSelfPlanAndSendFunctions(client, getVerifyCreatorInstructionAsync({
|
|
823
|
+
...input,
|
|
824
|
+
payer: input.payer ?? client.payer
|
|
825
|
+
})),
|
|
826
|
+
verifyCreatorV2: (input) => addSelfPlanAndSendFunctions(client, getVerifyCreatorV2InstructionAsync({
|
|
827
|
+
...input,
|
|
828
|
+
payer: input.payer ?? client.payer
|
|
829
|
+
}))
|
|
830
|
+
},
|
|
831
|
+
pdas: {
|
|
832
|
+
treeConfig: findTreeConfigPda,
|
|
833
|
+
voucher: findVoucherPda,
|
|
834
|
+
assetId: findAssetIdPda,
|
|
835
|
+
bubblegumSigner: findBubblegumSignerPda,
|
|
836
|
+
mintAuthority: findMintAuthorityPda
|
|
837
|
+
}
|
|
838
|
+
} });
|
|
839
|
+
};
|
|
565
840
|
}
|
|
841
|
+
//#endregion
|
|
842
|
+
export { BUBBLEGUM_PROGRAM_ADDRESS, BubblegumAccount, BubblegumInstruction, bubblegumProgram, identifyBubblegumAccount, identifyBubblegumInstruction, parseBubblegumInstruction };
|
|
843
|
+
|
|
566
844
|
//# sourceMappingURL=bubblegum.js.map
|