@streamflow/stream 4.0.2 → 4.1.0-beta.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,442 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [
4
+ {
5
+ anonymous: false,
6
+ inputs: [{ indexed: false, internalType: "address", name: "", type: "address" }],
7
+ name: "ContractCreated",
8
+ type: "event",
9
+ },
10
+ {
11
+ inputs: [{ internalType: "address", name: "_stream_id", type: "address" }],
12
+ name: "cancel",
13
+ outputs: [],
14
+ stateMutability: "nonpayable",
15
+ type: "function",
16
+ },
17
+ {
18
+ inputs: [{ internalType: "uint256", name: "_new_fees", type: "uint256" }],
19
+ name: "changeStreamflowFees",
20
+ outputs: [],
21
+ stateMutability: "nonpayable",
22
+ type: "function",
23
+ },
24
+ {
25
+ inputs: [{ internalType: "address payable", name: "_new_treasury", type: "address" }],
26
+ name: "changeTreasury",
27
+ outputs: [],
28
+ stateMutability: "nonpayable",
29
+ type: "function",
30
+ },
31
+ {
32
+ inputs: [{ internalType: "uint256", name: "_new_fee", type: "uint256" }],
33
+ name: "changeTxFee",
34
+ outputs: [],
35
+ stateMutability: "nonpayable",
36
+ type: "function",
37
+ },
38
+ {
39
+ inputs: [{ internalType: "address payable", name: "_new_withdawor", type: "address" }],
40
+ name: "changeWithdrawor",
41
+ outputs: [],
42
+ stateMutability: "nonpayable",
43
+ type: "function",
44
+ },
45
+ {
46
+ inputs: [],
47
+ name: "config",
48
+ outputs: [
49
+ { internalType: "address", name: "admin", type: "address" },
50
+ { internalType: "uint256", name: "streamflow_fees", type: "uint256" },
51
+ { internalType: "address payable", name: "treasury", type: "address" },
52
+ { internalType: "address payable", name: "withdrawor", type: "address" },
53
+ { internalType: "uint256", name: "tx_fee", type: "uint256" },
54
+ ],
55
+ stateMutability: "view",
56
+ type: "function",
57
+ },
58
+ {
59
+ inputs: [
60
+ { internalType: "contract IERC20", name: "_token", type: "address" },
61
+ { internalType: "uint256", name: "_amount", type: "uint256" },
62
+ { internalType: "uint256", name: "_period", type: "uint256" },
63
+ { internalType: "uint256", name: "_amount_per_period", type: "uint256" },
64
+ { internalType: "uint256", name: "_start", type: "uint256" },
65
+ { internalType: "uint256", name: "_cliff_amount", type: "uint256" },
66
+ {
67
+ components: [
68
+ { internalType: "bool", name: "cancelable_by_sender", type: "bool" },
69
+ { internalType: "bool", name: "cancelable_by_recipient", type: "bool" },
70
+ { internalType: "bool", name: "transferable_by_sender", type: "bool" },
71
+ { internalType: "bool", name: "transferable_by_recipient", type: "bool" },
72
+ { internalType: "bool", name: "can_topup", type: "bool" },
73
+ { internalType: "bool", name: "pausable", type: "bool" },
74
+ { internalType: "bool", name: "can_update_rate", type: "bool" },
75
+ { internalType: "bool", name: "automatic_withdrawal", type: "bool" },
76
+ { internalType: "uint256", name: "withdrawal_frequency", type: "uint256" },
77
+ { internalType: "string", name: "contract_name", type: "string" },
78
+ ],
79
+ internalType: "struct ContractMeta",
80
+ name: "_meta",
81
+ type: "tuple",
82
+ },
83
+ { internalType: "address", name: "_recipient", type: "address" },
84
+ ],
85
+ name: "create",
86
+ outputs: [],
87
+ stateMutability: "payable",
88
+ type: "function",
89
+ },
90
+ {
91
+ inputs: [{ internalType: "address", name: "_address", type: "address" }],
92
+ name: "feesRemove",
93
+ outputs: [],
94
+ stateMutability: "nonpayable",
95
+ type: "function",
96
+ },
97
+ {
98
+ inputs: [
99
+ { internalType: "address", name: "_address", type: "address" },
100
+ { internalType: "uint256", name: "fees", type: "uint256" },
101
+ ],
102
+ name: "feesWrite",
103
+ outputs: [],
104
+ stateMutability: "nonpayable",
105
+ type: "function",
106
+ },
107
+ {
108
+ inputs: [],
109
+ name: "getAdmin",
110
+ outputs: [{ internalType: "address", name: "", type: "address" }],
111
+ stateMutability: "view",
112
+ type: "function",
113
+ },
114
+ {
115
+ inputs: [],
116
+ name: "getAll",
117
+ outputs: [
118
+ { internalType: "address[]", name: "", type: "address[]" },
119
+ {
120
+ components: [
121
+ { internalType: "contract IERC20", name: "token", type: "address" },
122
+ {
123
+ components: [
124
+ { internalType: "bool", name: "cancelable_by_sender", type: "bool" },
125
+ { internalType: "bool", name: "cancelable_by_recipient", type: "bool" },
126
+ { internalType: "bool", name: "transferable_by_sender", type: "bool" },
127
+ { internalType: "bool", name: "transferable_by_recipient", type: "bool" },
128
+ { internalType: "bool", name: "can_topup", type: "bool" },
129
+ { internalType: "bool", name: "pausable", type: "bool" },
130
+ { internalType: "bool", name: "can_update_rate", type: "bool" },
131
+ { internalType: "bool", name: "automatic_withdrawal", type: "bool" },
132
+ { internalType: "uint256", name: "withdrawal_frequency", type: "uint256" },
133
+ { internalType: "string", name: "contract_name", type: "string" },
134
+ ],
135
+ internalType: "struct ContractMeta",
136
+ name: "meta",
137
+ type: "tuple",
138
+ },
139
+ { internalType: "uint256", name: "amount", type: "uint256" },
140
+ { internalType: "uint256", name: "period", type: "uint256" },
141
+ { internalType: "uint256", name: "amount_per_period", type: "uint256" },
142
+ { internalType: "uint256", name: "start", type: "uint256" },
143
+ { internalType: "uint256", name: "end", type: "uint256" },
144
+ { internalType: "uint256", name: "cliff_amount", type: "uint256" },
145
+ { internalType: "uint256", name: "withdrawn", type: "uint256" },
146
+ { internalType: "uint256", name: "last_withdrawn_at", type: "uint256" },
147
+ { internalType: "uint256", name: "created", type: "uint256" },
148
+ { internalType: "uint256", name: "canceled_at", type: "uint256" },
149
+ { internalType: "address", name: "recipient", type: "address" },
150
+ { internalType: "address", name: "sender", type: "address" },
151
+ {
152
+ components: [
153
+ { internalType: "uint256", name: "streamflow_fee_percentage", type: "uint256" },
154
+ { internalType: "uint256", name: "streamflow_fee", type: "uint256" },
155
+ { internalType: "uint256", name: "streamflow_fee_withdrawn", type: "uint256" },
156
+ { internalType: "uint256", name: "tx_fee", type: "uint256" },
157
+ ],
158
+ internalType: "struct FeesData",
159
+ name: "fees",
160
+ type: "tuple",
161
+ },
162
+ { internalType: "bool", name: "closed", type: "bool" },
163
+ { internalType: "uint256", name: "current_pause_start", type: "uint256" },
164
+ { internalType: "uint256", name: "pause_cumulative", type: "uint256" },
165
+ { internalType: "uint256", name: "last_rate_change_time", type: "uint256" },
166
+ { internalType: "uint256", name: "funds_unlocked_at_last_rate_change", type: "uint256" },
167
+ ],
168
+ internalType: "struct Contract[]",
169
+ name: "",
170
+ type: "tuple[]",
171
+ },
172
+ ],
173
+ stateMutability: "view",
174
+ type: "function",
175
+ },
176
+ {
177
+ inputs: [{ internalType: "address", name: "_id", type: "address" }],
178
+ name: "getById",
179
+ outputs: [
180
+ {
181
+ components: [
182
+ { internalType: "contract IERC20", name: "token", type: "address" },
183
+ {
184
+ components: [
185
+ { internalType: "bool", name: "cancelable_by_sender", type: "bool" },
186
+ { internalType: "bool", name: "cancelable_by_recipient", type: "bool" },
187
+ { internalType: "bool", name: "transferable_by_sender", type: "bool" },
188
+ { internalType: "bool", name: "transferable_by_recipient", type: "bool" },
189
+ { internalType: "bool", name: "can_topup", type: "bool" },
190
+ { internalType: "bool", name: "pausable", type: "bool" },
191
+ { internalType: "bool", name: "can_update_rate", type: "bool" },
192
+ { internalType: "bool", name: "automatic_withdrawal", type: "bool" },
193
+ { internalType: "uint256", name: "withdrawal_frequency", type: "uint256" },
194
+ { internalType: "string", name: "contract_name", type: "string" },
195
+ ],
196
+ internalType: "struct ContractMeta",
197
+ name: "meta",
198
+ type: "tuple",
199
+ },
200
+ { internalType: "uint256", name: "amount", type: "uint256" },
201
+ { internalType: "uint256", name: "period", type: "uint256" },
202
+ { internalType: "uint256", name: "amount_per_period", type: "uint256" },
203
+ { internalType: "uint256", name: "start", type: "uint256" },
204
+ { internalType: "uint256", name: "end", type: "uint256" },
205
+ { internalType: "uint256", name: "cliff_amount", type: "uint256" },
206
+ { internalType: "uint256", name: "withdrawn", type: "uint256" },
207
+ { internalType: "uint256", name: "last_withdrawn_at", type: "uint256" },
208
+ { internalType: "uint256", name: "created", type: "uint256" },
209
+ { internalType: "uint256", name: "canceled_at", type: "uint256" },
210
+ { internalType: "address", name: "recipient", type: "address" },
211
+ { internalType: "address", name: "sender", type: "address" },
212
+ {
213
+ components: [
214
+ { internalType: "uint256", name: "streamflow_fee_percentage", type: "uint256" },
215
+ { internalType: "uint256", name: "streamflow_fee", type: "uint256" },
216
+ { internalType: "uint256", name: "streamflow_fee_withdrawn", type: "uint256" },
217
+ { internalType: "uint256", name: "tx_fee", type: "uint256" },
218
+ ],
219
+ internalType: "struct FeesData",
220
+ name: "fees",
221
+ type: "tuple",
222
+ },
223
+ { internalType: "bool", name: "closed", type: "bool" },
224
+ { internalType: "uint256", name: "current_pause_start", type: "uint256" },
225
+ { internalType: "uint256", name: "pause_cumulative", type: "uint256" },
226
+ { internalType: "uint256", name: "last_rate_change_time", type: "uint256" },
227
+ { internalType: "uint256", name: "funds_unlocked_at_last_rate_change", type: "uint256" },
228
+ ],
229
+ internalType: "struct Contract",
230
+ name: "",
231
+ type: "tuple",
232
+ },
233
+ ],
234
+ stateMutability: "view",
235
+ type: "function",
236
+ },
237
+ {
238
+ inputs: [{ internalType: "address", name: "_recipient", type: "address" }],
239
+ name: "getByRecipient",
240
+ outputs: [{ internalType: "address[]", name: "", type: "address[]" }],
241
+ stateMutability: "view",
242
+ type: "function",
243
+ },
244
+ {
245
+ inputs: [{ internalType: "address", name: "_sender", type: "address" }],
246
+ name: "getBySender",
247
+ outputs: [{ internalType: "address[]", name: "", type: "address[]" }],
248
+ stateMutability: "view",
249
+ type: "function",
250
+ },
251
+ {
252
+ inputs: [{ internalType: "address", name: "_address", type: "address" }],
253
+ name: "getFees",
254
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
255
+ stateMutability: "view",
256
+ type: "function",
257
+ },
258
+ {
259
+ inputs: [{ internalType: "address[]", name: "_ids", type: "address[]" }],
260
+ name: "getMultiple",
261
+ outputs: [
262
+ {
263
+ components: [
264
+ { internalType: "contract IERC20", name: "token", type: "address" },
265
+ {
266
+ components: [
267
+ { internalType: "bool", name: "cancelable_by_sender", type: "bool" },
268
+ { internalType: "bool", name: "cancelable_by_recipient", type: "bool" },
269
+ { internalType: "bool", name: "transferable_by_sender", type: "bool" },
270
+ { internalType: "bool", name: "transferable_by_recipient", type: "bool" },
271
+ { internalType: "bool", name: "can_topup", type: "bool" },
272
+ { internalType: "bool", name: "pausable", type: "bool" },
273
+ { internalType: "bool", name: "can_update_rate", type: "bool" },
274
+ { internalType: "bool", name: "automatic_withdrawal", type: "bool" },
275
+ { internalType: "uint256", name: "withdrawal_frequency", type: "uint256" },
276
+ { internalType: "string", name: "contract_name", type: "string" },
277
+ ],
278
+ internalType: "struct ContractMeta",
279
+ name: "meta",
280
+ type: "tuple",
281
+ },
282
+ { internalType: "uint256", name: "amount", type: "uint256" },
283
+ { internalType: "uint256", name: "period", type: "uint256" },
284
+ { internalType: "uint256", name: "amount_per_period", type: "uint256" },
285
+ { internalType: "uint256", name: "start", type: "uint256" },
286
+ { internalType: "uint256", name: "end", type: "uint256" },
287
+ { internalType: "uint256", name: "cliff_amount", type: "uint256" },
288
+ { internalType: "uint256", name: "withdrawn", type: "uint256" },
289
+ { internalType: "uint256", name: "last_withdrawn_at", type: "uint256" },
290
+ { internalType: "uint256", name: "created", type: "uint256" },
291
+ { internalType: "uint256", name: "canceled_at", type: "uint256" },
292
+ { internalType: "address", name: "recipient", type: "address" },
293
+ { internalType: "address", name: "sender", type: "address" },
294
+ {
295
+ components: [
296
+ { internalType: "uint256", name: "streamflow_fee_percentage", type: "uint256" },
297
+ { internalType: "uint256", name: "streamflow_fee", type: "uint256" },
298
+ { internalType: "uint256", name: "streamflow_fee_withdrawn", type: "uint256" },
299
+ { internalType: "uint256", name: "tx_fee", type: "uint256" },
300
+ ],
301
+ internalType: "struct FeesData",
302
+ name: "fees",
303
+ type: "tuple",
304
+ },
305
+ { internalType: "bool", name: "closed", type: "bool" },
306
+ { internalType: "uint256", name: "current_pause_start", type: "uint256" },
307
+ { internalType: "uint256", name: "pause_cumulative", type: "uint256" },
308
+ { internalType: "uint256", name: "last_rate_change_time", type: "uint256" },
309
+ { internalType: "uint256", name: "funds_unlocked_at_last_rate_change", type: "uint256" },
310
+ ],
311
+ internalType: "struct Contract[]",
312
+ name: "",
313
+ type: "tuple[]",
314
+ },
315
+ ],
316
+ stateMutability: "view",
317
+ type: "function",
318
+ },
319
+ {
320
+ inputs: [],
321
+ name: "getStreamflowFees",
322
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
323
+ stateMutability: "view",
324
+ type: "function",
325
+ },
326
+ {
327
+ inputs: [
328
+ { internalType: "address", name: "_stream_id", type: "address" },
329
+ { internalType: "uint256", name: "_amount", type: "uint256" },
330
+ ],
331
+ name: "getTopUpWithdrawalFees",
332
+ outputs: [
333
+ {
334
+ components: [
335
+ { internalType: "uint256", name: "value", type: "uint256" },
336
+ { internalType: "uint256", name: "tx_fee", type: "uint256" },
337
+ ],
338
+ internalType: "struct WithdrawalFeesData",
339
+ name: "",
340
+ type: "tuple",
341
+ },
342
+ ],
343
+ stateMutability: "view",
344
+ type: "function",
345
+ },
346
+ {
347
+ inputs: [],
348
+ name: "getTreasuryAddress",
349
+ outputs: [{ internalType: "address payable", name: "", type: "address" }],
350
+ stateMutability: "view",
351
+ type: "function",
352
+ },
353
+ {
354
+ inputs: [],
355
+ name: "getTxFee",
356
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
357
+ stateMutability: "view",
358
+ type: "function",
359
+ },
360
+ {
361
+ inputs: [
362
+ { internalType: "uint256", name: "_amount", type: "uint256" },
363
+ { internalType: "uint256", name: "_period", type: "uint256" },
364
+ { internalType: "uint256", name: "_amount_per_period", type: "uint256" },
365
+ { internalType: "uint256", name: "_start", type: "uint256" },
366
+ { internalType: "uint256", name: "_cliff_amount", type: "uint256" },
367
+ { internalType: "bool", name: "_automatic_withdrawal", type: "bool" },
368
+ { internalType: "uint256", name: "_withdrawal_frequency", type: "uint256" },
369
+ ],
370
+ name: "getWithdrawalFees",
371
+ outputs: [
372
+ {
373
+ components: [
374
+ { internalType: "uint256", name: "value", type: "uint256" },
375
+ { internalType: "uint256", name: "tx_fee", type: "uint256" },
376
+ ],
377
+ internalType: "struct WithdrawalFeesData",
378
+ name: "",
379
+ type: "tuple",
380
+ },
381
+ ],
382
+ stateMutability: "view",
383
+ type: "function",
384
+ },
385
+ {
386
+ inputs: [],
387
+ name: "getWithdraworAddress",
388
+ outputs: [{ internalType: "address payable", name: "", type: "address" }],
389
+ stateMutability: "view",
390
+ type: "function",
391
+ },
392
+ { inputs: [], name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function" },
393
+ {
394
+ inputs: [
395
+ { internalType: "address", name: "_stream_id", type: "address" },
396
+ { internalType: "uint256", name: "_amount", type: "uint256" },
397
+ ],
398
+ name: "topUp",
399
+ outputs: [],
400
+ stateMutability: "payable",
401
+ type: "function",
402
+ },
403
+ {
404
+ inputs: [
405
+ { internalType: "address", name: "_stream_id", type: "address" },
406
+ { internalType: "address", name: "new_recipient", type: "address" },
407
+ ],
408
+ name: "transfer",
409
+ outputs: [],
410
+ stateMutability: "nonpayable",
411
+ type: "function",
412
+ },
413
+ {
414
+ inputs: [{ internalType: "address", name: "_new_admin", type: "address" }],
415
+ name: "transferAdmin",
416
+ outputs: [],
417
+ stateMutability: "nonpayable",
418
+ type: "function",
419
+ },
420
+ {
421
+ inputs: [
422
+ { internalType: "address", name: "_stream_id", type: "address" },
423
+ { internalType: "bool[]", name: "_automatic_withdrawal", type: "bool[]" },
424
+ { internalType: "uint256[]", name: "_withdrawal_frequency", type: "uint256[]" },
425
+ { internalType: "uint256[]", name: "_amount_per_period", type: "uint256[]" },
426
+ ],
427
+ name: "update",
428
+ outputs: [],
429
+ stateMutability: "payable",
430
+ type: "function",
431
+ },
432
+ {
433
+ inputs: [
434
+ { internalType: "address", name: "_stream_id", type: "address" },
435
+ { internalType: "uint256", name: "_amount", type: "uint256" },
436
+ ],
437
+ name: "withdraw",
438
+ outputs: [],
439
+ stateMutability: "nonpayable",
440
+ type: "function",
441
+ },
442
+ ];
@@ -0,0 +1,3 @@
1
+ import { ICluster } from "../common/types";
2
+ export declare const ETHERIUM_PROGRAM_IDS: Record<ICluster, string>;
3
+ export declare const BSC_PROGRAM_IDS: Record<ICluster, string>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var _a, _b;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.BSC_PROGRAM_IDS = exports.ETHERIUM_PROGRAM_IDS = void 0;
5
+ var types_1 = require("../common/types");
6
+ exports.ETHERIUM_PROGRAM_IDS = (_a = {},
7
+ _a[types_1.ICluster.Mainnet] = "0x35fC2D13D97c13d6697Dc273fEDF93eBC92B7743",
8
+ _a[types_1.ICluster.Devnet] = "0x35fC2D13D97c13d6697Dc273fEDF93eBC92B7743",
9
+ _a[types_1.ICluster.Testnet] = "0x35fC2D13D97c13d6697Dc273fEDF93eBC92B7743",
10
+ _a[types_1.ICluster.Local] = "0x35fC2D13D97c13d6697Dc273fEDF93eBC92B7743",
11
+ _a);
12
+ exports.BSC_PROGRAM_IDS = (_b = {},
13
+ _b[types_1.ICluster.Mainnet] = "0xb09702834cba4c4BDb03CC7F0Fef48490a44BB50",
14
+ _b[types_1.ICluster.Devnet] = "0xb09702834cba4c4BDb03CC7F0Fef48490a44BB50",
15
+ _b[types_1.ICluster.Testnet] = "0xb09702834cba4c4BDb03CC7F0Fef48490a44BB50",
16
+ _b[types_1.ICluster.Local] = "0xb09702834cba4c4BDb03CC7F0Fef48490a44BB50",
17
+ _b);
@@ -0,0 +1,39 @@
1
+ declare const _default: ({
2
+ constant: boolean;
3
+ inputs: {
4
+ name: string;
5
+ type: string;
6
+ }[];
7
+ name: string;
8
+ outputs: {
9
+ name: string;
10
+ type: string;
11
+ }[];
12
+ payable: boolean;
13
+ stateMutability: string;
14
+ type: string;
15
+ anonymous?: undefined;
16
+ } | {
17
+ payable: boolean;
18
+ stateMutability: string;
19
+ type: string;
20
+ constant?: undefined;
21
+ inputs?: undefined;
22
+ name?: undefined;
23
+ outputs?: undefined;
24
+ anonymous?: undefined;
25
+ } | {
26
+ anonymous: boolean;
27
+ inputs: {
28
+ indexed: boolean;
29
+ name: string;
30
+ type: string;
31
+ }[];
32
+ name: string;
33
+ type: string;
34
+ constant?: undefined;
35
+ outputs?: undefined;
36
+ payable?: undefined;
37
+ stateMutability?: undefined;
38
+ })[];
39
+ export default _default;