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

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