@nosana/kit 1.0.3 → 1.0.8

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.
Files changed (73) hide show
  1. package/dist/config/defaultConfigs.js +2 -0
  2. package/dist/config/types.d.ts +1 -0
  3. package/dist/generated_clients/merkle_distributor/accounts/claimStatus.d.ts +53 -0
  4. package/dist/generated_clients/merkle_distributor/accounts/claimStatus.js +65 -0
  5. package/dist/generated_clients/merkle_distributor/accounts/index.d.ts +9 -0
  6. package/dist/generated_clients/merkle_distributor/accounts/index.js +9 -0
  7. package/dist/generated_clients/merkle_distributor/accounts/merkleDistributor.d.ts +109 -0
  8. package/dist/generated_clients/merkle_distributor/accounts/merkleDistributor.js +93 -0
  9. package/dist/generated_clients/merkle_distributor/errors/index.d.ts +8 -0
  10. package/dist/generated_clients/merkle_distributor/errors/index.js +8 -0
  11. package/dist/generated_clients/merkle_distributor/errors/merkleDistributor.d.ts +63 -0
  12. package/dist/generated_clients/merkle_distributor/errors/merkleDistributor.js +89 -0
  13. package/dist/generated_clients/merkle_distributor/index.d.ts +11 -0
  14. package/dist/generated_clients/merkle_distributor/index.js +11 -0
  15. package/dist/generated_clients/merkle_distributor/instructions/claimLocked.d.ts +69 -0
  16. package/dist/generated_clients/merkle_distributor/instructions/claimLocked.js +84 -0
  17. package/dist/generated_clients/merkle_distributor/instructions/clawback.d.ts +69 -0
  18. package/dist/generated_clients/merkle_distributor/instructions/clawback.js +88 -0
  19. package/dist/generated_clients/merkle_distributor/instructions/closeClaimStatus.d.ts +45 -0
  20. package/dist/generated_clients/merkle_distributor/instructions/closeClaimStatus.js +73 -0
  21. package/dist/generated_clients/merkle_distributor/instructions/closeDistributor.d.ts +64 -0
  22. package/dist/generated_clients/merkle_distributor/instructions/closeDistributor.js +84 -0
  23. package/dist/generated_clients/merkle_distributor/instructions/index.d.ts +16 -0
  24. package/dist/generated_clients/merkle_distributor/instructions/index.js +16 -0
  25. package/dist/generated_clients/merkle_distributor/instructions/newClaim.d.ts +78 -0
  26. package/dist/generated_clients/merkle_distributor/instructions/newClaim.js +101 -0
  27. package/dist/generated_clients/merkle_distributor/instructions/newDistributor.d.ts +113 -0
  28. package/dist/generated_clients/merkle_distributor/instructions/newDistributor.js +122 -0
  29. package/dist/generated_clients/merkle_distributor/instructions/setAdmin.d.ts +48 -0
  30. package/dist/generated_clients/merkle_distributor/instructions/setAdmin.js +70 -0
  31. package/dist/generated_clients/merkle_distributor/instructions/setClawbackReceiver.d.ts +48 -0
  32. package/dist/generated_clients/merkle_distributor/instructions/setClawbackReceiver.js +76 -0
  33. package/dist/generated_clients/merkle_distributor/instructions/setEnableSlot.d.ts +47 -0
  34. package/dist/generated_clients/merkle_distributor/instructions/setEnableSlot.js +73 -0
  35. package/dist/generated_clients/merkle_distributor/programs/index.d.ts +8 -0
  36. package/dist/generated_clients/merkle_distributor/programs/index.js +8 -0
  37. package/dist/generated_clients/merkle_distributor/programs/merkleDistributor.d.ts +50 -0
  38. package/dist/generated_clients/merkle_distributor/programs/merkleDistributor.js +67 -0
  39. package/dist/generated_clients/merkle_distributor/shared/index.d.ts +49 -0
  40. package/dist/generated_clients/merkle_distributor/shared/index.js +86 -0
  41. package/dist/index.d.ts +5 -0
  42. package/dist/index.js +5 -0
  43. package/dist/programs/MerkleDistributorProgram.d.ts +101 -0
  44. package/dist/programs/MerkleDistributorProgram.js +296 -0
  45. package/package.json +19 -13
  46. package/.gitlab-ci.yml +0 -54
  47. package/.prettierignore +0 -17
  48. package/eslint.config.js +0 -47
  49. package/examples/browser/.gitlab-ci.yml +0 -78
  50. package/examples/browser/FEATURES.md +0 -141
  51. package/examples/browser/QUICK_START.md +0 -76
  52. package/examples/browser/README.md +0 -182
  53. package/examples/browser/app.vue +0 -1840
  54. package/examples/browser/assets/css/main.css +0 -7
  55. package/examples/browser/nuxt.config.ts +0 -30
  56. package/examples/browser/package-lock.json +0 -12230
  57. package/examples/browser/package.json +0 -31
  58. package/examples/browser/public/favicon.ico +0 -0
  59. package/examples/browser/public/robots.txt +0 -2
  60. package/examples/browser/start.sh +0 -38
  61. package/examples/browser/tailwind.config.js +0 -26
  62. package/examples/node/README.md +0 -261
  63. package/examples/node/example-keypair.json +0 -1
  64. package/examples/node/monitor.ts +0 -143
  65. package/examples/node/nos-service.ts +0 -117
  66. package/examples/node/package-lock.json +0 -589
  67. package/examples/node/package.json +0 -20
  68. package/examples/node/post-job.ts +0 -160
  69. package/examples/node/retrieve.ts +0 -18
  70. package/examples/node/set-wallet.ts +0 -87
  71. package/examples/node/stake-program.ts +0 -84
  72. package/scripts/generate-clients.ts +0 -22
  73. package/vitest.config.ts +0 -31
@@ -18,6 +18,7 @@ export const DEFAULT_CONFIGS = {
18
18
  rewardsAddress: address('nosRB8DUV67oLNrL45bo2pFLrmsWPiewe2Lk2DRNYCp'),
19
19
  stakeAddress: address('nosScmHY2uR24Zh751PmGj9ww9QRNHewh9H59AfrTJE'),
20
20
  poolsAddress: address('nosPdZrfDzND1LAR28FLMDEATUPK53K8xbRBXAirevD'),
21
+ merkleDistributorAddress: address('merkp8F8f5EgYSYKadk3YiuQQdo3JPdnJWKviaaF425'),
21
22
  },
22
23
  logLevel: NosanaLogLevel.ERROR,
23
24
  },
@@ -38,6 +39,7 @@ export const DEFAULT_CONFIGS = {
38
39
  rewardsAddress: address('nosRB8DUV67oLNrL45bo2pFLrmsWPiewe2Lk2DRNYCp'),
39
40
  stakeAddress: address('nosScmHY2uR24Zh751PmGj9ww9QRNHewh9H59AfrTJE'),
40
41
  poolsAddress: address('nosPdZrfDzND1LAR28FLMDEATUPK53K8xbRBXAirevD'),
42
+ merkleDistributorAddress: address('merkp8F8f5EgYSYKadk3YiuQQdo3JPdnJWKviaaF425'),
41
43
  },
42
44
  logLevel: NosanaLogLevel.DEBUG,
43
45
  },
@@ -33,6 +33,7 @@ export interface ClientConfig {
33
33
  rewardsAddress: Address;
34
34
  stakeAddress: Address;
35
35
  poolsAddress: Address;
36
+ merkleDistributorAddress: Address;
36
37
  };
37
38
  }
38
39
  export interface PartialClientConfig {
@@ -0,0 +1,53 @@
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
+ import { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type Codec, type Decoder, type EncodedAccount, type Encoder, type FetchAccountConfig, type FetchAccountsConfig, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit';
9
+ export declare const CLAIM_STATUS_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
10
+ export declare function getClaimStatusDiscriminatorBytes(): ReadonlyUint8Array;
11
+ export type ClaimStatus = {
12
+ discriminator: ReadonlyUint8Array;
13
+ /** Authority that claimed the tokens. */
14
+ claimant: Address;
15
+ /** Locked amount */
16
+ lockedAmount: bigint;
17
+ /** Locked amount withdrawn */
18
+ lockedAmountWithdrawn: bigint;
19
+ /** Unlocked amount */
20
+ unlockedAmount: bigint;
21
+ /** Unlocked amount claimed */
22
+ unlockedAmountClaimed: bigint;
23
+ /** indicate that whether admin can close this account, for testing purpose */
24
+ closable: boolean;
25
+ /** admin of merkle tree, store for for testing purpose */
26
+ distributor: Address;
27
+ };
28
+ export type ClaimStatusArgs = {
29
+ /** Authority that claimed the tokens. */
30
+ claimant: Address;
31
+ /** Locked amount */
32
+ lockedAmount: number | bigint;
33
+ /** Locked amount withdrawn */
34
+ lockedAmountWithdrawn: number | bigint;
35
+ /** Unlocked amount */
36
+ unlockedAmount: number | bigint;
37
+ /** Unlocked amount claimed */
38
+ unlockedAmountClaimed: number | bigint;
39
+ /** indicate that whether admin can close this account, for testing purpose */
40
+ closable: boolean;
41
+ /** admin of merkle tree, store for for testing purpose */
42
+ distributor: Address;
43
+ };
44
+ export declare function getClaimStatusEncoder(): Encoder<ClaimStatusArgs>;
45
+ export declare function getClaimStatusDecoder(): Decoder<ClaimStatus>;
46
+ export declare function getClaimStatusCodec(): Codec<ClaimStatusArgs, ClaimStatus>;
47
+ export declare function decodeClaimStatus<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<ClaimStatus, TAddress>;
48
+ export declare function decodeClaimStatus<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<ClaimStatus, TAddress>;
49
+ export declare function fetchClaimStatus<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<ClaimStatus, TAddress>>;
50
+ export declare function fetchMaybeClaimStatus<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<ClaimStatus, TAddress>>;
51
+ export declare function fetchAllClaimStatus(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<ClaimStatus>[]>;
52
+ export declare function fetchAllMaybeClaimStatus(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<ClaimStatus>[]>;
53
+ export declare function getClaimStatusSize(): number;
@@ -0,0 +1,65 @@
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
+ import { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBooleanDecoder, getBooleanEncoder, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, transformEncoder, } from '@solana/kit';
9
+ export const CLAIM_STATUS_DISCRIMINATOR = new Uint8Array([
10
+ 22, 183, 249, 157, 247, 95, 150, 96,
11
+ ]);
12
+ export function getClaimStatusDiscriminatorBytes() {
13
+ return fixEncoderSize(getBytesEncoder(), 8).encode(CLAIM_STATUS_DISCRIMINATOR);
14
+ }
15
+ export function getClaimStatusEncoder() {
16
+ return transformEncoder(getStructEncoder([
17
+ ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],
18
+ ['claimant', getAddressEncoder()],
19
+ ['lockedAmount', getU64Encoder()],
20
+ ['lockedAmountWithdrawn', getU64Encoder()],
21
+ ['unlockedAmount', getU64Encoder()],
22
+ ['unlockedAmountClaimed', getU64Encoder()],
23
+ ['closable', getBooleanEncoder()],
24
+ ['distributor', getAddressEncoder()],
25
+ ]), (value) => ({ ...value, discriminator: CLAIM_STATUS_DISCRIMINATOR }));
26
+ }
27
+ export function getClaimStatusDecoder() {
28
+ return getStructDecoder([
29
+ ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],
30
+ ['claimant', getAddressDecoder()],
31
+ ['lockedAmount', getU64Decoder()],
32
+ ['lockedAmountWithdrawn', getU64Decoder()],
33
+ ['unlockedAmount', getU64Decoder()],
34
+ ['unlockedAmountClaimed', getU64Decoder()],
35
+ ['closable', getBooleanDecoder()],
36
+ ['distributor', getAddressDecoder()],
37
+ ]);
38
+ }
39
+ export function getClaimStatusCodec() {
40
+ return combineCodec(getClaimStatusEncoder(), getClaimStatusDecoder());
41
+ }
42
+ export function decodeClaimStatus(encodedAccount) {
43
+ return decodeAccount(encodedAccount, getClaimStatusDecoder());
44
+ }
45
+ export async function fetchClaimStatus(rpc, address, config) {
46
+ const maybeAccount = await fetchMaybeClaimStatus(rpc, address, config);
47
+ assertAccountExists(maybeAccount);
48
+ return maybeAccount;
49
+ }
50
+ export async function fetchMaybeClaimStatus(rpc, address, config) {
51
+ const maybeAccount = await fetchEncodedAccount(rpc, address, config);
52
+ return decodeClaimStatus(maybeAccount);
53
+ }
54
+ export async function fetchAllClaimStatus(rpc, addresses, config) {
55
+ const maybeAccounts = await fetchAllMaybeClaimStatus(rpc, addresses, config);
56
+ assertAccountsExist(maybeAccounts);
57
+ return maybeAccounts;
58
+ }
59
+ export async function fetchAllMaybeClaimStatus(rpc, addresses, config) {
60
+ const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);
61
+ return maybeAccounts.map((maybeAccount) => decodeClaimStatus(maybeAccount));
62
+ }
63
+ export function getClaimStatusSize() {
64
+ return 105;
65
+ }
@@ -0,0 +1,9 @@
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
+ export * from './claimStatus';
9
+ export * from './merkleDistributor';
@@ -0,0 +1,9 @@
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
+ export * from './claimStatus';
9
+ export * from './merkleDistributor';
@@ -0,0 +1,109 @@
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
+ import { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type Codec, type Decoder, type EncodedAccount, type Encoder, type FetchAccountConfig, type FetchAccountsConfig, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit';
9
+ export declare const MERKLE_DISTRIBUTOR_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
10
+ export declare function getMerkleDistributorDiscriminatorBytes(): ReadonlyUint8Array;
11
+ export type MerkleDistributor = {
12
+ discriminator: ReadonlyUint8Array;
13
+ /** Bump seed. */
14
+ bump: number;
15
+ /** Version of the airdrop */
16
+ version: bigint;
17
+ /** The 256-bit merkle root. */
18
+ root: ReadonlyUint8Array;
19
+ /** [Mint] of the token to be distributed. */
20
+ mint: Address;
21
+ /** Token Address of the vault */
22
+ tokenVault: Address;
23
+ /** Maximum number of tokens that can ever be claimed from this [MerkleDistributor]. */
24
+ maxTotalClaim: bigint;
25
+ /** Maximum number of nodes in [MerkleDistributor]. */
26
+ maxNumNodes: bigint;
27
+ /** Total amount of tokens that have been claimed. */
28
+ totalAmountClaimed: bigint;
29
+ /** Total amount of tokens that have been forgone. */
30
+ totalAmountForgone: bigint;
31
+ /** Number of nodes that have been claimed. */
32
+ numNodesClaimed: bigint;
33
+ /** Lockup time start (Unix Timestamp) */
34
+ startTs: bigint;
35
+ /** Lockup time end (Unix Timestamp) */
36
+ endTs: bigint;
37
+ /** Clawback start (Unix Timestamp) */
38
+ clawbackStartTs: bigint;
39
+ /** Clawback receiver */
40
+ clawbackReceiver: Address;
41
+ /** Admin wallet */
42
+ admin: Address;
43
+ /** Whether or not the distributor has been clawed back */
44
+ clawedBack: boolean;
45
+ /** this merkle tree is enable from this slot */
46
+ enableSlot: bigint;
47
+ /** indicate that whether admin can close this pool, for testing purpose */
48
+ closable: boolean;
49
+ /** Buffer 0 */
50
+ buffer0: ReadonlyUint8Array;
51
+ /** Buffer 1 */
52
+ buffer1: ReadonlyUint8Array;
53
+ /** Buffer 2 */
54
+ buffer2: ReadonlyUint8Array;
55
+ };
56
+ export type MerkleDistributorArgs = {
57
+ /** Bump seed. */
58
+ bump: number;
59
+ /** Version of the airdrop */
60
+ version: number | bigint;
61
+ /** The 256-bit merkle root. */
62
+ root: ReadonlyUint8Array;
63
+ /** [Mint] of the token to be distributed. */
64
+ mint: Address;
65
+ /** Token Address of the vault */
66
+ tokenVault: Address;
67
+ /** Maximum number of tokens that can ever be claimed from this [MerkleDistributor]. */
68
+ maxTotalClaim: number | bigint;
69
+ /** Maximum number of nodes in [MerkleDistributor]. */
70
+ maxNumNodes: number | bigint;
71
+ /** Total amount of tokens that have been claimed. */
72
+ totalAmountClaimed: number | bigint;
73
+ /** Total amount of tokens that have been forgone. */
74
+ totalAmountForgone: number | bigint;
75
+ /** Number of nodes that have been claimed. */
76
+ numNodesClaimed: number | bigint;
77
+ /** Lockup time start (Unix Timestamp) */
78
+ startTs: number | bigint;
79
+ /** Lockup time end (Unix Timestamp) */
80
+ endTs: number | bigint;
81
+ /** Clawback start (Unix Timestamp) */
82
+ clawbackStartTs: number | bigint;
83
+ /** Clawback receiver */
84
+ clawbackReceiver: Address;
85
+ /** Admin wallet */
86
+ admin: Address;
87
+ /** Whether or not the distributor has been clawed back */
88
+ clawedBack: boolean;
89
+ /** this merkle tree is enable from this slot */
90
+ enableSlot: number | bigint;
91
+ /** indicate that whether admin can close this pool, for testing purpose */
92
+ closable: boolean;
93
+ /** Buffer 0 */
94
+ buffer0: ReadonlyUint8Array;
95
+ /** Buffer 1 */
96
+ buffer1: ReadonlyUint8Array;
97
+ /** Buffer 2 */
98
+ buffer2: ReadonlyUint8Array;
99
+ };
100
+ export declare function getMerkleDistributorEncoder(): Encoder<MerkleDistributorArgs>;
101
+ export declare function getMerkleDistributorDecoder(): Decoder<MerkleDistributor>;
102
+ export declare function getMerkleDistributorCodec(): Codec<MerkleDistributorArgs, MerkleDistributor>;
103
+ export declare function decodeMerkleDistributor<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<MerkleDistributor, TAddress>;
104
+ export declare function decodeMerkleDistributor<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<MerkleDistributor, TAddress>;
105
+ export declare function fetchMerkleDistributor<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<MerkleDistributor, TAddress>>;
106
+ export declare function fetchMaybeMerkleDistributor<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<MerkleDistributor, TAddress>>;
107
+ export declare function fetchAllMerkleDistributor(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<MerkleDistributor>[]>;
108
+ export declare function fetchAllMaybeMerkleDistributor(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<MerkleDistributor>[]>;
109
+ export declare function getMerkleDistributorSize(): number;
@@ -0,0 +1,93 @@
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
+ import { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBooleanDecoder, getBooleanEncoder, getBytesDecoder, getBytesEncoder, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder, } from '@solana/kit';
9
+ export const MERKLE_DISTRIBUTOR_DISCRIMINATOR = new Uint8Array([
10
+ 77, 119, 139, 70, 84, 247, 12, 26,
11
+ ]);
12
+ export function getMerkleDistributorDiscriminatorBytes() {
13
+ return fixEncoderSize(getBytesEncoder(), 8).encode(MERKLE_DISTRIBUTOR_DISCRIMINATOR);
14
+ }
15
+ export function getMerkleDistributorEncoder() {
16
+ return transformEncoder(getStructEncoder([
17
+ ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],
18
+ ['bump', getU8Encoder()],
19
+ ['version', getU64Encoder()],
20
+ ['root', fixEncoderSize(getBytesEncoder(), 32)],
21
+ ['mint', getAddressEncoder()],
22
+ ['tokenVault', getAddressEncoder()],
23
+ ['maxTotalClaim', getU64Encoder()],
24
+ ['maxNumNodes', getU64Encoder()],
25
+ ['totalAmountClaimed', getU64Encoder()],
26
+ ['totalAmountForgone', getU64Encoder()],
27
+ ['numNodesClaimed', getU64Encoder()],
28
+ ['startTs', getI64Encoder()],
29
+ ['endTs', getI64Encoder()],
30
+ ['clawbackStartTs', getI64Encoder()],
31
+ ['clawbackReceiver', getAddressEncoder()],
32
+ ['admin', getAddressEncoder()],
33
+ ['clawedBack', getBooleanEncoder()],
34
+ ['enableSlot', getU64Encoder()],
35
+ ['closable', getBooleanEncoder()],
36
+ ['buffer0', fixEncoderSize(getBytesEncoder(), 32)],
37
+ ['buffer1', fixEncoderSize(getBytesEncoder(), 32)],
38
+ ['buffer2', fixEncoderSize(getBytesEncoder(), 32)],
39
+ ]), (value) => ({ ...value, discriminator: MERKLE_DISTRIBUTOR_DISCRIMINATOR }));
40
+ }
41
+ export function getMerkleDistributorDecoder() {
42
+ return getStructDecoder([
43
+ ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],
44
+ ['bump', getU8Decoder()],
45
+ ['version', getU64Decoder()],
46
+ ['root', fixDecoderSize(getBytesDecoder(), 32)],
47
+ ['mint', getAddressDecoder()],
48
+ ['tokenVault', getAddressDecoder()],
49
+ ['maxTotalClaim', getU64Decoder()],
50
+ ['maxNumNodes', getU64Decoder()],
51
+ ['totalAmountClaimed', getU64Decoder()],
52
+ ['totalAmountForgone', getU64Decoder()],
53
+ ['numNodesClaimed', getU64Decoder()],
54
+ ['startTs', getI64Decoder()],
55
+ ['endTs', getI64Decoder()],
56
+ ['clawbackStartTs', getI64Decoder()],
57
+ ['clawbackReceiver', getAddressDecoder()],
58
+ ['admin', getAddressDecoder()],
59
+ ['clawedBack', getBooleanDecoder()],
60
+ ['enableSlot', getU64Decoder()],
61
+ ['closable', getBooleanDecoder()],
62
+ ['buffer0', fixDecoderSize(getBytesDecoder(), 32)],
63
+ ['buffer1', fixDecoderSize(getBytesDecoder(), 32)],
64
+ ['buffer2', fixDecoderSize(getBytesDecoder(), 32)],
65
+ ]);
66
+ }
67
+ export function getMerkleDistributorCodec() {
68
+ return combineCodec(getMerkleDistributorEncoder(), getMerkleDistributorDecoder());
69
+ }
70
+ export function decodeMerkleDistributor(encodedAccount) {
71
+ return decodeAccount(encodedAccount, getMerkleDistributorDecoder());
72
+ }
73
+ export async function fetchMerkleDistributor(rpc, address, config) {
74
+ const maybeAccount = await fetchMaybeMerkleDistributor(rpc, address, config);
75
+ assertAccountExists(maybeAccount);
76
+ return maybeAccount;
77
+ }
78
+ export async function fetchMaybeMerkleDistributor(rpc, address, config) {
79
+ const maybeAccount = await fetchEncodedAccount(rpc, address, config);
80
+ return decodeMerkleDistributor(maybeAccount);
81
+ }
82
+ export async function fetchAllMerkleDistributor(rpc, addresses, config) {
83
+ const maybeAccounts = await fetchAllMaybeMerkleDistributor(rpc, addresses, config);
84
+ assertAccountsExist(maybeAccounts);
85
+ return maybeAccounts;
86
+ }
87
+ export async function fetchAllMaybeMerkleDistributor(rpc, addresses, config) {
88
+ const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);
89
+ return maybeAccounts.map((maybeAccount) => decodeMerkleDistributor(maybeAccount));
90
+ }
91
+ export function getMerkleDistributorSize() {
92
+ return 347;
93
+ }
@@ -0,0 +1,8 @@
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
+ export * from './merkleDistributor';
@@ -0,0 +1,8 @@
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
+ export * from './merkleDistributor';
@@ -0,0 +1,63 @@
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
+ import { type Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from '@solana/kit';
9
+ /** InsufficientUnlockedTokens: Insufficient unlocked tokens */
10
+ export declare const MERKLE_DISTRIBUTOR_ERROR__INSUFFICIENT_UNLOCKED_TOKENS = 6000;
11
+ /** StartTooFarInFuture: Deposit Start too far in future */
12
+ export declare const MERKLE_DISTRIBUTOR_ERROR__START_TOO_FAR_IN_FUTURE = 6001;
13
+ /** InvalidProof: Invalid Merkle proof. */
14
+ export declare const MERKLE_DISTRIBUTOR_ERROR__INVALID_PROOF = 6002;
15
+ /** ExceededMaxClaim: Exceeded maximum claim amount */
16
+ export declare const MERKLE_DISTRIBUTOR_ERROR__EXCEEDED_MAX_CLAIM = 6003;
17
+ /** MaxNodesExceeded: Exceeded maximum node count */
18
+ export declare const MERKLE_DISTRIBUTOR_ERROR__MAX_NODES_EXCEEDED = 6004;
19
+ /** Unauthorized: Account is not authorized to execute this instruction */
20
+ export declare const MERKLE_DISTRIBUTOR_ERROR__UNAUTHORIZED = 6005;
21
+ /** OwnerMismatch: Token account owner did not match intended owner */
22
+ export declare const MERKLE_DISTRIBUTOR_ERROR__OWNER_MISMATCH = 6006;
23
+ /** ClawbackDuringVesting: Clawback cannot be before vesting ends */
24
+ export declare const MERKLE_DISTRIBUTOR_ERROR__CLAWBACK_DURING_VESTING = 6007;
25
+ /** ClawbackBeforeStart: Attempted clawback before start */
26
+ export declare const MERKLE_DISTRIBUTOR_ERROR__CLAWBACK_BEFORE_START = 6008;
27
+ /** ClawbackAlreadyClaimed: Clawback already claimed */
28
+ export declare const MERKLE_DISTRIBUTOR_ERROR__CLAWBACK_ALREADY_CLAIMED = 6009;
29
+ /** InsufficientClawbackDelay: Clawback start must be at least one day after vesting end */
30
+ export declare const MERKLE_DISTRIBUTOR_ERROR__INSUFFICIENT_CLAWBACK_DELAY = 6010;
31
+ /** SameClawbackReceiver: New and old Clawback receivers are identical */
32
+ export declare const MERKLE_DISTRIBUTOR_ERROR__SAME_CLAWBACK_RECEIVER = 6011;
33
+ /** SameAdmin: New and old admin are identical */
34
+ export declare const MERKLE_DISTRIBUTOR_ERROR__SAME_ADMIN = 6012;
35
+ /** ClaimExpired: Claim window expired */
36
+ export declare const MERKLE_DISTRIBUTOR_ERROR__CLAIM_EXPIRED = 6013;
37
+ /** ArithmeticError: Arithmetic Error (overflow/underflow) */
38
+ export declare const MERKLE_DISTRIBUTOR_ERROR__ARITHMETIC_ERROR = 6014;
39
+ /** StartTimestampAfterEnd: Start Timestamp cannot be after end Timestamp */
40
+ export declare const MERKLE_DISTRIBUTOR_ERROR__START_TIMESTAMP_AFTER_END = 6015;
41
+ /** TimestampsNotInFuture: Timestamps cannot be in the past */
42
+ export declare const MERKLE_DISTRIBUTOR_ERROR__TIMESTAMPS_NOT_IN_FUTURE = 6016;
43
+ /** InvalidVersion: Airdrop Version Mismatch */
44
+ export declare const MERKLE_DISTRIBUTOR_ERROR__INVALID_VERSION = 6017;
45
+ /** ClaimingIsNotStarted: Claiming is not started */
46
+ export declare const MERKLE_DISTRIBUTOR_ERROR__CLAIMING_IS_NOT_STARTED = 6018;
47
+ /** CannotCloseDistributor: Cannot close distributor */
48
+ export declare const MERKLE_DISTRIBUTOR_ERROR__CANNOT_CLOSE_DISTRIBUTOR = 6019;
49
+ /** CannotCloseClaimStatus: Cannot close claim status */
50
+ export declare const MERKLE_DISTRIBUTOR_ERROR__CANNOT_CLOSE_CLAIM_STATUS = 6020;
51
+ /** InvalidVote: Can only claim to vote address */
52
+ export declare const MERKLE_DISTRIBUTOR_ERROR__INVALID_VOTE = 6021;
53
+ export type MerkleDistributorError = typeof MERKLE_DISTRIBUTOR_ERROR__ARITHMETIC_ERROR | typeof MERKLE_DISTRIBUTOR_ERROR__CANNOT_CLOSE_CLAIM_STATUS | typeof MERKLE_DISTRIBUTOR_ERROR__CANNOT_CLOSE_DISTRIBUTOR | typeof MERKLE_DISTRIBUTOR_ERROR__CLAIM_EXPIRED | typeof MERKLE_DISTRIBUTOR_ERROR__CLAIMING_IS_NOT_STARTED | typeof MERKLE_DISTRIBUTOR_ERROR__CLAWBACK_ALREADY_CLAIMED | typeof MERKLE_DISTRIBUTOR_ERROR__CLAWBACK_BEFORE_START | typeof MERKLE_DISTRIBUTOR_ERROR__CLAWBACK_DURING_VESTING | typeof MERKLE_DISTRIBUTOR_ERROR__EXCEEDED_MAX_CLAIM | typeof MERKLE_DISTRIBUTOR_ERROR__INSUFFICIENT_CLAWBACK_DELAY | typeof MERKLE_DISTRIBUTOR_ERROR__INSUFFICIENT_UNLOCKED_TOKENS | typeof MERKLE_DISTRIBUTOR_ERROR__INVALID_PROOF | typeof MERKLE_DISTRIBUTOR_ERROR__INVALID_VERSION | typeof MERKLE_DISTRIBUTOR_ERROR__INVALID_VOTE | typeof MERKLE_DISTRIBUTOR_ERROR__MAX_NODES_EXCEEDED | typeof MERKLE_DISTRIBUTOR_ERROR__OWNER_MISMATCH | typeof MERKLE_DISTRIBUTOR_ERROR__SAME_ADMIN | typeof MERKLE_DISTRIBUTOR_ERROR__SAME_CLAWBACK_RECEIVER | typeof MERKLE_DISTRIBUTOR_ERROR__START_TIMESTAMP_AFTER_END | typeof MERKLE_DISTRIBUTOR_ERROR__START_TOO_FAR_IN_FUTURE | typeof MERKLE_DISTRIBUTOR_ERROR__TIMESTAMPS_NOT_IN_FUTURE | typeof MERKLE_DISTRIBUTOR_ERROR__UNAUTHORIZED;
54
+ export declare function getMerkleDistributorErrorMessage(code: MerkleDistributorError): string;
55
+ export declare function isMerkleDistributorError<TProgramErrorCode extends MerkleDistributorError>(error: unknown, transactionMessage: {
56
+ instructions: Record<number, {
57
+ programAddress: Address;
58
+ }>;
59
+ }, code?: TProgramErrorCode): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> & Readonly<{
60
+ context: Readonly<{
61
+ code: TProgramErrorCode;
62
+ }>;
63
+ }>;
@@ -0,0 +1,89 @@
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
+ import { isProgramError, } from '@solana/kit';
9
+ import { MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS } from '../programs';
10
+ /** InsufficientUnlockedTokens: Insufficient unlocked tokens */
11
+ export const MERKLE_DISTRIBUTOR_ERROR__INSUFFICIENT_UNLOCKED_TOKENS = 0x1770; // 6000
12
+ /** StartTooFarInFuture: Deposit Start too far in future */
13
+ export const MERKLE_DISTRIBUTOR_ERROR__START_TOO_FAR_IN_FUTURE = 0x1771; // 6001
14
+ /** InvalidProof: Invalid Merkle proof. */
15
+ export const MERKLE_DISTRIBUTOR_ERROR__INVALID_PROOF = 0x1772; // 6002
16
+ /** ExceededMaxClaim: Exceeded maximum claim amount */
17
+ export const MERKLE_DISTRIBUTOR_ERROR__EXCEEDED_MAX_CLAIM = 0x1773; // 6003
18
+ /** MaxNodesExceeded: Exceeded maximum node count */
19
+ export const MERKLE_DISTRIBUTOR_ERROR__MAX_NODES_EXCEEDED = 0x1774; // 6004
20
+ /** Unauthorized: Account is not authorized to execute this instruction */
21
+ export const MERKLE_DISTRIBUTOR_ERROR__UNAUTHORIZED = 0x1775; // 6005
22
+ /** OwnerMismatch: Token account owner did not match intended owner */
23
+ export const MERKLE_DISTRIBUTOR_ERROR__OWNER_MISMATCH = 0x1776; // 6006
24
+ /** ClawbackDuringVesting: Clawback cannot be before vesting ends */
25
+ export const MERKLE_DISTRIBUTOR_ERROR__CLAWBACK_DURING_VESTING = 0x1777; // 6007
26
+ /** ClawbackBeforeStart: Attempted clawback before start */
27
+ export const MERKLE_DISTRIBUTOR_ERROR__CLAWBACK_BEFORE_START = 0x1778; // 6008
28
+ /** ClawbackAlreadyClaimed: Clawback already claimed */
29
+ export const MERKLE_DISTRIBUTOR_ERROR__CLAWBACK_ALREADY_CLAIMED = 0x1779; // 6009
30
+ /** InsufficientClawbackDelay: Clawback start must be at least one day after vesting end */
31
+ export const MERKLE_DISTRIBUTOR_ERROR__INSUFFICIENT_CLAWBACK_DELAY = 0x177a; // 6010
32
+ /** SameClawbackReceiver: New and old Clawback receivers are identical */
33
+ export const MERKLE_DISTRIBUTOR_ERROR__SAME_CLAWBACK_RECEIVER = 0x177b; // 6011
34
+ /** SameAdmin: New and old admin are identical */
35
+ export const MERKLE_DISTRIBUTOR_ERROR__SAME_ADMIN = 0x177c; // 6012
36
+ /** ClaimExpired: Claim window expired */
37
+ export const MERKLE_DISTRIBUTOR_ERROR__CLAIM_EXPIRED = 0x177d; // 6013
38
+ /** ArithmeticError: Arithmetic Error (overflow/underflow) */
39
+ export const MERKLE_DISTRIBUTOR_ERROR__ARITHMETIC_ERROR = 0x177e; // 6014
40
+ /** StartTimestampAfterEnd: Start Timestamp cannot be after end Timestamp */
41
+ export const MERKLE_DISTRIBUTOR_ERROR__START_TIMESTAMP_AFTER_END = 0x177f; // 6015
42
+ /** TimestampsNotInFuture: Timestamps cannot be in the past */
43
+ export const MERKLE_DISTRIBUTOR_ERROR__TIMESTAMPS_NOT_IN_FUTURE = 0x1780; // 6016
44
+ /** InvalidVersion: Airdrop Version Mismatch */
45
+ export const MERKLE_DISTRIBUTOR_ERROR__INVALID_VERSION = 0x1781; // 6017
46
+ /** ClaimingIsNotStarted: Claiming is not started */
47
+ export const MERKLE_DISTRIBUTOR_ERROR__CLAIMING_IS_NOT_STARTED = 0x1782; // 6018
48
+ /** CannotCloseDistributor: Cannot close distributor */
49
+ export const MERKLE_DISTRIBUTOR_ERROR__CANNOT_CLOSE_DISTRIBUTOR = 0x1783; // 6019
50
+ /** CannotCloseClaimStatus: Cannot close claim status */
51
+ export const MERKLE_DISTRIBUTOR_ERROR__CANNOT_CLOSE_CLAIM_STATUS = 0x1784; // 6020
52
+ /** InvalidVote: Can only claim to vote address */
53
+ export const MERKLE_DISTRIBUTOR_ERROR__INVALID_VOTE = 0x1785; // 6021
54
+ let merkleDistributorErrorMessages;
55
+ if (process.env.NODE_ENV !== 'production') {
56
+ merkleDistributorErrorMessages = {
57
+ [MERKLE_DISTRIBUTOR_ERROR__ARITHMETIC_ERROR]: `Arithmetic Error (overflow/underflow)`,
58
+ [MERKLE_DISTRIBUTOR_ERROR__CANNOT_CLOSE_CLAIM_STATUS]: `Cannot close claim status`,
59
+ [MERKLE_DISTRIBUTOR_ERROR__CANNOT_CLOSE_DISTRIBUTOR]: `Cannot close distributor`,
60
+ [MERKLE_DISTRIBUTOR_ERROR__CLAIM_EXPIRED]: `Claim window expired`,
61
+ [MERKLE_DISTRIBUTOR_ERROR__CLAIMING_IS_NOT_STARTED]: `Claiming is not started`,
62
+ [MERKLE_DISTRIBUTOR_ERROR__CLAWBACK_ALREADY_CLAIMED]: `Clawback already claimed`,
63
+ [MERKLE_DISTRIBUTOR_ERROR__CLAWBACK_BEFORE_START]: `Attempted clawback before start`,
64
+ [MERKLE_DISTRIBUTOR_ERROR__CLAWBACK_DURING_VESTING]: `Clawback cannot be before vesting ends`,
65
+ [MERKLE_DISTRIBUTOR_ERROR__EXCEEDED_MAX_CLAIM]: `Exceeded maximum claim amount`,
66
+ [MERKLE_DISTRIBUTOR_ERROR__INSUFFICIENT_CLAWBACK_DELAY]: `Clawback start must be at least one day after vesting end`,
67
+ [MERKLE_DISTRIBUTOR_ERROR__INSUFFICIENT_UNLOCKED_TOKENS]: `Insufficient unlocked tokens`,
68
+ [MERKLE_DISTRIBUTOR_ERROR__INVALID_PROOF]: `Invalid Merkle proof.`,
69
+ [MERKLE_DISTRIBUTOR_ERROR__INVALID_VERSION]: `Airdrop Version Mismatch`,
70
+ [MERKLE_DISTRIBUTOR_ERROR__INVALID_VOTE]: `Can only claim to vote address`,
71
+ [MERKLE_DISTRIBUTOR_ERROR__MAX_NODES_EXCEEDED]: `Exceeded maximum node count`,
72
+ [MERKLE_DISTRIBUTOR_ERROR__OWNER_MISMATCH]: `Token account owner did not match intended owner`,
73
+ [MERKLE_DISTRIBUTOR_ERROR__SAME_ADMIN]: `New and old admin are identical`,
74
+ [MERKLE_DISTRIBUTOR_ERROR__SAME_CLAWBACK_RECEIVER]: `New and old Clawback receivers are identical`,
75
+ [MERKLE_DISTRIBUTOR_ERROR__START_TIMESTAMP_AFTER_END]: `Start Timestamp cannot be after end Timestamp`,
76
+ [MERKLE_DISTRIBUTOR_ERROR__START_TOO_FAR_IN_FUTURE]: `Deposit Start too far in future`,
77
+ [MERKLE_DISTRIBUTOR_ERROR__TIMESTAMPS_NOT_IN_FUTURE]: `Timestamps cannot be in the past`,
78
+ [MERKLE_DISTRIBUTOR_ERROR__UNAUTHORIZED]: `Account is not authorized to execute this instruction`,
79
+ };
80
+ }
81
+ export function getMerkleDistributorErrorMessage(code) {
82
+ if (process.env.NODE_ENV !== 'production') {
83
+ return merkleDistributorErrorMessages[code];
84
+ }
85
+ return 'Error message not available in production bundles.';
86
+ }
87
+ export function isMerkleDistributorError(error, transactionMessage, code) {
88
+ return isProgramError(error, transactionMessage, MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS, code);
89
+ }
@@ -0,0 +1,11 @@
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
+ export * from './accounts';
9
+ export * from './errors';
10
+ export * from './instructions';
11
+ export * from './programs';
@@ -0,0 +1,11 @@
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
+ export * from './accounts';
9
+ export * from './errors';
10
+ export * from './instructions';
11
+ export * from './programs';
@@ -0,0 +1,69 @@
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
+ import { type Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IAccountSignerMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/kit';
9
+ import { MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS } from '../programs';
10
+ export declare const CLAIM_LOCKED_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
11
+ export declare function getClaimLockedDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type ClaimLockedInstruction<TProgram extends string = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS, TAccountDistributor extends string | IAccountMeta<string> = string, TAccountClaimStatus extends string | IAccountMeta<string> = string, TAccountFrom extends string | IAccountMeta<string> = string, TAccountTo extends string | IAccountMeta<string> = string, TAccountClaimant extends string | IAccountMeta<string> = string, TAccountTokenProgram extends string | IAccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[
13
+ TAccountDistributor extends string ? WritableAccount<TAccountDistributor> : TAccountDistributor,
14
+ TAccountClaimStatus extends string ? WritableAccount<TAccountClaimStatus> : TAccountClaimStatus,
15
+ TAccountFrom extends string ? WritableAccount<TAccountFrom> : TAccountFrom,
16
+ TAccountTo extends string ? WritableAccount<TAccountTo> : TAccountTo,
17
+ TAccountClaimant extends string ? WritableSignerAccount<TAccountClaimant> & IAccountSignerMeta<TAccountClaimant> : TAccountClaimant,
18
+ TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
19
+ ...TRemainingAccounts
20
+ ]>;
21
+ export type ClaimLockedInstructionData = {
22
+ discriminator: ReadonlyUint8Array;
23
+ };
24
+ export type ClaimLockedInstructionDataArgs = {};
25
+ export declare function getClaimLockedInstructionDataEncoder(): Encoder<ClaimLockedInstructionDataArgs>;
26
+ export declare function getClaimLockedInstructionDataDecoder(): Decoder<ClaimLockedInstructionData>;
27
+ export declare function getClaimLockedInstructionDataCodec(): Codec<ClaimLockedInstructionDataArgs, ClaimLockedInstructionData>;
28
+ export type ClaimLockedInput<TAccountDistributor extends string = string, TAccountClaimStatus extends string = string, TAccountFrom extends string = string, TAccountTo extends string = string, TAccountClaimant extends string = string, TAccountTokenProgram extends string = string> = {
29
+ /** The [MerkleDistributor]. */
30
+ distributor: Address<TAccountDistributor>;
31
+ /** Claim Status PDA */
32
+ claimStatus: Address<TAccountClaimStatus>;
33
+ /** Distributor ATA containing the tokens to distribute. */
34
+ from: Address<TAccountFrom>;
35
+ /**
36
+ * Account to send the claimed tokens to.
37
+ * Claimant must sign the transaction and can only claim on behalf of themself
38
+ */
39
+ to: Address<TAccountTo>;
40
+ /** Who is claiming the tokens. */
41
+ claimant: TransactionSigner<TAccountClaimant>;
42
+ /** SPL [Token] program. */
43
+ tokenProgram?: Address<TAccountTokenProgram>;
44
+ };
45
+ export declare function getClaimLockedInstruction<TAccountDistributor extends string, TAccountClaimStatus extends string, TAccountFrom extends string, TAccountTo extends string, TAccountClaimant extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS>(input: ClaimLockedInput<TAccountDistributor, TAccountClaimStatus, TAccountFrom, TAccountTo, TAccountClaimant, TAccountTokenProgram>, config?: {
46
+ programAddress?: TProgramAddress;
47
+ }): ClaimLockedInstruction<TProgramAddress, TAccountDistributor, TAccountClaimStatus, TAccountFrom, TAccountTo, TAccountClaimant, TAccountTokenProgram>;
48
+ export type ParsedClaimLockedInstruction<TProgram extends string = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = {
49
+ programAddress: Address<TProgram>;
50
+ accounts: {
51
+ /** The [MerkleDistributor]. */
52
+ distributor: TAccountMetas[0];
53
+ /** Claim Status PDA */
54
+ claimStatus: TAccountMetas[1];
55
+ /** Distributor ATA containing the tokens to distribute. */
56
+ from: TAccountMetas[2];
57
+ /**
58
+ * Account to send the claimed tokens to.
59
+ * Claimant must sign the transaction and can only claim on behalf of themself
60
+ */
61
+ to: TAccountMetas[3];
62
+ /** Who is claiming the tokens. */
63
+ claimant: TAccountMetas[4];
64
+ /** SPL [Token] program. */
65
+ tokenProgram: TAccountMetas[5];
66
+ };
67
+ data: ClaimLockedInstructionData;
68
+ };
69
+ export declare function parseClaimLockedInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedClaimLockedInstruction<TProgram, TAccountMetas>;