@sign-global/tokentable 0.4.1-beta.4 → 0.4.1-beta.6

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 (74) hide show
  1. package/dist/cjs/airdrop/SignatureAirdropClient.d.ts +2 -1
  2. package/dist/cjs/airdrop/SignatureAirdropClient.js +28 -15
  3. package/dist/cjs/airdrop/SignatureAirdropClient.js.map +1 -1
  4. package/dist/cjs/airdrop/common/index.d.ts +35 -0
  5. package/dist/cjs/airdrop/constants/chain-config.d.ts +36 -0
  6. package/dist/cjs/airdrop/constants/chain-config.js +5 -0
  7. package/dist/cjs/airdrop/constants/chain-config.js.map +1 -1
  8. package/dist/cjs/airdrop/contracts/evm/SignatureAirdropService.d.ts +1 -1
  9. package/dist/cjs/airdrop/contracts/evm/SignatureAirdropService.js +6 -1
  10. package/dist/cjs/airdrop/contracts/evm/SignatureAirdropService.js.map +1 -1
  11. package/dist/cjs/airdrop/contracts/solana/AirdropSignatureClient.d.ts +7 -1
  12. package/dist/cjs/airdrop/contracts/solana/AirdropSignatureClient.js +24 -13
  13. package/dist/cjs/airdrop/contracts/solana/AirdropSignatureClient.js.map +1 -1
  14. package/dist/cjs/airdrop/contracts/solana/FeeCollectorClient.d.ts +2 -1
  15. package/dist/cjs/airdrop/contracts/solana/FeeCollectorClient.js +12 -3
  16. package/dist/cjs/airdrop/contracts/solana/FeeCollectorClient.js.map +1 -1
  17. package/dist/cjs/airdrop/contracts/solana/SignatureAirdropService.d.ts +2 -2
  18. package/dist/cjs/airdrop/contracts/solana/SignatureAirdropService.js +3 -9
  19. package/dist/cjs/airdrop/contracts/solana/SignatureAirdropService.js.map +1 -1
  20. package/dist/cjs/airdrop/contracts/solana/SolanaContractClient.d.ts +2 -1
  21. package/dist/cjs/airdrop/contracts/solana/SolanaContractClient.js +10 -4
  22. package/dist/cjs/airdrop/contracts/solana/SolanaContractClient.js.map +1 -1
  23. package/dist/cjs/airdrop/contracts/solana/fee_collector.d.ts +665 -349
  24. package/dist/cjs/airdrop/contracts/solana/fee_collector.json +79 -12
  25. package/dist/cjs/airdrop/contracts/solana/fungible_token_distributor_solana.d.ts +994 -504
  26. package/dist/cjs/airdrop/contracts/solana/fungible_token_distributor_solana.json +58 -3
  27. package/dist/cjs/airdrop/types/index.d.ts +4 -3
  28. package/dist/cjs/airdrop/types/index.js.map +1 -1
  29. package/dist/cjs/wallets/providers/evm/EvmWallet.js +27 -17
  30. package/dist/cjs/wallets/providers/evm/EvmWallet.js.map +1 -1
  31. package/dist/esm/airdrop/SignatureAirdropClient.d.ts +2 -1
  32. package/dist/esm/airdrop/SignatureAirdropClient.js +28 -15
  33. package/dist/esm/airdrop/SignatureAirdropClient.js.map +1 -1
  34. package/dist/esm/airdrop/common/index.d.ts +35 -0
  35. package/dist/esm/airdrop/constants/chain-config.d.ts +36 -0
  36. package/dist/esm/airdrop/constants/chain-config.js +6 -1
  37. package/dist/esm/airdrop/constants/chain-config.js.map +1 -1
  38. package/dist/esm/airdrop/contracts/evm/SignatureAirdropService.d.ts +1 -1
  39. package/dist/esm/airdrop/contracts/evm/SignatureAirdropService.js +6 -1
  40. package/dist/esm/airdrop/contracts/evm/SignatureAirdropService.js.map +1 -1
  41. package/dist/esm/airdrop/contracts/solana/AirdropSignatureClient.d.ts +7 -1
  42. package/dist/esm/airdrop/contracts/solana/AirdropSignatureClient.js +24 -13
  43. package/dist/esm/airdrop/contracts/solana/AirdropSignatureClient.js.map +1 -1
  44. package/dist/esm/airdrop/contracts/solana/FeeCollectorClient.d.ts +2 -1
  45. package/dist/esm/airdrop/contracts/solana/FeeCollectorClient.js +12 -3
  46. package/dist/esm/airdrop/contracts/solana/FeeCollectorClient.js.map +1 -1
  47. package/dist/esm/airdrop/contracts/solana/SignatureAirdropService.d.ts +2 -2
  48. package/dist/esm/airdrop/contracts/solana/SignatureAirdropService.js +3 -9
  49. package/dist/esm/airdrop/contracts/solana/SignatureAirdropService.js.map +1 -1
  50. package/dist/esm/airdrop/contracts/solana/SolanaContractClient.d.ts +2 -1
  51. package/dist/esm/airdrop/contracts/solana/SolanaContractClient.js +10 -4
  52. package/dist/esm/airdrop/contracts/solana/SolanaContractClient.js.map +1 -1
  53. package/dist/esm/airdrop/contracts/solana/fee_collector.d.ts +665 -349
  54. package/dist/esm/airdrop/contracts/solana/fee_collector.json +79 -12
  55. package/dist/esm/airdrop/contracts/solana/fungible_token_distributor_solana.d.ts +994 -504
  56. package/dist/esm/airdrop/contracts/solana/fungible_token_distributor_solana.json +58 -3
  57. package/dist/esm/airdrop/types/index.d.ts +4 -3
  58. package/dist/esm/airdrop/types/index.js.map +1 -1
  59. package/dist/esm/wallets/providers/evm/EvmWallet.js +27 -17
  60. package/dist/esm/wallets/providers/evm/EvmWallet.js.map +1 -1
  61. package/package.json +1 -1
  62. package/src/airdrop/SignatureAirdropClient.ts +40 -23
  63. package/src/airdrop/constants/chain-config.ts +7 -2
  64. package/src/airdrop/contracts/evm/SignatureAirdropService.ts +6 -1
  65. package/src/airdrop/contracts/solana/AirdropSignatureClient.ts +28 -27
  66. package/src/airdrop/contracts/solana/FeeCollectorClient.ts +12 -3
  67. package/src/airdrop/contracts/solana/SignatureAirdropService.ts +4 -10
  68. package/src/airdrop/contracts/solana/SolanaContractClient.ts +19 -11
  69. package/src/airdrop/contracts/solana/fee_collector.json +79 -12
  70. package/src/airdrop/contracts/solana/fee_collector.ts +743 -427
  71. package/src/airdrop/contracts/solana/fungible_token_distributor_solana.json +58 -3
  72. package/src/airdrop/contracts/solana/fungible_token_distributor_solana.ts +1104 -614
  73. package/src/airdrop/types/index.ts +4 -2
  74. package/src/wallets/providers/evm/EvmWallet.ts +27 -19
@@ -5,76 +5,107 @@
5
5
  * IDL can be found at `target/idl/fee_collector.json`.
6
6
  */
7
7
  export type FeeCollector = {
8
- address: 'BiSXnuUr1HisEsAVd9DjYpthjLhG286ehYQsABkMMuJq';
9
- metadata: {
10
- name: 'feeCollector';
11
- version: '0.1.0';
12
- spec: '0.1.0';
13
- description: 'Created with Anchor';
14
- };
15
- instructions: [
8
+ "address": "4dfP4CMvznzUuuYLhybXy71zasrhtjrFkChSFjtqS3on",
9
+ "metadata": {
10
+ "name": "feeCollector",
11
+ "version": "0.1.0",
12
+ "spec": "0.1.0",
13
+ "description": "Created with Anchor"
14
+ },
15
+ "instructions": [
16
16
  {
17
- name: 'collectFee';
18
- discriminator: [60, 173, 247, 103, 4, 93, 130, 48];
19
- accounts: [
17
+ "name": "collectFee",
18
+ "discriminator": [
19
+ 60,
20
+ 173,
21
+ 247,
22
+ 103,
23
+ 4,
24
+ 93,
25
+ 130,
26
+ 48
27
+ ],
28
+ "accounts": [
20
29
  {
21
- name: 'storage';
22
- writable: true;
23
- pda: {
24
- seeds: [
30
+ "name": "storage",
31
+ "writable": true,
32
+ "pda": {
33
+ "seeds": [
25
34
  {
26
- kind: 'const';
27
- value: [115, 116, 111, 114, 97, 103, 101];
35
+ "kind": "const",
36
+ "value": [
37
+ 115,
38
+ 116,
39
+ 111,
40
+ 114,
41
+ 97,
42
+ 103,
43
+ 101
44
+ ]
28
45
  }
29
- ];
30
- };
46
+ ]
47
+ }
48
+ },
49
+ {
50
+ "name": "feeTokenMint",
51
+ "writable": true,
52
+ "optional": true
31
53
  },
32
54
  {
33
- name: 'vault';
34
- writable: true;
35
- optional: true;
36
- pda: {
37
- seeds: [
55
+ "name": "vault",
56
+ "writable": true,
57
+ "optional": true,
58
+ "pda": {
59
+ "seeds": [
38
60
  {
39
- kind: 'const';
40
- value: [118, 97, 117, 108, 116];
61
+ "kind": "const",
62
+ "value": [
63
+ 118,
64
+ 97,
65
+ 117,
66
+ 108,
67
+ 116
68
+ ]
41
69
  },
42
70
  {
43
- kind: 'arg';
44
- path: 'feeToken';
71
+ "kind": "arg",
72
+ "path": "feeToken"
45
73
  }
46
- ];
47
- };
74
+ ]
75
+ }
48
76
  },
49
77
  {
50
- name: 'fee';
51
- writable: true;
52
- pda: {
53
- seeds: [
78
+ "name": "fee",
79
+ "pda": {
80
+ "seeds": [
54
81
  {
55
- kind: 'const';
56
- value: [102, 101, 101];
82
+ "kind": "const",
83
+ "value": [
84
+ 102,
85
+ 101,
86
+ 101
87
+ ]
57
88
  },
58
89
  {
59
- kind: 'arg';
60
- path: 'unlockerAddress';
90
+ "kind": "arg",
91
+ "path": "projectId"
61
92
  }
62
- ];
63
- };
93
+ ]
94
+ }
64
95
  },
65
96
  {
66
- name: 'sourceAta';
67
- writable: true;
68
- optional: true;
69
- pda: {
70
- seeds: [
97
+ "name": "sourceAta",
98
+ "writable": true,
99
+ "optional": true,
100
+ "pda": {
101
+ "seeds": [
71
102
  {
72
- kind: 'account';
73
- path: 'authority';
103
+ "kind": "account",
104
+ "path": "authority"
74
105
  },
75
106
  {
76
- kind: 'const';
77
- value: [
107
+ "kind": "const",
108
+ "value": [
78
109
  6,
79
110
  221,
80
111
  246,
@@ -107,16 +138,16 @@ export type FeeCollector = {
107
138
  255,
108
139
  0,
109
140
  169
110
- ];
141
+ ]
111
142
  },
112
143
  {
113
- kind: 'arg';
114
- path: 'feeToken';
144
+ "kind": "arg",
145
+ "path": "feeToken"
115
146
  }
116
- ];
117
- program: {
118
- kind: 'const';
119
- value: [
147
+ ],
148
+ "program": {
149
+ "kind": "const",
150
+ "value": [
120
151
  140,
121
152
  151,
122
153
  37,
@@ -149,431 +180,667 @@ export type FeeCollector = {
149
180
  233,
150
181
  248,
151
182
  89
152
- ];
153
- };
154
- };
183
+ ]
184
+ }
185
+ }
155
186
  },
156
187
  {
157
- name: 'authority';
158
- writable: true;
159
- signer: true;
188
+ "name": "authority",
189
+ "writable": true,
190
+ "signer": true
160
191
  },
161
192
  {
162
- name: 'systemProgram';
163
- address: '11111111111111111111111111111111';
193
+ "name": "systemProgram",
194
+ "address": "11111111111111111111111111111111"
164
195
  },
165
196
  {
166
- name: 'tokenProgram';
197
+ "name": "tokenProgram"
167
198
  },
168
199
  {
169
- name: 'associatedTokenProgram';
170
- address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
200
+ "name": "associatedTokenProgram",
201
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
171
202
  }
172
- ];
173
- args: [
203
+ ],
204
+ "args": [
174
205
  {
175
- name: 'feeToken';
176
- type: 'pubkey';
206
+ "name": "feeToken",
207
+ "type": "pubkey"
177
208
  },
178
209
  {
179
- name: 'unlockerAddress';
180
- type: 'pubkey';
210
+ "name": "projectId",
211
+ "type": "string"
181
212
  },
182
213
  {
183
- name: 'tokenTransferred';
184
- type: 'u64';
214
+ "name": "tokenTransferred",
215
+ "type": "u64"
185
216
  }
186
- ];
187
- returns: 'u64';
217
+ ],
218
+ "returns": "u64"
188
219
  },
189
220
  {
190
- name: 'getFee';
191
- discriminator: [115, 195, 235, 161, 25, 219, 60, 29];
192
- accounts: [
221
+ "name": "getFee",
222
+ "discriminator": [
223
+ 115,
224
+ 195,
225
+ 235,
226
+ 161,
227
+ 25,
228
+ 219,
229
+ 60,
230
+ 29
231
+ ],
232
+ "accounts": [
193
233
  {
194
- name: 'storage';
195
- pda: {
196
- seeds: [
234
+ "name": "storage",
235
+ "pda": {
236
+ "seeds": [
197
237
  {
198
- kind: 'const';
199
- value: [115, 116, 111, 114, 97, 103, 101];
238
+ "kind": "const",
239
+ "value": [
240
+ 115,
241
+ 116,
242
+ 111,
243
+ 114,
244
+ 97,
245
+ 103,
246
+ 101
247
+ ]
200
248
  }
201
- ];
202
- };
249
+ ]
250
+ }
203
251
  },
204
252
  {
205
- name: 'fee';
206
- writable: true;
207
- pda: {
208
- seeds: [
253
+ "name": "fee",
254
+ "pda": {
255
+ "seeds": [
209
256
  {
210
- kind: 'const';
211
- value: [102, 101, 101];
257
+ "kind": "const",
258
+ "value": [
259
+ 102,
260
+ 101,
261
+ 101
262
+ ]
212
263
  },
213
264
  {
214
- kind: 'arg';
215
- path: 'unlockerAddress';
265
+ "kind": "arg",
266
+ "path": "projectId"
216
267
  }
217
- ];
218
- };
219
- },
220
- {
221
- name: 'authority';
222
- writable: true;
223
- signer: true;
224
- },
225
- {
226
- name: 'systemProgram';
227
- address: '11111111111111111111111111111111';
268
+ ]
269
+ }
228
270
  }
229
- ];
230
- args: [
271
+ ],
272
+ "args": [
231
273
  {
232
- name: 'unlockerAddress';
233
- type: 'pubkey';
274
+ "name": "projectId",
275
+ "type": "string"
234
276
  },
235
277
  {
236
- name: 'tokenTransferred';
237
- type: 'u64';
278
+ "name": "tokenTransferred",
279
+ "type": "u64"
238
280
  }
239
- ];
240
- returns: 'u64';
281
+ ],
282
+ "returns": "u64"
241
283
  },
242
284
  {
243
- name: 'initFeeToken';
244
- discriminator: [29, 135, 230, 71, 198, 116, 59, 38];
245
- accounts: [
285
+ "name": "initFeeToken",
286
+ "discriminator": [
287
+ 29,
288
+ 135,
289
+ 230,
290
+ 71,
291
+ 198,
292
+ 116,
293
+ 59,
294
+ 38
295
+ ],
296
+ "accounts": [
246
297
  {
247
- name: 'storage';
248
- pda: {
249
- seeds: [
298
+ "name": "storage",
299
+ "pda": {
300
+ "seeds": [
250
301
  {
251
- kind: 'const';
252
- value: [115, 116, 111, 114, 97, 103, 101];
302
+ "kind": "const",
303
+ "value": [
304
+ 115,
305
+ 116,
306
+ 111,
307
+ 114,
308
+ 97,
309
+ 103,
310
+ 101
311
+ ]
253
312
  }
254
- ];
255
- };
313
+ ]
314
+ }
256
315
  },
257
316
  {
258
- name: 'vault';
259
- writable: true;
260
- optional: true;
261
- pda: {
262
- seeds: [
317
+ "name": "vault",
318
+ "writable": true,
319
+ "optional": true,
320
+ "pda": {
321
+ "seeds": [
263
322
  {
264
- kind: 'const';
265
- value: [118, 97, 117, 108, 116];
323
+ "kind": "const",
324
+ "value": [
325
+ 118,
326
+ 97,
327
+ 117,
328
+ 108,
329
+ 116
330
+ ]
266
331
  },
267
332
  {
268
- kind: 'arg';
269
- path: 'feeToken';
333
+ "kind": "arg",
334
+ "path": "feeToken"
270
335
  }
271
- ];
272
- };
336
+ ]
337
+ }
338
+ },
339
+ {
340
+ "name": "tokenMint",
341
+ "optional": true
342
+ },
343
+ {
344
+ "name": "authority",
345
+ "writable": true,
346
+ "signer": true
273
347
  },
274
348
  {
275
- name: 'tokenMint';
276
- optional: true;
349
+ "name": "tokenProgram"
350
+ },
351
+ {
352
+ "name": "systemProgram",
353
+ "address": "11111111111111111111111111111111"
354
+ }
355
+ ],
356
+ "args": [
357
+ {
358
+ "name": "feeToken",
359
+ "type": "pubkey"
360
+ }
361
+ ]
362
+ },
363
+ {
364
+ "name": "initProjectFee",
365
+ "discriminator": [
366
+ 21,
367
+ 68,
368
+ 31,
369
+ 251,
370
+ 143,
371
+ 139,
372
+ 107,
373
+ 64
374
+ ],
375
+ "accounts": [
376
+ {
377
+ "name": "storage",
378
+ "pda": {
379
+ "seeds": [
380
+ {
381
+ "kind": "const",
382
+ "value": [
383
+ 115,
384
+ 116,
385
+ 111,
386
+ 114,
387
+ 97,
388
+ 103,
389
+ 101
390
+ ]
391
+ }
392
+ ]
393
+ }
277
394
  },
278
395
  {
279
- name: 'authority';
280
- writable: true;
281
- signer: true;
396
+ "name": "fee",
397
+ "writable": true,
398
+ "pda": {
399
+ "seeds": [
400
+ {
401
+ "kind": "const",
402
+ "value": [
403
+ 102,
404
+ 101,
405
+ 101
406
+ ]
407
+ },
408
+ {
409
+ "kind": "arg",
410
+ "path": "projectId"
411
+ }
412
+ ]
413
+ }
282
414
  },
283
415
  {
284
- name: 'tokenProgram';
416
+ "name": "authority",
417
+ "writable": true,
418
+ "signer": true
285
419
  },
286
420
  {
287
- name: 'systemProgram';
288
- address: '11111111111111111111111111111111';
421
+ "name": "systemProgram",
422
+ "address": "11111111111111111111111111111111"
289
423
  }
290
- ];
291
- args: [
424
+ ],
425
+ "args": [
292
426
  {
293
- name: 'feeToken';
294
- type: 'pubkey';
427
+ "name": "projectId",
428
+ "type": "string"
295
429
  }
296
- ];
430
+ ]
297
431
  },
298
432
  {
299
- name: 'initialize';
300
- discriminator: [175, 175, 109, 31, 13, 152, 155, 237];
301
- accounts: [
433
+ "name": "initialize",
434
+ "discriminator": [
435
+ 175,
436
+ 175,
437
+ 109,
438
+ 31,
439
+ 13,
440
+ 152,
441
+ 155,
442
+ 237
443
+ ],
444
+ "accounts": [
302
445
  {
303
- name: 'storage';
304
- writable: true;
305
- pda: {
306
- seeds: [
446
+ "name": "storage",
447
+ "writable": true,
448
+ "pda": {
449
+ "seeds": [
307
450
  {
308
- kind: 'const';
309
- value: [115, 116, 111, 114, 97, 103, 101];
451
+ "kind": "const",
452
+ "value": [
453
+ 115,
454
+ 116,
455
+ 111,
456
+ 114,
457
+ 97,
458
+ 103,
459
+ 101
460
+ ]
310
461
  }
311
- ];
312
- };
462
+ ]
463
+ }
313
464
  },
314
465
  {
315
- name: 'authority';
316
- writable: true;
317
- signer: true;
466
+ "name": "authority",
467
+ "writable": true,
468
+ "signer": true
318
469
  },
319
470
  {
320
- name: 'systemProgram';
321
- address: '11111111111111111111111111111111';
471
+ "name": "systemProgram",
472
+ "address": "11111111111111111111111111111111"
322
473
  }
323
- ];
324
- args: [];
474
+ ],
475
+ "args": []
325
476
  },
326
477
  {
327
- name: 'renounceOwnership';
328
- discriminator: [19, 143, 91, 79, 34, 168, 174, 125];
329
- accounts: [
478
+ "name": "renounceOwnership",
479
+ "discriminator": [
480
+ 19,
481
+ 143,
482
+ 91,
483
+ 79,
484
+ 34,
485
+ 168,
486
+ 174,
487
+ 125
488
+ ],
489
+ "accounts": [
330
490
  {
331
- name: 'storage';
332
- writable: true;
333
- pda: {
334
- seeds: [
491
+ "name": "storage",
492
+ "writable": true,
493
+ "pda": {
494
+ "seeds": [
335
495
  {
336
- kind: 'const';
337
- value: [115, 116, 111, 114, 97, 103, 101];
496
+ "kind": "const",
497
+ "value": [
498
+ 115,
499
+ 116,
500
+ 111,
501
+ 114,
502
+ 97,
503
+ 103,
504
+ 101
505
+ ]
338
506
  }
339
- ];
340
- };
507
+ ]
508
+ }
341
509
  },
342
510
  {
343
- name: 'authority';
344
- writable: true;
345
- signer: true;
511
+ "name": "authority",
512
+ "writable": true,
513
+ "signer": true
346
514
  },
347
515
  {
348
- name: 'systemProgram';
349
- address: '11111111111111111111111111111111';
516
+ "name": "systemProgram",
517
+ "address": "11111111111111111111111111111111"
350
518
  }
351
- ];
352
- args: [];
519
+ ],
520
+ "args": []
353
521
  },
354
522
  {
355
- name: 'setCustomFeeBips';
356
- discriminator: [97, 137, 188, 218, 237, 225, 78, 39];
357
- accounts: [
523
+ "name": "setCustomFeeBips",
524
+ "discriminator": [
525
+ 97,
526
+ 137,
527
+ 188,
528
+ 218,
529
+ 237,
530
+ 225,
531
+ 78,
532
+ 39
533
+ ],
534
+ "accounts": [
358
535
  {
359
- name: 'storage';
360
- writable: true;
361
- pda: {
362
- seeds: [
536
+ "name": "storage",
537
+ "writable": true,
538
+ "pda": {
539
+ "seeds": [
363
540
  {
364
- kind: 'const';
365
- value: [115, 116, 111, 114, 97, 103, 101];
541
+ "kind": "const",
542
+ "value": [
543
+ 115,
544
+ 116,
545
+ 111,
546
+ 114,
547
+ 97,
548
+ 103,
549
+ 101
550
+ ]
366
551
  }
367
- ];
368
- };
552
+ ]
553
+ }
369
554
  },
370
555
  {
371
- name: 'fee';
372
- writable: true;
373
- pda: {
374
- seeds: [
556
+ "name": "fee",
557
+ "writable": true,
558
+ "pda": {
559
+ "seeds": [
375
560
  {
376
- kind: 'const';
377
- value: [102, 101, 101];
561
+ "kind": "const",
562
+ "value": [
563
+ 102,
564
+ 101,
565
+ 101
566
+ ]
378
567
  },
379
568
  {
380
- kind: 'arg';
381
- path: 'unlockerAddress';
569
+ "kind": "arg",
570
+ "path": "projectId"
382
571
  }
383
- ];
384
- };
572
+ ]
573
+ }
385
574
  },
386
575
  {
387
- name: 'authority';
388
- writable: true;
389
- signer: true;
576
+ "name": "authority",
577
+ "writable": true,
578
+ "signer": true
390
579
  },
391
580
  {
392
- name: 'systemProgram';
393
- address: '11111111111111111111111111111111';
581
+ "name": "systemProgram",
582
+ "address": "11111111111111111111111111111111"
394
583
  }
395
- ];
396
- args: [
584
+ ],
585
+ "args": [
397
586
  {
398
- name: 'unlockerAddress';
399
- type: 'pubkey';
587
+ "name": "projectId",
588
+ "type": "string"
400
589
  },
401
590
  {
402
- name: 'bips';
403
- type: 'u64';
591
+ "name": "bips",
592
+ "type": "u64"
404
593
  }
405
- ];
594
+ ]
406
595
  },
407
596
  {
408
- name: 'setCustomFeeFixed';
409
- discriminator: [105, 246, 45, 208, 238, 7, 174, 190];
410
- accounts: [
597
+ "name": "setCustomFeeFixed",
598
+ "discriminator": [
599
+ 105,
600
+ 246,
601
+ 45,
602
+ 208,
603
+ 238,
604
+ 7,
605
+ 174,
606
+ 190
607
+ ],
608
+ "accounts": [
411
609
  {
412
- name: 'storage';
413
- writable: true;
414
- pda: {
415
- seeds: [
610
+ "name": "storage",
611
+ "writable": true,
612
+ "pda": {
613
+ "seeds": [
416
614
  {
417
- kind: 'const';
418
- value: [115, 116, 111, 114, 97, 103, 101];
615
+ "kind": "const",
616
+ "value": [
617
+ 115,
618
+ 116,
619
+ 111,
620
+ 114,
621
+ 97,
622
+ 103,
623
+ 101
624
+ ]
419
625
  }
420
- ];
421
- };
626
+ ]
627
+ }
422
628
  },
423
629
  {
424
- name: 'fee';
425
- writable: true;
426
- pda: {
427
- seeds: [
630
+ "name": "fee",
631
+ "writable": true,
632
+ "pda": {
633
+ "seeds": [
428
634
  {
429
- kind: 'const';
430
- value: [102, 101, 101];
635
+ "kind": "const",
636
+ "value": [
637
+ 102,
638
+ 101,
639
+ 101
640
+ ]
431
641
  },
432
642
  {
433
- kind: 'arg';
434
- path: 'unlockerAddress';
643
+ "kind": "arg",
644
+ "path": "projectId"
435
645
  }
436
- ];
437
- };
646
+ ]
647
+ }
438
648
  },
439
649
  {
440
- name: 'authority';
441
- writable: true;
442
- signer: true;
650
+ "name": "authority",
651
+ "writable": true,
652
+ "signer": true
443
653
  },
444
654
  {
445
- name: 'systemProgram';
446
- address: '11111111111111111111111111111111';
655
+ "name": "systemProgram",
656
+ "address": "11111111111111111111111111111111"
447
657
  }
448
- ];
449
- args: [
658
+ ],
659
+ "args": [
450
660
  {
451
- name: 'unlockerAddress';
452
- type: 'pubkey';
661
+ "name": "projectId",
662
+ "type": "string"
453
663
  },
454
664
  {
455
- name: 'fixedFee';
456
- type: 'u64';
665
+ "name": "fixedFee",
666
+ "type": "u64"
457
667
  }
458
- ];
668
+ ]
459
669
  },
460
670
  {
461
- name: 'setDefaultFee';
462
- discriminator: [150, 137, 197, 111, 176, 227, 201, 110];
463
- accounts: [
671
+ "name": "setDefaultFee",
672
+ "discriminator": [
673
+ 150,
674
+ 137,
675
+ 197,
676
+ 111,
677
+ 176,
678
+ 227,
679
+ 201,
680
+ 110
681
+ ],
682
+ "accounts": [
464
683
  {
465
- name: 'storage';
466
- writable: true;
467
- pda: {
468
- seeds: [
684
+ "name": "storage",
685
+ "writable": true,
686
+ "pda": {
687
+ "seeds": [
469
688
  {
470
- kind: 'const';
471
- value: [115, 116, 111, 114, 97, 103, 101];
689
+ "kind": "const",
690
+ "value": [
691
+ 115,
692
+ 116,
693
+ 111,
694
+ 114,
695
+ 97,
696
+ 103,
697
+ 101
698
+ ]
472
699
  }
473
- ];
474
- };
700
+ ]
701
+ }
475
702
  },
476
703
  {
477
- name: 'authority';
478
- writable: true;
479
- signer: true;
704
+ "name": "authority",
705
+ "writable": true,
706
+ "signer": true
480
707
  },
481
708
  {
482
- name: 'systemProgram';
483
- address: '11111111111111111111111111111111';
709
+ "name": "systemProgram",
710
+ "address": "11111111111111111111111111111111"
484
711
  }
485
- ];
486
- args: [
712
+ ],
713
+ "args": [
487
714
  {
488
- name: 'bips';
489
- type: 'u64';
715
+ "name": "bips",
716
+ "type": "u64"
490
717
  }
491
- ];
718
+ ]
492
719
  },
493
720
  {
494
- name: 'transferOwnership';
495
- discriminator: [65, 177, 215, 73, 53, 45, 99, 47];
496
- accounts: [
721
+ "name": "transferOwnership",
722
+ "discriminator": [
723
+ 65,
724
+ 177,
725
+ 215,
726
+ 73,
727
+ 53,
728
+ 45,
729
+ 99,
730
+ 47
731
+ ],
732
+ "accounts": [
497
733
  {
498
- name: 'storage';
499
- writable: true;
500
- pda: {
501
- seeds: [
734
+ "name": "storage",
735
+ "writable": true,
736
+ "pda": {
737
+ "seeds": [
502
738
  {
503
- kind: 'const';
504
- value: [115, 116, 111, 114, 97, 103, 101];
739
+ "kind": "const",
740
+ "value": [
741
+ 115,
742
+ 116,
743
+ 111,
744
+ 114,
745
+ 97,
746
+ 103,
747
+ 101
748
+ ]
505
749
  }
506
- ];
507
- };
750
+ ]
751
+ }
508
752
  },
509
753
  {
510
- name: 'authority';
511
- writable: true;
512
- signer: true;
754
+ "name": "authority",
755
+ "writable": true,
756
+ "signer": true
513
757
  },
514
758
  {
515
- name: 'systemProgram';
516
- address: '11111111111111111111111111111111';
759
+ "name": "systemProgram",
760
+ "address": "11111111111111111111111111111111"
517
761
  }
518
- ];
519
- args: [
762
+ ],
763
+ "args": [
520
764
  {
521
- name: 'newOwner';
522
- type: 'pubkey';
765
+ "name": "newOwner",
766
+ "type": "pubkey"
523
767
  }
524
- ];
768
+ ]
525
769
  },
526
770
  {
527
- name: 'withdraw';
528
- discriminator: [183, 18, 70, 156, 148, 109, 161, 34];
529
- accounts: [
771
+ "name": "withdraw",
772
+ "discriminator": [
773
+ 183,
774
+ 18,
775
+ 70,
776
+ 156,
777
+ 148,
778
+ 109,
779
+ 161,
780
+ 34
781
+ ],
782
+ "accounts": [
530
783
  {
531
- name: 'authority';
532
- writable: true;
533
- signer: true;
784
+ "name": "authority",
785
+ "writable": true,
786
+ "signer": true
534
787
  },
535
788
  {
536
- name: 'storage';
537
- writable: true;
538
- pda: {
539
- seeds: [
789
+ "name": "storage",
790
+ "writable": true,
791
+ "pda": {
792
+ "seeds": [
540
793
  {
541
- kind: 'const';
542
- value: [115, 116, 111, 114, 97, 103, 101];
794
+ "kind": "const",
795
+ "value": [
796
+ 115,
797
+ 116,
798
+ 111,
799
+ 114,
800
+ 97,
801
+ 103,
802
+ 101
803
+ ]
543
804
  }
544
- ];
545
- };
805
+ ]
806
+ }
546
807
  },
547
808
  {
548
- name: 'vault';
549
- writable: true;
550
- optional: true;
551
- pda: {
552
- seeds: [
809
+ "name": "vault",
810
+ "writable": true,
811
+ "optional": true,
812
+ "pda": {
813
+ "seeds": [
553
814
  {
554
- kind: 'const';
555
- value: [118, 97, 117, 108, 116];
815
+ "kind": "const",
816
+ "value": [
817
+ 118,
818
+ 97,
819
+ 117,
820
+ 108,
821
+ 116
822
+ ]
556
823
  },
557
824
  {
558
- kind: 'arg';
559
- path: 'feeToken';
825
+ "kind": "arg",
826
+ "path": "feeToken"
560
827
  }
561
- ];
562
- };
828
+ ]
829
+ }
563
830
  },
564
831
  {
565
- name: 'authorityAta';
566
- writable: true;
567
- optional: true;
568
- pda: {
569
- seeds: [
832
+ "name": "authorityAta",
833
+ "writable": true,
834
+ "optional": true,
835
+ "pda": {
836
+ "seeds": [
570
837
  {
571
- kind: 'account';
572
- path: 'authority';
838
+ "kind": "account",
839
+ "path": "authority"
573
840
  },
574
841
  {
575
- kind: 'const';
576
- value: [
842
+ "kind": "const",
843
+ "value": [
577
844
  6,
578
845
  221,
579
846
  246,
@@ -606,16 +873,16 @@ export type FeeCollector = {
606
873
  255,
607
874
  0,
608
875
  169
609
- ];
876
+ ]
610
877
  },
611
878
  {
612
- kind: 'account';
613
- path: 'tokenMint';
879
+ "kind": "account",
880
+ "path": "tokenMint"
614
881
  }
615
- ];
616
- program: {
617
- kind: 'const';
618
- value: [
882
+ ],
883
+ "program": {
884
+ "kind": "const",
885
+ "value": [
619
886
  140,
620
887
  151,
621
888
  37,
@@ -648,156 +915,205 @@ export type FeeCollector = {
648
915
  233,
649
916
  248,
650
917
  89
651
- ];
652
- };
653
- };
918
+ ]
919
+ }
920
+ }
654
921
  },
655
922
  {
656
- name: 'tokenMint';
657
- optional: true;
923
+ "name": "tokenMint",
924
+ "optional": true
658
925
  },
659
926
  {
660
- name: 'systemProgram';
661
- address: '11111111111111111111111111111111';
927
+ "name": "systemProgram",
928
+ "address": "11111111111111111111111111111111"
662
929
  },
663
930
  {
664
- name: 'tokenProgram';
931
+ "name": "tokenProgram"
665
932
  },
666
933
  {
667
- name: 'associatedTokenProgram';
668
- address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
934
+ "name": "associatedTokenProgram",
935
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
669
936
  }
670
- ];
671
- args: [
937
+ ],
938
+ "args": [
672
939
  {
673
- name: 'feeToken';
674
- type: 'pubkey';
940
+ "name": "feeToken",
941
+ "type": "pubkey"
675
942
  }
676
- ];
943
+ ]
677
944
  }
678
- ];
679
- accounts: [
945
+ ],
946
+ "accounts": [
680
947
  {
681
- name: 'fee';
682
- discriminator: [24, 55, 150, 250, 168, 27, 101, 178];
948
+ "name": "fee",
949
+ "discriminator": [
950
+ 24,
951
+ 55,
952
+ 150,
953
+ 250,
954
+ 168,
955
+ 27,
956
+ 101,
957
+ 178
958
+ ]
683
959
  },
684
960
  {
685
- name: 'feeCollectorStorage';
686
- discriminator: [204, 100, 40, 33, 80, 124, 161, 126];
961
+ "name": "feeCollectorStorage",
962
+ "discriminator": [
963
+ 204,
964
+ 100,
965
+ 40,
966
+ 33,
967
+ 80,
968
+ 124,
969
+ 161,
970
+ 126
971
+ ]
687
972
  }
688
- ];
689
- events: [
973
+ ],
974
+ "events": [
690
975
  {
691
- name: 'customFeeSetBips';
692
- discriminator: [143, 98, 8, 161, 227, 53, 220, 12];
976
+ "name": "customFeeSetBips",
977
+ "discriminator": [
978
+ 143,
979
+ 98,
980
+ 8,
981
+ 161,
982
+ 227,
983
+ 53,
984
+ 220,
985
+ 12
986
+ ]
693
987
  },
694
988
  {
695
- name: 'customFeeSetFixed';
696
- discriminator: [85, 168, 106, 241, 69, 235, 220, 95];
989
+ "name": "customFeeSetFixed",
990
+ "discriminator": [
991
+ 85,
992
+ 168,
993
+ 106,
994
+ 241,
995
+ 69,
996
+ 235,
997
+ 220,
998
+ 95
999
+ ]
697
1000
  },
698
1001
  {
699
- name: 'defaultFeeSet';
700
- discriminator: [6, 114, 243, 225, 246, 24, 178, 87];
1002
+ "name": "defaultFeeSet",
1003
+ "discriminator": [
1004
+ 6,
1005
+ 114,
1006
+ 243,
1007
+ 225,
1008
+ 246,
1009
+ 24,
1010
+ 178,
1011
+ 87
1012
+ ]
701
1013
  }
702
- ];
703
- errors: [
1014
+ ],
1015
+ "errors": [
704
1016
  {
705
- code: 6000;
706
- name: 'alreadyInitialized';
707
- msg: 'alreadyInitialized';
1017
+ "code": 6000,
1018
+ "name": "alreadyInitialized",
1019
+ "msg": "alreadyInitialized"
708
1020
  },
709
1021
  {
710
- code: 6001;
711
- name: 'notOwner';
712
- msg: 'notOwner';
1022
+ "code": 6001,
1023
+ "name": "notOwner",
1024
+ "msg": "notOwner"
713
1025
  },
714
1026
  {
715
- code: 6002;
716
- name: 'feesTooHigh';
717
- msg: 'feesTooHigh';
1027
+ "code": 6002,
1028
+ "name": "feesTooHigh",
1029
+ "msg": "feesTooHigh"
718
1030
  },
719
1031
  {
720
- code: 6003;
721
- name: 'invalidCallData';
722
- msg: 'invalidCallData';
1032
+ "code": 6003,
1033
+ "name": "invalidCallData",
1034
+ "msg": "invalidCallData"
723
1035
  }
724
- ];
725
- types: [
1036
+ ],
1037
+ "types": [
726
1038
  {
727
- name: 'customFeeSetBips';
728
- type: {
729
- kind: 'struct';
730
- fields: [
1039
+ "name": "customFeeSetBips",
1040
+ "type": {
1041
+ "kind": "struct",
1042
+ "fields": [
731
1043
  {
732
- name: 'bips';
733
- type: 'u64';
1044
+ "name": "bips",
1045
+ "type": "u64"
734
1046
  },
735
1047
  {
736
- name: 'unlockerAddress';
737
- type: 'pubkey';
1048
+ "name": "projectId",
1049
+ "type": "string"
738
1050
  }
739
- ];
740
- };
1051
+ ]
1052
+ }
741
1053
  },
742
1054
  {
743
- name: 'customFeeSetFixed';
744
- type: {
745
- kind: 'struct';
746
- fields: [
1055
+ "name": "customFeeSetFixed",
1056
+ "type": {
1057
+ "kind": "struct",
1058
+ "fields": [
747
1059
  {
748
- name: 'fixedFee';
749
- type: 'u64';
1060
+ "name": "fixedFee",
1061
+ "type": "u64"
750
1062
  },
751
1063
  {
752
- name: 'unlockerAddress';
753
- type: 'pubkey';
1064
+ "name": "projectId",
1065
+ "type": "string"
754
1066
  }
755
- ];
756
- };
1067
+ ]
1068
+ }
757
1069
  },
758
1070
  {
759
- name: 'defaultFeeSet';
760
- type: {
761
- kind: 'struct';
762
- fields: [
1071
+ "name": "defaultFeeSet",
1072
+ "type": {
1073
+ "kind": "struct",
1074
+ "fields": [
763
1075
  {
764
- name: 'bips';
765
- type: 'u64';
1076
+ "name": "bips",
1077
+ "type": "u64"
766
1078
  }
767
- ];
768
- };
1079
+ ]
1080
+ }
769
1081
  },
770
1082
  {
771
- name: 'fee';
772
- type: {
773
- kind: 'struct';
774
- fields: [
1083
+ "name": "fee",
1084
+ "type": {
1085
+ "kind": "struct",
1086
+ "fields": [
1087
+ {
1088
+ "name": "default",
1089
+ "type": "bool"
1090
+ },
775
1091
  {
776
- name: 'bips';
777
- type: 'u64';
1092
+ "name": "bips",
1093
+ "type": "u64"
778
1094
  },
779
1095
  {
780
- name: 'fixed';
781
- type: 'u64';
1096
+ "name": "fixed",
1097
+ "type": "u64"
782
1098
  }
783
- ];
784
- };
1099
+ ]
1100
+ }
785
1101
  },
786
1102
  {
787
- name: 'feeCollectorStorage';
788
- type: {
789
- kind: 'struct';
790
- fields: [
1103
+ "name": "feeCollectorStorage",
1104
+ "type": {
1105
+ "kind": "struct",
1106
+ "fields": [
791
1107
  {
792
- name: 'owner';
793
- type: 'pubkey';
1108
+ "name": "owner",
1109
+ "type": "pubkey"
794
1110
  },
795
1111
  {
796
- name: 'defaultFeesBips';
797
- type: 'u64';
1112
+ "name": "defaultFeesBips",
1113
+ "type": "u64"
798
1114
  }
799
- ];
800
- };
1115
+ ]
1116
+ }
801
1117
  }
802
- ];
1118
+ ]
803
1119
  };