@macalinao/clients-mpl-bubblegum 0.0.0 → 0.2.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/README.md +15 -1
- package/dist/.tsbuildinfo +1 -0
- package/dist/generated/accounts/index.d.ts +10 -0
- package/dist/generated/accounts/index.d.ts.map +1 -0
- package/dist/generated/accounts/index.js +10 -0
- package/dist/generated/accounts/index.js.map +1 -0
- package/dist/generated/accounts/treeConfig.d.ts +44 -0
- package/dist/generated/accounts/treeConfig.d.ts.map +1 -0
- package/dist/generated/accounts/treeConfig.js +67 -0
- package/dist/generated/accounts/treeConfig.js.map +1 -0
- package/dist/generated/accounts/voucher.d.ts +36 -0
- package/dist/generated/accounts/voucher.d.ts.map +1 -0
- package/dist/generated/accounts/voucher.js +59 -0
- package/dist/generated/accounts/voucher.js.map +1 -0
- package/dist/generated/errors/bubblegum.d.ts +134 -0
- package/dist/generated/errors/bubblegum.d.ts.map +1 -0
- package/dist/generated/errors/bubblegum.js +195 -0
- package/dist/generated/errors/bubblegum.js.map +1 -0
- package/dist/generated/errors/index.d.ts +9 -0
- package/dist/generated/errors/index.d.ts.map +1 -0
- package/dist/generated/errors/index.js +9 -0
- package/dist/generated/errors/index.js.map +1 -0
- package/dist/generated/index.d.ts +13 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +13 -0
- package/dist/generated/index.js.map +1 -0
- package/dist/generated/instructions/burn.d.ts +71 -0
- package/dist/generated/instructions/burn.d.ts.map +1 -0
- package/dist/generated/instructions/burn.js +106 -0
- package/dist/generated/instructions/burn.js.map +1 -0
- package/dist/generated/instructions/burnV2.d.ts +102 -0
- package/dist/generated/instructions/burnV2.d.ts.map +1 -0
- package/dist/generated/instructions/burnV2.js +144 -0
- package/dist/generated/instructions/burnV2.js.map +1 -0
- package/dist/generated/instructions/cancelRedeem.d.ts +59 -0
- package/dist/generated/instructions/cancelRedeem.d.ts.map +1 -0
- package/dist/generated/instructions/cancelRedeem.js +98 -0
- package/dist/generated/instructions/cancelRedeem.js.map +1 -0
- package/dist/generated/instructions/closeTreeV2.d.ts +65 -0
- package/dist/generated/instructions/closeTreeV2.d.ts.map +1 -0
- package/dist/generated/instructions/closeTreeV2.js +92 -0
- package/dist/generated/instructions/closeTreeV2.js.map +1 -0
- package/dist/generated/instructions/collectV2.d.ts +40 -0
- package/dist/generated/instructions/collectV2.d.ts.map +1 -0
- package/dist/generated/instructions/collectV2.js +69 -0
- package/dist/generated/instructions/collectV2.js.map +1 -0
- package/dist/generated/instructions/compress.d.ts +76 -0
- package/dist/generated/instructions/compress.d.ts.map +1 -0
- package/dist/generated/instructions/compress.js +124 -0
- package/dist/generated/instructions/compress.js.map +1 -0
- package/dist/generated/instructions/createTree.d.ts +65 -0
- package/dist/generated/instructions/createTree.d.ts.map +1 -0
- package/dist/generated/instructions/createTree.js +102 -0
- package/dist/generated/instructions/createTree.js.map +1 -0
- package/dist/generated/instructions/createTreeV2.d.ts +67 -0
- package/dist/generated/instructions/createTreeV2.d.ts.map +1 -0
- package/dist/generated/instructions/createTreeV2.js +108 -0
- package/dist/generated/instructions/createTreeV2.js.map +1 -0
- package/dist/generated/instructions/decompressV1.d.ts +78 -0
- package/dist/generated/instructions/decompressV1.d.ts.map +1 -0
- package/dist/generated/instructions/decompressV1.js +136 -0
- package/dist/generated/instructions/decompressV1.js.map +1 -0
- package/dist/generated/instructions/delegate.d.ts +74 -0
- package/dist/generated/instructions/delegate.d.ts.map +1 -0
- package/dist/generated/instructions/delegate.js +115 -0
- package/dist/generated/instructions/delegate.js.map +1 -0
- package/dist/generated/instructions/delegateAndFreezeV2.d.ts +90 -0
- package/dist/generated/instructions/delegateAndFreezeV2.d.ts.map +1 -0
- package/dist/generated/instructions/delegateAndFreezeV2.js +143 -0
- package/dist/generated/instructions/delegateAndFreezeV2.js.map +1 -0
- package/dist/generated/instructions/delegateV2.d.ts +90 -0
- package/dist/generated/instructions/delegateV2.d.ts.map +1 -0
- package/dist/generated/instructions/delegateV2.js +142 -0
- package/dist/generated/instructions/delegateV2.js.map +1 -0
- package/dist/generated/instructions/freezeV2.d.ts +94 -0
- package/dist/generated/instructions/freezeV2.d.ts.map +1 -0
- package/dist/generated/instructions/freezeV2.js +131 -0
- package/dist/generated/instructions/freezeV2.js.map +1 -0
- package/dist/generated/instructions/index.d.ts +44 -0
- package/dist/generated/instructions/index.d.ts.map +1 -0
- package/dist/generated/instructions/index.js +44 -0
- package/dist/generated/instructions/index.js.map +1 -0
- package/dist/generated/instructions/mintToCollectionV1.d.ts +95 -0
- package/dist/generated/instructions/mintToCollectionV1.d.ts.map +1 -0
- package/dist/generated/instructions/mintToCollectionV1.js +146 -0
- package/dist/generated/instructions/mintToCollectionV1.js.map +1 -0
- package/dist/generated/instructions/mintV1.d.ts +66 -0
- package/dist/generated/instructions/mintV1.d.ts.map +1 -0
- package/dist/generated/instructions/mintV1.js +105 -0
- package/dist/generated/instructions/mintV1.js.map +1 -0
- package/dist/generated/instructions/mintV2.d.ts +88 -0
- package/dist/generated/instructions/mintV2.d.ts.map +1 -0
- package/dist/generated/instructions/mintV2.js +143 -0
- package/dist/generated/instructions/mintV2.js.map +1 -0
- package/dist/generated/instructions/redeem.d.ts +74 -0
- package/dist/generated/instructions/redeem.d.ts.map +1 -0
- package/dist/generated/instructions/redeem.js +109 -0
- package/dist/generated/instructions/redeem.js.map +1 -0
- package/dist/generated/instructions/setAndVerifyCollection.d.ts +123 -0
- package/dist/generated/instructions/setAndVerifyCollection.d.ts.map +1 -0
- package/dist/generated/instructions/setAndVerifyCollection.js +158 -0
- package/dist/generated/instructions/setAndVerifyCollection.js.map +1 -0
- package/dist/generated/instructions/setCollectionV2.d.ts +116 -0
- package/dist/generated/instructions/setCollectionV2.d.ts.map +1 -0
- package/dist/generated/instructions/setCollectionV2.js +153 -0
- package/dist/generated/instructions/setCollectionV2.js.map +1 -0
- package/dist/generated/instructions/setDecompressableState.d.ts +45 -0
- package/dist/generated/instructions/setDecompressableState.d.ts.map +1 -0
- package/dist/generated/instructions/setDecompressableState.js +77 -0
- package/dist/generated/instructions/setDecompressableState.js.map +1 -0
- package/dist/generated/instructions/setDecompressibleState.d.ts +45 -0
- package/dist/generated/instructions/setDecompressibleState.d.ts.map +1 -0
- package/dist/generated/instructions/setDecompressibleState.js +77 -0
- package/dist/generated/instructions/setDecompressibleState.js.map +1 -0
- package/dist/generated/instructions/setNonTransferableV2.d.ts +96 -0
- package/dist/generated/instructions/setNonTransferableV2.d.ts.map +1 -0
- package/dist/generated/instructions/setNonTransferableV2.js +132 -0
- package/dist/generated/instructions/setNonTransferableV2.js.map +1 -0
- package/dist/generated/instructions/setTreeDelegate.d.ts +49 -0
- package/dist/generated/instructions/setTreeDelegate.d.ts.map +1 -0
- package/dist/generated/instructions/setTreeDelegate.js +84 -0
- package/dist/generated/instructions/setTreeDelegate.js.map +1 -0
- package/dist/generated/instructions/thawAndRevokeV2.d.ts +85 -0
- package/dist/generated/instructions/thawAndRevokeV2.d.ts.map +1 -0
- package/dist/generated/instructions/thawAndRevokeV2.js +131 -0
- package/dist/generated/instructions/thawAndRevokeV2.js.map +1 -0
- package/dist/generated/instructions/thawV2.d.ts +94 -0
- package/dist/generated/instructions/thawV2.d.ts.map +1 -0
- package/dist/generated/instructions/thawV2.js +131 -0
- package/dist/generated/instructions/thawV2.js.map +1 -0
- package/dist/generated/instructions/transfer.d.ts +74 -0
- package/dist/generated/instructions/transfer.d.ts.map +1 -0
- package/dist/generated/instructions/transfer.js +109 -0
- package/dist/generated/instructions/transfer.js.map +1 -0
- package/dist/generated/instructions/transferV2.d.ts +99 -0
- package/dist/generated/instructions/transferV2.d.ts.map +1 -0
- package/dist/generated/instructions/transferV2.js +134 -0
- package/dist/generated/instructions/transferV2.js.map +1 -0
- package/dist/generated/instructions/unverifyCollection.d.ts +120 -0
- package/dist/generated/instructions/unverifyCollection.d.ts.map +1 -0
- package/dist/generated/instructions/unverifyCollection.js +153 -0
- package/dist/generated/instructions/unverifyCollection.js.map +1 -0
- package/dist/generated/instructions/unverifyCreator.d.ts +81 -0
- package/dist/generated/instructions/unverifyCreator.d.ts.map +1 -0
- package/dist/generated/instructions/unverifyCreator.js +113 -0
- package/dist/generated/instructions/unverifyCreator.js.map +1 -0
- package/dist/generated/instructions/unverifyCreatorV2.d.ts +85 -0
- package/dist/generated/instructions/unverifyCreatorV2.d.ts.map +1 -0
- package/dist/generated/instructions/unverifyCreatorV2.js +125 -0
- package/dist/generated/instructions/unverifyCreatorV2.js.map +1 -0
- package/dist/generated/instructions/updateAssetDataV2.d.ts +101 -0
- package/dist/generated/instructions/updateAssetDataV2.d.ts.map +1 -0
- package/dist/generated/instructions/updateAssetDataV2.js +143 -0
- package/dist/generated/instructions/updateAssetDataV2.js.map +1 -0
- package/dist/generated/instructions/updateMetadata.d.ts +102 -0
- package/dist/generated/instructions/updateMetadata.d.ts.map +1 -0
- package/dist/generated/instructions/updateMetadata.js +142 -0
- package/dist/generated/instructions/updateMetadata.js.map +1 -0
- package/dist/generated/instructions/updateMetadataV2.d.ts +97 -0
- package/dist/generated/instructions/updateMetadataV2.d.ts.map +1 -0
- package/dist/generated/instructions/updateMetadataV2.js +130 -0
- package/dist/generated/instructions/updateMetadataV2.js.map +1 -0
- package/dist/generated/instructions/verifyCollection.d.ts +120 -0
- package/dist/generated/instructions/verifyCollection.d.ts.map +1 -0
- package/dist/generated/instructions/verifyCollection.js +153 -0
- package/dist/generated/instructions/verifyCollection.js.map +1 -0
- package/dist/generated/instructions/verifyCreator.d.ts +81 -0
- package/dist/generated/instructions/verifyCreator.d.ts.map +1 -0
- package/dist/generated/instructions/verifyCreator.js +115 -0
- package/dist/generated/instructions/verifyCreator.js.map +1 -0
- package/dist/generated/instructions/verifyCreatorV2.d.ts +85 -0
- package/dist/generated/instructions/verifyCreatorV2.d.ts.map +1 -0
- package/dist/generated/instructions/verifyCreatorV2.js +125 -0
- package/dist/generated/instructions/verifyCreatorV2.js.map +1 -0
- package/dist/generated/programs/bubblegum.d.ts +189 -0
- package/dist/generated/programs/bubblegum.d.ts.map +1 -0
- package/dist/generated/programs/bubblegum.js +566 -0
- package/dist/generated/programs/bubblegum.js.map +1 -0
- package/dist/generated/programs/index.d.ts +9 -0
- package/dist/generated/programs/index.d.ts.map +1 -0
- package/dist/generated/programs/index.js +9 -0
- package/dist/generated/programs/index.js.map +1 -0
- package/dist/generated/types/assetDataSchema.d.ts +18 -0
- package/dist/generated/types/assetDataSchema.d.ts.map +1 -0
- package/dist/generated/types/assetDataSchema.js +24 -0
- package/dist/generated/types/assetDataSchema.js.map +1 -0
- package/dist/generated/types/bubblegumEventType.d.ts +17 -0
- package/dist/generated/types/bubblegumEventType.d.ts.map +1 -0
- package/dist/generated/types/bubblegumEventType.js +23 -0
- package/dist/generated/types/bubblegumEventType.js.map +1 -0
- package/dist/generated/types/collection.d.ts +17 -0
- package/dist/generated/types/collection.d.ts.map +1 -0
- package/dist/generated/types/collection.js +24 -0
- package/dist/generated/types/collection.js.map +1 -0
- package/dist/generated/types/creator.d.ts +23 -0
- package/dist/generated/types/creator.d.ts.map +1 -0
- package/dist/generated/types/creator.js +26 -0
- package/dist/generated/types/creator.js.map +1 -0
- package/dist/generated/types/decompressibleState.d.ts +17 -0
- package/dist/generated/types/decompressibleState.d.ts.map +1 -0
- package/dist/generated/types/decompressibleState.js +23 -0
- package/dist/generated/types/decompressibleState.js.map +1 -0
- package/dist/generated/types/index.d.ts +23 -0
- package/dist/generated/types/index.d.ts.map +1 -0
- package/dist/generated/types/index.js +23 -0
- package/dist/generated/types/index.js.map +1 -0
- package/dist/generated/types/instructionName.d.ts +50 -0
- package/dist/generated/types/instructionName.d.ts.map +1 -0
- package/dist/generated/types/instructionName.js +56 -0
- package/dist/generated/types/instructionName.js.map +1 -0
- package/dist/generated/types/leafSchema.d.ts +57 -0
- package/dist/generated/types/leafSchema.d.ts.map +1 -0
- package/dist/generated/types/leafSchema.js +78 -0
- package/dist/generated/types/leafSchema.js.map +1 -0
- package/dist/generated/types/metadataArgs.d.ts +61 -0
- package/dist/generated/types/metadataArgs.d.ts.map +1 -0
- package/dist/generated/types/metadataArgs.js +45 -0
- package/dist/generated/types/metadataArgs.js.map +1 -0
- package/dist/generated/types/metadataArgsV2.d.ts +53 -0
- package/dist/generated/types/metadataArgsV2.d.ts.map +1 -0
- package/dist/generated/types/metadataArgsV2.js +39 -0
- package/dist/generated/types/metadataArgsV2.js.map +1 -0
- package/dist/generated/types/tokenProgramVersion.d.ts +17 -0
- package/dist/generated/types/tokenProgramVersion.d.ts.map +1 -0
- package/dist/generated/types/tokenProgramVersion.js +23 -0
- package/dist/generated/types/tokenProgramVersion.js.map +1 -0
- package/dist/generated/types/tokenStandard.d.ts +19 -0
- package/dist/generated/types/tokenStandard.d.ts.map +1 -0
- package/dist/generated/types/tokenStandard.js +25 -0
- package/dist/generated/types/tokenStandard.js.map +1 -0
- package/dist/generated/types/updateArgs.d.ts +31 -0
- package/dist/generated/types/updateArgs.d.ts.map +1 -0
- package/dist/generated/types/updateArgs.js +53 -0
- package/dist/generated/types/updateArgs.js.map +1 -0
- package/dist/generated/types/useMethod.d.ts +18 -0
- package/dist/generated/types/useMethod.d.ts.map +1 -0
- package/dist/generated/types/useMethod.js +24 -0
- package/dist/generated/types/useMethod.js.map +1 -0
- package/dist/generated/types/uses.d.ts +23 -0
- package/dist/generated/types/uses.d.ts.map +1 -0
- package/dist/generated/types/uses.js +27 -0
- package/dist/generated/types/uses.js.map +1 -0
- package/dist/generated/types/version.d.ts +17 -0
- package/dist/generated/types/version.d.ts.map +1 -0
- package/dist/generated/types/version.js +23 -0
- package/dist/generated/types/version.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -5
- package/src/generated/accounts/index.ts +10 -0
- package/src/generated/accounts/treeConfig.ts +175 -0
- package/src/generated/accounts/voucher.ts +144 -0
- package/src/generated/errors/bubblegum.ts +309 -0
- package/src/generated/errors/index.ts +9 -0
- package/src/generated/index.ts +13 -0
- package/src/generated/instructions/burn.ts +310 -0
- package/src/generated/instructions/burnV2.ts +431 -0
- package/src/generated/instructions/cancelRedeem.ts +292 -0
- package/src/generated/instructions/closeTreeV2.ts +285 -0
- package/src/generated/instructions/collectV2.ts +184 -0
- package/src/generated/instructions/compress.ts +388 -0
- package/src/generated/instructions/createTree.ts +306 -0
- package/src/generated/instructions/createTreeV2.ts +316 -0
- package/src/generated/instructions/decompressV1.ts +404 -0
- package/src/generated/instructions/delegate.ts +334 -0
- package/src/generated/instructions/delegateAndFreezeV2.ts +397 -0
- package/src/generated/instructions/delegateV2.ts +391 -0
- package/src/generated/instructions/freezeV2.ts +392 -0
- package/src/generated/instructions/index.ts +44 -0
- package/src/generated/instructions/mintToCollectionV1.ts +457 -0
- package/src/generated/instructions/mintV1.ts +320 -0
- package/src/generated/instructions/mintV2.ts +435 -0
- package/src/generated/instructions/redeem.ts +328 -0
- package/src/generated/instructions/setAndVerifyCollection.ts +506 -0
- package/src/generated/instructions/setCollectionV2.ts +477 -0
- package/src/generated/instructions/setDecompressableState.ts +218 -0
- package/src/generated/instructions/setDecompressibleState.ts +218 -0
- package/src/generated/instructions/setNonTransferableV2.ts +400 -0
- package/src/generated/instructions/setTreeDelegate.ts +246 -0
- package/src/generated/instructions/thawAndRevokeV2.ts +370 -0
- package/src/generated/instructions/thawV2.ts +392 -0
- package/src/generated/instructions/transfer.ts +324 -0
- package/src/generated/instructions/transferV2.ts +408 -0
- package/src/generated/instructions/unverifyCollection.ts +496 -0
- package/src/generated/instructions/unverifyCreator.ts +354 -0
- package/src/generated/instructions/unverifyCreatorV2.ts +375 -0
- package/src/generated/instructions/updateAssetDataV2.ts +423 -0
- package/src/generated/instructions/updateMetadata.ts +449 -0
- package/src/generated/instructions/updateMetadataV2.ts +407 -0
- package/src/generated/instructions/verifyCollection.ts +494 -0
- package/src/generated/instructions/verifyCreator.ts +355 -0
- package/src/generated/instructions/verifyCreatorV2.ts +375 -0
- package/src/generated/programs/bubblegum.ts +1466 -0
- package/src/generated/programs/index.ts +9 -0
- package/src/generated/types/assetDataSchema.ts +37 -0
- package/src/generated/types/bubblegumEventType.ts +39 -0
- package/src/generated/types/collection.ts +51 -0
- package/src/generated/types/creator.ts +58 -0
- package/src/generated/types/decompressibleState.ts +39 -0
- package/src/generated/types/index.ts +23 -0
- package/src/generated/types/instructionName.ts +69 -0
- package/src/generated/types/leafSchema.ts +166 -0
- package/src/generated/types/metadataArgs.ts +148 -0
- package/src/generated/types/metadataArgsV2.ts +126 -0
- package/src/generated/types/tokenProgramVersion.ts +39 -0
- package/src/generated/types/tokenStandard.ts +38 -0
- package/src/generated/types/updateArgs.ts +102 -0
- package/src/generated/types/useMethod.ts +34 -0
- package/src/generated/types/uses.ts +54 -0
- package/src/generated/types/version.ts +33 -0
- package/src/index.ts +8 -0
|
@@ -0,0 +1,1466 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type {
|
|
10
|
+
Address,
|
|
11
|
+
ClientWithPayer,
|
|
12
|
+
ClientWithRpc,
|
|
13
|
+
ClientWithTransactionPlanning,
|
|
14
|
+
ClientWithTransactionSending,
|
|
15
|
+
GetAccountInfoApi,
|
|
16
|
+
GetMultipleAccountsApi,
|
|
17
|
+
Instruction,
|
|
18
|
+
InstructionWithData,
|
|
19
|
+
ReadonlyUint8Array,
|
|
20
|
+
} from "@solana/kit";
|
|
21
|
+
import type {
|
|
22
|
+
SelfFetchFunctions,
|
|
23
|
+
SelfPlanAndSendFunctions,
|
|
24
|
+
} from "@solana/program-client-core";
|
|
25
|
+
import type {
|
|
26
|
+
TreeConfig,
|
|
27
|
+
TreeConfigArgs,
|
|
28
|
+
Voucher,
|
|
29
|
+
VoucherArgs,
|
|
30
|
+
} from "../accounts/index.js";
|
|
31
|
+
import type {
|
|
32
|
+
BurnInput,
|
|
33
|
+
BurnV2Input,
|
|
34
|
+
CancelRedeemInput,
|
|
35
|
+
CloseTreeV2Input,
|
|
36
|
+
CollectV2Input,
|
|
37
|
+
CompressInput,
|
|
38
|
+
CreateTreeInput,
|
|
39
|
+
CreateTreeV2Input,
|
|
40
|
+
DecompressV1Input,
|
|
41
|
+
DelegateAndFreezeV2Input,
|
|
42
|
+
DelegateInput,
|
|
43
|
+
DelegateV2Input,
|
|
44
|
+
FreezeV2Input,
|
|
45
|
+
MintToCollectionV1Input,
|
|
46
|
+
MintV1Input,
|
|
47
|
+
MintV2Input,
|
|
48
|
+
ParsedBurnInstruction,
|
|
49
|
+
ParsedBurnV2Instruction,
|
|
50
|
+
ParsedCancelRedeemInstruction,
|
|
51
|
+
ParsedCloseTreeV2Instruction,
|
|
52
|
+
ParsedCollectV2Instruction,
|
|
53
|
+
ParsedCompressInstruction,
|
|
54
|
+
ParsedCreateTreeInstruction,
|
|
55
|
+
ParsedCreateTreeV2Instruction,
|
|
56
|
+
ParsedDecompressV1Instruction,
|
|
57
|
+
ParsedDelegateAndFreezeV2Instruction,
|
|
58
|
+
ParsedDelegateInstruction,
|
|
59
|
+
ParsedDelegateV2Instruction,
|
|
60
|
+
ParsedFreezeV2Instruction,
|
|
61
|
+
ParsedMintToCollectionV1Instruction,
|
|
62
|
+
ParsedMintV1Instruction,
|
|
63
|
+
ParsedMintV2Instruction,
|
|
64
|
+
ParsedRedeemInstruction,
|
|
65
|
+
ParsedSetAndVerifyCollectionInstruction,
|
|
66
|
+
ParsedSetCollectionV2Instruction,
|
|
67
|
+
ParsedSetDecompressableStateInstruction,
|
|
68
|
+
ParsedSetDecompressibleStateInstruction,
|
|
69
|
+
ParsedSetNonTransferableV2Instruction,
|
|
70
|
+
ParsedSetTreeDelegateInstruction,
|
|
71
|
+
ParsedThawAndRevokeV2Instruction,
|
|
72
|
+
ParsedThawV2Instruction,
|
|
73
|
+
ParsedTransferInstruction,
|
|
74
|
+
ParsedTransferV2Instruction,
|
|
75
|
+
ParsedUnverifyCollectionInstruction,
|
|
76
|
+
ParsedUnverifyCreatorInstruction,
|
|
77
|
+
ParsedUnverifyCreatorV2Instruction,
|
|
78
|
+
ParsedUpdateAssetDataV2Instruction,
|
|
79
|
+
ParsedUpdateMetadataInstruction,
|
|
80
|
+
ParsedUpdateMetadataV2Instruction,
|
|
81
|
+
ParsedVerifyCollectionInstruction,
|
|
82
|
+
ParsedVerifyCreatorInstruction,
|
|
83
|
+
ParsedVerifyCreatorV2Instruction,
|
|
84
|
+
RedeemInput,
|
|
85
|
+
SetAndVerifyCollectionInput,
|
|
86
|
+
SetCollectionV2Input,
|
|
87
|
+
SetDecompressableStateInput,
|
|
88
|
+
SetDecompressibleStateInput,
|
|
89
|
+
SetNonTransferableV2Input,
|
|
90
|
+
SetTreeDelegateInput,
|
|
91
|
+
ThawAndRevokeV2Input,
|
|
92
|
+
ThawV2Input,
|
|
93
|
+
TransferInput,
|
|
94
|
+
TransferV2Input,
|
|
95
|
+
UnverifyCollectionInput,
|
|
96
|
+
UnverifyCreatorInput,
|
|
97
|
+
UnverifyCreatorV2Input,
|
|
98
|
+
UpdateAssetDataV2Input,
|
|
99
|
+
UpdateMetadataInput,
|
|
100
|
+
UpdateMetadataV2Input,
|
|
101
|
+
VerifyCollectionInput,
|
|
102
|
+
VerifyCreatorInput,
|
|
103
|
+
VerifyCreatorV2Input,
|
|
104
|
+
} from "../instructions/index.js";
|
|
105
|
+
import {
|
|
106
|
+
assertIsInstructionWithAccounts,
|
|
107
|
+
containsBytes,
|
|
108
|
+
extendClient,
|
|
109
|
+
fixEncoderSize,
|
|
110
|
+
getBytesEncoder,
|
|
111
|
+
SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT,
|
|
112
|
+
SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION,
|
|
113
|
+
SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE,
|
|
114
|
+
SolanaError,
|
|
115
|
+
} from "@solana/kit";
|
|
116
|
+
import {
|
|
117
|
+
addSelfFetchFunctions,
|
|
118
|
+
addSelfPlanAndSendFunctions,
|
|
119
|
+
} from "@solana/program-client-core";
|
|
120
|
+
import { getTreeConfigCodec, getVoucherCodec } from "../accounts/index.js";
|
|
121
|
+
import {
|
|
122
|
+
getBurnInstruction,
|
|
123
|
+
getBurnV2Instruction,
|
|
124
|
+
getCancelRedeemInstruction,
|
|
125
|
+
getCloseTreeV2Instruction,
|
|
126
|
+
getCollectV2Instruction,
|
|
127
|
+
getCompressInstruction,
|
|
128
|
+
getCreateTreeInstruction,
|
|
129
|
+
getCreateTreeV2Instruction,
|
|
130
|
+
getDecompressV1Instruction,
|
|
131
|
+
getDelegateAndFreezeV2Instruction,
|
|
132
|
+
getDelegateInstruction,
|
|
133
|
+
getDelegateV2Instruction,
|
|
134
|
+
getFreezeV2Instruction,
|
|
135
|
+
getMintToCollectionV1Instruction,
|
|
136
|
+
getMintV1Instruction,
|
|
137
|
+
getMintV2Instruction,
|
|
138
|
+
getRedeemInstruction,
|
|
139
|
+
getSetAndVerifyCollectionInstruction,
|
|
140
|
+
getSetCollectionV2Instruction,
|
|
141
|
+
getSetDecompressableStateInstruction,
|
|
142
|
+
getSetDecompressibleStateInstruction,
|
|
143
|
+
getSetNonTransferableV2Instruction,
|
|
144
|
+
getSetTreeDelegateInstruction,
|
|
145
|
+
getThawAndRevokeV2Instruction,
|
|
146
|
+
getThawV2Instruction,
|
|
147
|
+
getTransferInstruction,
|
|
148
|
+
getTransferV2Instruction,
|
|
149
|
+
getUnverifyCollectionInstruction,
|
|
150
|
+
getUnverifyCreatorInstruction,
|
|
151
|
+
getUnverifyCreatorV2Instruction,
|
|
152
|
+
getUpdateAssetDataV2Instruction,
|
|
153
|
+
getUpdateMetadataInstruction,
|
|
154
|
+
getUpdateMetadataV2Instruction,
|
|
155
|
+
getVerifyCollectionInstruction,
|
|
156
|
+
getVerifyCreatorInstruction,
|
|
157
|
+
getVerifyCreatorV2Instruction,
|
|
158
|
+
parseBurnInstruction,
|
|
159
|
+
parseBurnV2Instruction,
|
|
160
|
+
parseCancelRedeemInstruction,
|
|
161
|
+
parseCloseTreeV2Instruction,
|
|
162
|
+
parseCollectV2Instruction,
|
|
163
|
+
parseCompressInstruction,
|
|
164
|
+
parseCreateTreeInstruction,
|
|
165
|
+
parseCreateTreeV2Instruction,
|
|
166
|
+
parseDecompressV1Instruction,
|
|
167
|
+
parseDelegateAndFreezeV2Instruction,
|
|
168
|
+
parseDelegateInstruction,
|
|
169
|
+
parseDelegateV2Instruction,
|
|
170
|
+
parseFreezeV2Instruction,
|
|
171
|
+
parseMintToCollectionV1Instruction,
|
|
172
|
+
parseMintV1Instruction,
|
|
173
|
+
parseMintV2Instruction,
|
|
174
|
+
parseRedeemInstruction,
|
|
175
|
+
parseSetAndVerifyCollectionInstruction,
|
|
176
|
+
parseSetCollectionV2Instruction,
|
|
177
|
+
parseSetDecompressableStateInstruction,
|
|
178
|
+
parseSetDecompressibleStateInstruction,
|
|
179
|
+
parseSetNonTransferableV2Instruction,
|
|
180
|
+
parseSetTreeDelegateInstruction,
|
|
181
|
+
parseThawAndRevokeV2Instruction,
|
|
182
|
+
parseThawV2Instruction,
|
|
183
|
+
parseTransferInstruction,
|
|
184
|
+
parseTransferV2Instruction,
|
|
185
|
+
parseUnverifyCollectionInstruction,
|
|
186
|
+
parseUnverifyCreatorInstruction,
|
|
187
|
+
parseUnverifyCreatorV2Instruction,
|
|
188
|
+
parseUpdateAssetDataV2Instruction,
|
|
189
|
+
parseUpdateMetadataInstruction,
|
|
190
|
+
parseUpdateMetadataV2Instruction,
|
|
191
|
+
parseVerifyCollectionInstruction,
|
|
192
|
+
parseVerifyCreatorInstruction,
|
|
193
|
+
parseVerifyCreatorV2Instruction,
|
|
194
|
+
} from "../instructions/index.js";
|
|
195
|
+
|
|
196
|
+
export const BUBBLEGUM_PROGRAM_ADDRESS =
|
|
197
|
+
"BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY" as Address<"BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY">;
|
|
198
|
+
|
|
199
|
+
export enum BubblegumAccount {
|
|
200
|
+
TreeConfig = 0,
|
|
201
|
+
Voucher = 1,
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export function identifyBubblegumAccount(
|
|
205
|
+
account: { data: ReadonlyUint8Array } | ReadonlyUint8Array,
|
|
206
|
+
): BubblegumAccount {
|
|
207
|
+
const data = "data" in account ? account.data : account;
|
|
208
|
+
if (
|
|
209
|
+
containsBytes(
|
|
210
|
+
data,
|
|
211
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
212
|
+
new Uint8Array([122, 245, 175, 248, 171, 34, 0, 207]),
|
|
213
|
+
),
|
|
214
|
+
0,
|
|
215
|
+
)
|
|
216
|
+
) {
|
|
217
|
+
return BubblegumAccount.TreeConfig;
|
|
218
|
+
}
|
|
219
|
+
if (
|
|
220
|
+
containsBytes(
|
|
221
|
+
data,
|
|
222
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
223
|
+
new Uint8Array([191, 204, 149, 234, 213, 165, 13, 65]),
|
|
224
|
+
),
|
|
225
|
+
0,
|
|
226
|
+
)
|
|
227
|
+
) {
|
|
228
|
+
return BubblegumAccount.Voucher;
|
|
229
|
+
}
|
|
230
|
+
throw new SolanaError(
|
|
231
|
+
SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT,
|
|
232
|
+
{ accountData: data, programName: "bubblegum" },
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export enum BubblegumInstruction {
|
|
237
|
+
Burn = 0,
|
|
238
|
+
BurnV2 = 1,
|
|
239
|
+
CancelRedeem = 2,
|
|
240
|
+
CloseTreeV2 = 3,
|
|
241
|
+
CollectV2 = 4,
|
|
242
|
+
Compress = 5,
|
|
243
|
+
CreateTree = 6,
|
|
244
|
+
CreateTreeV2 = 7,
|
|
245
|
+
DecompressV1 = 8,
|
|
246
|
+
Delegate = 9,
|
|
247
|
+
DelegateAndFreezeV2 = 10,
|
|
248
|
+
DelegateV2 = 11,
|
|
249
|
+
FreezeV2 = 12,
|
|
250
|
+
MintToCollectionV1 = 13,
|
|
251
|
+
MintV1 = 14,
|
|
252
|
+
MintV2 = 15,
|
|
253
|
+
Redeem = 16,
|
|
254
|
+
SetAndVerifyCollection = 17,
|
|
255
|
+
SetCollectionV2 = 18,
|
|
256
|
+
SetDecompressableState = 19,
|
|
257
|
+
SetDecompressibleState = 20,
|
|
258
|
+
SetNonTransferableV2 = 21,
|
|
259
|
+
SetTreeDelegate = 22,
|
|
260
|
+
ThawAndRevokeV2 = 23,
|
|
261
|
+
ThawV2 = 24,
|
|
262
|
+
Transfer = 25,
|
|
263
|
+
TransferV2 = 26,
|
|
264
|
+
UnverifyCollection = 27,
|
|
265
|
+
UnverifyCreator = 28,
|
|
266
|
+
UnverifyCreatorV2 = 29,
|
|
267
|
+
UpdateAssetDataV2 = 30,
|
|
268
|
+
UpdateMetadata = 31,
|
|
269
|
+
UpdateMetadataV2 = 32,
|
|
270
|
+
VerifyCollection = 33,
|
|
271
|
+
VerifyCreator = 34,
|
|
272
|
+
VerifyCreatorV2 = 35,
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export function identifyBubblegumInstruction(
|
|
276
|
+
instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array,
|
|
277
|
+
): BubblegumInstruction {
|
|
278
|
+
const data = "data" in instruction ? instruction.data : instruction;
|
|
279
|
+
if (
|
|
280
|
+
containsBytes(
|
|
281
|
+
data,
|
|
282
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
283
|
+
new Uint8Array([116, 110, 29, 56, 107, 219, 42, 93]),
|
|
284
|
+
),
|
|
285
|
+
0,
|
|
286
|
+
)
|
|
287
|
+
) {
|
|
288
|
+
return BubblegumInstruction.Burn;
|
|
289
|
+
}
|
|
290
|
+
if (
|
|
291
|
+
containsBytes(
|
|
292
|
+
data,
|
|
293
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
294
|
+
new Uint8Array([115, 210, 34, 240, 232, 143, 183, 16]),
|
|
295
|
+
),
|
|
296
|
+
0,
|
|
297
|
+
)
|
|
298
|
+
) {
|
|
299
|
+
return BubblegumInstruction.BurnV2;
|
|
300
|
+
}
|
|
301
|
+
if (
|
|
302
|
+
containsBytes(
|
|
303
|
+
data,
|
|
304
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
305
|
+
new Uint8Array([111, 76, 232, 50, 39, 175, 48, 242]),
|
|
306
|
+
),
|
|
307
|
+
0,
|
|
308
|
+
)
|
|
309
|
+
) {
|
|
310
|
+
return BubblegumInstruction.CancelRedeem;
|
|
311
|
+
}
|
|
312
|
+
if (
|
|
313
|
+
containsBytes(
|
|
314
|
+
data,
|
|
315
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
316
|
+
new Uint8Array([45, 172, 6, 94, 28, 90, 157, 70]),
|
|
317
|
+
),
|
|
318
|
+
0,
|
|
319
|
+
)
|
|
320
|
+
) {
|
|
321
|
+
return BubblegumInstruction.CloseTreeV2;
|
|
322
|
+
}
|
|
323
|
+
if (
|
|
324
|
+
containsBytes(
|
|
325
|
+
data,
|
|
326
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
327
|
+
new Uint8Array([21, 11, 159, 47, 4, 195, 106, 56]),
|
|
328
|
+
),
|
|
329
|
+
0,
|
|
330
|
+
)
|
|
331
|
+
) {
|
|
332
|
+
return BubblegumInstruction.CollectV2;
|
|
333
|
+
}
|
|
334
|
+
if (
|
|
335
|
+
containsBytes(
|
|
336
|
+
data,
|
|
337
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
338
|
+
new Uint8Array([82, 193, 176, 117, 176, 21, 115, 253]),
|
|
339
|
+
),
|
|
340
|
+
0,
|
|
341
|
+
)
|
|
342
|
+
) {
|
|
343
|
+
return BubblegumInstruction.Compress;
|
|
344
|
+
}
|
|
345
|
+
if (
|
|
346
|
+
containsBytes(
|
|
347
|
+
data,
|
|
348
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
349
|
+
new Uint8Array([165, 83, 136, 142, 89, 202, 47, 220]),
|
|
350
|
+
),
|
|
351
|
+
0,
|
|
352
|
+
)
|
|
353
|
+
) {
|
|
354
|
+
return BubblegumInstruction.CreateTree;
|
|
355
|
+
}
|
|
356
|
+
if (
|
|
357
|
+
containsBytes(
|
|
358
|
+
data,
|
|
359
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
360
|
+
new Uint8Array([55, 99, 95, 215, 142, 203, 227, 205]),
|
|
361
|
+
),
|
|
362
|
+
0,
|
|
363
|
+
)
|
|
364
|
+
) {
|
|
365
|
+
return BubblegumInstruction.CreateTreeV2;
|
|
366
|
+
}
|
|
367
|
+
if (
|
|
368
|
+
containsBytes(
|
|
369
|
+
data,
|
|
370
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
371
|
+
new Uint8Array([54, 85, 76, 70, 228, 250, 164, 81]),
|
|
372
|
+
),
|
|
373
|
+
0,
|
|
374
|
+
)
|
|
375
|
+
) {
|
|
376
|
+
return BubblegumInstruction.DecompressV1;
|
|
377
|
+
}
|
|
378
|
+
if (
|
|
379
|
+
containsBytes(
|
|
380
|
+
data,
|
|
381
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
382
|
+
new Uint8Array([90, 147, 75, 178, 85, 88, 4, 137]),
|
|
383
|
+
),
|
|
384
|
+
0,
|
|
385
|
+
)
|
|
386
|
+
) {
|
|
387
|
+
return BubblegumInstruction.Delegate;
|
|
388
|
+
}
|
|
389
|
+
if (
|
|
390
|
+
containsBytes(
|
|
391
|
+
data,
|
|
392
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
393
|
+
new Uint8Array([17, 229, 35, 218, 190, 241, 250, 123]),
|
|
394
|
+
),
|
|
395
|
+
0,
|
|
396
|
+
)
|
|
397
|
+
) {
|
|
398
|
+
return BubblegumInstruction.DelegateAndFreezeV2;
|
|
399
|
+
}
|
|
400
|
+
if (
|
|
401
|
+
containsBytes(
|
|
402
|
+
data,
|
|
403
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
404
|
+
new Uint8Array([95, 87, 125, 140, 181, 131, 128, 227]),
|
|
405
|
+
),
|
|
406
|
+
0,
|
|
407
|
+
)
|
|
408
|
+
) {
|
|
409
|
+
return BubblegumInstruction.DelegateV2;
|
|
410
|
+
}
|
|
411
|
+
if (
|
|
412
|
+
containsBytes(
|
|
413
|
+
data,
|
|
414
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
415
|
+
new Uint8Array([200, 151, 244, 102, 16, 195, 255, 3]),
|
|
416
|
+
),
|
|
417
|
+
0,
|
|
418
|
+
)
|
|
419
|
+
) {
|
|
420
|
+
return BubblegumInstruction.FreezeV2;
|
|
421
|
+
}
|
|
422
|
+
if (
|
|
423
|
+
containsBytes(
|
|
424
|
+
data,
|
|
425
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
426
|
+
new Uint8Array([153, 18, 178, 47, 197, 158, 86, 15]),
|
|
427
|
+
),
|
|
428
|
+
0,
|
|
429
|
+
)
|
|
430
|
+
) {
|
|
431
|
+
return BubblegumInstruction.MintToCollectionV1;
|
|
432
|
+
}
|
|
433
|
+
if (
|
|
434
|
+
containsBytes(
|
|
435
|
+
data,
|
|
436
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
437
|
+
new Uint8Array([145, 98, 192, 118, 184, 147, 118, 104]),
|
|
438
|
+
),
|
|
439
|
+
0,
|
|
440
|
+
)
|
|
441
|
+
) {
|
|
442
|
+
return BubblegumInstruction.MintV1;
|
|
443
|
+
}
|
|
444
|
+
if (
|
|
445
|
+
containsBytes(
|
|
446
|
+
data,
|
|
447
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
448
|
+
new Uint8Array([120, 121, 23, 146, 173, 110, 199, 205]),
|
|
449
|
+
),
|
|
450
|
+
0,
|
|
451
|
+
)
|
|
452
|
+
) {
|
|
453
|
+
return BubblegumInstruction.MintV2;
|
|
454
|
+
}
|
|
455
|
+
if (
|
|
456
|
+
containsBytes(
|
|
457
|
+
data,
|
|
458
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
459
|
+
new Uint8Array([184, 12, 86, 149, 70, 196, 97, 225]),
|
|
460
|
+
),
|
|
461
|
+
0,
|
|
462
|
+
)
|
|
463
|
+
) {
|
|
464
|
+
return BubblegumInstruction.Redeem;
|
|
465
|
+
}
|
|
466
|
+
if (
|
|
467
|
+
containsBytes(
|
|
468
|
+
data,
|
|
469
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
470
|
+
new Uint8Array([235, 242, 121, 216, 158, 234, 180, 234]),
|
|
471
|
+
),
|
|
472
|
+
0,
|
|
473
|
+
)
|
|
474
|
+
) {
|
|
475
|
+
return BubblegumInstruction.SetAndVerifyCollection;
|
|
476
|
+
}
|
|
477
|
+
if (
|
|
478
|
+
containsBytes(
|
|
479
|
+
data,
|
|
480
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
481
|
+
new Uint8Array([229, 35, 61, 91, 15, 14, 99, 160]),
|
|
482
|
+
),
|
|
483
|
+
0,
|
|
484
|
+
)
|
|
485
|
+
) {
|
|
486
|
+
return BubblegumInstruction.SetCollectionV2;
|
|
487
|
+
}
|
|
488
|
+
if (
|
|
489
|
+
containsBytes(
|
|
490
|
+
data,
|
|
491
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
492
|
+
new Uint8Array([18, 135, 238, 168, 246, 195, 61, 115]),
|
|
493
|
+
),
|
|
494
|
+
0,
|
|
495
|
+
)
|
|
496
|
+
) {
|
|
497
|
+
return BubblegumInstruction.SetDecompressableState;
|
|
498
|
+
}
|
|
499
|
+
if (
|
|
500
|
+
containsBytes(
|
|
501
|
+
data,
|
|
502
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
503
|
+
new Uint8Array([82, 104, 152, 6, 149, 111, 100, 13]),
|
|
504
|
+
),
|
|
505
|
+
0,
|
|
506
|
+
)
|
|
507
|
+
) {
|
|
508
|
+
return BubblegumInstruction.SetDecompressibleState;
|
|
509
|
+
}
|
|
510
|
+
if (
|
|
511
|
+
containsBytes(
|
|
512
|
+
data,
|
|
513
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
514
|
+
new Uint8Array([181, 141, 206, 58, 242, 199, 152, 168]),
|
|
515
|
+
),
|
|
516
|
+
0,
|
|
517
|
+
)
|
|
518
|
+
) {
|
|
519
|
+
return BubblegumInstruction.SetNonTransferableV2;
|
|
520
|
+
}
|
|
521
|
+
if (
|
|
522
|
+
containsBytes(
|
|
523
|
+
data,
|
|
524
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
525
|
+
new Uint8Array([253, 118, 66, 37, 190, 49, 154, 102]),
|
|
526
|
+
),
|
|
527
|
+
0,
|
|
528
|
+
)
|
|
529
|
+
) {
|
|
530
|
+
return BubblegumInstruction.SetTreeDelegate;
|
|
531
|
+
}
|
|
532
|
+
if (
|
|
533
|
+
containsBytes(
|
|
534
|
+
data,
|
|
535
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
536
|
+
new Uint8Array([86, 214, 190, 37, 167, 4, 28, 116]),
|
|
537
|
+
),
|
|
538
|
+
0,
|
|
539
|
+
)
|
|
540
|
+
) {
|
|
541
|
+
return BubblegumInstruction.ThawAndRevokeV2;
|
|
542
|
+
}
|
|
543
|
+
if (
|
|
544
|
+
containsBytes(
|
|
545
|
+
data,
|
|
546
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
547
|
+
new Uint8Array([96, 133, 101, 93, 82, 220, 146, 191]),
|
|
548
|
+
),
|
|
549
|
+
0,
|
|
550
|
+
)
|
|
551
|
+
) {
|
|
552
|
+
return BubblegumInstruction.ThawV2;
|
|
553
|
+
}
|
|
554
|
+
if (
|
|
555
|
+
containsBytes(
|
|
556
|
+
data,
|
|
557
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
558
|
+
new Uint8Array([163, 52, 200, 231, 140, 3, 69, 186]),
|
|
559
|
+
),
|
|
560
|
+
0,
|
|
561
|
+
)
|
|
562
|
+
) {
|
|
563
|
+
return BubblegumInstruction.Transfer;
|
|
564
|
+
}
|
|
565
|
+
if (
|
|
566
|
+
containsBytes(
|
|
567
|
+
data,
|
|
568
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
569
|
+
new Uint8Array([119, 40, 6, 235, 234, 221, 248, 49]),
|
|
570
|
+
),
|
|
571
|
+
0,
|
|
572
|
+
)
|
|
573
|
+
) {
|
|
574
|
+
return BubblegumInstruction.TransferV2;
|
|
575
|
+
}
|
|
576
|
+
if (
|
|
577
|
+
containsBytes(
|
|
578
|
+
data,
|
|
579
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
580
|
+
new Uint8Array([250, 251, 42, 106, 41, 137, 186, 168]),
|
|
581
|
+
),
|
|
582
|
+
0,
|
|
583
|
+
)
|
|
584
|
+
) {
|
|
585
|
+
return BubblegumInstruction.UnverifyCollection;
|
|
586
|
+
}
|
|
587
|
+
if (
|
|
588
|
+
containsBytes(
|
|
589
|
+
data,
|
|
590
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
591
|
+
new Uint8Array([107, 178, 57, 39, 105, 115, 112, 152]),
|
|
592
|
+
),
|
|
593
|
+
0,
|
|
594
|
+
)
|
|
595
|
+
) {
|
|
596
|
+
return BubblegumInstruction.UnverifyCreator;
|
|
597
|
+
}
|
|
598
|
+
if (
|
|
599
|
+
containsBytes(
|
|
600
|
+
data,
|
|
601
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
602
|
+
new Uint8Array([174, 112, 29, 142, 230, 100, 239, 7]),
|
|
603
|
+
),
|
|
604
|
+
0,
|
|
605
|
+
)
|
|
606
|
+
) {
|
|
607
|
+
return BubblegumInstruction.UnverifyCreatorV2;
|
|
608
|
+
}
|
|
609
|
+
if (
|
|
610
|
+
containsBytes(
|
|
611
|
+
data,
|
|
612
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
613
|
+
new Uint8Array([59, 56, 111, 43, 95, 14, 11, 61]),
|
|
614
|
+
),
|
|
615
|
+
0,
|
|
616
|
+
)
|
|
617
|
+
) {
|
|
618
|
+
return BubblegumInstruction.UpdateAssetDataV2;
|
|
619
|
+
}
|
|
620
|
+
if (
|
|
621
|
+
containsBytes(
|
|
622
|
+
data,
|
|
623
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
624
|
+
new Uint8Array([170, 182, 43, 239, 97, 78, 225, 186]),
|
|
625
|
+
),
|
|
626
|
+
0,
|
|
627
|
+
)
|
|
628
|
+
) {
|
|
629
|
+
return BubblegumInstruction.UpdateMetadata;
|
|
630
|
+
}
|
|
631
|
+
if (
|
|
632
|
+
containsBytes(
|
|
633
|
+
data,
|
|
634
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
635
|
+
new Uint8Array([43, 103, 89, 42, 121, 242, 62, 72]),
|
|
636
|
+
),
|
|
637
|
+
0,
|
|
638
|
+
)
|
|
639
|
+
) {
|
|
640
|
+
return BubblegumInstruction.UpdateMetadataV2;
|
|
641
|
+
}
|
|
642
|
+
if (
|
|
643
|
+
containsBytes(
|
|
644
|
+
data,
|
|
645
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
646
|
+
new Uint8Array([56, 113, 101, 253, 79, 55, 122, 169]),
|
|
647
|
+
),
|
|
648
|
+
0,
|
|
649
|
+
)
|
|
650
|
+
) {
|
|
651
|
+
return BubblegumInstruction.VerifyCollection;
|
|
652
|
+
}
|
|
653
|
+
if (
|
|
654
|
+
containsBytes(
|
|
655
|
+
data,
|
|
656
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
657
|
+
new Uint8Array([52, 17, 96, 132, 71, 4, 85, 194]),
|
|
658
|
+
),
|
|
659
|
+
0,
|
|
660
|
+
)
|
|
661
|
+
) {
|
|
662
|
+
return BubblegumInstruction.VerifyCreator;
|
|
663
|
+
}
|
|
664
|
+
if (
|
|
665
|
+
containsBytes(
|
|
666
|
+
data,
|
|
667
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
668
|
+
new Uint8Array([85, 138, 140, 42, 22, 241, 118, 102]),
|
|
669
|
+
),
|
|
670
|
+
0,
|
|
671
|
+
)
|
|
672
|
+
) {
|
|
673
|
+
return BubblegumInstruction.VerifyCreatorV2;
|
|
674
|
+
}
|
|
675
|
+
throw new SolanaError(
|
|
676
|
+
SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION,
|
|
677
|
+
{ instructionData: data, programName: "bubblegum" },
|
|
678
|
+
);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
export type ParsedBubblegumInstruction<
|
|
682
|
+
TProgram extends string = "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY",
|
|
683
|
+
> =
|
|
684
|
+
| ({
|
|
685
|
+
instructionType: BubblegumInstruction.Burn;
|
|
686
|
+
} & ParsedBurnInstruction<TProgram>)
|
|
687
|
+
| ({
|
|
688
|
+
instructionType: BubblegumInstruction.BurnV2;
|
|
689
|
+
} & ParsedBurnV2Instruction<TProgram>)
|
|
690
|
+
| ({
|
|
691
|
+
instructionType: BubblegumInstruction.CancelRedeem;
|
|
692
|
+
} & ParsedCancelRedeemInstruction<TProgram>)
|
|
693
|
+
| ({
|
|
694
|
+
instructionType: BubblegumInstruction.CloseTreeV2;
|
|
695
|
+
} & ParsedCloseTreeV2Instruction<TProgram>)
|
|
696
|
+
| ({
|
|
697
|
+
instructionType: BubblegumInstruction.CollectV2;
|
|
698
|
+
} & ParsedCollectV2Instruction<TProgram>)
|
|
699
|
+
| ({
|
|
700
|
+
instructionType: BubblegumInstruction.Compress;
|
|
701
|
+
} & ParsedCompressInstruction<TProgram>)
|
|
702
|
+
| ({
|
|
703
|
+
instructionType: BubblegumInstruction.CreateTree;
|
|
704
|
+
} & ParsedCreateTreeInstruction<TProgram>)
|
|
705
|
+
| ({
|
|
706
|
+
instructionType: BubblegumInstruction.CreateTreeV2;
|
|
707
|
+
} & ParsedCreateTreeV2Instruction<TProgram>)
|
|
708
|
+
| ({
|
|
709
|
+
instructionType: BubblegumInstruction.DecompressV1;
|
|
710
|
+
} & ParsedDecompressV1Instruction<TProgram>)
|
|
711
|
+
| ({
|
|
712
|
+
instructionType: BubblegumInstruction.Delegate;
|
|
713
|
+
} & ParsedDelegateInstruction<TProgram>)
|
|
714
|
+
| ({
|
|
715
|
+
instructionType: BubblegumInstruction.DelegateAndFreezeV2;
|
|
716
|
+
} & ParsedDelegateAndFreezeV2Instruction<TProgram>)
|
|
717
|
+
| ({
|
|
718
|
+
instructionType: BubblegumInstruction.DelegateV2;
|
|
719
|
+
} & ParsedDelegateV2Instruction<TProgram>)
|
|
720
|
+
| ({
|
|
721
|
+
instructionType: BubblegumInstruction.FreezeV2;
|
|
722
|
+
} & ParsedFreezeV2Instruction<TProgram>)
|
|
723
|
+
| ({
|
|
724
|
+
instructionType: BubblegumInstruction.MintToCollectionV1;
|
|
725
|
+
} & ParsedMintToCollectionV1Instruction<TProgram>)
|
|
726
|
+
| ({
|
|
727
|
+
instructionType: BubblegumInstruction.MintV1;
|
|
728
|
+
} & ParsedMintV1Instruction<TProgram>)
|
|
729
|
+
| ({
|
|
730
|
+
instructionType: BubblegumInstruction.MintV2;
|
|
731
|
+
} & ParsedMintV2Instruction<TProgram>)
|
|
732
|
+
| ({
|
|
733
|
+
instructionType: BubblegumInstruction.Redeem;
|
|
734
|
+
} & ParsedRedeemInstruction<TProgram>)
|
|
735
|
+
| ({
|
|
736
|
+
instructionType: BubblegumInstruction.SetAndVerifyCollection;
|
|
737
|
+
} & ParsedSetAndVerifyCollectionInstruction<TProgram>)
|
|
738
|
+
| ({
|
|
739
|
+
instructionType: BubblegumInstruction.SetCollectionV2;
|
|
740
|
+
} & ParsedSetCollectionV2Instruction<TProgram>)
|
|
741
|
+
| ({
|
|
742
|
+
instructionType: BubblegumInstruction.SetDecompressableState;
|
|
743
|
+
} & ParsedSetDecompressableStateInstruction<TProgram>)
|
|
744
|
+
| ({
|
|
745
|
+
instructionType: BubblegumInstruction.SetDecompressibleState;
|
|
746
|
+
} & ParsedSetDecompressibleStateInstruction<TProgram>)
|
|
747
|
+
| ({
|
|
748
|
+
instructionType: BubblegumInstruction.SetNonTransferableV2;
|
|
749
|
+
} & ParsedSetNonTransferableV2Instruction<TProgram>)
|
|
750
|
+
| ({
|
|
751
|
+
instructionType: BubblegumInstruction.SetTreeDelegate;
|
|
752
|
+
} & ParsedSetTreeDelegateInstruction<TProgram>)
|
|
753
|
+
| ({
|
|
754
|
+
instructionType: BubblegumInstruction.ThawAndRevokeV2;
|
|
755
|
+
} & ParsedThawAndRevokeV2Instruction<TProgram>)
|
|
756
|
+
| ({
|
|
757
|
+
instructionType: BubblegumInstruction.ThawV2;
|
|
758
|
+
} & ParsedThawV2Instruction<TProgram>)
|
|
759
|
+
| ({
|
|
760
|
+
instructionType: BubblegumInstruction.Transfer;
|
|
761
|
+
} & ParsedTransferInstruction<TProgram>)
|
|
762
|
+
| ({
|
|
763
|
+
instructionType: BubblegumInstruction.TransferV2;
|
|
764
|
+
} & ParsedTransferV2Instruction<TProgram>)
|
|
765
|
+
| ({
|
|
766
|
+
instructionType: BubblegumInstruction.UnverifyCollection;
|
|
767
|
+
} & ParsedUnverifyCollectionInstruction<TProgram>)
|
|
768
|
+
| ({
|
|
769
|
+
instructionType: BubblegumInstruction.UnverifyCreator;
|
|
770
|
+
} & ParsedUnverifyCreatorInstruction<TProgram>)
|
|
771
|
+
| ({
|
|
772
|
+
instructionType: BubblegumInstruction.UnverifyCreatorV2;
|
|
773
|
+
} & ParsedUnverifyCreatorV2Instruction<TProgram>)
|
|
774
|
+
| ({
|
|
775
|
+
instructionType: BubblegumInstruction.UpdateAssetDataV2;
|
|
776
|
+
} & ParsedUpdateAssetDataV2Instruction<TProgram>)
|
|
777
|
+
| ({
|
|
778
|
+
instructionType: BubblegumInstruction.UpdateMetadata;
|
|
779
|
+
} & ParsedUpdateMetadataInstruction<TProgram>)
|
|
780
|
+
| ({
|
|
781
|
+
instructionType: BubblegumInstruction.UpdateMetadataV2;
|
|
782
|
+
} & ParsedUpdateMetadataV2Instruction<TProgram>)
|
|
783
|
+
| ({
|
|
784
|
+
instructionType: BubblegumInstruction.VerifyCollection;
|
|
785
|
+
} & ParsedVerifyCollectionInstruction<TProgram>)
|
|
786
|
+
| ({
|
|
787
|
+
instructionType: BubblegumInstruction.VerifyCreator;
|
|
788
|
+
} & ParsedVerifyCreatorInstruction<TProgram>)
|
|
789
|
+
| ({
|
|
790
|
+
instructionType: BubblegumInstruction.VerifyCreatorV2;
|
|
791
|
+
} & ParsedVerifyCreatorV2Instruction<TProgram>);
|
|
792
|
+
|
|
793
|
+
export function parseBubblegumInstruction<TProgram extends string>(
|
|
794
|
+
instruction: Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array>,
|
|
795
|
+
): ParsedBubblegumInstruction<TProgram> {
|
|
796
|
+
const instructionType = identifyBubblegumInstruction(instruction);
|
|
797
|
+
switch (instructionType) {
|
|
798
|
+
case BubblegumInstruction.Burn: {
|
|
799
|
+
assertIsInstructionWithAccounts(instruction);
|
|
800
|
+
return {
|
|
801
|
+
instructionType: BubblegumInstruction.Burn,
|
|
802
|
+
...parseBurnInstruction(instruction),
|
|
803
|
+
};
|
|
804
|
+
}
|
|
805
|
+
case BubblegumInstruction.BurnV2: {
|
|
806
|
+
assertIsInstructionWithAccounts(instruction);
|
|
807
|
+
return {
|
|
808
|
+
instructionType: BubblegumInstruction.BurnV2,
|
|
809
|
+
...parseBurnV2Instruction(instruction),
|
|
810
|
+
};
|
|
811
|
+
}
|
|
812
|
+
case BubblegumInstruction.CancelRedeem: {
|
|
813
|
+
assertIsInstructionWithAccounts(instruction);
|
|
814
|
+
return {
|
|
815
|
+
instructionType: BubblegumInstruction.CancelRedeem,
|
|
816
|
+
...parseCancelRedeemInstruction(instruction),
|
|
817
|
+
};
|
|
818
|
+
}
|
|
819
|
+
case BubblegumInstruction.CloseTreeV2: {
|
|
820
|
+
assertIsInstructionWithAccounts(instruction);
|
|
821
|
+
return {
|
|
822
|
+
instructionType: BubblegumInstruction.CloseTreeV2,
|
|
823
|
+
...parseCloseTreeV2Instruction(instruction),
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
case BubblegumInstruction.CollectV2: {
|
|
827
|
+
assertIsInstructionWithAccounts(instruction);
|
|
828
|
+
return {
|
|
829
|
+
instructionType: BubblegumInstruction.CollectV2,
|
|
830
|
+
...parseCollectV2Instruction(instruction),
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
case BubblegumInstruction.Compress: {
|
|
834
|
+
assertIsInstructionWithAccounts(instruction);
|
|
835
|
+
return {
|
|
836
|
+
instructionType: BubblegumInstruction.Compress,
|
|
837
|
+
...parseCompressInstruction(instruction),
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
case BubblegumInstruction.CreateTree: {
|
|
841
|
+
assertIsInstructionWithAccounts(instruction);
|
|
842
|
+
return {
|
|
843
|
+
instructionType: BubblegumInstruction.CreateTree,
|
|
844
|
+
...parseCreateTreeInstruction(instruction),
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
case BubblegumInstruction.CreateTreeV2: {
|
|
848
|
+
assertIsInstructionWithAccounts(instruction);
|
|
849
|
+
return {
|
|
850
|
+
instructionType: BubblegumInstruction.CreateTreeV2,
|
|
851
|
+
...parseCreateTreeV2Instruction(instruction),
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
case BubblegumInstruction.DecompressV1: {
|
|
855
|
+
assertIsInstructionWithAccounts(instruction);
|
|
856
|
+
return {
|
|
857
|
+
instructionType: BubblegumInstruction.DecompressV1,
|
|
858
|
+
...parseDecompressV1Instruction(instruction),
|
|
859
|
+
};
|
|
860
|
+
}
|
|
861
|
+
case BubblegumInstruction.Delegate: {
|
|
862
|
+
assertIsInstructionWithAccounts(instruction);
|
|
863
|
+
return {
|
|
864
|
+
instructionType: BubblegumInstruction.Delegate,
|
|
865
|
+
...parseDelegateInstruction(instruction),
|
|
866
|
+
};
|
|
867
|
+
}
|
|
868
|
+
case BubblegumInstruction.DelegateAndFreezeV2: {
|
|
869
|
+
assertIsInstructionWithAccounts(instruction);
|
|
870
|
+
return {
|
|
871
|
+
instructionType: BubblegumInstruction.DelegateAndFreezeV2,
|
|
872
|
+
...parseDelegateAndFreezeV2Instruction(instruction),
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
case BubblegumInstruction.DelegateV2: {
|
|
876
|
+
assertIsInstructionWithAccounts(instruction);
|
|
877
|
+
return {
|
|
878
|
+
instructionType: BubblegumInstruction.DelegateV2,
|
|
879
|
+
...parseDelegateV2Instruction(instruction),
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
case BubblegumInstruction.FreezeV2: {
|
|
883
|
+
assertIsInstructionWithAccounts(instruction);
|
|
884
|
+
return {
|
|
885
|
+
instructionType: BubblegumInstruction.FreezeV2,
|
|
886
|
+
...parseFreezeV2Instruction(instruction),
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
case BubblegumInstruction.MintToCollectionV1: {
|
|
890
|
+
assertIsInstructionWithAccounts(instruction);
|
|
891
|
+
return {
|
|
892
|
+
instructionType: BubblegumInstruction.MintToCollectionV1,
|
|
893
|
+
...parseMintToCollectionV1Instruction(instruction),
|
|
894
|
+
};
|
|
895
|
+
}
|
|
896
|
+
case BubblegumInstruction.MintV1: {
|
|
897
|
+
assertIsInstructionWithAccounts(instruction);
|
|
898
|
+
return {
|
|
899
|
+
instructionType: BubblegumInstruction.MintV1,
|
|
900
|
+
...parseMintV1Instruction(instruction),
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
case BubblegumInstruction.MintV2: {
|
|
904
|
+
assertIsInstructionWithAccounts(instruction);
|
|
905
|
+
return {
|
|
906
|
+
instructionType: BubblegumInstruction.MintV2,
|
|
907
|
+
...parseMintV2Instruction(instruction),
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
case BubblegumInstruction.Redeem: {
|
|
911
|
+
assertIsInstructionWithAccounts(instruction);
|
|
912
|
+
return {
|
|
913
|
+
instructionType: BubblegumInstruction.Redeem,
|
|
914
|
+
...parseRedeemInstruction(instruction),
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
case BubblegumInstruction.SetAndVerifyCollection: {
|
|
918
|
+
assertIsInstructionWithAccounts(instruction);
|
|
919
|
+
return {
|
|
920
|
+
instructionType: BubblegumInstruction.SetAndVerifyCollection,
|
|
921
|
+
...parseSetAndVerifyCollectionInstruction(instruction),
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
case BubblegumInstruction.SetCollectionV2: {
|
|
925
|
+
assertIsInstructionWithAccounts(instruction);
|
|
926
|
+
return {
|
|
927
|
+
instructionType: BubblegumInstruction.SetCollectionV2,
|
|
928
|
+
...parseSetCollectionV2Instruction(instruction),
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
case BubblegumInstruction.SetDecompressableState: {
|
|
932
|
+
assertIsInstructionWithAccounts(instruction);
|
|
933
|
+
return {
|
|
934
|
+
instructionType: BubblegumInstruction.SetDecompressableState,
|
|
935
|
+
...parseSetDecompressableStateInstruction(instruction),
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
case BubblegumInstruction.SetDecompressibleState: {
|
|
939
|
+
assertIsInstructionWithAccounts(instruction);
|
|
940
|
+
return {
|
|
941
|
+
instructionType: BubblegumInstruction.SetDecompressibleState,
|
|
942
|
+
...parseSetDecompressibleStateInstruction(instruction),
|
|
943
|
+
};
|
|
944
|
+
}
|
|
945
|
+
case BubblegumInstruction.SetNonTransferableV2: {
|
|
946
|
+
assertIsInstructionWithAccounts(instruction);
|
|
947
|
+
return {
|
|
948
|
+
instructionType: BubblegumInstruction.SetNonTransferableV2,
|
|
949
|
+
...parseSetNonTransferableV2Instruction(instruction),
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
case BubblegumInstruction.SetTreeDelegate: {
|
|
953
|
+
assertIsInstructionWithAccounts(instruction);
|
|
954
|
+
return {
|
|
955
|
+
instructionType: BubblegumInstruction.SetTreeDelegate,
|
|
956
|
+
...parseSetTreeDelegateInstruction(instruction),
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
case BubblegumInstruction.ThawAndRevokeV2: {
|
|
960
|
+
assertIsInstructionWithAccounts(instruction);
|
|
961
|
+
return {
|
|
962
|
+
instructionType: BubblegumInstruction.ThawAndRevokeV2,
|
|
963
|
+
...parseThawAndRevokeV2Instruction(instruction),
|
|
964
|
+
};
|
|
965
|
+
}
|
|
966
|
+
case BubblegumInstruction.ThawV2: {
|
|
967
|
+
assertIsInstructionWithAccounts(instruction);
|
|
968
|
+
return {
|
|
969
|
+
instructionType: BubblegumInstruction.ThawV2,
|
|
970
|
+
...parseThawV2Instruction(instruction),
|
|
971
|
+
};
|
|
972
|
+
}
|
|
973
|
+
case BubblegumInstruction.Transfer: {
|
|
974
|
+
assertIsInstructionWithAccounts(instruction);
|
|
975
|
+
return {
|
|
976
|
+
instructionType: BubblegumInstruction.Transfer,
|
|
977
|
+
...parseTransferInstruction(instruction),
|
|
978
|
+
};
|
|
979
|
+
}
|
|
980
|
+
case BubblegumInstruction.TransferV2: {
|
|
981
|
+
assertIsInstructionWithAccounts(instruction);
|
|
982
|
+
return {
|
|
983
|
+
instructionType: BubblegumInstruction.TransferV2,
|
|
984
|
+
...parseTransferV2Instruction(instruction),
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
case BubblegumInstruction.UnverifyCollection: {
|
|
988
|
+
assertIsInstructionWithAccounts(instruction);
|
|
989
|
+
return {
|
|
990
|
+
instructionType: BubblegumInstruction.UnverifyCollection,
|
|
991
|
+
...parseUnverifyCollectionInstruction(instruction),
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
case BubblegumInstruction.UnverifyCreator: {
|
|
995
|
+
assertIsInstructionWithAccounts(instruction);
|
|
996
|
+
return {
|
|
997
|
+
instructionType: BubblegumInstruction.UnverifyCreator,
|
|
998
|
+
...parseUnverifyCreatorInstruction(instruction),
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
case BubblegumInstruction.UnverifyCreatorV2: {
|
|
1002
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1003
|
+
return {
|
|
1004
|
+
instructionType: BubblegumInstruction.UnverifyCreatorV2,
|
|
1005
|
+
...parseUnverifyCreatorV2Instruction(instruction),
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
1008
|
+
case BubblegumInstruction.UpdateAssetDataV2: {
|
|
1009
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1010
|
+
return {
|
|
1011
|
+
instructionType: BubblegumInstruction.UpdateAssetDataV2,
|
|
1012
|
+
...parseUpdateAssetDataV2Instruction(instruction),
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
case BubblegumInstruction.UpdateMetadata: {
|
|
1016
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1017
|
+
return {
|
|
1018
|
+
instructionType: BubblegumInstruction.UpdateMetadata,
|
|
1019
|
+
...parseUpdateMetadataInstruction(instruction),
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
case BubblegumInstruction.UpdateMetadataV2: {
|
|
1023
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1024
|
+
return {
|
|
1025
|
+
instructionType: BubblegumInstruction.UpdateMetadataV2,
|
|
1026
|
+
...parseUpdateMetadataV2Instruction(instruction),
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1029
|
+
case BubblegumInstruction.VerifyCollection: {
|
|
1030
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1031
|
+
return {
|
|
1032
|
+
instructionType: BubblegumInstruction.VerifyCollection,
|
|
1033
|
+
...parseVerifyCollectionInstruction(instruction),
|
|
1034
|
+
};
|
|
1035
|
+
}
|
|
1036
|
+
case BubblegumInstruction.VerifyCreator: {
|
|
1037
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1038
|
+
return {
|
|
1039
|
+
instructionType: BubblegumInstruction.VerifyCreator,
|
|
1040
|
+
...parseVerifyCreatorInstruction(instruction),
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
case BubblegumInstruction.VerifyCreatorV2: {
|
|
1044
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1045
|
+
return {
|
|
1046
|
+
instructionType: BubblegumInstruction.VerifyCreatorV2,
|
|
1047
|
+
...parseVerifyCreatorV2Instruction(instruction),
|
|
1048
|
+
};
|
|
1049
|
+
}
|
|
1050
|
+
default:
|
|
1051
|
+
throw new SolanaError(
|
|
1052
|
+
SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE,
|
|
1053
|
+
{
|
|
1054
|
+
instructionType: instructionType as string,
|
|
1055
|
+
programName: "bubblegum",
|
|
1056
|
+
},
|
|
1057
|
+
);
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
export interface BubblegumPlugin {
|
|
1062
|
+
accounts: BubblegumPluginAccounts;
|
|
1063
|
+
instructions: BubblegumPluginInstructions;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
export interface BubblegumPluginAccounts {
|
|
1067
|
+
treeConfig: ReturnType<typeof getTreeConfigCodec> &
|
|
1068
|
+
SelfFetchFunctions<TreeConfigArgs, TreeConfig>;
|
|
1069
|
+
voucher: ReturnType<typeof getVoucherCodec> &
|
|
1070
|
+
SelfFetchFunctions<VoucherArgs, Voucher>;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
export interface BubblegumPluginInstructions {
|
|
1074
|
+
burn: (
|
|
1075
|
+
input: BurnInput,
|
|
1076
|
+
) => ReturnType<typeof getBurnInstruction> & SelfPlanAndSendFunctions;
|
|
1077
|
+
burnV2: (
|
|
1078
|
+
input: MakeOptional<BurnV2Input, "payer">,
|
|
1079
|
+
) => ReturnType<typeof getBurnV2Instruction> & SelfPlanAndSendFunctions;
|
|
1080
|
+
cancelRedeem: (
|
|
1081
|
+
input: CancelRedeemInput,
|
|
1082
|
+
) => ReturnType<typeof getCancelRedeemInstruction> & SelfPlanAndSendFunctions;
|
|
1083
|
+
closeTreeV2: (
|
|
1084
|
+
input: CloseTreeV2Input,
|
|
1085
|
+
) => ReturnType<typeof getCloseTreeV2Instruction> & SelfPlanAndSendFunctions;
|
|
1086
|
+
collectV2: (
|
|
1087
|
+
input: CollectV2Input,
|
|
1088
|
+
) => ReturnType<typeof getCollectV2Instruction> & SelfPlanAndSendFunctions;
|
|
1089
|
+
compress: (
|
|
1090
|
+
input: MakeOptional<CompressInput, "payer">,
|
|
1091
|
+
) => ReturnType<typeof getCompressInstruction> & SelfPlanAndSendFunctions;
|
|
1092
|
+
createTree: (
|
|
1093
|
+
input: MakeOptional<CreateTreeInput, "payer">,
|
|
1094
|
+
) => ReturnType<typeof getCreateTreeInstruction> & SelfPlanAndSendFunctions;
|
|
1095
|
+
createTreeV2: (
|
|
1096
|
+
input: MakeOptional<CreateTreeV2Input, "payer">,
|
|
1097
|
+
) => ReturnType<typeof getCreateTreeV2Instruction> & SelfPlanAndSendFunctions;
|
|
1098
|
+
decompressV1: (
|
|
1099
|
+
input: DecompressV1Input,
|
|
1100
|
+
) => ReturnType<typeof getDecompressV1Instruction> & SelfPlanAndSendFunctions;
|
|
1101
|
+
delegate: (
|
|
1102
|
+
input: DelegateInput,
|
|
1103
|
+
) => ReturnType<typeof getDelegateInstruction> & SelfPlanAndSendFunctions;
|
|
1104
|
+
delegateAndFreezeV2: (
|
|
1105
|
+
input: MakeOptional<DelegateAndFreezeV2Input, "payer">,
|
|
1106
|
+
) => ReturnType<typeof getDelegateAndFreezeV2Instruction> &
|
|
1107
|
+
SelfPlanAndSendFunctions;
|
|
1108
|
+
delegateV2: (
|
|
1109
|
+
input: MakeOptional<DelegateV2Input, "payer">,
|
|
1110
|
+
) => ReturnType<typeof getDelegateV2Instruction> & SelfPlanAndSendFunctions;
|
|
1111
|
+
freezeV2: (
|
|
1112
|
+
input: MakeOptional<FreezeV2Input, "payer">,
|
|
1113
|
+
) => ReturnType<typeof getFreezeV2Instruction> & SelfPlanAndSendFunctions;
|
|
1114
|
+
mintToCollectionV1: (
|
|
1115
|
+
input: MakeOptional<MintToCollectionV1Input, "payer">,
|
|
1116
|
+
) => ReturnType<typeof getMintToCollectionV1Instruction> &
|
|
1117
|
+
SelfPlanAndSendFunctions;
|
|
1118
|
+
mintV1: (
|
|
1119
|
+
input: MakeOptional<MintV1Input, "payer">,
|
|
1120
|
+
) => ReturnType<typeof getMintV1Instruction> & SelfPlanAndSendFunctions;
|
|
1121
|
+
mintV2: (
|
|
1122
|
+
input: MakeOptional<MintV2Input, "payer">,
|
|
1123
|
+
) => ReturnType<typeof getMintV2Instruction> & SelfPlanAndSendFunctions;
|
|
1124
|
+
redeem: (
|
|
1125
|
+
input: RedeemInput,
|
|
1126
|
+
) => ReturnType<typeof getRedeemInstruction> & SelfPlanAndSendFunctions;
|
|
1127
|
+
setAndVerifyCollection: (
|
|
1128
|
+
input: MakeOptional<SetAndVerifyCollectionInput, "payer">,
|
|
1129
|
+
) => ReturnType<typeof getSetAndVerifyCollectionInstruction> &
|
|
1130
|
+
SelfPlanAndSendFunctions;
|
|
1131
|
+
setCollectionV2: (
|
|
1132
|
+
input: MakeOptional<SetCollectionV2Input, "payer">,
|
|
1133
|
+
) => ReturnType<typeof getSetCollectionV2Instruction> &
|
|
1134
|
+
SelfPlanAndSendFunctions;
|
|
1135
|
+
setDecompressableState: (
|
|
1136
|
+
input: SetDecompressableStateInput,
|
|
1137
|
+
) => ReturnType<typeof getSetDecompressableStateInstruction> &
|
|
1138
|
+
SelfPlanAndSendFunctions;
|
|
1139
|
+
setDecompressibleState: (
|
|
1140
|
+
input: SetDecompressibleStateInput,
|
|
1141
|
+
) => ReturnType<typeof getSetDecompressibleStateInstruction> &
|
|
1142
|
+
SelfPlanAndSendFunctions;
|
|
1143
|
+
setNonTransferableV2: (
|
|
1144
|
+
input: MakeOptional<SetNonTransferableV2Input, "payer">,
|
|
1145
|
+
) => ReturnType<typeof getSetNonTransferableV2Instruction> &
|
|
1146
|
+
SelfPlanAndSendFunctions;
|
|
1147
|
+
setTreeDelegate: (
|
|
1148
|
+
input: SetTreeDelegateInput,
|
|
1149
|
+
) => ReturnType<typeof getSetTreeDelegateInstruction> &
|
|
1150
|
+
SelfPlanAndSendFunctions;
|
|
1151
|
+
thawAndRevokeV2: (
|
|
1152
|
+
input: MakeOptional<ThawAndRevokeV2Input, "payer">,
|
|
1153
|
+
) => ReturnType<typeof getThawAndRevokeV2Instruction> &
|
|
1154
|
+
SelfPlanAndSendFunctions;
|
|
1155
|
+
thawV2: (
|
|
1156
|
+
input: MakeOptional<ThawV2Input, "payer">,
|
|
1157
|
+
) => ReturnType<typeof getThawV2Instruction> & SelfPlanAndSendFunctions;
|
|
1158
|
+
transfer: (
|
|
1159
|
+
input: TransferInput,
|
|
1160
|
+
) => ReturnType<typeof getTransferInstruction> & SelfPlanAndSendFunctions;
|
|
1161
|
+
transferV2: (
|
|
1162
|
+
input: MakeOptional<TransferV2Input, "payer">,
|
|
1163
|
+
) => ReturnType<typeof getTransferV2Instruction> & SelfPlanAndSendFunctions;
|
|
1164
|
+
unverifyCollection: (
|
|
1165
|
+
input: MakeOptional<UnverifyCollectionInput, "payer">,
|
|
1166
|
+
) => ReturnType<typeof getUnverifyCollectionInstruction> &
|
|
1167
|
+
SelfPlanAndSendFunctions;
|
|
1168
|
+
unverifyCreator: (
|
|
1169
|
+
input: MakeOptional<UnverifyCreatorInput, "payer">,
|
|
1170
|
+
) => ReturnType<typeof getUnverifyCreatorInstruction> &
|
|
1171
|
+
SelfPlanAndSendFunctions;
|
|
1172
|
+
unverifyCreatorV2: (
|
|
1173
|
+
input: MakeOptional<UnverifyCreatorV2Input, "payer">,
|
|
1174
|
+
) => ReturnType<typeof getUnverifyCreatorV2Instruction> &
|
|
1175
|
+
SelfPlanAndSendFunctions;
|
|
1176
|
+
updateAssetDataV2: (
|
|
1177
|
+
input: MakeOptional<UpdateAssetDataV2Input, "payer">,
|
|
1178
|
+
) => ReturnType<typeof getUpdateAssetDataV2Instruction> &
|
|
1179
|
+
SelfPlanAndSendFunctions;
|
|
1180
|
+
updateMetadata: (
|
|
1181
|
+
input: MakeOptional<UpdateMetadataInput, "payer">,
|
|
1182
|
+
) => ReturnType<typeof getUpdateMetadataInstruction> &
|
|
1183
|
+
SelfPlanAndSendFunctions;
|
|
1184
|
+
updateMetadataV2: (
|
|
1185
|
+
input: MakeOptional<UpdateMetadataV2Input, "payer">,
|
|
1186
|
+
) => ReturnType<typeof getUpdateMetadataV2Instruction> &
|
|
1187
|
+
SelfPlanAndSendFunctions;
|
|
1188
|
+
verifyCollection: (
|
|
1189
|
+
input: MakeOptional<VerifyCollectionInput, "payer">,
|
|
1190
|
+
) => ReturnType<typeof getVerifyCollectionInstruction> &
|
|
1191
|
+
SelfPlanAndSendFunctions;
|
|
1192
|
+
verifyCreator: (
|
|
1193
|
+
input: MakeOptional<VerifyCreatorInput, "payer">,
|
|
1194
|
+
) => ReturnType<typeof getVerifyCreatorInstruction> &
|
|
1195
|
+
SelfPlanAndSendFunctions;
|
|
1196
|
+
verifyCreatorV2: (
|
|
1197
|
+
input: MakeOptional<VerifyCreatorV2Input, "payer">,
|
|
1198
|
+
) => ReturnType<typeof getVerifyCreatorV2Instruction> &
|
|
1199
|
+
SelfPlanAndSendFunctions;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
export type BubblegumPluginRequirements = ClientWithRpc<
|
|
1203
|
+
GetAccountInfoApi & GetMultipleAccountsApi
|
|
1204
|
+
> &
|
|
1205
|
+
ClientWithPayer &
|
|
1206
|
+
ClientWithTransactionPlanning &
|
|
1207
|
+
ClientWithTransactionSending;
|
|
1208
|
+
|
|
1209
|
+
export function bubblegumProgram() {
|
|
1210
|
+
return <T extends BubblegumPluginRequirements>(
|
|
1211
|
+
client: T,
|
|
1212
|
+
): Omit<T, "bubblegum"> & { bubblegum: BubblegumPlugin } => {
|
|
1213
|
+
return extendClient(client, {
|
|
1214
|
+
bubblegum: <BubblegumPlugin>{
|
|
1215
|
+
accounts: {
|
|
1216
|
+
treeConfig: addSelfFetchFunctions(client, getTreeConfigCodec()),
|
|
1217
|
+
voucher: addSelfFetchFunctions(client, getVoucherCodec()),
|
|
1218
|
+
},
|
|
1219
|
+
instructions: {
|
|
1220
|
+
burn: (input) =>
|
|
1221
|
+
addSelfPlanAndSendFunctions(client, getBurnInstruction(input)),
|
|
1222
|
+
burnV2: (input) =>
|
|
1223
|
+
addSelfPlanAndSendFunctions(
|
|
1224
|
+
client,
|
|
1225
|
+
getBurnV2Instruction({
|
|
1226
|
+
...input,
|
|
1227
|
+
payer: input.payer ?? client.payer,
|
|
1228
|
+
}),
|
|
1229
|
+
),
|
|
1230
|
+
cancelRedeem: (input) =>
|
|
1231
|
+
addSelfPlanAndSendFunctions(
|
|
1232
|
+
client,
|
|
1233
|
+
getCancelRedeemInstruction(input),
|
|
1234
|
+
),
|
|
1235
|
+
closeTreeV2: (input) =>
|
|
1236
|
+
addSelfPlanAndSendFunctions(
|
|
1237
|
+
client,
|
|
1238
|
+
getCloseTreeV2Instruction(input),
|
|
1239
|
+
),
|
|
1240
|
+
collectV2: (input) =>
|
|
1241
|
+
addSelfPlanAndSendFunctions(client, getCollectV2Instruction(input)),
|
|
1242
|
+
compress: (input) =>
|
|
1243
|
+
addSelfPlanAndSendFunctions(
|
|
1244
|
+
client,
|
|
1245
|
+
getCompressInstruction({
|
|
1246
|
+
...input,
|
|
1247
|
+
payer: input.payer ?? client.payer,
|
|
1248
|
+
}),
|
|
1249
|
+
),
|
|
1250
|
+
createTree: (input) =>
|
|
1251
|
+
addSelfPlanAndSendFunctions(
|
|
1252
|
+
client,
|
|
1253
|
+
getCreateTreeInstruction({
|
|
1254
|
+
...input,
|
|
1255
|
+
payer: input.payer ?? client.payer,
|
|
1256
|
+
}),
|
|
1257
|
+
),
|
|
1258
|
+
createTreeV2: (input) =>
|
|
1259
|
+
addSelfPlanAndSendFunctions(
|
|
1260
|
+
client,
|
|
1261
|
+
getCreateTreeV2Instruction({
|
|
1262
|
+
...input,
|
|
1263
|
+
payer: input.payer ?? client.payer,
|
|
1264
|
+
}),
|
|
1265
|
+
),
|
|
1266
|
+
decompressV1: (input) =>
|
|
1267
|
+
addSelfPlanAndSendFunctions(
|
|
1268
|
+
client,
|
|
1269
|
+
getDecompressV1Instruction(input),
|
|
1270
|
+
),
|
|
1271
|
+
delegate: (input) =>
|
|
1272
|
+
addSelfPlanAndSendFunctions(client, getDelegateInstruction(input)),
|
|
1273
|
+
delegateAndFreezeV2: (input) =>
|
|
1274
|
+
addSelfPlanAndSendFunctions(
|
|
1275
|
+
client,
|
|
1276
|
+
getDelegateAndFreezeV2Instruction({
|
|
1277
|
+
...input,
|
|
1278
|
+
payer: input.payer ?? client.payer,
|
|
1279
|
+
}),
|
|
1280
|
+
),
|
|
1281
|
+
delegateV2: (input) =>
|
|
1282
|
+
addSelfPlanAndSendFunctions(
|
|
1283
|
+
client,
|
|
1284
|
+
getDelegateV2Instruction({
|
|
1285
|
+
...input,
|
|
1286
|
+
payer: input.payer ?? client.payer,
|
|
1287
|
+
}),
|
|
1288
|
+
),
|
|
1289
|
+
freezeV2: (input) =>
|
|
1290
|
+
addSelfPlanAndSendFunctions(
|
|
1291
|
+
client,
|
|
1292
|
+
getFreezeV2Instruction({
|
|
1293
|
+
...input,
|
|
1294
|
+
payer: input.payer ?? client.payer,
|
|
1295
|
+
}),
|
|
1296
|
+
),
|
|
1297
|
+
mintToCollectionV1: (input) =>
|
|
1298
|
+
addSelfPlanAndSendFunctions(
|
|
1299
|
+
client,
|
|
1300
|
+
getMintToCollectionV1Instruction({
|
|
1301
|
+
...input,
|
|
1302
|
+
payer: input.payer ?? client.payer,
|
|
1303
|
+
}),
|
|
1304
|
+
),
|
|
1305
|
+
mintV1: (input) =>
|
|
1306
|
+
addSelfPlanAndSendFunctions(
|
|
1307
|
+
client,
|
|
1308
|
+
getMintV1Instruction({
|
|
1309
|
+
...input,
|
|
1310
|
+
payer: input.payer ?? client.payer,
|
|
1311
|
+
}),
|
|
1312
|
+
),
|
|
1313
|
+
mintV2: (input) =>
|
|
1314
|
+
addSelfPlanAndSendFunctions(
|
|
1315
|
+
client,
|
|
1316
|
+
getMintV2Instruction({
|
|
1317
|
+
...input,
|
|
1318
|
+
payer: input.payer ?? client.payer,
|
|
1319
|
+
}),
|
|
1320
|
+
),
|
|
1321
|
+
redeem: (input) =>
|
|
1322
|
+
addSelfPlanAndSendFunctions(client, getRedeemInstruction(input)),
|
|
1323
|
+
setAndVerifyCollection: (input) =>
|
|
1324
|
+
addSelfPlanAndSendFunctions(
|
|
1325
|
+
client,
|
|
1326
|
+
getSetAndVerifyCollectionInstruction({
|
|
1327
|
+
...input,
|
|
1328
|
+
payer: input.payer ?? client.payer,
|
|
1329
|
+
}),
|
|
1330
|
+
),
|
|
1331
|
+
setCollectionV2: (input) =>
|
|
1332
|
+
addSelfPlanAndSendFunctions(
|
|
1333
|
+
client,
|
|
1334
|
+
getSetCollectionV2Instruction({
|
|
1335
|
+
...input,
|
|
1336
|
+
payer: input.payer ?? client.payer,
|
|
1337
|
+
}),
|
|
1338
|
+
),
|
|
1339
|
+
setDecompressableState: (input) =>
|
|
1340
|
+
addSelfPlanAndSendFunctions(
|
|
1341
|
+
client,
|
|
1342
|
+
getSetDecompressableStateInstruction(input),
|
|
1343
|
+
),
|
|
1344
|
+
setDecompressibleState: (input) =>
|
|
1345
|
+
addSelfPlanAndSendFunctions(
|
|
1346
|
+
client,
|
|
1347
|
+
getSetDecompressibleStateInstruction(input),
|
|
1348
|
+
),
|
|
1349
|
+
setNonTransferableV2: (input) =>
|
|
1350
|
+
addSelfPlanAndSendFunctions(
|
|
1351
|
+
client,
|
|
1352
|
+
getSetNonTransferableV2Instruction({
|
|
1353
|
+
...input,
|
|
1354
|
+
payer: input.payer ?? client.payer,
|
|
1355
|
+
}),
|
|
1356
|
+
),
|
|
1357
|
+
setTreeDelegate: (input) =>
|
|
1358
|
+
addSelfPlanAndSendFunctions(
|
|
1359
|
+
client,
|
|
1360
|
+
getSetTreeDelegateInstruction(input),
|
|
1361
|
+
),
|
|
1362
|
+
thawAndRevokeV2: (input) =>
|
|
1363
|
+
addSelfPlanAndSendFunctions(
|
|
1364
|
+
client,
|
|
1365
|
+
getThawAndRevokeV2Instruction({
|
|
1366
|
+
...input,
|
|
1367
|
+
payer: input.payer ?? client.payer,
|
|
1368
|
+
}),
|
|
1369
|
+
),
|
|
1370
|
+
thawV2: (input) =>
|
|
1371
|
+
addSelfPlanAndSendFunctions(
|
|
1372
|
+
client,
|
|
1373
|
+
getThawV2Instruction({
|
|
1374
|
+
...input,
|
|
1375
|
+
payer: input.payer ?? client.payer,
|
|
1376
|
+
}),
|
|
1377
|
+
),
|
|
1378
|
+
transfer: (input) =>
|
|
1379
|
+
addSelfPlanAndSendFunctions(client, getTransferInstruction(input)),
|
|
1380
|
+
transferV2: (input) =>
|
|
1381
|
+
addSelfPlanAndSendFunctions(
|
|
1382
|
+
client,
|
|
1383
|
+
getTransferV2Instruction({
|
|
1384
|
+
...input,
|
|
1385
|
+
payer: input.payer ?? client.payer,
|
|
1386
|
+
}),
|
|
1387
|
+
),
|
|
1388
|
+
unverifyCollection: (input) =>
|
|
1389
|
+
addSelfPlanAndSendFunctions(
|
|
1390
|
+
client,
|
|
1391
|
+
getUnverifyCollectionInstruction({
|
|
1392
|
+
...input,
|
|
1393
|
+
payer: input.payer ?? client.payer,
|
|
1394
|
+
}),
|
|
1395
|
+
),
|
|
1396
|
+
unverifyCreator: (input) =>
|
|
1397
|
+
addSelfPlanAndSendFunctions(
|
|
1398
|
+
client,
|
|
1399
|
+
getUnverifyCreatorInstruction({
|
|
1400
|
+
...input,
|
|
1401
|
+
payer: input.payer ?? client.payer,
|
|
1402
|
+
}),
|
|
1403
|
+
),
|
|
1404
|
+
unverifyCreatorV2: (input) =>
|
|
1405
|
+
addSelfPlanAndSendFunctions(
|
|
1406
|
+
client,
|
|
1407
|
+
getUnverifyCreatorV2Instruction({
|
|
1408
|
+
...input,
|
|
1409
|
+
payer: input.payer ?? client.payer,
|
|
1410
|
+
}),
|
|
1411
|
+
),
|
|
1412
|
+
updateAssetDataV2: (input) =>
|
|
1413
|
+
addSelfPlanAndSendFunctions(
|
|
1414
|
+
client,
|
|
1415
|
+
getUpdateAssetDataV2Instruction({
|
|
1416
|
+
...input,
|
|
1417
|
+
payer: input.payer ?? client.payer,
|
|
1418
|
+
}),
|
|
1419
|
+
),
|
|
1420
|
+
updateMetadata: (input) =>
|
|
1421
|
+
addSelfPlanAndSendFunctions(
|
|
1422
|
+
client,
|
|
1423
|
+
getUpdateMetadataInstruction({
|
|
1424
|
+
...input,
|
|
1425
|
+
payer: input.payer ?? client.payer,
|
|
1426
|
+
}),
|
|
1427
|
+
),
|
|
1428
|
+
updateMetadataV2: (input) =>
|
|
1429
|
+
addSelfPlanAndSendFunctions(
|
|
1430
|
+
client,
|
|
1431
|
+
getUpdateMetadataV2Instruction({
|
|
1432
|
+
...input,
|
|
1433
|
+
payer: input.payer ?? client.payer,
|
|
1434
|
+
}),
|
|
1435
|
+
),
|
|
1436
|
+
verifyCollection: (input) =>
|
|
1437
|
+
addSelfPlanAndSendFunctions(
|
|
1438
|
+
client,
|
|
1439
|
+
getVerifyCollectionInstruction({
|
|
1440
|
+
...input,
|
|
1441
|
+
payer: input.payer ?? client.payer,
|
|
1442
|
+
}),
|
|
1443
|
+
),
|
|
1444
|
+
verifyCreator: (input) =>
|
|
1445
|
+
addSelfPlanAndSendFunctions(
|
|
1446
|
+
client,
|
|
1447
|
+
getVerifyCreatorInstruction({
|
|
1448
|
+
...input,
|
|
1449
|
+
payer: input.payer ?? client.payer,
|
|
1450
|
+
}),
|
|
1451
|
+
),
|
|
1452
|
+
verifyCreatorV2: (input) =>
|
|
1453
|
+
addSelfPlanAndSendFunctions(
|
|
1454
|
+
client,
|
|
1455
|
+
getVerifyCreatorV2Instruction({
|
|
1456
|
+
...input,
|
|
1457
|
+
payer: input.payer ?? client.payer,
|
|
1458
|
+
}),
|
|
1459
|
+
),
|
|
1460
|
+
},
|
|
1461
|
+
},
|
|
1462
|
+
});
|
|
1463
|
+
};
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
type MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|