@streamflow/stream 4.0.3 → 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.
- package/dist/__tests__/aptos/streamClient.spec.js +1 -1
- package/dist/aptos/StreamClient.d.ts +4 -3
- package/dist/aptos/StreamClient.js +13 -6
- package/dist/aptos/types.d.ts +0 -16
- package/dist/common/BaseStreamClient.d.ts +11 -9
- package/dist/common/GenericStreamClient.d.ts +25 -12
- package/dist/common/GenericStreamClient.js +18 -5
- package/dist/common/types.d.ts +29 -1
- package/dist/common/types.js +2 -0
- package/dist/common/utils.js +6 -3
- package/dist/evm/StreamClient.d.ts +27 -0
- package/dist/evm/StreamClient.js +376 -0
- package/dist/evm/abi.d.ts +111 -0
- package/dist/evm/abi.js +442 -0
- package/dist/evm/constants.d.ts +3 -0
- package/dist/evm/constants.js +17 -0
- package/dist/evm/ercAbi.d.ts +39 -0
- package/dist/evm/ercAbi.js +224 -0
- package/dist/evm/index.d.ts +2 -0
- package/dist/evm/index.js +24 -0
- package/dist/evm/types.d.ts +122 -0
- package/dist/evm/types.js +64 -0
- package/dist/solana/StreamClient.d.ts +11 -11
- package/dist/solana/StreamClient.js +20 -18
- package/package.json +2 -1
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
38
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
39
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
40
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
41
|
+
function step(op) {
|
|
42
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
43
|
+
while (_) try {
|
|
44
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
45
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
46
|
+
switch (op[0]) {
|
|
47
|
+
case 0: case 1: t = op; break;
|
|
48
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
49
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
50
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
51
|
+
default:
|
|
52
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
53
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
54
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
55
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
56
|
+
if (t[2]) _.ops.pop();
|
|
57
|
+
_.trys.pop(); continue;
|
|
58
|
+
}
|
|
59
|
+
op = body.call(thisArg, _);
|
|
60
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
61
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
65
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
66
|
+
if (!m) return o;
|
|
67
|
+
var i = m.call(o), r, ar = [], e;
|
|
68
|
+
try {
|
|
69
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
70
|
+
}
|
|
71
|
+
catch (error) { e = { error: error }; }
|
|
72
|
+
finally {
|
|
73
|
+
try {
|
|
74
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
75
|
+
}
|
|
76
|
+
finally { if (e) throw e.error; }
|
|
77
|
+
}
|
|
78
|
+
return ar;
|
|
79
|
+
};
|
|
80
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
81
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
82
|
+
if (ar || !(i in from)) {
|
|
83
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
84
|
+
ar[i] = from[i];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
88
|
+
};
|
|
89
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
90
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
91
|
+
};
|
|
92
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
93
|
+
var ethers_1 = require("ethers");
|
|
94
|
+
var bn_js_1 = require("bn.js");
|
|
95
|
+
var BaseStreamClient_1 = require("../common/BaseStreamClient");
|
|
96
|
+
var types_1 = require("../common/types");
|
|
97
|
+
var constants_1 = require("./constants");
|
|
98
|
+
var abi_1 = __importDefault(require("./abi"));
|
|
99
|
+
var ercAbi_1 = __importDefault(require("./ercAbi"));
|
|
100
|
+
var constants_2 = require("../solana/constants");
|
|
101
|
+
var types_2 = require("./types");
|
|
102
|
+
var EvmStreamClient = /** @class */ (function (_super) {
|
|
103
|
+
__extends(EvmStreamClient, _super);
|
|
104
|
+
function EvmStreamClient(clusterUrl, chain, signer, cluster, programId) {
|
|
105
|
+
if (cluster === void 0) { cluster = types_1.ICluster.Mainnet; }
|
|
106
|
+
var _this = _super.call(this) || this;
|
|
107
|
+
if (chain !== types_1.IChain.Etherium && chain !== types_1.IChain.BSC) {
|
|
108
|
+
throw new Error("Wrong chain. Supported chains are Etherium and BSC");
|
|
109
|
+
}
|
|
110
|
+
if (programId) {
|
|
111
|
+
_this.programId = programId;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
_this.programId =
|
|
115
|
+
chain === types_1.IChain.Etherium ? constants_1.ETHERIUM_PROGRAM_IDS[cluster] : constants_1.BSC_PROGRAM_IDS[cluster];
|
|
116
|
+
}
|
|
117
|
+
_this.provider = new ethers_1.ethers.providers.JsonRpcProvider(clusterUrl);
|
|
118
|
+
_this.signer = signer;
|
|
119
|
+
var baseContract = new ethers_1.ethers.Contract(_this.programId, abi_1.default);
|
|
120
|
+
_this.readContract = baseContract.connect(_this.provider);
|
|
121
|
+
_this.writeContract = baseContract.connect(_this.signer);
|
|
122
|
+
return _this;
|
|
123
|
+
}
|
|
124
|
+
EvmStreamClient.prototype.create = function (streamData) {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
126
|
+
var multiParams, fees, args, sum, tokenContract, approvalTx, result;
|
|
127
|
+
var _a, _b;
|
|
128
|
+
return __generator(this, function (_c) {
|
|
129
|
+
switch (_c.label) {
|
|
130
|
+
case 0:
|
|
131
|
+
multiParams = __assign(__assign({}, streamData), { recipients: [streamData] });
|
|
132
|
+
return [4 /*yield*/, (_a = this.readContract).getWithdrawalFees.apply(_a, __spreadArray([], __read(this.getFeeParams(multiParams)), false))];
|
|
133
|
+
case 1:
|
|
134
|
+
fees = _c.sent();
|
|
135
|
+
args = this.generateMultiPayloads(multiParams)[0];
|
|
136
|
+
sum = streamData.amount.mul(new bn_js_1.BN(constants_2.BASE_FEE)).div(new bn_js_1.BN(1000000));
|
|
137
|
+
tokenContract = new ethers_1.ethers.Contract(streamData.tokenId, ercAbi_1.default, this.signer);
|
|
138
|
+
return [4 /*yield*/, tokenContract.approve(this.programId, sum.toString())];
|
|
139
|
+
case 2:
|
|
140
|
+
approvalTx = _c.sent();
|
|
141
|
+
return [4 /*yield*/, approvalTx.wait()];
|
|
142
|
+
case 3:
|
|
143
|
+
_c.sent();
|
|
144
|
+
return [4 /*yield*/, (_b = this.writeContract).create.apply(_b, __spreadArray(__spreadArray([], __read(args), false), [{ value: fees.value }], false))];
|
|
145
|
+
case 4:
|
|
146
|
+
result = _c.sent();
|
|
147
|
+
return [2 /*return*/, {
|
|
148
|
+
ixs: [],
|
|
149
|
+
txId: result.hash,
|
|
150
|
+
metadataId: result.hash,
|
|
151
|
+
}];
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
EvmStreamClient.prototype.createMultiple = function (multipleStreamData) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
158
|
+
var fees, args, sum, tokenContract, approvalTx, creationPromises, signatures, errors, results, successes, failures;
|
|
159
|
+
var _a;
|
|
160
|
+
var _this = this;
|
|
161
|
+
return __generator(this, function (_b) {
|
|
162
|
+
switch (_b.label) {
|
|
163
|
+
case 0: return [4 /*yield*/, (_a = this.readContract).getWithdrawalFees.apply(_a, __spreadArray([], __read(this.getFeeParams(multipleStreamData)), false))];
|
|
164
|
+
case 1:
|
|
165
|
+
fees = _b.sent();
|
|
166
|
+
args = this.generateMultiPayloads(multipleStreamData);
|
|
167
|
+
sum = multipleStreamData.recipients
|
|
168
|
+
.reduce(function (acc, v) { return acc.add(v.amount); }, new bn_js_1.BN(0))
|
|
169
|
+
.mul(new bn_js_1.BN(constants_2.BASE_FEE))
|
|
170
|
+
.div(new bn_js_1.BN(1000000));
|
|
171
|
+
tokenContract = new ethers_1.ethers.Contract(multipleStreamData.tokenId, ercAbi_1.default, this.signer);
|
|
172
|
+
return [4 /*yield*/, tokenContract.approve(this.programId, sum.toString())];
|
|
173
|
+
case 2:
|
|
174
|
+
approvalTx = _b.sent();
|
|
175
|
+
return [4 /*yield*/, approvalTx.wait()];
|
|
176
|
+
case 3:
|
|
177
|
+
_b.sent();
|
|
178
|
+
creationPromises = args.map(function (item) {
|
|
179
|
+
var _a;
|
|
180
|
+
return (_a = _this.writeContract).create.apply(_a, __spreadArray(__spreadArray([], __read(item), false), [{ value: fees.value }], false));
|
|
181
|
+
});
|
|
182
|
+
signatures = [];
|
|
183
|
+
errors = [];
|
|
184
|
+
return [4 /*yield*/, Promise.allSettled(creationPromises)];
|
|
185
|
+
case 4:
|
|
186
|
+
results = _b.sent();
|
|
187
|
+
successes = results
|
|
188
|
+
.filter(function (el) { return el.status === "fulfilled"; })
|
|
189
|
+
.map(function (el) { return el.value; });
|
|
190
|
+
signatures.push.apply(signatures, __spreadArray([], __read(successes.map(function (el) { return el.hash; })), false));
|
|
191
|
+
failures = results
|
|
192
|
+
.filter(function (el) { return el.status === "rejected"; })
|
|
193
|
+
.map(function (el) { return el.reason; });
|
|
194
|
+
errors.push.apply(errors, __spreadArray([], __read(failures), false));
|
|
195
|
+
return [2 /*return*/, {
|
|
196
|
+
txs: signatures,
|
|
197
|
+
metadatas: [],
|
|
198
|
+
metadataToRecipient: {},
|
|
199
|
+
errors: errors,
|
|
200
|
+
}];
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
};
|
|
205
|
+
EvmStreamClient.prototype.withdraw = function (withdrawData) {
|
|
206
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
207
|
+
var result;
|
|
208
|
+
return __generator(this, function (_a) {
|
|
209
|
+
switch (_a.label) {
|
|
210
|
+
case 0: return [4 /*yield*/, this.writeContract.withdraw(withdrawData.id, withdrawData.amount.toString())];
|
|
211
|
+
case 1:
|
|
212
|
+
result = _a.sent();
|
|
213
|
+
return [2 /*return*/, {
|
|
214
|
+
ixs: [],
|
|
215
|
+
txId: result.hash,
|
|
216
|
+
}];
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
EvmStreamClient.prototype.cancel = function (cancelData) {
|
|
222
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
223
|
+
var result;
|
|
224
|
+
return __generator(this, function (_a) {
|
|
225
|
+
switch (_a.label) {
|
|
226
|
+
case 0: return [4 /*yield*/, this.writeContract.cancel(cancelData.id)];
|
|
227
|
+
case 1:
|
|
228
|
+
result = _a.sent();
|
|
229
|
+
return [2 /*return*/, {
|
|
230
|
+
ixs: [],
|
|
231
|
+
txId: result.hash,
|
|
232
|
+
}];
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
EvmStreamClient.prototype.transfer = function (transferData) {
|
|
238
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
239
|
+
var result;
|
|
240
|
+
return __generator(this, function (_a) {
|
|
241
|
+
switch (_a.label) {
|
|
242
|
+
case 0: return [4 /*yield*/, this.writeContract.cancel(transferData.id, transferData.newRecipient)];
|
|
243
|
+
case 1:
|
|
244
|
+
result = _a.sent();
|
|
245
|
+
return [2 /*return*/, {
|
|
246
|
+
ixs: [],
|
|
247
|
+
txId: result.hash,
|
|
248
|
+
}];
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
};
|
|
253
|
+
EvmStreamClient.prototype.topup = function (topupData) {
|
|
254
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
255
|
+
var fees, result;
|
|
256
|
+
return __generator(this, function (_a) {
|
|
257
|
+
switch (_a.label) {
|
|
258
|
+
case 0: return [4 /*yield*/, this.readContract.getTopUpWithdrawalFees(topupData.id, topupData.amount.toString())];
|
|
259
|
+
case 1:
|
|
260
|
+
fees = _a.sent();
|
|
261
|
+
return [4 /*yield*/, this.writeContract.create(topupData.id, topupData.amount.toString(), {
|
|
262
|
+
value: fees.value,
|
|
263
|
+
})];
|
|
264
|
+
case 2:
|
|
265
|
+
result = _a.sent();
|
|
266
|
+
return [2 /*return*/, {
|
|
267
|
+
ixs: [],
|
|
268
|
+
txId: result.hash,
|
|
269
|
+
}];
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
};
|
|
274
|
+
EvmStreamClient.prototype.update = function (updateData) {
|
|
275
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
276
|
+
return __generator(this, function (_a) {
|
|
277
|
+
console.log(updateData);
|
|
278
|
+
throw new Error("Not Implemented!");
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
};
|
|
282
|
+
EvmStreamClient.prototype.getOne = function (_a) {
|
|
283
|
+
var id = _a.id;
|
|
284
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
285
|
+
var result;
|
|
286
|
+
return __generator(this, function (_b) {
|
|
287
|
+
switch (_b.label) {
|
|
288
|
+
case 0: return [4 /*yield*/, this.readContract.getById(id)];
|
|
289
|
+
case 1:
|
|
290
|
+
result = _b.sent();
|
|
291
|
+
throw new types_2.EvmContract(result);
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
};
|
|
296
|
+
EvmStreamClient.prototype.get = function (_a) {
|
|
297
|
+
var address = _a.address,
|
|
298
|
+
// type = StreamType.All,
|
|
299
|
+
_b = _a.direction,
|
|
300
|
+
// type = StreamType.All,
|
|
301
|
+
direction = _b === void 0 ? types_1.StreamDirection.All : _b;
|
|
302
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
303
|
+
var addresses, senderAddresses, recipientAddresses, uniqueAddresses, results;
|
|
304
|
+
return __generator(this, function (_c) {
|
|
305
|
+
switch (_c.label) {
|
|
306
|
+
case 0:
|
|
307
|
+
addresses = [];
|
|
308
|
+
if (!(direction === types_1.StreamDirection.All || direction === types_1.StreamDirection.Outgoing)) return [3 /*break*/, 2];
|
|
309
|
+
return [4 /*yield*/, this.readContract.getBySender(address)];
|
|
310
|
+
case 1:
|
|
311
|
+
senderAddresses = _c.sent();
|
|
312
|
+
addresses.push.apply(addresses, __spreadArray([], __read(senderAddresses), false));
|
|
313
|
+
_c.label = 2;
|
|
314
|
+
case 2:
|
|
315
|
+
if (!(direction === types_1.StreamDirection.All || direction === types_1.StreamDirection.Incoming)) return [3 /*break*/, 4];
|
|
316
|
+
return [4 /*yield*/, this.readContract.getByRecipient(address)];
|
|
317
|
+
case 3:
|
|
318
|
+
recipientAddresses = _c.sent();
|
|
319
|
+
addresses.push.apply(addresses, __spreadArray([], __read(recipientAddresses), false));
|
|
320
|
+
_c.label = 4;
|
|
321
|
+
case 4:
|
|
322
|
+
uniqueAddresses = __spreadArray([], __read(new Set(addresses)), false);
|
|
323
|
+
return [4 /*yield*/, this.readContract.getMultiple(uniqueAddresses)];
|
|
324
|
+
case 5:
|
|
325
|
+
results = _c.sent();
|
|
326
|
+
return [2 /*return*/, results.map(function (result, index) { return [uniqueAddresses[index], new types_2.EvmContract(result)]; })];
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
});
|
|
330
|
+
};
|
|
331
|
+
/**
|
|
332
|
+
* Returns StreamClient protocol program ID.
|
|
333
|
+
*/
|
|
334
|
+
EvmStreamClient.prototype.getProgramId = function () {
|
|
335
|
+
return this.programId;
|
|
336
|
+
};
|
|
337
|
+
// Utility function to prepare transaction payloads for multiple recipients.
|
|
338
|
+
EvmStreamClient.prototype.generateMultiPayloads = function (multipleStreamData) {
|
|
339
|
+
return multipleStreamData.recipients.map(function (recipient) {
|
|
340
|
+
return [
|
|
341
|
+
multipleStreamData.tokenId,
|
|
342
|
+
recipient.amount.toString(),
|
|
343
|
+
multipleStreamData.period,
|
|
344
|
+
recipient.amountPerPeriod.toString(),
|
|
345
|
+
multipleStreamData.start,
|
|
346
|
+
recipient.cliffAmount.toString(),
|
|
347
|
+
[
|
|
348
|
+
multipleStreamData.cancelableBySender,
|
|
349
|
+
multipleStreamData.cancelableByRecipient,
|
|
350
|
+
multipleStreamData.transferableBySender,
|
|
351
|
+
multipleStreamData.transferableByRecipient,
|
|
352
|
+
multipleStreamData.canTopup,
|
|
353
|
+
multipleStreamData.canPause || false,
|
|
354
|
+
multipleStreamData.canUpdateRate || false,
|
|
355
|
+
multipleStreamData.automaticWithdrawal || false,
|
|
356
|
+
multipleStreamData.withdrawalFrequency || 0,
|
|
357
|
+
recipient.name,
|
|
358
|
+
],
|
|
359
|
+
recipient.recipient,
|
|
360
|
+
];
|
|
361
|
+
});
|
|
362
|
+
};
|
|
363
|
+
EvmStreamClient.prototype.getFeeParams = function (multipleStreamData) {
|
|
364
|
+
return [
|
|
365
|
+
multipleStreamData.recipients[0].amount.toString(),
|
|
366
|
+
multipleStreamData.period,
|
|
367
|
+
multipleStreamData.recipients[0].amountPerPeriod.toString(),
|
|
368
|
+
multipleStreamData.start,
|
|
369
|
+
multipleStreamData.recipients[0].cliffAmount.toString(),
|
|
370
|
+
multipleStreamData.automaticWithdrawal || false,
|
|
371
|
+
multipleStreamData.withdrawalFrequency || 0,
|
|
372
|
+
];
|
|
373
|
+
};
|
|
374
|
+
return EvmStreamClient;
|
|
375
|
+
}(BaseStreamClient_1.BaseStreamClient));
|
|
376
|
+
exports.default = EvmStreamClient;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
declare const _default: ({
|
|
2
|
+
anonymous: boolean;
|
|
3
|
+
inputs: {
|
|
4
|
+
indexed: boolean;
|
|
5
|
+
internalType: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: string;
|
|
8
|
+
}[];
|
|
9
|
+
name: string;
|
|
10
|
+
type: string;
|
|
11
|
+
outputs?: undefined;
|
|
12
|
+
stateMutability?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
inputs: ({
|
|
15
|
+
internalType: string;
|
|
16
|
+
name: string;
|
|
17
|
+
type: string;
|
|
18
|
+
components?: undefined;
|
|
19
|
+
} | {
|
|
20
|
+
components: {
|
|
21
|
+
internalType: string;
|
|
22
|
+
name: string;
|
|
23
|
+
type: string;
|
|
24
|
+
}[];
|
|
25
|
+
internalType: string;
|
|
26
|
+
name: string;
|
|
27
|
+
type: string;
|
|
28
|
+
})[];
|
|
29
|
+
name: string;
|
|
30
|
+
outputs: never[];
|
|
31
|
+
stateMutability: string;
|
|
32
|
+
type: string;
|
|
33
|
+
anonymous?: undefined;
|
|
34
|
+
} | {
|
|
35
|
+
inputs: never[];
|
|
36
|
+
name: string;
|
|
37
|
+
outputs: ({
|
|
38
|
+
internalType: string;
|
|
39
|
+
name: string;
|
|
40
|
+
type: string;
|
|
41
|
+
components?: undefined;
|
|
42
|
+
} | {
|
|
43
|
+
components: ({
|
|
44
|
+
internalType: string;
|
|
45
|
+
name: string;
|
|
46
|
+
type: string;
|
|
47
|
+
components?: undefined;
|
|
48
|
+
} | {
|
|
49
|
+
components: {
|
|
50
|
+
internalType: string;
|
|
51
|
+
name: string;
|
|
52
|
+
type: string;
|
|
53
|
+
}[];
|
|
54
|
+
internalType: string;
|
|
55
|
+
name: string;
|
|
56
|
+
type: string;
|
|
57
|
+
})[];
|
|
58
|
+
internalType: string;
|
|
59
|
+
name: string;
|
|
60
|
+
type: string;
|
|
61
|
+
})[];
|
|
62
|
+
stateMutability: string;
|
|
63
|
+
type: string;
|
|
64
|
+
anonymous?: undefined;
|
|
65
|
+
} | {
|
|
66
|
+
inputs: {
|
|
67
|
+
internalType: string;
|
|
68
|
+
name: string;
|
|
69
|
+
type: string;
|
|
70
|
+
}[];
|
|
71
|
+
name: string;
|
|
72
|
+
outputs: {
|
|
73
|
+
components: ({
|
|
74
|
+
internalType: string;
|
|
75
|
+
name: string;
|
|
76
|
+
type: string;
|
|
77
|
+
components?: undefined;
|
|
78
|
+
} | {
|
|
79
|
+
components: {
|
|
80
|
+
internalType: string;
|
|
81
|
+
name: string;
|
|
82
|
+
type: string;
|
|
83
|
+
}[];
|
|
84
|
+
internalType: string;
|
|
85
|
+
name: string;
|
|
86
|
+
type: string;
|
|
87
|
+
})[];
|
|
88
|
+
internalType: string;
|
|
89
|
+
name: string;
|
|
90
|
+
type: string;
|
|
91
|
+
}[];
|
|
92
|
+
stateMutability: string;
|
|
93
|
+
type: string;
|
|
94
|
+
anonymous?: undefined;
|
|
95
|
+
} | {
|
|
96
|
+
inputs: {
|
|
97
|
+
internalType: string;
|
|
98
|
+
name: string;
|
|
99
|
+
type: string;
|
|
100
|
+
}[];
|
|
101
|
+
name: string;
|
|
102
|
+
outputs: {
|
|
103
|
+
internalType: string;
|
|
104
|
+
name: string;
|
|
105
|
+
type: string;
|
|
106
|
+
}[];
|
|
107
|
+
stateMutability: string;
|
|
108
|
+
type: string;
|
|
109
|
+
anonymous?: undefined;
|
|
110
|
+
})[];
|
|
111
|
+
export default _default;
|