@nosana/kit 2.0.62 → 2.0.66
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/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/services/programs/jobs/JobsProgram.d.ts +1 -1
- package/dist/services/programs/jobs/JobsProgram.js +1 -1
- package/dist/services/programs/jobs/JobsProgram.js.map +1 -1
- package/dist/services/programs/jobs/instructions/assign.d.ts +1 -1
- package/dist/services/programs/jobs/instructions/close.d.ts +1 -1
- package/dist/services/programs/jobs/instructions/complete.d.ts +1 -1
- package/dist/services/programs/jobs/instructions/delist.d.ts +1 -1
- package/dist/services/programs/jobs/instructions/end.d.ts +1 -1
- package/dist/services/programs/jobs/instructions/extend.d.ts +1 -1
- package/dist/services/programs/jobs/instructions/finish.d.ts +1 -1
- package/dist/services/programs/jobs/instructions/list.d.ts +1 -1
- package/dist/services/programs/jobs/instructions/open.d.ts +1 -1
- package/dist/services/programs/jobs/instructions/quit.d.ts +1 -1
- package/dist/services/programs/jobs/instructions/stop.d.ts +1 -1
- package/dist/services/programs/jobs/instructions/types.d.ts +1 -1
- package/dist/services/programs/jobs/instructions/work.d.ts +1 -1
- package/dist/services/programs/jobs/monitor/monitor.d.ts +1 -1
- package/dist/services/programs/merkleDistributor/MerkleDistributorProgram.d.ts +1 -1
- package/dist/services/programs/merkleDistributor/MerkleDistributorProgram.js +1 -1
- package/dist/services/programs/merkleDistributor/MerkleDistributorProgram.js.map +1 -1
- package/dist/services/programs/stake/StakeProgram.d.ts +1 -1
- package/dist/services/programs/stake/StakeProgram.js +1 -1
- package/dist/services/programs/stake/StakeProgram.js.map +1 -1
- package/package.json +22 -26
- package/README.md +0 -1692
- package/dist/generated_clients/jobs/accounts/index.d.ts +0 -10
- package/dist/generated_clients/jobs/accounts/index.js +0 -11
- package/dist/generated_clients/jobs/accounts/index.js.map +0 -1
- package/dist/generated_clients/jobs/accounts/jobAccount.d.ts +0 -51
- package/dist/generated_clients/jobs/accounts/jobAccount.js +0 -77
- package/dist/generated_clients/jobs/accounts/jobAccount.js.map +0 -1
- package/dist/generated_clients/jobs/accounts/marketAccount.d.ts +0 -50
- package/dist/generated_clients/jobs/accounts/marketAccount.js +0 -74
- package/dist/generated_clients/jobs/accounts/marketAccount.js.map +0 -1
- package/dist/generated_clients/jobs/accounts/runAccount.d.ts +0 -39
- package/dist/generated_clients/jobs/accounts/runAccount.js +0 -65
- package/dist/generated_clients/jobs/accounts/runAccount.js.map +0 -1
- package/dist/generated_clients/jobs/errors/index.d.ts +0 -8
- package/dist/generated_clients/jobs/errors/index.js +0 -9
- package/dist/generated_clients/jobs/errors/index.js.map +0 -1
- package/dist/generated_clients/jobs/errors/nosanaJobs.d.ts +0 -57
- package/dist/generated_clients/jobs/errors/nosanaJobs.js +0 -81
- package/dist/generated_clients/jobs/errors/nosanaJobs.js.map +0 -1
- package/dist/generated_clients/jobs/index.d.ts +0 -12
- package/dist/generated_clients/jobs/index.js +0 -13
- package/dist/generated_clients/jobs/index.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/assign.d.ts +0 -95
- package/dist/generated_clients/jobs/instructions/assign.js +0 -135
- package/dist/generated_clients/jobs/instructions/assign.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/claim.d.ts +0 -72
- package/dist/generated_clients/jobs/instructions/claim.js +0 -104
- package/dist/generated_clients/jobs/instructions/claim.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/clean.d.ts +0 -48
- package/dist/generated_clients/jobs/instructions/clean.js +0 -75
- package/dist/generated_clients/jobs/instructions/clean.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/cleanAdmin.d.ts +0 -48
- package/dist/generated_clients/jobs/instructions/cleanAdmin.js +0 -75
- package/dist/generated_clients/jobs/instructions/cleanAdmin.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/close.d.ts +0 -56
- package/dist/generated_clients/jobs/instructions/close.js +0 -88
- package/dist/generated_clients/jobs/instructions/close.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/closeAdmin.d.ts +0 -56
- package/dist/generated_clients/jobs/instructions/closeAdmin.js +0 -88
- package/dist/generated_clients/jobs/instructions/closeAdmin.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/complete.d.ts +0 -48
- package/dist/generated_clients/jobs/instructions/complete.js +0 -74
- package/dist/generated_clients/jobs/instructions/complete.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/delist.d.ts +0 -64
- package/dist/generated_clients/jobs/instructions/delist.js +0 -96
- package/dist/generated_clients/jobs/instructions/delist.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/end.d.ts +0 -72
- package/dist/generated_clients/jobs/instructions/end.js +0 -104
- package/dist/generated_clients/jobs/instructions/end.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/extend.d.ts +0 -80
- package/dist/generated_clients/jobs/instructions/extend.js +0 -117
- package/dist/generated_clients/jobs/instructions/extend.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/finish.d.ts +0 -80
- package/dist/generated_clients/jobs/instructions/finish.js +0 -114
- package/dist/generated_clients/jobs/instructions/finish.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/index.d.ts +0 -26
- package/dist/generated_clients/jobs/instructions/index.js +0 -27
- package/dist/generated_clients/jobs/instructions/index.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/list.d.ts +0 -91
- package/dist/generated_clients/jobs/instructions/list.js +0 -131
- package/dist/generated_clients/jobs/instructions/list.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/open.d.ts +0 -84
- package/dist/generated_clients/jobs/instructions/open.js +0 -122
- package/dist/generated_clients/jobs/instructions/open.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/quit.d.ts +0 -52
- package/dist/generated_clients/jobs/instructions/quit.js +0 -79
- package/dist/generated_clients/jobs/instructions/quit.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/quitAdmin.d.ts +0 -48
- package/dist/generated_clients/jobs/instructions/quitAdmin.js +0 -75
- package/dist/generated_clients/jobs/instructions/quitAdmin.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/recover.d.ts +0 -64
- package/dist/generated_clients/jobs/instructions/recover.js +0 -96
- package/dist/generated_clients/jobs/instructions/recover.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/stop.d.ts +0 -48
- package/dist/generated_clients/jobs/instructions/stop.js +0 -75
- package/dist/generated_clients/jobs/instructions/stop.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/update.d.ts +0 -64
- package/dist/generated_clients/jobs/instructions/update.js +0 -89
- package/dist/generated_clients/jobs/instructions/update.js.map +0 -1
- package/dist/generated_clients/jobs/instructions/work.d.ts +0 -68
- package/dist/generated_clients/jobs/instructions/work.js +0 -100
- package/dist/generated_clients/jobs/instructions/work.js.map +0 -1
- package/dist/generated_clients/jobs/programs/index.d.ts +0 -8
- package/dist/generated_clients/jobs/programs/index.js +0 -9
- package/dist/generated_clients/jobs/programs/index.js.map +0 -1
- package/dist/generated_clients/jobs/programs/nosanaJobs.d.ts +0 -83
- package/dist/generated_clients/jobs/programs/nosanaJobs.js +0 -110
- package/dist/generated_clients/jobs/programs/nosanaJobs.js.map +0 -1
- package/dist/generated_clients/jobs/shared/index.d.ts +0 -49
- package/dist/generated_clients/jobs/shared/index.js +0 -87
- package/dist/generated_clients/jobs/shared/index.js.map +0 -1
- package/dist/generated_clients/jobs/types/index.d.ts +0 -10
- package/dist/generated_clients/jobs/types/index.js +0 -11
- package/dist/generated_clients/jobs/types/index.js.map +0 -1
- package/dist/generated_clients/jobs/types/jobState.d.ts +0 -19
- package/dist/generated_clients/jobs/types/jobState.js +0 -24
- package/dist/generated_clients/jobs/types/jobState.js.map +0 -1
- package/dist/generated_clients/jobs/types/jobType.d.ts +0 -22
- package/dist/generated_clients/jobs/types/jobType.js +0 -27
- package/dist/generated_clients/jobs/types/jobType.js.map +0 -1
- package/dist/generated_clients/jobs/types/queueType.d.ts +0 -19
- package/dist/generated_clients/jobs/types/queueType.js +0 -24
- package/dist/generated_clients/jobs/types/queueType.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/accounts/claimStatus.d.ts +0 -57
- package/dist/generated_clients/merkle_distributor/accounts/claimStatus.js +0 -69
- package/dist/generated_clients/merkle_distributor/accounts/claimStatus.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/accounts/index.d.ts +0 -9
- package/dist/generated_clients/merkle_distributor/accounts/index.js +0 -10
- package/dist/generated_clients/merkle_distributor/accounts/index.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/accounts/merkleDistributor.d.ts +0 -113
- package/dist/generated_clients/merkle_distributor/accounts/merkleDistributor.js +0 -97
- package/dist/generated_clients/merkle_distributor/accounts/merkleDistributor.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/errors/index.d.ts +0 -8
- package/dist/generated_clients/merkle_distributor/errors/index.js +0 -9
- package/dist/generated_clients/merkle_distributor/errors/index.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/errors/merkleDistributor.d.ts +0 -63
- package/dist/generated_clients/merkle_distributor/errors/merkleDistributor.js +0 -90
- package/dist/generated_clients/merkle_distributor/errors/merkleDistributor.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/index.d.ts +0 -11
- package/dist/generated_clients/merkle_distributor/index.js +0 -12
- package/dist/generated_clients/merkle_distributor/index.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/instructions/claimLocked.d.ts +0 -78
- package/dist/generated_clients/merkle_distributor/instructions/claimLocked.js +0 -92
- package/dist/generated_clients/merkle_distributor/instructions/claimLocked.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/instructions/clawback.d.ts +0 -78
- package/dist/generated_clients/merkle_distributor/instructions/clawback.js +0 -96
- package/dist/generated_clients/merkle_distributor/instructions/clawback.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/instructions/closeClaimStatus.d.ts +0 -52
- package/dist/generated_clients/merkle_distributor/instructions/closeClaimStatus.js +0 -79
- package/dist/generated_clients/merkle_distributor/instructions/closeClaimStatus.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/instructions/closeDistributor.d.ts +0 -72
- package/dist/generated_clients/merkle_distributor/instructions/closeDistributor.js +0 -91
- package/dist/generated_clients/merkle_distributor/instructions/closeDistributor.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/instructions/index.d.ts +0 -16
- package/dist/generated_clients/merkle_distributor/instructions/index.js +0 -17
- package/dist/generated_clients/merkle_distributor/instructions/index.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/instructions/newClaim.d.ts +0 -88
- package/dist/generated_clients/merkle_distributor/instructions/newClaim.js +0 -110
- package/dist/generated_clients/merkle_distributor/instructions/newClaim.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/instructions/newDistributor.d.ts +0 -124
- package/dist/generated_clients/merkle_distributor/instructions/newDistributor.js +0 -132
- package/dist/generated_clients/merkle_distributor/instructions/newDistributor.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/instructions/setAdmin.d.ts +0 -54
- package/dist/generated_clients/merkle_distributor/instructions/setAdmin.js +0 -75
- package/dist/generated_clients/merkle_distributor/instructions/setAdmin.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/instructions/setClawbackReceiver.d.ts +0 -54
- package/dist/generated_clients/merkle_distributor/instructions/setClawbackReceiver.js +0 -81
- package/dist/generated_clients/merkle_distributor/instructions/setClawbackReceiver.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/instructions/setEnableSlot.d.ts +0 -52
- package/dist/generated_clients/merkle_distributor/instructions/setEnableSlot.js +0 -74
- package/dist/generated_clients/merkle_distributor/instructions/setEnableSlot.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/programs/index.d.ts +0 -8
- package/dist/generated_clients/merkle_distributor/programs/index.js +0 -9
- package/dist/generated_clients/merkle_distributor/programs/index.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/programs/merkleDistributor.d.ts +0 -52
- package/dist/generated_clients/merkle_distributor/programs/merkleDistributor.js +0 -66
- package/dist/generated_clients/merkle_distributor/programs/merkleDistributor.js.map +0 -1
- package/dist/generated_clients/merkle_distributor/shared/index.d.ts +0 -49
- package/dist/generated_clients/merkle_distributor/shared/index.js +0 -87
- package/dist/generated_clients/merkle_distributor/shared/index.js.map +0 -1
- package/dist/generated_clients/staking/accounts/index.d.ts +0 -9
- package/dist/generated_clients/staking/accounts/index.js +0 -10
- package/dist/generated_clients/staking/accounts/index.js.map +0 -1
- package/dist/generated_clients/staking/accounts/settingsAccount.d.ts +0 -32
- package/dist/generated_clients/staking/accounts/settingsAccount.js +0 -59
- package/dist/generated_clients/staking/accounts/settingsAccount.js.map +0 -1
- package/dist/generated_clients/staking/accounts/stakeAccount.d.ts +0 -42
- package/dist/generated_clients/staking/accounts/stakeAccount.js +0 -69
- package/dist/generated_clients/staking/accounts/stakeAccount.js.map +0 -1
- package/dist/generated_clients/staking/errors/index.d.ts +0 -8
- package/dist/generated_clients/staking/errors/index.js +0 -9
- package/dist/generated_clients/staking/errors/index.js.map +0 -1
- package/dist/generated_clients/staking/errors/nosanaStaking.d.ts +0 -45
- package/dist/generated_clients/staking/errors/nosanaStaking.js +0 -63
- package/dist/generated_clients/staking/errors/nosanaStaking.js.map +0 -1
- package/dist/generated_clients/staking/index.d.ts +0 -11
- package/dist/generated_clients/staking/index.js +0 -12
- package/dist/generated_clients/staking/index.js.map +0 -1
- package/dist/generated_clients/staking/instructions/close.d.ts +0 -56
- package/dist/generated_clients/staking/instructions/close.js +0 -88
- package/dist/generated_clients/staking/instructions/close.js.map +0 -1
- package/dist/generated_clients/staking/instructions/extend.d.ts +0 -48
- package/dist/generated_clients/staking/instructions/extend.js +0 -74
- package/dist/generated_clients/staking/instructions/extend.js.map +0 -1
- package/dist/generated_clients/staking/instructions/index.d.ts +0 -17
- package/dist/generated_clients/staking/instructions/index.js +0 -18
- package/dist/generated_clients/staking/instructions/index.js.map +0 -1
- package/dist/generated_clients/staking/instructions/init.d.ts +0 -52
- package/dist/generated_clients/staking/instructions/init.js +0 -88
- package/dist/generated_clients/staking/instructions/init.js.map +0 -1
- package/dist/generated_clients/staking/instructions/restake.d.ts +0 -48
- package/dist/generated_clients/staking/instructions/restake.js +0 -75
- package/dist/generated_clients/staking/instructions/restake.js.map +0 -1
- package/dist/generated_clients/staking/instructions/slash.d.ts +0 -64
- package/dist/generated_clients/staking/instructions/slash.js +0 -98
- package/dist/generated_clients/staking/instructions/slash.js.map +0 -1
- package/dist/generated_clients/staking/instructions/stake.d.ts +0 -75
- package/dist/generated_clients/staking/instructions/stake.js +0 -116
- package/dist/generated_clients/staking/instructions/stake.js.map +0 -1
- package/dist/generated_clients/staking/instructions/topup.d.ts +0 -60
- package/dist/generated_clients/staking/instructions/topup.js +0 -94
- package/dist/generated_clients/staking/instructions/topup.js.map +0 -1
- package/dist/generated_clients/staking/instructions/unstake.d.ts +0 -48
- package/dist/generated_clients/staking/instructions/unstake.js +0 -75
- package/dist/generated_clients/staking/instructions/unstake.js.map +0 -1
- package/dist/generated_clients/staking/instructions/updateSettings.d.ts +0 -52
- package/dist/generated_clients/staking/instructions/updateSettings.js +0 -79
- package/dist/generated_clients/staking/instructions/updateSettings.js.map +0 -1
- package/dist/generated_clients/staking/instructions/withdraw.d.ts +0 -56
- package/dist/generated_clients/staking/instructions/withdraw.js +0 -88
- package/dist/generated_clients/staking/instructions/withdraw.js.map +0 -1
- package/dist/generated_clients/staking/programs/index.d.ts +0 -8
- package/dist/generated_clients/staking/programs/index.js +0 -9
- package/dist/generated_clients/staking/programs/index.js.map +0 -1
- package/dist/generated_clients/staking/programs/nosanaStaking.d.ts +0 -55
- package/dist/generated_clients/staking/programs/nosanaStaking.js +0 -70
- package/dist/generated_clients/staking/programs/nosanaStaking.js.map +0 -1
- package/dist/generated_clients/staking/shared/index.d.ts +0 -49
- package/dist/generated_clients/staking/shared/index.js +0 -87
- package/dist/generated_clients/staking/shared/index.js.map +0 -1
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
}>;
|
|
@@ -1,90 +0,0 @@
|
|
|
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/index.js";
|
|
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
|
-
}
|
|
90
|
-
//# sourceMappingURL=merkleDistributor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merkleDistributor.js","sourceRoot":"","sources":["../../../../src/generated_clients/merkle_distributor/errors/merkleDistributor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,cAAc,GAIf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAE1E,+DAA+D;AAC/D,MAAM,CAAC,MAAM,sDAAsD,GAAG,MAAM,CAAC,CAAC,OAAO;AACrF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,iDAAiD,GAAG,MAAM,CAAC,CAAC,OAAO;AAChF,0CAA0C;AAC1C,MAAM,CAAC,MAAM,uCAAuC,GAAG,MAAM,CAAC,CAAC,OAAO;AACtE,sDAAsD;AACtD,MAAM,CA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AAuD;KAClG,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,IAA4B;IAE5B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC1C,OACE,8BACD,CAAC,IAAI,CAAC,CAAC;IACV,CAAC;IAED,OAAO,oDAAoD,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,wBAAwB,CAGtC,KAAc,EACd,kBAEC,EACD,IAAwB;IAGxB,OAAO,cAAc,CACnB,KAAK,EACL,kBAAkB,EAClB,kCAAkC,EAClC,IAAI,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
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/index.js";
|
|
9
|
-
export * from "./errors/index.js";
|
|
10
|
-
export * from "./instructions/index.js";
|
|
11
|
-
export * from "./programs/index.js";
|
|
@@ -1,12 +0,0 @@
|
|
|
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/index.js";
|
|
9
|
-
export * from "./errors/index.js";
|
|
10
|
-
export * from "./instructions/index.js";
|
|
11
|
-
export * from "./programs/index.js";
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated_clients/merkle_distributor/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
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 AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
|
|
9
|
-
import { MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
-
export declare const CLAIM_LOCKED_INSTRUCTION_ACCOUNTS: {
|
|
11
|
-
readonly distributor: 0;
|
|
12
|
-
readonly claimStatus: 1;
|
|
13
|
-
readonly from: 2;
|
|
14
|
-
readonly to: 3;
|
|
15
|
-
readonly claimant: 4;
|
|
16
|
-
readonly tokenProgram: 5;
|
|
17
|
-
};
|
|
18
|
-
export type ClaimLockedInstructionAccountName = keyof typeof CLAIM_LOCKED_INSTRUCTION_ACCOUNTS;
|
|
19
|
-
export declare const CLAIM_LOCKED_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
20
|
-
export declare function getClaimLockedDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
21
|
-
export type ClaimLockedInstruction<TProgram extends string = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS, TAccountDistributor extends string | AccountMeta<string> = string, TAccountClaimStatus extends string | AccountMeta<string> = string, TAccountFrom extends string | AccountMeta<string> = string, TAccountTo extends string | AccountMeta<string> = string, TAccountClaimant extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
22
|
-
TAccountDistributor extends string ? WritableAccount<TAccountDistributor> : TAccountDistributor,
|
|
23
|
-
TAccountClaimStatus extends string ? WritableAccount<TAccountClaimStatus> : TAccountClaimStatus,
|
|
24
|
-
TAccountFrom extends string ? WritableAccount<TAccountFrom> : TAccountFrom,
|
|
25
|
-
TAccountTo extends string ? WritableAccount<TAccountTo> : TAccountTo,
|
|
26
|
-
TAccountClaimant extends string ? WritableSignerAccount<TAccountClaimant> & AccountSignerMeta<TAccountClaimant> : TAccountClaimant,
|
|
27
|
-
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
28
|
-
...TRemainingAccounts
|
|
29
|
-
]>;
|
|
30
|
-
export type ClaimLockedInstructionData = {
|
|
31
|
-
discriminator: ReadonlyUint8Array;
|
|
32
|
-
};
|
|
33
|
-
export type ClaimLockedInstructionDataArgs = {};
|
|
34
|
-
export declare function getClaimLockedInstructionDataEncoder(): FixedSizeEncoder<ClaimLockedInstructionDataArgs>;
|
|
35
|
-
export declare function getClaimLockedInstructionDataDecoder(): FixedSizeDecoder<ClaimLockedInstructionData>;
|
|
36
|
-
export declare function getClaimLockedInstructionDataCodec(): FixedSizeCodec<ClaimLockedInstructionDataArgs, ClaimLockedInstructionData>;
|
|
37
|
-
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> = {
|
|
38
|
-
/** The [MerkleDistributor]. */
|
|
39
|
-
distributor: Address<TAccountDistributor>;
|
|
40
|
-
/** Claim Status PDA */
|
|
41
|
-
claimStatus: Address<TAccountClaimStatus>;
|
|
42
|
-
/** Distributor ATA containing the tokens to distribute. */
|
|
43
|
-
from: Address<TAccountFrom>;
|
|
44
|
-
/**
|
|
45
|
-
* Account to send the claimed tokens to.
|
|
46
|
-
* Claimant must sign the transaction and can only claim on behalf of themself
|
|
47
|
-
*/
|
|
48
|
-
to: Address<TAccountTo>;
|
|
49
|
-
/** Who is claiming the tokens. */
|
|
50
|
-
claimant: TransactionSigner<TAccountClaimant>;
|
|
51
|
-
/** SPL [Token] program. */
|
|
52
|
-
tokenProgram?: Address<TAccountTokenProgram>;
|
|
53
|
-
};
|
|
54
|
-
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?: {
|
|
55
|
-
programAddress?: TProgramAddress;
|
|
56
|
-
}): ClaimLockedInstruction<TProgramAddress, TAccountDistributor, TAccountClaimStatus, TAccountFrom, TAccountTo, TAccountClaimant, TAccountTokenProgram>;
|
|
57
|
-
export type ParsedClaimLockedInstruction<TProgram extends string = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
58
|
-
programAddress: Address<TProgram>;
|
|
59
|
-
accounts: {
|
|
60
|
-
/** The [MerkleDistributor]. */
|
|
61
|
-
distributor: TAccountMetas[0];
|
|
62
|
-
/** Claim Status PDA */
|
|
63
|
-
claimStatus: TAccountMetas[1];
|
|
64
|
-
/** Distributor ATA containing the tokens to distribute. */
|
|
65
|
-
from: TAccountMetas[2];
|
|
66
|
-
/**
|
|
67
|
-
* Account to send the claimed tokens to.
|
|
68
|
-
* Claimant must sign the transaction and can only claim on behalf of themself
|
|
69
|
-
*/
|
|
70
|
-
to: TAccountMetas[3];
|
|
71
|
-
/** Who is claiming the tokens. */
|
|
72
|
-
claimant: TAccountMetas[4];
|
|
73
|
-
/** SPL [Token] program. */
|
|
74
|
-
tokenProgram: TAccountMetas[5];
|
|
75
|
-
};
|
|
76
|
-
data: ClaimLockedInstructionData;
|
|
77
|
-
};
|
|
78
|
-
export declare function parseClaimLockedInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedClaimLockedInstruction<TProgram, TAccountMetas>;
|
|
@@ -1,92 +0,0 @@
|
|
|
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 { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, transformEncoder, } from "@solana/kit";
|
|
9
|
-
import { MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
-
import { getAccountMetaFactory } from "../shared/index.js";
|
|
11
|
-
export const CLAIM_LOCKED_INSTRUCTION_ACCOUNTS = {
|
|
12
|
-
distributor: 0,
|
|
13
|
-
claimStatus: 1,
|
|
14
|
-
from: 2,
|
|
15
|
-
to: 3,
|
|
16
|
-
claimant: 4,
|
|
17
|
-
tokenProgram: 5,
|
|
18
|
-
};
|
|
19
|
-
export const CLAIM_LOCKED_DISCRIMINATOR = new Uint8Array([
|
|
20
|
-
34, 206, 181, 23, 11, 207, 147, 90,
|
|
21
|
-
]);
|
|
22
|
-
export function getClaimLockedDiscriminatorBytes() {
|
|
23
|
-
return fixEncoderSize(getBytesEncoder(), 8).encode(CLAIM_LOCKED_DISCRIMINATOR);
|
|
24
|
-
}
|
|
25
|
-
export function getClaimLockedInstructionDataEncoder() {
|
|
26
|
-
return transformEncoder(getStructEncoder([["discriminator", fixEncoderSize(getBytesEncoder(), 8)]]), (value) => ({ ...value, discriminator: CLAIM_LOCKED_DISCRIMINATOR }));
|
|
27
|
-
}
|
|
28
|
-
export function getClaimLockedInstructionDataDecoder() {
|
|
29
|
-
return getStructDecoder([
|
|
30
|
-
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
31
|
-
]);
|
|
32
|
-
}
|
|
33
|
-
export function getClaimLockedInstructionDataCodec() {
|
|
34
|
-
return combineCodec(getClaimLockedInstructionDataEncoder(), getClaimLockedInstructionDataDecoder());
|
|
35
|
-
}
|
|
36
|
-
export function getClaimLockedInstruction(input, config) {
|
|
37
|
-
// Program address.
|
|
38
|
-
const programAddress = config?.programAddress ?? MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS;
|
|
39
|
-
// Original accounts.
|
|
40
|
-
const originalAccounts = {
|
|
41
|
-
distributor: { value: input.distributor ?? null, isWritable: true },
|
|
42
|
-
claimStatus: { value: input.claimStatus ?? null, isWritable: true },
|
|
43
|
-
from: { value: input.from ?? null, isWritable: true },
|
|
44
|
-
to: { value: input.to ?? null, isWritable: true },
|
|
45
|
-
claimant: { value: input.claimant ?? null, isWritable: true },
|
|
46
|
-
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
47
|
-
};
|
|
48
|
-
const accounts = originalAccounts;
|
|
49
|
-
// Resolve default values.
|
|
50
|
-
if (!accounts.tokenProgram.value) {
|
|
51
|
-
accounts.tokenProgram.value =
|
|
52
|
-
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
53
|
-
}
|
|
54
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
55
|
-
return Object.freeze({
|
|
56
|
-
accounts: [
|
|
57
|
-
getAccountMeta(accounts.distributor),
|
|
58
|
-
getAccountMeta(accounts.claimStatus),
|
|
59
|
-
getAccountMeta(accounts.from),
|
|
60
|
-
getAccountMeta(accounts.to),
|
|
61
|
-
getAccountMeta(accounts.claimant),
|
|
62
|
-
getAccountMeta(accounts.tokenProgram),
|
|
63
|
-
],
|
|
64
|
-
data: getClaimLockedInstructionDataEncoder().encode({}),
|
|
65
|
-
programAddress,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
export function parseClaimLockedInstruction(instruction) {
|
|
69
|
-
if (instruction.accounts.length < 6) {
|
|
70
|
-
// TODO: Coded error.
|
|
71
|
-
throw new Error("Not enough accounts");
|
|
72
|
-
}
|
|
73
|
-
let accountIndex = 0;
|
|
74
|
-
const getNextAccount = () => {
|
|
75
|
-
const accountMeta = instruction.accounts[accountIndex];
|
|
76
|
-
accountIndex += 1;
|
|
77
|
-
return accountMeta;
|
|
78
|
-
};
|
|
79
|
-
return {
|
|
80
|
-
programAddress: instruction.programAddress,
|
|
81
|
-
accounts: {
|
|
82
|
-
distributor: getNextAccount(),
|
|
83
|
-
claimStatus: getNextAccount(),
|
|
84
|
-
from: getNextAccount(),
|
|
85
|
-
to: getNextAccount(),
|
|
86
|
-
claimant: getNextAccount(),
|
|
87
|
-
tokenProgram: getNextAccount(),
|
|
88
|
-
},
|
|
89
|
-
data: getClaimLockedInstructionDataDecoder().decode(instruction.data),
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
//# sourceMappingURL=claimLocked.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claimLocked.js","sourceRoot":"","sources":["../../../../src/generated_clients/merkle_distributor/instructions/claimLocked.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GAejB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAwB,MAAM,oB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KASf,CAAC,CAAC;AACL,CAAC;AA2BD,MAAM,UAAU,2BAA2B,CAIzC,WAEyC;IAEzC,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,qBAAqB;QACrB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IACD,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,MAAM,WAAW,GAAI,WAAW,CAAC,QAA0B,CAAC,YAAY,CAAE,CAAC;QAC3E,YAAY,IAAI,CAAC,CAAC;QAClB,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC;IACF,OAAO;QACL,cAAc,EAAE,WAAW,CAAC,cAAc;QAC1C,QAAQ,EAAE;YACR,WAAW,EAAE,cAAc,EAAE;YAC7B,WAAW,EAAE,cAAc,EAAE;YAC7B,IAAI,EAAE,cAAc,EAAE;YACtB,EAAE,EAAE,cAAc,EAAE;YACpB,QAAQ,EAAE,cAAc,EAAE;YAC1B,YAAY,EAAE,cAAc,EAAE;SAC/B;QACD,IAAI,EAAE,oCAAoC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KACtE,CAAC;AACJ,CAAC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
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 AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from "@solana/kit";
|
|
9
|
-
import { MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
-
export declare const CLAWBACK_INSTRUCTION_ACCOUNTS: {
|
|
11
|
-
readonly distributor: 0;
|
|
12
|
-
readonly from: 1;
|
|
13
|
-
readonly to: 2;
|
|
14
|
-
readonly claimant: 3;
|
|
15
|
-
readonly systemProgram: 4;
|
|
16
|
-
readonly tokenProgram: 5;
|
|
17
|
-
};
|
|
18
|
-
export type ClawbackInstructionAccountName = keyof typeof CLAWBACK_INSTRUCTION_ACCOUNTS;
|
|
19
|
-
export declare const CLAWBACK_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
20
|
-
export declare function getClawbackDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
21
|
-
export type ClawbackInstruction<TProgram extends string = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS, TAccountDistributor extends string | AccountMeta<string> = string, TAccountFrom extends string | AccountMeta<string> = string, TAccountTo extends string | AccountMeta<string> = string, TAccountClaimant extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
22
|
-
TAccountDistributor extends string ? WritableAccount<TAccountDistributor> : TAccountDistributor,
|
|
23
|
-
TAccountFrom extends string ? WritableAccount<TAccountFrom> : TAccountFrom,
|
|
24
|
-
TAccountTo extends string ? WritableAccount<TAccountTo> : TAccountTo,
|
|
25
|
-
TAccountClaimant extends string ? ReadonlySignerAccount<TAccountClaimant> & AccountSignerMeta<TAccountClaimant> : TAccountClaimant,
|
|
26
|
-
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
27
|
-
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
28
|
-
...TRemainingAccounts
|
|
29
|
-
]>;
|
|
30
|
-
export type ClawbackInstructionData = {
|
|
31
|
-
discriminator: ReadonlyUint8Array;
|
|
32
|
-
};
|
|
33
|
-
export type ClawbackInstructionDataArgs = {};
|
|
34
|
-
export declare function getClawbackInstructionDataEncoder(): FixedSizeEncoder<ClawbackInstructionDataArgs>;
|
|
35
|
-
export declare function getClawbackInstructionDataDecoder(): FixedSizeDecoder<ClawbackInstructionData>;
|
|
36
|
-
export declare function getClawbackInstructionDataCodec(): FixedSizeCodec<ClawbackInstructionDataArgs, ClawbackInstructionData>;
|
|
37
|
-
export type ClawbackInput<TAccountDistributor extends string = string, TAccountFrom extends string = string, TAccountTo extends string = string, TAccountClaimant extends string = string, TAccountSystemProgram extends string = string, TAccountTokenProgram extends string = string> = {
|
|
38
|
-
/** The [MerkleDistributor]. */
|
|
39
|
-
distributor: Address<TAccountDistributor>;
|
|
40
|
-
/** Distributor ATA containing the tokens to distribute. */
|
|
41
|
-
from: Address<TAccountFrom>;
|
|
42
|
-
/** The Clawback token account. */
|
|
43
|
-
to: Address<TAccountTo>;
|
|
44
|
-
/**
|
|
45
|
-
* Claimant account
|
|
46
|
-
* Anyone can claw back the funds
|
|
47
|
-
*/
|
|
48
|
-
claimant: TransactionSigner<TAccountClaimant>;
|
|
49
|
-
/** The [System] program. */
|
|
50
|
-
systemProgram?: Address<TAccountSystemProgram>;
|
|
51
|
-
/** SPL [Token] program. */
|
|
52
|
-
tokenProgram?: Address<TAccountTokenProgram>;
|
|
53
|
-
};
|
|
54
|
-
export declare function getClawbackInstruction<TAccountDistributor extends string, TAccountFrom extends string, TAccountTo extends string, TAccountClaimant extends string, TAccountSystemProgram extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS>(input: ClawbackInput<TAccountDistributor, TAccountFrom, TAccountTo, TAccountClaimant, TAccountSystemProgram, TAccountTokenProgram>, config?: {
|
|
55
|
-
programAddress?: TProgramAddress;
|
|
56
|
-
}): ClawbackInstruction<TProgramAddress, TAccountDistributor, TAccountFrom, TAccountTo, TAccountClaimant, TAccountSystemProgram, TAccountTokenProgram>;
|
|
57
|
-
export type ParsedClawbackInstruction<TProgram extends string = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
58
|
-
programAddress: Address<TProgram>;
|
|
59
|
-
accounts: {
|
|
60
|
-
/** The [MerkleDistributor]. */
|
|
61
|
-
distributor: TAccountMetas[0];
|
|
62
|
-
/** Distributor ATA containing the tokens to distribute. */
|
|
63
|
-
from: TAccountMetas[1];
|
|
64
|
-
/** The Clawback token account. */
|
|
65
|
-
to: TAccountMetas[2];
|
|
66
|
-
/**
|
|
67
|
-
* Claimant account
|
|
68
|
-
* Anyone can claw back the funds
|
|
69
|
-
*/
|
|
70
|
-
claimant: TAccountMetas[3];
|
|
71
|
-
/** The [System] program. */
|
|
72
|
-
systemProgram: TAccountMetas[4];
|
|
73
|
-
/** SPL [Token] program. */
|
|
74
|
-
tokenProgram: TAccountMetas[5];
|
|
75
|
-
};
|
|
76
|
-
data: ClawbackInstructionData;
|
|
77
|
-
};
|
|
78
|
-
export declare function parseClawbackInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedClawbackInstruction<TProgram, TAccountMetas>;
|
|
@@ -1,96 +0,0 @@
|
|
|
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 { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, transformEncoder, } from "@solana/kit";
|
|
9
|
-
import { MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
-
import { getAccountMetaFactory } from "../shared/index.js";
|
|
11
|
-
export const CLAWBACK_INSTRUCTION_ACCOUNTS = {
|
|
12
|
-
distributor: 0,
|
|
13
|
-
from: 1,
|
|
14
|
-
to: 2,
|
|
15
|
-
claimant: 3,
|
|
16
|
-
systemProgram: 4,
|
|
17
|
-
tokenProgram: 5,
|
|
18
|
-
};
|
|
19
|
-
export const CLAWBACK_DISCRIMINATOR = new Uint8Array([
|
|
20
|
-
111, 92, 142, 79, 33, 234, 82, 27,
|
|
21
|
-
]);
|
|
22
|
-
export function getClawbackDiscriminatorBytes() {
|
|
23
|
-
return fixEncoderSize(getBytesEncoder(), 8).encode(CLAWBACK_DISCRIMINATOR);
|
|
24
|
-
}
|
|
25
|
-
export function getClawbackInstructionDataEncoder() {
|
|
26
|
-
return transformEncoder(getStructEncoder([["discriminator", fixEncoderSize(getBytesEncoder(), 8)]]), (value) => ({ ...value, discriminator: CLAWBACK_DISCRIMINATOR }));
|
|
27
|
-
}
|
|
28
|
-
export function getClawbackInstructionDataDecoder() {
|
|
29
|
-
return getStructDecoder([
|
|
30
|
-
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
31
|
-
]);
|
|
32
|
-
}
|
|
33
|
-
export function getClawbackInstructionDataCodec() {
|
|
34
|
-
return combineCodec(getClawbackInstructionDataEncoder(), getClawbackInstructionDataDecoder());
|
|
35
|
-
}
|
|
36
|
-
export function getClawbackInstruction(input, config) {
|
|
37
|
-
// Program address.
|
|
38
|
-
const programAddress = config?.programAddress ?? MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS;
|
|
39
|
-
// Original accounts.
|
|
40
|
-
const originalAccounts = {
|
|
41
|
-
distributor: { value: input.distributor ?? null, isWritable: true },
|
|
42
|
-
from: { value: input.from ?? null, isWritable: true },
|
|
43
|
-
to: { value: input.to ?? null, isWritable: true },
|
|
44
|
-
claimant: { value: input.claimant ?? null, isWritable: false },
|
|
45
|
-
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
46
|
-
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
47
|
-
};
|
|
48
|
-
const accounts = originalAccounts;
|
|
49
|
-
// Resolve default values.
|
|
50
|
-
if (!accounts.systemProgram.value) {
|
|
51
|
-
accounts.systemProgram.value =
|
|
52
|
-
"11111111111111111111111111111111";
|
|
53
|
-
}
|
|
54
|
-
if (!accounts.tokenProgram.value) {
|
|
55
|
-
accounts.tokenProgram.value =
|
|
56
|
-
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
57
|
-
}
|
|
58
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
59
|
-
return Object.freeze({
|
|
60
|
-
accounts: [
|
|
61
|
-
getAccountMeta(accounts.distributor),
|
|
62
|
-
getAccountMeta(accounts.from),
|
|
63
|
-
getAccountMeta(accounts.to),
|
|
64
|
-
getAccountMeta(accounts.claimant),
|
|
65
|
-
getAccountMeta(accounts.systemProgram),
|
|
66
|
-
getAccountMeta(accounts.tokenProgram),
|
|
67
|
-
],
|
|
68
|
-
data: getClawbackInstructionDataEncoder().encode({}),
|
|
69
|
-
programAddress,
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
export function parseClawbackInstruction(instruction) {
|
|
73
|
-
if (instruction.accounts.length < 6) {
|
|
74
|
-
// TODO: Coded error.
|
|
75
|
-
throw new Error("Not enough accounts");
|
|
76
|
-
}
|
|
77
|
-
let accountIndex = 0;
|
|
78
|
-
const getNextAccount = () => {
|
|
79
|
-
const accountMeta = instruction.accounts[accountIndex];
|
|
80
|
-
accountIndex += 1;
|
|
81
|
-
return accountMeta;
|
|
82
|
-
};
|
|
83
|
-
return {
|
|
84
|
-
programAddress: instruction.programAddress,
|
|
85
|
-
accounts: {
|
|
86
|
-
distributor: getNextAccount(),
|
|
87
|
-
from: getNextAccount(),
|
|
88
|
-
to: getNextAccount(),
|
|
89
|
-
claimant: getNextAccount(),
|
|
90
|
-
systemProgram: getNextAccount(),
|
|
91
|
-
tokenProgram: getNextAccount(),
|
|
92
|
-
},
|
|
93
|
-
data: getClawbackInstructionDataDecoder().decode(instruction.data),
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
//# sourceMappingURL=clawback.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clawback.js","sourceRoot":"","sources":["../../../../src/generated_clients/merkle_distributor/instructions/clawback.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GAejB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AAEjF,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,WAAW,EAAE,CAAC;IACd,IAAI,EAAE,CAAC;IACP,EAAE,EAAE,CAAC;IACL,QAAQ,EAAE,CAAC;IACX,aAAa,EAAE,CAAC;IAChB,YAAY,EAAE,CAAC;CACP,CAAC;AAGX,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,UAAU,CAAC;IACnD,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;CAClC,CAAC,CAAC;AAEH,MAAM,UAAU,6BAA6B;IAC3C,OAAO,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAC7E,CAAC;AA0CD,MAAM,UAAU,iCAAiC;IAC/C,OAAO,gBAAgB,CACrB,gBAAgB,CAAC,CAAC,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AAE,WAAW,CAAC,cAAc;QAC1C,QAAQ,EAAE;YACR,WAAW,EAAE,cAAc,EAAE;YAC7B,IAAI,EAAE,cAAc,EAAE;YACtB,EAAE,EAAE,cAAc,EAAE;YACpB,QAAQ,EAAE,cAAc,EAAE;YAC1B,aAAa,EAAE,cAAc,EAAE;YAC/B,YAAY,EAAE,cAAc,EAAE;SAC/B;QACD,IAAI,EAAE,iCAAiC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KACnE,CAAC;AACJ,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
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 AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from "@solana/kit";
|
|
9
|
-
import { MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
-
export declare const CLOSE_CLAIM_STATUS_INSTRUCTION_ACCOUNTS: {
|
|
11
|
-
readonly claimStatus: 0;
|
|
12
|
-
readonly claimant: 1;
|
|
13
|
-
readonly admin: 2;
|
|
14
|
-
readonly distributor: 3;
|
|
15
|
-
};
|
|
16
|
-
export type CloseClaimStatusInstructionAccountName = keyof typeof CLOSE_CLAIM_STATUS_INSTRUCTION_ACCOUNTS;
|
|
17
|
-
export declare const CLOSE_CLAIM_STATUS_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
18
|
-
export declare function getCloseClaimStatusDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
19
|
-
export type CloseClaimStatusInstruction<TProgram extends string = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS, TAccountClaimStatus extends string | AccountMeta<string> = string, TAccountClaimant extends string | AccountMeta<string> = string, TAccountAdmin extends string | AccountMeta<string> = string, TAccountDistributor extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
20
|
-
TAccountClaimStatus extends string ? WritableAccount<TAccountClaimStatus> : TAccountClaimStatus,
|
|
21
|
-
TAccountClaimant extends string ? WritableAccount<TAccountClaimant> : TAccountClaimant,
|
|
22
|
-
TAccountAdmin extends string ? ReadonlySignerAccount<TAccountAdmin> & AccountSignerMeta<TAccountAdmin> : TAccountAdmin,
|
|
23
|
-
TAccountDistributor extends string ? ReadonlyAccount<TAccountDistributor> : TAccountDistributor,
|
|
24
|
-
...TRemainingAccounts
|
|
25
|
-
]>;
|
|
26
|
-
export type CloseClaimStatusInstructionData = {
|
|
27
|
-
discriminator: ReadonlyUint8Array;
|
|
28
|
-
};
|
|
29
|
-
export type CloseClaimStatusInstructionDataArgs = {};
|
|
30
|
-
export declare function getCloseClaimStatusInstructionDataEncoder(): FixedSizeEncoder<CloseClaimStatusInstructionDataArgs>;
|
|
31
|
-
export declare function getCloseClaimStatusInstructionDataDecoder(): FixedSizeDecoder<CloseClaimStatusInstructionData>;
|
|
32
|
-
export declare function getCloseClaimStatusInstructionDataCodec(): FixedSizeCodec<CloseClaimStatusInstructionDataArgs, CloseClaimStatusInstructionData>;
|
|
33
|
-
export type CloseClaimStatusInput<TAccountClaimStatus extends string = string, TAccountClaimant extends string = string, TAccountAdmin extends string = string, TAccountDistributor extends string = string> = {
|
|
34
|
-
claimStatus: Address<TAccountClaimStatus>;
|
|
35
|
-
claimant: Address<TAccountClaimant>;
|
|
36
|
-
admin: TransactionSigner<TAccountAdmin>;
|
|
37
|
-
distributor: Address<TAccountDistributor>;
|
|
38
|
-
};
|
|
39
|
-
export declare function getCloseClaimStatusInstruction<TAccountClaimStatus extends string, TAccountClaimant extends string, TAccountAdmin extends string, TAccountDistributor extends string, TProgramAddress extends Address = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS>(input: CloseClaimStatusInput<TAccountClaimStatus, TAccountClaimant, TAccountAdmin, TAccountDistributor>, config?: {
|
|
40
|
-
programAddress?: TProgramAddress;
|
|
41
|
-
}): CloseClaimStatusInstruction<TProgramAddress, TAccountClaimStatus, TAccountClaimant, TAccountAdmin, TAccountDistributor>;
|
|
42
|
-
export type ParsedCloseClaimStatusInstruction<TProgram extends string = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
43
|
-
programAddress: Address<TProgram>;
|
|
44
|
-
accounts: {
|
|
45
|
-
claimStatus: TAccountMetas[0];
|
|
46
|
-
claimant: TAccountMetas[1];
|
|
47
|
-
admin: TAccountMetas[2];
|
|
48
|
-
distributor: TAccountMetas[3];
|
|
49
|
-
};
|
|
50
|
-
data: CloseClaimStatusInstructionData;
|
|
51
|
-
};
|
|
52
|
-
export declare function parseCloseClaimStatusInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCloseClaimStatusInstruction<TProgram, TAccountMetas>;
|