@streamflow/distributor 7.5.2 → 7.5.3-alpha.cffa362.20250508190445

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 (98) hide show
  1. package/dist/cjs/index.cjs +3073 -0
  2. package/dist/cjs/index.cjs.map +1 -0
  3. package/dist/cjs/index.d.cts +10 -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/aligned_distributor.d.cts +932 -0
  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 +1128 -0
  10. package/dist/cjs/solana/index.cjs +3067 -0
  11. package/dist/cjs/solana/index.cjs.map +1 -0
  12. package/dist/cjs/solana/index.d.cts +1485 -0
  13. package/dist/esm/index.d.ts +10 -1
  14. package/dist/esm/index.js +3047 -1
  15. package/dist/esm/index.js.map +1 -0
  16. package/dist/esm/solana/descriptor/aligned_distributor.d.ts +3 -1
  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 +851 -1182
  20. package/dist/esm/solana/descriptor/idl/merkle_distributor.json +1030 -0
  21. package/dist/esm/solana/descriptor/merkle_distributor.d.ts +3 -1
  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 +1485 -7
  25. package/dist/esm/solana/index.js +3019 -7
  26. package/dist/esm/solana/index.js.map +1 -0
  27. package/package.json +50 -22
  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/idl/aligned_distributor.json +0 -1255
  36. package/dist/cjs/solana/descriptor/merkle_distributor.js +0 -2
  37. package/dist/cjs/solana/generated/accounts/ClaimStatus.js +0 -135
  38. package/dist/cjs/solana/generated/accounts/MerkleDistributor.js +0 -215
  39. package/dist/cjs/solana/generated/accounts/index.js +0 -7
  40. package/dist/cjs/solana/generated/errors/anchor.js +0 -712
  41. package/dist/cjs/solana/generated/errors/custom.js +0 -321
  42. package/dist/cjs/solana/generated/errors/index.js +0 -64
  43. package/dist/cjs/solana/generated/instructions/claimLocked.js +0 -22
  44. package/dist/cjs/solana/generated/instructions/clawback.js +0 -21
  45. package/dist/cjs/solana/generated/instructions/closeClaim.js +0 -57
  46. package/dist/cjs/solana/generated/instructions/index.js +0 -17
  47. package/dist/cjs/solana/generated/instructions/newClaim.js +0 -59
  48. package/dist/cjs/solana/generated/instructions/newDistributor.js +0 -104
  49. package/dist/cjs/solana/generated/instructions/setAdmin.js +0 -17
  50. package/dist/cjs/solana/generated/instructions/setClawbackReceiver.js +0 -17
  51. package/dist/cjs/solana/generated/programId.js +0 -8
  52. package/dist/cjs/solana/index.js +0 -36
  53. package/dist/cjs/solana/types.js +0 -159
  54. package/dist/cjs/solana/utils.js +0 -75
  55. package/dist/esm/solana/clients/BaseDistributorClient.d.ts +0 -43
  56. package/dist/esm/solana/clients/BaseDistributorClient.js +0 -274
  57. package/dist/esm/solana/clients/SolanaAlignedDistributorClient.d.ts +0 -16
  58. package/dist/esm/solana/clients/SolanaAlignedDistributorClient.js +0 -111
  59. package/dist/esm/solana/clients/SolanaDistributorClient.d.ts +0 -8
  60. package/dist/esm/solana/clients/SolanaDistributorClient.js +0 -11
  61. package/dist/esm/solana/clients/index.d.ts +0 -2
  62. package/dist/esm/solana/clients/index.js +0 -2
  63. package/dist/esm/solana/constants.d.ts +0 -24
  64. package/dist/esm/solana/constants.js +0 -25
  65. package/dist/esm/solana/generated/accounts/ClaimStatus.d.ts +0 -83
  66. package/dist/esm/solana/generated/accounts/ClaimStatus.js +0 -127
  67. package/dist/esm/solana/generated/accounts/MerkleDistributor.d.ts +0 -179
  68. package/dist/esm/solana/generated/accounts/MerkleDistributor.js +0 -239
  69. package/dist/esm/solana/generated/accounts/index.d.ts +0 -4
  70. package/dist/esm/solana/generated/accounts/index.js +0 -2
  71. package/dist/esm/solana/generated/errors/anchor.d.ts +0 -434
  72. package/dist/esm/solana/generated/errors/anchor.js +0 -707
  73. package/dist/esm/solana/generated/errors/custom.d.ts +0 -194
  74. package/dist/esm/solana/generated/errors/custom.js +0 -317
  75. package/dist/esm/solana/generated/errors/index.d.ts +0 -5
  76. package/dist/esm/solana/generated/errors/index.js +0 -37
  77. package/dist/esm/solana/generated/instructions/claimLocked.d.ts +0 -23
  78. package/dist/esm/solana/generated/instructions/claimLocked.js +0 -19
  79. package/dist/esm/solana/generated/instructions/clawback.d.ts +0 -17
  80. package/dist/esm/solana/generated/instructions/clawback.js +0 -18
  81. package/dist/esm/solana/generated/instructions/closeClaim.d.ts +0 -22
  82. package/dist/esm/solana/generated/instructions/closeClaim.js +0 -30
  83. package/dist/esm/solana/generated/instructions/index.d.ts +0 -14
  84. package/dist/esm/solana/generated/instructions/index.js +0 -7
  85. package/dist/esm/solana/generated/instructions/newClaim.d.ts +0 -29
  86. package/dist/esm/solana/generated/instructions/newClaim.js +0 -32
  87. package/dist/esm/solana/generated/instructions/newDistributor.d.ts +0 -58
  88. package/dist/esm/solana/generated/instructions/newDistributor.js +0 -77
  89. package/dist/esm/solana/generated/instructions/setAdmin.d.ts +0 -10
  90. package/dist/esm/solana/generated/instructions/setAdmin.js +0 -14
  91. package/dist/esm/solana/generated/instructions/setClawbackReceiver.d.ts +0 -10
  92. package/dist/esm/solana/generated/instructions/setClawbackReceiver.js +0 -14
  93. package/dist/esm/solana/generated/programId.d.ts +0 -3
  94. package/dist/esm/solana/generated/programId.js +0 -5
  95. package/dist/esm/solana/types.d.ts +0 -258
  96. package/dist/esm/solana/types.js +0 -156
  97. package/dist/esm/solana/utils.d.ts +0 -14
  98. package/dist/esm/solana/utils.js +0 -65
@@ -0,0 +1,1030 @@
1
+ {
2
+ "address": "MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N",
3
+ "metadata": {
4
+ "name": "merkle_distributor",
5
+ "version": "1.4.0",
6
+ "spec": "0.1.0",
7
+ "description": "A Solana program for distributing tokens according to a Merkle root.",
8
+ "repository": "https://github.com/streamflow-finance/distributor"
9
+ },
10
+ "instructions": [
11
+ {
12
+ "name": "claim_locked",
13
+ "discriminator": [34, 206, 181, 23, 11, 207, 147, 90],
14
+ "accounts": [
15
+ {
16
+ "name": "distributor",
17
+ "docs": ["The [MerkleDistributor]."],
18
+ "writable": true
19
+ },
20
+ {
21
+ "name": "claim_status",
22
+ "docs": ["Claim Status PDA"],
23
+ "writable": true,
24
+ "pda": {
25
+ "seeds": [
26
+ {
27
+ "kind": "const",
28
+ "value": [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
29
+ },
30
+ {
31
+ "kind": "account",
32
+ "path": "claimant"
33
+ },
34
+ {
35
+ "kind": "account",
36
+ "path": "distributor"
37
+ }
38
+ ]
39
+ }
40
+ },
41
+ {
42
+ "name": "from",
43
+ "docs": ["Distributor ATA containing the tokens to distribute."],
44
+ "writable": true,
45
+ "pda": {
46
+ "seeds": [
47
+ {
48
+ "kind": "account",
49
+ "path": "distributor"
50
+ },
51
+ {
52
+ "kind": "account",
53
+ "path": "token_program"
54
+ },
55
+ {
56
+ "kind": "account",
57
+ "path": "distributor.mint",
58
+ "account": "MerkleDistributor"
59
+ }
60
+ ],
61
+ "program": {
62
+ "kind": "const",
63
+ "value": [
64
+ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16,
65
+ 132, 4, 142, 123, 216, 219, 233, 248, 89
66
+ ]
67
+ }
68
+ }
69
+ },
70
+ {
71
+ "name": "to",
72
+ "docs": [
73
+ "Account to send the claimed tokens to.",
74
+ "Claimant must sign the transaction and can only claim on behalf of themself"
75
+ ],
76
+ "writable": true
77
+ },
78
+ {
79
+ "name": "claimant",
80
+ "docs": ["Who is claiming the tokens."],
81
+ "writable": true,
82
+ "signer": true
83
+ },
84
+ {
85
+ "name": "mint",
86
+ "docs": ["The mint to claim."],
87
+ "relations": ["distributor"]
88
+ },
89
+ {
90
+ "name": "token_program",
91
+ "docs": ["SPL [Token] program."]
92
+ },
93
+ {
94
+ "name": "event_authority",
95
+ "pda": {
96
+ "seeds": [
97
+ {
98
+ "kind": "const",
99
+ "value": [95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]
100
+ }
101
+ ]
102
+ }
103
+ },
104
+ {
105
+ "name": "program"
106
+ }
107
+ ],
108
+ "args": []
109
+ },
110
+ {
111
+ "name": "clawback",
112
+ "discriminator": [111, 92, 142, 79, 33, 234, 82, 27],
113
+ "accounts": [
114
+ {
115
+ "name": "distributor",
116
+ "docs": ["The [MerkleDistributor]."],
117
+ "writable": true
118
+ },
119
+ {
120
+ "name": "from",
121
+ "docs": ["Distributor ATA containing the tokens to distribute."],
122
+ "writable": true
123
+ },
124
+ {
125
+ "name": "to",
126
+ "docs": ["The Clawback token account."],
127
+ "writable": true
128
+ },
129
+ {
130
+ "name": "admin",
131
+ "docs": ["Only Admin can trigger the clawback of funds"],
132
+ "writable": true,
133
+ "signer": true
134
+ },
135
+ {
136
+ "name": "mint"
137
+ },
138
+ {
139
+ "name": "system_program",
140
+ "docs": ["The [System] program."],
141
+ "address": "11111111111111111111111111111111"
142
+ },
143
+ {
144
+ "name": "token_program",
145
+ "docs": ["SPL [Token] program."]
146
+ }
147
+ ],
148
+ "args": []
149
+ },
150
+ {
151
+ "name": "close_claim",
152
+ "discriminator": [42, 177, 165, 35, 213, 179, 211, 19],
153
+ "accounts": [
154
+ {
155
+ "name": "distributor",
156
+ "docs": ["The [MerkleDistributor]."],
157
+ "writable": true
158
+ },
159
+ {
160
+ "name": "admin_or_claimant",
161
+ "docs": ["Admin signer"],
162
+ "writable": true,
163
+ "signer": true
164
+ },
165
+ {
166
+ "name": "claimant"
167
+ },
168
+ {
169
+ "name": "claim_status",
170
+ "docs": ["Claim Status PDA"],
171
+ "writable": true,
172
+ "pda": {
173
+ "seeds": [
174
+ {
175
+ "kind": "const",
176
+ "value": [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
177
+ },
178
+ {
179
+ "kind": "account",
180
+ "path": "claimant"
181
+ },
182
+ {
183
+ "kind": "account",
184
+ "path": "distributor"
185
+ }
186
+ ]
187
+ }
188
+ },
189
+ {
190
+ "name": "system_program",
191
+ "docs": ["The [System] program."],
192
+ "address": "11111111111111111111111111111111"
193
+ },
194
+ {
195
+ "name": "event_authority",
196
+ "pda": {
197
+ "seeds": [
198
+ {
199
+ "kind": "const",
200
+ "value": [95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]
201
+ }
202
+ ]
203
+ }
204
+ },
205
+ {
206
+ "name": "program"
207
+ }
208
+ ],
209
+ "args": [
210
+ {
211
+ "name": "amount_unlocked",
212
+ "type": {
213
+ "option": "u64"
214
+ }
215
+ },
216
+ {
217
+ "name": "amount_locked",
218
+ "type": {
219
+ "option": "u64"
220
+ }
221
+ },
222
+ {
223
+ "name": "proof",
224
+ "type": {
225
+ "option": {
226
+ "vec": {
227
+ "array": ["u8", 32]
228
+ }
229
+ }
230
+ }
231
+ }
232
+ ]
233
+ },
234
+ {
235
+ "name": "new_claim",
236
+ "discriminator": [78, 177, 98, 123, 210, 21, 187, 83],
237
+ "accounts": [
238
+ {
239
+ "name": "distributor",
240
+ "docs": ["The [MerkleDistributor]."],
241
+ "writable": true
242
+ },
243
+ {
244
+ "name": "claim_status",
245
+ "docs": ["Claim status PDA"],
246
+ "writable": true,
247
+ "pda": {
248
+ "seeds": [
249
+ {
250
+ "kind": "const",
251
+ "value": [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
252
+ },
253
+ {
254
+ "kind": "account",
255
+ "path": "claimant"
256
+ },
257
+ {
258
+ "kind": "account",
259
+ "path": "distributor"
260
+ }
261
+ ]
262
+ }
263
+ },
264
+ {
265
+ "name": "from",
266
+ "docs": ["Distributor ATA containing the tokens to distribute."],
267
+ "writable": true,
268
+ "pda": {
269
+ "seeds": [
270
+ {
271
+ "kind": "account",
272
+ "path": "distributor"
273
+ },
274
+ {
275
+ "kind": "account",
276
+ "path": "token_program"
277
+ },
278
+ {
279
+ "kind": "account",
280
+ "path": "distributor.mint",
281
+ "account": "MerkleDistributor"
282
+ }
283
+ ],
284
+ "program": {
285
+ "kind": "const",
286
+ "value": [
287
+ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16,
288
+ 132, 4, 142, 123, 216, 219, 233, 248, 89
289
+ ]
290
+ }
291
+ }
292
+ },
293
+ {
294
+ "name": "to",
295
+ "docs": ["Account to send the claimed tokens to."],
296
+ "writable": true
297
+ },
298
+ {
299
+ "name": "claimant",
300
+ "docs": ["Who is claiming the tokens."],
301
+ "writable": true,
302
+ "signer": true
303
+ },
304
+ {
305
+ "name": "mint",
306
+ "docs": ["The mint to claim."],
307
+ "relations": ["distributor"]
308
+ },
309
+ {
310
+ "name": "token_program",
311
+ "docs": ["SPL [Token] program."]
312
+ },
313
+ {
314
+ "name": "system_program",
315
+ "docs": ["The [System] program."],
316
+ "address": "11111111111111111111111111111111"
317
+ },
318
+ {
319
+ "name": "event_authority",
320
+ "pda": {
321
+ "seeds": [
322
+ {
323
+ "kind": "const",
324
+ "value": [95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]
325
+ }
326
+ ]
327
+ }
328
+ },
329
+ {
330
+ "name": "program"
331
+ }
332
+ ],
333
+ "args": [
334
+ {
335
+ "name": "amount_unlocked",
336
+ "type": "u64"
337
+ },
338
+ {
339
+ "name": "amount_locked",
340
+ "type": "u64"
341
+ },
342
+ {
343
+ "name": "proof",
344
+ "type": {
345
+ "vec": {
346
+ "array": ["u8", 32]
347
+ }
348
+ }
349
+ }
350
+ ]
351
+ },
352
+ {
353
+ "name": "new_distributor",
354
+ "docs": [
355
+ "READ THE FOLLOWING:",
356
+ "",
357
+ "This instruction is susceptible to frontrunning that could result in loss of funds if not handled properly.",
358
+ "",
359
+ "An attack could look like:",
360
+ "- A legitimate user opens a new distributor.",
361
+ "- Someone observes the call to this instruction.",
362
+ "- They replace the clawback_receiver, admin, or time parameters with their own.",
363
+ "",
364
+ "One situation that could happen here is the attacker replaces the admin and clawback_receiver with their own",
365
+ "and sets the clawback_start_ts with the minimal time allowed. After clawback_start_ts has elapsed,",
366
+ "the attacker can steal all funds from the distributor to their own clawback_receiver account.",
367
+ "",
368
+ "HOW TO AVOID:",
369
+ "- When you call into this instruction, ensure your transaction succeeds.",
370
+ "- To be extra safe, after your transaction succeeds, read back the state of the created MerkleDistributor account and",
371
+ "assert the parameters are what you expect, most importantly the clawback_receiver and admin.",
372
+ "- If your transaction fails, double check the value on-chain matches what you expect."
373
+ ],
374
+ "discriminator": [32, 139, 112, 171, 0, 2, 225, 155],
375
+ "accounts": [
376
+ {
377
+ "name": "distributor",
378
+ "docs": ["[MerkleDistributor]."],
379
+ "writable": true,
380
+ "pda": {
381
+ "seeds": [
382
+ {
383
+ "kind": "const",
384
+ "value": [77, 101, 114, 107, 108, 101, 68, 105, 115, 116, 114, 105, 98, 117, 116, 111, 114]
385
+ },
386
+ {
387
+ "kind": "account",
388
+ "path": "mint"
389
+ },
390
+ {
391
+ "kind": "arg",
392
+ "path": "version"
393
+ }
394
+ ]
395
+ }
396
+ },
397
+ {
398
+ "name": "clawback_receiver",
399
+ "docs": ["Clawback receiver token account"],
400
+ "writable": true
401
+ },
402
+ {
403
+ "name": "mint",
404
+ "docs": ["The mint to distribute."]
405
+ },
406
+ {
407
+ "name": "token_vault",
408
+ "docs": ["Token vault"],
409
+ "writable": true,
410
+ "pda": {
411
+ "seeds": [
412
+ {
413
+ "kind": "account",
414
+ "path": "distributor"
415
+ },
416
+ {
417
+ "kind": "account",
418
+ "path": "token_program"
419
+ },
420
+ {
421
+ "kind": "account",
422
+ "path": "mint"
423
+ }
424
+ ],
425
+ "program": {
426
+ "kind": "const",
427
+ "value": [
428
+ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16,
429
+ 132, 4, 142, 123, 216, 219, 233, 248, 89
430
+ ]
431
+ }
432
+ }
433
+ },
434
+ {
435
+ "name": "admin",
436
+ "docs": [
437
+ "Admin wallet, responsible for creating the distributor and paying for the transaction.",
438
+ "Also has the authority to set the clawback receiver and change itself."
439
+ ],
440
+ "writable": true,
441
+ "signer": true
442
+ },
443
+ {
444
+ "name": "system_program",
445
+ "docs": ["The [System] program."],
446
+ "address": "11111111111111111111111111111111"
447
+ },
448
+ {
449
+ "name": "associated_token_program",
450
+ "docs": ["The [Associated Token] program."],
451
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
452
+ },
453
+ {
454
+ "name": "token_program",
455
+ "docs": ["The [Token] program."]
456
+ }
457
+ ],
458
+ "args": [
459
+ {
460
+ "name": "version",
461
+ "type": "u64"
462
+ },
463
+ {
464
+ "name": "root",
465
+ "type": {
466
+ "array": ["u8", 32]
467
+ }
468
+ },
469
+ {
470
+ "name": "max_total_claim",
471
+ "type": "u64"
472
+ },
473
+ {
474
+ "name": "max_num_nodes",
475
+ "type": "u64"
476
+ },
477
+ {
478
+ "name": "unlock_period",
479
+ "type": "u64"
480
+ },
481
+ {
482
+ "name": "start_vesting_ts",
483
+ "type": "u64"
484
+ },
485
+ {
486
+ "name": "end_vesting_ts",
487
+ "type": "u64"
488
+ },
489
+ {
490
+ "name": "clawback_start_ts",
491
+ "type": "u64"
492
+ },
493
+ {
494
+ "name": "claims_closable_by_admin",
495
+ "type": "bool"
496
+ },
497
+ {
498
+ "name": "can_update_duration",
499
+ "type": {
500
+ "option": "bool"
501
+ }
502
+ },
503
+ {
504
+ "name": "total_amount_unlocked",
505
+ "type": {
506
+ "option": "u64"
507
+ }
508
+ },
509
+ {
510
+ "name": "total_amount_locked",
511
+ "type": {
512
+ "option": "u64"
513
+ }
514
+ },
515
+ {
516
+ "name": "claims_closable_by_claimant",
517
+ "type": {
518
+ "option": "bool"
519
+ }
520
+ },
521
+ {
522
+ "name": "claims_limit",
523
+ "type": {
524
+ "option": "u16"
525
+ }
526
+ }
527
+ ]
528
+ },
529
+ {
530
+ "name": "set_admin",
531
+ "discriminator": [251, 163, 0, 52, 91, 194, 187, 92],
532
+ "accounts": [
533
+ {
534
+ "name": "distributor",
535
+ "docs": ["The [MerkleDistributor]."],
536
+ "writable": true
537
+ },
538
+ {
539
+ "name": "admin",
540
+ "docs": ["Admin signer"],
541
+ "writable": true,
542
+ "signer": true
543
+ },
544
+ {
545
+ "name": "new_admin",
546
+ "docs": ["New admin account"],
547
+ "writable": true
548
+ }
549
+ ],
550
+ "args": []
551
+ },
552
+ {
553
+ "name": "set_clawback_receiver",
554
+ "discriminator": [153, 217, 34, 20, 19, 29, 229, 75],
555
+ "accounts": [
556
+ {
557
+ "name": "distributor",
558
+ "docs": ["The [MerkleDistributor]."],
559
+ "writable": true
560
+ },
561
+ {
562
+ "name": "new_clawback_account",
563
+ "docs": ["New clawback account"]
564
+ },
565
+ {
566
+ "name": "admin",
567
+ "docs": ["Admin signer"],
568
+ "writable": true,
569
+ "signer": true
570
+ }
571
+ ],
572
+ "args": []
573
+ },
574
+ {
575
+ "name": "update",
576
+ "discriminator": [219, 200, 88, 176, 158, 63, 253, 127],
577
+ "accounts": [
578
+ {
579
+ "name": "distributor",
580
+ "docs": ["The [MerkleDistributor]."],
581
+ "writable": true
582
+ },
583
+ {
584
+ "name": "admin",
585
+ "docs": ["Only Admin can trigger the clawback of funds"],
586
+ "writable": true,
587
+ "signer": true
588
+ },
589
+ {
590
+ "name": "system_program",
591
+ "docs": ["The [System] program."],
592
+ "address": "11111111111111111111111111111111"
593
+ }
594
+ ],
595
+ "args": [
596
+ {
597
+ "name": "end_ts",
598
+ "type": {
599
+ "option": "u64"
600
+ }
601
+ }
602
+ ]
603
+ }
604
+ ],
605
+ "accounts": [
606
+ {
607
+ "name": "ClaimStatus",
608
+ "discriminator": [22, 183, 249, 157, 247, 95, 150, 96]
609
+ },
610
+ {
611
+ "name": "MerkleDistributor",
612
+ "discriminator": [77, 119, 139, 70, 84, 247, 12, 26]
613
+ }
614
+ ],
615
+ "events": [
616
+ {
617
+ "name": "ClaimClosedEvent",
618
+ "discriminator": [139, 166, 215, 195, 184, 233, 26, 217]
619
+ },
620
+ {
621
+ "name": "ClaimedEvent",
622
+ "discriminator": [144, 172, 209, 86, 144, 87, 84, 115]
623
+ },
624
+ {
625
+ "name": "NewClaimEvent",
626
+ "discriminator": [244, 3, 231, 151, 60, 101, 55, 55]
627
+ }
628
+ ],
629
+ "errors": [
630
+ {
631
+ "code": 6000,
632
+ "name": "InsufficientUnlockedTokens",
633
+ "msg": "Insufficient unlocked tokens"
634
+ },
635
+ {
636
+ "code": 6001,
637
+ "name": "InvalidProof",
638
+ "msg": "Invalid Merkle proof"
639
+ },
640
+ {
641
+ "code": 6002,
642
+ "name": "ExceededMaxClaim",
643
+ "msg": "Exceeded maximum claim amount"
644
+ },
645
+ {
646
+ "code": 6003,
647
+ "name": "MaxNodesExceeded",
648
+ "msg": "Exceeded maximum node count"
649
+ },
650
+ {
651
+ "code": 6004,
652
+ "name": "Unauthorized",
653
+ "msg": "Account is not authorized to execute this instruction"
654
+ },
655
+ {
656
+ "code": 6005,
657
+ "name": "OwnerMismatch",
658
+ "msg": "Token account owner did not match intended owner"
659
+ },
660
+ {
661
+ "code": 6006,
662
+ "name": "ClawbackBeforeStart",
663
+ "msg": "Attempted clawback before start"
664
+ },
665
+ {
666
+ "code": 6007,
667
+ "name": "ClawbackAlreadyClaimed",
668
+ "msg": "Clawback already claimed"
669
+ },
670
+ {
671
+ "code": 6008,
672
+ "name": "SameClawbackReceiver",
673
+ "msg": "New and old Clawback receivers are identical"
674
+ },
675
+ {
676
+ "code": 6009,
677
+ "name": "ClawbackReceiverIsTokenVault",
678
+ "msg": "Clawback receiver can not be the Token Vault"
679
+ },
680
+ {
681
+ "code": 6010,
682
+ "name": "SameAdmin",
683
+ "msg": "New and old admin are identical"
684
+ },
685
+ {
686
+ "code": 6011,
687
+ "name": "ClaimExpired",
688
+ "msg": "Claim window expired"
689
+ },
690
+ {
691
+ "code": 6012,
692
+ "name": "ArithmeticError",
693
+ "msg": "Arithmetic Error (overflow/underflow)"
694
+ },
695
+ {
696
+ "code": 6013,
697
+ "name": "StartTimestampAfterEnd",
698
+ "msg": "Start Timestamp cannot be after end Timestamp"
699
+ },
700
+ {
701
+ "code": 6014,
702
+ "name": "TimestampsNotInFuture",
703
+ "msg": "Timestamps cannot be in the past"
704
+ },
705
+ {
706
+ "code": 6015,
707
+ "name": "InvalidMint",
708
+ "msg": "Invalid Mint"
709
+ },
710
+ {
711
+ "code": 6016,
712
+ "name": "ClaimIsClosed",
713
+ "msg": "Claim is closed"
714
+ },
715
+ {
716
+ "code": 6017,
717
+ "name": "ClaimsAreNotClosable",
718
+ "msg": "Claims are not closable"
719
+ },
720
+ {
721
+ "code": 6018,
722
+ "name": "InvalidUnlockPeriod",
723
+ "msg": "Invalid unlock period"
724
+ },
725
+ {
726
+ "code": 6019,
727
+ "name": "DurationUpdateNotAllowed",
728
+ "msg": "Duration update is not allowed"
729
+ },
730
+ {
731
+ "code": 6020,
732
+ "name": "NoVestingAmount",
733
+ "msg": "Vesting amounts are not set"
734
+ },
735
+ {
736
+ "code": 6021,
737
+ "name": "VestingAlreadyFinished",
738
+ "msg": "Vesting already finished"
739
+ },
740
+ {
741
+ "code": 6022,
742
+ "name": "InvalidAmounts",
743
+ "msg": "Provided amounts are invalid"
744
+ },
745
+ {
746
+ "code": 6023,
747
+ "name": "ClaimsLimitReached",
748
+ "msg": "Claims limit has been reached"
749
+ }
750
+ ],
751
+ "types": [
752
+ {
753
+ "name": "ClaimClosedEvent",
754
+ "docs": ["Emitted when a new claim is created."],
755
+ "type": {
756
+ "kind": "struct",
757
+ "fields": [
758
+ {
759
+ "name": "claimant",
760
+ "docs": ["User that claimed."],
761
+ "type": "pubkey"
762
+ },
763
+ {
764
+ "name": "timestamp",
765
+ "docs": ["Timestamp."],
766
+ "type": "u64"
767
+ }
768
+ ]
769
+ }
770
+ },
771
+ {
772
+ "name": "ClaimStatus",
773
+ "docs": ["Holds whether or not a claimant has claimed tokens."],
774
+ "type": {
775
+ "kind": "struct",
776
+ "fields": [
777
+ {
778
+ "name": "claimant",
779
+ "docs": ["Authority that claimed the tokens."],
780
+ "type": "pubkey"
781
+ },
782
+ {
783
+ "name": "locked_amount",
784
+ "docs": ["Locked amount"],
785
+ "type": "u64"
786
+ },
787
+ {
788
+ "name": "locked_amount_withdrawn",
789
+ "docs": ["Locked amount withdrawn"],
790
+ "type": "u64"
791
+ },
792
+ {
793
+ "name": "unlocked_amount",
794
+ "docs": ["Unlocked amount"],
795
+ "type": "u64"
796
+ },
797
+ {
798
+ "name": "last_claim_ts",
799
+ "docs": ["Last claim time"],
800
+ "type": "u64"
801
+ },
802
+ {
803
+ "name": "last_amount_per_unlock",
804
+ "docs": ["Track amount per unlock, can be useful for non-linear vesting"],
805
+ "type": "u64"
806
+ },
807
+ {
808
+ "name": "closed",
809
+ "docs": ["Whether claim is closed"],
810
+ "type": "bool"
811
+ },
812
+ {
813
+ "name": "distributor",
814
+ "docs": [
815
+ "Distributor account for which ClaimStatus was created, useful to filter by in get_program_accounts"
816
+ ],
817
+ "type": "pubkey"
818
+ },
819
+ {
820
+ "name": "claims_count",
821
+ "docs": ["Number of time amount has been claimed"],
822
+ "type": "u16"
823
+ },
824
+ {
825
+ "name": "closed_ts",
826
+ "docs": ["Time when claim has been closed"],
827
+ "type": "u64"
828
+ },
829
+ {
830
+ "name": "buffer_2",
831
+ "docs": ["Buffer for additional fields"],
832
+ "type": {
833
+ "array": ["u8", 22]
834
+ }
835
+ }
836
+ ]
837
+ }
838
+ },
839
+ {
840
+ "name": "ClaimedEvent",
841
+ "docs": ["Emitted when tokens are claimed."],
842
+ "type": {
843
+ "kind": "struct",
844
+ "fields": [
845
+ {
846
+ "name": "claimant",
847
+ "docs": ["User that claimed."],
848
+ "type": "pubkey"
849
+ },
850
+ {
851
+ "name": "amount",
852
+ "docs": ["Amount of tokens to distribute."],
853
+ "type": "u64"
854
+ }
855
+ ]
856
+ }
857
+ },
858
+ {
859
+ "name": "MerkleDistributor",
860
+ "docs": ["State for the account which distributes tokens."],
861
+ "type": {
862
+ "kind": "struct",
863
+ "fields": [
864
+ {
865
+ "name": "bump",
866
+ "docs": ["Bump seed."],
867
+ "type": "u8"
868
+ },
869
+ {
870
+ "name": "version",
871
+ "docs": ["Version of the airdrop"],
872
+ "type": "u64"
873
+ },
874
+ {
875
+ "name": "root",
876
+ "docs": ["The 256-bit merkle root."],
877
+ "type": {
878
+ "array": ["u8", 32]
879
+ }
880
+ },
881
+ {
882
+ "name": "mint",
883
+ "docs": ["[Mint] of the token to be distributed."],
884
+ "type": "pubkey"
885
+ },
886
+ {
887
+ "name": "token_vault",
888
+ "docs": ["Token Address of the vault"],
889
+ "type": "pubkey"
890
+ },
891
+ {
892
+ "name": "max_total_claim",
893
+ "docs": ["Maximum number of tokens that can ever be claimed from this [MerkleDistributor]."],
894
+ "type": "u64"
895
+ },
896
+ {
897
+ "name": "max_num_nodes",
898
+ "docs": ["Maximum number of nodes in [MerkleDistributor]."],
899
+ "type": "u64"
900
+ },
901
+ {
902
+ "name": "unlock_period",
903
+ "docs": ["Time step (period) in seconds per which the unlock occurs"],
904
+ "type": "u64"
905
+ },
906
+ {
907
+ "name": "total_amount_claimed",
908
+ "docs": ["Total amount of tokens that have been claimed."],
909
+ "type": "u64"
910
+ },
911
+ {
912
+ "name": "num_nodes_claimed",
913
+ "docs": ["Number of nodes that have been claimed."],
914
+ "type": "u64"
915
+ },
916
+ {
917
+ "name": "start_ts",
918
+ "docs": ["Lockup time start (Unix Timestamp)"],
919
+ "type": "u64"
920
+ },
921
+ {
922
+ "name": "end_ts",
923
+ "docs": ["Lockup time end (Unix Timestamp)"],
924
+ "type": "u64"
925
+ },
926
+ {
927
+ "name": "clawback_start_ts",
928
+ "docs": ["Clawback start (Unix Timestamp)"],
929
+ "type": "u64"
930
+ },
931
+ {
932
+ "name": "clawback_receiver",
933
+ "docs": ["Clawback receiver"],
934
+ "type": "pubkey"
935
+ },
936
+ {
937
+ "name": "admin",
938
+ "docs": ["Admin wallet"],
939
+ "type": "pubkey"
940
+ },
941
+ {
942
+ "name": "clawed_back",
943
+ "docs": ["Whether or not the distributor has been clawed back"],
944
+ "type": "bool"
945
+ },
946
+ {
947
+ "name": "claims_closable_by_admin",
948
+ "docs": ["Whether claims are closable by the admin or not"],
949
+ "type": "bool"
950
+ },
951
+ {
952
+ "name": "can_update_duration",
953
+ "docs": ["Whether admin can update vesting duration"],
954
+ "type": "bool"
955
+ },
956
+ {
957
+ "name": "total_amount_unlocked",
958
+ "docs": ["Total amount of funds unlocked (cliff/instant)"],
959
+ "type": "u64"
960
+ },
961
+ {
962
+ "name": "total_amount_locked",
963
+ "docs": ["Total amount of funds locked (vested)"],
964
+ "type": "u64"
965
+ },
966
+ {
967
+ "name": "last_duration_update_ts",
968
+ "docs": ["Timestamp when update was last called"],
969
+ "type": "u64"
970
+ },
971
+ {
972
+ "name": "total_claimable_pre_update",
973
+ "docs": [
974
+ "Total amount of locked amount claimable as of last duration update, ever increasing total, accumulates with each update"
975
+ ],
976
+ "type": "u64"
977
+ },
978
+ {
979
+ "name": "clawed_back_ts",
980
+ "docs": ["Timestamp when funds were clawed back"],
981
+ "type": "u64"
982
+ },
983
+ {
984
+ "name": "claims_closable_by_claimant",
985
+ "docs": ["Whether claims are closable by claimant or not"],
986
+ "type": "bool"
987
+ },
988
+ {
989
+ "name": "claims_limit",
990
+ "docs": ["Limit number of claims"],
991
+ "type": "u16"
992
+ },
993
+ {
994
+ "name": "buffer_2",
995
+ "docs": ["Buffer for additional fields"],
996
+ "type": {
997
+ "array": ["u8", 20]
998
+ }
999
+ },
1000
+ {
1001
+ "name": "buffer_3",
1002
+ "docs": ["Buffer for additional fields"],
1003
+ "type": {
1004
+ "array": ["u8", 32]
1005
+ }
1006
+ }
1007
+ ]
1008
+ }
1009
+ },
1010
+ {
1011
+ "name": "NewClaimEvent",
1012
+ "docs": ["Emitted when a new claim is created."],
1013
+ "type": {
1014
+ "kind": "struct",
1015
+ "fields": [
1016
+ {
1017
+ "name": "claimant",
1018
+ "docs": ["User that claimed."],
1019
+ "type": "pubkey"
1020
+ },
1021
+ {
1022
+ "name": "timestamp",
1023
+ "docs": ["Timestamp."],
1024
+ "type": "u64"
1025
+ }
1026
+ ]
1027
+ }
1028
+ }
1029
+ ]
1030
+ }