@streamflow/stream 5.5.0 → 5.6.1
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/LICENSE +674 -0
- package/README.md +5 -6
- package/package.json +5 -5
- package/dist/__tests__/aptos/streamClient.spec.d.ts +0 -1
- package/dist/__tests__/aptos/streamClient.spec.js +0 -161
- package/dist/aptos/StreamClient.d.ts +0 -50
- package/dist/aptos/StreamClient.js +0 -383
- package/dist/aptos/constants.d.ts +0 -2
- package/dist/aptos/constants.js +0 -12
- package/dist/aptos/index.d.ts +0 -2
- package/dist/aptos/index.js +0 -24
- package/dist/aptos/types.d.ts +0 -97
- package/dist/aptos/types.js +0 -76
- package/dist/aptos/wallet.d.ts +0 -9
- package/dist/aptos/wallet.js +0 -83
- package/dist/common/BaseStreamClient.d.ts +0 -12
- package/dist/common/BaseStreamClient.js +0 -9
- package/dist/common/GenericStreamClient.d.ts +0 -83
- package/dist/common/GenericStreamClient.js +0 -102
- package/dist/common/constants.d.ts +0 -1
- package/dist/common/constants.js +0 -4
- package/dist/common/contractUtils.d.ts +0 -47
- package/dist/common/contractUtils.js +0 -55
- package/dist/common/types.d.ts +0 -149
- package/dist/common/types.js +0 -33
- package/dist/common/utils.d.ts +0 -15
- package/dist/common/utils.js +0 -34
- package/dist/evm/StreamClient.d.ts +0 -29
- package/dist/evm/StreamClient.js +0 -456
- package/dist/evm/abi.d.ts +0 -111
- package/dist/evm/abi.js +0 -1257
- package/dist/evm/constants.d.ts +0 -4
- package/dist/evm/constants.js +0 -23
- package/dist/evm/ercAbi.d.ts +0 -39
- package/dist/evm/ercAbi.js +0 -224
- package/dist/evm/index.d.ts +0 -2
- package/dist/evm/index.js +0 -24
- package/dist/evm/types.d.ts +0 -93
- package/dist/evm/types.js +0 -75
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -41
- package/dist/solana/StreamClient.d.ts +0 -71
- package/dist/solana/StreamClient.js +0 -923
- package/dist/solana/constants.d.ts +0 -18
- package/dist/solana/constants.js +0 -24
- package/dist/solana/index.d.ts +0 -7
- package/dist/solana/index.js +0 -43
- package/dist/solana/instructionTypes.d.ts +0 -96
- package/dist/solana/instructionTypes.js +0 -2
- package/dist/solana/instructions.d.ts +0 -139
- package/dist/solana/instructions.js +0 -407
- package/dist/solana/layout.d.ts +0 -27
- package/dist/solana/layout.js +0 -170
- package/dist/solana/timelockIDL.d.ts +0 -22
- package/dist/solana/timelockIDL.js +0 -422
- package/dist/solana/types.d.ts +0 -292
- package/dist/solana/types.js +0 -81
- package/dist/solana/utils.d.ts +0 -43
- package/dist/solana/utils.js +0 -283
- package/dist/sui/StreamClient.d.ts +0 -78
- package/dist/sui/StreamClient.js +0 -545
- package/dist/sui/constants.d.ts +0 -4
- package/dist/sui/constants.js +0 -24
- package/dist/sui/index.d.ts +0 -2
- package/dist/sui/index.js +0 -23
- package/dist/sui/types.d.ts +0 -131
- package/dist/sui/types.js +0 -102
- package/dist/sui/wallet.d.ts +0 -11
- package/dist/sui/wallet.js +0 -75
|
@@ -1,407 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
-
function step(op) {
|
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (_) try {
|
|
41
|
-
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;
|
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
-
switch (op[0]) {
|
|
44
|
-
case 0: case 1: t = op; break;
|
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
-
default:
|
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
-
if (t[2]) _.ops.pop();
|
|
54
|
-
_.trys.pop(); continue;
|
|
55
|
-
}
|
|
56
|
-
op = body.call(thisArg, _);
|
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
62
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
63
|
-
if (!m) return o;
|
|
64
|
-
var i = m.call(o), r, ar = [], e;
|
|
65
|
-
try {
|
|
66
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
67
|
-
}
|
|
68
|
-
catch (error) { e = { error: error }; }
|
|
69
|
-
finally {
|
|
70
|
-
try {
|
|
71
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
72
|
-
}
|
|
73
|
-
finally { if (e) throw e.error; }
|
|
74
|
-
}
|
|
75
|
-
return ar;
|
|
76
|
-
};
|
|
77
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
78
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
79
|
-
if (ar || !(i in from)) {
|
|
80
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
81
|
-
ar[i] = from[i];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
|
-
};
|
|
86
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
87
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
88
|
-
};
|
|
89
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
90
|
-
exports.prepareWrappedAccount = exports.topupStreamInstruction = exports.transferStreamInstruction = exports.cancelStreamInstruction = exports.updateStreamInstruction = exports.withdrawStreamInstruction = exports.createUncheckedStreamInstruction = exports.createStreamInstruction = void 0;
|
|
91
|
-
var buffer_1 = require("buffer");
|
|
92
|
-
var web3_js_1 = require("@solana/web3.js");
|
|
93
|
-
var bn_js_1 = __importDefault(require("bn.js"));
|
|
94
|
-
var js_sha256_1 = require("js-sha256");
|
|
95
|
-
var spl_token_1 = require("@solana/spl-token");
|
|
96
|
-
var Layout = __importStar(require("./layout"));
|
|
97
|
-
var constants_1 = require("../common/constants");
|
|
98
|
-
var createStreamInstruction = function (data, programId, accounts) {
|
|
99
|
-
var keys = [
|
|
100
|
-
{ pubkey: accounts.sender, isSigner: true, isWritable: true },
|
|
101
|
-
{ pubkey: accounts.senderTokens, isSigner: false, isWritable: true },
|
|
102
|
-
{ pubkey: accounts.recipient, isSigner: false, isWritable: true },
|
|
103
|
-
{ pubkey: accounts.metadata, isSigner: true, isWritable: true },
|
|
104
|
-
{ pubkey: accounts.escrowTokens, isSigner: false, isWritable: true },
|
|
105
|
-
{ pubkey: accounts.recipientTokens, isSigner: false, isWritable: true },
|
|
106
|
-
{
|
|
107
|
-
pubkey: accounts.streamflowTreasury,
|
|
108
|
-
isSigner: false,
|
|
109
|
-
isWritable: true,
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
pubkey: accounts.streamflowTreasuryTokens,
|
|
113
|
-
isSigner: false,
|
|
114
|
-
isWritable: true,
|
|
115
|
-
},
|
|
116
|
-
{ pubkey: accounts.withdrawor, isSigner: false, isWritable: true },
|
|
117
|
-
{ pubkey: accounts.partner, isSigner: false, isWritable: true },
|
|
118
|
-
{ pubkey: accounts.partnerTokens, isSigner: false, isWritable: true },
|
|
119
|
-
{ pubkey: accounts.mint, isSigner: false, isWritable: false },
|
|
120
|
-
{ pubkey: accounts.feeOracle, isSigner: false, isWritable: false },
|
|
121
|
-
{ pubkey: accounts.rent, isSigner: false, isWritable: false },
|
|
122
|
-
{ pubkey: accounts.timelockProgram, isSigner: false, isWritable: false },
|
|
123
|
-
{ pubkey: accounts.tokenProgram, isSigner: false, isWritable: false },
|
|
124
|
-
{
|
|
125
|
-
pubkey: accounts.associatedTokenProgram,
|
|
126
|
-
isSigner: false,
|
|
127
|
-
isWritable: false,
|
|
128
|
-
},
|
|
129
|
-
{ pubkey: accounts.systemProgram, isSigner: false, isWritable: false },
|
|
130
|
-
];
|
|
131
|
-
var bufferData = buffer_1.Buffer.alloc(Layout.createStreamLayout.span);
|
|
132
|
-
var encodedUIntArray = new TextEncoder().encode(data.name);
|
|
133
|
-
var streamNameBuffer = buffer_1.Buffer.alloc(64).fill(encodedUIntArray, 0, encodedUIntArray.byteLength);
|
|
134
|
-
var decodedData = {
|
|
135
|
-
start_time: data.start.toArrayLike(buffer_1.Buffer, "le", 8),
|
|
136
|
-
net_amount_deposited: data.depositedAmount.toArrayLike(buffer_1.Buffer, "le", 8),
|
|
137
|
-
period: data.period.toArrayLike(buffer_1.Buffer, "le", 8),
|
|
138
|
-
amount_per_period: data.amountPerPeriod.toArrayLike(buffer_1.Buffer, "le", 8),
|
|
139
|
-
cliff: data.cliff.toArrayLike(buffer_1.Buffer, "le", 8),
|
|
140
|
-
cliff_amount: data.cliffAmount.toArrayLike(buffer_1.Buffer, "le", 8),
|
|
141
|
-
cancelable_by_sender: Number(data.cancelableBySender),
|
|
142
|
-
cancelable_by_recipient: Number(data.cancelableByRecipient),
|
|
143
|
-
automatic_withdrawal: Number(data.automaticWithdrawal),
|
|
144
|
-
transferable_by_sender: Number(data.transferableBySender),
|
|
145
|
-
transferable_by_recipient: Number(data.transferableByRecipient),
|
|
146
|
-
can_topup: Number(data.canTopup),
|
|
147
|
-
stream_name: streamNameBuffer,
|
|
148
|
-
withdraw_frequency: data.withdrawFrequency.toArrayLike(buffer_1.Buffer, "le", 8),
|
|
149
|
-
};
|
|
150
|
-
var encodeLength = Layout.createStreamLayout.encode(decodedData, bufferData);
|
|
151
|
-
bufferData = bufferData.slice(0, encodeLength);
|
|
152
|
-
bufferData = buffer_1.Buffer.concat([
|
|
153
|
-
buffer_1.Buffer.from(js_sha256_1.sha256.digest("global:create")).slice(0, 8),
|
|
154
|
-
bufferData,
|
|
155
|
-
buffer_1.Buffer.alloc(10),
|
|
156
|
-
]);
|
|
157
|
-
return new web3_js_1.TransactionInstruction({
|
|
158
|
-
keys: keys,
|
|
159
|
-
programId: programId,
|
|
160
|
-
data: bufferData,
|
|
161
|
-
});
|
|
162
|
-
};
|
|
163
|
-
exports.createStreamInstruction = createStreamInstruction;
|
|
164
|
-
var createUncheckedStreamInstruction = function (data, programId, accounts) {
|
|
165
|
-
var keys = [
|
|
166
|
-
{ pubkey: accounts.sender, isSigner: true, isWritable: true },
|
|
167
|
-
{ pubkey: accounts.senderTokens, isSigner: false, isWritable: true },
|
|
168
|
-
{ pubkey: accounts.metadata, isSigner: false, isWritable: true },
|
|
169
|
-
{ pubkey: accounts.escrowTokens, isSigner: false, isWritable: true },
|
|
170
|
-
{ pubkey: accounts.withdrawor, isSigner: false, isWritable: true },
|
|
171
|
-
{ pubkey: accounts.mint, isSigner: false, isWritable: false },
|
|
172
|
-
{ pubkey: accounts.feeOracle, isSigner: false, isWritable: false },
|
|
173
|
-
{ pubkey: accounts.rent, isSigner: false, isWritable: false },
|
|
174
|
-
{ pubkey: accounts.timelockProgram, isSigner: false, isWritable: false },
|
|
175
|
-
{ pubkey: accounts.tokenProgram, isSigner: false, isWritable: false },
|
|
176
|
-
{ pubkey: accounts.systemProgram, isSigner: false, isWritable: false },
|
|
177
|
-
];
|
|
178
|
-
if (accounts.payer) {
|
|
179
|
-
keys.unshift({
|
|
180
|
-
pubkey: accounts.payer,
|
|
181
|
-
isSigner: true,
|
|
182
|
-
isWritable: true,
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
var bufferData = buffer_1.Buffer.alloc(Layout.createUncheckedStreamLayout.span);
|
|
186
|
-
var encodedUIntArray = new TextEncoder().encode(data.name);
|
|
187
|
-
var streamNameBuffer = buffer_1.Buffer.alloc(64).fill(encodedUIntArray, 0, encodedUIntArray.byteLength);
|
|
188
|
-
var decodedData = {
|
|
189
|
-
start_time: data.start.toArrayLike(buffer_1.Buffer, "le", 8),
|
|
190
|
-
net_amount_deposited: data.depositedAmount.toArrayLike(buffer_1.Buffer, "le", 8),
|
|
191
|
-
period: data.period.toArrayLike(buffer_1.Buffer, "le", 8),
|
|
192
|
-
amount_per_period: data.amountPerPeriod.toArrayLike(buffer_1.Buffer, "le", 8),
|
|
193
|
-
cliff: data.cliff.toArrayLike(buffer_1.Buffer, "le", 8),
|
|
194
|
-
cliff_amount: data.cliffAmount.toArrayLike(buffer_1.Buffer, "le", 8),
|
|
195
|
-
cancelable_by_sender: Number(data.cancelableBySender),
|
|
196
|
-
cancelable_by_recipient: Number(data.cancelableByRecipient),
|
|
197
|
-
automatic_withdrawal: Number(data.automaticWithdrawal),
|
|
198
|
-
transferable_by_sender: Number(data.transferableBySender),
|
|
199
|
-
transferable_by_recipient: Number(data.transferableByRecipient),
|
|
200
|
-
can_topup: Number(data.canTopup),
|
|
201
|
-
stream_name: streamNameBuffer,
|
|
202
|
-
withdraw_frequency: data.withdrawFrequency.toArrayLike(buffer_1.Buffer, "le", 8),
|
|
203
|
-
recipient: data.recipient.toBuffer(),
|
|
204
|
-
partner: data.partner.toBuffer(),
|
|
205
|
-
pausable: 1,
|
|
206
|
-
can_update_rate: 1,
|
|
207
|
-
};
|
|
208
|
-
var encodeLength = Layout.createUncheckedStreamLayout.encode(decodedData, bufferData);
|
|
209
|
-
bufferData = bufferData.slice(0, encodeLength);
|
|
210
|
-
var digest = accounts.payer
|
|
211
|
-
? js_sha256_1.sha256.digest("global:create_unchecked_with_payer")
|
|
212
|
-
: js_sha256_1.sha256.digest("global:create_unchecked");
|
|
213
|
-
bufferData = buffer_1.Buffer.concat([buffer_1.Buffer.from(digest).slice(0, 8), bufferData, buffer_1.Buffer.alloc(10)]);
|
|
214
|
-
return new web3_js_1.TransactionInstruction({
|
|
215
|
-
keys: keys,
|
|
216
|
-
programId: programId,
|
|
217
|
-
data: bufferData,
|
|
218
|
-
});
|
|
219
|
-
};
|
|
220
|
-
exports.createUncheckedStreamInstruction = createUncheckedStreamInstruction;
|
|
221
|
-
var withdrawStreamInstruction = function (amount, programId, _a) {
|
|
222
|
-
var authority = _a.authority, recipient = _a.recipient, recipientTokens = _a.recipientTokens, metadata = _a.metadata, escrowTokens = _a.escrowTokens, streamflowTreasury = _a.streamflowTreasury, streamflowTreasuryTokens = _a.streamflowTreasuryTokens, partner = _a.partner, partnerTokens = _a.partnerTokens, mint = _a.mint, tokenProgram = _a.tokenProgram;
|
|
223
|
-
var keys = [
|
|
224
|
-
{ pubkey: authority, isSigner: true, isWritable: true },
|
|
225
|
-
{ pubkey: recipient, isSigner: false, isWritable: true },
|
|
226
|
-
{ pubkey: recipientTokens, isSigner: false, isWritable: true },
|
|
227
|
-
{ pubkey: metadata, isSigner: false, isWritable: true },
|
|
228
|
-
{ pubkey: escrowTokens, isSigner: false, isWritable: true },
|
|
229
|
-
{
|
|
230
|
-
pubkey: streamflowTreasury,
|
|
231
|
-
isSigner: false,
|
|
232
|
-
isWritable: true,
|
|
233
|
-
},
|
|
234
|
-
{ pubkey: streamflowTreasuryTokens, isSigner: false, isWritable: true },
|
|
235
|
-
{ pubkey: partner, isSigner: false, isWritable: true },
|
|
236
|
-
{ pubkey: partnerTokens, isSigner: false, isWritable: true },
|
|
237
|
-
{ pubkey: mint, isSigner: false, isWritable: false },
|
|
238
|
-
{ pubkey: tokenProgram, isSigner: false, isWritable: false },
|
|
239
|
-
];
|
|
240
|
-
var data = buffer_1.Buffer.alloc(Layout.withdrawStreamLayout.span);
|
|
241
|
-
var decodedData = { amount: amount.toArrayLike(buffer_1.Buffer, "le", 8) };
|
|
242
|
-
var encodeLength = Layout.withdrawStreamLayout.encode(decodedData, data);
|
|
243
|
-
data = data.slice(0, encodeLength);
|
|
244
|
-
data = buffer_1.Buffer.concat([
|
|
245
|
-
buffer_1.Buffer.from(js_sha256_1.sha256.digest("global:withdraw")).slice(0, 8),
|
|
246
|
-
data,
|
|
247
|
-
buffer_1.Buffer.alloc(10),
|
|
248
|
-
]);
|
|
249
|
-
return new web3_js_1.TransactionInstruction({
|
|
250
|
-
keys: keys,
|
|
251
|
-
programId: programId,
|
|
252
|
-
data: data,
|
|
253
|
-
});
|
|
254
|
-
};
|
|
255
|
-
exports.withdrawStreamInstruction = withdrawStreamInstruction;
|
|
256
|
-
var updateStreamInstruction = function (params, programId, _a) {
|
|
257
|
-
var authority = _a.authority, metadata = _a.metadata, withdrawor = _a.withdrawor, systemProgram = _a.systemProgram;
|
|
258
|
-
var keys = [
|
|
259
|
-
{ pubkey: authority, isSigner: true, isWritable: true },
|
|
260
|
-
{ pubkey: metadata, isSigner: false, isWritable: true },
|
|
261
|
-
{ pubkey: withdrawor, isSigner: false, isWritable: true },
|
|
262
|
-
{ pubkey: systemProgram, isSigner: false, isWritable: false },
|
|
263
|
-
];
|
|
264
|
-
var data = buffer_1.Buffer.alloc(100);
|
|
265
|
-
var decodedData = {
|
|
266
|
-
enable_automatic_withdrawal: Number(params.enableAutomaticWithdrawal),
|
|
267
|
-
withdraw_frequency: params.withdrawFrequency
|
|
268
|
-
? params.withdrawFrequency.toArrayLike(buffer_1.Buffer, "le", 8)
|
|
269
|
-
: undefined,
|
|
270
|
-
amount_per_period: params.amountPerPeriod
|
|
271
|
-
? params.amountPerPeriod.toArrayLike(buffer_1.Buffer, "le", 8)
|
|
272
|
-
: undefined,
|
|
273
|
-
};
|
|
274
|
-
var encodeLength = Layout.encodeUpdateStream(decodedData, data);
|
|
275
|
-
data = data.slice(0, encodeLength);
|
|
276
|
-
data = buffer_1.Buffer.concat([
|
|
277
|
-
buffer_1.Buffer.from(js_sha256_1.sha256.digest("global:update")).slice(0, 8),
|
|
278
|
-
data,
|
|
279
|
-
buffer_1.Buffer.alloc(20),
|
|
280
|
-
]);
|
|
281
|
-
return new web3_js_1.TransactionInstruction({
|
|
282
|
-
keys: keys,
|
|
283
|
-
programId: programId,
|
|
284
|
-
data: data,
|
|
285
|
-
});
|
|
286
|
-
};
|
|
287
|
-
exports.updateStreamInstruction = updateStreamInstruction;
|
|
288
|
-
var cancelStreamInstruction = function (programId, _a) {
|
|
289
|
-
var authority = _a.authority, sender = _a.sender, senderTokens = _a.senderTokens, recipient = _a.recipient, recipientTokens = _a.recipientTokens, metadata = _a.metadata, escrowTokens = _a.escrowTokens, streamflowTreasury = _a.streamflowTreasury, streamflowTreasuryTokens = _a.streamflowTreasuryTokens, partner = _a.partner, partnerTokens = _a.partnerTokens, mint = _a.mint, tokenProgram = _a.tokenProgram;
|
|
290
|
-
var keys = [
|
|
291
|
-
{ pubkey: authority, isSigner: true, isWritable: false },
|
|
292
|
-
{ pubkey: sender, isSigner: false, isWritable: true },
|
|
293
|
-
{ pubkey: senderTokens, isSigner: false, isWritable: true },
|
|
294
|
-
{ pubkey: recipient, isSigner: false, isWritable: true },
|
|
295
|
-
{ pubkey: recipientTokens, isSigner: false, isWritable: true },
|
|
296
|
-
{ pubkey: metadata, isSigner: false, isWritable: true },
|
|
297
|
-
{ pubkey: escrowTokens, isSigner: false, isWritable: true },
|
|
298
|
-
{
|
|
299
|
-
pubkey: streamflowTreasury,
|
|
300
|
-
isSigner: false,
|
|
301
|
-
isWritable: true,
|
|
302
|
-
},
|
|
303
|
-
{ pubkey: streamflowTreasuryTokens, isSigner: false, isWritable: true },
|
|
304
|
-
{ pubkey: partner, isSigner: false, isWritable: true },
|
|
305
|
-
{ pubkey: partnerTokens, isSigner: false, isWritable: true },
|
|
306
|
-
{ pubkey: mint, isSigner: false, isWritable: false },
|
|
307
|
-
{ pubkey: tokenProgram, isSigner: false, isWritable: false },
|
|
308
|
-
];
|
|
309
|
-
var data = buffer_1.Buffer.concat([
|
|
310
|
-
buffer_1.Buffer.from(js_sha256_1.sha256.digest("global:cancel")).slice(0, 8),
|
|
311
|
-
buffer_1.Buffer.alloc(10),
|
|
312
|
-
]);
|
|
313
|
-
return new web3_js_1.TransactionInstruction({
|
|
314
|
-
keys: keys,
|
|
315
|
-
programId: programId,
|
|
316
|
-
data: data,
|
|
317
|
-
});
|
|
318
|
-
};
|
|
319
|
-
exports.cancelStreamInstruction = cancelStreamInstruction;
|
|
320
|
-
var transferStreamInstruction = function (programId, _a) {
|
|
321
|
-
var authority = _a.authority, newRecipient = _a.newRecipient, newRecipientTokens = _a.newRecipientTokens, metadata = _a.metadata, mint = _a.mint, rent = _a.rent, tokenProgram = _a.tokenProgram, associatedTokenProgram = _a.associatedTokenProgram, systemProgram = _a.systemProgram;
|
|
322
|
-
var keys = [
|
|
323
|
-
{ pubkey: authority, isSigner: true, isWritable: true },
|
|
324
|
-
{ pubkey: newRecipient, isSigner: false, isWritable: true },
|
|
325
|
-
{ pubkey: newRecipientTokens, isSigner: false, isWritable: true },
|
|
326
|
-
{ pubkey: metadata, isSigner: false, isWritable: true },
|
|
327
|
-
{ pubkey: mint, isSigner: false, isWritable: false },
|
|
328
|
-
{ pubkey: rent, isSigner: false, isWritable: false },
|
|
329
|
-
{ pubkey: tokenProgram, isSigner: false, isWritable: false },
|
|
330
|
-
{ pubkey: associatedTokenProgram, isSigner: false, isWritable: false },
|
|
331
|
-
{ pubkey: systemProgram, isSigner: false, isWritable: false },
|
|
332
|
-
];
|
|
333
|
-
var data = buffer_1.Buffer.concat([
|
|
334
|
-
buffer_1.Buffer.from(js_sha256_1.sha256.digest("global:transfer_recipient")).slice(0, 8),
|
|
335
|
-
buffer_1.Buffer.alloc(10),
|
|
336
|
-
]);
|
|
337
|
-
return new web3_js_1.TransactionInstruction({
|
|
338
|
-
keys: keys,
|
|
339
|
-
programId: programId,
|
|
340
|
-
data: data,
|
|
341
|
-
});
|
|
342
|
-
};
|
|
343
|
-
exports.transferStreamInstruction = transferStreamInstruction;
|
|
344
|
-
var topupStreamInstruction = function (amount, programId, _a) {
|
|
345
|
-
var sender = _a.sender, senderTokens = _a.senderTokens, metadata = _a.metadata, escrowTokens = _a.escrowTokens, streamflowTreasury = _a.streamflowTreasury, streamflowTreasuryTokens = _a.streamflowTreasuryTokens, partner = _a.partner, partnerTokens = _a.partnerTokens, mint = _a.mint, tokenProgram = _a.tokenProgram, withdrawor = _a.withdrawor, systemProgram = _a.systemProgram;
|
|
346
|
-
var keys = [
|
|
347
|
-
{ pubkey: sender, isSigner: true, isWritable: true },
|
|
348
|
-
{ pubkey: senderTokens, isSigner: false, isWritable: true },
|
|
349
|
-
{ pubkey: metadata, isSigner: false, isWritable: true },
|
|
350
|
-
{ pubkey: escrowTokens, isSigner: false, isWritable: true },
|
|
351
|
-
{
|
|
352
|
-
pubkey: streamflowTreasury,
|
|
353
|
-
isSigner: false,
|
|
354
|
-
isWritable: true,
|
|
355
|
-
},
|
|
356
|
-
{ pubkey: streamflowTreasuryTokens, isSigner: false, isWritable: true },
|
|
357
|
-
{ pubkey: withdrawor, isSigner: false, isWritable: true },
|
|
358
|
-
{ pubkey: partner, isSigner: false, isWritable: true },
|
|
359
|
-
{ pubkey: partnerTokens, isSigner: false, isWritable: true },
|
|
360
|
-
{ pubkey: mint, isSigner: false, isWritable: false },
|
|
361
|
-
{ pubkey: tokenProgram, isSigner: false, isWritable: false },
|
|
362
|
-
{ pubkey: systemProgram, isSigner: false, isWritable: false },
|
|
363
|
-
];
|
|
364
|
-
var data = buffer_1.Buffer.alloc(Layout.topupStreamLayout.span);
|
|
365
|
-
var decodedData = { amount: amount.toArrayLike(buffer_1.Buffer, "le", 8) };
|
|
366
|
-
var encodeLength = Layout.topupStreamLayout.encode(decodedData, data);
|
|
367
|
-
data = data.slice(0, encodeLength);
|
|
368
|
-
data = buffer_1.Buffer.concat([
|
|
369
|
-
buffer_1.Buffer.from(js_sha256_1.sha256.digest("global:topup")).slice(0, 8),
|
|
370
|
-
data,
|
|
371
|
-
buffer_1.Buffer.alloc(10),
|
|
372
|
-
]);
|
|
373
|
-
return new web3_js_1.TransactionInstruction({
|
|
374
|
-
keys: keys,
|
|
375
|
-
programId: programId,
|
|
376
|
-
data: data,
|
|
377
|
-
});
|
|
378
|
-
};
|
|
379
|
-
exports.topupStreamInstruction = topupStreamInstruction;
|
|
380
|
-
var prepareWrappedAccount = function (connection, senderAddress, amount) { return __awaiter(void 0, void 0, void 0, function () {
|
|
381
|
-
var tokenAccount, accInfo, instructions;
|
|
382
|
-
var _a, _b;
|
|
383
|
-
return __generator(this, function (_c) {
|
|
384
|
-
switch (_c.label) {
|
|
385
|
-
case 0: return [4 /*yield*/, (0, spl_token_1.getAssociatedTokenAddress)(spl_token_1.NATIVE_MINT, senderAddress, true)];
|
|
386
|
-
case 1:
|
|
387
|
-
tokenAccount = _c.sent();
|
|
388
|
-
return [4 /*yield*/, connection.getParsedAccountInfo(tokenAccount)];
|
|
389
|
-
case 2:
|
|
390
|
-
accInfo = _c.sent();
|
|
391
|
-
instructions = ((_b = (_a = accInfo.value) === null || _a === void 0 ? void 0 : _a.lamports) !== null && _b !== void 0 ? _b : 0) > 0
|
|
392
|
-
? []
|
|
393
|
-
: [
|
|
394
|
-
(0, spl_token_1.createAssociatedTokenAccountInstruction)(senderAddress, tokenAccount, senderAddress, spl_token_1.NATIVE_MINT),
|
|
395
|
-
];
|
|
396
|
-
return [2 /*return*/, __spreadArray(__spreadArray([], __read(instructions), false), [
|
|
397
|
-
web3_js_1.SystemProgram.transfer({
|
|
398
|
-
fromPubkey: senderAddress,
|
|
399
|
-
toPubkey: tokenAccount,
|
|
400
|
-
lamports: amount.mul(new bn_js_1.default(constants_1.BASE_FEE)).div(new bn_js_1.default(1000000)).toNumber(),
|
|
401
|
-
}),
|
|
402
|
-
(0, spl_token_1.createSyncNativeInstruction)(tokenAccount),
|
|
403
|
-
], false)];
|
|
404
|
-
}
|
|
405
|
-
});
|
|
406
|
-
}); };
|
|
407
|
-
exports.prepareWrappedAccount = prepareWrappedAccount;
|
package/dist/solana/layout.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import * as BufferLayout from "@solana/buffer-layout";
|
|
3
|
-
import { ICreateStreamLayout, ICreateUncheckedStreamLayout, IStreamLayout, ITopupStreamLayout, IUpdateStreamLayout, IWithdrawStreamLayout } from "./instructionTypes";
|
|
4
|
-
/**
|
|
5
|
-
* Stream layout
|
|
6
|
-
*/
|
|
7
|
-
export declare const streamLayout: BufferLayout.Structure<IStreamLayout>;
|
|
8
|
-
/**
|
|
9
|
-
* Create stream instruction layout
|
|
10
|
-
*/
|
|
11
|
-
export declare const createStreamLayout: BufferLayout.Structure<ICreateStreamLayout>;
|
|
12
|
-
/**
|
|
13
|
-
* Create unchecked stream instruction layout
|
|
14
|
-
*/
|
|
15
|
-
export declare const createUncheckedStreamLayout: BufferLayout.Structure<ICreateUncheckedStreamLayout>;
|
|
16
|
-
/**
|
|
17
|
-
* Withdraw stream instruction layout
|
|
18
|
-
*/
|
|
19
|
-
export declare const withdrawStreamLayout: BufferLayout.Structure<IWithdrawStreamLayout>;
|
|
20
|
-
/**
|
|
21
|
-
* Encode stream instruction layout
|
|
22
|
-
*/
|
|
23
|
-
export declare const encodeUpdateStream: (values: IUpdateStreamLayout, data: Buffer) => number;
|
|
24
|
-
/**
|
|
25
|
-
* Topup stream instruction layout
|
|
26
|
-
*/
|
|
27
|
-
export declare const topupStreamLayout: BufferLayout.Structure<ITopupStreamLayout>;
|
package/dist/solana/layout.js
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.topupStreamLayout = exports.encodeUpdateStream = exports.withdrawStreamLayout = exports.createUncheckedStreamLayout = exports.createStreamLayout = exports.streamLayout = void 0;
|
|
27
|
-
var BufferLayout = __importStar(require("@solana/buffer-layout"));
|
|
28
|
-
var constants_1 = require("./constants");
|
|
29
|
-
/**
|
|
30
|
-
* Stream layout
|
|
31
|
-
*/
|
|
32
|
-
exports.streamLayout = BufferLayout.struct([
|
|
33
|
-
BufferLayout.blob(8, "magic"),
|
|
34
|
-
BufferLayout.blob(1, "version"),
|
|
35
|
-
BufferLayout.blob(8, "created_at"),
|
|
36
|
-
BufferLayout.blob(8, "withdrawn_amount"),
|
|
37
|
-
BufferLayout.blob(8, "canceled_at"),
|
|
38
|
-
BufferLayout.blob(8, "end_time"),
|
|
39
|
-
BufferLayout.blob(8, "last_withdrawn_at"),
|
|
40
|
-
BufferLayout.blob(32, "sender"),
|
|
41
|
-
BufferLayout.blob(32, "sender_tokens"),
|
|
42
|
-
BufferLayout.blob(32, "recipient"),
|
|
43
|
-
BufferLayout.blob(32, "recipient_tokens"),
|
|
44
|
-
BufferLayout.blob(32, "mint"),
|
|
45
|
-
BufferLayout.blob(32, "escrow_tokens"),
|
|
46
|
-
BufferLayout.blob(32, "streamflow_treasury"),
|
|
47
|
-
BufferLayout.blob(32, "streamflow_treasury_tokens"),
|
|
48
|
-
BufferLayout.blob(8, "streamflow_fee_total"),
|
|
49
|
-
BufferLayout.blob(8, "streamflow_fee_withdrawn"),
|
|
50
|
-
BufferLayout.f32("streamflow_fee_percent"),
|
|
51
|
-
BufferLayout.blob(32, "partner"),
|
|
52
|
-
BufferLayout.blob(32, "partner_tokens"),
|
|
53
|
-
BufferLayout.blob(8, "partner_fee_total"),
|
|
54
|
-
BufferLayout.blob(8, "partner_fee_withdrawn"),
|
|
55
|
-
BufferLayout.f32("partner_fee_percent"),
|
|
56
|
-
BufferLayout.blob(8, "start_time"),
|
|
57
|
-
BufferLayout.blob(8, "net_amount_deposited"),
|
|
58
|
-
BufferLayout.blob(8, "period"),
|
|
59
|
-
BufferLayout.blob(8, "amount_per_period"),
|
|
60
|
-
BufferLayout.blob(8, "cliff"),
|
|
61
|
-
BufferLayout.blob(8, "cliff_amount"),
|
|
62
|
-
BufferLayout.u8("cancelable_by_sender"),
|
|
63
|
-
BufferLayout.u8("cancelable_by_recipient"),
|
|
64
|
-
BufferLayout.u8("automatic_withdrawal"),
|
|
65
|
-
BufferLayout.u8("transferable_by_sender"),
|
|
66
|
-
BufferLayout.u8("transferable_by_recipient"),
|
|
67
|
-
BufferLayout.u8("can_topup"),
|
|
68
|
-
BufferLayout.blob(64, "stream_name"),
|
|
69
|
-
BufferLayout.blob(8, "withdraw_frequency"),
|
|
70
|
-
// Unused, kept for backward compatibility™
|
|
71
|
-
BufferLayout.blob(4, "ghost"),
|
|
72
|
-
BufferLayout.u8("pausable"),
|
|
73
|
-
BufferLayout.u8("can_update_rate"),
|
|
74
|
-
BufferLayout.blob(4, "create_stream_params_padding_length"),
|
|
75
|
-
BufferLayout.seq(BufferLayout.u8(), constants_1.CREATE_PARAMS_PADDING, "create_params_padding"),
|
|
76
|
-
BufferLayout.u8("closed"),
|
|
77
|
-
BufferLayout.blob(8, "current_pause_start"),
|
|
78
|
-
BufferLayout.blob(8, "pause_cumulative"),
|
|
79
|
-
BufferLayout.blob(8, "last_rate_change_time"),
|
|
80
|
-
BufferLayout.blob(8, "funds_unlocked_at_last_rate_change"),
|
|
81
|
-
]);
|
|
82
|
-
/**
|
|
83
|
-
* Create stream instruction layout
|
|
84
|
-
*/
|
|
85
|
-
exports.createStreamLayout = BufferLayout.struct([
|
|
86
|
-
BufferLayout.blob(8, "start_time"),
|
|
87
|
-
BufferLayout.blob(8, "net_amount_deposited"),
|
|
88
|
-
BufferLayout.blob(8, "period"),
|
|
89
|
-
BufferLayout.blob(8, "amount_per_period"),
|
|
90
|
-
BufferLayout.blob(8, "cliff"),
|
|
91
|
-
BufferLayout.blob(8, "cliff_amount"),
|
|
92
|
-
BufferLayout.u8("cancelable_by_sender"),
|
|
93
|
-
BufferLayout.u8("cancelable_by_recipient"),
|
|
94
|
-
BufferLayout.u8("automatic_withdrawal"),
|
|
95
|
-
BufferLayout.u8("transferable_by_sender"),
|
|
96
|
-
BufferLayout.u8("transferable_by_recipient"),
|
|
97
|
-
BufferLayout.u8("can_topup"),
|
|
98
|
-
BufferLayout.blob(64, "stream_name"),
|
|
99
|
-
BufferLayout.blob(8, "withdraw_frequency"),
|
|
100
|
-
]);
|
|
101
|
-
/**
|
|
102
|
-
* Create unchecked stream instruction layout
|
|
103
|
-
*/
|
|
104
|
-
exports.createUncheckedStreamLayout = BufferLayout.struct([
|
|
105
|
-
BufferLayout.blob(8, "start_time"),
|
|
106
|
-
BufferLayout.blob(8, "net_amount_deposited"),
|
|
107
|
-
BufferLayout.blob(8, "period"),
|
|
108
|
-
BufferLayout.blob(8, "amount_per_period"),
|
|
109
|
-
BufferLayout.blob(8, "cliff"),
|
|
110
|
-
BufferLayout.blob(8, "cliff_amount"),
|
|
111
|
-
BufferLayout.u8("cancelable_by_sender"),
|
|
112
|
-
BufferLayout.u8("cancelable_by_recipient"),
|
|
113
|
-
BufferLayout.u8("automatic_withdrawal"),
|
|
114
|
-
BufferLayout.u8("transferable_by_sender"),
|
|
115
|
-
BufferLayout.u8("transferable_by_recipient"),
|
|
116
|
-
BufferLayout.u8("can_topup"),
|
|
117
|
-
BufferLayout.blob(64, "stream_name"),
|
|
118
|
-
BufferLayout.blob(8, "withdraw_frequency"),
|
|
119
|
-
BufferLayout.blob(32, "recipient"),
|
|
120
|
-
BufferLayout.blob(32, "partner"),
|
|
121
|
-
BufferLayout.u8("pausable"),
|
|
122
|
-
BufferLayout.u8("can_update_rate"),
|
|
123
|
-
]);
|
|
124
|
-
/**
|
|
125
|
-
* Withdraw stream instruction layout
|
|
126
|
-
*/
|
|
127
|
-
exports.withdrawStreamLayout = BufferLayout.struct([BufferLayout.blob(8, "amount")]);
|
|
128
|
-
/**
|
|
129
|
-
* Encode stream instruction layout
|
|
130
|
-
*/
|
|
131
|
-
var encodeUpdateStream = function (values, data) {
|
|
132
|
-
var _a, _b, _c;
|
|
133
|
-
var structs = [];
|
|
134
|
-
if (values.enable_automatic_withdrawal) {
|
|
135
|
-
structs.push(BufferLayout.u8("enable_automatic_withdrawal_exists"));
|
|
136
|
-
structs.push(BufferLayout.u8("enable_automatic_withdrawal"));
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
structs.push(BufferLayout.u8("enable_automatic_withdrawal_exists"));
|
|
140
|
-
}
|
|
141
|
-
if (values.withdraw_frequency) {
|
|
142
|
-
structs.push(BufferLayout.u8("withdraw_frequency_exists"));
|
|
143
|
-
structs.push(BufferLayout.blob(8, "withdraw_frequency"));
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
structs.push(BufferLayout.u8("withdraw_frequency_exists"));
|
|
147
|
-
}
|
|
148
|
-
if (values.amount_per_period) {
|
|
149
|
-
structs.push(BufferLayout.u8("amount_per_period_exists"));
|
|
150
|
-
structs.push(BufferLayout.blob(8, "amount_per_period"));
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
structs.push(BufferLayout.u8("amount_per_period_exists"));
|
|
154
|
-
}
|
|
155
|
-
return BufferLayout.struct(structs).encode({
|
|
156
|
-
enable_automatic_withdrawal_exists: values.enable_automatic_withdrawal ? 1 : 0,
|
|
157
|
-
enable_automatic_withdrawal: (_a = values.enable_automatic_withdrawal) !== null && _a !== void 0 ? _a : 0,
|
|
158
|
-
withdraw_frequency_exists: values.withdraw_frequency ? 1 : 0,
|
|
159
|
-
withdraw_frequency: (_b = values.withdraw_frequency) !== null && _b !== void 0 ? _b : 0,
|
|
160
|
-
amount_per_period_exists: values.amount_per_period ? 1 : 0,
|
|
161
|
-
amount_per_period: (_c = values.amount_per_period) !== null && _c !== void 0 ? _c : 0,
|
|
162
|
-
}, data);
|
|
163
|
-
};
|
|
164
|
-
exports.encodeUpdateStream = encodeUpdateStream;
|
|
165
|
-
/**
|
|
166
|
-
* Topup stream instruction layout
|
|
167
|
-
*/
|
|
168
|
-
exports.topupStreamLayout = BufferLayout.struct([
|
|
169
|
-
BufferLayout.blob(8, "amount"),
|
|
170
|
-
]);
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
version: string;
|
|
3
|
-
name: string;
|
|
4
|
-
instructions: {
|
|
5
|
-
name: string;
|
|
6
|
-
accounts: {
|
|
7
|
-
name: string;
|
|
8
|
-
isMut: boolean;
|
|
9
|
-
isSigner: boolean;
|
|
10
|
-
}[];
|
|
11
|
-
args: ({
|
|
12
|
-
name: string;
|
|
13
|
-
type: string;
|
|
14
|
-
} | {
|
|
15
|
-
name: string;
|
|
16
|
-
type: {
|
|
17
|
-
array: (string | number)[];
|
|
18
|
-
};
|
|
19
|
-
})[];
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|