@streamflow/common 10.0.3 → 11.0.0-alpha.p334.45cbb4e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +984 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +2 -1
- package/dist/cjs/solana/index.cjs +984 -0
- package/dist/cjs/solana/index.cjs.map +1 -1
- package/dist/cjs/solana/index.d.cts +992 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +984 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/solana/index.d.ts +992 -1
- package/dist/esm/solana/index.js +984 -1
- package/dist/esm/solana/index.js.map +1 -1
- package/package.json +5 -4
|
@@ -2,6 +2,7 @@ import * as _solana_web3_js from '@solana/web3.js';
|
|
|
2
2
|
import { PublicKey, MemcmpFilter, Connection, TransactionInstruction, VersionedTransaction, AccountInfo, BlockhashWithExpiryBlockHeight, Context, Commitment, Keypair, Transaction, AddressLookupTableAccount, RpcResponseAndContext, SimulatedTransactionResponse, SignatureStatus } from '@solana/web3.js';
|
|
3
3
|
import BN from 'bn.js';
|
|
4
4
|
import PQueue from 'p-queue';
|
|
5
|
+
import { IdlTypes, IdlAccounts, Program } from '@coral-xyz/anchor';
|
|
5
6
|
import { Mint } from '@solana/spl-token';
|
|
6
7
|
import { SignerWalletAdapter } from '@solana/wallet-adapter-base';
|
|
7
8
|
|
|
@@ -9,6 +10,990 @@ declare const getFilters: <T extends Record<string, number | PublicKey>>(criteri
|
|
|
9
10
|
|
|
10
11
|
declare const prepareWrappedAccount: (connection: Connection, senderAddress: PublicKey, amount: BN) => Promise<TransactionInstruction[]>;
|
|
11
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Program IDL in camelCase format in order to be used in JS/TS.
|
|
15
|
+
*
|
|
16
|
+
* Note that this is only a type helper and is not the actual IDL. The original
|
|
17
|
+
* IDL can be found at `target/idl/partner_oracle.json`.
|
|
18
|
+
*/
|
|
19
|
+
type PartnerOracle = {
|
|
20
|
+
"address": "pardpVtPjC8nLj1Dwncew62mUzfChdCX1EaoZe8oCAa";
|
|
21
|
+
"metadata": {
|
|
22
|
+
"name": "partnerOracle";
|
|
23
|
+
"version": "1.0.0";
|
|
24
|
+
"spec": "0.1.0";
|
|
25
|
+
"description": "Created with Anchor";
|
|
26
|
+
};
|
|
27
|
+
"instructions": [
|
|
28
|
+
{
|
|
29
|
+
"name": "airdropClearExpiredFees";
|
|
30
|
+
"discriminator": [
|
|
31
|
+
203,
|
|
32
|
+
5,
|
|
33
|
+
237,
|
|
34
|
+
235,
|
|
35
|
+
32,
|
|
36
|
+
38,
|
|
37
|
+
150,
|
|
38
|
+
235
|
|
39
|
+
];
|
|
40
|
+
"accounts": [
|
|
41
|
+
{
|
|
42
|
+
"name": "config";
|
|
43
|
+
"docs": [
|
|
44
|
+
"Account that stores the config"
|
|
45
|
+
];
|
|
46
|
+
"writable": true;
|
|
47
|
+
"pda": {
|
|
48
|
+
"seeds": [
|
|
49
|
+
{
|
|
50
|
+
"kind": "const";
|
|
51
|
+
"value": [
|
|
52
|
+
97,
|
|
53
|
+
105,
|
|
54
|
+
114,
|
|
55
|
+
100,
|
|
56
|
+
114,
|
|
57
|
+
111,
|
|
58
|
+
112,
|
|
59
|
+
95,
|
|
60
|
+
99,
|
|
61
|
+
111,
|
|
62
|
+
110,
|
|
63
|
+
102,
|
|
64
|
+
105,
|
|
65
|
+
103
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
];
|
|
72
|
+
"args": [];
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "airdropGetFees";
|
|
76
|
+
"discriminator": [
|
|
77
|
+
185,
|
|
78
|
+
20,
|
|
79
|
+
28,
|
|
80
|
+
207,
|
|
81
|
+
70,
|
|
82
|
+
243,
|
|
83
|
+
32,
|
|
84
|
+
62
|
|
85
|
+
];
|
|
86
|
+
"accounts": [
|
|
87
|
+
{
|
|
88
|
+
"name": "config";
|
|
89
|
+
"docs": [
|
|
90
|
+
"Account that stores the config"
|
|
91
|
+
];
|
|
92
|
+
"pda": {
|
|
93
|
+
"seeds": [
|
|
94
|
+
{
|
|
95
|
+
"kind": "const";
|
|
96
|
+
"value": [
|
|
97
|
+
97,
|
|
98
|
+
105,
|
|
99
|
+
114,
|
|
100
|
+
100,
|
|
101
|
+
114,
|
|
102
|
+
111,
|
|
103
|
+
112,
|
|
104
|
+
95,
|
|
105
|
+
99,
|
|
106
|
+
111,
|
|
107
|
+
110,
|
|
108
|
+
102,
|
|
109
|
+
105,
|
|
110
|
+
103
|
|
111
|
+
];
|
|
112
|
+
}
|
|
113
|
+
];
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
];
|
|
117
|
+
"args": [
|
|
118
|
+
{
|
|
119
|
+
"name": "pubkey";
|
|
120
|
+
"type": "pubkey";
|
|
121
|
+
}
|
|
122
|
+
];
|
|
123
|
+
"returns": {
|
|
124
|
+
"defined": {
|
|
125
|
+
"name": "airdropFees";
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "airdropInitializeConfig";
|
|
131
|
+
"discriminator": [
|
|
132
|
+
2,
|
|
133
|
+
110,
|
|
134
|
+
102,
|
|
135
|
+
10,
|
|
136
|
+
34,
|
|
137
|
+
83,
|
|
138
|
+
164,
|
|
139
|
+
55
|
|
140
|
+
];
|
|
141
|
+
"accounts": [
|
|
142
|
+
{
|
|
143
|
+
"name": "payer";
|
|
144
|
+
"docs": [
|
|
145
|
+
"Account that will cover tx fees, can be anybody since the instruction is safe"
|
|
146
|
+
];
|
|
147
|
+
"writable": true;
|
|
148
|
+
"signer": true;
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "config";
|
|
152
|
+
"writable": true;
|
|
153
|
+
"pda": {
|
|
154
|
+
"seeds": [
|
|
155
|
+
{
|
|
156
|
+
"kind": "const";
|
|
157
|
+
"value": [
|
|
158
|
+
97,
|
|
159
|
+
105,
|
|
160
|
+
114,
|
|
161
|
+
100,
|
|
162
|
+
114,
|
|
163
|
+
111,
|
|
164
|
+
112,
|
|
165
|
+
95,
|
|
166
|
+
99,
|
|
167
|
+
111,
|
|
168
|
+
110,
|
|
169
|
+
102,
|
|
170
|
+
105,
|
|
171
|
+
103
|
|
172
|
+
];
|
|
173
|
+
}
|
|
174
|
+
];
|
|
175
|
+
};
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "systemProgram";
|
|
179
|
+
"address": "11111111111111111111111111111111";
|
|
180
|
+
}
|
|
181
|
+
];
|
|
182
|
+
"args": [];
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "airdropRemoveFees";
|
|
186
|
+
"discriminator": [
|
|
187
|
+
119,
|
|
188
|
+
246,
|
|
189
|
+
202,
|
|
190
|
+
91,
|
|
191
|
+
59,
|
|
192
|
+
94,
|
|
193
|
+
252,
|
|
194
|
+
239
|
|
195
|
+
];
|
|
196
|
+
"accounts": [
|
|
197
|
+
{
|
|
198
|
+
"name": "authority";
|
|
199
|
+
"docs": [
|
|
200
|
+
"Fee Authority"
|
|
201
|
+
];
|
|
202
|
+
"writable": true;
|
|
203
|
+
"signer": true;
|
|
204
|
+
"address": "CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7";
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "config";
|
|
208
|
+
"docs": [
|
|
209
|
+
"Account that stores the config"
|
|
210
|
+
];
|
|
211
|
+
"writable": true;
|
|
212
|
+
"pda": {
|
|
213
|
+
"seeds": [
|
|
214
|
+
{
|
|
215
|
+
"kind": "const";
|
|
216
|
+
"value": [
|
|
217
|
+
97,
|
|
218
|
+
105,
|
|
219
|
+
114,
|
|
220
|
+
100,
|
|
221
|
+
114,
|
|
222
|
+
111,
|
|
223
|
+
112,
|
|
224
|
+
95,
|
|
225
|
+
99,
|
|
226
|
+
111,
|
|
227
|
+
110,
|
|
228
|
+
102,
|
|
229
|
+
105,
|
|
230
|
+
103
|
|
231
|
+
];
|
|
232
|
+
}
|
|
233
|
+
];
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
];
|
|
237
|
+
"args": [
|
|
238
|
+
{
|
|
239
|
+
"name": "pubkey";
|
|
240
|
+
"type": "pubkey";
|
|
241
|
+
}
|
|
242
|
+
];
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"name": "airdropWriteDefaultFees";
|
|
246
|
+
"discriminator": [
|
|
247
|
+
37,
|
|
248
|
+
104,
|
|
249
|
+
254,
|
|
250
|
+
202,
|
|
251
|
+
136,
|
|
252
|
+
124,
|
|
253
|
+
245,
|
|
254
|
+
94
|
|
255
|
+
];
|
|
256
|
+
"accounts": [
|
|
257
|
+
{
|
|
258
|
+
"name": "authority";
|
|
259
|
+
"docs": [
|
|
260
|
+
"Fee Authority"
|
|
261
|
+
];
|
|
262
|
+
"writable": true;
|
|
263
|
+
"signer": true;
|
|
264
|
+
"address": "CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7";
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"name": "config";
|
|
268
|
+
"docs": [
|
|
269
|
+
"Account that stores the config"
|
|
270
|
+
];
|
|
271
|
+
"writable": true;
|
|
272
|
+
"pda": {
|
|
273
|
+
"seeds": [
|
|
274
|
+
{
|
|
275
|
+
"kind": "const";
|
|
276
|
+
"value": [
|
|
277
|
+
97,
|
|
278
|
+
105,
|
|
279
|
+
114,
|
|
280
|
+
100,
|
|
281
|
+
114,
|
|
282
|
+
111,
|
|
283
|
+
112,
|
|
284
|
+
95,
|
|
285
|
+
99,
|
|
286
|
+
111,
|
|
287
|
+
110,
|
|
288
|
+
102,
|
|
289
|
+
105,
|
|
290
|
+
103
|
|
291
|
+
];
|
|
292
|
+
}
|
|
293
|
+
];
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
];
|
|
297
|
+
"args": [
|
|
298
|
+
{
|
|
299
|
+
"name": "creationFee";
|
|
300
|
+
"type": "u32";
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"name": "priceOracleFee";
|
|
304
|
+
"type": "u32";
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "claimMinFee";
|
|
308
|
+
"type": "u32";
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"name": "claimMaxFee";
|
|
312
|
+
"type": "u32";
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"name": "allocationFactor";
|
|
316
|
+
"type": "f64";
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "clawbackTokenFeePercent";
|
|
320
|
+
"type": "f64";
|
|
321
|
+
}
|
|
322
|
+
];
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"name": "airdropWriteFees";
|
|
326
|
+
"discriminator": [
|
|
327
|
+
71,
|
|
328
|
+
165,
|
|
329
|
+
178,
|
|
330
|
+
215,
|
|
331
|
+
19,
|
|
332
|
+
70,
|
|
333
|
+
146,
|
|
334
|
+
71
|
|
335
|
+
];
|
|
336
|
+
"accounts": [
|
|
337
|
+
{
|
|
338
|
+
"name": "authority";
|
|
339
|
+
"docs": [
|
|
340
|
+
"Fee Authority"
|
|
341
|
+
];
|
|
342
|
+
"writable": true;
|
|
343
|
+
"signer": true;
|
|
344
|
+
"address": "CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7";
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"name": "config";
|
|
348
|
+
"docs": [
|
|
349
|
+
"Account that stores the config"
|
|
350
|
+
];
|
|
351
|
+
"writable": true;
|
|
352
|
+
"pda": {
|
|
353
|
+
"seeds": [
|
|
354
|
+
{
|
|
355
|
+
"kind": "const";
|
|
356
|
+
"value": [
|
|
357
|
+
97,
|
|
358
|
+
105,
|
|
359
|
+
114,
|
|
360
|
+
100,
|
|
361
|
+
114,
|
|
362
|
+
111,
|
|
363
|
+
112,
|
|
364
|
+
95,
|
|
365
|
+
99,
|
|
366
|
+
111,
|
|
367
|
+
110,
|
|
368
|
+
102,
|
|
369
|
+
105,
|
|
370
|
+
103
|
|
371
|
+
];
|
|
372
|
+
}
|
|
373
|
+
];
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
];
|
|
377
|
+
"args": [
|
|
378
|
+
{
|
|
379
|
+
"name": "pubkey";
|
|
380
|
+
"type": "pubkey";
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"name": "creationFee";
|
|
384
|
+
"type": "u32";
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"name": "priceOracleFee";
|
|
388
|
+
"type": "u32";
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"name": "claimMinFee";
|
|
392
|
+
"type": "u32";
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"name": "claimMaxFee";
|
|
396
|
+
"type": "u32";
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"name": "allocationFactor";
|
|
400
|
+
"type": "f64";
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"name": "clawbackTokenFeePercent";
|
|
404
|
+
"type": "f64";
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"name": "expiryTs";
|
|
408
|
+
"type": "u64";
|
|
409
|
+
}
|
|
410
|
+
];
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"name": "vestingGetFees";
|
|
414
|
+
"discriminator": [
|
|
415
|
+
239,
|
|
416
|
+
230,
|
|
417
|
+
28,
|
|
418
|
+
173,
|
|
419
|
+
134,
|
|
420
|
+
247,
|
|
421
|
+
57,
|
|
422
|
+
176
|
|
423
|
+
];
|
|
424
|
+
"accounts": [
|
|
425
|
+
{
|
|
426
|
+
"name": "partners";
|
|
427
|
+
"pda": {
|
|
428
|
+
"seeds": [
|
|
429
|
+
{
|
|
430
|
+
"kind": "const";
|
|
431
|
+
"value": [
|
|
432
|
+
115,
|
|
433
|
+
116,
|
|
434
|
+
114,
|
|
435
|
+
109,
|
|
436
|
+
95,
|
|
437
|
+
102,
|
|
438
|
+
101,
|
|
439
|
+
101,
|
|
440
|
+
115
|
|
441
|
+
];
|
|
442
|
+
}
|
|
443
|
+
];
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
];
|
|
447
|
+
"args": [
|
|
448
|
+
{
|
|
449
|
+
"name": "pubkey";
|
|
450
|
+
"type": "pubkey";
|
|
451
|
+
}
|
|
452
|
+
];
|
|
453
|
+
"returns": {
|
|
454
|
+
"defined": {
|
|
455
|
+
"name": "vestingFees";
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"name": "vestingInitializePartners";
|
|
461
|
+
"discriminator": [
|
|
462
|
+
205,
|
|
463
|
+
170,
|
|
464
|
+
148,
|
|
465
|
+
219,
|
|
466
|
+
143,
|
|
467
|
+
38,
|
|
468
|
+
77,
|
|
469
|
+
196
|
|
470
|
+
];
|
|
471
|
+
"accounts": [
|
|
472
|
+
{
|
|
473
|
+
"name": "payer";
|
|
474
|
+
"docs": [
|
|
475
|
+
"Account that will cover tx fees, can be anybody since the instruction is safe"
|
|
476
|
+
];
|
|
477
|
+
"writable": true;
|
|
478
|
+
"signer": true;
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"name": "partners";
|
|
482
|
+
"writable": true;
|
|
483
|
+
"pda": {
|
|
484
|
+
"seeds": [
|
|
485
|
+
{
|
|
486
|
+
"kind": "const";
|
|
487
|
+
"value": [
|
|
488
|
+
115,
|
|
489
|
+
116,
|
|
490
|
+
114,
|
|
491
|
+
109,
|
|
492
|
+
95,
|
|
493
|
+
102,
|
|
494
|
+
101,
|
|
495
|
+
101,
|
|
496
|
+
115
|
|
497
|
+
];
|
|
498
|
+
}
|
|
499
|
+
];
|
|
500
|
+
};
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"name": "systemProgram";
|
|
504
|
+
"address": "11111111111111111111111111111111";
|
|
505
|
+
}
|
|
506
|
+
];
|
|
507
|
+
"args": [];
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"name": "vestingRemoveFees";
|
|
511
|
+
"discriminator": [
|
|
512
|
+
233,
|
|
513
|
+
176,
|
|
514
|
+
222,
|
|
515
|
+
64,
|
|
516
|
+
79,
|
|
517
|
+
14,
|
|
518
|
+
48,
|
|
519
|
+
168
|
|
520
|
+
];
|
|
521
|
+
"accounts": [
|
|
522
|
+
{
|
|
523
|
+
"name": "authority";
|
|
524
|
+
"docs": [
|
|
525
|
+
"Account that will cover tx fees, should be equal to creator if not is not expired"
|
|
526
|
+
];
|
|
527
|
+
"writable": true;
|
|
528
|
+
"signer": true;
|
|
529
|
+
"address": "CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7";
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"name": "partners";
|
|
533
|
+
"writable": true;
|
|
534
|
+
"pda": {
|
|
535
|
+
"seeds": [
|
|
536
|
+
{
|
|
537
|
+
"kind": "const";
|
|
538
|
+
"value": [
|
|
539
|
+
115,
|
|
540
|
+
116,
|
|
541
|
+
114,
|
|
542
|
+
109,
|
|
543
|
+
95,
|
|
544
|
+
102,
|
|
545
|
+
101,
|
|
546
|
+
101,
|
|
547
|
+
115
|
|
548
|
+
];
|
|
549
|
+
}
|
|
550
|
+
];
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
];
|
|
554
|
+
"args": [
|
|
555
|
+
{
|
|
556
|
+
"name": "pubkey";
|
|
557
|
+
"type": "pubkey";
|
|
558
|
+
}
|
|
559
|
+
];
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"name": "vestingWriteDefaultFees";
|
|
563
|
+
"discriminator": [
|
|
564
|
+
96,
|
|
565
|
+
198,
|
|
566
|
+
97,
|
|
567
|
+
81,
|
|
568
|
+
162,
|
|
569
|
+
50,
|
|
570
|
+
51,
|
|
571
|
+
10
|
|
572
|
+
];
|
|
573
|
+
"accounts": [
|
|
574
|
+
{
|
|
575
|
+
"name": "authority";
|
|
576
|
+
"docs": [
|
|
577
|
+
"Account that will cover tx fees, should be equal to creator if not is not expired"
|
|
578
|
+
];
|
|
579
|
+
"writable": true;
|
|
580
|
+
"signer": true;
|
|
581
|
+
"address": "CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7";
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
"name": "partners";
|
|
585
|
+
"writable": true;
|
|
586
|
+
"pda": {
|
|
587
|
+
"seeds": [
|
|
588
|
+
{
|
|
589
|
+
"kind": "const";
|
|
590
|
+
"value": [
|
|
591
|
+
115,
|
|
592
|
+
116,
|
|
593
|
+
114,
|
|
594
|
+
109,
|
|
595
|
+
95,
|
|
596
|
+
102,
|
|
597
|
+
101,
|
|
598
|
+
101,
|
|
599
|
+
115
|
|
600
|
+
];
|
|
601
|
+
}
|
|
602
|
+
];
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
];
|
|
606
|
+
"args": [
|
|
607
|
+
{
|
|
608
|
+
"name": "creationFee";
|
|
609
|
+
"type": "u32";
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
"name": "autoClaimFee";
|
|
613
|
+
"type": "u32";
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"name": "tokenFeePercent";
|
|
617
|
+
"type": "f32";
|
|
618
|
+
}
|
|
619
|
+
];
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"name": "vestingWriteFees";
|
|
623
|
+
"discriminator": [
|
|
624
|
+
251,
|
|
625
|
+
24,
|
|
626
|
+
6,
|
|
627
|
+
241,
|
|
628
|
+
182,
|
|
629
|
+
56,
|
|
630
|
+
93,
|
|
631
|
+
100
|
|
632
|
+
];
|
|
633
|
+
"accounts": [
|
|
634
|
+
{
|
|
635
|
+
"name": "authority";
|
|
636
|
+
"docs": [
|
|
637
|
+
"Account that will cover tx fees, should be equal to creator if not is not expired"
|
|
638
|
+
];
|
|
639
|
+
"writable": true;
|
|
640
|
+
"signer": true;
|
|
641
|
+
"address": "CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7";
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"name": "partners";
|
|
645
|
+
"writable": true;
|
|
646
|
+
"pda": {
|
|
647
|
+
"seeds": [
|
|
648
|
+
{
|
|
649
|
+
"kind": "const";
|
|
650
|
+
"value": [
|
|
651
|
+
115,
|
|
652
|
+
116,
|
|
653
|
+
114,
|
|
654
|
+
109,
|
|
655
|
+
95,
|
|
656
|
+
102,
|
|
657
|
+
101,
|
|
658
|
+
101,
|
|
659
|
+
115
|
|
660
|
+
];
|
|
661
|
+
}
|
|
662
|
+
];
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
];
|
|
666
|
+
"args": [
|
|
667
|
+
{
|
|
668
|
+
"name": "pubkey";
|
|
669
|
+
"type": "pubkey";
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"name": "creationFee";
|
|
673
|
+
"type": "u32";
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
"name": "autoClaimFee";
|
|
677
|
+
"type": "u32";
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
"name": "tokenFeePercent";
|
|
681
|
+
"type": "f32";
|
|
682
|
+
}
|
|
683
|
+
];
|
|
684
|
+
}
|
|
685
|
+
];
|
|
686
|
+
"accounts": [
|
|
687
|
+
{
|
|
688
|
+
"name": "airdropConfig";
|
|
689
|
+
"discriminator": [
|
|
690
|
+
194,
|
|
691
|
+
149,
|
|
692
|
+
223,
|
|
693
|
+
142,
|
|
694
|
+
42,
|
|
695
|
+
98,
|
|
696
|
+
128,
|
|
697
|
+
16
|
|
698
|
+
];
|
|
699
|
+
}
|
|
700
|
+
];
|
|
701
|
+
"errors": [
|
|
702
|
+
{
|
|
703
|
+
"code": 6000;
|
|
704
|
+
"name": "unauthorized";
|
|
705
|
+
"msg": "Account is not authorized to execute this instruction";
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
"code": 6001;
|
|
709
|
+
"name": "arithmeticError";
|
|
710
|
+
"msg": "Arithmetic Error (overflow/underflow)";
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
"code": 6100;
|
|
714
|
+
"name": "invalidExpiry";
|
|
715
|
+
"msg": "Provided expiry ts is invalid";
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"code": 6101;
|
|
719
|
+
"name": "noExpiredFees";
|
|
720
|
+
"msg": "No expired fees found, transaction won't change the config";
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"code": 6200;
|
|
724
|
+
"name": "invalidVestingFee";
|
|
725
|
+
"msg": "Received invalid Vesting Fee configuration";
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"code": 6300;
|
|
729
|
+
"name": "invalidAirdropFee";
|
|
730
|
+
"msg": "Received invalid Airdrop Fee configuration";
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
"code": 6301;
|
|
734
|
+
"name": "airdropConfigFull";
|
|
735
|
+
"msg": "Airdrop config is full, can not write fees";
|
|
736
|
+
}
|
|
737
|
+
];
|
|
738
|
+
"types": [
|
|
739
|
+
{
|
|
740
|
+
"name": "airdropConfig";
|
|
741
|
+
"serialization": "bytemuck";
|
|
742
|
+
"repr": {
|
|
743
|
+
"kind": "c";
|
|
744
|
+
};
|
|
745
|
+
"type": {
|
|
746
|
+
"kind": "struct";
|
|
747
|
+
"fields": [
|
|
748
|
+
{
|
|
749
|
+
"name": "version";
|
|
750
|
+
"type": "u32";
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"name": "usdMultiplier";
|
|
754
|
+
"docs": [
|
|
755
|
+
"Multiplier to apply when calculating ALL fees"
|
|
756
|
+
];
|
|
757
|
+
"type": "f32";
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"name": "solanaPrice";
|
|
761
|
+
"docs": [
|
|
762
|
+
"Last solana price used"
|
|
763
|
+
];
|
|
764
|
+
"type": "u64";
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"name": "creationFee";
|
|
768
|
+
"docs": [
|
|
769
|
+
"Creation SOL fee"
|
|
770
|
+
];
|
|
771
|
+
"type": "u32";
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"name": "priceOracleFee";
|
|
775
|
+
"docs": [
|
|
776
|
+
"Fee for custom price oracle used in dynamic airdrops"
|
|
777
|
+
];
|
|
778
|
+
"type": "u32";
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"name": "claimMinFee";
|
|
782
|
+
"docs": [
|
|
783
|
+
"Dynamic claim fee in SOL, min"
|
|
784
|
+
];
|
|
785
|
+
"type": "u32";
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
"name": "claimMaxFee";
|
|
789
|
+
"docs": [
|
|
790
|
+
"Dynamic claim fee in SOL, max"
|
|
791
|
+
];
|
|
792
|
+
"type": "u32";
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"name": "allocationFactor";
|
|
796
|
+
"docs": [
|
|
797
|
+
"Factor to multiple claimable SOL by when calculating fee"
|
|
798
|
+
];
|
|
799
|
+
"type": "f64";
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"name": "clawbackTokenFeePercent";
|
|
803
|
+
"docs": [
|
|
804
|
+
"Toke % fee on clawback"
|
|
805
|
+
];
|
|
806
|
+
"type": "f64";
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
"name": "buffer";
|
|
810
|
+
"type": {
|
|
811
|
+
"array": [
|
|
812
|
+
"u8",
|
|
813
|
+
144
|
|
814
|
+
];
|
|
815
|
+
};
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
"name": "partners";
|
|
819
|
+
"type": {
|
|
820
|
+
"array": [
|
|
821
|
+
{
|
|
822
|
+
"defined": {
|
|
823
|
+
"name": "airdropPartner";
|
|
824
|
+
};
|
|
825
|
+
},
|
|
826
|
+
100
|
|
827
|
+
];
|
|
828
|
+
};
|
|
829
|
+
}
|
|
830
|
+
];
|
|
831
|
+
};
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
"name": "airdropFees";
|
|
835
|
+
"type": {
|
|
836
|
+
"kind": "struct";
|
|
837
|
+
"fields": [
|
|
838
|
+
{
|
|
839
|
+
"name": "pubkey";
|
|
840
|
+
"docs": [
|
|
841
|
+
"Account for which the fees were configured"
|
|
842
|
+
];
|
|
843
|
+
"type": "pubkey";
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"name": "creationFee";
|
|
847
|
+
"docs": [
|
|
848
|
+
"Creation SOL fee"
|
|
849
|
+
];
|
|
850
|
+
"type": "u32";
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
"name": "priceOracleFee";
|
|
854
|
+
"docs": [
|
|
855
|
+
"Fee for custom price oracle used in dynamic airdrops"
|
|
856
|
+
];
|
|
857
|
+
"type": "u32";
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
"name": "claimMinFee";
|
|
861
|
+
"docs": [
|
|
862
|
+
"Dynamic claim fee in SOL, min"
|
|
863
|
+
];
|
|
864
|
+
"type": "u32";
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"name": "claimMaxFee";
|
|
868
|
+
"docs": [
|
|
869
|
+
"Dynamic claim fee in SOL, max"
|
|
870
|
+
];
|
|
871
|
+
"type": "u32";
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"name": "allocationFactor";
|
|
875
|
+
"docs": [
|
|
876
|
+
"Factor to multiple claimable SOL by when calculating fee"
|
|
877
|
+
];
|
|
878
|
+
"type": "f64";
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
"name": "clawbackTokenFeePercent";
|
|
882
|
+
"docs": [
|
|
883
|
+
"Token % fee on clawback"
|
|
884
|
+
];
|
|
885
|
+
"type": "f64";
|
|
886
|
+
}
|
|
887
|
+
];
|
|
888
|
+
};
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"name": "airdropPartner";
|
|
892
|
+
"serialization": "bytemuck";
|
|
893
|
+
"repr": {
|
|
894
|
+
"kind": "c";
|
|
895
|
+
};
|
|
896
|
+
"type": {
|
|
897
|
+
"kind": "struct";
|
|
898
|
+
"fields": [
|
|
899
|
+
{
|
|
900
|
+
"name": "pubkey";
|
|
901
|
+
"docs": [
|
|
902
|
+
"Pubkey of the partner"
|
|
903
|
+
];
|
|
904
|
+
"type": "pubkey";
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"name": "creationFee";
|
|
908
|
+
"docs": [
|
|
909
|
+
"Creation SOL fee"
|
|
910
|
+
];
|
|
911
|
+
"type": "u32";
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
"name": "priceOracleFee";
|
|
915
|
+
"docs": [
|
|
916
|
+
"Fee for custom price oracle used in dynamic airdrops"
|
|
917
|
+
];
|
|
918
|
+
"type": "u32";
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"name": "claimMinFee";
|
|
922
|
+
"docs": [
|
|
923
|
+
"Dynamic claim fee in SOL, min"
|
|
924
|
+
];
|
|
925
|
+
"type": "u32";
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
"name": "claimMaxFee";
|
|
929
|
+
"docs": [
|
|
930
|
+
"Dynamic claim fee in SOL, max"
|
|
931
|
+
];
|
|
932
|
+
"type": "u32";
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"name": "allocationFactor";
|
|
936
|
+
"docs": [
|
|
937
|
+
"Factor to multiple claimable SOL by when calculating fee"
|
|
938
|
+
];
|
|
939
|
+
"type": "f64";
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
"name": "clawbackTokenFeePercent";
|
|
943
|
+
"docs": [
|
|
944
|
+
"Toke % fee on clawback"
|
|
945
|
+
];
|
|
946
|
+
"type": "f64";
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
"name": "expiryTs";
|
|
950
|
+
"docs": [
|
|
951
|
+
"Time when fee configuration expires"
|
|
952
|
+
];
|
|
953
|
+
"type": "u64";
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
"name": "buffer";
|
|
957
|
+
"docs": [
|
|
958
|
+
"Buffer for additional fields"
|
|
959
|
+
];
|
|
960
|
+
"type": {
|
|
961
|
+
"array": [
|
|
962
|
+
"u8",
|
|
963
|
+
16
|
|
964
|
+
];
|
|
965
|
+
};
|
|
966
|
+
}
|
|
967
|
+
];
|
|
968
|
+
};
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
"name": "vestingFees";
|
|
972
|
+
"type": {
|
|
973
|
+
"kind": "struct";
|
|
974
|
+
"fields": [
|
|
975
|
+
{
|
|
976
|
+
"name": "pubkey";
|
|
977
|
+
"type": "pubkey";
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
"name": "creationFee";
|
|
981
|
+
"type": "u32";
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"name": "autoClaimFee";
|
|
985
|
+
"type": "u32";
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"name": "tokenFeePercent";
|
|
989
|
+
"type": "f32";
|
|
990
|
+
}
|
|
991
|
+
];
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
];
|
|
995
|
+
};
|
|
996
|
+
|
|
12
997
|
type ComputePriceEstimate = (tx: string | (string | PublicKey)[]) => Promise<number>;
|
|
13
998
|
type ComputeLimitEstimate = (tx: VersionedTransaction) => Promise<number>;
|
|
14
999
|
/**
|
|
@@ -94,6 +1079,8 @@ declare enum ICluster {
|
|
|
94
1079
|
Testnet = "testnet",
|
|
95
1080
|
Local = "local"
|
|
96
1081
|
}
|
|
1082
|
+
type PartnerOracleTypes = IdlTypes<PartnerOracle>;
|
|
1083
|
+
type PartnerOracleAccounts = IdlAccounts<PartnerOracle>;
|
|
97
1084
|
/**
|
|
98
1085
|
* Error wrapper for calls made to the contract on chain
|
|
99
1086
|
*/
|
|
@@ -295,6 +1282,10 @@ declare function getMintAndProgram(connection: Connection, address: PublicKey, c
|
|
|
295
1282
|
* @return Array of AccountInfo objects
|
|
296
1283
|
*/
|
|
297
1284
|
declare function getMultipleAccountsInfoBatched(connection: Connection, pubKeys: PublicKey[], commitment?: Commitment): Promise<(AccountInfo<Buffer> | null)[]>;
|
|
1285
|
+
/**
|
|
1286
|
+
* Build a partner oracle program without a wallet, just to fetch accounts.
|
|
1287
|
+
*/
|
|
1288
|
+
declare function buildPartnerOracle(connection: Connection): Program<PartnerOracle>;
|
|
298
1289
|
|
|
299
1290
|
declare function deserializeRawTransaction(serializedTx: string): {
|
|
300
1291
|
type: string;
|
|
@@ -337,4 +1328,4 @@ type UnwrapAutoSimulate<T extends IInteractExt = IInteractExt> = Omit<T, "comput
|
|
|
337
1328
|
};
|
|
338
1329
|
declare const unwrapExecutionParams: <T extends IInteractExt>({ computeLimit, ...rest }: T, connection: Connection) => UnwrapAutoSimulate<T>;
|
|
339
1330
|
|
|
340
|
-
export { type Account, type AtaParams, type CheckAssociatedTokenAccountsData, type ComputeLimitEstimate, type ComputePriceEstimate, type ConfirmationParams, ContractError, ICluster, type IInteractExt, type IProgramAccount, type ITransactionExt, type ITransactionExtResolved, type ITransactionResult, type ThrottleParams, type TransactionExecutionParams, TransactionFailedError, ata, ataBatchExist, buildSendThrottler, checkOrCreateAtaBatch, confirmAndEnsureTransaction, createAndEstimateTransaction, createAtaBatch, createVersionedTransaction, deserializeRawTransaction, enrichAtaParams, estimateComputeUnitPrice, executeMultipleTransactions, executeTransaction, generateCreateAtaBatchTx, getFilters, getMintAndProgram, getMultipleAccountsInfoBatched, getProgramAccounts, isSignerKeypair, isSignerWallet, isTransactionVersioned, pk, prepareBaseInstructions, prepareTransaction, prepareWrappedAccount, resolveTransactionAccounts, sendAndConfirmTransaction, signAndExecuteTransaction, signTransaction, simulateTransaction, unwrapExecutionParams };
|
|
1331
|
+
export { type Account, type AtaParams, type CheckAssociatedTokenAccountsData, type ComputeLimitEstimate, type ComputePriceEstimate, type ConfirmationParams, ContractError, ICluster, type IInteractExt, type IProgramAccount, type ITransactionExt, type ITransactionExtResolved, type ITransactionResult, type PartnerOracle, type PartnerOracleAccounts, type PartnerOracleTypes, type ThrottleParams, type TransactionExecutionParams, TransactionFailedError, ata, ataBatchExist, buildPartnerOracle, buildSendThrottler, checkOrCreateAtaBatch, confirmAndEnsureTransaction, createAndEstimateTransaction, createAtaBatch, createVersionedTransaction, deserializeRawTransaction, enrichAtaParams, estimateComputeUnitPrice, executeMultipleTransactions, executeTransaction, generateCreateAtaBatchTx, getFilters, getMintAndProgram, getMultipleAccountsInfoBatched, getProgramAccounts, isSignerKeypair, isSignerWallet, isTransactionVersioned, pk, prepareBaseInstructions, prepareTransaction, prepareWrappedAccount, resolveTransactionAccounts, sendAndConfirmTransaction, signAndExecuteTransaction, signTransaction, simulateTransaction, unwrapExecutionParams };
|