@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,45 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare function getSetDecompressableStateDiscriminatorBytes(): ReadonlyUint8Array;
|
|
13
|
-
export type SetDecompressableStateInstruction<TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS, TAccountTreeAuthority extends string | AccountMeta = string, TAccountTreeCreator extends string | AccountMeta = string, TRemainingAccounts extends readonly AccountMeta[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
14
|
-
TAccountTreeAuthority extends string ? WritableAccount<TAccountTreeAuthority> : TAccountTreeAuthority,
|
|
15
|
-
TAccountTreeCreator extends string ? ReadonlySignerAccount<TAccountTreeCreator> & AccountSignerMeta<TAccountTreeCreator> : TAccountTreeCreator,
|
|
16
|
-
...TRemainingAccounts
|
|
17
|
-
]>;
|
|
18
|
-
export interface SetDecompressableStateInstructionData {
|
|
19
|
-
discriminator: ReadonlyUint8Array;
|
|
20
|
-
decompressableState: DecompressibleState;
|
|
1
|
+
import { DecompressibleState, DecompressibleStateArgs } from "../types/decompressibleState.js";
|
|
2
|
+
import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/bubblegum.js";
|
|
3
|
+
import { AccountMeta, AccountSignerMeta, Address, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlySignerAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount } from "@solana/kit";
|
|
4
|
+
|
|
5
|
+
//#region src/generated/instructions/setDecompressableState.d.ts
|
|
6
|
+
declare const SET_DECOMPRESSABLE_STATE_DISCRIMINATOR: ReadonlyUint8Array;
|
|
7
|
+
declare function getSetDecompressableStateDiscriminatorBytes(): ReadonlyUint8Array;
|
|
8
|
+
type SetDecompressableStateInstruction<TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS, TAccountTreeAuthority extends string | AccountMeta<string> = string, TAccountTreeCreator extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountTreeAuthority extends string ? WritableAccount<TAccountTreeAuthority> : TAccountTreeAuthority, TAccountTreeCreator extends string ? ReadonlySignerAccount<TAccountTreeCreator> & AccountSignerMeta<TAccountTreeCreator> : TAccountTreeCreator, ...TRemainingAccounts]>;
|
|
9
|
+
interface SetDecompressableStateInstructionData {
|
|
10
|
+
discriminator: ReadonlyUint8Array;
|
|
11
|
+
decompressableState: DecompressibleState;
|
|
21
12
|
}
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
interface SetDecompressableStateInstructionDataArgs {
|
|
14
|
+
decompressableState: DecompressibleStateArgs;
|
|
24
15
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
declare function getSetDecompressableStateInstructionDataEncoder(): FixedSizeEncoder<SetDecompressableStateInstructionDataArgs>;
|
|
17
|
+
declare function getSetDecompressableStateInstructionDataDecoder(): FixedSizeDecoder<SetDecompressableStateInstructionData>;
|
|
18
|
+
declare function getSetDecompressableStateInstructionDataCodec(): FixedSizeCodec<SetDecompressableStateInstructionDataArgs, SetDecompressableStateInstructionData>;
|
|
19
|
+
interface SetDecompressableStateInput<TAccountTreeAuthority extends string = string, TAccountTreeCreator extends string = string> {
|
|
20
|
+
treeAuthority: Address<TAccountTreeAuthority>;
|
|
21
|
+
treeCreator: TransactionSigner<TAccountTreeCreator>;
|
|
22
|
+
decompressableState: SetDecompressableStateInstructionDataArgs["decompressableState"];
|
|
32
23
|
}
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
declare function getSetDecompressableStateInstruction<TAccountTreeAuthority extends string, TAccountTreeCreator extends string, TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS>(input: SetDecompressableStateInput<TAccountTreeAuthority, TAccountTreeCreator>, config?: {
|
|
25
|
+
programAddress?: TProgramAddress;
|
|
35
26
|
}): SetDecompressableStateInstruction<TProgramAddress, TAccountTreeAuthority, TAccountTreeCreator>;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
interface ParsedSetDecompressableStateInstruction<TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> {
|
|
28
|
+
programAddress: Address<TProgram>;
|
|
29
|
+
accounts: {
|
|
30
|
+
treeAuthority: TAccountMetas[0];
|
|
31
|
+
treeCreator: TAccountMetas[1];
|
|
32
|
+
};
|
|
33
|
+
data: SetDecompressableStateInstructionData;
|
|
43
34
|
}
|
|
44
|
-
|
|
35
|
+
declare function parseSetDecompressableStateInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedSetDecompressableStateInstruction<TProgram, TAccountMetas>;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { ParsedSetDecompressableStateInstruction, SET_DECOMPRESSABLE_STATE_DISCRIMINATOR, SetDecompressableStateInput, SetDecompressableStateInstruction, SetDecompressableStateInstructionData, SetDecompressableStateInstructionDataArgs, getSetDecompressableStateDiscriminatorBytes, getSetDecompressableStateInstruction, getSetDecompressableStateInstructionDataCodec, getSetDecompressableStateInstructionDataDecoder, getSetDecompressableStateInstructionDataEncoder, parseSetDecompressableStateInstruction };
|
|
45
38
|
//# sourceMappingURL=setDecompressableState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setDecompressableState.d.ts","
|
|
1
|
+
{"version":3,"file":"setDecompressableState.d.ts","names":[],"sources":["../../../src/generated/instructions/setDecompressableState.ts"],"mappings":";;;;;cA+Ca,sCAAA,EAAwC,kBAAA;AAAA,iBAGrC,2CAAA,IAA+C,kBAAA;AAAA,KAMnD,iCAAA,kCACuB,yBAAA,yCACM,WAAA,wDACF,WAAA,uDACD,WAAA,mBAClC,WAAA,CAAY,QAAA,IACd,mBAAA,CAAoB,kBAAA,IACpB,uBAAA,EAEI,qBAAA,kBACI,eAAA,CAAgB,qBAAA,IAChB,qBAAA,EACJ,mBAAA,kBACI,qBAAA,CAAsB,mBAAA,IACpB,iBAAA,CAAkB,mBAAA,IACpB,mBAAA,KACD,kBAAA;AAAA,UAIQ,qCAAA;EACf,aAAA,EAAe,kBAAA;EACf,mBAAA,EAAqB,mBAAA;AAAA;AAAA,UAGN,yCAAA;EACf,mBAAA,EAAqB,uBAAA;AAAA;AAAA,iBAGP,+CAAA,IAAmD,gBAAA,CAAiB,yCAAA;AAAA,iBAapE,+CAAA,IAAmD,gBAAA,CAAiB,qCAAA;AAAA,iBAOpE,6CAAA,IAAiD,cAAA,CAC/D,yCAAA,EACA,qCAAA;AAAA,UAQe,2BAAA;EAIf,aAAA,EAAe,OAAA,CAAQ,qBAAA;EACvB,WAAA,EAAa,iBAAA,CAAkB,mBAAA;EAC/B,mBAAA,EAAqB,yCAAA;AAAA;AAAA,iBAGP,oCAAA,mGAGU,OAAA,UAAiB,yBAAA,EAEzC,KAAA,EAAO,2BAAA,CACL,qBAAA,EACA,mBAAA,GAEF,MAAA;EAAW,cAAA,GAAiB,eAAA;AAAA,IAC3B,iCAAA,CACD,eAAA,EACA,qBAAA,EACA,mBAAA;AAAA,UAmCe,uCAAA,kCACkB,yBAAA,iCACF,WAAA,cAAyB,WAAA;EAExD,cAAA,EAAgB,OAAA,CAAQ,QAAA;EACxB,QAAA;IACE,aAAA,EAAe,aAAA;IACf,WAAA,EAAa,aAAA;EAAA;EAEf,IAAA,EAAM,qCAAA;AAAA;AAAA,iBAGQ,sCAAA,yDAEiB,WAAA,IAE/B,WAAA,EAAa,WAAA,CAAY,QAAA,IACvB,uBAAA,CAAwB,aAAA,IACxB,mBAAA,CAAoB,kBAAA,IACrB,uCAAA,CAAwC,QAAA,EAAU,aAAA"}
|
|
@@ -1,77 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* to add features, then rerun Codama to update it.
|
|
5
|
-
*
|
|
6
|
-
* @see https://github.com/codama-idl/codama
|
|
7
|
-
*/
|
|
8
|
-
import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, } from "@solana/kit";
|
|
1
|
+
import { getDecompressibleStateDecoder, getDecompressibleStateEncoder } from "../types/decompressibleState.js";
|
|
2
|
+
import "../programs/bubblegum.js";
|
|
3
|
+
import { SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, transformEncoder } from "@solana/kit";
|
|
9
4
|
import { getAccountMetaFactory } from "@solana/program-client-core";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
//#region src/generated/instructions/setDecompressableState.ts
|
|
6
|
+
const SET_DECOMPRESSABLE_STATE_DISCRIMINATOR = new Uint8Array([
|
|
7
|
+
18,
|
|
8
|
+
135,
|
|
9
|
+
238,
|
|
10
|
+
168,
|
|
11
|
+
246,
|
|
12
|
+
195,
|
|
13
|
+
61,
|
|
14
|
+
115
|
|
15
|
+
]);
|
|
16
|
+
function getSetDecompressableStateDiscriminatorBytes() {
|
|
17
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(SET_DECOMPRESSABLE_STATE_DISCRIMINATOR);
|
|
15
18
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
...value,
|
|
22
|
-
discriminator: SET_DECOMPRESSABLE_STATE_DISCRIMINATOR,
|
|
23
|
-
}));
|
|
19
|
+
function getSetDecompressableStateInstructionDataEncoder() {
|
|
20
|
+
return transformEncoder(getStructEncoder([["discriminator", fixEncoderSize(getBytesEncoder(), 8)], ["decompressableState", getDecompressibleStateEncoder()]]), (value) => ({
|
|
21
|
+
...value,
|
|
22
|
+
discriminator: SET_DECOMPRESSABLE_STATE_DISCRIMINATOR
|
|
23
|
+
}));
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
28
|
-
["decompressableState", getDecompressibleStateDecoder()],
|
|
29
|
-
]);
|
|
25
|
+
function getSetDecompressableStateInstructionDataDecoder() {
|
|
26
|
+
return getStructDecoder([["discriminator", fixDecoderSize(getBytesDecoder(), 8)], ["decompressableState", getDecompressibleStateDecoder()]]);
|
|
30
27
|
}
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
function getSetDecompressableStateInstructionDataCodec() {
|
|
29
|
+
return combineCodec(getSetDecompressableStateInstructionDataEncoder(), getSetDecompressableStateInstructionDataDecoder());
|
|
33
30
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
});
|
|
31
|
+
function getSetDecompressableStateInstruction(input, config) {
|
|
32
|
+
const programAddress = config?.programAddress ?? "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
|
|
33
|
+
const accounts = {
|
|
34
|
+
treeAuthority: {
|
|
35
|
+
value: input.treeAuthority ?? null,
|
|
36
|
+
isWritable: true
|
|
37
|
+
},
|
|
38
|
+
treeCreator: {
|
|
39
|
+
value: input.treeCreator ?? null,
|
|
40
|
+
isWritable: false
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const args = { ...input };
|
|
44
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
45
|
+
return Object.freeze({
|
|
46
|
+
accounts: [getAccountMeta("treeAuthority", accounts.treeAuthority), getAccountMeta("treeCreator", accounts.treeCreator)],
|
|
47
|
+
data: getSetDecompressableStateInstructionDataEncoder().encode(args),
|
|
48
|
+
programAddress
|
|
49
|
+
});
|
|
54
50
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
data: getSetDecompressableStateInstructionDataDecoder().decode(instruction.data),
|
|
75
|
-
};
|
|
51
|
+
function parseSetDecompressableStateInstruction(instruction) {
|
|
52
|
+
if (instruction.accounts.length < 2) throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
|
|
53
|
+
actualAccountMetas: instruction.accounts.length,
|
|
54
|
+
expectedAccountMetas: 2
|
|
55
|
+
});
|
|
56
|
+
let accountIndex = 0;
|
|
57
|
+
const getNextAccount = () => {
|
|
58
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
59
|
+
accountIndex += 1;
|
|
60
|
+
return accountMeta;
|
|
61
|
+
};
|
|
62
|
+
return {
|
|
63
|
+
programAddress: instruction.programAddress,
|
|
64
|
+
accounts: {
|
|
65
|
+
treeAuthority: getNextAccount(),
|
|
66
|
+
treeCreator: getNextAccount()
|
|
67
|
+
},
|
|
68
|
+
data: getSetDecompressableStateInstructionDataDecoder().decode(instruction.data)
|
|
69
|
+
};
|
|
76
70
|
}
|
|
71
|
+
//#endregion
|
|
72
|
+
export { SET_DECOMPRESSABLE_STATE_DISCRIMINATOR, getSetDecompressableStateDiscriminatorBytes, getSetDecompressableStateInstruction, getSetDecompressableStateInstructionDataCodec, getSetDecompressableStateInstructionDataDecoder, getSetDecompressableStateInstructionDataEncoder, parseSetDecompressableStateInstruction };
|
|
73
|
+
|
|
77
74
|
//# sourceMappingURL=setDecompressableState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setDecompressableState.js","
|
|
1
|
+
{"version":3,"file":"setDecompressableState.js","names":[],"sources":["../../../src/generated/instructions/setDecompressableState.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport type {\n AccountMeta,\n AccountSignerMeta,\n Address,\n FixedSizeCodec,\n FixedSizeDecoder,\n FixedSizeEncoder,\n Instruction,\n InstructionWithAccounts,\n InstructionWithData,\n ReadonlySignerAccount,\n ReadonlyUint8Array,\n TransactionSigner,\n WritableAccount,\n} from \"@solana/kit\";\nimport type { ResolvedInstructionAccount } from \"@solana/program-client-core\";\nimport type {\n DecompressibleState,\n DecompressibleStateArgs,\n} from \"../types/index.js\";\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n SolanaError,\n transformEncoder,\n} from \"@solana/kit\";\nimport { getAccountMetaFactory } from \"@solana/program-client-core\";\nimport { BUBBLEGUM_PROGRAM_ADDRESS } from \"../programs/index.js\";\nimport {\n getDecompressibleStateDecoder,\n getDecompressibleStateEncoder,\n} from \"../types/index.js\";\n\nexport const SET_DECOMPRESSABLE_STATE_DISCRIMINATOR: ReadonlyUint8Array =\n new Uint8Array([18, 135, 238, 168, 246, 195, 61, 115]);\n\nexport function getSetDecompressableStateDiscriminatorBytes(): ReadonlyUint8Array {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n SET_DECOMPRESSABLE_STATE_DISCRIMINATOR,\n );\n}\n\nexport type SetDecompressableStateInstruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountTreeAuthority extends string | AccountMeta<string> = string,\n TAccountTreeCreator extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountTreeAuthority extends string\n ? WritableAccount<TAccountTreeAuthority>\n : TAccountTreeAuthority,\n TAccountTreeCreator extends string\n ? ReadonlySignerAccount<TAccountTreeCreator> &\n AccountSignerMeta<TAccountTreeCreator>\n : TAccountTreeCreator,\n ...TRemainingAccounts,\n ]\n >;\n\nexport interface SetDecompressableStateInstructionData {\n discriminator: ReadonlyUint8Array;\n decompressableState: DecompressibleState;\n}\n\nexport interface SetDecompressableStateInstructionDataArgs {\n decompressableState: DecompressibleStateArgs;\n}\n\nexport function getSetDecompressableStateInstructionDataEncoder(): FixedSizeEncoder<SetDecompressableStateInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"decompressableState\", getDecompressibleStateEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: SET_DECOMPRESSABLE_STATE_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getSetDecompressableStateInstructionDataDecoder(): FixedSizeDecoder<SetDecompressableStateInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"decompressableState\", getDecompressibleStateDecoder()],\n ]);\n}\n\nexport function getSetDecompressableStateInstructionDataCodec(): FixedSizeCodec<\n SetDecompressableStateInstructionDataArgs,\n SetDecompressableStateInstructionData\n> {\n return combineCodec(\n getSetDecompressableStateInstructionDataEncoder(),\n getSetDecompressableStateInstructionDataDecoder(),\n );\n}\n\nexport interface SetDecompressableStateInput<\n TAccountTreeAuthority extends string = string,\n TAccountTreeCreator extends string = string,\n> {\n treeAuthority: Address<TAccountTreeAuthority>;\n treeCreator: TransactionSigner<TAccountTreeCreator>;\n decompressableState: SetDecompressableStateInstructionDataArgs[\"decompressableState\"];\n}\n\nexport function getSetDecompressableStateInstruction<\n TAccountTreeAuthority extends string,\n TAccountTreeCreator extends string,\n TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n>(\n input: SetDecompressableStateInput<\n TAccountTreeAuthority,\n TAccountTreeCreator\n >,\n config?: { programAddress?: TProgramAddress },\n): SetDecompressableStateInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountTreeCreator\n> {\n // Program address.\n const programAddress = config?.programAddress ?? BUBBLEGUM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n treeAuthority: { value: input.treeAuthority ?? null, isWritable: true },\n treeCreator: { value: input.treeCreator ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedInstructionAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(\"treeAuthority\", accounts.treeAuthority),\n getAccountMeta(\"treeCreator\", accounts.treeCreator),\n ],\n data: getSetDecompressableStateInstructionDataEncoder().encode(\n args as SetDecompressableStateInstructionDataArgs,\n ),\n programAddress,\n } as SetDecompressableStateInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountTreeCreator\n >);\n}\n\nexport interface ParsedSetDecompressableStateInstruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> {\n programAddress: Address<TProgram>;\n accounts: {\n treeAuthority: TAccountMetas[0];\n treeCreator: TAccountMetas[1];\n };\n data: SetDecompressableStateInstructionData;\n}\n\nexport function parseSetDecompressableStateInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedSetDecompressableStateInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n throw new SolanaError(\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n {\n actualAccountMetas: instruction.accounts.length,\n expectedAccountMetas: 2,\n },\n );\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n treeAuthority: getNextAccount(),\n treeCreator: getNextAccount(),\n },\n data: getSetDecompressableStateInstructionDataDecoder().decode(\n instruction.data,\n ),\n };\n}\n"],"mappings":";;;;;AA+CA,MAAa,yCACX,IAAI,WAAW;CAAC;CAAI;CAAK;CAAK;CAAK;CAAK;CAAK;CAAI;AAAG,CAAC;AAEvD,SAAgB,8CAAkE;CAChF,OAAO,eAAe,gBAAgB,GAAG,CAAC,CAAC,CAAC,OAC1C,sCACF;AACF;AA+BA,SAAgB,kDAA+G;CAC7H,OAAO,iBACL,iBAAiB,CACf,CAAC,iBAAiB,eAAe,gBAAgB,GAAG,CAAC,CAAC,GACtD,CAAC,uBAAuB,8BAA8B,CAAC,CACzD,CAAC,IACA,WAAW;EACV,GAAG;EACH,eAAe;CACjB,EACF;AACF;AAEA,SAAgB,kDAA2G;CACzH,OAAO,iBAAiB,CACtB,CAAC,iBAAiB,eAAe,gBAAgB,GAAG,CAAC,CAAC,GACtD,CAAC,uBAAuB,8BAA8B,CAAC,CACzD,CAAC;AACH;AAEA,SAAgB,gDAGd;CACA,OAAO,aACL,gDAAgD,GAChD,gDAAgD,CAClD;AACF;AAWA,SAAgB,qCAKd,OAIA,QAKA;CAEA,MAAM,iBAAiB,QAAQ,kBAAA;CAO/B,MAAM,WAAW;EAHf,eAAe;GAAE,OAAO,MAAM,iBAAiB;GAAM,YAAY;EAAK;EACtE,aAAa;GAAE,OAAO,MAAM,eAAe;GAAM,YAAY;EAAM;CAErC;CAMhC,MAAM,OAAO,EAAE,GAAG,MAAM;CAExB,MAAM,iBAAiB,sBAAsB,gBAAgB,WAAW;CACxE,OAAO,OAAO,OAAO;EACnB,UAAU,CACR,eAAe,iBAAiB,SAAS,aAAa,GACtD,eAAe,eAAe,SAAS,WAAW,CACpD;EACA,MAAM,gDAAgD,CAAC,CAAC,OACtD,IACF;EACA;CACF,CAIC;AACH;AAcA,SAAgB,uCAId,aAGkE;CAClE,IAAI,YAAY,SAAS,SAAS,GAChC,MAAM,IAAI,YACR,2DACA;EACE,oBAAoB,YAAY,SAAS;EACzC,sBAAsB;CACxB,CACF;CAEF,IAAI,eAAe;CACnB,MAAM,uBAAuB;EAC3B,MAAM,cAAe,YAAY,SAA2B;EAC5D,gBAAgB;EAChB,OAAO;CACT;CACA,OAAO;EACL,gBAAgB,YAAY;EAC5B,UAAU;GACR,eAAe,eAAe;GAC9B,aAAa,eAAe;EAC9B;EACA,MAAM,gDAAgD,CAAC,CAAC,OACtD,YAAY,IACd;CACF;AACF"}
|
|
@@ -1,45 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare function getSetDecompressibleStateDiscriminatorBytes(): ReadonlyUint8Array;
|
|
13
|
-
export type SetDecompressibleStateInstruction<TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS, TAccountTreeAuthority extends string | AccountMeta = string, TAccountTreeCreator extends string | AccountMeta = string, TRemainingAccounts extends readonly AccountMeta[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
14
|
-
TAccountTreeAuthority extends string ? WritableAccount<TAccountTreeAuthority> : TAccountTreeAuthority,
|
|
15
|
-
TAccountTreeCreator extends string ? ReadonlySignerAccount<TAccountTreeCreator> & AccountSignerMeta<TAccountTreeCreator> : TAccountTreeCreator,
|
|
16
|
-
...TRemainingAccounts
|
|
17
|
-
]>;
|
|
18
|
-
export interface SetDecompressibleStateInstructionData {
|
|
19
|
-
discriminator: ReadonlyUint8Array;
|
|
20
|
-
decompressableState: DecompressibleState;
|
|
1
|
+
import { DecompressibleState, DecompressibleStateArgs } from "../types/decompressibleState.js";
|
|
2
|
+
import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/bubblegum.js";
|
|
3
|
+
import { AccountMeta, AccountSignerMeta, Address, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlySignerAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount } from "@solana/kit";
|
|
4
|
+
|
|
5
|
+
//#region src/generated/instructions/setDecompressibleState.d.ts
|
|
6
|
+
declare const SET_DECOMPRESSIBLE_STATE_DISCRIMINATOR: ReadonlyUint8Array;
|
|
7
|
+
declare function getSetDecompressibleStateDiscriminatorBytes(): ReadonlyUint8Array;
|
|
8
|
+
type SetDecompressibleStateInstruction<TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS, TAccountTreeAuthority extends string | AccountMeta<string> = string, TAccountTreeCreator extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountTreeAuthority extends string ? WritableAccount<TAccountTreeAuthority> : TAccountTreeAuthority, TAccountTreeCreator extends string ? ReadonlySignerAccount<TAccountTreeCreator> & AccountSignerMeta<TAccountTreeCreator> : TAccountTreeCreator, ...TRemainingAccounts]>;
|
|
9
|
+
interface SetDecompressibleStateInstructionData {
|
|
10
|
+
discriminator: ReadonlyUint8Array;
|
|
11
|
+
decompressableState: DecompressibleState;
|
|
21
12
|
}
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
interface SetDecompressibleStateInstructionDataArgs {
|
|
14
|
+
decompressableState: DecompressibleStateArgs;
|
|
24
15
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
declare function getSetDecompressibleStateInstructionDataEncoder(): FixedSizeEncoder<SetDecompressibleStateInstructionDataArgs>;
|
|
17
|
+
declare function getSetDecompressibleStateInstructionDataDecoder(): FixedSizeDecoder<SetDecompressibleStateInstructionData>;
|
|
18
|
+
declare function getSetDecompressibleStateInstructionDataCodec(): FixedSizeCodec<SetDecompressibleStateInstructionDataArgs, SetDecompressibleStateInstructionData>;
|
|
19
|
+
interface SetDecompressibleStateInput<TAccountTreeAuthority extends string = string, TAccountTreeCreator extends string = string> {
|
|
20
|
+
treeAuthority: Address<TAccountTreeAuthority>;
|
|
21
|
+
treeCreator: TransactionSigner<TAccountTreeCreator>;
|
|
22
|
+
decompressableState: SetDecompressibleStateInstructionDataArgs["decompressableState"];
|
|
32
23
|
}
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
declare function getSetDecompressibleStateInstruction<TAccountTreeAuthority extends string, TAccountTreeCreator extends string, TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS>(input: SetDecompressibleStateInput<TAccountTreeAuthority, TAccountTreeCreator>, config?: {
|
|
25
|
+
programAddress?: TProgramAddress;
|
|
35
26
|
}): SetDecompressibleStateInstruction<TProgramAddress, TAccountTreeAuthority, TAccountTreeCreator>;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
interface ParsedSetDecompressibleStateInstruction<TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> {
|
|
28
|
+
programAddress: Address<TProgram>;
|
|
29
|
+
accounts: {
|
|
30
|
+
treeAuthority: TAccountMetas[0];
|
|
31
|
+
treeCreator: TAccountMetas[1];
|
|
32
|
+
};
|
|
33
|
+
data: SetDecompressibleStateInstructionData;
|
|
43
34
|
}
|
|
44
|
-
|
|
35
|
+
declare function parseSetDecompressibleStateInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedSetDecompressibleStateInstruction<TProgram, TAccountMetas>;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { ParsedSetDecompressibleStateInstruction, SET_DECOMPRESSIBLE_STATE_DISCRIMINATOR, SetDecompressibleStateInput, SetDecompressibleStateInstruction, SetDecompressibleStateInstructionData, SetDecompressibleStateInstructionDataArgs, getSetDecompressibleStateDiscriminatorBytes, getSetDecompressibleStateInstruction, getSetDecompressibleStateInstructionDataCodec, getSetDecompressibleStateInstructionDataDecoder, getSetDecompressibleStateInstructionDataEncoder, parseSetDecompressibleStateInstruction };
|
|
45
38
|
//# sourceMappingURL=setDecompressibleState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setDecompressibleState.d.ts","
|
|
1
|
+
{"version":3,"file":"setDecompressibleState.d.ts","names":[],"sources":["../../../src/generated/instructions/setDecompressibleState.ts"],"mappings":";;;;;cA+Ca,sCAAA,EAAwC,kBAAA;AAAA,iBAGrC,2CAAA,IAA+C,kBAAA;AAAA,KAMnD,iCAAA,kCACuB,yBAAA,yCACM,WAAA,wDACF,WAAA,uDACD,WAAA,mBAClC,WAAA,CAAY,QAAA,IACd,mBAAA,CAAoB,kBAAA,IACpB,uBAAA,EAEI,qBAAA,kBACI,eAAA,CAAgB,qBAAA,IAChB,qBAAA,EACJ,mBAAA,kBACI,qBAAA,CAAsB,mBAAA,IACpB,iBAAA,CAAkB,mBAAA,IACpB,mBAAA,KACD,kBAAA;AAAA,UAIQ,qCAAA;EACf,aAAA,EAAe,kBAAA;EACf,mBAAA,EAAqB,mBAAA;AAAA;AAAA,UAGN,yCAAA;EACf,mBAAA,EAAqB,uBAAA;AAAA;AAAA,iBAGP,+CAAA,IAAmD,gBAAA,CAAiB,yCAAA;AAAA,iBAapE,+CAAA,IAAmD,gBAAA,CAAiB,qCAAA;AAAA,iBAOpE,6CAAA,IAAiD,cAAA,CAC/D,yCAAA,EACA,qCAAA;AAAA,UAQe,2BAAA;EAIf,aAAA,EAAe,OAAA,CAAQ,qBAAA;EACvB,WAAA,EAAa,iBAAA,CAAkB,mBAAA;EAC/B,mBAAA,EAAqB,yCAAA;AAAA;AAAA,iBAGP,oCAAA,mGAGU,OAAA,UAAiB,yBAAA,EAEzC,KAAA,EAAO,2BAAA,CACL,qBAAA,EACA,mBAAA,GAEF,MAAA;EAAW,cAAA,GAAiB,eAAA;AAAA,IAC3B,iCAAA,CACD,eAAA,EACA,qBAAA,EACA,mBAAA;AAAA,UAmCe,uCAAA,kCACkB,yBAAA,iCACF,WAAA,cAAyB,WAAA;EAExD,cAAA,EAAgB,OAAA,CAAQ,QAAA;EACxB,QAAA;IACE,aAAA,EAAe,aAAA;IACf,WAAA,EAAa,aAAA;EAAA;EAEf,IAAA,EAAM,qCAAA;AAAA;AAAA,iBAGQ,sCAAA,yDAEiB,WAAA,IAE/B,WAAA,EAAa,WAAA,CAAY,QAAA,IACvB,uBAAA,CAAwB,aAAA,IACxB,mBAAA,CAAoB,kBAAA,IACrB,uCAAA,CAAwC,QAAA,EAAU,aAAA"}
|
|
@@ -1,77 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* to add features, then rerun Codama to update it.
|
|
5
|
-
*
|
|
6
|
-
* @see https://github.com/codama-idl/codama
|
|
7
|
-
*/
|
|
8
|
-
import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, } from "@solana/kit";
|
|
1
|
+
import { getDecompressibleStateDecoder, getDecompressibleStateEncoder } from "../types/decompressibleState.js";
|
|
2
|
+
import "../programs/bubblegum.js";
|
|
3
|
+
import { SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, transformEncoder } from "@solana/kit";
|
|
9
4
|
import { getAccountMetaFactory } from "@solana/program-client-core";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
//#region src/generated/instructions/setDecompressibleState.ts
|
|
6
|
+
const SET_DECOMPRESSIBLE_STATE_DISCRIMINATOR = new Uint8Array([
|
|
7
|
+
82,
|
|
8
|
+
104,
|
|
9
|
+
152,
|
|
10
|
+
6,
|
|
11
|
+
149,
|
|
12
|
+
111,
|
|
13
|
+
100,
|
|
14
|
+
13
|
|
15
|
+
]);
|
|
16
|
+
function getSetDecompressibleStateDiscriminatorBytes() {
|
|
17
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(SET_DECOMPRESSIBLE_STATE_DISCRIMINATOR);
|
|
15
18
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
...value,
|
|
22
|
-
discriminator: SET_DECOMPRESSIBLE_STATE_DISCRIMINATOR,
|
|
23
|
-
}));
|
|
19
|
+
function getSetDecompressibleStateInstructionDataEncoder() {
|
|
20
|
+
return transformEncoder(getStructEncoder([["discriminator", fixEncoderSize(getBytesEncoder(), 8)], ["decompressableState", getDecompressibleStateEncoder()]]), (value) => ({
|
|
21
|
+
...value,
|
|
22
|
+
discriminator: SET_DECOMPRESSIBLE_STATE_DISCRIMINATOR
|
|
23
|
+
}));
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
28
|
-
["decompressableState", getDecompressibleStateDecoder()],
|
|
29
|
-
]);
|
|
25
|
+
function getSetDecompressibleStateInstructionDataDecoder() {
|
|
26
|
+
return getStructDecoder([["discriminator", fixDecoderSize(getBytesDecoder(), 8)], ["decompressableState", getDecompressibleStateDecoder()]]);
|
|
30
27
|
}
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
function getSetDecompressibleStateInstructionDataCodec() {
|
|
29
|
+
return combineCodec(getSetDecompressibleStateInstructionDataEncoder(), getSetDecompressibleStateInstructionDataDecoder());
|
|
33
30
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
});
|
|
31
|
+
function getSetDecompressibleStateInstruction(input, config) {
|
|
32
|
+
const programAddress = config?.programAddress ?? "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
|
|
33
|
+
const accounts = {
|
|
34
|
+
treeAuthority: {
|
|
35
|
+
value: input.treeAuthority ?? null,
|
|
36
|
+
isWritable: true
|
|
37
|
+
},
|
|
38
|
+
treeCreator: {
|
|
39
|
+
value: input.treeCreator ?? null,
|
|
40
|
+
isWritable: false
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const args = { ...input };
|
|
44
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
45
|
+
return Object.freeze({
|
|
46
|
+
accounts: [getAccountMeta("treeAuthority", accounts.treeAuthority), getAccountMeta("treeCreator", accounts.treeCreator)],
|
|
47
|
+
data: getSetDecompressibleStateInstructionDataEncoder().encode(args),
|
|
48
|
+
programAddress
|
|
49
|
+
});
|
|
54
50
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
data: getSetDecompressibleStateInstructionDataDecoder().decode(instruction.data),
|
|
75
|
-
};
|
|
51
|
+
function parseSetDecompressibleStateInstruction(instruction) {
|
|
52
|
+
if (instruction.accounts.length < 2) throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
|
|
53
|
+
actualAccountMetas: instruction.accounts.length,
|
|
54
|
+
expectedAccountMetas: 2
|
|
55
|
+
});
|
|
56
|
+
let accountIndex = 0;
|
|
57
|
+
const getNextAccount = () => {
|
|
58
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
59
|
+
accountIndex += 1;
|
|
60
|
+
return accountMeta;
|
|
61
|
+
};
|
|
62
|
+
return {
|
|
63
|
+
programAddress: instruction.programAddress,
|
|
64
|
+
accounts: {
|
|
65
|
+
treeAuthority: getNextAccount(),
|
|
66
|
+
treeCreator: getNextAccount()
|
|
67
|
+
},
|
|
68
|
+
data: getSetDecompressibleStateInstructionDataDecoder().decode(instruction.data)
|
|
69
|
+
};
|
|
76
70
|
}
|
|
71
|
+
//#endregion
|
|
72
|
+
export { SET_DECOMPRESSIBLE_STATE_DISCRIMINATOR, getSetDecompressibleStateDiscriminatorBytes, getSetDecompressibleStateInstruction, getSetDecompressibleStateInstructionDataCodec, getSetDecompressibleStateInstructionDataDecoder, getSetDecompressibleStateInstructionDataEncoder, parseSetDecompressibleStateInstruction };
|
|
73
|
+
|
|
77
74
|
//# sourceMappingURL=setDecompressibleState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setDecompressibleState.js","
|
|
1
|
+
{"version":3,"file":"setDecompressibleState.js","names":[],"sources":["../../../src/generated/instructions/setDecompressibleState.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport type {\n AccountMeta,\n AccountSignerMeta,\n Address,\n FixedSizeCodec,\n FixedSizeDecoder,\n FixedSizeEncoder,\n Instruction,\n InstructionWithAccounts,\n InstructionWithData,\n ReadonlySignerAccount,\n ReadonlyUint8Array,\n TransactionSigner,\n WritableAccount,\n} from \"@solana/kit\";\nimport type { ResolvedInstructionAccount } from \"@solana/program-client-core\";\nimport type {\n DecompressibleState,\n DecompressibleStateArgs,\n} from \"../types/index.js\";\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n SolanaError,\n transformEncoder,\n} from \"@solana/kit\";\nimport { getAccountMetaFactory } from \"@solana/program-client-core\";\nimport { BUBBLEGUM_PROGRAM_ADDRESS } from \"../programs/index.js\";\nimport {\n getDecompressibleStateDecoder,\n getDecompressibleStateEncoder,\n} from \"../types/index.js\";\n\nexport const SET_DECOMPRESSIBLE_STATE_DISCRIMINATOR: ReadonlyUint8Array =\n new Uint8Array([82, 104, 152, 6, 149, 111, 100, 13]);\n\nexport function getSetDecompressibleStateDiscriminatorBytes(): ReadonlyUint8Array {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n SET_DECOMPRESSIBLE_STATE_DISCRIMINATOR,\n );\n}\n\nexport type SetDecompressibleStateInstruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountTreeAuthority extends string | AccountMeta<string> = string,\n TAccountTreeCreator extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountTreeAuthority extends string\n ? WritableAccount<TAccountTreeAuthority>\n : TAccountTreeAuthority,\n TAccountTreeCreator extends string\n ? ReadonlySignerAccount<TAccountTreeCreator> &\n AccountSignerMeta<TAccountTreeCreator>\n : TAccountTreeCreator,\n ...TRemainingAccounts,\n ]\n >;\n\nexport interface SetDecompressibleStateInstructionData {\n discriminator: ReadonlyUint8Array;\n decompressableState: DecompressibleState;\n}\n\nexport interface SetDecompressibleStateInstructionDataArgs {\n decompressableState: DecompressibleStateArgs;\n}\n\nexport function getSetDecompressibleStateInstructionDataEncoder(): FixedSizeEncoder<SetDecompressibleStateInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"decompressableState\", getDecompressibleStateEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: SET_DECOMPRESSIBLE_STATE_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getSetDecompressibleStateInstructionDataDecoder(): FixedSizeDecoder<SetDecompressibleStateInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"decompressableState\", getDecompressibleStateDecoder()],\n ]);\n}\n\nexport function getSetDecompressibleStateInstructionDataCodec(): FixedSizeCodec<\n SetDecompressibleStateInstructionDataArgs,\n SetDecompressibleStateInstructionData\n> {\n return combineCodec(\n getSetDecompressibleStateInstructionDataEncoder(),\n getSetDecompressibleStateInstructionDataDecoder(),\n );\n}\n\nexport interface SetDecompressibleStateInput<\n TAccountTreeAuthority extends string = string,\n TAccountTreeCreator extends string = string,\n> {\n treeAuthority: Address<TAccountTreeAuthority>;\n treeCreator: TransactionSigner<TAccountTreeCreator>;\n decompressableState: SetDecompressibleStateInstructionDataArgs[\"decompressableState\"];\n}\n\nexport function getSetDecompressibleStateInstruction<\n TAccountTreeAuthority extends string,\n TAccountTreeCreator extends string,\n TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n>(\n input: SetDecompressibleStateInput<\n TAccountTreeAuthority,\n TAccountTreeCreator\n >,\n config?: { programAddress?: TProgramAddress },\n): SetDecompressibleStateInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountTreeCreator\n> {\n // Program address.\n const programAddress = config?.programAddress ?? BUBBLEGUM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n treeAuthority: { value: input.treeAuthority ?? null, isWritable: true },\n treeCreator: { value: input.treeCreator ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedInstructionAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(\"treeAuthority\", accounts.treeAuthority),\n getAccountMeta(\"treeCreator\", accounts.treeCreator),\n ],\n data: getSetDecompressibleStateInstructionDataEncoder().encode(\n args as SetDecompressibleStateInstructionDataArgs,\n ),\n programAddress,\n } as SetDecompressibleStateInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountTreeCreator\n >);\n}\n\nexport interface ParsedSetDecompressibleStateInstruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> {\n programAddress: Address<TProgram>;\n accounts: {\n treeAuthority: TAccountMetas[0];\n treeCreator: TAccountMetas[1];\n };\n data: SetDecompressibleStateInstructionData;\n}\n\nexport function parseSetDecompressibleStateInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedSetDecompressibleStateInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n throw new SolanaError(\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n {\n actualAccountMetas: instruction.accounts.length,\n expectedAccountMetas: 2,\n },\n );\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n treeAuthority: getNextAccount(),\n treeCreator: getNextAccount(),\n },\n data: getSetDecompressibleStateInstructionDataDecoder().decode(\n instruction.data,\n ),\n };\n}\n"],"mappings":";;;;;AA+CA,MAAa,yCACX,IAAI,WAAW;CAAC;CAAI;CAAK;CAAK;CAAG;CAAK;CAAK;CAAK;AAAE,CAAC;AAErD,SAAgB,8CAAkE;CAChF,OAAO,eAAe,gBAAgB,GAAG,CAAC,CAAC,CAAC,OAC1C,sCACF;AACF;AA+BA,SAAgB,kDAA+G;CAC7H,OAAO,iBACL,iBAAiB,CACf,CAAC,iBAAiB,eAAe,gBAAgB,GAAG,CAAC,CAAC,GACtD,CAAC,uBAAuB,8BAA8B,CAAC,CACzD,CAAC,IACA,WAAW;EACV,GAAG;EACH,eAAe;CACjB,EACF;AACF;AAEA,SAAgB,kDAA2G;CACzH,OAAO,iBAAiB,CACtB,CAAC,iBAAiB,eAAe,gBAAgB,GAAG,CAAC,CAAC,GACtD,CAAC,uBAAuB,8BAA8B,CAAC,CACzD,CAAC;AACH;AAEA,SAAgB,gDAGd;CACA,OAAO,aACL,gDAAgD,GAChD,gDAAgD,CAClD;AACF;AAWA,SAAgB,qCAKd,OAIA,QAKA;CAEA,MAAM,iBAAiB,QAAQ,kBAAA;CAO/B,MAAM,WAAW;EAHf,eAAe;GAAE,OAAO,MAAM,iBAAiB;GAAM,YAAY;EAAK;EACtE,aAAa;GAAE,OAAO,MAAM,eAAe;GAAM,YAAY;EAAM;CAErC;CAMhC,MAAM,OAAO,EAAE,GAAG,MAAM;CAExB,MAAM,iBAAiB,sBAAsB,gBAAgB,WAAW;CACxE,OAAO,OAAO,OAAO;EACnB,UAAU,CACR,eAAe,iBAAiB,SAAS,aAAa,GACtD,eAAe,eAAe,SAAS,WAAW,CACpD;EACA,MAAM,gDAAgD,CAAC,CAAC,OACtD,IACF;EACA;CACF,CAIC;AACH;AAcA,SAAgB,uCAId,aAGkE;CAClE,IAAI,YAAY,SAAS,SAAS,GAChC,MAAM,IAAI,YACR,2DACA;EACE,oBAAoB,YAAY,SAAS;EACzC,sBAAsB;CACxB,CACF;CAEF,IAAI,eAAe;CACnB,MAAM,uBAAuB;EAC3B,MAAM,cAAe,YAAY,SAA2B;EAC5D,gBAAgB;EAChB,OAAO;CACT;CACA,OAAO;EACL,gBAAgB,YAAY;EAC5B,UAAU;GACR,eAAe,eAAe;GAC9B,aAAa,eAAe;EAC9B;EACA,MAAM,gDAAgD,CAAC,CAAC,OACtD,YAAY,IACd;CACF;AACF"}
|