@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,908 @@
1
+ import { Program, BN } from "@coral-xyz/anchor";
2
+ import { PublicKey } from "@solana/web3.js";
3
+ import { UnifiedFlow } from "./types";
4
+ export declare const CHAINLINK_PROGRAM_ID: PublicKey;
5
+ export declare const SOL_USD_FEED: PublicKey;
6
+ export interface MilestoneInput {
7
+ amount: BN;
8
+ }
9
+ export declare class UnifiedFlowClient {
10
+ readonly program: Program<UnifiedFlow>;
11
+ constructor(program: Program<UnifiedFlow>);
12
+ /**
13
+ * Helper to derive the config PDA
14
+ */
15
+ getConfigPDA(): PublicKey;
16
+ /**
17
+ * Create a new stream (Linear, Cliff, or Milestone)
18
+ */
19
+ createStream(creator: PublicKey, recipient: PublicKey, mint: PublicKey, amount: BN, startTs: BN, cliffTs: BN, endTs: BN, vestingType: number, milestones: MilestoneInput[], nonce: BN): Promise<import("@coral-xyz/anchor/dist/cjs/program/namespace/methods").MethodsBuilder<UnifiedFlow, {
20
+ name: "createStream";
21
+ discriminator: [71, 188, 111, 127, 108, 40, 229, 158];
22
+ accounts: [{
23
+ "name": "creator";
24
+ "writable": true;
25
+ "signer": true;
26
+ }, {
27
+ "name": "recipient";
28
+ }, {
29
+ "name": "mint";
30
+ }, {
31
+ "name": "config";
32
+ "pda": {
33
+ "seeds": [{
34
+ "kind": "const";
35
+ "value": [99, 111, 110, 102, 105, 103];
36
+ }];
37
+ };
38
+ }, {
39
+ "name": "stream";
40
+ "writable": true;
41
+ "pda": {
42
+ "seeds": [{
43
+ "kind": "const";
44
+ "value": [115, 116, 114, 101, 97, 109];
45
+ }, {
46
+ "kind": "account";
47
+ "path": "creator";
48
+ }, {
49
+ "kind": "account";
50
+ "path": "recipient";
51
+ }, {
52
+ "kind": "arg";
53
+ "path": "nonce";
54
+ }];
55
+ };
56
+ }, {
57
+ "name": "vault";
58
+ "writable": true;
59
+ "pda": {
60
+ "seeds": [{
61
+ "kind": "account";
62
+ "path": "stream";
63
+ }, {
64
+ "kind": "account";
65
+ "path": "tokenProgram";
66
+ }, {
67
+ "kind": "account";
68
+ "path": "mint";
69
+ }];
70
+ "program": {
71
+ "kind": "const";
72
+ "value": [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
73
+ };
74
+ };
75
+ }, {
76
+ "name": "creatorTokenAccount";
77
+ "writable": true;
78
+ }, {
79
+ "name": "systemProgram";
80
+ "address": "11111111111111111111111111111111";
81
+ }, {
82
+ "name": "tokenProgram";
83
+ }, {
84
+ "name": "associatedTokenProgram";
85
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
86
+ }];
87
+ args: [{
88
+ "name": "amount";
89
+ "type": "u64";
90
+ }, {
91
+ "name": "startTs";
92
+ "type": "i64";
93
+ }, {
94
+ "name": "cliffTs";
95
+ "type": "i64";
96
+ }, {
97
+ "name": "endTs";
98
+ "type": "i64";
99
+ }, {
100
+ "name": "vestingType";
101
+ "type": "u8";
102
+ }, {
103
+ "name": "milestones";
104
+ "type": {
105
+ "vec": {
106
+ "defined": {
107
+ "name": "milestoneInput";
108
+ };
109
+ };
110
+ };
111
+ }, {
112
+ "name": "nonce";
113
+ "type": "u64";
114
+ }];
115
+ } & {
116
+ name: "createStream";
117
+ }, {
118
+ name: "creator";
119
+ writable: true;
120
+ signer: true;
121
+ } | {
122
+ name: "recipient";
123
+ } | {
124
+ name: "mint";
125
+ } | {
126
+ name: "config";
127
+ pda: {
128
+ "seeds": [{
129
+ "kind": "const";
130
+ "value": [99, 111, 110, 102, 105, 103];
131
+ }];
132
+ };
133
+ } | {
134
+ name: "stream";
135
+ writable: true;
136
+ pda: {
137
+ "seeds": [{
138
+ "kind": "const";
139
+ "value": [115, 116, 114, 101, 97, 109];
140
+ }, {
141
+ "kind": "account";
142
+ "path": "creator";
143
+ }, {
144
+ "kind": "account";
145
+ "path": "recipient";
146
+ }, {
147
+ "kind": "arg";
148
+ "path": "nonce";
149
+ }];
150
+ };
151
+ } | {
152
+ name: "vault";
153
+ writable: true;
154
+ pda: {
155
+ "seeds": [{
156
+ "kind": "account";
157
+ "path": "stream";
158
+ }, {
159
+ "kind": "account";
160
+ "path": "tokenProgram";
161
+ }, {
162
+ "kind": "account";
163
+ "path": "mint";
164
+ }];
165
+ "program": {
166
+ "kind": "const";
167
+ "value": [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
168
+ };
169
+ };
170
+ } | {
171
+ name: "creatorTokenAccount";
172
+ writable: true;
173
+ } | {
174
+ name: "systemProgram";
175
+ address: "11111111111111111111111111111111";
176
+ } | {
177
+ name: "tokenProgram";
178
+ } | {
179
+ name: "associatedTokenProgram";
180
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
181
+ }>>;
182
+ /**
183
+ * Withdraw unlocked/vested tokens from a stream
184
+ */
185
+ withdraw(streamPDA: PublicKey, recipient: PublicKey, mint: PublicKey): Promise<import("@coral-xyz/anchor/dist/cjs/program/namespace/methods").MethodsBuilder<UnifiedFlow, {
186
+ name: "withdraw";
187
+ discriminator: [183, 18, 70, 156, 148, 109, 161, 34];
188
+ accounts: [{
189
+ "name": "recipient";
190
+ "writable": true;
191
+ "signer": true;
192
+ }, {
193
+ "name": "mint";
194
+ "relations": ["stream"];
195
+ }, {
196
+ "name": "config";
197
+ "pda": {
198
+ "seeds": [{
199
+ "kind": "const";
200
+ "value": [99, 111, 110, 102, 105, 103];
201
+ }];
202
+ };
203
+ }, {
204
+ "name": "stream";
205
+ "docs": ["Stream account"];
206
+ "writable": true;
207
+ "pda": {
208
+ "seeds": [{
209
+ "kind": "const";
210
+ "value": [115, 116, 114, 101, 97, 109];
211
+ }, {
212
+ "kind": "account";
213
+ "path": "stream.creator";
214
+ "account": "streamAccount";
215
+ }, {
216
+ "kind": "account";
217
+ "path": "stream.recipient";
218
+ "account": "streamAccount";
219
+ }, {
220
+ "kind": "account";
221
+ "path": "stream.nonce";
222
+ "account": "streamAccount";
223
+ }];
224
+ };
225
+ }, {
226
+ "name": "vault";
227
+ "docs": ["Vault token account (ATA owned by stream PDA)"];
228
+ "writable": true;
229
+ "pda": {
230
+ "seeds": [{
231
+ "kind": "account";
232
+ "path": "stream";
233
+ }, {
234
+ "kind": "account";
235
+ "path": "tokenProgram";
236
+ }, {
237
+ "kind": "account";
238
+ "path": "mint";
239
+ }];
240
+ "program": {
241
+ "kind": "const";
242
+ "value": [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
243
+ };
244
+ };
245
+ }, {
246
+ "name": "recipientAta";
247
+ "docs": ["Token account recipient"];
248
+ "writable": true;
249
+ }, {
250
+ "name": "feeVault";
251
+ "docs": ["Recipient fee SOL"];
252
+ "writable": true;
253
+ "pda": {
254
+ "seeds": [{
255
+ "kind": "const";
256
+ "value": [102, 101, 101, 95, 118, 97, 117, 108, 116];
257
+ }];
258
+ };
259
+ }, {
260
+ "name": "chainlinkFeed";
261
+ }, {
262
+ "name": "tokenProgram";
263
+ }, {
264
+ "name": "systemProgram";
265
+ "address": "11111111111111111111111111111111";
266
+ }];
267
+ args: [];
268
+ } & {
269
+ name: "withdraw";
270
+ }, {
271
+ name: "recipient";
272
+ writable: true;
273
+ signer: true;
274
+ } | {
275
+ name: "mint";
276
+ relations: ["stream"];
277
+ } | {
278
+ name: "config";
279
+ pda: {
280
+ "seeds": [{
281
+ "kind": "const";
282
+ "value": [99, 111, 110, 102, 105, 103];
283
+ }];
284
+ };
285
+ } | {
286
+ name: "stream";
287
+ docs: ["Stream account"];
288
+ writable: true;
289
+ pda: {
290
+ "seeds": [{
291
+ "kind": "const";
292
+ "value": [115, 116, 114, 101, 97, 109];
293
+ }, {
294
+ "kind": "account";
295
+ "path": "stream.creator";
296
+ "account": "streamAccount";
297
+ }, {
298
+ "kind": "account";
299
+ "path": "stream.recipient";
300
+ "account": "streamAccount";
301
+ }, {
302
+ "kind": "account";
303
+ "path": "stream.nonce";
304
+ "account": "streamAccount";
305
+ }];
306
+ };
307
+ } | {
308
+ name: "vault";
309
+ docs: ["Vault token account (ATA owned by stream PDA)"];
310
+ writable: true;
311
+ pda: {
312
+ "seeds": [{
313
+ "kind": "account";
314
+ "path": "stream";
315
+ }, {
316
+ "kind": "account";
317
+ "path": "tokenProgram";
318
+ }, {
319
+ "kind": "account";
320
+ "path": "mint";
321
+ }];
322
+ "program": {
323
+ "kind": "const";
324
+ "value": [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
325
+ };
326
+ };
327
+ } | {
328
+ name: "recipientAta";
329
+ docs: ["Token account recipient"];
330
+ writable: true;
331
+ } | {
332
+ name: "feeVault";
333
+ docs: ["Recipient fee SOL"];
334
+ writable: true;
335
+ pda: {
336
+ "seeds": [{
337
+ "kind": "const";
338
+ "value": [102, 101, 101, 95, 118, 97, 117, 108, 116];
339
+ }];
340
+ };
341
+ } | {
342
+ name: "chainlinkFeed";
343
+ } | {
344
+ name: "tokenProgram";
345
+ } | {
346
+ name: "systemProgram";
347
+ address: "11111111111111111111111111111111";
348
+ }>>;
349
+ /**
350
+ * Cancel an active stream and return remaining tokens to the creator
351
+ */
352
+ cancel(streamPDA: PublicKey, creator: PublicKey, recipient: PublicKey, mint: PublicKey): Promise<import("@coral-xyz/anchor/dist/cjs/program/namespace/methods").MethodsBuilder<UnifiedFlow, {
353
+ name: "cancel";
354
+ discriminator: [232, 219, 223, 41, 219, 236, 220, 190];
355
+ accounts: [{
356
+ "name": "creator";
357
+ "writable": true;
358
+ "signer": true;
359
+ }, {
360
+ "name": "mint";
361
+ "relations": ["stream"];
362
+ }, {
363
+ "name": "config";
364
+ "pda": {
365
+ "seeds": [{
366
+ "kind": "const";
367
+ "value": [99, 111, 110, 102, 105, 103];
368
+ }];
369
+ };
370
+ }, {
371
+ "name": "stream";
372
+ "writable": true;
373
+ "pda": {
374
+ "seeds": [{
375
+ "kind": "const";
376
+ "value": [115, 116, 114, 101, 97, 109];
377
+ }, {
378
+ "kind": "account";
379
+ "path": "stream.creator";
380
+ "account": "streamAccount";
381
+ }, {
382
+ "kind": "account";
383
+ "path": "stream.recipient";
384
+ "account": "streamAccount";
385
+ }, {
386
+ "kind": "account";
387
+ "path": "stream.nonce";
388
+ "account": "streamAccount";
389
+ }];
390
+ };
391
+ }, {
392
+ "name": "vault";
393
+ "writable": true;
394
+ "pda": {
395
+ "seeds": [{
396
+ "kind": "account";
397
+ "path": "stream";
398
+ }, {
399
+ "kind": "account";
400
+ "path": "tokenProgram";
401
+ }, {
402
+ "kind": "account";
403
+ "path": "mint";
404
+ }];
405
+ "program": {
406
+ "kind": "const";
407
+ "value": [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
408
+ };
409
+ };
410
+ }, {
411
+ "name": "creatorTokenAccount";
412
+ "writable": true;
413
+ }, {
414
+ "name": "recipientTokenAccount";
415
+ "writable": true;
416
+ }, {
417
+ "name": "tokenProgram";
418
+ }];
419
+ args: [];
420
+ } & {
421
+ name: "cancel";
422
+ }, {
423
+ name: "creator";
424
+ writable: true;
425
+ signer: true;
426
+ } | {
427
+ name: "mint";
428
+ relations: ["stream"];
429
+ } | {
430
+ name: "config";
431
+ pda: {
432
+ "seeds": [{
433
+ "kind": "const";
434
+ "value": [99, 111, 110, 102, 105, 103];
435
+ }];
436
+ };
437
+ } | {
438
+ name: "stream";
439
+ writable: true;
440
+ pda: {
441
+ "seeds": [{
442
+ "kind": "const";
443
+ "value": [115, 116, 114, 101, 97, 109];
444
+ }, {
445
+ "kind": "account";
446
+ "path": "stream.creator";
447
+ "account": "streamAccount";
448
+ }, {
449
+ "kind": "account";
450
+ "path": "stream.recipient";
451
+ "account": "streamAccount";
452
+ }, {
453
+ "kind": "account";
454
+ "path": "stream.nonce";
455
+ "account": "streamAccount";
456
+ }];
457
+ };
458
+ } | {
459
+ name: "vault";
460
+ writable: true;
461
+ pda: {
462
+ "seeds": [{
463
+ "kind": "account";
464
+ "path": "stream";
465
+ }, {
466
+ "kind": "account";
467
+ "path": "tokenProgram";
468
+ }, {
469
+ "kind": "account";
470
+ "path": "mint";
471
+ }];
472
+ "program": {
473
+ "kind": "const";
474
+ "value": [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
475
+ };
476
+ };
477
+ } | {
478
+ name: "creatorTokenAccount";
479
+ writable: true;
480
+ } | {
481
+ name: "recipientTokenAccount";
482
+ writable: true;
483
+ } | {
484
+ name: "tokenProgram";
485
+ }>>;
486
+ /**
487
+ * Unlock a specific milestone
488
+ */
489
+ unlockMilestone(streamPDA: PublicKey, creator: PublicKey, milestoneIndex: number): Promise<import("@coral-xyz/anchor/dist/cjs/program/namespace/methods").MethodsBuilder<UnifiedFlow, {
490
+ name: "unlockMilestone";
491
+ discriminator: [131, 196, 6, 134, 153, 130, 248, 238];
492
+ accounts: [{
493
+ "name": "creator";
494
+ "writable": true;
495
+ "signer": true;
496
+ "relations": ["stream"];
497
+ }, {
498
+ "name": "stream";
499
+ "writable": true;
500
+ "pda": {
501
+ "seeds": [{
502
+ "kind": "const";
503
+ "value": [115, 116, 114, 101, 97, 109];
504
+ }, {
505
+ "kind": "account";
506
+ "path": "stream.creator";
507
+ "account": "streamAccount";
508
+ }, {
509
+ "kind": "account";
510
+ "path": "stream.recipient";
511
+ "account": "streamAccount";
512
+ }, {
513
+ "kind": "account";
514
+ "path": "stream.nonce";
515
+ "account": "streamAccount";
516
+ }];
517
+ };
518
+ }, {
519
+ "name": "milestone";
520
+ "writable": true;
521
+ }, {
522
+ "name": "systemProgram";
523
+ "address": "11111111111111111111111111111111";
524
+ }];
525
+ args: [];
526
+ } & {
527
+ name: "unlockMilestone";
528
+ }, {
529
+ name: "creator";
530
+ writable: true;
531
+ signer: true;
532
+ relations: ["stream"];
533
+ } | {
534
+ name: "stream";
535
+ writable: true;
536
+ pda: {
537
+ "seeds": [{
538
+ "kind": "const";
539
+ "value": [115, 116, 114, 101, 97, 109];
540
+ }, {
541
+ "kind": "account";
542
+ "path": "stream.creator";
543
+ "account": "streamAccount";
544
+ }, {
545
+ "kind": "account";
546
+ "path": "stream.recipient";
547
+ "account": "streamAccount";
548
+ }, {
549
+ "kind": "account";
550
+ "path": "stream.nonce";
551
+ "account": "streamAccount";
552
+ }];
553
+ };
554
+ } | {
555
+ name: "milestone";
556
+ writable: true;
557
+ } | {
558
+ name: "systemProgram";
559
+ address: "11111111111111111111111111111111";
560
+ }>>;
561
+ /**
562
+ * Edit a milestone's amount (increase or decrease)
563
+ */
564
+ editMilestone(streamPDA: PublicKey, creator: PublicKey, mint: PublicKey, milestoneIndex: number, newAmount: BN): Promise<import("@coral-xyz/anchor/dist/cjs/program/namespace/methods").MethodsBuilder<UnifiedFlow, {
565
+ name: "editMilestone";
566
+ discriminator: [123, 218, 165, 226, 209, 227, 8, 166];
567
+ accounts: [{
568
+ "name": "creator";
569
+ "writable": true;
570
+ "signer": true;
571
+ "relations": ["stream"];
572
+ }, {
573
+ "name": "stream";
574
+ "writable": true;
575
+ "pda": {
576
+ "seeds": [{
577
+ "kind": "const";
578
+ "value": [115, 116, 114, 101, 97, 109];
579
+ }, {
580
+ "kind": "account";
581
+ "path": "stream.creator";
582
+ "account": "streamAccount";
583
+ }, {
584
+ "kind": "account";
585
+ "path": "stream.recipient";
586
+ "account": "streamAccount";
587
+ }, {
588
+ "kind": "account";
589
+ "path": "stream.nonce";
590
+ "account": "streamAccount";
591
+ }];
592
+ };
593
+ }, {
594
+ "name": "milestone";
595
+ "writable": true;
596
+ }, {
597
+ "name": "mint";
598
+ "relations": ["stream"];
599
+ }, {
600
+ "name": "vault";
601
+ "writable": true;
602
+ "pda": {
603
+ "seeds": [{
604
+ "kind": "account";
605
+ "path": "stream";
606
+ }, {
607
+ "kind": "account";
608
+ "path": "tokenProgram";
609
+ }, {
610
+ "kind": "account";
611
+ "path": "mint";
612
+ }];
613
+ "program": {
614
+ "kind": "const";
615
+ "value": [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
616
+ };
617
+ };
618
+ }, {
619
+ "name": "creatorTokenAccount";
620
+ "writable": true;
621
+ }, {
622
+ "name": "tokenProgram";
623
+ }];
624
+ args: [{
625
+ "name": "newAmount";
626
+ "type": "u64";
627
+ }];
628
+ } & {
629
+ name: "editMilestone";
630
+ }, {
631
+ name: "creator";
632
+ writable: true;
633
+ signer: true;
634
+ relations: ["stream"];
635
+ } | {
636
+ name: "stream";
637
+ writable: true;
638
+ pda: {
639
+ "seeds": [{
640
+ "kind": "const";
641
+ "value": [115, 116, 114, 101, 97, 109];
642
+ }, {
643
+ "kind": "account";
644
+ "path": "stream.creator";
645
+ "account": "streamAccount";
646
+ }, {
647
+ "kind": "account";
648
+ "path": "stream.recipient";
649
+ "account": "streamAccount";
650
+ }, {
651
+ "kind": "account";
652
+ "path": "stream.nonce";
653
+ "account": "streamAccount";
654
+ }];
655
+ };
656
+ } | {
657
+ name: "milestone";
658
+ writable: true;
659
+ } | {
660
+ name: "mint";
661
+ relations: ["stream"];
662
+ } | {
663
+ name: "vault";
664
+ writable: true;
665
+ pda: {
666
+ "seeds": [{
667
+ "kind": "account";
668
+ "path": "stream";
669
+ }, {
670
+ "kind": "account";
671
+ "path": "tokenProgram";
672
+ }, {
673
+ "kind": "account";
674
+ "path": "mint";
675
+ }];
676
+ "program": {
677
+ "kind": "const";
678
+ "value": [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
679
+ };
680
+ };
681
+ } | {
682
+ name: "creatorTokenAccount";
683
+ writable: true;
684
+ } | {
685
+ name: "tokenProgram";
686
+ }>>;
687
+ /**
688
+ * Edit the cliff timestamp of a cliff vesting stream
689
+ */
690
+ editCliff(streamPDA: PublicKey, creator: PublicKey, newCliffTs: BN): Promise<import("@coral-xyz/anchor/dist/cjs/program/namespace/methods").MethodsBuilder<UnifiedFlow, {
691
+ name: "editCliff";
692
+ discriminator: [41, 203, 122, 7, 21, 225, 162, 98];
693
+ accounts: [{
694
+ "name": "creator";
695
+ "writable": true;
696
+ "signer": true;
697
+ "relations": ["stream"];
698
+ }, {
699
+ "name": "config";
700
+ "pda": {
701
+ "seeds": [{
702
+ "kind": "const";
703
+ "value": [99, 111, 110, 102, 105, 103];
704
+ }];
705
+ };
706
+ }, {
707
+ "name": "stream";
708
+ "writable": true;
709
+ "pda": {
710
+ "seeds": [{
711
+ "kind": "const";
712
+ "value": [115, 116, 114, 101, 97, 109];
713
+ }, {
714
+ "kind": "account";
715
+ "path": "stream.creator";
716
+ "account": "streamAccount";
717
+ }, {
718
+ "kind": "account";
719
+ "path": "stream.recipient";
720
+ "account": "streamAccount";
721
+ }, {
722
+ "kind": "account";
723
+ "path": "stream.nonce";
724
+ "account": "streamAccount";
725
+ }];
726
+ };
727
+ }];
728
+ args: [{
729
+ "name": "newCliffTs";
730
+ "type": "i64";
731
+ }];
732
+ } & {
733
+ name: "editCliff";
734
+ }, {
735
+ name: "creator";
736
+ writable: true;
737
+ signer: true;
738
+ relations: ["stream"];
739
+ } | {
740
+ name: "config";
741
+ pda: {
742
+ "seeds": [{
743
+ "kind": "const";
744
+ "value": [99, 111, 110, 102, 105, 103];
745
+ }];
746
+ };
747
+ } | {
748
+ name: "stream";
749
+ writable: true;
750
+ pda: {
751
+ "seeds": [{
752
+ "kind": "const";
753
+ "value": [115, 116, 114, 101, 97, 109];
754
+ }, {
755
+ "kind": "account";
756
+ "path": "stream.creator";
757
+ "account": "streamAccount";
758
+ }, {
759
+ "kind": "account";
760
+ "path": "stream.recipient";
761
+ "account": "streamAccount";
762
+ }, {
763
+ "kind": "account";
764
+ "path": "stream.nonce";
765
+ "account": "streamAccount";
766
+ }];
767
+ };
768
+ }>>;
769
+ /**
770
+ * Edit a linear stream's end timestamp and/or top up tokens
771
+ */
772
+ editLinear(streamPDA: PublicKey, creator: PublicKey, mint: PublicKey, newEndTs: BN, topupAmount: BN): Promise<import("@coral-xyz/anchor/dist/cjs/program/namespace/methods").MethodsBuilder<UnifiedFlow, {
773
+ name: "editLinear";
774
+ discriminator: [255, 42, 53, 36, 79, 96, 83, 223];
775
+ accounts: [{
776
+ "name": "creator";
777
+ "writable": true;
778
+ "signer": true;
779
+ "relations": ["stream"];
780
+ }, {
781
+ "name": "mint";
782
+ "relations": ["stream"];
783
+ }, {
784
+ "name": "config";
785
+ "pda": {
786
+ "seeds": [{
787
+ "kind": "const";
788
+ "value": [99, 111, 110, 102, 105, 103];
789
+ }];
790
+ };
791
+ }, {
792
+ "name": "stream";
793
+ "writable": true;
794
+ "pda": {
795
+ "seeds": [{
796
+ "kind": "const";
797
+ "value": [115, 116, 114, 101, 97, 109];
798
+ }, {
799
+ "kind": "account";
800
+ "path": "stream.creator";
801
+ "account": "streamAccount";
802
+ }, {
803
+ "kind": "account";
804
+ "path": "stream.recipient";
805
+ "account": "streamAccount";
806
+ }, {
807
+ "kind": "account";
808
+ "path": "stream.nonce";
809
+ "account": "streamAccount";
810
+ }];
811
+ };
812
+ }, {
813
+ "name": "vault";
814
+ "writable": true;
815
+ "pda": {
816
+ "seeds": [{
817
+ "kind": "account";
818
+ "path": "stream";
819
+ }, {
820
+ "kind": "account";
821
+ "path": "tokenProgram";
822
+ }, {
823
+ "kind": "account";
824
+ "path": "mint";
825
+ }];
826
+ "program": {
827
+ "kind": "const";
828
+ "value": [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
829
+ };
830
+ };
831
+ }, {
832
+ "name": "creatorTokenAccount";
833
+ "writable": true;
834
+ }, {
835
+ "name": "tokenProgram";
836
+ }];
837
+ args: [{
838
+ "name": "newEndTs";
839
+ "type": "i64";
840
+ }, {
841
+ "name": "topupAmount";
842
+ "type": "u64";
843
+ }];
844
+ } & {
845
+ name: "editLinear";
846
+ }, {
847
+ name: "creator";
848
+ writable: true;
849
+ signer: true;
850
+ relations: ["stream"];
851
+ } | {
852
+ name: "mint";
853
+ relations: ["stream"];
854
+ } | {
855
+ name: "config";
856
+ pda: {
857
+ "seeds": [{
858
+ "kind": "const";
859
+ "value": [99, 111, 110, 102, 105, 103];
860
+ }];
861
+ };
862
+ } | {
863
+ name: "stream";
864
+ writable: true;
865
+ pda: {
866
+ "seeds": [{
867
+ "kind": "const";
868
+ "value": [115, 116, 114, 101, 97, 109];
869
+ }, {
870
+ "kind": "account";
871
+ "path": "stream.creator";
872
+ "account": "streamAccount";
873
+ }, {
874
+ "kind": "account";
875
+ "path": "stream.recipient";
876
+ "account": "streamAccount";
877
+ }, {
878
+ "kind": "account";
879
+ "path": "stream.nonce";
880
+ "account": "streamAccount";
881
+ }];
882
+ };
883
+ } | {
884
+ name: "vault";
885
+ writable: true;
886
+ pda: {
887
+ "seeds": [{
888
+ "kind": "account";
889
+ "path": "stream";
890
+ }, {
891
+ "kind": "account";
892
+ "path": "tokenProgram";
893
+ }, {
894
+ "kind": "account";
895
+ "path": "mint";
896
+ }];
897
+ "program": {
898
+ "kind": "const";
899
+ "value": [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
900
+ };
901
+ };
902
+ } | {
903
+ name: "creatorTokenAccount";
904
+ writable: true;
905
+ } | {
906
+ name: "tokenProgram";
907
+ }>>;
908
+ }