@unifiedflow/cli 1.0.0

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 (35) hide show
  1. package/README.md +85 -0
  2. package/dist/idl/unified_flow.json +1889 -0
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +443 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/services/backfill.d.ts +2 -0
  8. package/dist/services/backfill.d.ts.map +1 -0
  9. package/dist/services/backfill.js +358 -0
  10. package/dist/services/backfill.js.map +1 -0
  11. package/dist/services/csvDiff.d.ts +68 -0
  12. package/dist/services/csvDiff.d.ts.map +1 -0
  13. package/dist/services/csvDiff.js +318 -0
  14. package/dist/services/csvDiff.js.map +1 -0
  15. package/dist/services/decoder.d.ts +3 -0
  16. package/dist/services/decoder.d.ts.map +1 -0
  17. package/dist/services/decoder.js +43 -0
  18. package/dist/services/decoder.js.map +1 -0
  19. package/dist/services/eventNormalizer.d.ts +63 -0
  20. package/dist/services/eventNormalizer.d.ts.map +1 -0
  21. package/dist/services/eventNormalizer.js +212 -0
  22. package/dist/services/eventNormalizer.js.map +1 -0
  23. package/dist/services/eventParser.d.ts +7 -0
  24. package/dist/services/eventParser.d.ts.map +1 -0
  25. package/dist/services/eventParser.js +130 -0
  26. package/dist/services/eventParser.js.map +1 -0
  27. package/dist/services/rpc.d.ts +10 -0
  28. package/dist/services/rpc.d.ts.map +1 -0
  29. package/dist/services/rpc.js +203 -0
  30. package/dist/services/rpc.js.map +1 -0
  31. package/dist/services/streamIndexer.d.ts +2 -0
  32. package/dist/services/streamIndexer.d.ts.map +1 -0
  33. package/dist/services/streamIndexer.js +367 -0
  34. package/dist/services/streamIndexer.js.map +1 -0
  35. package/package.json +42 -0
@@ -0,0 +1,1889 @@
1
+ {
2
+ "address": "8M5yieUh7pxwUi1YBByDF82nqoorZwaKi8dBoMVpurFa",
3
+ "metadata": {
4
+ "name": "unified_flow",
5
+ "version": "0.1.0",
6
+ "spec": "0.1.0",
7
+ "description": "Created with Anchor"
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": "creator",
25
+ "writable": true,
26
+ "signer": true
27
+ },
28
+ {
29
+ "name": "mint",
30
+ "relations": [
31
+ "stream"
32
+ ]
33
+ },
34
+ {
35
+ "name": "config",
36
+ "pda": {
37
+ "seeds": [
38
+ {
39
+ "kind": "const",
40
+ "value": [
41
+ 99,
42
+ 111,
43
+ 110,
44
+ 102,
45
+ 105,
46
+ 103
47
+ ]
48
+ }
49
+ ]
50
+ }
51
+ },
52
+ {
53
+ "name": "stream",
54
+ "writable": true,
55
+ "pda": {
56
+ "seeds": [
57
+ {
58
+ "kind": "const",
59
+ "value": [
60
+ 115,
61
+ 116,
62
+ 114,
63
+ 101,
64
+ 97,
65
+ 109
66
+ ]
67
+ },
68
+ {
69
+ "kind": "account",
70
+ "path": "stream.creator",
71
+ "account": "StreamAccount"
72
+ },
73
+ {
74
+ "kind": "account",
75
+ "path": "stream.recipient",
76
+ "account": "StreamAccount"
77
+ },
78
+ {
79
+ "kind": "account",
80
+ "path": "stream.nonce",
81
+ "account": "StreamAccount"
82
+ }
83
+ ]
84
+ }
85
+ },
86
+ {
87
+ "name": "vault",
88
+ "writable": true,
89
+ "pda": {
90
+ "seeds": [
91
+ {
92
+ "kind": "account",
93
+ "path": "stream"
94
+ },
95
+ {
96
+ "kind": "account",
97
+ "path": "token_program"
98
+ },
99
+ {
100
+ "kind": "account",
101
+ "path": "mint"
102
+ }
103
+ ],
104
+ "program": {
105
+ "kind": "const",
106
+ "value": [
107
+ 140,
108
+ 151,
109
+ 37,
110
+ 143,
111
+ 78,
112
+ 36,
113
+ 137,
114
+ 241,
115
+ 187,
116
+ 61,
117
+ 16,
118
+ 41,
119
+ 20,
120
+ 142,
121
+ 13,
122
+ 131,
123
+ 11,
124
+ 90,
125
+ 19,
126
+ 153,
127
+ 218,
128
+ 255,
129
+ 16,
130
+ 132,
131
+ 4,
132
+ 142,
133
+ 123,
134
+ 216,
135
+ 219,
136
+ 233,
137
+ 248,
138
+ 89
139
+ ]
140
+ }
141
+ }
142
+ },
143
+ {
144
+ "name": "creator_token_account",
145
+ "writable": true
146
+ },
147
+ {
148
+ "name": "recipient_token_account",
149
+ "writable": true
150
+ },
151
+ {
152
+ "name": "token_program"
153
+ }
154
+ ],
155
+ "args": []
156
+ },
157
+ {
158
+ "name": "create_stream",
159
+ "discriminator": [
160
+ 71,
161
+ 188,
162
+ 111,
163
+ 127,
164
+ 108,
165
+ 40,
166
+ 229,
167
+ 158
168
+ ],
169
+ "accounts": [
170
+ {
171
+ "name": "creator",
172
+ "writable": true,
173
+ "signer": true
174
+ },
175
+ {
176
+ "name": "recipient"
177
+ },
178
+ {
179
+ "name": "mint"
180
+ },
181
+ {
182
+ "name": "config",
183
+ "pda": {
184
+ "seeds": [
185
+ {
186
+ "kind": "const",
187
+ "value": [
188
+ 99,
189
+ 111,
190
+ 110,
191
+ 102,
192
+ 105,
193
+ 103
194
+ ]
195
+ }
196
+ ]
197
+ }
198
+ },
199
+ {
200
+ "name": "stream",
201
+ "writable": true,
202
+ "pda": {
203
+ "seeds": [
204
+ {
205
+ "kind": "const",
206
+ "value": [
207
+ 115,
208
+ 116,
209
+ 114,
210
+ 101,
211
+ 97,
212
+ 109
213
+ ]
214
+ },
215
+ {
216
+ "kind": "account",
217
+ "path": "creator"
218
+ },
219
+ {
220
+ "kind": "account",
221
+ "path": "recipient"
222
+ },
223
+ {
224
+ "kind": "arg",
225
+ "path": "nonce"
226
+ }
227
+ ]
228
+ }
229
+ },
230
+ {
231
+ "name": "vault",
232
+ "writable": true,
233
+ "pda": {
234
+ "seeds": [
235
+ {
236
+ "kind": "account",
237
+ "path": "stream"
238
+ },
239
+ {
240
+ "kind": "account",
241
+ "path": "token_program"
242
+ },
243
+ {
244
+ "kind": "account",
245
+ "path": "mint"
246
+ }
247
+ ],
248
+ "program": {
249
+ "kind": "const",
250
+ "value": [
251
+ 140,
252
+ 151,
253
+ 37,
254
+ 143,
255
+ 78,
256
+ 36,
257
+ 137,
258
+ 241,
259
+ 187,
260
+ 61,
261
+ 16,
262
+ 41,
263
+ 20,
264
+ 142,
265
+ 13,
266
+ 131,
267
+ 11,
268
+ 90,
269
+ 19,
270
+ 153,
271
+ 218,
272
+ 255,
273
+ 16,
274
+ 132,
275
+ 4,
276
+ 142,
277
+ 123,
278
+ 216,
279
+ 219,
280
+ 233,
281
+ 248,
282
+ 89
283
+ ]
284
+ }
285
+ }
286
+ },
287
+ {
288
+ "name": "creator_token_account",
289
+ "writable": true
290
+ },
291
+ {
292
+ "name": "system_program",
293
+ "address": "11111111111111111111111111111111"
294
+ },
295
+ {
296
+ "name": "token_program"
297
+ },
298
+ {
299
+ "name": "associated_token_program",
300
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
301
+ }
302
+ ],
303
+ "args": [
304
+ {
305
+ "name": "amount",
306
+ "type": "u64"
307
+ },
308
+ {
309
+ "name": "start_ts",
310
+ "type": "i64"
311
+ },
312
+ {
313
+ "name": "cliff_ts",
314
+ "type": "i64"
315
+ },
316
+ {
317
+ "name": "end_ts",
318
+ "type": "i64"
319
+ },
320
+ {
321
+ "name": "vesting_type",
322
+ "type": "u8"
323
+ },
324
+ {
325
+ "name": "milestones",
326
+ "type": {
327
+ "vec": {
328
+ "defined": {
329
+ "name": "MilestoneInput"
330
+ }
331
+ }
332
+ }
333
+ },
334
+ {
335
+ "name": "nonce",
336
+ "type": "u64"
337
+ }
338
+ ]
339
+ },
340
+ {
341
+ "name": "edit_cliff",
342
+ "discriminator": [
343
+ 41,
344
+ 203,
345
+ 122,
346
+ 7,
347
+ 21,
348
+ 225,
349
+ 162,
350
+ 98
351
+ ],
352
+ "accounts": [
353
+ {
354
+ "name": "creator",
355
+ "writable": true,
356
+ "signer": true,
357
+ "relations": [
358
+ "stream"
359
+ ]
360
+ },
361
+ {
362
+ "name": "config",
363
+ "pda": {
364
+ "seeds": [
365
+ {
366
+ "kind": "const",
367
+ "value": [
368
+ 99,
369
+ 111,
370
+ 110,
371
+ 102,
372
+ 105,
373
+ 103
374
+ ]
375
+ }
376
+ ]
377
+ }
378
+ },
379
+ {
380
+ "name": "stream",
381
+ "writable": true,
382
+ "pda": {
383
+ "seeds": [
384
+ {
385
+ "kind": "const",
386
+ "value": [
387
+ 115,
388
+ 116,
389
+ 114,
390
+ 101,
391
+ 97,
392
+ 109
393
+ ]
394
+ },
395
+ {
396
+ "kind": "account",
397
+ "path": "stream.creator",
398
+ "account": "StreamAccount"
399
+ },
400
+ {
401
+ "kind": "account",
402
+ "path": "stream.recipient",
403
+ "account": "StreamAccount"
404
+ },
405
+ {
406
+ "kind": "account",
407
+ "path": "stream.nonce",
408
+ "account": "StreamAccount"
409
+ }
410
+ ]
411
+ }
412
+ }
413
+ ],
414
+ "args": [
415
+ {
416
+ "name": "new_cliff_ts",
417
+ "type": "i64"
418
+ }
419
+ ]
420
+ },
421
+ {
422
+ "name": "edit_linear",
423
+ "discriminator": [
424
+ 255,
425
+ 42,
426
+ 53,
427
+ 36,
428
+ 79,
429
+ 96,
430
+ 83,
431
+ 223
432
+ ],
433
+ "accounts": [
434
+ {
435
+ "name": "creator",
436
+ "writable": true,
437
+ "signer": true,
438
+ "relations": [
439
+ "stream"
440
+ ]
441
+ },
442
+ {
443
+ "name": "mint",
444
+ "relations": [
445
+ "stream"
446
+ ]
447
+ },
448
+ {
449
+ "name": "config",
450
+ "pda": {
451
+ "seeds": [
452
+ {
453
+ "kind": "const",
454
+ "value": [
455
+ 99,
456
+ 111,
457
+ 110,
458
+ 102,
459
+ 105,
460
+ 103
461
+ ]
462
+ }
463
+ ]
464
+ }
465
+ },
466
+ {
467
+ "name": "stream",
468
+ "writable": true,
469
+ "pda": {
470
+ "seeds": [
471
+ {
472
+ "kind": "const",
473
+ "value": [
474
+ 115,
475
+ 116,
476
+ 114,
477
+ 101,
478
+ 97,
479
+ 109
480
+ ]
481
+ },
482
+ {
483
+ "kind": "account",
484
+ "path": "stream.creator",
485
+ "account": "StreamAccount"
486
+ },
487
+ {
488
+ "kind": "account",
489
+ "path": "stream.recipient",
490
+ "account": "StreamAccount"
491
+ },
492
+ {
493
+ "kind": "account",
494
+ "path": "stream.nonce",
495
+ "account": "StreamAccount"
496
+ }
497
+ ]
498
+ }
499
+ },
500
+ {
501
+ "name": "vault",
502
+ "writable": true,
503
+ "pda": {
504
+ "seeds": [
505
+ {
506
+ "kind": "account",
507
+ "path": "stream"
508
+ },
509
+ {
510
+ "kind": "account",
511
+ "path": "token_program"
512
+ },
513
+ {
514
+ "kind": "account",
515
+ "path": "mint"
516
+ }
517
+ ],
518
+ "program": {
519
+ "kind": "const",
520
+ "value": [
521
+ 140,
522
+ 151,
523
+ 37,
524
+ 143,
525
+ 78,
526
+ 36,
527
+ 137,
528
+ 241,
529
+ 187,
530
+ 61,
531
+ 16,
532
+ 41,
533
+ 20,
534
+ 142,
535
+ 13,
536
+ 131,
537
+ 11,
538
+ 90,
539
+ 19,
540
+ 153,
541
+ 218,
542
+ 255,
543
+ 16,
544
+ 132,
545
+ 4,
546
+ 142,
547
+ 123,
548
+ 216,
549
+ 219,
550
+ 233,
551
+ 248,
552
+ 89
553
+ ]
554
+ }
555
+ }
556
+ },
557
+ {
558
+ "name": "creator_token_account",
559
+ "writable": true
560
+ },
561
+ {
562
+ "name": "token_program"
563
+ }
564
+ ],
565
+ "args": [
566
+ {
567
+ "name": "new_end_ts",
568
+ "type": "i64"
569
+ },
570
+ {
571
+ "name": "topup_amount",
572
+ "type": "u64"
573
+ }
574
+ ]
575
+ },
576
+ {
577
+ "name": "edit_milestone",
578
+ "discriminator": [
579
+ 123,
580
+ 218,
581
+ 165,
582
+ 226,
583
+ 209,
584
+ 227,
585
+ 8,
586
+ 166
587
+ ],
588
+ "accounts": [
589
+ {
590
+ "name": "creator",
591
+ "writable": true,
592
+ "signer": true,
593
+ "relations": [
594
+ "stream"
595
+ ]
596
+ },
597
+ {
598
+ "name": "stream",
599
+ "writable": true,
600
+ "pda": {
601
+ "seeds": [
602
+ {
603
+ "kind": "const",
604
+ "value": [
605
+ 115,
606
+ 116,
607
+ 114,
608
+ 101,
609
+ 97,
610
+ 109
611
+ ]
612
+ },
613
+ {
614
+ "kind": "account",
615
+ "path": "stream.creator",
616
+ "account": "StreamAccount"
617
+ },
618
+ {
619
+ "kind": "account",
620
+ "path": "stream.recipient",
621
+ "account": "StreamAccount"
622
+ },
623
+ {
624
+ "kind": "account",
625
+ "path": "stream.nonce",
626
+ "account": "StreamAccount"
627
+ }
628
+ ]
629
+ }
630
+ },
631
+ {
632
+ "name": "milestone",
633
+ "writable": true
634
+ },
635
+ {
636
+ "name": "mint",
637
+ "relations": [
638
+ "stream"
639
+ ]
640
+ },
641
+ {
642
+ "name": "vault",
643
+ "writable": true,
644
+ "pda": {
645
+ "seeds": [
646
+ {
647
+ "kind": "account",
648
+ "path": "stream"
649
+ },
650
+ {
651
+ "kind": "account",
652
+ "path": "token_program"
653
+ },
654
+ {
655
+ "kind": "account",
656
+ "path": "mint"
657
+ }
658
+ ],
659
+ "program": {
660
+ "kind": "const",
661
+ "value": [
662
+ 140,
663
+ 151,
664
+ 37,
665
+ 143,
666
+ 78,
667
+ 36,
668
+ 137,
669
+ 241,
670
+ 187,
671
+ 61,
672
+ 16,
673
+ 41,
674
+ 20,
675
+ 142,
676
+ 13,
677
+ 131,
678
+ 11,
679
+ 90,
680
+ 19,
681
+ 153,
682
+ 218,
683
+ 255,
684
+ 16,
685
+ 132,
686
+ 4,
687
+ 142,
688
+ 123,
689
+ 216,
690
+ 219,
691
+ 233,
692
+ 248,
693
+ 89
694
+ ]
695
+ }
696
+ }
697
+ },
698
+ {
699
+ "name": "creator_token_account",
700
+ "writable": true
701
+ },
702
+ {
703
+ "name": "token_program"
704
+ }
705
+ ],
706
+ "args": [
707
+ {
708
+ "name": "new_amount",
709
+ "type": "u64"
710
+ }
711
+ ]
712
+ },
713
+ {
714
+ "name": "initialize_config",
715
+ "discriminator": [
716
+ 208,
717
+ 127,
718
+ 21,
719
+ 1,
720
+ 194,
721
+ 190,
722
+ 196,
723
+ 70
724
+ ],
725
+ "accounts": [
726
+ {
727
+ "name": "admin",
728
+ "writable": true,
729
+ "signer": true
730
+ },
731
+ {
732
+ "name": "config",
733
+ "writable": true,
734
+ "pda": {
735
+ "seeds": [
736
+ {
737
+ "kind": "const",
738
+ "value": [
739
+ 99,
740
+ 111,
741
+ 110,
742
+ 102,
743
+ 105,
744
+ 103
745
+ ]
746
+ }
747
+ ]
748
+ }
749
+ },
750
+ {
751
+ "name": "system_program",
752
+ "address": "11111111111111111111111111111111"
753
+ }
754
+ ],
755
+ "args": []
756
+ },
757
+ {
758
+ "name": "unlock_milestone",
759
+ "discriminator": [
760
+ 131,
761
+ 196,
762
+ 6,
763
+ 134,
764
+ 153,
765
+ 130,
766
+ 248,
767
+ 238
768
+ ],
769
+ "accounts": [
770
+ {
771
+ "name": "creator",
772
+ "writable": true,
773
+ "signer": true,
774
+ "relations": [
775
+ "stream"
776
+ ]
777
+ },
778
+ {
779
+ "name": "stream",
780
+ "writable": true,
781
+ "pda": {
782
+ "seeds": [
783
+ {
784
+ "kind": "const",
785
+ "value": [
786
+ 115,
787
+ 116,
788
+ 114,
789
+ 101,
790
+ 97,
791
+ 109
792
+ ]
793
+ },
794
+ {
795
+ "kind": "account",
796
+ "path": "stream.creator",
797
+ "account": "StreamAccount"
798
+ },
799
+ {
800
+ "kind": "account",
801
+ "path": "stream.recipient",
802
+ "account": "StreamAccount"
803
+ },
804
+ {
805
+ "kind": "account",
806
+ "path": "stream.nonce",
807
+ "account": "StreamAccount"
808
+ }
809
+ ]
810
+ }
811
+ },
812
+ {
813
+ "name": "milestone",
814
+ "writable": true
815
+ },
816
+ {
817
+ "name": "system_program",
818
+ "address": "11111111111111111111111111111111"
819
+ }
820
+ ],
821
+ "args": []
822
+ },
823
+ {
824
+ "name": "withdraw",
825
+ "discriminator": [
826
+ 183,
827
+ 18,
828
+ 70,
829
+ 156,
830
+ 148,
831
+ 109,
832
+ 161,
833
+ 34
834
+ ],
835
+ "accounts": [
836
+ {
837
+ "name": "recipient",
838
+ "writable": true,
839
+ "signer": true
840
+ },
841
+ {
842
+ "name": "mint",
843
+ "relations": [
844
+ "stream"
845
+ ]
846
+ },
847
+ {
848
+ "name": "config",
849
+ "pda": {
850
+ "seeds": [
851
+ {
852
+ "kind": "const",
853
+ "value": [
854
+ 99,
855
+ 111,
856
+ 110,
857
+ 102,
858
+ 105,
859
+ 103
860
+ ]
861
+ }
862
+ ]
863
+ }
864
+ },
865
+ {
866
+ "name": "stream",
867
+ "docs": [
868
+ "Stream account"
869
+ ],
870
+ "writable": true,
871
+ "pda": {
872
+ "seeds": [
873
+ {
874
+ "kind": "const",
875
+ "value": [
876
+ 115,
877
+ 116,
878
+ 114,
879
+ 101,
880
+ 97,
881
+ 109
882
+ ]
883
+ },
884
+ {
885
+ "kind": "account",
886
+ "path": "stream.creator",
887
+ "account": "StreamAccount"
888
+ },
889
+ {
890
+ "kind": "account",
891
+ "path": "stream.recipient",
892
+ "account": "StreamAccount"
893
+ },
894
+ {
895
+ "kind": "account",
896
+ "path": "stream.nonce",
897
+ "account": "StreamAccount"
898
+ }
899
+ ]
900
+ }
901
+ },
902
+ {
903
+ "name": "vault",
904
+ "docs": [
905
+ "Vault token account (ATA owned by stream PDA)"
906
+ ],
907
+ "writable": true,
908
+ "pda": {
909
+ "seeds": [
910
+ {
911
+ "kind": "account",
912
+ "path": "stream"
913
+ },
914
+ {
915
+ "kind": "account",
916
+ "path": "token_program"
917
+ },
918
+ {
919
+ "kind": "account",
920
+ "path": "mint"
921
+ }
922
+ ],
923
+ "program": {
924
+ "kind": "const",
925
+ "value": [
926
+ 140,
927
+ 151,
928
+ 37,
929
+ 143,
930
+ 78,
931
+ 36,
932
+ 137,
933
+ 241,
934
+ 187,
935
+ 61,
936
+ 16,
937
+ 41,
938
+ 20,
939
+ 142,
940
+ 13,
941
+ 131,
942
+ 11,
943
+ 90,
944
+ 19,
945
+ 153,
946
+ 218,
947
+ 255,
948
+ 16,
949
+ 132,
950
+ 4,
951
+ 142,
952
+ 123,
953
+ 216,
954
+ 219,
955
+ 233,
956
+ 248,
957
+ 89
958
+ ]
959
+ }
960
+ }
961
+ },
962
+ {
963
+ "name": "recipient_ata",
964
+ "docs": [
965
+ "Token account recipient"
966
+ ],
967
+ "writable": true
968
+ },
969
+ {
970
+ "name": "fee_vault",
971
+ "docs": [
972
+ "Recipient fee SOL"
973
+ ],
974
+ "writable": true,
975
+ "pda": {
976
+ "seeds": [
977
+ {
978
+ "kind": "const",
979
+ "value": [
980
+ 102,
981
+ 101,
982
+ 101,
983
+ 95,
984
+ 118,
985
+ 97,
986
+ 117,
987
+ 108,
988
+ 116
989
+ ]
990
+ }
991
+ ]
992
+ }
993
+ },
994
+ {
995
+ "name": "chainlink_feed"
996
+ },
997
+ {
998
+ "name": "token_program"
999
+ },
1000
+ {
1001
+ "name": "system_program",
1002
+ "address": "11111111111111111111111111111111"
1003
+ }
1004
+ ],
1005
+ "args": []
1006
+ },
1007
+ {
1008
+ "name": "withdraw_fees",
1009
+ "discriminator": [
1010
+ 198,
1011
+ 212,
1012
+ 171,
1013
+ 109,
1014
+ 144,
1015
+ 215,
1016
+ 174,
1017
+ 89
1018
+ ],
1019
+ "accounts": [
1020
+ {
1021
+ "name": "admin",
1022
+ "writable": true,
1023
+ "signer": true
1024
+ },
1025
+ {
1026
+ "name": "config",
1027
+ "pda": {
1028
+ "seeds": [
1029
+ {
1030
+ "kind": "const",
1031
+ "value": [
1032
+ 99,
1033
+ 111,
1034
+ 110,
1035
+ 102,
1036
+ 105,
1037
+ 103
1038
+ ]
1039
+ }
1040
+ ]
1041
+ }
1042
+ },
1043
+ {
1044
+ "name": "fee_vault",
1045
+ "writable": true,
1046
+ "pda": {
1047
+ "seeds": [
1048
+ {
1049
+ "kind": "const",
1050
+ "value": [
1051
+ 102,
1052
+ 101,
1053
+ 101,
1054
+ 95,
1055
+ 118,
1056
+ 97,
1057
+ 117,
1058
+ 108,
1059
+ 116
1060
+ ]
1061
+ }
1062
+ ]
1063
+ }
1064
+ },
1065
+ {
1066
+ "name": "destination",
1067
+ "writable": true
1068
+ },
1069
+ {
1070
+ "name": "system_program",
1071
+ "address": "11111111111111111111111111111111"
1072
+ }
1073
+ ],
1074
+ "args": [
1075
+ {
1076
+ "name": "amount",
1077
+ "type": "u64"
1078
+ }
1079
+ ]
1080
+ }
1081
+ ],
1082
+ "accounts": [
1083
+ {
1084
+ "name": "ConfigAccount",
1085
+ "discriminator": [
1086
+ 189,
1087
+ 255,
1088
+ 97,
1089
+ 70,
1090
+ 186,
1091
+ 189,
1092
+ 24,
1093
+ 102
1094
+ ]
1095
+ },
1096
+ {
1097
+ "name": "MilestoneAccount",
1098
+ "discriminator": [
1099
+ 21,
1100
+ 222,
1101
+ 32,
1102
+ 140,
1103
+ 43,
1104
+ 166,
1105
+ 109,
1106
+ 19
1107
+ ]
1108
+ },
1109
+ {
1110
+ "name": "StreamAccount",
1111
+ "discriminator": [
1112
+ 243,
1113
+ 60,
1114
+ 164,
1115
+ 106,
1116
+ 199,
1117
+ 192,
1118
+ 110,
1119
+ 53
1120
+ ]
1121
+ }
1122
+ ],
1123
+ "events": [
1124
+ {
1125
+ "name": "CliffEdited",
1126
+ "discriminator": [
1127
+ 143,
1128
+ 207,
1129
+ 9,
1130
+ 136,
1131
+ 149,
1132
+ 157,
1133
+ 201,
1134
+ 139
1135
+ ]
1136
+ },
1137
+ {
1138
+ "name": "FeesWithdrawn",
1139
+ "discriminator": [
1140
+ 234,
1141
+ 15,
1142
+ 0,
1143
+ 119,
1144
+ 148,
1145
+ 241,
1146
+ 40,
1147
+ 21
1148
+ ]
1149
+ },
1150
+ {
1151
+ "name": "LinearEdited",
1152
+ "discriminator": [
1153
+ 94,
1154
+ 168,
1155
+ 133,
1156
+ 235,
1157
+ 122,
1158
+ 111,
1159
+ 156,
1160
+ 155
1161
+ ]
1162
+ },
1163
+ {
1164
+ "name": "MilestoneEdited",
1165
+ "discriminator": [
1166
+ 178,
1167
+ 220,
1168
+ 80,
1169
+ 222,
1170
+ 55,
1171
+ 97,
1172
+ 104,
1173
+ 50
1174
+ ]
1175
+ },
1176
+ {
1177
+ "name": "MilestoneUnlocked",
1178
+ "discriminator": [
1179
+ 234,
1180
+ 55,
1181
+ 24,
1182
+ 33,
1183
+ 42,
1184
+ 152,
1185
+ 104,
1186
+ 241
1187
+ ]
1188
+ },
1189
+ {
1190
+ "name": "StreamCancelled",
1191
+ "discriminator": [
1192
+ 91,
1193
+ 215,
1194
+ 29,
1195
+ 237,
1196
+ 194,
1197
+ 6,
1198
+ 184,
1199
+ 92
1200
+ ]
1201
+ },
1202
+ {
1203
+ "name": "StreamCreated",
1204
+ "discriminator": [
1205
+ 93,
1206
+ 150,
1207
+ 91,
1208
+ 15,
1209
+ 166,
1210
+ 8,
1211
+ 251,
1212
+ 166
1213
+ ]
1214
+ },
1215
+ {
1216
+ "name": "TokensClaimed",
1217
+ "discriminator": [
1218
+ 25,
1219
+ 128,
1220
+ 244,
1221
+ 55,
1222
+ 241,
1223
+ 136,
1224
+ 200,
1225
+ 91
1226
+ ]
1227
+ }
1228
+ ],
1229
+ "errors": [
1230
+ {
1231
+ "code": 6000,
1232
+ "name": "InvalidAmount",
1233
+ "msg": "Amount must be greater than zero"
1234
+ },
1235
+ {
1236
+ "code": 6001,
1237
+ "name": "InvalidSchedule",
1238
+ "msg": "End date must be after start date"
1239
+ },
1240
+ {
1241
+ "code": 6002,
1242
+ "name": "InvalidCliff",
1243
+ "msg": "Cliff date must be between start and end dates"
1244
+ },
1245
+ {
1246
+ "code": 6003,
1247
+ "name": "InvalidEndDate",
1248
+ "msg": "End date must be in the future"
1249
+ },
1250
+ {
1251
+ "code": 6004,
1252
+ "name": "InvalidStartDate",
1253
+ "msg": "Start date must not be in the past"
1254
+ },
1255
+ {
1256
+ "code": 6005,
1257
+ "name": "DurationTooShort",
1258
+ "msg": "Stream duration too short"
1259
+ },
1260
+ {
1261
+ "code": 6006,
1262
+ "name": "MathOverflow",
1263
+ "msg": "Math overflow"
1264
+ },
1265
+ {
1266
+ "code": 6007,
1267
+ "name": "InvalidRecipient",
1268
+ "msg": "Invalid recipient"
1269
+ },
1270
+ {
1271
+ "code": 6008,
1272
+ "name": "InvalidMint",
1273
+ "msg": "Invalid mint"
1274
+ },
1275
+ {
1276
+ "code": 6009,
1277
+ "name": "InvalidTokenOwner",
1278
+ "msg": "Invalid token owner"
1279
+ },
1280
+ {
1281
+ "code": 6010,
1282
+ "name": "InsufficientBalance",
1283
+ "msg": "Insufficient balance"
1284
+ },
1285
+ {
1286
+ "code": 6011,
1287
+ "name": "MintNotAllowed",
1288
+ "msg": "Mint not allowed"
1289
+ },
1290
+ {
1291
+ "code": 6012,
1292
+ "name": "ProtocolPaused",
1293
+ "msg": "Protocol paused"
1294
+ },
1295
+ {
1296
+ "code": 6013,
1297
+ "name": "AmountTooSmall",
1298
+ "msg": "Amount too small"
1299
+ },
1300
+ {
1301
+ "code": 6014,
1302
+ "name": "InvalidMintDecimals",
1303
+ "msg": "Invalid mint decimals"
1304
+ },
1305
+ {
1306
+ "code": 6015,
1307
+ "name": "TransferFeeMintUnsupported",
1308
+ "msg": "Transfer fee tokens unsupported"
1309
+ },
1310
+ {
1311
+ "code": 6016,
1312
+ "name": "StreamNotActive",
1313
+ "msg": "Stream not active"
1314
+ },
1315
+ {
1316
+ "code": 6017,
1317
+ "name": "StreamNotCancelable",
1318
+ "msg": "Stream not cancelable"
1319
+ },
1320
+ {
1321
+ "code": 6018,
1322
+ "name": "NothingToWithdraw",
1323
+ "msg": "No tokens available to withdraw"
1324
+ },
1325
+ {
1326
+ "code": 6019,
1327
+ "name": "Unauthorized",
1328
+ "msg": "Signer is not the stream recipient"
1329
+ },
1330
+ {
1331
+ "code": 6020,
1332
+ "name": "InvalidOracleFeed",
1333
+ "msg": "Invalid oracle price feed"
1334
+ },
1335
+ {
1336
+ "code": 6021,
1337
+ "name": "StaleOraclePrice",
1338
+ "msg": "Oracle price is stale (> 1 hour)"
1339
+ },
1340
+ {
1341
+ "code": 6022,
1342
+ "name": "InvalidOraclePrice",
1343
+ "msg": "Oracle returned invalid price"
1344
+ },
1345
+ {
1346
+ "code": 6023,
1347
+ "name": "InvalidFeeReceiver",
1348
+ "msg": "Invalid fee receiver account"
1349
+ },
1350
+ {
1351
+ "code": 6024,
1352
+ "name": "AlreadyCancelled",
1353
+ "msg": "Already cancelled"
1354
+ },
1355
+ {
1356
+ "code": 6025,
1357
+ "name": "FullyVested",
1358
+ "msg": "Fully vested"
1359
+ },
1360
+ {
1361
+ "code": 6026,
1362
+ "name": "StreamExpired",
1363
+ "msg": "Stream expired"
1364
+ },
1365
+ {
1366
+ "code": 6027,
1367
+ "name": "MilestoneAlreadyUnlocked",
1368
+ "msg": "Milestone already unlocked"
1369
+ },
1370
+ {
1371
+ "code": 6028,
1372
+ "name": "InvalidVestingType",
1373
+ "msg": "Invalid vesting type"
1374
+ },
1375
+ {
1376
+ "code": 6029,
1377
+ "name": "InvalidMilestoneCount",
1378
+ "msg": "Invalid milestone count"
1379
+ },
1380
+ {
1381
+ "code": 6030,
1382
+ "name": "InvalidMilestonePda",
1383
+ "msg": "Invalid milestone PDA"
1384
+ },
1385
+ {
1386
+ "code": 6031,
1387
+ "name": "InvalidMilestoneAmount",
1388
+ "msg": "Invalid milestone amount"
1389
+ },
1390
+ {
1391
+ "code": 6032,
1392
+ "name": "PreviousMilestoneNotApproved",
1393
+ "msg": "Previous milestone not approved"
1394
+ },
1395
+ {
1396
+ "code": 6033,
1397
+ "name": "InvalidMilestoneOrder",
1398
+ "msg": "Invalid milestone order"
1399
+ },
1400
+ {
1401
+ "code": 6034,
1402
+ "name": "PreviousMilestoneMissing",
1403
+ "msg": "Previous milestone missing"
1404
+ },
1405
+ {
1406
+ "code": 6035,
1407
+ "name": "StreamAlreadyStarted",
1408
+ "msg": "Stream already started and cannot be modified"
1409
+ }
1410
+ ],
1411
+ "types": [
1412
+ {
1413
+ "name": "CliffEdited",
1414
+ "type": {
1415
+ "kind": "struct",
1416
+ "fields": [
1417
+ {
1418
+ "name": "stream",
1419
+ "type": "pubkey"
1420
+ },
1421
+ {
1422
+ "name": "old_cliff_ts",
1423
+ "type": "i64"
1424
+ },
1425
+ {
1426
+ "name": "new_cliff_ts",
1427
+ "type": "i64"
1428
+ },
1429
+ {
1430
+ "name": "timestamp",
1431
+ "type": "i64"
1432
+ }
1433
+ ]
1434
+ }
1435
+ },
1436
+ {
1437
+ "name": "ConfigAccount",
1438
+ "type": {
1439
+ "kind": "struct",
1440
+ "fields": [
1441
+ {
1442
+ "name": "admin_authority",
1443
+ "type": "pubkey"
1444
+ },
1445
+ {
1446
+ "name": "fee_authority",
1447
+ "type": "pubkey"
1448
+ },
1449
+ {
1450
+ "name": "paused",
1451
+ "type": "bool"
1452
+ },
1453
+ {
1454
+ "name": "withdraw_fee_bps",
1455
+ "type": "u16"
1456
+ },
1457
+ {
1458
+ "name": "max_withdraw_fee_bps",
1459
+ "type": "u16"
1460
+ },
1461
+ {
1462
+ "name": "fee_change_timelock_seconds",
1463
+ "type": "u64"
1464
+ },
1465
+ {
1466
+ "name": "pending_fees",
1467
+ "type": {
1468
+ "option": {
1469
+ "defined": {
1470
+ "name": "PendingFees"
1471
+ }
1472
+ }
1473
+ }
1474
+ },
1475
+ {
1476
+ "name": "allowed_mints",
1477
+ "type": {
1478
+ "vec": "pubkey"
1479
+ }
1480
+ },
1481
+ {
1482
+ "name": "bump",
1483
+ "type": "u8"
1484
+ }
1485
+ ]
1486
+ }
1487
+ },
1488
+ {
1489
+ "name": "FeesWithdrawn",
1490
+ "type": {
1491
+ "kind": "struct",
1492
+ "fields": [
1493
+ {
1494
+ "name": "admin",
1495
+ "type": "pubkey"
1496
+ },
1497
+ {
1498
+ "name": "destination",
1499
+ "type": "pubkey"
1500
+ },
1501
+ {
1502
+ "name": "amount",
1503
+ "type": "u64"
1504
+ },
1505
+ {
1506
+ "name": "timestamp",
1507
+ "type": "i64"
1508
+ }
1509
+ ]
1510
+ }
1511
+ },
1512
+ {
1513
+ "name": "LinearEdited",
1514
+ "type": {
1515
+ "kind": "struct",
1516
+ "fields": [
1517
+ {
1518
+ "name": "stream",
1519
+ "type": "pubkey"
1520
+ },
1521
+ {
1522
+ "name": "old_end_ts",
1523
+ "type": "i64"
1524
+ },
1525
+ {
1526
+ "name": "new_end_ts",
1527
+ "type": "i64"
1528
+ },
1529
+ {
1530
+ "name": "old_total_amount",
1531
+ "type": "u64"
1532
+ },
1533
+ {
1534
+ "name": "new_total_amount",
1535
+ "type": "u64"
1536
+ },
1537
+ {
1538
+ "name": "topup_amount",
1539
+ "type": "u64"
1540
+ },
1541
+ {
1542
+ "name": "timestamp",
1543
+ "type": "i64"
1544
+ }
1545
+ ]
1546
+ }
1547
+ },
1548
+ {
1549
+ "name": "MilestoneAccount",
1550
+ "type": {
1551
+ "kind": "struct",
1552
+ "fields": [
1553
+ {
1554
+ "name": "stream",
1555
+ "type": "pubkey"
1556
+ },
1557
+ {
1558
+ "name": "index",
1559
+ "type": "u8"
1560
+ },
1561
+ {
1562
+ "name": "unlock_ts",
1563
+ "type": "i64"
1564
+ },
1565
+ {
1566
+ "name": "amount",
1567
+ "type": "u64"
1568
+ },
1569
+ {
1570
+ "name": "approved",
1571
+ "type": "bool"
1572
+ },
1573
+ {
1574
+ "name": "unlocked",
1575
+ "type": "bool"
1576
+ },
1577
+ {
1578
+ "name": "bump",
1579
+ "type": "u8"
1580
+ }
1581
+ ]
1582
+ }
1583
+ },
1584
+ {
1585
+ "name": "MilestoneEdited",
1586
+ "type": {
1587
+ "kind": "struct",
1588
+ "fields": [
1589
+ {
1590
+ "name": "stream",
1591
+ "type": "pubkey"
1592
+ },
1593
+ {
1594
+ "name": "milestone",
1595
+ "type": "pubkey"
1596
+ },
1597
+ {
1598
+ "name": "index",
1599
+ "type": "u8"
1600
+ },
1601
+ {
1602
+ "name": "old_amount",
1603
+ "type": "u64"
1604
+ },
1605
+ {
1606
+ "name": "new_amount",
1607
+ "type": "u64"
1608
+ },
1609
+ {
1610
+ "name": "timestamp",
1611
+ "type": "i64"
1612
+ }
1613
+ ]
1614
+ }
1615
+ },
1616
+ {
1617
+ "name": "MilestoneInput",
1618
+ "type": {
1619
+ "kind": "struct",
1620
+ "fields": [
1621
+ {
1622
+ "name": "amount",
1623
+ "type": "u64"
1624
+ }
1625
+ ]
1626
+ }
1627
+ },
1628
+ {
1629
+ "name": "MilestoneUnlocked",
1630
+ "type": {
1631
+ "kind": "struct",
1632
+ "fields": [
1633
+ {
1634
+ "name": "stream",
1635
+ "type": "pubkey"
1636
+ },
1637
+ {
1638
+ "name": "milestone",
1639
+ "type": "pubkey"
1640
+ },
1641
+ {
1642
+ "name": "index",
1643
+ "type": "u8"
1644
+ },
1645
+ {
1646
+ "name": "amount",
1647
+ "type": "u64"
1648
+ },
1649
+ {
1650
+ "name": "unlock_ts",
1651
+ "type": "i64"
1652
+ }
1653
+ ]
1654
+ }
1655
+ },
1656
+ {
1657
+ "name": "PendingFees",
1658
+ "type": {
1659
+ "kind": "struct",
1660
+ "fields": [
1661
+ {
1662
+ "name": "new_withdraw_fee_bps",
1663
+ "type": "u16"
1664
+ },
1665
+ {
1666
+ "name": "effective_at",
1667
+ "type": "i64"
1668
+ }
1669
+ ]
1670
+ }
1671
+ },
1672
+ {
1673
+ "name": "StreamAccount",
1674
+ "type": {
1675
+ "kind": "struct",
1676
+ "fields": [
1677
+ {
1678
+ "name": "creator",
1679
+ "type": "pubkey"
1680
+ },
1681
+ {
1682
+ "name": "recipient",
1683
+ "type": "pubkey"
1684
+ },
1685
+ {
1686
+ "name": "mint",
1687
+ "type": "pubkey"
1688
+ },
1689
+ {
1690
+ "name": "vault",
1691
+ "type": "pubkey"
1692
+ },
1693
+ {
1694
+ "name": "total_amount",
1695
+ "type": "u64"
1696
+ },
1697
+ {
1698
+ "name": "withdrawn",
1699
+ "type": "u64"
1700
+ },
1701
+ {
1702
+ "name": "start_ts",
1703
+ "type": "i64"
1704
+ },
1705
+ {
1706
+ "name": "cliff_ts",
1707
+ "type": "i64"
1708
+ },
1709
+ {
1710
+ "name": "end_ts",
1711
+ "type": "i64"
1712
+ },
1713
+ {
1714
+ "name": "vesting_type",
1715
+ "type": "u8"
1716
+ },
1717
+ {
1718
+ "name": "status",
1719
+ "type": "u8"
1720
+ },
1721
+ {
1722
+ "name": "cancelable",
1723
+ "type": "bool"
1724
+ },
1725
+ {
1726
+ "name": "milestone_count",
1727
+ "type": "u8"
1728
+ },
1729
+ {
1730
+ "name": "next_milestone_index",
1731
+ "type": "u8"
1732
+ },
1733
+ {
1734
+ "name": "cancelled",
1735
+ "type": "bool"
1736
+ },
1737
+ {
1738
+ "name": "nonce",
1739
+ "type": "u64"
1740
+ },
1741
+ {
1742
+ "name": "bump",
1743
+ "type": "u8"
1744
+ },
1745
+ {
1746
+ "name": "unlocked_milestone_amount",
1747
+ "type": "u64"
1748
+ }
1749
+ ]
1750
+ }
1751
+ },
1752
+ {
1753
+ "name": "StreamCancelled",
1754
+ "type": {
1755
+ "kind": "struct",
1756
+ "fields": [
1757
+ {
1758
+ "name": "stream",
1759
+ "type": "pubkey"
1760
+ },
1761
+ {
1762
+ "name": "creator",
1763
+ "type": "pubkey"
1764
+ },
1765
+ {
1766
+ "name": "recipient",
1767
+ "type": "pubkey"
1768
+ },
1769
+ {
1770
+ "name": "vested_amount",
1771
+ "type": "u64"
1772
+ },
1773
+ {
1774
+ "name": "returned_to_creator",
1775
+ "type": "u64"
1776
+ },
1777
+ {
1778
+ "name": "claimable_for_recipient",
1779
+ "type": "u64"
1780
+ },
1781
+ {
1782
+ "name": "timestamp",
1783
+ "type": "i64"
1784
+ }
1785
+ ]
1786
+ }
1787
+ },
1788
+ {
1789
+ "name": "StreamCreated",
1790
+ "type": {
1791
+ "kind": "struct",
1792
+ "fields": [
1793
+ {
1794
+ "name": "stream",
1795
+ "type": "pubkey"
1796
+ },
1797
+ {
1798
+ "name": "creator",
1799
+ "type": "pubkey"
1800
+ },
1801
+ {
1802
+ "name": "recipient",
1803
+ "type": "pubkey"
1804
+ },
1805
+ {
1806
+ "name": "mint",
1807
+ "type": "pubkey"
1808
+ },
1809
+ {
1810
+ "name": "vault",
1811
+ "type": "pubkey"
1812
+ },
1813
+ {
1814
+ "name": "total_amount",
1815
+ "type": "u64"
1816
+ },
1817
+ {
1818
+ "name": "vesting_type",
1819
+ "type": "u8"
1820
+ },
1821
+ {
1822
+ "name": "start_ts",
1823
+ "type": "i64"
1824
+ },
1825
+ {
1826
+ "name": "cliff_ts",
1827
+ "type": "i64"
1828
+ },
1829
+ {
1830
+ "name": "end_ts",
1831
+ "type": "i64"
1832
+ },
1833
+ {
1834
+ "name": "milestone_count",
1835
+ "type": "u8"
1836
+ },
1837
+ {
1838
+ "name": "cancelable",
1839
+ "type": "bool"
1840
+ },
1841
+ {
1842
+ "name": "nonce",
1843
+ "type": "u64"
1844
+ },
1845
+ {
1846
+ "name": "created_at",
1847
+ "type": "i64"
1848
+ }
1849
+ ]
1850
+ }
1851
+ },
1852
+ {
1853
+ "name": "TokensClaimed",
1854
+ "type": {
1855
+ "kind": "struct",
1856
+ "fields": [
1857
+ {
1858
+ "name": "stream",
1859
+ "type": "pubkey"
1860
+ },
1861
+ {
1862
+ "name": "recipient",
1863
+ "type": "pubkey"
1864
+ },
1865
+ {
1866
+ "name": "mint",
1867
+ "type": "pubkey"
1868
+ },
1869
+ {
1870
+ "name": "claimable",
1871
+ "type": "u64"
1872
+ },
1873
+ {
1874
+ "name": "fee_lamports",
1875
+ "type": "u64"
1876
+ },
1877
+ {
1878
+ "name": "withdrawn_total",
1879
+ "type": "u64"
1880
+ },
1881
+ {
1882
+ "name": "timestamp",
1883
+ "type": "i64"
1884
+ }
1885
+ ]
1886
+ }
1887
+ }
1888
+ ]
1889
+ }