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