@streamflow/stream 7.0.0-alpha.12 → 7.0.0-alpha.14

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 (37) hide show
  1. package/README.md +10 -5
  2. package/dist/cjs/common/constants.js +2 -1
  3. package/dist/cjs/common/contractUtils.js +17 -1
  4. package/dist/cjs/common/types.js +30 -1
  5. package/dist/cjs/solana/StreamClient.js +290 -139
  6. package/dist/cjs/solana/constants.js +29 -1
  7. package/dist/cjs/solana/descriptor/idl/streamflow_aligned_unlocks.json +1471 -0
  8. package/dist/cjs/solana/descriptor/streamflow_aligned_unlocks.js +2 -0
  9. package/dist/cjs/solana/index.js +2 -1
  10. package/dist/cjs/solana/lib/derive-accounts.js +17 -0
  11. package/dist/cjs/solana/{utils.js → lib/utils.js} +2 -2
  12. package/dist/cjs/solana/types.js +25 -2
  13. package/dist/esm/aptos/types.d.ts +2 -2
  14. package/dist/esm/common/constants.d.ts +1 -0
  15. package/dist/esm/common/constants.js +1 -0
  16. package/dist/esm/common/contractUtils.d.ts +4 -1
  17. package/dist/esm/common/contractUtils.js +13 -0
  18. package/dist/esm/common/types.d.ts +104 -49
  19. package/dist/esm/common/types.js +29 -0
  20. package/dist/esm/evm/types.d.ts +2 -2
  21. package/dist/esm/solana/StreamClient.d.ts +22 -16
  22. package/dist/esm/solana/StreamClient.js +293 -141
  23. package/dist/esm/solana/constants.d.ts +14 -0
  24. package/dist/esm/solana/constants.js +29 -1
  25. package/dist/esm/solana/descriptor/idl/streamflow_aligned_unlocks.json +1471 -0
  26. package/dist/esm/solana/descriptor/streamflow_aligned_unlocks.d.ts +1272 -0
  27. package/dist/esm/solana/descriptor/streamflow_aligned_unlocks.js +1 -0
  28. package/dist/esm/solana/index.d.ts +2 -1
  29. package/dist/esm/solana/index.js +2 -1
  30. package/dist/esm/solana/lib/derive-accounts.d.ts +4 -0
  31. package/dist/esm/solana/lib/derive-accounts.js +11 -0
  32. package/dist/esm/solana/{utils.d.ts → lib/utils.d.ts} +1 -1
  33. package/dist/esm/solana/{utils.js → lib/utils.js} +2 -2
  34. package/dist/esm/solana/types.d.ts +31 -3
  35. package/dist/esm/solana/types.js +30 -2
  36. package/dist/esm/sui/types.d.ts +2 -2
  37. package/package.json +5 -4
@@ -0,0 +1,1272 @@
1
+ /**
2
+ * Program IDL in camelCase format in order to be used in JS/TS.
3
+ *
4
+ * Note that this is only a type helper and is not the actual IDL. The original
5
+ * IDL can be found at `target/idl/streamflow_aligned_unlocks.json`.
6
+ */
7
+ export type StreamflowAlignedUnlocks = {
8
+ address: "aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH";
9
+ metadata: {
10
+ name: "streamflowAlignedUnlocks";
11
+ version: "1.0.0";
12
+ spec: "0.1.0";
13
+ description: "Proxy to update unlock amount within Streamflow vesting protocol according to Token performance and other metrics";
14
+ };
15
+ instructions: [
16
+ {
17
+ name: "cancel";
18
+ discriminator: [232, 219, 223, 41, 219, 236, 220, 190];
19
+ accounts: [
20
+ {
21
+ name: "sender";
22
+ writable: true;
23
+ signer: true;
24
+ },
25
+ {
26
+ name: "senderTokens";
27
+ docs: ["Associated token account address of `sender`."];
28
+ writable: true;
29
+ pda: {
30
+ seeds: [
31
+ {
32
+ kind: "account";
33
+ path: "sender";
34
+ },
35
+ {
36
+ kind: "account";
37
+ path: "tokenProgram";
38
+ },
39
+ {
40
+ kind: "account";
41
+ path: "mint";
42
+ }
43
+ ];
44
+ program: {
45
+ kind: "const";
46
+ value: [
47
+ 140,
48
+ 151,
49
+ 37,
50
+ 143,
51
+ 78,
52
+ 36,
53
+ 137,
54
+ 241,
55
+ 187,
56
+ 61,
57
+ 16,
58
+ 41,
59
+ 20,
60
+ 142,
61
+ 13,
62
+ 131,
63
+ 11,
64
+ 90,
65
+ 19,
66
+ 153,
67
+ 218,
68
+ 255,
69
+ 16,
70
+ 132,
71
+ 4,
72
+ 142,
73
+ 123,
74
+ 216,
75
+ 219,
76
+ 233,
77
+ 248,
78
+ 89
79
+ ];
80
+ };
81
+ };
82
+ },
83
+ {
84
+ name: "recipient";
85
+ writable: true;
86
+ },
87
+ {
88
+ name: "recipientTokens";
89
+ docs: ["CHECK; Associated token account address of `recipient`."];
90
+ writable: true;
91
+ pda: {
92
+ seeds: [
93
+ {
94
+ kind: "account";
95
+ path: "recipient";
96
+ },
97
+ {
98
+ kind: "account";
99
+ path: "tokenProgram";
100
+ },
101
+ {
102
+ kind: "account";
103
+ path: "mint";
104
+ }
105
+ ];
106
+ program: {
107
+ kind: "const";
108
+ value: [
109
+ 140,
110
+ 151,
111
+ 37,
112
+ 143,
113
+ 78,
114
+ 36,
115
+ 137,
116
+ 241,
117
+ 187,
118
+ 61,
119
+ 16,
120
+ 41,
121
+ 20,
122
+ 142,
123
+ 13,
124
+ 131,
125
+ 11,
126
+ 90,
127
+ 19,
128
+ 153,
129
+ 218,
130
+ 255,
131
+ 16,
132
+ 132,
133
+ 4,
134
+ 142,
135
+ 123,
136
+ 216,
137
+ 219,
138
+ 233,
139
+ 248,
140
+ 89
141
+ ];
142
+ };
143
+ };
144
+ },
145
+ {
146
+ name: "proxyMetadata";
147
+ docs: ["Proxy Contract"];
148
+ writable: true;
149
+ pda: {
150
+ seeds: [
151
+ {
152
+ kind: "const";
153
+ value: [99, 111, 110, 116, 114, 97, 99, 116];
154
+ },
155
+ {
156
+ kind: "account";
157
+ path: "streamMetadata";
158
+ }
159
+ ];
160
+ };
161
+ },
162
+ {
163
+ name: "proxyTokens";
164
+ writable: true;
165
+ pda: {
166
+ seeds: [
167
+ {
168
+ kind: "account";
169
+ path: "proxyMetadata";
170
+ },
171
+ {
172
+ kind: "account";
173
+ path: "tokenProgram";
174
+ },
175
+ {
176
+ kind: "account";
177
+ path: "mint";
178
+ }
179
+ ];
180
+ program: {
181
+ kind: "const";
182
+ value: [
183
+ 140,
184
+ 151,
185
+ 37,
186
+ 143,
187
+ 78,
188
+ 36,
189
+ 137,
190
+ 241,
191
+ 187,
192
+ 61,
193
+ 16,
194
+ 41,
195
+ 20,
196
+ 142,
197
+ 13,
198
+ 131,
199
+ 11,
200
+ 90,
201
+ 19,
202
+ 153,
203
+ 218,
204
+ 255,
205
+ 16,
206
+ 132,
207
+ 4,
208
+ 142,
209
+ 123,
210
+ 216,
211
+ 219,
212
+ 233,
213
+ 248,
214
+ 89
215
+ ];
216
+ };
217
+ };
218
+ },
219
+ {
220
+ name: "streamMetadata";
221
+ writable: true;
222
+ },
223
+ {
224
+ name: "escrowTokens";
225
+ writable: true;
226
+ },
227
+ {
228
+ name: "streamflowTreasury";
229
+ writable: true;
230
+ },
231
+ {
232
+ name: "streamflowTreasuryTokens";
233
+ writable: true;
234
+ pda: {
235
+ seeds: [
236
+ {
237
+ kind: "account";
238
+ path: "streamflowTreasury";
239
+ },
240
+ {
241
+ kind: "account";
242
+ path: "tokenProgram";
243
+ },
244
+ {
245
+ kind: "account";
246
+ path: "mint";
247
+ }
248
+ ];
249
+ program: {
250
+ kind: "const";
251
+ value: [
252
+ 140,
253
+ 151,
254
+ 37,
255
+ 143,
256
+ 78,
257
+ 36,
258
+ 137,
259
+ 241,
260
+ 187,
261
+ 61,
262
+ 16,
263
+ 41,
264
+ 20,
265
+ 142,
266
+ 13,
267
+ 131,
268
+ 11,
269
+ 90,
270
+ 19,
271
+ 153,
272
+ 218,
273
+ 255,
274
+ 16,
275
+ 132,
276
+ 4,
277
+ 142,
278
+ 123,
279
+ 216,
280
+ 219,
281
+ 233,
282
+ 248,
283
+ 89
284
+ ];
285
+ };
286
+ };
287
+ },
288
+ {
289
+ name: "partner";
290
+ writable: true;
291
+ },
292
+ {
293
+ name: "partnerTokens";
294
+ writable: true;
295
+ pda: {
296
+ seeds: [
297
+ {
298
+ kind: "account";
299
+ path: "partner";
300
+ },
301
+ {
302
+ kind: "account";
303
+ path: "tokenProgram";
304
+ },
305
+ {
306
+ kind: "account";
307
+ path: "mint";
308
+ }
309
+ ];
310
+ program: {
311
+ kind: "const";
312
+ value: [
313
+ 140,
314
+ 151,
315
+ 37,
316
+ 143,
317
+ 78,
318
+ 36,
319
+ 137,
320
+ 241,
321
+ 187,
322
+ 61,
323
+ 16,
324
+ 41,
325
+ 20,
326
+ 142,
327
+ 13,
328
+ 131,
329
+ 11,
330
+ 90,
331
+ 19,
332
+ 153,
333
+ 218,
334
+ 255,
335
+ 16,
336
+ 132,
337
+ 4,
338
+ 142,
339
+ 123,
340
+ 216,
341
+ 219,
342
+ 233,
343
+ 248,
344
+ 89
345
+ ];
346
+ };
347
+ };
348
+ },
349
+ {
350
+ name: "mint";
351
+ docs: ["The SPL token mint account."];
352
+ writable: true;
353
+ },
354
+ {
355
+ name: "streamflowProgram";
356
+ address: "strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m";
357
+ },
358
+ {
359
+ name: "tokenProgram";
360
+ docs: ["The SPL program needed in case an associated account", "for the new recipient is being created."];
361
+ }
362
+ ];
363
+ args: [];
364
+ },
365
+ {
366
+ name: "changeOracle";
367
+ discriminator: [177, 227, 230, 103, 13, 72, 141, 248];
368
+ accounts: [
369
+ {
370
+ name: "sender";
371
+ writable: true;
372
+ signer: true;
373
+ },
374
+ {
375
+ name: "proxyMetadata";
376
+ docs: ["Proxy Contract"];
377
+ writable: true;
378
+ },
379
+ {
380
+ name: "newPriceOracle";
381
+ }
382
+ ];
383
+ args: [
384
+ {
385
+ name: "params";
386
+ type: {
387
+ defined: {
388
+ name: "changeOracleParams";
389
+ };
390
+ };
391
+ }
392
+ ];
393
+ },
394
+ {
395
+ name: "create";
396
+ discriminator: [24, 30, 200, 40, 5, 28, 7, 119];
397
+ accounts: [
398
+ {
399
+ name: "sender";
400
+ writable: true;
401
+ signer: true;
402
+ },
403
+ {
404
+ name: "senderTokens";
405
+ docs: ["Associated token account address of `sender`."];
406
+ writable: true;
407
+ pda: {
408
+ seeds: [
409
+ {
410
+ kind: "account";
411
+ path: "sender";
412
+ },
413
+ {
414
+ kind: "account";
415
+ path: "tokenProgram";
416
+ },
417
+ {
418
+ kind: "account";
419
+ path: "mint";
420
+ }
421
+ ];
422
+ program: {
423
+ kind: "const";
424
+ value: [
425
+ 140,
426
+ 151,
427
+ 37,
428
+ 143,
429
+ 78,
430
+ 36,
431
+ 137,
432
+ 241,
433
+ 187,
434
+ 61,
435
+ 16,
436
+ 41,
437
+ 20,
438
+ 142,
439
+ 13,
440
+ 131,
441
+ 11,
442
+ 90,
443
+ 19,
444
+ 153,
445
+ 218,
446
+ 255,
447
+ 16,
448
+ 132,
449
+ 4,
450
+ 142,
451
+ 123,
452
+ 216,
453
+ 219,
454
+ 233,
455
+ 248,
456
+ 89
457
+ ];
458
+ };
459
+ };
460
+ },
461
+ {
462
+ name: "recipient";
463
+ writable: true;
464
+ },
465
+ {
466
+ name: "recipientTokens";
467
+ writable: true;
468
+ pda: {
469
+ seeds: [
470
+ {
471
+ kind: "account";
472
+ path: "recipient";
473
+ },
474
+ {
475
+ kind: "account";
476
+ path: "tokenProgram";
477
+ },
478
+ {
479
+ kind: "account";
480
+ path: "mint";
481
+ }
482
+ ];
483
+ program: {
484
+ kind: "const";
485
+ value: [
486
+ 140,
487
+ 151,
488
+ 37,
489
+ 143,
490
+ 78,
491
+ 36,
492
+ 137,
493
+ 241,
494
+ 187,
495
+ 61,
496
+ 16,
497
+ 41,
498
+ 20,
499
+ 142,
500
+ 13,
501
+ 131,
502
+ 11,
503
+ 90,
504
+ 19,
505
+ 153,
506
+ 218,
507
+ 255,
508
+ 16,
509
+ 132,
510
+ 4,
511
+ 142,
512
+ 123,
513
+ 216,
514
+ 219,
515
+ 233,
516
+ 248,
517
+ 89
518
+ ];
519
+ };
520
+ };
521
+ },
522
+ {
523
+ name: "proxyMetadata";
524
+ writable: true;
525
+ pda: {
526
+ seeds: [
527
+ {
528
+ kind: "const";
529
+ value: [99, 111, 110, 116, 114, 97, 99, 116];
530
+ },
531
+ {
532
+ kind: "account";
533
+ path: "streamMetadata";
534
+ }
535
+ ];
536
+ };
537
+ },
538
+ {
539
+ name: "proxyTokens";
540
+ writable: true;
541
+ pda: {
542
+ seeds: [
543
+ {
544
+ kind: "account";
545
+ path: "proxyMetadata";
546
+ },
547
+ {
548
+ kind: "account";
549
+ path: "tokenProgram";
550
+ },
551
+ {
552
+ kind: "account";
553
+ path: "mint";
554
+ }
555
+ ];
556
+ program: {
557
+ kind: "const";
558
+ value: [
559
+ 140,
560
+ 151,
561
+ 37,
562
+ 143,
563
+ 78,
564
+ 36,
565
+ 137,
566
+ 241,
567
+ 187,
568
+ 61,
569
+ 16,
570
+ 41,
571
+ 20,
572
+ 142,
573
+ 13,
574
+ 131,
575
+ 11,
576
+ 90,
577
+ 19,
578
+ 153,
579
+ 218,
580
+ 255,
581
+ 16,
582
+ 132,
583
+ 4,
584
+ 142,
585
+ 123,
586
+ 216,
587
+ 219,
588
+ 233,
589
+ 248,
590
+ 89
591
+ ];
592
+ };
593
+ };
594
+ },
595
+ {
596
+ name: "streamMetadata";
597
+ writable: true;
598
+ signer: true;
599
+ },
600
+ {
601
+ name: "escrowTokens";
602
+ writable: true;
603
+ },
604
+ {
605
+ name: "withdrawor";
606
+ writable: true;
607
+ },
608
+ {
609
+ name: "partner";
610
+ writable: true;
611
+ },
612
+ {
613
+ name: "partnerTokens";
614
+ writable: true;
615
+ pda: {
616
+ seeds: [
617
+ {
618
+ kind: "account";
619
+ path: "partner";
620
+ },
621
+ {
622
+ kind: "account";
623
+ path: "tokenProgram";
624
+ },
625
+ {
626
+ kind: "account";
627
+ path: "mint";
628
+ }
629
+ ];
630
+ program: {
631
+ kind: "const";
632
+ value: [
633
+ 140,
634
+ 151,
635
+ 37,
636
+ 143,
637
+ 78,
638
+ 36,
639
+ 137,
640
+ 241,
641
+ 187,
642
+ 61,
643
+ 16,
644
+ 41,
645
+ 20,
646
+ 142,
647
+ 13,
648
+ 131,
649
+ 11,
650
+ 90,
651
+ 19,
652
+ 153,
653
+ 218,
654
+ 255,
655
+ 16,
656
+ 132,
657
+ 4,
658
+ 142,
659
+ 123,
660
+ 216,
661
+ 219,
662
+ 233,
663
+ 248,
664
+ 89
665
+ ];
666
+ };
667
+ };
668
+ },
669
+ {
670
+ name: "mint";
671
+ },
672
+ {
673
+ name: "feeOracle";
674
+ },
675
+ {
676
+ name: "priceOracle";
677
+ },
678
+ {
679
+ name: "rent";
680
+ address: "SysvarRent111111111111111111111111111111111";
681
+ },
682
+ {
683
+ name: "streamflowProgram";
684
+ address: "strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m";
685
+ },
686
+ {
687
+ name: "tokenProgram";
688
+ },
689
+ {
690
+ name: "associatedTokenProgram";
691
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
692
+ },
693
+ {
694
+ name: "systemProgram";
695
+ address: "11111111111111111111111111111111";
696
+ }
697
+ ];
698
+ args: [
699
+ {
700
+ name: "ix";
701
+ type: {
702
+ defined: {
703
+ name: "createParams";
704
+ };
705
+ };
706
+ }
707
+ ];
708
+ },
709
+ {
710
+ name: "createTestOracle";
711
+ discriminator: [183, 110, 4, 11, 131, 220, 84, 12];
712
+ accounts: [
713
+ {
714
+ name: "creator";
715
+ writable: true;
716
+ signer: true;
717
+ },
718
+ {
719
+ name: "mint";
720
+ },
721
+ {
722
+ name: "testOracle";
723
+ writable: true;
724
+ pda: {
725
+ seeds: [
726
+ {
727
+ kind: "const";
728
+ value: [116, 101, 115, 116, 45, 111, 114, 97, 99, 108, 101];
729
+ },
730
+ {
731
+ kind: "account";
732
+ path: "mint";
733
+ },
734
+ {
735
+ kind: "account";
736
+ path: "creator";
737
+ }
738
+ ];
739
+ };
740
+ },
741
+ {
742
+ name: "systemProgram";
743
+ address: "11111111111111111111111111111111";
744
+ }
745
+ ];
746
+ args: [
747
+ {
748
+ name: "params";
749
+ type: {
750
+ defined: {
751
+ name: "createTestOracleParams";
752
+ };
753
+ };
754
+ }
755
+ ];
756
+ },
757
+ {
758
+ name: "setTestOracleAuthority";
759
+ discriminator: [26, 66, 233, 99, 38, 118, 181, 247];
760
+ accounts: [
761
+ {
762
+ name: "authority";
763
+ writable: true;
764
+ signer: true;
765
+ },
766
+ {
767
+ name: "testOracle";
768
+ writable: true;
769
+ },
770
+ {
771
+ name: "newAuthority";
772
+ }
773
+ ];
774
+ args: [];
775
+ },
776
+ {
777
+ name: "updateAmount";
778
+ discriminator: [212, 178, 69, 133, 251, 180, 212, 71];
779
+ accounts: [
780
+ {
781
+ name: "authority";
782
+ docs: ["Wallet authorised to call this method"];
783
+ writable: true;
784
+ signer: true;
785
+ },
786
+ {
787
+ name: "proxyMetadata";
788
+ writable: true;
789
+ pda: {
790
+ seeds: [
791
+ {
792
+ kind: "const";
793
+ value: [99, 111, 110, 116, 114, 97, 99, 116];
794
+ },
795
+ {
796
+ kind: "account";
797
+ path: "streamMetadata";
798
+ }
799
+ ];
800
+ };
801
+ },
802
+ {
803
+ name: "streamMetadata";
804
+ writable: true;
805
+ },
806
+ {
807
+ name: "withdrawor";
808
+ writable: true;
809
+ },
810
+ {
811
+ name: "priceOracle";
812
+ relations: ["proxyMetadata"];
813
+ },
814
+ {
815
+ name: "streamflowProgram";
816
+ address: "strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m";
817
+ },
818
+ {
819
+ name: "systemProgram";
820
+ address: "11111111111111111111111111111111";
821
+ }
822
+ ];
823
+ args: [];
824
+ },
825
+ {
826
+ name: "updateTestOracle";
827
+ discriminator: [158, 147, 215, 74, 34, 123, 80, 76];
828
+ accounts: [
829
+ {
830
+ name: "authority";
831
+ writable: true;
832
+ signer: true;
833
+ },
834
+ {
835
+ name: "testOracle";
836
+ writable: true;
837
+ }
838
+ ];
839
+ args: [
840
+ {
841
+ name: "params";
842
+ type: {
843
+ defined: {
844
+ name: "updateTestOracleParams";
845
+ };
846
+ };
847
+ }
848
+ ];
849
+ }
850
+ ];
851
+ accounts: [
852
+ {
853
+ name: "contract";
854
+ discriminator: [172, 138, 115, 242, 121, 67, 183, 26];
855
+ },
856
+ {
857
+ name: "testOracle";
858
+ discriminator: [198, 49, 63, 134, 232, 251, 168, 28];
859
+ }
860
+ ];
861
+ errors: [
862
+ {
863
+ code: 6000;
864
+ name: "unauthorized";
865
+ msg: "Authority does not have permission for this action";
866
+ },
867
+ {
868
+ code: 6001;
869
+ name: "arithmeticError";
870
+ msg: "Arithmetic error";
871
+ },
872
+ {
873
+ code: 6002;
874
+ name: "unsupportedTokenExtensions";
875
+ msg: "Mint has unsupported Token Extensions";
876
+ },
877
+ {
878
+ code: 6003;
879
+ name: "periodTooShort";
880
+ msg: "Provided period is too short, should be equal or more than 30 seconds";
881
+ },
882
+ {
883
+ code: 6004;
884
+ name: "invalidTickSize";
885
+ msg: "Provided percentage tick size is invalid";
886
+ },
887
+ {
888
+ code: 6005;
889
+ name: "invalidPercentageBoundaries";
890
+ msg: "Provided percentage bounds are invalid";
891
+ },
892
+ {
893
+ code: 6006;
894
+ name: "invalidPriceBoundaries";
895
+ msg: "Provided price bounds are invalid";
896
+ },
897
+ {
898
+ code: 6007;
899
+ name: "unsupportedOracle";
900
+ msg: "Unsupported price oracle";
901
+ },
902
+ {
903
+ code: 6008;
904
+ name: "invalidOracleAccount";
905
+ msg: "Invalid oracle account";
906
+ },
907
+ {
908
+ code: 6009;
909
+ name: "invalidOraclePrice";
910
+ msg: "Invalid oracle price";
911
+ },
912
+ {
913
+ code: 6010;
914
+ name: "invalidStreamMetadata";
915
+ msg: "Invalid Stream Metadata";
916
+ },
917
+ {
918
+ code: 6011;
919
+ name: "amountAlreadyUpdated";
920
+ msg: "Release amount has already been updated in this period";
921
+ },
922
+ {
923
+ code: 6012;
924
+ name: "allFundsUnlocked";
925
+ msg: "All funds are already unlocked";
926
+ }
927
+ ];
928
+ types: [
929
+ {
930
+ name: "changeOracleParams";
931
+ type: {
932
+ kind: "struct";
933
+ fields: [
934
+ {
935
+ name: "oracleType";
936
+ type: {
937
+ defined: {
938
+ name: "oracleType";
939
+ };
940
+ };
941
+ }
942
+ ];
943
+ };
944
+ },
945
+ {
946
+ name: "contract";
947
+ type: {
948
+ kind: "struct";
949
+ fields: [
950
+ {
951
+ name: "bump";
952
+ docs: ["Bump Seed used to sign transactions"];
953
+ type: "u8";
954
+ },
955
+ {
956
+ name: "sender";
957
+ docs: ["Original Contract sender"];
958
+ type: "pubkey";
959
+ },
960
+ {
961
+ name: "senderTokens";
962
+ docs: ["Original Contract sender tokens address"];
963
+ type: "pubkey";
964
+ },
965
+ {
966
+ name: "stream";
967
+ docs: ["Vesting Stream address"];
968
+ type: "pubkey";
969
+ },
970
+ {
971
+ name: "priceOracleType";
972
+ docs: ["Type of the Oracle used to derive Token Price"];
973
+ type: {
974
+ defined: {
975
+ name: "oracleType";
976
+ };
977
+ };
978
+ },
979
+ {
980
+ name: "priceOracle";
981
+ docs: ["Address of the Price Oracle"];
982
+ type: "pubkey";
983
+ },
984
+ {
985
+ name: "minPrice";
986
+ docs: ["Min price boundary"];
987
+ type: "u64";
988
+ },
989
+ {
990
+ name: "maxPrice";
991
+ docs: ["Max price boundary"];
992
+ type: "u64";
993
+ },
994
+ {
995
+ name: "minPercentage";
996
+ docs: ["Min percentage boundary, can be 0 that equals 1 Raw Token"];
997
+ type: "u64";
998
+ },
999
+ {
1000
+ name: "maxPercentage";
1001
+ docs: ["Max percentage boundary"];
1002
+ type: "u64";
1003
+ },
1004
+ {
1005
+ name: "tickSize";
1006
+ docs: ["Ticket size for percentage boundaries"];
1007
+ type: "u64";
1008
+ },
1009
+ {
1010
+ name: "startTime";
1011
+ docs: [
1012
+ "unlock_start from Stream contract for our worker to be able to fetch it in one call with the proxy contract"
1013
+ ];
1014
+ type: "u64";
1015
+ },
1016
+ {
1017
+ name: "endTime";
1018
+ docs: [
1019
+ "Copy end_time from Stream contract for our worker to be able to fetch it in one call with the proxy contract"
1020
+ ];
1021
+ type: "u64";
1022
+ },
1023
+ {
1024
+ name: "period";
1025
+ docs: [
1026
+ "Copy period from Stream contract for our worker to be able to fetch it in one call with the proxy contract"
1027
+ ];
1028
+ type: "u64";
1029
+ },
1030
+ {
1031
+ name: "lastAmountUpdateTime";
1032
+ docs: [
1033
+ "Copy last_rate_change_time from Stream contract for our worker to be able to fetch it in one call with the proxy contract"
1034
+ ];
1035
+ type: "u64";
1036
+ },
1037
+ {
1038
+ name: "lastPrice";
1039
+ docs: ["Price used on last amount calculation"];
1040
+ type: "u64";
1041
+ },
1042
+ {
1043
+ name: "streamCanceledTime";
1044
+ docs: ["Timestamp when stream was cancelled"];
1045
+ type: "u64";
1046
+ },
1047
+ {
1048
+ name: "initialAmountPerPeriod";
1049
+ docs: ["Amount per period to use as base for calculations"];
1050
+ type: "u64";
1051
+ },
1052
+ {
1053
+ name: "initialPrice";
1054
+ docs: ["Initial token price at the time of Contract creation"];
1055
+ type: "u64";
1056
+ },
1057
+ {
1058
+ name: "buffer";
1059
+ docs: ["Buffer for additional fields"];
1060
+ type: {
1061
+ array: ["u8", 32];
1062
+ };
1063
+ }
1064
+ ];
1065
+ };
1066
+ },
1067
+ {
1068
+ name: "createParams";
1069
+ type: {
1070
+ kind: "struct";
1071
+ fields: [
1072
+ {
1073
+ name: "startTime";
1074
+ docs: ["Timestamp when the tokens start vesting"];
1075
+ type: "u64";
1076
+ },
1077
+ {
1078
+ name: "netAmountDeposited";
1079
+ docs: ["Deposited amount of tokens"];
1080
+ type: "u64";
1081
+ },
1082
+ {
1083
+ name: "period";
1084
+ docs: ["Time step (period) in seconds per which the vesting/release occurs"];
1085
+ type: "u64";
1086
+ },
1087
+ {
1088
+ name: "amountPerPeriod";
1089
+ docs: ["Base Amount released per period. Combined with `period`, we get a release rate."];
1090
+ type: "u64";
1091
+ },
1092
+ {
1093
+ name: "cliff";
1094
+ docs: ['Vesting contract "cliff" timestamp'];
1095
+ type: "u64";
1096
+ },
1097
+ {
1098
+ name: "cliffAmount";
1099
+ docs: ['Amount unlocked at the "cliff" timestamp'];
1100
+ type: "u64";
1101
+ },
1102
+ {
1103
+ name: "cancelableBySender";
1104
+ docs: ["Whether a stream can be canceled by a sender"];
1105
+ type: "bool";
1106
+ },
1107
+ {
1108
+ name: "cancelableByRecipient";
1109
+ docs: ["Whether a stream can be canceled by a recipient"];
1110
+ type: "bool";
1111
+ },
1112
+ {
1113
+ name: "transferableBySender";
1114
+ docs: ["Whether the sender can transfer the stream"];
1115
+ type: "bool";
1116
+ },
1117
+ {
1118
+ name: "transferableByRecipient";
1119
+ docs: ["Whether the recipient can transfer the stream"];
1120
+ type: "bool";
1121
+ },
1122
+ {
1123
+ name: "canTopup";
1124
+ docs: ["Whether topup is enabled"];
1125
+ type: "bool";
1126
+ },
1127
+ {
1128
+ name: "streamName";
1129
+ docs: ["The name of this stream"];
1130
+ type: {
1131
+ array: ["u8", 64];
1132
+ };
1133
+ },
1134
+ {
1135
+ name: "minPrice";
1136
+ type: "u64";
1137
+ },
1138
+ {
1139
+ name: "maxPrice";
1140
+ type: "u64";
1141
+ },
1142
+ {
1143
+ name: "minPercentage";
1144
+ type: "u64";
1145
+ },
1146
+ {
1147
+ name: "maxPercentage";
1148
+ type: "u64";
1149
+ },
1150
+ {
1151
+ name: "tickSize";
1152
+ type: "u64";
1153
+ },
1154
+ {
1155
+ name: "skipInitial";
1156
+ docs: ["Whether to skip initial calculation of amount per period"];
1157
+ type: "bool";
1158
+ },
1159
+ {
1160
+ name: "oracleType";
1161
+ docs: ["Type of Oracle to use to derive Token Price"];
1162
+ type: {
1163
+ defined: {
1164
+ name: "oracleType";
1165
+ };
1166
+ };
1167
+ }
1168
+ ];
1169
+ };
1170
+ },
1171
+ {
1172
+ name: "createTestOracleParams";
1173
+ type: {
1174
+ kind: "struct";
1175
+ fields: [
1176
+ {
1177
+ name: "price";
1178
+ type: "u64";
1179
+ },
1180
+ {
1181
+ name: "expo";
1182
+ type: "i32";
1183
+ },
1184
+ {
1185
+ name: "conf";
1186
+ type: "u64";
1187
+ },
1188
+ {
1189
+ name: "publishTime";
1190
+ type: "i64";
1191
+ }
1192
+ ];
1193
+ };
1194
+ },
1195
+ {
1196
+ name: "oracleType";
1197
+ type: {
1198
+ kind: "enum";
1199
+ variants: [
1200
+ {
1201
+ name: "none";
1202
+ },
1203
+ {
1204
+ name: "test";
1205
+ },
1206
+ {
1207
+ name: "pyth";
1208
+ },
1209
+ {
1210
+ name: "switchboard";
1211
+ }
1212
+ ];
1213
+ };
1214
+ },
1215
+ {
1216
+ name: "testOracle";
1217
+ type: {
1218
+ kind: "struct";
1219
+ fields: [
1220
+ {
1221
+ name: "price";
1222
+ type: "u64";
1223
+ },
1224
+ {
1225
+ name: "expo";
1226
+ type: "i32";
1227
+ },
1228
+ {
1229
+ name: "conf";
1230
+ type: "u64";
1231
+ },
1232
+ {
1233
+ name: "publishTime";
1234
+ type: "i64";
1235
+ },
1236
+ {
1237
+ name: "creator";
1238
+ type: "pubkey";
1239
+ },
1240
+ {
1241
+ name: "authority";
1242
+ type: "pubkey";
1243
+ }
1244
+ ];
1245
+ };
1246
+ },
1247
+ {
1248
+ name: "updateTestOracleParams";
1249
+ type: {
1250
+ kind: "struct";
1251
+ fields: [
1252
+ {
1253
+ name: "price";
1254
+ type: "u64";
1255
+ },
1256
+ {
1257
+ name: "expo";
1258
+ type: "i32";
1259
+ },
1260
+ {
1261
+ name: "conf";
1262
+ type: "u64";
1263
+ },
1264
+ {
1265
+ name: "publishTime";
1266
+ type: "i64";
1267
+ }
1268
+ ];
1269
+ };
1270
+ }
1271
+ ];
1272
+ };