@streamflow/distributor 7.5.3 → 8.0.0-alpha.p287.25d0c28

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 (97) hide show
  1. package/dist/cjs/index.cjs +4531 -0
  2. package/dist/cjs/index.cjs.map +1 -0
  3. package/dist/cjs/index.d.cts +11 -0
  4. package/dist/cjs/solana/descriptor/aligned_distributor.cjs +4 -0
  5. package/dist/cjs/solana/descriptor/aligned_distributor.cjs.map +1 -0
  6. package/dist/cjs/solana/descriptor/{idl/aligned_distributor.json → aligned_distributor.d.cts} +641 -507
  7. package/dist/cjs/solana/descriptor/merkle_distributor.cjs +4 -0
  8. package/dist/cjs/solana/descriptor/merkle_distributor.cjs.map +1 -0
  9. package/dist/cjs/solana/descriptor/merkle_distributor.d.cts +1840 -0
  10. package/dist/cjs/solana/index.cjs +4525 -0
  11. package/dist/cjs/solana/index.cjs.map +1 -0
  12. package/dist/cjs/solana/index.d.cts +1506 -0
  13. package/dist/esm/index.d.ts +11 -1
  14. package/dist/esm/index.js +4505 -1
  15. package/dist/esm/index.js.map +1 -0
  16. package/dist/esm/solana/descriptor/aligned_distributor.d.ts +965 -506
  17. package/dist/esm/solana/descriptor/aligned_distributor.js +3 -1
  18. package/dist/esm/solana/descriptor/aligned_distributor.js.map +1 -0
  19. package/dist/esm/solana/descriptor/idl/aligned_distributor.json +934 -1181
  20. package/dist/esm/solana/descriptor/idl/merkle_distributor.json +1218 -0
  21. package/dist/esm/solana/descriptor/merkle_distributor.d.ts +1275 -561
  22. package/dist/esm/solana/descriptor/merkle_distributor.js +3 -1
  23. package/dist/esm/solana/descriptor/merkle_distributor.js.map +1 -0
  24. package/dist/esm/solana/index.d.ts +1506 -7
  25. package/dist/esm/solana/index.js +4477 -7
  26. package/dist/esm/solana/index.js.map +1 -0
  27. package/package.json +56 -20
  28. package/dist/cjs/index.js +0 -27
  29. package/dist/cjs/solana/clients/BaseDistributorClient.js +0 -276
  30. package/dist/cjs/solana/clients/SolanaAlignedDistributorClient.js +0 -116
  31. package/dist/cjs/solana/clients/SolanaDistributorClient.js +0 -17
  32. package/dist/cjs/solana/clients/index.js +0 -10
  33. package/dist/cjs/solana/constants.js +0 -28
  34. package/dist/cjs/solana/descriptor/aligned_distributor.js +0 -2
  35. package/dist/cjs/solana/descriptor/merkle_distributor.js +0 -2
  36. package/dist/cjs/solana/generated/accounts/ClaimStatus.js +0 -135
  37. package/dist/cjs/solana/generated/accounts/MerkleDistributor.js +0 -215
  38. package/dist/cjs/solana/generated/accounts/index.js +0 -7
  39. package/dist/cjs/solana/generated/errors/anchor.js +0 -712
  40. package/dist/cjs/solana/generated/errors/custom.js +0 -321
  41. package/dist/cjs/solana/generated/errors/index.js +0 -64
  42. package/dist/cjs/solana/generated/instructions/claimLocked.js +0 -22
  43. package/dist/cjs/solana/generated/instructions/clawback.js +0 -21
  44. package/dist/cjs/solana/generated/instructions/closeClaim.js +0 -57
  45. package/dist/cjs/solana/generated/instructions/index.js +0 -17
  46. package/dist/cjs/solana/generated/instructions/newClaim.js +0 -59
  47. package/dist/cjs/solana/generated/instructions/newDistributor.js +0 -104
  48. package/dist/cjs/solana/generated/instructions/setAdmin.js +0 -17
  49. package/dist/cjs/solana/generated/instructions/setClawbackReceiver.js +0 -17
  50. package/dist/cjs/solana/generated/programId.js +0 -8
  51. package/dist/cjs/solana/index.js +0 -36
  52. package/dist/cjs/solana/types.js +0 -159
  53. package/dist/cjs/solana/utils.js +0 -75
  54. package/dist/esm/solana/clients/BaseDistributorClient.d.ts +0 -43
  55. package/dist/esm/solana/clients/BaseDistributorClient.js +0 -274
  56. package/dist/esm/solana/clients/SolanaAlignedDistributorClient.d.ts +0 -16
  57. package/dist/esm/solana/clients/SolanaAlignedDistributorClient.js +0 -111
  58. package/dist/esm/solana/clients/SolanaDistributorClient.d.ts +0 -8
  59. package/dist/esm/solana/clients/SolanaDistributorClient.js +0 -11
  60. package/dist/esm/solana/clients/index.d.ts +0 -2
  61. package/dist/esm/solana/clients/index.js +0 -2
  62. package/dist/esm/solana/constants.d.ts +0 -24
  63. package/dist/esm/solana/constants.js +0 -25
  64. package/dist/esm/solana/generated/accounts/ClaimStatus.d.ts +0 -83
  65. package/dist/esm/solana/generated/accounts/ClaimStatus.js +0 -127
  66. package/dist/esm/solana/generated/accounts/MerkleDistributor.d.ts +0 -179
  67. package/dist/esm/solana/generated/accounts/MerkleDistributor.js +0 -239
  68. package/dist/esm/solana/generated/accounts/index.d.ts +0 -4
  69. package/dist/esm/solana/generated/accounts/index.js +0 -2
  70. package/dist/esm/solana/generated/errors/anchor.d.ts +0 -434
  71. package/dist/esm/solana/generated/errors/anchor.js +0 -707
  72. package/dist/esm/solana/generated/errors/custom.d.ts +0 -194
  73. package/dist/esm/solana/generated/errors/custom.js +0 -317
  74. package/dist/esm/solana/generated/errors/index.d.ts +0 -5
  75. package/dist/esm/solana/generated/errors/index.js +0 -37
  76. package/dist/esm/solana/generated/instructions/claimLocked.d.ts +0 -23
  77. package/dist/esm/solana/generated/instructions/claimLocked.js +0 -19
  78. package/dist/esm/solana/generated/instructions/clawback.d.ts +0 -17
  79. package/dist/esm/solana/generated/instructions/clawback.js +0 -18
  80. package/dist/esm/solana/generated/instructions/closeClaim.d.ts +0 -22
  81. package/dist/esm/solana/generated/instructions/closeClaim.js +0 -30
  82. package/dist/esm/solana/generated/instructions/index.d.ts +0 -14
  83. package/dist/esm/solana/generated/instructions/index.js +0 -7
  84. package/dist/esm/solana/generated/instructions/newClaim.d.ts +0 -29
  85. package/dist/esm/solana/generated/instructions/newClaim.js +0 -32
  86. package/dist/esm/solana/generated/instructions/newDistributor.d.ts +0 -58
  87. package/dist/esm/solana/generated/instructions/newDistributor.js +0 -77
  88. package/dist/esm/solana/generated/instructions/setAdmin.d.ts +0 -10
  89. package/dist/esm/solana/generated/instructions/setAdmin.js +0 -14
  90. package/dist/esm/solana/generated/instructions/setClawbackReceiver.d.ts +0 -10
  91. package/dist/esm/solana/generated/instructions/setClawbackReceiver.js +0 -14
  92. package/dist/esm/solana/generated/programId.d.ts +0 -3
  93. package/dist/esm/solana/generated/programId.js +0 -5
  94. package/dist/esm/solana/types.d.ts +0 -258
  95. package/dist/esm/solana/types.js +0 -156
  96. package/dist/esm/solana/utils.d.ts +0 -14
  97. package/dist/esm/solana/utils.js +0 -65
@@ -1,7 +1,1506 @@
1
- export * from "./clients/index.js";
2
- export * from "./generated/accounts/index.js";
3
- export * from "./generated/errors/index.js";
4
- export * from "./generated/instructions/index.js";
5
- export * from "./utils.js";
6
- export * from "./types.js";
7
- export * as constants from "./constants.js";
1
+ import { Keypair, PublicKey, TransactionInstruction, Connection, Commitment, ConnectionConfig } from '@solana/web3.js';
2
+ import { SignerWalletAdapter } from '@solana/wallet-adapter-base';
3
+ import { ITransactionResult, ICluster } from '@streamflow/common';
4
+ import { ITransactionSolanaExt, ITransactionSolanaExtResolved, IProgramAccount, unwrapExecutionParams, signAndExecuteTransaction } from '@streamflow/common/solana';
5
+ import BN from 'bn.js';
6
+ import { IdlTypes, Program } from '@coral-xyz/anchor';
7
+ import { AlignedDistributor } from './descriptor/aligned_distributor.js';
8
+ import { MerkleDistributor as MerkleDistributor$1 } from './descriptor/merkle_distributor.js';
9
+ import PQueue from 'p-queue';
10
+ import { TransferFeeConfig } from '@solana/spl-token';
11
+
12
+ type MerkleDistributorAccountTypes = IdlTypes<MerkleDistributor$1>;
13
+ type OracleType = IdlTypes<AlignedDistributor>["oracleType"];
14
+ type OracleTypeName = "none" | "pyth" | "switchboard" | "test";
15
+ interface IInteractSolanaExt extends ITransactionSolanaExt {
16
+ invoker: SignerWalletAdapter | Keypair;
17
+ }
18
+ interface ICreateSolanaExt extends IInteractSolanaExt {
19
+ isNative?: boolean;
20
+ }
21
+ interface ICreateDistributorData {
22
+ mint: string;
23
+ version: number;
24
+ root: Array<number>;
25
+ maxTotalClaim: BN | number | string;
26
+ maxNumNodes: BN | number | string;
27
+ unlockPeriod: number;
28
+ startVestingTs: number;
29
+ endVestingTs: number;
30
+ clawbackStartTs: number;
31
+ claimsClosableByAdmin: boolean;
32
+ claimsClosableByClaimant?: boolean;
33
+ claimsLimit?: number;
34
+ }
35
+ interface AlignedDistributorData {
36
+ sender: string;
37
+ minPrice: number;
38
+ maxPrice: number;
39
+ minPercentage: number;
40
+ maxPercentage: number;
41
+ oracleType: OracleTypeName;
42
+ priceOracle: string | undefined;
43
+ updatePeriod: number;
44
+ clawedBack: boolean;
45
+ initialDuration: number;
46
+ initialPrice: number;
47
+ lastPrice: number;
48
+ lastDurationUpdateTs: number;
49
+ }
50
+ interface NewAlignedDistributorArgs {
51
+ totalAmountLocked: BN;
52
+ totalAmountUnlocked: BN;
53
+ oracleType: OracleType;
54
+ minPrice: BN;
55
+ maxPrice: BN;
56
+ minPercentage: BN;
57
+ maxPercentage: BN;
58
+ tickSize: BN;
59
+ skipInitial: boolean;
60
+ updatePeriod: BN;
61
+ }
62
+ interface ICreateAlignedDistributorData extends ICreateDistributorData {
63
+ minPrice: number;
64
+ maxPrice: number;
65
+ minPercentage: number;
66
+ maxPercentage: number;
67
+ oracleType: OracleTypeName;
68
+ oracleAddress: string;
69
+ totalAmountLocked: BN | number | string;
70
+ totalAmountUnlocked: BN | number | string;
71
+ updatePeriod?: number;
72
+ tickSize?: number;
73
+ skipInitial?: boolean;
74
+ }
75
+ interface IClaimData {
76
+ id: string;
77
+ amountUnlocked: BN;
78
+ amountLocked: BN;
79
+ proof: Array<Array<number>>;
80
+ }
81
+ interface ICloseClaimData extends Partial<Omit<IClaimData, "id">> {
82
+ id: string;
83
+ claimant: string | PublicKey;
84
+ }
85
+ interface IClawbackData {
86
+ id: string;
87
+ }
88
+ interface IGetClaimData {
89
+ id: string;
90
+ recipient: string;
91
+ }
92
+ interface IGetDistributors {
93
+ ids: string[];
94
+ }
95
+ interface ISearchDistributors {
96
+ mint?: string;
97
+ admin?: string;
98
+ }
99
+ interface ISetDataAdmin {
100
+ id: string;
101
+ newAdmin: string;
102
+ }
103
+ interface ISetClawbackReceiverData {
104
+ id: string;
105
+ newReceiver: string;
106
+ }
107
+ interface ICreateDistributorResult extends ITransactionResult {
108
+ metadataId: string;
109
+ }
110
+ declare enum AnchorErrorCode {
111
+ /** 8 byte instruction identifier not provided */
112
+ InstructionMissing = "InstructionMissing",
113
+ /** Fallback functions are not supported */
114
+ InstructionFallbackNotFound = "InstructionFallbackNotFound",
115
+ /** The program could not deserialize the given instruction */
116
+ InstructionDidNotDeserialize = "InstructionDidNotDeserialize",
117
+ /** The program could not serialize the given instruction */
118
+ InstructionDidNotSerialize = "InstructionDidNotSerialize",
119
+ /** The program was compiled without idl instructions */
120
+ IdlInstructionStub = "IdlInstructionStub",
121
+ /** The transaction was given an invalid program for the IDL instruction */
122
+ IdlInstructionInvalidProgram = "IdlInstructionInvalidProgram",
123
+ /** A mut constraint was violated */
124
+ ConstraintMut = "ConstraintMut",
125
+ /** A has one constraint was violated */
126
+ ConstraintHasOne = "ConstraintHasOne",
127
+ /** A signer constraint was violated */
128
+ ConstraintSigner = "ConstraintSigner",
129
+ /** A raw constraint was violated */
130
+ ConstraintRaw = "ConstraintRaw",
131
+ /** An owner constraint was violated */
132
+ ConstraintOwner = "ConstraintOwner",
133
+ /** A rent exemption constraint was violated */
134
+ ConstraintRentExempt = "ConstraintRentExempt",
135
+ /** A seeds constraint was violated */
136
+ ConstraintSeeds = "ConstraintSeeds",
137
+ /** An executable constraint was violated */
138
+ ConstraintExecutable = "ConstraintExecutable",
139
+ /** Deprecated Error, feel free to replace with something else */
140
+ ConstraintState = "ConstraintState",
141
+ /** An associated constraint was violated */
142
+ ConstraintAssociated = "ConstraintAssociated",
143
+ /** An associated init constraint was violated */
144
+ ConstraintAssociatedInit = "ConstraintAssociatedInit",
145
+ /** A close constraint was violated */
146
+ ConstraintClose = "ConstraintClose",
147
+ /** An address constraint was violated */
148
+ ConstraintAddress = "ConstraintAddress",
149
+ /** Expected zero account discriminant */
150
+ ConstraintZero = "ConstraintZero",
151
+ /** A token mint constraint was violated */
152
+ ConstraintTokenMint = "ConstraintTokenMint",
153
+ /** A token owner constraint was violated */
154
+ ConstraintTokenOwner = "ConstraintTokenOwner",
155
+ /** A mint mint authority constraint was violated */
156
+ ConstraintMintMintAuthority = "ConstraintMintMintAuthority",
157
+ /** A mint freeze authority constraint was violated */
158
+ ConstraintMintFreezeAuthority = "ConstraintMintFreezeAuthority",
159
+ /** A mint decimals constraint was violated */
160
+ ConstraintMintDecimals = "ConstraintMintDecimals",
161
+ /** A space constraint was violated */
162
+ ConstraintSpace = "ConstraintSpace",
163
+ /** A required account for the constraint is None */
164
+ ConstraintAccountIsNone = "ConstraintAccountIsNone",
165
+ /** A require expression was violated */
166
+ RequireViolated = "RequireViolated",
167
+ /** A require_eq expression was violated */
168
+ RequireEqViolated = "RequireEqViolated",
169
+ /** A require_keys_eq expression was violated */
170
+ RequireKeysEqViolated = "RequireKeysEqViolated",
171
+ /** A require_neq expression was violated */
172
+ RequireNeqViolated = "RequireNeqViolated",
173
+ /** A require_keys_neq expression was violated */
174
+ RequireKeysNeqViolated = "RequireKeysNeqViolated",
175
+ /** A require_gt expression was violated */
176
+ RequireGtViolated = "RequireGtViolated",
177
+ /** A require_gte expression was violated */
178
+ RequireGteViolated = "RequireGteViolated",
179
+ /** The account discriminator was already set on this account */
180
+ AccountDiscriminatorAlreadySet = "AccountDiscriminatorAlreadySet",
181
+ /** No 8 byte discriminator was found on the account */
182
+ AccountDiscriminatorNotFound = "AccountDiscriminatorNotFound",
183
+ /** 8 byte discriminator did not match what was expected */
184
+ AccountDiscriminatorMismatch = "AccountDiscriminatorMismatch",
185
+ /** Failed to deserialize the account */
186
+ AccountDidNotDeserialize = "AccountDidNotDeserialize",
187
+ /** Failed to serialize the account */
188
+ AccountDidNotSerialize = "AccountDidNotSerialize",
189
+ /** Not enough account keys given to the instruction */
190
+ AccountNotEnoughKeys = "AccountNotEnoughKeys",
191
+ /** The given account is not mutable */
192
+ AccountNotMutable = "AccountNotMutable",
193
+ /** The given account is owned by a different program than expected */
194
+ AccountOwnedByWrongProgram = "AccountOwnedByWrongProgram",
195
+ /** Program ID was not as expected */
196
+ InvalidProgramId = "InvalidProgramId",
197
+ /** Program account is not executable */
198
+ InvalidProgramExecutable = "InvalidProgramExecutable",
199
+ /** The given account did not sign */
200
+ AccountNotSigner = "AccountNotSigner",
201
+ /** The given account is not owned by the system program */
202
+ AccountNotSystemOwned = "AccountNotSystemOwned",
203
+ /** The program expected this account to be already initialized */
204
+ AccountNotInitialized = "AccountNotInitialized",
205
+ /** The given account is not a program data account */
206
+ AccountNotProgramData = "AccountNotProgramData",
207
+ /** The given account is not the associated token account */
208
+ AccountNotAssociatedTokenAccount = "AccountNotAssociatedTokenAccount",
209
+ /** The given public key does not match the required sysvar */
210
+ AccountSysvarMismatch = "AccountSysvarMismatch",
211
+ /** The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit */
212
+ AccountReallocExceedsLimit = "AccountReallocExceedsLimit",
213
+ /** The account was duplicated for more than one reallocation */
214
+ AccountDuplicateReallocs = "AccountDuplicateReallocs",
215
+ /** The declared program id does not match the actual program id */
216
+ DeclaredProgramIdMismatch = "DeclaredProgramIdMismatch",
217
+ /** The API being used is deprecated and should no longer be used */
218
+ Deprecated = "Deprecated"
219
+ }
220
+ declare enum ContractErrorCode {
221
+ /** Insufficient unlocked tokens */
222
+ InsufficientUnlockedTokens = "InsufficientUnlockedTokens",
223
+ /** Deposit Start too far in future */
224
+ StartTooFarInFuture = "StartTooFarInFuture",
225
+ /** Invalid Merkle proof */
226
+ InvalidProof = "InvalidProof",
227
+ /** Exceeded maximum claim amount */
228
+ ExceededMaxClaim = "ExceededMaxClaim",
229
+ /** Exceeded maximum node count */
230
+ MaxNodesExceeded = "MaxNodesExceeded",
231
+ /** Account is not authorized to execute this instruction */
232
+ Unauthorized = "Unauthorized",
233
+ /** Token account owner did not match intended owner */
234
+ OwnerMismatch = "OwnerMismatch",
235
+ /** Clawback cannot be before vesting starts */
236
+ ClawbackBeforeVesting = "ClawbackBeforeVesting",
237
+ /** Attempted clawback before start */
238
+ ClawbackBeforeStart = "ClawbackBeforeStart",
239
+ /** Clawback already claimed */
240
+ ClawbackAlreadyClaimed = "ClawbackAlreadyClaimed",
241
+ /** Clawback start must be at least one day after vesting end */
242
+ InsufficientClawbackDelay = "InsufficientClawbackDelay",
243
+ /** New and old Clawback receivers are identical */
244
+ SameClawbackReceiver = "SameClawbackReceiver",
245
+ /** New and old admin are identical */
246
+ SameAdmin = "SameAdmin",
247
+ /** Claim window expired */
248
+ ClaimExpired = "ClaimExpired",
249
+ /** Arithmetic Error (overflow/underflow) */
250
+ ArithmeticError = "ArithmeticError",
251
+ /** Start Timestamp cannot be after end Timestamp */
252
+ StartTimestampAfterEnd = "StartTimestampAfterEnd",
253
+ /** Timestamps cannot be in the past */
254
+ TimestampsNotInFuture = "TimestampsNotInFuture",
255
+ /** Airdrop Version Mismatch */
256
+ InvalidVersion = "InvalidVersion",
257
+ /** Invalid Mint */
258
+ InvalidMint = "InvalidMint",
259
+ /** Claim is closed */
260
+ ClaimIsClosed = "ClaimIsClosed",
261
+ /** Claims are not closable */
262
+ ClaimsAreNotClosable = "ClaimsAreNotClosable"
263
+ }
264
+
265
+ interface NewDistributorArgs {
266
+ version: BN;
267
+ root: Array<number>;
268
+ maxTotalClaim: BN;
269
+ maxNumNodes: BN;
270
+ unlockPeriod: BN;
271
+ startVestingTs: BN;
272
+ endVestingTs: BN;
273
+ clawbackStartTs: BN;
274
+ claimsClosableByAdmin: boolean;
275
+ claimsClosableByClaimant?: boolean | null;
276
+ claimsLimit?: number | null;
277
+ }
278
+ interface NewDistributorAccounts {
279
+ /** [MerkleDistributor]. */
280
+ distributor: PublicKey;
281
+ /** Clawback receiver token account */
282
+ clawbackReceiver: PublicKey;
283
+ /** The mint to distribute. */
284
+ mint: PublicKey;
285
+ /** Token vault */
286
+ tokenVault: PublicKey;
287
+ /**
288
+ * Admin wallet, responsible for creating the distributor and paying for the transaction.
289
+ * Also has the authority to set the clawback receiver and change itself.
290
+ */
291
+ admin: PublicKey;
292
+ /** The [System] program. */
293
+ systemProgram: PublicKey;
294
+ /** The [Associated Token] program. */
295
+ associatedTokenProgram: PublicKey;
296
+ /** The [Token] program. */
297
+ tokenProgram: PublicKey;
298
+ }
299
+ /**
300
+ * READ THE FOLLOWING:
301
+ *
302
+ * This instruction is susceptible to frontrunning that could result in loss of funds if not handled properly.
303
+ *
304
+ * An attack could look like:
305
+ * - A legitimate user opens a new distributor.
306
+ * - Someone observes the call to this instruction.
307
+ * - They replace the clawback_receiver, admin, or time parameters with their own.
308
+ *
309
+ * One situation that could happen here is the attacker replaces the admin and clawback_receiver with their own
310
+ * and sets the clawback_start_ts with the minimal time allowed. After clawback_start_ts has elapsed,
311
+ * the attacker can steal all funds from the distributor to their own clawback_receiver account.
312
+ *
313
+ * HOW TO AVOID:
314
+ * - When you call into this instruction, ensure your transaction succeeds.
315
+ * - To be extra safe, after your transaction succeeds, read back the state of the created MerkleDistributor account and
316
+ * assert the parameters are what you expect, most importantly the clawback_receiver and admin.
317
+ * - If your transaction fails, double check the value on-chain matches what you expect.
318
+ */
319
+ declare function newDistributor(args: NewDistributorArgs, accounts: NewDistributorAccounts, programId?: PublicKey): TransactionInstruction;
320
+
321
+ interface NewClaimArgs {
322
+ amountUnlocked: BN;
323
+ amountLocked: BN;
324
+ proof: Array<Array<number>>;
325
+ }
326
+ interface NewClaimAccounts {
327
+ /** The [MerkleDistributor]. */
328
+ distributor: PublicKey;
329
+ /** Claim status PDA */
330
+ claimStatus: PublicKey;
331
+ /** Distributor ATA containing the tokens to distribute. */
332
+ from: PublicKey;
333
+ /** Account to send the claimed tokens to. */
334
+ to: PublicKey;
335
+ /** Who is claiming the tokens. */
336
+ claimant: PublicKey;
337
+ /** The mint to claim. */
338
+ mint: PublicKey;
339
+ /** SPL [Token] program. */
340
+ tokenProgram: PublicKey;
341
+ /** The [System] program. */
342
+ systemProgram: PublicKey;
343
+ eventAuthority: PublicKey;
344
+ program: PublicKey;
345
+ }
346
+ declare function newClaim(args: NewClaimArgs, accounts: NewClaimAccounts, programId?: PublicKey): TransactionInstruction;
347
+
348
+ interface ClaimLockedAccounts {
349
+ /** The [MerkleDistributor]. */
350
+ distributor: PublicKey;
351
+ /** Claim Status PDA */
352
+ claimStatus: PublicKey;
353
+ /** Distributor ATA containing the tokens to distribute. */
354
+ from: PublicKey;
355
+ /**
356
+ * Account to send the claimed tokens to.
357
+ * Claimant must sign the transaction and can only claim on behalf of themself
358
+ */
359
+ to: PublicKey;
360
+ /** Who is claiming the tokens. */
361
+ claimant: PublicKey;
362
+ /** The mint to claim. */
363
+ mint: PublicKey;
364
+ /** SPL [Token] program. */
365
+ tokenProgram: PublicKey;
366
+ eventAuthority: PublicKey;
367
+ program: PublicKey;
368
+ }
369
+ declare function claimLocked(accounts: ClaimLockedAccounts, programId?: PublicKey): TransactionInstruction;
370
+
371
+ interface ClawbackAccounts {
372
+ /** The [MerkleDistributor]. */
373
+ distributor: PublicKey;
374
+ /** Distributor ATA containing the tokens to distribute. */
375
+ from: PublicKey;
376
+ /** The Clawback token account. */
377
+ to: PublicKey;
378
+ /** Only Admin can trigger the clawback of funds */
379
+ admin: PublicKey;
380
+ mint: PublicKey;
381
+ /** The [System] program. */
382
+ systemProgram: PublicKey;
383
+ /** SPL [Token] program. */
384
+ tokenProgram: PublicKey;
385
+ }
386
+ declare function clawback(accounts: ClawbackAccounts, programId?: PublicKey): TransactionInstruction;
387
+
388
+ interface CloseClaimArgs {
389
+ amountUnlocked?: BN;
390
+ amountLocked?: BN;
391
+ proof?: Array<Array<number>>;
392
+ }
393
+ interface CloseClaimAccounts {
394
+ /** The [MerkleDistributor]. */
395
+ distributor: PublicKey;
396
+ /** Admin signer */
397
+ adminOrClaimant: PublicKey;
398
+ claimant: PublicKey;
399
+ /** Claim Status PDA */
400
+ claimStatus: PublicKey;
401
+ /** The [System] program. */
402
+ systemProgram: PublicKey;
403
+ eventAuthority: PublicKey;
404
+ program: PublicKey;
405
+ }
406
+ declare function closeClaim(args: CloseClaimArgs, accounts: CloseClaimAccounts, programId?: PublicKey): TransactionInstruction;
407
+
408
+ interface SetClawbackReceiverAccounts {
409
+ /** The [MerkleDistributor]. */
410
+ distributor: PublicKey;
411
+ /** New clawback account */
412
+ newClawbackAccount: PublicKey;
413
+ /** Admin signer */
414
+ admin: PublicKey;
415
+ }
416
+ declare function setClawbackReceiver(accounts: SetClawbackReceiverAccounts, programId?: PublicKey): TransactionInstruction;
417
+
418
+ interface SetAdminAccounts {
419
+ /** The [MerkleDistributor]. */
420
+ distributor: PublicKey;
421
+ /** Admin signer */
422
+ admin: PublicKey;
423
+ /** New admin account */
424
+ newAdmin: PublicKey;
425
+ }
426
+ declare function setAdmin(accounts: SetAdminAccounts, programId?: PublicKey): TransactionInstruction;
427
+
428
+ interface ClaimStatusFields {
429
+ /** Authority that claimed the tokens. */
430
+ claimant: PublicKey;
431
+ /** Locked amount */
432
+ lockedAmount: BN;
433
+ /** Locked amount withdrawn */
434
+ lockedAmountWithdrawn: BN;
435
+ /** Unlocked amount */
436
+ unlockedAmount: BN;
437
+ /** Last claim time */
438
+ lastClaimTs: BN;
439
+ /** Track amount per unlock, can be useful for non-linear vesting */
440
+ lastAmountPerUnlock: BN;
441
+ /** Whether claim is closed */
442
+ closed: boolean;
443
+ /** Distributor account for which ClaimStatus was created, useful to filter by in get_program_accounts */
444
+ distributor: PublicKey;
445
+ /** Number of time amount has been claimed */
446
+ claimsCount: number;
447
+ /** Time when claim was closed */
448
+ closedTs: BN;
449
+ /** Buffer for additional fields */
450
+ buffer2: Array<number>;
451
+ }
452
+ interface ClaimStatusJSON {
453
+ /** Authority that claimed the tokens. */
454
+ claimant: string;
455
+ /** Locked amount */
456
+ lockedAmount: string;
457
+ /** Locked amount withdrawn */
458
+ lockedAmountWithdrawn: string;
459
+ /** Unlocked amount */
460
+ unlockedAmount: string;
461
+ /** Last claim time */
462
+ lastClaimTs: string;
463
+ /** Track amount per unlock, can be useful for non-linear vesting */
464
+ lastAmountPerUnlock: string;
465
+ /** Whether claim is closed */
466
+ closed: boolean;
467
+ /** Distributor account for which ClaimStatus was created, useful to filter by in get_program_accounts */
468
+ distributor: string;
469
+ /** Number of time amount has been claimed */
470
+ claimsCount: number;
471
+ /** Time when claim was closed */
472
+ closedTs: string;
473
+ /** Buffer for additional fields */
474
+ buffer2: Array<number>;
475
+ }
476
+ /** Holds whether or not a claimant has claimed tokens. */
477
+ declare class ClaimStatus {
478
+ /** Authority that claimed the tokens. */
479
+ readonly claimant: PublicKey;
480
+ /** Locked amount */
481
+ readonly lockedAmount: BN;
482
+ /** Locked amount withdrawn */
483
+ readonly lockedAmountWithdrawn: BN;
484
+ /** Unlocked amount */
485
+ readonly unlockedAmount: BN;
486
+ /** Last claim time */
487
+ readonly lastClaimTs: BN;
488
+ /** Track amount per unlock, can be useful for non-linear vesting */
489
+ readonly lastAmountPerUnlock: BN;
490
+ /** Whether claim is closed */
491
+ readonly closed: boolean;
492
+ /** Distributor account for which ClaimStatus was created, useful to filter by in get_program_accounts */
493
+ readonly distributor: PublicKey;
494
+ /** Number of time amount has been claimed */
495
+ readonly claimsCount: number;
496
+ /** Time when claim was closed */
497
+ readonly closedTs: BN;
498
+ /** Buffer for additional fields */
499
+ readonly buffer2: Array<number>;
500
+ static readonly discriminator: Buffer;
501
+ static readonly layout: any;
502
+ constructor(fields: ClaimStatusFields);
503
+ static fetch(c: Connection, address: PublicKey, programId?: PublicKey): Promise<ClaimStatus | null>;
504
+ static fetchMultiple(c: Connection, addresses: PublicKey[], programId?: PublicKey): Promise<Array<ClaimStatus | null>>;
505
+ static decode(data: Buffer): ClaimStatus;
506
+ toJSON(): ClaimStatusJSON;
507
+ static fromJSON(obj: ClaimStatusJSON): ClaimStatus;
508
+ }
509
+
510
+ interface MerkleDistributorFields {
511
+ /** Bump seed. */
512
+ bump: number;
513
+ /** Version of the airdrop */
514
+ version: BN;
515
+ /** The 256-bit merkle root. */
516
+ root: Array<number>;
517
+ /** [Mint] of the token to be distributed. */
518
+ mint: PublicKey;
519
+ /** Token Address of the vault */
520
+ tokenVault: PublicKey;
521
+ /** Maximum number of tokens that can ever be claimed from this [MerkleDistributor]. */
522
+ maxTotalClaim: BN;
523
+ /** Maximum number of nodes in [MerkleDistributor]. */
524
+ maxNumNodes: BN;
525
+ /** Time step (period) in seconds per which the unlock occurs */
526
+ unlockPeriod: BN;
527
+ /** Total amount of tokens that have been claimed. */
528
+ totalAmountClaimed: BN;
529
+ /** Number of nodes that have been claimed. */
530
+ numNodesClaimed: BN;
531
+ /** Lockup time start (Unix Timestamp) */
532
+ startTs: BN;
533
+ /** Lockup time end (Unix Timestamp) */
534
+ endTs: BN;
535
+ /** Clawback start (Unix Timestamp) */
536
+ clawbackStartTs: BN;
537
+ /** Clawback receiver */
538
+ clawbackReceiver: PublicKey;
539
+ /** Admin wallet */
540
+ admin: PublicKey;
541
+ /** Whether or not the distributor has been clawed back */
542
+ clawedBack: boolean;
543
+ /** Whether claims are closable by the admin or not */
544
+ claimsClosableByAdmin: boolean;
545
+ /** Whether admin can update vesting duration */
546
+ canUpdateDuration: boolean;
547
+ /** Total amount of funds unlocked (cliff/instant) */
548
+ totalAmountUnlocked: BN;
549
+ /** Total amount of funds locked (vested) */
550
+ totalAmountLocked: BN;
551
+ /** Timestamp when update was last called */
552
+ lastDurationUpdateTs: BN;
553
+ /** Total amount of locked amount claimable as of last duration update, ever increasing total, accumulates with each update */
554
+ totalClaimablePreUpdate: BN;
555
+ /** Timestamp when funds were clawed back */
556
+ clawedBackTs: BN;
557
+ /** Whether claims are closable by the claimant or not */
558
+ claimsClosableByClaimant: boolean;
559
+ /** Limit number of claims */
560
+ claimsLimit: number;
561
+ /** Buffer for additional fields */
562
+ buffer2: Array<number>;
563
+ /** Buffer for additional fields */
564
+ buffer3: Array<number>;
565
+ }
566
+ interface MerkleDistributorJSON {
567
+ /** Bump seed. */
568
+ bump: number;
569
+ /** Version of the airdrop */
570
+ version: string;
571
+ /** The 256-bit merkle root. */
572
+ root: Array<number>;
573
+ /** [Mint] of the token to be distributed. */
574
+ mint: string;
575
+ /** Token Address of the vault */
576
+ tokenVault: string;
577
+ /** Maximum number of tokens that can ever be claimed from this [MerkleDistributor]. */
578
+ maxTotalClaim: string;
579
+ /** Maximum number of nodes in [MerkleDistributor]. */
580
+ maxNumNodes: string;
581
+ /** Time step (period) in seconds per which the unlock occurs */
582
+ unlockPeriod: string;
583
+ /** Total amount of tokens that have been claimed. */
584
+ totalAmountClaimed: string;
585
+ /** Number of nodes that have been claimed. */
586
+ numNodesClaimed: string;
587
+ /** Lockup time start (Unix Timestamp) */
588
+ startTs: string;
589
+ /** Lockup time end (Unix Timestamp) */
590
+ endTs: string;
591
+ /** Clawback start (Unix Timestamp) */
592
+ clawbackStartTs: string;
593
+ /** Clawback receiver */
594
+ clawbackReceiver: string;
595
+ /** Admin wallet */
596
+ admin: string;
597
+ /** Whether or not the distributor has been clawed back */
598
+ clawedBack: boolean;
599
+ /** Whether claims are closable by the admin or not */
600
+ claimsClosableByAdmin: boolean;
601
+ /** Whether admin can update vesting duration */
602
+ canUpdateDuration: boolean;
603
+ /** Total amount of funds unlocked (cliff/instant) */
604
+ totalAmountUnlocked: string;
605
+ /** Total amount of funds locked (vested) */
606
+ totalAmountLocked: string;
607
+ /** Timestamp when update was last called */
608
+ lastDurationUpdateTs: string;
609
+ /** Total amount of locked amount claimable as of last duration update, ever increasing total, accumulates with each update */
610
+ totalClaimablePreUpdate: string;
611
+ /** Timestamp when funds were clawed back */
612
+ clawedBackTs: string;
613
+ /** Whether claims are closable by the claimant or not */
614
+ claimsClosableByClaimant: boolean;
615
+ /** Limit number of claims */
616
+ claimsLimit: number;
617
+ /** Buffer for additional fields */
618
+ buffer2: Array<number>;
619
+ /** Buffer for additional fields */
620
+ buffer3: Array<number>;
621
+ }
622
+ /** State for the account which distributes tokens. */
623
+ declare class MerkleDistributor {
624
+ /** Bump seed. */
625
+ readonly bump: number;
626
+ /** Version of the airdrop */
627
+ readonly version: BN;
628
+ /** The 256-bit merkle root. */
629
+ readonly root: Array<number>;
630
+ /** [Mint] of the token to be distributed. */
631
+ readonly mint: PublicKey;
632
+ /** Token Address of the vault */
633
+ readonly tokenVault: PublicKey;
634
+ /** Maximum number of tokens that can ever be claimed from this [MerkleDistributor]. */
635
+ readonly maxTotalClaim: BN;
636
+ /** Maximum number of nodes in [MerkleDistributor]. */
637
+ readonly maxNumNodes: BN;
638
+ /** Time step (period) in seconds per which the unlock occurs */
639
+ readonly unlockPeriod: BN;
640
+ /** Total amount of tokens that have been claimed. */
641
+ readonly totalAmountClaimed: BN;
642
+ /** Number of nodes that have been claimed. */
643
+ readonly numNodesClaimed: BN;
644
+ /** Lockup time start (Unix Timestamp) */
645
+ readonly startTs: BN;
646
+ /** Lockup time end (Unix Timestamp) */
647
+ readonly endTs: BN;
648
+ /** Clawback start (Unix Timestamp) */
649
+ readonly clawbackStartTs: BN;
650
+ /** Clawback receiver */
651
+ readonly clawbackReceiver: PublicKey;
652
+ /** Admin wallet */
653
+ readonly admin: PublicKey;
654
+ /** Whether or not the distributor has been clawed back */
655
+ readonly clawedBack: boolean;
656
+ /** Whether claims are closable by the admin or not */
657
+ readonly claimsClosableByAdmin: boolean;
658
+ /** Whether admin can update vesting duration */
659
+ readonly canUpdateDuration: boolean;
660
+ /** Total amount of funds unlocked (cliff/instant) */
661
+ readonly totalAmountUnlocked: BN;
662
+ /** Total amount of funds locked (vested) */
663
+ readonly totalAmountLocked: BN;
664
+ /** Timestamp when update was last called */
665
+ readonly lastDurationUpdateTs: BN;
666
+ /** Total amount of locked amount claimable as of last duration update, ever increasing total, accumulates with each update */
667
+ readonly totalClaimablePreUpdate: BN;
668
+ /** Timestamp when funds were clawed back */
669
+ readonly clawedBackTs: BN;
670
+ /** Whether claims are closable by the claimant or not */
671
+ readonly claimsClosableByClaimant: boolean;
672
+ /** Limit number of claims */
673
+ readonly claimsLimit: number;
674
+ /** Buffer for additional fields */
675
+ readonly buffer2: Array<number>;
676
+ /** Buffer for additional fields */
677
+ readonly buffer3: Array<number>;
678
+ static readonly discriminator: Buffer;
679
+ static readonly layout: any;
680
+ constructor(fields: MerkleDistributorFields);
681
+ static fetch(c: Connection, address: PublicKey, programId?: PublicKey): Promise<MerkleDistributor | null>;
682
+ static fetchMultiple(c: Connection, addresses: PublicKey[], programId?: PublicKey): Promise<Array<MerkleDistributor | null>>;
683
+ static decode(data: Buffer): MerkleDistributor;
684
+ toJSON(): MerkleDistributorJSON;
685
+ static fromJSON(obj: MerkleDistributorJSON): MerkleDistributor;
686
+ }
687
+
688
+ interface IInitOptions {
689
+ clusterUrl: string;
690
+ cluster?: ICluster;
691
+ commitment?: Commitment | ConnectionConfig;
692
+ programId?: string;
693
+ sendRate?: number;
694
+ sendThrottler?: PQueue;
695
+ }
696
+ declare abstract class BaseDistributorClient {
697
+ protected connection: Connection;
698
+ protected programId: PublicKey;
699
+ protected commitment: Commitment | ConnectionConfig;
700
+ protected sendThrottler: PQueue;
701
+ merkleDistributorProgram: Program<MerkleDistributor$1>;
702
+ constructor({ clusterUrl, cluster, commitment, programId, sendRate, sendThrottler, }: IInitOptions);
703
+ protected abstract getNewDistributorInstruction(data: ICreateDistributorData | ICreateAlignedDistributorData, accounts: NewDistributorAccounts): Promise<TransactionInstruction>;
704
+ protected abstract getClawbackInstruction(account: ClawbackAccounts): Promise<TransactionInstruction>;
705
+ getConnection(): Connection;
706
+ getCommitment(): Commitment | undefined;
707
+ getDistributorProgramId(): PublicKey;
708
+ prepareCreateInstructions(data: ICreateDistributorData | ICreateAlignedDistributorData, extParams: ITransactionSolanaExtResolved<ICreateSolanaExt>): Promise<{
709
+ distributorPublicKey: PublicKey;
710
+ ixs: TransactionInstruction[];
711
+ }>;
712
+ create(data: ICreateDistributorData | ICreateAlignedDistributorData, extParams: ICreateSolanaExt): Promise<ICreateDistributorResult>;
713
+ /**
714
+ * @public
715
+ * @overload
716
+ */
717
+ claim(data: IClaimData, extParams: IInteractSolanaExt): Promise<ITransactionResult>;
718
+ /**
719
+ * @internal
720
+ */
721
+ claim(data: IClaimData, extParams: IInteractSolanaExt, _serviceTransfer?: unknown): Promise<ITransactionResult>;
722
+ /**
723
+ * @public
724
+ * @overload
725
+ */
726
+ prepareClaimInstructions(data: IClaimData, extParams: ITransactionSolanaExtResolved<IInteractSolanaExt>): Promise<TransactionInstruction[]>;
727
+ /**
728
+ * @internal
729
+ */
730
+ prepareClaimInstructions(data: IClaimData, extParams: ITransactionSolanaExtResolved<IInteractSolanaExt>, _serviceTransfer?: unknown): Promise<TransactionInstruction[]>;
731
+ closeClaim(data: ICloseClaimData, extParams: IInteractSolanaExt): Promise<ITransactionResult>;
732
+ prepareCloseClaimInstructions(data: ICloseClaimData, extParams: ITransactionSolanaExtResolved<IInteractSolanaExt>): Promise<TransactionInstruction[]>;
733
+ prepareClawbackInstructions(data: IClawbackData, extParams: ITransactionSolanaExtResolved<IInteractSolanaExt>): Promise<TransactionInstruction[]>;
734
+ clawback(data: IClawbackData, extParams: IInteractSolanaExt): Promise<ITransactionResult>;
735
+ getClaims(data: IGetClaimData[]): Promise<(MerkleDistributorAccountTypes["claimStatus"] | MerkleDistributorAccountTypes["compressedClaimStatus"] | null)[]>;
736
+ getDistributors(data: IGetDistributors): Promise<(MerkleDistributor | null)[]>;
737
+ searchDistributors(data: ISearchDistributors): Promise<IProgramAccount<MerkleDistributor>[]>;
738
+ protected prepareClaimFeeInstruction(payer: PublicKey, fee?: bigint): TransactionInstruction;
739
+ protected getNewDistributorArgs(data: ICreateDistributorData): NewDistributorArgs;
740
+ protected unwrapExecutionParams<T extends IInteractSolanaExt>(extParams: T): ReturnType<typeof unwrapExecutionParams<T>>;
741
+ }
742
+
743
+ declare class SolanaDistributorClient extends BaseDistributorClient {
744
+ protected getNewDistributorInstruction(data: ICreateDistributorData, accounts: NewDistributorAccounts): Promise<TransactionInstruction>;
745
+ protected getClawbackInstruction(accounts: ClawbackAccounts): Promise<TransactionInstruction>;
746
+ }
747
+
748
+ declare class SolanaAlignedDistributorClient extends BaseDistributorClient {
749
+ alignedProxyProgram: Program<AlignedDistributor>;
750
+ constructor({ clusterUrl, cluster, commitment, programId, sendRate, sendThrottler }: IInitOptions);
751
+ getAlignedDistributorProgramId(): PublicKey;
752
+ getAlignedDistributorAddress(distributorAddress: string): PublicKey;
753
+ getAlignedDistributorData(distributorAddress: string): Promise<AlignedDistributorData>;
754
+ protected getNewDistributorInstruction(data: ICreateAlignedDistributorData, accounts: NewDistributorAccounts): Promise<TransactionInstruction>;
755
+ protected getClawbackInstruction(accounts: ClawbackAccounts): Promise<TransactionInstruction>;
756
+ protected getNewAlignedDistributorArgs(data: ICreateAlignedDistributorData): NewAlignedDistributorArgs;
757
+ }
758
+
759
+ type AnchorError = InstructionMissing | InstructionFallbackNotFound | InstructionDidNotDeserialize | InstructionDidNotSerialize | IdlInstructionStub | IdlInstructionInvalidProgram | ConstraintMut | ConstraintHasOne | ConstraintSigner | ConstraintRaw | ConstraintOwner | ConstraintRentExempt | ConstraintSeeds | ConstraintExecutable | ConstraintState | ConstraintAssociated | ConstraintAssociatedInit | ConstraintClose | ConstraintAddress | ConstraintZero | ConstraintTokenMint | ConstraintTokenOwner | ConstraintMintMintAuthority | ConstraintMintFreezeAuthority | ConstraintMintDecimals | ConstraintSpace | ConstraintAccountIsNone | RequireViolated | RequireEqViolated | RequireKeysEqViolated | RequireNeqViolated | RequireKeysNeqViolated | RequireGtViolated | RequireGteViolated | AccountDiscriminatorAlreadySet | AccountDiscriminatorNotFound | AccountDiscriminatorMismatch | AccountDidNotDeserialize | AccountDidNotSerialize | AccountNotEnoughKeys | AccountNotMutable | AccountOwnedByWrongProgram | InvalidProgramId | InvalidProgramExecutable | AccountNotSigner | AccountNotSystemOwned | AccountNotInitialized | AccountNotProgramData | AccountNotAssociatedTokenAccount | AccountSysvarMismatch | AccountReallocExceedsLimit | AccountDuplicateReallocs | DeclaredProgramIdMismatch | Deprecated;
760
+ declare class InstructionMissing extends Error {
761
+ readonly logs?: string[] | undefined;
762
+ static readonly code = 100;
763
+ readonly code = 100;
764
+ readonly name = "InstructionMissing";
765
+ readonly msg = "8 byte instruction identifier not provided";
766
+ constructor(logs?: string[] | undefined);
767
+ }
768
+ declare class InstructionFallbackNotFound extends Error {
769
+ readonly logs?: string[] | undefined;
770
+ static readonly code = 101;
771
+ readonly code = 101;
772
+ readonly name = "InstructionFallbackNotFound";
773
+ readonly msg = "Fallback functions are not supported";
774
+ constructor(logs?: string[] | undefined);
775
+ }
776
+ declare class InstructionDidNotDeserialize extends Error {
777
+ readonly logs?: string[] | undefined;
778
+ static readonly code = 102;
779
+ readonly code = 102;
780
+ readonly name = "InstructionDidNotDeserialize";
781
+ readonly msg = "The program could not deserialize the given instruction";
782
+ constructor(logs?: string[] | undefined);
783
+ }
784
+ declare class InstructionDidNotSerialize extends Error {
785
+ readonly logs?: string[] | undefined;
786
+ static readonly code = 103;
787
+ readonly code = 103;
788
+ readonly name = "InstructionDidNotSerialize";
789
+ readonly msg = "The program could not serialize the given instruction";
790
+ constructor(logs?: string[] | undefined);
791
+ }
792
+ declare class IdlInstructionStub extends Error {
793
+ readonly logs?: string[] | undefined;
794
+ static readonly code = 1000;
795
+ readonly code = 1000;
796
+ readonly name = "IdlInstructionStub";
797
+ readonly msg = "The program was compiled without idl instructions";
798
+ constructor(logs?: string[] | undefined);
799
+ }
800
+ declare class IdlInstructionInvalidProgram extends Error {
801
+ readonly logs?: string[] | undefined;
802
+ static readonly code = 1001;
803
+ readonly code = 1001;
804
+ readonly name = "IdlInstructionInvalidProgram";
805
+ readonly msg = "The transaction was given an invalid program for the IDL instruction";
806
+ constructor(logs?: string[] | undefined);
807
+ }
808
+ declare class ConstraintMut extends Error {
809
+ readonly logs?: string[] | undefined;
810
+ static readonly code = 2000;
811
+ readonly code = 2000;
812
+ readonly name = "ConstraintMut";
813
+ readonly msg = "A mut constraint was violated";
814
+ constructor(logs?: string[] | undefined);
815
+ }
816
+ declare class ConstraintHasOne extends Error {
817
+ readonly logs?: string[] | undefined;
818
+ static readonly code = 2001;
819
+ readonly code = 2001;
820
+ readonly name = "ConstraintHasOne";
821
+ readonly msg = "A has one constraint was violated";
822
+ constructor(logs?: string[] | undefined);
823
+ }
824
+ declare class ConstraintSigner extends Error {
825
+ readonly logs?: string[] | undefined;
826
+ static readonly code = 2002;
827
+ readonly code = 2002;
828
+ readonly name = "ConstraintSigner";
829
+ readonly msg = "A signer constraint was violated";
830
+ constructor(logs?: string[] | undefined);
831
+ }
832
+ declare class ConstraintRaw extends Error {
833
+ readonly logs?: string[] | undefined;
834
+ static readonly code = 2003;
835
+ readonly code = 2003;
836
+ readonly name = "ConstraintRaw";
837
+ readonly msg = "A raw constraint was violated";
838
+ constructor(logs?: string[] | undefined);
839
+ }
840
+ declare class ConstraintOwner extends Error {
841
+ readonly logs?: string[] | undefined;
842
+ static readonly code = 2004;
843
+ readonly code = 2004;
844
+ readonly name = "ConstraintOwner";
845
+ readonly msg = "An owner constraint was violated";
846
+ constructor(logs?: string[] | undefined);
847
+ }
848
+ declare class ConstraintRentExempt extends Error {
849
+ readonly logs?: string[] | undefined;
850
+ static readonly code = 2005;
851
+ readonly code = 2005;
852
+ readonly name = "ConstraintRentExempt";
853
+ readonly msg = "A rent exemption constraint was violated";
854
+ constructor(logs?: string[] | undefined);
855
+ }
856
+ declare class ConstraintSeeds extends Error {
857
+ readonly logs?: string[] | undefined;
858
+ static readonly code = 2006;
859
+ readonly code = 2006;
860
+ readonly name = "ConstraintSeeds";
861
+ readonly msg = "A seeds constraint was violated";
862
+ constructor(logs?: string[] | undefined);
863
+ }
864
+ declare class ConstraintExecutable extends Error {
865
+ readonly logs?: string[] | undefined;
866
+ static readonly code = 2007;
867
+ readonly code = 2007;
868
+ readonly name = "ConstraintExecutable";
869
+ readonly msg = "An executable constraint was violated";
870
+ constructor(logs?: string[] | undefined);
871
+ }
872
+ declare class ConstraintState extends Error {
873
+ readonly logs?: string[] | undefined;
874
+ static readonly code = 2008;
875
+ readonly code = 2008;
876
+ readonly name = "ConstraintState";
877
+ readonly msg = "Deprecated Error, feel free to replace with something else";
878
+ constructor(logs?: string[] | undefined);
879
+ }
880
+ declare class ConstraintAssociated extends Error {
881
+ readonly logs?: string[] | undefined;
882
+ static readonly code = 2009;
883
+ readonly code = 2009;
884
+ readonly name = "ConstraintAssociated";
885
+ readonly msg = "An associated constraint was violated";
886
+ constructor(logs?: string[] | undefined);
887
+ }
888
+ declare class ConstraintAssociatedInit extends Error {
889
+ readonly logs?: string[] | undefined;
890
+ static readonly code = 2010;
891
+ readonly code = 2010;
892
+ readonly name = "ConstraintAssociatedInit";
893
+ readonly msg = "An associated init constraint was violated";
894
+ constructor(logs?: string[] | undefined);
895
+ }
896
+ declare class ConstraintClose extends Error {
897
+ readonly logs?: string[] | undefined;
898
+ static readonly code = 2011;
899
+ readonly code = 2011;
900
+ readonly name = "ConstraintClose";
901
+ readonly msg = "A close constraint was violated";
902
+ constructor(logs?: string[] | undefined);
903
+ }
904
+ declare class ConstraintAddress extends Error {
905
+ readonly logs?: string[] | undefined;
906
+ static readonly code = 2012;
907
+ readonly code = 2012;
908
+ readonly name = "ConstraintAddress";
909
+ readonly msg = "An address constraint was violated";
910
+ constructor(logs?: string[] | undefined);
911
+ }
912
+ declare class ConstraintZero extends Error {
913
+ readonly logs?: string[] | undefined;
914
+ static readonly code = 2013;
915
+ readonly code = 2013;
916
+ readonly name = "ConstraintZero";
917
+ readonly msg = "Expected zero account discriminant";
918
+ constructor(logs?: string[] | undefined);
919
+ }
920
+ declare class ConstraintTokenMint extends Error {
921
+ readonly logs?: string[] | undefined;
922
+ static readonly code = 2014;
923
+ readonly code = 2014;
924
+ readonly name = "ConstraintTokenMint";
925
+ readonly msg = "A token mint constraint was violated";
926
+ constructor(logs?: string[] | undefined);
927
+ }
928
+ declare class ConstraintTokenOwner extends Error {
929
+ readonly logs?: string[] | undefined;
930
+ static readonly code = 2015;
931
+ readonly code = 2015;
932
+ readonly name = "ConstraintTokenOwner";
933
+ readonly msg = "A token owner constraint was violated";
934
+ constructor(logs?: string[] | undefined);
935
+ }
936
+ declare class ConstraintMintMintAuthority extends Error {
937
+ readonly logs?: string[] | undefined;
938
+ static readonly code = 2016;
939
+ readonly code = 2016;
940
+ readonly name = "ConstraintMintMintAuthority";
941
+ readonly msg = "A mint mint authority constraint was violated";
942
+ constructor(logs?: string[] | undefined);
943
+ }
944
+ declare class ConstraintMintFreezeAuthority extends Error {
945
+ readonly logs?: string[] | undefined;
946
+ static readonly code = 2017;
947
+ readonly code = 2017;
948
+ readonly name = "ConstraintMintFreezeAuthority";
949
+ readonly msg = "A mint freeze authority constraint was violated";
950
+ constructor(logs?: string[] | undefined);
951
+ }
952
+ declare class ConstraintMintDecimals extends Error {
953
+ readonly logs?: string[] | undefined;
954
+ static readonly code = 2018;
955
+ readonly code = 2018;
956
+ readonly name = "ConstraintMintDecimals";
957
+ readonly msg = "A mint decimals constraint was violated";
958
+ constructor(logs?: string[] | undefined);
959
+ }
960
+ declare class ConstraintSpace extends Error {
961
+ readonly logs?: string[] | undefined;
962
+ static readonly code = 2019;
963
+ readonly code = 2019;
964
+ readonly name = "ConstraintSpace";
965
+ readonly msg = "A space constraint was violated";
966
+ constructor(logs?: string[] | undefined);
967
+ }
968
+ declare class ConstraintAccountIsNone extends Error {
969
+ readonly logs?: string[] | undefined;
970
+ static readonly code = 2020;
971
+ readonly code = 2020;
972
+ readonly name = "ConstraintAccountIsNone";
973
+ readonly msg = "A required account for the constraint is None";
974
+ constructor(logs?: string[] | undefined);
975
+ }
976
+ declare class RequireViolated extends Error {
977
+ readonly logs?: string[] | undefined;
978
+ static readonly code = 2500;
979
+ readonly code = 2500;
980
+ readonly name = "RequireViolated";
981
+ readonly msg = "A require expression was violated";
982
+ constructor(logs?: string[] | undefined);
983
+ }
984
+ declare class RequireEqViolated extends Error {
985
+ readonly logs?: string[] | undefined;
986
+ static readonly code = 2501;
987
+ readonly code = 2501;
988
+ readonly name = "RequireEqViolated";
989
+ readonly msg = "A require_eq expression was violated";
990
+ constructor(logs?: string[] | undefined);
991
+ }
992
+ declare class RequireKeysEqViolated extends Error {
993
+ readonly logs?: string[] | undefined;
994
+ static readonly code = 2502;
995
+ readonly code = 2502;
996
+ readonly name = "RequireKeysEqViolated";
997
+ readonly msg = "A require_keys_eq expression was violated";
998
+ constructor(logs?: string[] | undefined);
999
+ }
1000
+ declare class RequireNeqViolated extends Error {
1001
+ readonly logs?: string[] | undefined;
1002
+ static readonly code = 2503;
1003
+ readonly code = 2503;
1004
+ readonly name = "RequireNeqViolated";
1005
+ readonly msg = "A require_neq expression was violated";
1006
+ constructor(logs?: string[] | undefined);
1007
+ }
1008
+ declare class RequireKeysNeqViolated extends Error {
1009
+ readonly logs?: string[] | undefined;
1010
+ static readonly code = 2504;
1011
+ readonly code = 2504;
1012
+ readonly name = "RequireKeysNeqViolated";
1013
+ readonly msg = "A require_keys_neq expression was violated";
1014
+ constructor(logs?: string[] | undefined);
1015
+ }
1016
+ declare class RequireGtViolated extends Error {
1017
+ readonly logs?: string[] | undefined;
1018
+ static readonly code = 2505;
1019
+ readonly code = 2505;
1020
+ readonly name = "RequireGtViolated";
1021
+ readonly msg = "A require_gt expression was violated";
1022
+ constructor(logs?: string[] | undefined);
1023
+ }
1024
+ declare class RequireGteViolated extends Error {
1025
+ readonly logs?: string[] | undefined;
1026
+ static readonly code = 2506;
1027
+ readonly code = 2506;
1028
+ readonly name = "RequireGteViolated";
1029
+ readonly msg = "A require_gte expression was violated";
1030
+ constructor(logs?: string[] | undefined);
1031
+ }
1032
+ declare class AccountDiscriminatorAlreadySet extends Error {
1033
+ readonly logs?: string[] | undefined;
1034
+ static readonly code = 3000;
1035
+ readonly code = 3000;
1036
+ readonly name = "AccountDiscriminatorAlreadySet";
1037
+ readonly msg = "The account discriminator was already set on this account";
1038
+ constructor(logs?: string[] | undefined);
1039
+ }
1040
+ declare class AccountDiscriminatorNotFound extends Error {
1041
+ readonly logs?: string[] | undefined;
1042
+ static readonly code = 3001;
1043
+ readonly code = 3001;
1044
+ readonly name = "AccountDiscriminatorNotFound";
1045
+ readonly msg = "No 8 byte discriminator was found on the account";
1046
+ constructor(logs?: string[] | undefined);
1047
+ }
1048
+ declare class AccountDiscriminatorMismatch extends Error {
1049
+ readonly logs?: string[] | undefined;
1050
+ static readonly code = 3002;
1051
+ readonly code = 3002;
1052
+ readonly name = "AccountDiscriminatorMismatch";
1053
+ readonly msg = "8 byte discriminator did not match what was expected";
1054
+ constructor(logs?: string[] | undefined);
1055
+ }
1056
+ declare class AccountDidNotDeserialize extends Error {
1057
+ readonly logs?: string[] | undefined;
1058
+ static readonly code = 3003;
1059
+ readonly code = 3003;
1060
+ readonly name = "AccountDidNotDeserialize";
1061
+ readonly msg = "Failed to deserialize the account";
1062
+ constructor(logs?: string[] | undefined);
1063
+ }
1064
+ declare class AccountDidNotSerialize extends Error {
1065
+ readonly logs?: string[] | undefined;
1066
+ static readonly code = 3004;
1067
+ readonly code = 3004;
1068
+ readonly name = "AccountDidNotSerialize";
1069
+ readonly msg = "Failed to serialize the account";
1070
+ constructor(logs?: string[] | undefined);
1071
+ }
1072
+ declare class AccountNotEnoughKeys extends Error {
1073
+ readonly logs?: string[] | undefined;
1074
+ static readonly code = 3005;
1075
+ readonly code = 3005;
1076
+ readonly name = "AccountNotEnoughKeys";
1077
+ readonly msg = "Not enough account keys given to the instruction";
1078
+ constructor(logs?: string[] | undefined);
1079
+ }
1080
+ declare class AccountNotMutable extends Error {
1081
+ readonly logs?: string[] | undefined;
1082
+ static readonly code = 3006;
1083
+ readonly code = 3006;
1084
+ readonly name = "AccountNotMutable";
1085
+ readonly msg = "The given account is not mutable";
1086
+ constructor(logs?: string[] | undefined);
1087
+ }
1088
+ declare class AccountOwnedByWrongProgram extends Error {
1089
+ readonly logs?: string[] | undefined;
1090
+ static readonly code = 3007;
1091
+ readonly code = 3007;
1092
+ readonly name = "AccountOwnedByWrongProgram";
1093
+ readonly msg = "The given account is owned by a different program than expected";
1094
+ constructor(logs?: string[] | undefined);
1095
+ }
1096
+ declare class InvalidProgramId extends Error {
1097
+ readonly logs?: string[] | undefined;
1098
+ static readonly code = 3008;
1099
+ readonly code = 3008;
1100
+ readonly name = "InvalidProgramId";
1101
+ readonly msg = "Program ID was not as expected";
1102
+ constructor(logs?: string[] | undefined);
1103
+ }
1104
+ declare class InvalidProgramExecutable extends Error {
1105
+ readonly logs?: string[] | undefined;
1106
+ static readonly code = 3009;
1107
+ readonly code = 3009;
1108
+ readonly name = "InvalidProgramExecutable";
1109
+ readonly msg = "Program account is not executable";
1110
+ constructor(logs?: string[] | undefined);
1111
+ }
1112
+ declare class AccountNotSigner extends Error {
1113
+ readonly logs?: string[] | undefined;
1114
+ static readonly code = 3010;
1115
+ readonly code = 3010;
1116
+ readonly name = "AccountNotSigner";
1117
+ readonly msg = "The given account did not sign";
1118
+ constructor(logs?: string[] | undefined);
1119
+ }
1120
+ declare class AccountNotSystemOwned extends Error {
1121
+ readonly logs?: string[] | undefined;
1122
+ static readonly code = 3011;
1123
+ readonly code = 3011;
1124
+ readonly name = "AccountNotSystemOwned";
1125
+ readonly msg = "The given account is not owned by the system program";
1126
+ constructor(logs?: string[] | undefined);
1127
+ }
1128
+ declare class AccountNotInitialized extends Error {
1129
+ readonly logs?: string[] | undefined;
1130
+ static readonly code = 3012;
1131
+ readonly code = 3012;
1132
+ readonly name = "AccountNotInitialized";
1133
+ readonly msg = "The program expected this account to be already initialized";
1134
+ constructor(logs?: string[] | undefined);
1135
+ }
1136
+ declare class AccountNotProgramData extends Error {
1137
+ readonly logs?: string[] | undefined;
1138
+ static readonly code = 3013;
1139
+ readonly code = 3013;
1140
+ readonly name = "AccountNotProgramData";
1141
+ readonly msg = "The given account is not a program data account";
1142
+ constructor(logs?: string[] | undefined);
1143
+ }
1144
+ declare class AccountNotAssociatedTokenAccount extends Error {
1145
+ readonly logs?: string[] | undefined;
1146
+ static readonly code = 3014;
1147
+ readonly code = 3014;
1148
+ readonly name = "AccountNotAssociatedTokenAccount";
1149
+ readonly msg = "The given account is not the associated token account";
1150
+ constructor(logs?: string[] | undefined);
1151
+ }
1152
+ declare class AccountSysvarMismatch extends Error {
1153
+ readonly logs?: string[] | undefined;
1154
+ static readonly code = 3015;
1155
+ readonly code = 3015;
1156
+ readonly name = "AccountSysvarMismatch";
1157
+ readonly msg = "The given public key does not match the required sysvar";
1158
+ constructor(logs?: string[] | undefined);
1159
+ }
1160
+ declare class AccountReallocExceedsLimit extends Error {
1161
+ readonly logs?: string[] | undefined;
1162
+ static readonly code = 3016;
1163
+ readonly code = 3016;
1164
+ readonly name = "AccountReallocExceedsLimit";
1165
+ readonly msg = "The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit";
1166
+ constructor(logs?: string[] | undefined);
1167
+ }
1168
+ declare class AccountDuplicateReallocs extends Error {
1169
+ readonly logs?: string[] | undefined;
1170
+ static readonly code = 3017;
1171
+ readonly code = 3017;
1172
+ readonly name = "AccountDuplicateReallocs";
1173
+ readonly msg = "The account was duplicated for more than one reallocation";
1174
+ constructor(logs?: string[] | undefined);
1175
+ }
1176
+ declare class DeclaredProgramIdMismatch extends Error {
1177
+ readonly logs?: string[] | undefined;
1178
+ static readonly code = 4100;
1179
+ readonly code = 4100;
1180
+ readonly name = "DeclaredProgramIdMismatch";
1181
+ readonly msg = "The declared program id does not match the actual program id";
1182
+ constructor(logs?: string[] | undefined);
1183
+ }
1184
+ declare class Deprecated extends Error {
1185
+ readonly logs?: string[] | undefined;
1186
+ static readonly code = 5000;
1187
+ readonly code = 5000;
1188
+ readonly name = "Deprecated";
1189
+ readonly msg = "The API being used is deprecated and should no longer be used";
1190
+ constructor(logs?: string[] | undefined);
1191
+ }
1192
+
1193
+ type CustomError = InsufficientUnlockedTokens | InvalidProof | ExceededMaxClaim | MaxNodesExceeded | Unauthorized | OwnerMismatch | ClawbackBeforeStart | ClawbackAlreadyClaimed | SameClawbackReceiver | ClawbackReceiverIsTokenVault | SameAdmin | ClaimExpired | ArithmeticError | StartTimestampAfterEnd | TimestampsNotInFuture | InvalidMint | ClaimIsClosed | ClaimsAreNotClosable | InvalidUnlockPeriod | DurationUpdateNotAllowed | NoVestingAmount | VestingAlreadyFinished | InvalidAmounts | ClaimsLimitReached;
1194
+ declare class InsufficientUnlockedTokens extends Error {
1195
+ readonly logs?: string[] | undefined;
1196
+ static readonly code = 6000;
1197
+ readonly code = 6000;
1198
+ readonly name = "InsufficientUnlockedTokens";
1199
+ readonly msg = "Insufficient unlocked tokens";
1200
+ constructor(logs?: string[] | undefined);
1201
+ }
1202
+ declare class InvalidProof extends Error {
1203
+ readonly logs?: string[] | undefined;
1204
+ static readonly code = 6001;
1205
+ readonly code = 6001;
1206
+ readonly name = "InvalidProof";
1207
+ readonly msg = "Invalid Merkle proof";
1208
+ constructor(logs?: string[] | undefined);
1209
+ }
1210
+ declare class ExceededMaxClaim extends Error {
1211
+ readonly logs?: string[] | undefined;
1212
+ static readonly code = 6002;
1213
+ readonly code = 6002;
1214
+ readonly name = "ExceededMaxClaim";
1215
+ readonly msg = "Exceeded maximum claim amount";
1216
+ constructor(logs?: string[] | undefined);
1217
+ }
1218
+ declare class MaxNodesExceeded extends Error {
1219
+ readonly logs?: string[] | undefined;
1220
+ static readonly code = 6003;
1221
+ readonly code = 6003;
1222
+ readonly name = "MaxNodesExceeded";
1223
+ readonly msg = "Exceeded maximum node count";
1224
+ constructor(logs?: string[] | undefined);
1225
+ }
1226
+ declare class Unauthorized extends Error {
1227
+ readonly logs?: string[] | undefined;
1228
+ static readonly code = 6004;
1229
+ readonly code = 6004;
1230
+ readonly name = "Unauthorized";
1231
+ readonly msg = "Account is not authorized to execute this instruction";
1232
+ constructor(logs?: string[] | undefined);
1233
+ }
1234
+ declare class OwnerMismatch extends Error {
1235
+ readonly logs?: string[] | undefined;
1236
+ static readonly code = 6005;
1237
+ readonly code = 6005;
1238
+ readonly name = "OwnerMismatch";
1239
+ readonly msg = "Token account owner did not match intended owner";
1240
+ constructor(logs?: string[] | undefined);
1241
+ }
1242
+ declare class ClawbackBeforeStart extends Error {
1243
+ readonly logs?: string[] | undefined;
1244
+ static readonly code = 6006;
1245
+ readonly code = 6006;
1246
+ readonly name = "ClawbackBeforeStart";
1247
+ readonly msg = "Attempted clawback before start";
1248
+ constructor(logs?: string[] | undefined);
1249
+ }
1250
+ declare class ClawbackAlreadyClaimed extends Error {
1251
+ readonly logs?: string[] | undefined;
1252
+ static readonly code = 6007;
1253
+ readonly code = 6007;
1254
+ readonly name = "ClawbackAlreadyClaimed";
1255
+ readonly msg = "Clawback already claimed";
1256
+ constructor(logs?: string[] | undefined);
1257
+ }
1258
+ declare class SameClawbackReceiver extends Error {
1259
+ readonly logs?: string[] | undefined;
1260
+ static readonly code = 6008;
1261
+ readonly code = 6008;
1262
+ readonly name = "SameClawbackReceiver";
1263
+ readonly msg = "New and old Clawback receivers are identical";
1264
+ constructor(logs?: string[] | undefined);
1265
+ }
1266
+ declare class ClawbackReceiverIsTokenVault extends Error {
1267
+ readonly logs?: string[] | undefined;
1268
+ static readonly code = 6009;
1269
+ readonly code = 6009;
1270
+ readonly name = "ClawbackReceiverIsTokenVault";
1271
+ readonly msg = "Clawback receiver can not be the Token Vault";
1272
+ constructor(logs?: string[] | undefined);
1273
+ }
1274
+ declare class SameAdmin extends Error {
1275
+ readonly logs?: string[] | undefined;
1276
+ static readonly code = 6010;
1277
+ readonly code = 6010;
1278
+ readonly name = "SameAdmin";
1279
+ readonly msg = "New and old admin are identical";
1280
+ constructor(logs?: string[] | undefined);
1281
+ }
1282
+ declare class ClaimExpired extends Error {
1283
+ readonly logs?: string[] | undefined;
1284
+ static readonly code = 6011;
1285
+ readonly code = 6011;
1286
+ readonly name = "ClaimExpired";
1287
+ readonly msg = "Claim window expired";
1288
+ constructor(logs?: string[] | undefined);
1289
+ }
1290
+ declare class ArithmeticError extends Error {
1291
+ readonly logs?: string[] | undefined;
1292
+ static readonly code = 6012;
1293
+ readonly code = 6012;
1294
+ readonly name = "ArithmeticError";
1295
+ readonly msg = "Arithmetic Error (overflow/underflow)";
1296
+ constructor(logs?: string[] | undefined);
1297
+ }
1298
+ declare class StartTimestampAfterEnd extends Error {
1299
+ readonly logs?: string[] | undefined;
1300
+ static readonly code = 6013;
1301
+ readonly code = 6013;
1302
+ readonly name = "StartTimestampAfterEnd";
1303
+ readonly msg = "Start Timestamp cannot be after end Timestamp";
1304
+ constructor(logs?: string[] | undefined);
1305
+ }
1306
+ declare class TimestampsNotInFuture extends Error {
1307
+ readonly logs?: string[] | undefined;
1308
+ static readonly code = 6014;
1309
+ readonly code = 6014;
1310
+ readonly name = "TimestampsNotInFuture";
1311
+ readonly msg = "Timestamps cannot be in the past";
1312
+ constructor(logs?: string[] | undefined);
1313
+ }
1314
+ declare class InvalidMint extends Error {
1315
+ readonly logs?: string[] | undefined;
1316
+ static readonly code = 6015;
1317
+ readonly code = 6015;
1318
+ readonly name = "InvalidMint";
1319
+ readonly msg = "Invalid Mint";
1320
+ constructor(logs?: string[] | undefined);
1321
+ }
1322
+ declare class ClaimIsClosed extends Error {
1323
+ readonly logs?: string[] | undefined;
1324
+ static readonly code = 6016;
1325
+ readonly code = 6016;
1326
+ readonly name = "ClaimIsClosed";
1327
+ readonly msg = "Claim is closed";
1328
+ constructor(logs?: string[] | undefined);
1329
+ }
1330
+ declare class ClaimsAreNotClosable extends Error {
1331
+ readonly logs?: string[] | undefined;
1332
+ static readonly code = 6017;
1333
+ readonly code = 6017;
1334
+ readonly name = "ClaimsAreNotClosable";
1335
+ readonly msg = "Claims are not closable";
1336
+ constructor(logs?: string[] | undefined);
1337
+ }
1338
+ declare class InvalidUnlockPeriod extends Error {
1339
+ readonly logs?: string[] | undefined;
1340
+ static readonly code = 6018;
1341
+ readonly code = 6018;
1342
+ readonly name = "InvalidUnlockPeriod";
1343
+ readonly msg = "Invalid unlock period";
1344
+ constructor(logs?: string[] | undefined);
1345
+ }
1346
+ declare class DurationUpdateNotAllowed extends Error {
1347
+ readonly logs?: string[] | undefined;
1348
+ static readonly code = 6019;
1349
+ readonly code = 6019;
1350
+ readonly name = "DurationUpdateNotAllowed";
1351
+ readonly msg = "Duration update is not allowed";
1352
+ constructor(logs?: string[] | undefined);
1353
+ }
1354
+ declare class NoVestingAmount extends Error {
1355
+ readonly logs?: string[] | undefined;
1356
+ static readonly code = 6020;
1357
+ readonly code = 6020;
1358
+ readonly name = "NoVestingAmount";
1359
+ readonly msg = "Vesting amounts are not set";
1360
+ constructor(logs?: string[] | undefined);
1361
+ }
1362
+ declare class VestingAlreadyFinished extends Error {
1363
+ readonly logs?: string[] | undefined;
1364
+ static readonly code = 6021;
1365
+ readonly code = 6021;
1366
+ readonly name = "VestingAlreadyFinished";
1367
+ readonly msg = "Vesting already finished";
1368
+ constructor(logs?: string[] | undefined);
1369
+ }
1370
+ declare class InvalidAmounts extends Error {
1371
+ readonly logs?: string[] | undefined;
1372
+ static readonly code = 6022;
1373
+ readonly code = 6022;
1374
+ readonly name = "InvalidAmounts";
1375
+ readonly msg = "Provided amounts are invalid";
1376
+ constructor(logs?: string[] | undefined);
1377
+ }
1378
+ declare class ClaimsLimitReached extends Error {
1379
+ readonly logs?: string[] | undefined;
1380
+ static readonly code = 6023;
1381
+ readonly code = 6023;
1382
+ readonly name = "ClaimsLimitReached";
1383
+ readonly msg = "Claims limit has been reached";
1384
+ constructor(logs?: string[] | undefined);
1385
+ }
1386
+
1387
+ declare function fromCode(code: number, logs?: string[]): CustomError | AnchorError | null;
1388
+ declare function fromTxError(err: unknown, programId?: PublicKey): CustomError | AnchorError | null;
1389
+
1390
+ declare const getAlignedDistributorPda: (programId: PublicKey, distributor: PublicKey) => PublicKey;
1391
+ declare const getTestOraclePda: (programId: PublicKey, mint: PublicKey, creator: PublicKey) => PublicKey;
1392
+ declare function getDistributorPda(programId: PublicKey, mint: PublicKey, version: number): PublicKey;
1393
+ declare function getClaimantStatusPda(programId: PublicKey, distributor: PublicKey, claimant: PublicKey): PublicKey;
1394
+ declare function getEventAuthorityPda(programId: PublicKey): PublicKey;
1395
+ declare function wrappedSignAndExecuteTransaction(...args: Parameters<typeof signAndExecuteTransaction>): Promise<string>;
1396
+ declare function calculateAmountWithTransferFees(connection: Connection, transferFeeConfig: TransferFeeConfig, transferAmount: bigint): Promise<{
1397
+ transferAmount: bigint;
1398
+ feeCharged: bigint;
1399
+ }>;
1400
+
1401
+ declare const ANCHOR_DISCRIMINATOR_OFFSET = 8;
1402
+ declare const DISTRIBUTOR_MINT_OFFSET: number;
1403
+ declare const DISTRIBUTOR_ADMIN_OFFSET: number;
1404
+ declare const DISTRIBUTOR_PREFIX: Buffer;
1405
+ declare const ALIGNED_DISTRIBUTOR_PREFIX: Buffer;
1406
+ declare const TEST_ORACLE_PREFIX: Buffer;
1407
+ declare const CLAIM_STATUS_PREFIX: Buffer;
1408
+ declare const ALIGNED_PRECISION_FACTOR_POW = 9;
1409
+ declare const AIRDROP_CLAIM_FEE: bigint;
1410
+ declare const STREAMFLOW_TREASURY_PUBLIC_KEY: PublicKey;
1411
+ declare const ONE_IN_BASIS_POINTS: bigint;
1412
+ declare const ALIGNED_DISTRIBUTOR_PROGRAM_ID: {
1413
+ devnet: string;
1414
+ mainnet: string;
1415
+ testnet: string;
1416
+ local: string;
1417
+ };
1418
+ declare const DISTRIBUTOR_PROGRAM_ID: {
1419
+ devnet: string;
1420
+ mainnet: string;
1421
+ testnet: string;
1422
+ local: string;
1423
+ };
1424
+
1425
+ declare const constants_AIRDROP_CLAIM_FEE: typeof AIRDROP_CLAIM_FEE;
1426
+ declare const constants_ALIGNED_DISTRIBUTOR_PREFIX: typeof ALIGNED_DISTRIBUTOR_PREFIX;
1427
+ declare const constants_ALIGNED_DISTRIBUTOR_PROGRAM_ID: typeof ALIGNED_DISTRIBUTOR_PROGRAM_ID;
1428
+ declare const constants_ALIGNED_PRECISION_FACTOR_POW: typeof ALIGNED_PRECISION_FACTOR_POW;
1429
+ declare const constants_ANCHOR_DISCRIMINATOR_OFFSET: typeof ANCHOR_DISCRIMINATOR_OFFSET;
1430
+ declare const constants_CLAIM_STATUS_PREFIX: typeof CLAIM_STATUS_PREFIX;
1431
+ declare const constants_DISTRIBUTOR_ADMIN_OFFSET: typeof DISTRIBUTOR_ADMIN_OFFSET;
1432
+ declare const constants_DISTRIBUTOR_MINT_OFFSET: typeof DISTRIBUTOR_MINT_OFFSET;
1433
+ declare const constants_DISTRIBUTOR_PREFIX: typeof DISTRIBUTOR_PREFIX;
1434
+ declare const constants_DISTRIBUTOR_PROGRAM_ID: typeof DISTRIBUTOR_PROGRAM_ID;
1435
+ declare const constants_ONE_IN_BASIS_POINTS: typeof ONE_IN_BASIS_POINTS;
1436
+ declare const constants_STREAMFLOW_TREASURY_PUBLIC_KEY: typeof STREAMFLOW_TREASURY_PUBLIC_KEY;
1437
+ declare const constants_TEST_ORACLE_PREFIX: typeof TEST_ORACLE_PREFIX;
1438
+ declare namespace constants {
1439
+ export { constants_AIRDROP_CLAIM_FEE as AIRDROP_CLAIM_FEE, constants_ALIGNED_DISTRIBUTOR_PREFIX as ALIGNED_DISTRIBUTOR_PREFIX, constants_ALIGNED_DISTRIBUTOR_PROGRAM_ID as ALIGNED_DISTRIBUTOR_PROGRAM_ID, constants_ALIGNED_PRECISION_FACTOR_POW as ALIGNED_PRECISION_FACTOR_POW, constants_ANCHOR_DISCRIMINATOR_OFFSET as ANCHOR_DISCRIMINATOR_OFFSET, constants_CLAIM_STATUS_PREFIX as CLAIM_STATUS_PREFIX, constants_DISTRIBUTOR_ADMIN_OFFSET as DISTRIBUTOR_ADMIN_OFFSET, constants_DISTRIBUTOR_MINT_OFFSET as DISTRIBUTOR_MINT_OFFSET, constants_DISTRIBUTOR_PREFIX as DISTRIBUTOR_PREFIX, constants_DISTRIBUTOR_PROGRAM_ID as DISTRIBUTOR_PROGRAM_ID, constants_ONE_IN_BASIS_POINTS as ONE_IN_BASIS_POINTS, constants_STREAMFLOW_TREASURY_PUBLIC_KEY as STREAMFLOW_TREASURY_PUBLIC_KEY, constants_TEST_ORACLE_PREFIX as TEST_ORACLE_PREFIX };
1440
+ }
1441
+
1442
+ type index_AlignedDistributorData = AlignedDistributorData;
1443
+ type index_AnchorErrorCode = AnchorErrorCode;
1444
+ declare const index_AnchorErrorCode: typeof AnchorErrorCode;
1445
+ type index_ClaimLockedAccounts = ClaimLockedAccounts;
1446
+ type index_ClaimStatus = ClaimStatus;
1447
+ declare const index_ClaimStatus: typeof ClaimStatus;
1448
+ type index_ClaimStatusFields = ClaimStatusFields;
1449
+ type index_ClaimStatusJSON = ClaimStatusJSON;
1450
+ type index_ClawbackAccounts = ClawbackAccounts;
1451
+ type index_CloseClaimAccounts = CloseClaimAccounts;
1452
+ type index_ContractErrorCode = ContractErrorCode;
1453
+ declare const index_ContractErrorCode: typeof ContractErrorCode;
1454
+ type index_IClaimData = IClaimData;
1455
+ type index_IClawbackData = IClawbackData;
1456
+ type index_ICloseClaimData = ICloseClaimData;
1457
+ type index_ICreateAlignedDistributorData = ICreateAlignedDistributorData;
1458
+ type index_ICreateDistributorData = ICreateDistributorData;
1459
+ type index_ICreateDistributorResult = ICreateDistributorResult;
1460
+ type index_ICreateSolanaExt = ICreateSolanaExt;
1461
+ type index_IGetClaimData = IGetClaimData;
1462
+ type index_IGetDistributors = IGetDistributors;
1463
+ type index_IInteractSolanaExt = IInteractSolanaExt;
1464
+ type index_ISearchDistributors = ISearchDistributors;
1465
+ type index_ISetClawbackReceiverData = ISetClawbackReceiverData;
1466
+ type index_ISetDataAdmin = ISetDataAdmin;
1467
+ type index_MerkleDistributor = MerkleDistributor;
1468
+ declare const index_MerkleDistributor: typeof MerkleDistributor;
1469
+ type index_MerkleDistributorAccountTypes = MerkleDistributorAccountTypes;
1470
+ type index_MerkleDistributorFields = MerkleDistributorFields;
1471
+ type index_MerkleDistributorJSON = MerkleDistributorJSON;
1472
+ type index_NewAlignedDistributorArgs = NewAlignedDistributorArgs;
1473
+ type index_NewClaimAccounts = NewClaimAccounts;
1474
+ type index_NewClaimArgs = NewClaimArgs;
1475
+ type index_NewDistributorAccounts = NewDistributorAccounts;
1476
+ type index_NewDistributorArgs = NewDistributorArgs;
1477
+ type index_OracleType = OracleType;
1478
+ type index_OracleTypeName = OracleTypeName;
1479
+ type index_SetAdminAccounts = SetAdminAccounts;
1480
+ type index_SetClawbackReceiverAccounts = SetClawbackReceiverAccounts;
1481
+ type index_SolanaAlignedDistributorClient = SolanaAlignedDistributorClient;
1482
+ declare const index_SolanaAlignedDistributorClient: typeof SolanaAlignedDistributorClient;
1483
+ type index_SolanaDistributorClient = SolanaDistributorClient;
1484
+ declare const index_SolanaDistributorClient: typeof SolanaDistributorClient;
1485
+ declare const index_calculateAmountWithTransferFees: typeof calculateAmountWithTransferFees;
1486
+ declare const index_claimLocked: typeof claimLocked;
1487
+ declare const index_clawback: typeof clawback;
1488
+ declare const index_closeClaim: typeof closeClaim;
1489
+ declare const index_constants: typeof constants;
1490
+ declare const index_fromCode: typeof fromCode;
1491
+ declare const index_fromTxError: typeof fromTxError;
1492
+ declare const index_getAlignedDistributorPda: typeof getAlignedDistributorPda;
1493
+ declare const index_getClaimantStatusPda: typeof getClaimantStatusPda;
1494
+ declare const index_getDistributorPda: typeof getDistributorPda;
1495
+ declare const index_getEventAuthorityPda: typeof getEventAuthorityPda;
1496
+ declare const index_getTestOraclePda: typeof getTestOraclePda;
1497
+ declare const index_newClaim: typeof newClaim;
1498
+ declare const index_newDistributor: typeof newDistributor;
1499
+ declare const index_setAdmin: typeof setAdmin;
1500
+ declare const index_setClawbackReceiver: typeof setClawbackReceiver;
1501
+ declare const index_wrappedSignAndExecuteTransaction: typeof wrappedSignAndExecuteTransaction;
1502
+ declare namespace index {
1503
+ export { type index_AlignedDistributorData as AlignedDistributorData, index_AnchorErrorCode as AnchorErrorCode, type index_ClaimLockedAccounts as ClaimLockedAccounts, index_ClaimStatus as ClaimStatus, type index_ClaimStatusFields as ClaimStatusFields, type index_ClaimStatusJSON as ClaimStatusJSON, type index_ClawbackAccounts as ClawbackAccounts, type index_CloseClaimAccounts as CloseClaimAccounts, index_ContractErrorCode as ContractErrorCode, type index_IClaimData as IClaimData, type index_IClawbackData as IClawbackData, type index_ICloseClaimData as ICloseClaimData, type index_ICreateAlignedDistributorData as ICreateAlignedDistributorData, type index_ICreateDistributorData as ICreateDistributorData, type index_ICreateDistributorResult as ICreateDistributorResult, type index_ICreateSolanaExt as ICreateSolanaExt, type index_IGetClaimData as IGetClaimData, type index_IGetDistributors as IGetDistributors, type index_IInteractSolanaExt as IInteractSolanaExt, type index_ISearchDistributors as ISearchDistributors, type index_ISetClawbackReceiverData as ISetClawbackReceiverData, type index_ISetDataAdmin as ISetDataAdmin, index_MerkleDistributor as MerkleDistributor, type index_MerkleDistributorAccountTypes as MerkleDistributorAccountTypes, type index_MerkleDistributorFields as MerkleDistributorFields, type index_MerkleDistributorJSON as MerkleDistributorJSON, type index_NewAlignedDistributorArgs as NewAlignedDistributorArgs, type index_NewClaimAccounts as NewClaimAccounts, type index_NewClaimArgs as NewClaimArgs, type index_NewDistributorAccounts as NewDistributorAccounts, type index_NewDistributorArgs as NewDistributorArgs, type index_OracleType as OracleType, type index_OracleTypeName as OracleTypeName, type index_SetAdminAccounts as SetAdminAccounts, type index_SetClawbackReceiverAccounts as SetClawbackReceiverAccounts, index_SolanaAlignedDistributorClient as SolanaAlignedDistributorClient, index_SolanaDistributorClient as SolanaDistributorClient, index_calculateAmountWithTransferFees as calculateAmountWithTransferFees, index_claimLocked as claimLocked, index_clawback as clawback, index_closeClaim as closeClaim, index_constants as constants, index_fromCode as fromCode, index_fromTxError as fromTxError, index_getAlignedDistributorPda as getAlignedDistributorPda, index_getClaimantStatusPda as getClaimantStatusPda, index_getDistributorPda as getDistributorPda, index_getEventAuthorityPda as getEventAuthorityPda, index_getTestOraclePda as getTestOraclePda, index_newClaim as newClaim, index_newDistributor as newDistributor, index_setAdmin as setAdmin, index_setClawbackReceiver as setClawbackReceiver, index_wrappedSignAndExecuteTransaction as wrappedSignAndExecuteTransaction };
1504
+ }
1505
+
1506
+ export { type AlignedDistributorData, AnchorErrorCode, type ClaimLockedAccounts, ClaimStatus, type ClaimStatusFields, type ClaimStatusJSON, type ClawbackAccounts, type CloseClaimAccounts, ContractErrorCode, type IClaimData, type IClawbackData, type ICloseClaimData, type ICreateAlignedDistributorData, type ICreateDistributorData, type ICreateDistributorResult, type ICreateSolanaExt, type IGetClaimData, type IGetDistributors, type IInteractSolanaExt, type ISearchDistributors, type ISetClawbackReceiverData, type ISetDataAdmin, MerkleDistributor, type MerkleDistributorAccountTypes, type MerkleDistributorFields, type MerkleDistributorJSON, type NewAlignedDistributorArgs, type NewClaimAccounts, type NewClaimArgs, type NewDistributorAccounts, type NewDistributorArgs, type OracleType, type OracleTypeName, type SetAdminAccounts, type SetClawbackReceiverAccounts, SolanaAlignedDistributorClient, SolanaDistributorClient, calculateAmountWithTransferFees, claimLocked, clawback, closeClaim, constants, fromCode, fromTxError, getAlignedDistributorPda, getClaimantStatusPda, getDistributorPda, getEventAuthorityPda, getTestOraclePda, index as i, newClaim, newDistributor, setAdmin, setClawbackReceiver, wrappedSignAndExecuteTransaction };