wapi-client 0.18.0 → 0.18.2
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/api/base-client.browser.cjs +31 -957
- package/dist/api/base-client.browser.js +31 -957
- package/dist/api/base-client.cjs +31 -957
- package/dist/api/base-client.js +31 -957
- package/dist/api/http-client.browser.cjs +25 -7
- package/dist/api/http-client.browser.js +30 -8
- package/dist/api/http-client.cjs +25 -7
- package/dist/api/http-client.js +30 -8
- package/dist/api/ws-client.browser.cjs +0 -4
- package/dist/api/ws-client.browser.js +0 -4
- package/dist/api/ws-client.cjs +0 -4
- package/dist/api/ws-client.js +0 -4
- package/dist/db/consts.browser.cjs +6 -13
- package/dist/db/consts.browser.js +6 -13
- package/dist/db/consts.cjs +6 -13
- package/dist/db/consts.js +6 -13
- package/dist/fns/create-access-token/create-access-token.browser.cjs +3 -3
- package/dist/fns/create-access-token/create-access-token.browser.js +3 -3
- package/dist/fns/create-access-token/create-access-token.cjs +3 -3
- package/dist/fns/create-access-token/create-access-token.js +3 -3
- package/dist/fns/create-apikey/create-apikey.browser.cjs +3 -3
- package/dist/fns/create-apikey/create-apikey.browser.js +3 -3
- package/dist/fns/create-apikey/create-apikey.cjs +3 -3
- package/dist/fns/create-apikey/create-apikey.js +3 -3
- package/dist/fns/create-contract/create-contract.browser.cjs +3 -3
- package/dist/fns/create-contract/create-contract.browser.js +3 -3
- package/dist/fns/create-contract/create-contract.cjs +3 -3
- package/dist/fns/create-contract/create-contract.js +3 -3
- package/dist/fns/create-deposit/create-deposit.browser.cjs +3 -3
- package/dist/fns/create-deposit/create-deposit.browser.js +3 -3
- package/dist/fns/create-deposit/create-deposit.cjs +3 -3
- package/dist/fns/create-deposit/create-deposit.js +3 -3
- package/dist/fns/create-exchange/create-exchange.browser.cjs +3 -3
- package/dist/fns/create-exchange/create-exchange.browser.js +3 -3
- package/dist/fns/create-exchange/create-exchange.cjs +3 -3
- package/dist/fns/create-exchange/create-exchange.js +3 -3
- package/dist/fns/create-index/create-index.browser.cjs +3 -3
- package/dist/fns/create-index/create-index.browser.js +3 -3
- package/dist/fns/create-index/create-index.cjs +3 -3
- package/dist/fns/create-index/create-index.js +3 -3
- package/dist/fns/create-token/create-token.browser.cjs +3 -3
- package/dist/fns/create-token/create-token.browser.js +3 -3
- package/dist/fns/create-token/create-token.cjs +3 -3
- package/dist/fns/create-token/create-token.js +3 -3
- package/dist/fns/create-transfer/create-transfer.browser.cjs +3 -3
- package/dist/fns/create-transfer/create-transfer.browser.js +3 -3
- package/dist/fns/create-transfer/create-transfer.cjs +3 -3
- package/dist/fns/create-transfer/create-transfer.js +3 -3
- package/dist/fns/create-transfer-group/create-transfer-group.browser.cjs +3 -3
- package/dist/fns/create-transfer-group/create-transfer-group.browser.js +3 -3
- package/dist/fns/create-transfer-group/create-transfer-group.cjs +3 -3
- package/dist/fns/create-transfer-group/create-transfer-group.js +3 -3
- package/dist/fns/create-transfers/create-transfers.browser.cjs +3 -3
- package/dist/fns/create-transfers/create-transfers.browser.js +3 -3
- package/dist/fns/create-transfers/create-transfers.cjs +3 -3
- package/dist/fns/create-transfers/create-transfers.js +3 -3
- package/dist/fns/create-wallet/create-wallet.browser.cjs +3 -3
- package/dist/fns/create-wallet/create-wallet.browser.js +3 -3
- package/dist/fns/create-wallet/create-wallet.cjs +3 -3
- package/dist/fns/create-wallet/create-wallet.js +3 -3
- package/dist/fns/create-withdrawal/create-withdrawal.browser.cjs +3 -3
- package/dist/fns/create-withdrawal/create-withdrawal.browser.js +3 -3
- package/dist/fns/create-withdrawal/create-withdrawal.cjs +3 -3
- package/dist/fns/create-withdrawal/create-withdrawal.js +3 -3
- package/dist/fns/drop-index/drop-index.browser.cjs +3 -3
- package/dist/fns/drop-index/drop-index.browser.js +3 -3
- package/dist/fns/drop-index/drop-index.cjs +3 -3
- package/dist/fns/drop-index/drop-index.js +3 -3
- package/dist/fns/drop-index/drop-index.schema.zod.browser.cjs +3 -1
- package/dist/fns/drop-index/drop-index.schema.zod.browser.js +3 -1
- package/dist/fns/drop-index/drop-index.schema.zod.cjs +3 -1
- package/dist/fns/drop-index/drop-index.schema.zod.js +3 -1
- package/dist/fns/export-balance-history/export-balance-history.browser.cjs +3 -3
- package/dist/fns/export-balance-history/export-balance-history.browser.js +3 -3
- package/dist/fns/export-balance-history/export-balance-history.cjs +3 -3
- package/dist/fns/export-balance-history/export-balance-history.js +3 -3
- package/dist/fns/find-indexes/find-indexes.browser.cjs +3 -3
- package/dist/fns/find-indexes/find-indexes.browser.js +3 -3
- package/dist/fns/find-indexes/find-indexes.cjs +3 -3
- package/dist/fns/find-indexes/find-indexes.js +3 -3
- package/dist/fns/get-balance/get-balance.browser.cjs +3 -3
- package/dist/fns/get-balance/get-balance.browser.js +3 -3
- package/dist/fns/get-balance/get-balance.cjs +3 -3
- package/dist/fns/get-balance/get-balance.js +3 -3
- package/dist/fns/get-balance-history/get-balance-history.browser.cjs +3 -3
- package/dist/fns/get-balance-history/get-balance-history.browser.js +3 -3
- package/dist/fns/get-balance-history/get-balance-history.cjs +3 -3
- package/dist/fns/get-balance-history/get-balance-history.js +3 -3
- package/dist/fns/get-export/get-export.browser.cjs +3 -3
- package/dist/fns/get-export/get-export.browser.js +3 -3
- package/dist/fns/get-export/get-export.cjs +3 -3
- package/dist/fns/get-export/get-export.js +3 -3
- package/dist/fns/get-flags/get-flags.browser.cjs +3 -3
- package/dist/fns/get-flags/get-flags.browser.js +3 -3
- package/dist/fns/get-flags/get-flags.cjs +3 -3
- package/dist/fns/get-flags/get-flags.js +3 -3
- package/dist/fns/get-statistics/get-statistics.browser.cjs +3 -3
- package/dist/fns/get-statistics/get-statistics.browser.js +3 -3
- package/dist/fns/get-statistics/get-statistics.cjs +3 -3
- package/dist/fns/get-statistics/get-statistics.js +3 -3
- package/dist/fns/get-token/get-token.browser.cjs +3 -3
- package/dist/fns/get-token/get-token.browser.js +3 -3
- package/dist/fns/get-token/get-token.cjs +3 -3
- package/dist/fns/get-token/get-token.js +3 -3
- package/dist/fns/get-transfer/get-transfer.browser.cjs +3 -3
- package/dist/fns/get-transfer/get-transfer.browser.js +3 -3
- package/dist/fns/get-transfer/get-transfer.cjs +3 -3
- package/dist/fns/get-transfer/get-transfer.js +3 -3
- package/dist/fns/get-transfer-group/get-transfer-group.browser.cjs +3 -3
- package/dist/fns/get-transfer-group/get-transfer-group.browser.js +3 -3
- package/dist/fns/get-transfer-group/get-transfer-group.cjs +3 -3
- package/dist/fns/get-transfer-group/get-transfer-group.js +3 -3
- package/dist/fns/get-wallet/get-wallet.browser.cjs +3 -3
- package/dist/fns/get-wallet/get-wallet.browser.js +3 -3
- package/dist/fns/get-wallet/get-wallet.cjs +3 -3
- package/dist/fns/get-wallet/get-wallet.js +3 -3
- package/dist/fns/healthcheck/healthcheck.browser.cjs +3 -3
- package/dist/fns/healthcheck/healthcheck.browser.js +3 -3
- package/dist/fns/healthcheck/healthcheck.cjs +3 -3
- package/dist/fns/healthcheck/healthcheck.js +3 -3
- package/dist/fns/list-exports/list-exports.browser.cjs +3 -3
- package/dist/fns/list-exports/list-exports.browser.js +3 -3
- package/dist/fns/list-exports/list-exports.cjs +3 -3
- package/dist/fns/list-exports/list-exports.js +3 -3
- package/dist/fns/reverse-transfer/reverse-transfer.browser.cjs +3 -3
- package/dist/fns/reverse-transfer/reverse-transfer.browser.js +3 -3
- package/dist/fns/reverse-transfer/reverse-transfer.cjs +3 -3
- package/dist/fns/reverse-transfer/reverse-transfer.js +3 -3
- package/dist/fns/reverse-transfer-group/reverse-transfer-group.browser.cjs +3 -3
- package/dist/fns/reverse-transfer-group/reverse-transfer-group.browser.js +3 -3
- package/dist/fns/reverse-transfer-group/reverse-transfer-group.cjs +3 -3
- package/dist/fns/reverse-transfer-group/reverse-transfer-group.js +3 -3
- package/dist/fns/set-flags/set-flags.browser.cjs +3 -3
- package/dist/fns/set-flags/set-flags.browser.js +3 -3
- package/dist/fns/set-flags/set-flags.cjs +3 -3
- package/dist/fns/set-flags/set-flags.js +3 -3
- package/dist/fns/update-apikey/update-apikey.browser.cjs +3 -3
- package/dist/fns/update-apikey/update-apikey.browser.js +3 -3
- package/dist/fns/update-apikey/update-apikey.cjs +3 -3
- package/dist/fns/update-apikey/update-apikey.js +3 -3
- package/dist/fns/update-token/update-token.browser.cjs +3 -3
- package/dist/fns/update-token/update-token.browser.js +3 -3
- package/dist/fns/update-token/update-token.cjs +3 -3
- package/dist/fns/update-token/update-token.js +3 -3
- package/dist/fns/update-transfer/update-transfer.browser.cjs +3 -3
- package/dist/fns/update-transfer/update-transfer.browser.js +3 -3
- package/dist/fns/update-transfer/update-transfer.cjs +3 -3
- package/dist/fns/update-transfer/update-transfer.js +3 -3
- package/dist/fns/update-transfer-group/update-transfer-group.browser.cjs +3 -3
- package/dist/fns/update-transfer-group/update-transfer-group.browser.js +3 -3
- package/dist/fns/update-transfer-group/update-transfer-group.cjs +3 -3
- package/dist/fns/update-transfer-group/update-transfer-group.js +3 -3
- package/dist/fns/update-wallet/update-wallet.browser.cjs +3 -3
- package/dist/fns/update-wallet/update-wallet.browser.js +3 -3
- package/dist/fns/update-wallet/update-wallet.cjs +3 -3
- package/dist/fns/update-wallet/update-wallet.js +3 -3
- package/dist/lib/debug.browser.cjs +10 -9
- package/dist/lib/debug.browser.js +10 -9
- package/dist/lib/debug.cjs +10 -9
- package/dist/lib/debug.js +10 -9
- package/dist/lib/env.browser.cjs +1 -1
- package/dist/lib/env.browser.js +1 -1
- package/dist/lib/env.cjs +1 -1
- package/dist/lib/env.js +1 -1
- package/dist/lib/polyfill.browser.cjs +13 -19
- package/dist/lib/polyfill.browser.js +13 -19
- package/dist/lib/polyfill.cjs +14 -20
- package/dist/lib/polyfill.js +13 -19
- package/dist/lib/query-builder/query-builder.browser.js +3 -1
- package/dist/lib/query-builder/query-builder.js +3 -1
- package/dist/lib/stream-promise.browser.cjs +2 -1
- package/dist/lib/stream-promise.browser.js +2 -1
- package/dist/lib/stream-promise.cjs +2 -1
- package/dist/lib/stream-promise.js +2 -1
- package/dist/lib/streams.browser.cjs +1 -53
- package/dist/lib/streams.browser.js +1 -53
- package/dist/lib/streams.cjs +2 -56
- package/dist/lib/streams.js +1 -53
- package/dist/lib/utils.browser.cjs +9 -4
- package/dist/lib/utils.browser.js +9 -4
- package/dist/lib/utils.cjs +10 -4
- package/dist/lib/utils.js +9 -4
- package/dist/lib/validator.browser.cjs +478 -106
- package/dist/lib/validator.browser.js +478 -106
- package/dist/lib/validator.cjs +478 -106
- package/dist/lib/validator.js +478 -106
- package/dist/txs/tx-map.generated.browser.cjs +84 -0
- package/dist/txs/tx-map.generated.browser.js +63 -0
- package/dist/txs/tx-map.generated.cjs +88 -0
- package/dist/txs/tx-map.generated.js +63 -0
- package/dist/txs/update-token/update-token.schema.zod.browser.cjs +3 -2
- package/dist/txs/update-token/update-token.schema.zod.browser.js +4 -3
- package/dist/txs/update-token/update-token.schema.zod.cjs +3 -2
- package/dist/txs/update-token/update-token.schema.zod.js +4 -3
- package/dist/txs/update-wallet/update-wallet.schema.zod.browser.cjs +2 -1
- package/dist/txs/update-wallet/update-wallet.schema.zod.browser.js +3 -2
- package/dist/txs/update-wallet/update-wallet.schema.zod.cjs +2 -1
- package/dist/txs/update-wallet/update-wallet.schema.zod.js +3 -2
- package/dist/types/wapi-client.d.ts +32114 -32232
- package/dist/wapi-client.browser.cjs +0 -2
- package/dist/wapi-client.browser.js +0 -2
- package/dist/wapi-client.cjs +0 -2
- package/dist/wapi-client.iife.js +14 -14
- package/dist/wapi-client.js +0 -2
- package/package.json +3 -3
- package/dist/lib/stream-promise-input.browser.cjs +0 -64
- package/dist/lib/stream-promise-input.browser.js +0 -45
- package/dist/lib/stream-promise-input.cjs +0 -68
- package/dist/lib/stream-promise-input.js +0 -45
|
@@ -45,7 +45,26 @@ import {
|
|
|
45
45
|
JSONRPC
|
|
46
46
|
} from "./jsonrpc/jsonrpc.enums.browser.js";
|
|
47
47
|
import { WapiClientType } from "../wapi-client.browser.js";
|
|
48
|
+
import { TX_NAMES } from "../txs/tx-map.generated.browser.js";
|
|
48
49
|
import { Validator } from "../lib/validator.browser.js";
|
|
50
|
+
var txValidators = Validator;
|
|
51
|
+
function sendTx(client, name, input) {
|
|
52
|
+
const inputCopy = txValidators[`${name}TxInput`].validateInputWOptions(
|
|
53
|
+
input != null ? input : {}
|
|
54
|
+
);
|
|
55
|
+
return client._sendRaw(name, inputCopy);
|
|
56
|
+
}
|
|
57
|
+
function installTxMethods(proto) {
|
|
58
|
+
for (const name of TX_NAMES) {
|
|
59
|
+
Object.defineProperty(proto, name, {
|
|
60
|
+
configurable: false,
|
|
61
|
+
writable: false,
|
|
62
|
+
value(input) {
|
|
63
|
+
return sendTx(this, name, input);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
49
68
|
var BaseClient = class {
|
|
50
69
|
constructor(connection, connectionType, $connect) {
|
|
51
70
|
__publicField(this, "type");
|
|
@@ -70,7 +89,6 @@ var BaseClient = class {
|
|
|
70
89
|
));
|
|
71
90
|
__publicField(this, "_requests", /* @__PURE__ */ new Map());
|
|
72
91
|
__publicField(this, "_error", false);
|
|
73
|
-
__publicField(this, "_sending", /* @__PURE__ */ new Map());
|
|
74
92
|
__publicField(this, "sendingTimeout");
|
|
75
93
|
__publicField(this, "requestTimeout", 12e4);
|
|
76
94
|
this.type = connectionType;
|
|
@@ -112,18 +130,21 @@ var BaseClient = class {
|
|
|
112
130
|
throw new Error("JSONRPCMessage.id should not be null");
|
|
113
131
|
}
|
|
114
132
|
if (error) {
|
|
115
|
-
|
|
116
|
-
request.error(error);
|
|
117
|
-
} else if ("stream" in request) {
|
|
118
|
-
request.stream.destroy(error);
|
|
119
|
-
}
|
|
133
|
+
request.stream.destroy(error);
|
|
120
134
|
} else if (!request.stream.destroyed) {
|
|
121
135
|
request.stream.push(null);
|
|
122
136
|
}
|
|
123
137
|
clearTimeout(request.requestTimeout);
|
|
124
138
|
clearTimeout(request.sendingTimeout);
|
|
125
139
|
this._requests.delete(key);
|
|
126
|
-
|
|
140
|
+
}
|
|
141
|
+
_failRequest(id, error) {
|
|
142
|
+
const requestInfo = this._requests.get(id);
|
|
143
|
+
if (!requestInfo) {
|
|
144
|
+
debugLog("No Request found to fail", id, error);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
this._completeRequest(requestInfo, error);
|
|
127
148
|
}
|
|
128
149
|
_fireConnectionLost(requestInfo) {
|
|
129
150
|
const error = new StreamError("CONNECTION_LOST", {
|
|
@@ -144,7 +165,7 @@ var BaseClient = class {
|
|
|
144
165
|
return this._completeRequest(requestInfo, error);
|
|
145
166
|
}
|
|
146
167
|
_handleMessage(incoming) {
|
|
147
|
-
var _a
|
|
168
|
+
var _a;
|
|
148
169
|
if (this.hooks.message) {
|
|
149
170
|
this.hooks.message(incoming);
|
|
150
171
|
}
|
|
@@ -176,25 +197,9 @@ var BaseClient = class {
|
|
|
176
197
|
delete requestInfo.requestTimeout;
|
|
177
198
|
return;
|
|
178
199
|
}
|
|
179
|
-
if ("handle" in requestInfo) {
|
|
180
|
-
requestInfo.handle(responseMessage);
|
|
181
|
-
delete requestInfo.handle;
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
if (responseMessage.error && "error" in requestInfo) {
|
|
185
|
-
requestInfo.error(responseMessage.error);
|
|
186
|
-
}
|
|
187
200
|
const message = responseMessage;
|
|
188
|
-
if (((_a = message.result) == null ? void 0 : _a.type) === JSONRPC.streamPause && "pause" in requestInfo) {
|
|
189
|
-
requestInfo.pause();
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
if (((_b = message.result) == null ? void 0 : _b.type) === JSONRPC.streamResume && "resume" in requestInfo) {
|
|
193
|
-
requestInfo.resume();
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
201
|
const { stream, start } = requestInfo;
|
|
197
|
-
if (((
|
|
202
|
+
if (((_a = message.result) == null ? void 0 : _a.type) === JSONRPC.streamChunk) {
|
|
198
203
|
stream.push(message.result);
|
|
199
204
|
return;
|
|
200
205
|
}
|
|
@@ -209,14 +214,6 @@ var BaseClient = class {
|
|
|
209
214
|
});
|
|
210
215
|
}
|
|
211
216
|
}
|
|
212
|
-
// private _sendTransaction<Input, Output>(
|
|
213
|
-
// name: ValuesOf<typeof APIFunctions>,
|
|
214
|
-
// input: Input,
|
|
215
|
-
// ): StreamPromise<Output> {
|
|
216
|
-
// // This will throw if invalid
|
|
217
|
-
// const inputCopy = APIValidators[name](input);
|
|
218
|
-
// return this._sendRaw<Input, Output>(name, inputCopy as Input);
|
|
219
|
-
// }
|
|
220
217
|
_sendRaw(method, params) {
|
|
221
218
|
const jsonRpcMessage = {
|
|
222
219
|
jsonrpc: JSONRPC.version,
|
|
@@ -254,931 +251,8 @@ var BaseClient = class {
|
|
|
254
251
|
this._send(jsonRpcMessage);
|
|
255
252
|
}));
|
|
256
253
|
}
|
|
257
|
-
// private _streamTransaction<
|
|
258
|
-
// InputOptions,
|
|
259
|
-
// InputChunk,
|
|
260
|
-
// Output,
|
|
261
|
-
// PreTransformChunkType = InputChunk,
|
|
262
|
-
// >(
|
|
263
|
-
// name: ValuesOf<typeof APIFunctions>,
|
|
264
|
-
// isInputChunk: (data: unknown) => data is InputChunk,
|
|
265
|
-
// options?: InputOptions,
|
|
266
|
-
// transform?: TransformStream<PreTransformChunkType, InputChunk>,
|
|
267
|
-
// ): StreamPromiseInput<Output, PreTransformChunkType> {
|
|
268
|
-
// const start = Date.now();
|
|
269
|
-
// const streamId = getRandomHex();
|
|
270
|
-
// let _error: Error | IJSONRPCError;
|
|
271
|
-
// const sendToStream = ({
|
|
272
|
-
// stream,
|
|
273
|
-
// method,
|
|
274
|
-
// params,
|
|
275
|
-
// }: {
|
|
276
|
-
// stream: ReadStream;
|
|
277
|
-
// method: 'streamData' | 'streamError' | 'streamEnd';
|
|
278
|
-
// params: { data?: InputChunk; error?: Error; encoding?: string };
|
|
279
|
-
// }) => {
|
|
280
|
-
// if (_error) {
|
|
281
|
-
// return;
|
|
282
|
-
// }
|
|
283
|
-
// const streamMessage: JSONRPCRequest = {
|
|
284
|
-
// jsonrpc: JSONRPC.version,
|
|
285
|
-
// method,
|
|
286
|
-
// params: {
|
|
287
|
-
// streamId,
|
|
288
|
-
// ...params,
|
|
289
|
-
// },
|
|
290
|
-
// id: getRandomHex(),
|
|
291
|
-
// };
|
|
292
|
-
// this._setSending(streamMessage, stream);
|
|
293
|
-
// this._send(streamMessage);
|
|
294
|
-
// };
|
|
295
|
-
// const sendErrorToStream = (stream: ReadStream, error: Error) => {
|
|
296
|
-
// if (_error) {
|
|
297
|
-
// return;
|
|
298
|
-
// }
|
|
299
|
-
// sendToStream({
|
|
300
|
-
// stream,
|
|
301
|
-
// method: 'streamError',
|
|
302
|
-
// params: {
|
|
303
|
-
// error,
|
|
304
|
-
// },
|
|
305
|
-
// });
|
|
306
|
-
// _error = error;
|
|
307
|
-
// stream.push({
|
|
308
|
-
// error,
|
|
309
|
-
// });
|
|
310
|
-
// };
|
|
311
|
-
// const inputStream = new ReadWriteStream();
|
|
312
|
-
// const finalInputStream = transform
|
|
313
|
-
// ? inputStream.pipe(transform)
|
|
314
|
-
// : inputStream;
|
|
315
|
-
// const streamStartMessage: JSONRPCRequest = {
|
|
316
|
-
// jsonrpc: JSONRPC.version,
|
|
317
|
-
// method: 'streamStart',
|
|
318
|
-
// params: {
|
|
319
|
-
// method: name,
|
|
320
|
-
// options,
|
|
321
|
-
// },
|
|
322
|
-
// id: streamId,
|
|
323
|
-
// };
|
|
324
|
-
// if (
|
|
325
|
-
// this.hooks.preflight &&
|
|
326
|
-
// this.hooks.preflight(streamStartMessage) === false
|
|
327
|
-
// ) {
|
|
328
|
-
// // If this.hooks.preflight returns false then we dont send
|
|
329
|
-
// return new StreamPromiseInput<Output, PreTransformChunkType>();
|
|
330
|
-
// }
|
|
331
|
-
// return new StreamPromiseInput(async (stream: ReadStream) => {
|
|
332
|
-
// if (this._error) {
|
|
333
|
-
// this._reconnect(5);
|
|
334
|
-
// }
|
|
335
|
-
// if (!this.isConnected) {
|
|
336
|
-
// await this.$connect;
|
|
337
|
-
// }
|
|
338
|
-
// if (this._error) {
|
|
339
|
-
// throw this._error;
|
|
340
|
-
// }
|
|
341
|
-
// let timeout: ReturnType<typeof setTimeout> | null = setTimeout(() => {
|
|
342
|
-
// stream.push({
|
|
343
|
-
// error: new StreamError('INPUT_STREAM_TIMEOUT', { streamId }),
|
|
344
|
-
// });
|
|
345
|
-
// }, 30000);
|
|
346
|
-
// // Open response
|
|
347
|
-
// this._requests.set(streamStartMessage.id!, {
|
|
348
|
-
// stream,
|
|
349
|
-
// start,
|
|
350
|
-
// error(error: IJSONRPCError) {
|
|
351
|
-
// _error = error;
|
|
352
|
-
// debugLog('stream:error()>', error);
|
|
353
|
-
// },
|
|
354
|
-
// pause() {
|
|
355
|
-
// inputStream.pause();
|
|
356
|
-
// },
|
|
357
|
-
// resume() {
|
|
358
|
-
// inputStream.resume();
|
|
359
|
-
// },
|
|
360
|
-
// handle(message: JSONRPCResponse) {
|
|
361
|
-
// if (message.error) {
|
|
362
|
-
// stream.push(message);
|
|
363
|
-
// return;
|
|
364
|
-
// }
|
|
365
|
-
// finalInputStream
|
|
366
|
-
// .on('data', (chunk: InputChunk) => {
|
|
367
|
-
// if (_error) {
|
|
368
|
-
// return;
|
|
369
|
-
// }
|
|
370
|
-
// if (timeout) {
|
|
371
|
-
// clearTimeout(timeout);
|
|
372
|
-
// timeout = null;
|
|
373
|
-
// }
|
|
374
|
-
// if (!isInputChunk(chunk)) {
|
|
375
|
-
// sendErrorToStream(
|
|
376
|
-
// stream,
|
|
377
|
-
// new StreamError('INVALID_INPUT_STREAM_CHUNK', {
|
|
378
|
-
// streamId,
|
|
379
|
-
// chunk,
|
|
380
|
-
// }),
|
|
381
|
-
// );
|
|
382
|
-
// return;
|
|
383
|
-
// }
|
|
384
|
-
// sendToStream({
|
|
385
|
-
// stream,
|
|
386
|
-
// method: 'streamData',
|
|
387
|
-
// params: {
|
|
388
|
-
// data: chunk,
|
|
389
|
-
// },
|
|
390
|
-
// });
|
|
391
|
-
// })
|
|
392
|
-
// .on('error', (error: Error) => {
|
|
393
|
-
// if (_error) {
|
|
394
|
-
// return;
|
|
395
|
-
// }
|
|
396
|
-
// if (timeout) {
|
|
397
|
-
// clearTimeout(timeout);
|
|
398
|
-
// timeout = null;
|
|
399
|
-
// }
|
|
400
|
-
// sendToStream({
|
|
401
|
-
// stream,
|
|
402
|
-
// method: 'streamError',
|
|
403
|
-
// params: {
|
|
404
|
-
// error,
|
|
405
|
-
// },
|
|
406
|
-
// });
|
|
407
|
-
// stream.push({
|
|
408
|
-
// error: new StreamError('INPUT_STREAM_ERROR', {
|
|
409
|
-
// streamId,
|
|
410
|
-
// error,
|
|
411
|
-
// }),
|
|
412
|
-
// });
|
|
413
|
-
// })
|
|
414
|
-
// .on('end', () => {
|
|
415
|
-
// if (timeout) {
|
|
416
|
-
// clearTimeout(timeout);
|
|
417
|
-
// timeout = null;
|
|
418
|
-
// }
|
|
419
|
-
// sendToStream({
|
|
420
|
-
// stream,
|
|
421
|
-
// method: 'streamEnd',
|
|
422
|
-
// params: {},
|
|
423
|
-
// });
|
|
424
|
-
// });
|
|
425
|
-
// },
|
|
426
|
-
// });
|
|
427
|
-
// this._setSending(streamStartMessage, stream);
|
|
428
|
-
// this._send(streamStartMessage);
|
|
429
|
-
// }, inputStream);
|
|
430
|
-
// }
|
|
431
|
-
// TXSDEFS
|
|
432
|
-
/*
|
|
433
|
-
* THIS IS AUTOGENERATED, DO NOT EDIT MANUALLY
|
|
434
|
-
* if you need custom code add it outside this block
|
|
435
|
-
*/
|
|
436
|
-
/**
|
|
437
|
-
*
|
|
438
|
-
* @param {AggregateTransferManyTxInput} input
|
|
439
|
-
* @returns {StreamPromise<AggregateTransferManyTxOutput>}
|
|
440
|
-
*
|
|
441
|
-
*/
|
|
442
|
-
aggregateTransferMany(input) {
|
|
443
|
-
const inputCopy = Validator.aggregateTransferManyTxInput.validateInputWOptions(input);
|
|
444
|
-
return this._sendRaw("aggregateTransferMany", inputCopy);
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
|
-
*
|
|
448
|
-
* @param {AuthenticationCheckTxInput} input
|
|
449
|
-
* @returns {StreamPromise<AuthenticationCheckTxOutput>}
|
|
450
|
-
*
|
|
451
|
-
*/
|
|
452
|
-
authenticationCheck(input) {
|
|
453
|
-
const inputCopy = Validator.authenticationCheckTxInput.validateInputWOptions(input != null ? input : {});
|
|
454
|
-
return this._sendRaw("authenticationCheck", inputCopy);
|
|
455
|
-
}
|
|
456
|
-
/**
|
|
457
|
-
*
|
|
458
|
-
* @param {CreateAccessTokenTxInput} input
|
|
459
|
-
* @returns {StreamPromise<CreateAccessTokenTxOutput>}
|
|
460
|
-
*
|
|
461
|
-
*/
|
|
462
|
-
createAccessToken(input) {
|
|
463
|
-
const inputCopy = Validator.createAccessTokenTxInput.validateInputWOptions(input);
|
|
464
|
-
return this._sendRaw(
|
|
465
|
-
"createAccessToken",
|
|
466
|
-
inputCopy
|
|
467
|
-
);
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
*
|
|
471
|
-
* @param {CreateApikeyTxInput} input
|
|
472
|
-
* @returns {StreamPromise<CreateApikeyTxOutput>}
|
|
473
|
-
*
|
|
474
|
-
*/
|
|
475
|
-
createApikey(input) {
|
|
476
|
-
const inputCopy = Validator.createApikeyTxInput.validateInputWOptions(input);
|
|
477
|
-
return this._sendRaw(
|
|
478
|
-
"createApikey",
|
|
479
|
-
inputCopy
|
|
480
|
-
);
|
|
481
|
-
}
|
|
482
|
-
/**
|
|
483
|
-
*
|
|
484
|
-
* @param {CreateContractTxInput} input
|
|
485
|
-
* @returns {StreamPromise<CreateContractTxOutput>}
|
|
486
|
-
*
|
|
487
|
-
*/
|
|
488
|
-
createContract(input) {
|
|
489
|
-
const inputCopy = Validator.createContractTxInput.validateInputWOptions(input);
|
|
490
|
-
return this._sendRaw(
|
|
491
|
-
"createContract",
|
|
492
|
-
inputCopy
|
|
493
|
-
);
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
*
|
|
497
|
-
* @param {CreateDepositTxInput} input
|
|
498
|
-
* @returns {StreamPromise<CreateDepositTxOutput>}
|
|
499
|
-
*
|
|
500
|
-
*/
|
|
501
|
-
createDeposit(input) {
|
|
502
|
-
const inputCopy = Validator.createDepositTxInput.validateInputWOptions(input);
|
|
503
|
-
return this._sendRaw(
|
|
504
|
-
"createDeposit",
|
|
505
|
-
inputCopy
|
|
506
|
-
);
|
|
507
|
-
}
|
|
508
|
-
/**
|
|
509
|
-
*
|
|
510
|
-
* @param {CreateDistributionTxInput} input
|
|
511
|
-
* @returns {StreamPromise<CreateDistributionTxOutput>}
|
|
512
|
-
*
|
|
513
|
-
*/
|
|
514
|
-
createDistribution(input) {
|
|
515
|
-
const inputCopy = Validator.createDistributionTxInput.validateInputWOptions(input);
|
|
516
|
-
return this._sendRaw(
|
|
517
|
-
"createDistribution",
|
|
518
|
-
inputCopy
|
|
519
|
-
);
|
|
520
|
-
}
|
|
521
|
-
/**
|
|
522
|
-
*
|
|
523
|
-
* @param {CreateIndexTxInput} input
|
|
524
|
-
* @returns {StreamPromise<CreateIndexTxOutput>}
|
|
525
|
-
*
|
|
526
|
-
*/
|
|
527
|
-
createIndex(input) {
|
|
528
|
-
const inputCopy = Validator.createIndexTxInput.validateInputWOptions(input);
|
|
529
|
-
return this._sendRaw(
|
|
530
|
-
"createIndex",
|
|
531
|
-
inputCopy
|
|
532
|
-
);
|
|
533
|
-
}
|
|
534
|
-
/**
|
|
535
|
-
*
|
|
536
|
-
* @param {CreateTokenTxInput} input
|
|
537
|
-
* @returns {StreamPromise<CreateTokenTxOutput>}
|
|
538
|
-
*
|
|
539
|
-
*/
|
|
540
|
-
createToken(input) {
|
|
541
|
-
const inputCopy = Validator.createTokenTxInput.validateInputWOptions(input);
|
|
542
|
-
return this._sendRaw(
|
|
543
|
-
"createToken",
|
|
544
|
-
inputCopy
|
|
545
|
-
);
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
548
|
-
*
|
|
549
|
-
* @param {CreateTransferTxInput} input
|
|
550
|
-
* @returns {StreamPromise<CreateTransferTxOutput>}
|
|
551
|
-
*
|
|
552
|
-
*/
|
|
553
|
-
createTransfer(input) {
|
|
554
|
-
const inputCopy = Validator.createTransferTxInput.validateInputWOptions(input);
|
|
555
|
-
return this._sendRaw(
|
|
556
|
-
"createTransfer",
|
|
557
|
-
inputCopy
|
|
558
|
-
);
|
|
559
|
-
}
|
|
560
|
-
/**
|
|
561
|
-
*
|
|
562
|
-
* @param {CreateTransferGroupTxInput} input
|
|
563
|
-
* @returns {StreamPromise<CreateTransferGroupTxOutput>}
|
|
564
|
-
*
|
|
565
|
-
*/
|
|
566
|
-
createTransferGroup(input) {
|
|
567
|
-
const inputCopy = Validator.createTransferGroupTxInput.validateInputWOptions(input != null ? input : {});
|
|
568
|
-
return this._sendRaw("createTransferGroup", inputCopy);
|
|
569
|
-
}
|
|
570
|
-
/**
|
|
571
|
-
*
|
|
572
|
-
* @param {CreateTransferManyTxInput} input
|
|
573
|
-
* @returns {StreamPromise<CreateTransferManyTxOutput>}
|
|
574
|
-
*
|
|
575
|
-
*/
|
|
576
|
-
createTransferMany(input) {
|
|
577
|
-
const inputCopy = Validator.createTransferManyTxInput.validateInputWOptions(input);
|
|
578
|
-
return this._sendRaw(
|
|
579
|
-
"createTransferMany",
|
|
580
|
-
inputCopy
|
|
581
|
-
);
|
|
582
|
-
}
|
|
583
|
-
/**
|
|
584
|
-
*
|
|
585
|
-
* @param {CreateWalletTxInput} input
|
|
586
|
-
* @returns {StreamPromise<CreateWalletTxOutput>}
|
|
587
|
-
*
|
|
588
|
-
*/
|
|
589
|
-
createWallet(input) {
|
|
590
|
-
const inputCopy = Validator.createWalletTxInput.validateInputWOptions(input);
|
|
591
|
-
return this._sendRaw(
|
|
592
|
-
"createWallet",
|
|
593
|
-
inputCopy
|
|
594
|
-
);
|
|
595
|
-
}
|
|
596
|
-
/**
|
|
597
|
-
*
|
|
598
|
-
* @param {CreateWithdrawalTxInput} input
|
|
599
|
-
* @returns {StreamPromise<CreateWithdrawalTxOutput>}
|
|
600
|
-
*
|
|
601
|
-
*/
|
|
602
|
-
createWithdrawal(input) {
|
|
603
|
-
const inputCopy = Validator.createWithdrawalTxInput.validateInputWOptions(input);
|
|
604
|
-
return this._sendRaw(
|
|
605
|
-
"createWithdrawal",
|
|
606
|
-
inputCopy
|
|
607
|
-
);
|
|
608
|
-
}
|
|
609
|
-
/**
|
|
610
|
-
*
|
|
611
|
-
* @param {DropIndexTxInput} input
|
|
612
|
-
* @returns {StreamPromise<DropIndexTxOutput>}
|
|
613
|
-
*
|
|
614
|
-
*/
|
|
615
|
-
dropIndex(input) {
|
|
616
|
-
const inputCopy = Validator.dropIndexTxInput.validateInputWOptions(input);
|
|
617
|
-
return this._sendRaw(
|
|
618
|
-
"dropIndex",
|
|
619
|
-
inputCopy
|
|
620
|
-
);
|
|
621
|
-
}
|
|
622
|
-
/**
|
|
623
|
-
*
|
|
624
|
-
* @param {ExportBalanceHistoryTxInput} input
|
|
625
|
-
* @returns {StreamPromise<ExportBalanceHistoryTxOutput>}
|
|
626
|
-
*
|
|
627
|
-
*/
|
|
628
|
-
exportBalanceHistory(input) {
|
|
629
|
-
const inputCopy = Validator.exportBalanceHistoryTxInput.validateInputWOptions(input);
|
|
630
|
-
return this._sendRaw("exportBalanceHistory", inputCopy);
|
|
631
|
-
}
|
|
632
|
-
/**
|
|
633
|
-
*
|
|
634
|
-
* @param {ExportBalanceManyTxInput} input
|
|
635
|
-
* @returns {StreamPromise<ExportBalanceManyTxOutput>}
|
|
636
|
-
*
|
|
637
|
-
*/
|
|
638
|
-
exportBalanceMany(input) {
|
|
639
|
-
const inputCopy = Validator.exportBalanceManyTxInput.validateInputWOptions(
|
|
640
|
-
input != null ? input : {}
|
|
641
|
-
);
|
|
642
|
-
return this._sendRaw(
|
|
643
|
-
"exportBalanceMany",
|
|
644
|
-
inputCopy
|
|
645
|
-
);
|
|
646
|
-
}
|
|
647
|
-
/**
|
|
648
|
-
*
|
|
649
|
-
* @param {ExportTokenManyTxInput} input
|
|
650
|
-
* @returns {StreamPromise<ExportTokenManyTxOutput>}
|
|
651
|
-
*
|
|
652
|
-
*/
|
|
653
|
-
exportTokenMany(input) {
|
|
654
|
-
const inputCopy = Validator.exportTokenManyTxInput.validateInputWOptions(
|
|
655
|
-
input != null ? input : {}
|
|
656
|
-
);
|
|
657
|
-
return this._sendRaw(
|
|
658
|
-
"exportTokenMany",
|
|
659
|
-
inputCopy
|
|
660
|
-
);
|
|
661
|
-
}
|
|
662
|
-
/**
|
|
663
|
-
*
|
|
664
|
-
* @param {ExportTransferGroupManyTxInput} input
|
|
665
|
-
* @returns {StreamPromise<ExportTransferGroupManyTxOutput>}
|
|
666
|
-
*
|
|
667
|
-
*/
|
|
668
|
-
exportTransferGroupMany(input) {
|
|
669
|
-
const inputCopy = Validator.exportTransferGroupManyTxInput.validateInputWOptions(
|
|
670
|
-
input != null ? input : {}
|
|
671
|
-
);
|
|
672
|
-
return this._sendRaw("exportTransferGroupMany", inputCopy);
|
|
673
|
-
}
|
|
674
|
-
/**
|
|
675
|
-
*
|
|
676
|
-
* @param {ExportTransferManyTxInput} input
|
|
677
|
-
* @returns {StreamPromise<ExportTransferManyTxOutput>}
|
|
678
|
-
*
|
|
679
|
-
*/
|
|
680
|
-
exportTransferMany(input) {
|
|
681
|
-
const inputCopy = Validator.exportTransferManyTxInput.validateInputWOptions(
|
|
682
|
-
input != null ? input : {}
|
|
683
|
-
);
|
|
684
|
-
return this._sendRaw(
|
|
685
|
-
"exportTransferMany",
|
|
686
|
-
inputCopy
|
|
687
|
-
);
|
|
688
|
-
}
|
|
689
|
-
/**
|
|
690
|
-
*
|
|
691
|
-
* @param {ExportWalletManyTxInput} input
|
|
692
|
-
* @returns {StreamPromise<ExportWalletManyTxOutput>}
|
|
693
|
-
*
|
|
694
|
-
*/
|
|
695
|
-
exportWalletMany(input) {
|
|
696
|
-
const inputCopy = Validator.exportWalletManyTxInput.validateInputWOptions(
|
|
697
|
-
input != null ? input : {}
|
|
698
|
-
);
|
|
699
|
-
return this._sendRaw(
|
|
700
|
-
"exportWalletMany",
|
|
701
|
-
inputCopy
|
|
702
|
-
);
|
|
703
|
-
}
|
|
704
|
-
/**
|
|
705
|
-
*
|
|
706
|
-
* @param {FindApikeyManyTxInput} input
|
|
707
|
-
* @returns {StreamPromise<FindApikeyManyTxOutput>}
|
|
708
|
-
*
|
|
709
|
-
*/
|
|
710
|
-
findApikeyMany(input) {
|
|
711
|
-
const inputCopy = Validator.findApikeyManyTxInput.validateInputWOptions(
|
|
712
|
-
input != null ? input : {}
|
|
713
|
-
);
|
|
714
|
-
return this._sendRaw(
|
|
715
|
-
"findApikeyMany",
|
|
716
|
-
inputCopy
|
|
717
|
-
);
|
|
718
|
-
}
|
|
719
|
-
/**
|
|
720
|
-
*
|
|
721
|
-
* @param {FindBalanceManyTxInput} input
|
|
722
|
-
* @returns {StreamPromise<FindBalanceManyTxOutput>}
|
|
723
|
-
*
|
|
724
|
-
*/
|
|
725
|
-
findBalanceMany(input) {
|
|
726
|
-
const inputCopy = Validator.findBalanceManyTxInput.validateInputWOptions(
|
|
727
|
-
input != null ? input : {}
|
|
728
|
-
);
|
|
729
|
-
return this._sendRaw(
|
|
730
|
-
"findBalanceMany",
|
|
731
|
-
inputCopy
|
|
732
|
-
);
|
|
733
|
-
}
|
|
734
|
-
/**
|
|
735
|
-
*
|
|
736
|
-
* @param {FindIndexManyTxInput} input
|
|
737
|
-
* @returns {StreamPromise<FindIndexManyTxOutput>}
|
|
738
|
-
*
|
|
739
|
-
*/
|
|
740
|
-
findIndexMany(input) {
|
|
741
|
-
const inputCopy = Validator.findIndexManyTxInput.validateInputWOptions(
|
|
742
|
-
input != null ? input : {}
|
|
743
|
-
);
|
|
744
|
-
return this._sendRaw(
|
|
745
|
-
"findIndexMany",
|
|
746
|
-
inputCopy
|
|
747
|
-
);
|
|
748
|
-
}
|
|
749
|
-
/**
|
|
750
|
-
*
|
|
751
|
-
* @param {FindTokenManyTxInput} input
|
|
752
|
-
* @returns {StreamPromise<FindTokenManyTxOutput>}
|
|
753
|
-
*
|
|
754
|
-
*/
|
|
755
|
-
findTokenMany(input) {
|
|
756
|
-
const inputCopy = Validator.findTokenManyTxInput.validateInputWOptions(
|
|
757
|
-
input != null ? input : {}
|
|
758
|
-
);
|
|
759
|
-
return this._sendRaw(
|
|
760
|
-
"findTokenMany",
|
|
761
|
-
inputCopy
|
|
762
|
-
);
|
|
763
|
-
}
|
|
764
|
-
/**
|
|
765
|
-
*
|
|
766
|
-
* @param {FindTransferGroupManyTxInput} input
|
|
767
|
-
* @returns {StreamPromise<FindTransferGroupManyTxOutput>}
|
|
768
|
-
*
|
|
769
|
-
*/
|
|
770
|
-
findTransferGroupMany(input) {
|
|
771
|
-
const inputCopy = Validator.findTransferGroupManyTxInput.validateInputWOptions(input != null ? input : {});
|
|
772
|
-
return this._sendRaw("findTransferGroupMany", inputCopy);
|
|
773
|
-
}
|
|
774
|
-
/**
|
|
775
|
-
*
|
|
776
|
-
* @param {FindTransferManyTxInput} input
|
|
777
|
-
* @returns {StreamPromise<FindTransferManyTxOutput>}
|
|
778
|
-
*
|
|
779
|
-
*/
|
|
780
|
-
findTransferMany(input) {
|
|
781
|
-
const inputCopy = Validator.findTransferManyTxInput.validateInputWOptions(
|
|
782
|
-
input != null ? input : {}
|
|
783
|
-
);
|
|
784
|
-
return this._sendRaw(
|
|
785
|
-
"findTransferMany",
|
|
786
|
-
inputCopy
|
|
787
|
-
);
|
|
788
|
-
}
|
|
789
|
-
/**
|
|
790
|
-
*
|
|
791
|
-
* @param {FindWalletManyTxInput} input
|
|
792
|
-
* @returns {StreamPromise<FindWalletManyTxOutput>}
|
|
793
|
-
*
|
|
794
|
-
*/
|
|
795
|
-
findWalletMany(input) {
|
|
796
|
-
const inputCopy = Validator.findWalletManyTxInput.validateInputWOptions(
|
|
797
|
-
input != null ? input : {}
|
|
798
|
-
);
|
|
799
|
-
return this._sendRaw(
|
|
800
|
-
"findWalletMany",
|
|
801
|
-
inputCopy
|
|
802
|
-
);
|
|
803
|
-
}
|
|
804
|
-
/**
|
|
805
|
-
*
|
|
806
|
-
* @param {FinishTransactionTxInput} input
|
|
807
|
-
* @returns {StreamPromise<FinishTransactionTxOutput>}
|
|
808
|
-
*
|
|
809
|
-
*/
|
|
810
|
-
finishTransaction(input) {
|
|
811
|
-
const inputCopy = Validator.finishTransactionTxInput.validateInputWOptions(input);
|
|
812
|
-
return this._sendRaw(
|
|
813
|
-
"finishTransaction",
|
|
814
|
-
inputCopy
|
|
815
|
-
);
|
|
816
|
-
}
|
|
817
|
-
/**
|
|
818
|
-
*
|
|
819
|
-
* @param {GetBalanceTxInput} input
|
|
820
|
-
* @returns {StreamPromise<GetBalanceTxOutput>}
|
|
821
|
-
*
|
|
822
|
-
*/
|
|
823
|
-
getBalance(input) {
|
|
824
|
-
const inputCopy = Validator.getBalanceTxInput.validateInputWOptions(input);
|
|
825
|
-
return this._sendRaw(
|
|
826
|
-
"getBalance",
|
|
827
|
-
inputCopy
|
|
828
|
-
);
|
|
829
|
-
}
|
|
830
|
-
/**
|
|
831
|
-
*
|
|
832
|
-
* @param {GetBalanceHistoryTxInput} input
|
|
833
|
-
* @returns {StreamPromise<GetBalanceHistoryTxOutput>}
|
|
834
|
-
*
|
|
835
|
-
*/
|
|
836
|
-
getBalanceHistory(input) {
|
|
837
|
-
const inputCopy = Validator.getBalanceHistoryTxInput.validateInputWOptions(input);
|
|
838
|
-
return this._sendRaw(
|
|
839
|
-
"getBalanceHistory",
|
|
840
|
-
inputCopy
|
|
841
|
-
);
|
|
842
|
-
}
|
|
843
|
-
/**
|
|
844
|
-
*
|
|
845
|
-
* @param {GetExportTxInput} input
|
|
846
|
-
* @returns {StreamPromise<GetExportTxOutput>}
|
|
847
|
-
*
|
|
848
|
-
*/
|
|
849
|
-
getExport(input) {
|
|
850
|
-
const inputCopy = Validator.getExportTxInput.validateInputWOptions(input);
|
|
851
|
-
return this._sendRaw(
|
|
852
|
-
"getExport",
|
|
853
|
-
inputCopy
|
|
854
|
-
);
|
|
855
|
-
}
|
|
856
|
-
/**
|
|
857
|
-
*
|
|
858
|
-
* @param {GetFlagsTxInput} input
|
|
859
|
-
* @returns {StreamPromise<GetFlagsTxOutput>}
|
|
860
|
-
*
|
|
861
|
-
*/
|
|
862
|
-
getFlags(input) {
|
|
863
|
-
const inputCopy = Validator.getFlagsTxInput.validateInputWOptions(
|
|
864
|
-
input != null ? input : {}
|
|
865
|
-
);
|
|
866
|
-
return this._sendRaw(
|
|
867
|
-
"getFlags",
|
|
868
|
-
inputCopy
|
|
869
|
-
);
|
|
870
|
-
}
|
|
871
|
-
/**
|
|
872
|
-
*
|
|
873
|
-
* @param {GetStatisticsTxInput} input
|
|
874
|
-
* @returns {StreamPromise<GetStatisticsTxOutput>}
|
|
875
|
-
*
|
|
876
|
-
*/
|
|
877
|
-
getStatistics(input) {
|
|
878
|
-
const inputCopy = Validator.getStatisticsTxInput.validateInputWOptions(
|
|
879
|
-
input != null ? input : {}
|
|
880
|
-
);
|
|
881
|
-
return this._sendRaw(
|
|
882
|
-
"getStatistics",
|
|
883
|
-
inputCopy
|
|
884
|
-
);
|
|
885
|
-
}
|
|
886
|
-
/**
|
|
887
|
-
*
|
|
888
|
-
* @param {GetTokenTxInput} input
|
|
889
|
-
* @returns {StreamPromise<GetTokenTxOutput>}
|
|
890
|
-
*
|
|
891
|
-
*/
|
|
892
|
-
getToken(input) {
|
|
893
|
-
const inputCopy = Validator.getTokenTxInput.validateInputWOptions(input);
|
|
894
|
-
return this._sendRaw(
|
|
895
|
-
"getToken",
|
|
896
|
-
inputCopy
|
|
897
|
-
);
|
|
898
|
-
}
|
|
899
|
-
/**
|
|
900
|
-
*
|
|
901
|
-
* @param {GetTokenManyTxInput} input
|
|
902
|
-
* @returns {StreamPromise<GetTokenManyTxOutput>}
|
|
903
|
-
*
|
|
904
|
-
*/
|
|
905
|
-
getTokenMany(input) {
|
|
906
|
-
const inputCopy = Validator.getTokenManyTxInput.validateInputWOptions(input);
|
|
907
|
-
return this._sendRaw(
|
|
908
|
-
"getTokenMany",
|
|
909
|
-
inputCopy
|
|
910
|
-
);
|
|
911
|
-
}
|
|
912
|
-
/**
|
|
913
|
-
*
|
|
914
|
-
* @param {GetTransferTxInput} input
|
|
915
|
-
* @returns {StreamPromise<GetTransferTxOutput>}
|
|
916
|
-
*
|
|
917
|
-
*/
|
|
918
|
-
getTransfer(input) {
|
|
919
|
-
const inputCopy = Validator.getTransferTxInput.validateInputWOptions(input);
|
|
920
|
-
return this._sendRaw(
|
|
921
|
-
"getTransfer",
|
|
922
|
-
inputCopy
|
|
923
|
-
);
|
|
924
|
-
}
|
|
925
|
-
/**
|
|
926
|
-
*
|
|
927
|
-
* @param {GetTransferGroupTxInput} input
|
|
928
|
-
* @returns {StreamPromise<GetTransferGroupTxOutput>}
|
|
929
|
-
*
|
|
930
|
-
*/
|
|
931
|
-
getTransferGroup(input) {
|
|
932
|
-
const inputCopy = Validator.getTransferGroupTxInput.validateInputWOptions(input);
|
|
933
|
-
return this._sendRaw(
|
|
934
|
-
"getTransferGroup",
|
|
935
|
-
inputCopy
|
|
936
|
-
);
|
|
937
|
-
}
|
|
938
|
-
/**
|
|
939
|
-
*
|
|
940
|
-
* @param {GetWalletTxInput} input
|
|
941
|
-
* @returns {StreamPromise<GetWalletTxOutput>}
|
|
942
|
-
*
|
|
943
|
-
*/
|
|
944
|
-
getWallet(input) {
|
|
945
|
-
const inputCopy = Validator.getWalletTxInput.validateInputWOptions(input);
|
|
946
|
-
return this._sendRaw(
|
|
947
|
-
"getWallet",
|
|
948
|
-
inputCopy
|
|
949
|
-
);
|
|
950
|
-
}
|
|
951
|
-
/**
|
|
952
|
-
*
|
|
953
|
-
* @param {GetWalletManyTxInput} input
|
|
954
|
-
* @returns {StreamPromise<GetWalletManyTxOutput>}
|
|
955
|
-
*
|
|
956
|
-
*/
|
|
957
|
-
getWalletMany(input) {
|
|
958
|
-
const inputCopy = Validator.getWalletManyTxInput.validateInputWOptions(input);
|
|
959
|
-
return this._sendRaw(
|
|
960
|
-
"getWalletMany",
|
|
961
|
-
inputCopy
|
|
962
|
-
);
|
|
963
|
-
}
|
|
964
|
-
/**
|
|
965
|
-
*
|
|
966
|
-
* @param {HealthcheckTxInput} input
|
|
967
|
-
* @returns {StreamPromise<HealthcheckTxOutput>}
|
|
968
|
-
*
|
|
969
|
-
*/
|
|
970
|
-
healthcheck(input) {
|
|
971
|
-
const inputCopy = Validator.healthcheckTxInput.validateInputWOptions(
|
|
972
|
-
input != null ? input : {}
|
|
973
|
-
);
|
|
974
|
-
return this._sendRaw(
|
|
975
|
-
"healthcheck",
|
|
976
|
-
inputCopy
|
|
977
|
-
);
|
|
978
|
-
}
|
|
979
|
-
/**
|
|
980
|
-
*
|
|
981
|
-
* @param {ListExportManyTxInput} input
|
|
982
|
-
* @returns {StreamPromise<ListExportManyTxOutput>}
|
|
983
|
-
*
|
|
984
|
-
*/
|
|
985
|
-
listExportMany(input) {
|
|
986
|
-
const inputCopy = Validator.listExportManyTxInput.validateInputWOptions(
|
|
987
|
-
input != null ? input : {}
|
|
988
|
-
);
|
|
989
|
-
return this._sendRaw(
|
|
990
|
-
"listExportMany",
|
|
991
|
-
inputCopy
|
|
992
|
-
);
|
|
993
|
-
}
|
|
994
|
-
/**
|
|
995
|
-
*
|
|
996
|
-
* @param {QueryLogsTxInput} input
|
|
997
|
-
* @returns {StreamPromise<QueryLogsTxOutput>}
|
|
998
|
-
*
|
|
999
|
-
*/
|
|
1000
|
-
queryLogs(input) {
|
|
1001
|
-
const inputCopy = Validator.queryLogsTxInput.validateInputWOptions(
|
|
1002
|
-
input != null ? input : {}
|
|
1003
|
-
);
|
|
1004
|
-
return this._sendRaw(
|
|
1005
|
-
"queryLogs",
|
|
1006
|
-
inputCopy
|
|
1007
|
-
);
|
|
1008
|
-
}
|
|
1009
|
-
/**
|
|
1010
|
-
*
|
|
1011
|
-
* @param {ResetDatabaseTxInput} input
|
|
1012
|
-
* @returns {StreamPromise<ResetDatabaseTxOutput>}
|
|
1013
|
-
*
|
|
1014
|
-
*/
|
|
1015
|
-
resetDatabase(input) {
|
|
1016
|
-
const inputCopy = Validator.resetDatabaseTxInput.validateInputWOptions(
|
|
1017
|
-
input != null ? input : {}
|
|
1018
|
-
);
|
|
1019
|
-
return this._sendRaw(
|
|
1020
|
-
"resetDatabase",
|
|
1021
|
-
inputCopy
|
|
1022
|
-
);
|
|
1023
|
-
}
|
|
1024
|
-
/**
|
|
1025
|
-
*
|
|
1026
|
-
* @param {ReverseTransferTxInput} input
|
|
1027
|
-
* @returns {StreamPromise<ReverseTransferTxOutput>}
|
|
1028
|
-
*
|
|
1029
|
-
*/
|
|
1030
|
-
reverseTransfer(input) {
|
|
1031
|
-
const inputCopy = Validator.reverseTransferTxInput.validateInputWOptions(input);
|
|
1032
|
-
return this._sendRaw(
|
|
1033
|
-
"reverseTransfer",
|
|
1034
|
-
inputCopy
|
|
1035
|
-
);
|
|
1036
|
-
}
|
|
1037
|
-
/**
|
|
1038
|
-
*
|
|
1039
|
-
* @param {ReverseTransferGroupTxInput} input
|
|
1040
|
-
* @returns {StreamPromise<ReverseTransferGroupTxOutput>}
|
|
1041
|
-
*
|
|
1042
|
-
*/
|
|
1043
|
-
reverseTransferGroup(input) {
|
|
1044
|
-
const inputCopy = Validator.reverseTransferGroupTxInput.validateInputWOptions(input);
|
|
1045
|
-
return this._sendRaw("reverseTransferGroup", inputCopy);
|
|
1046
|
-
}
|
|
1047
|
-
/**
|
|
1048
|
-
*
|
|
1049
|
-
* @param {ReverseTransferGroupManyTxInput} input
|
|
1050
|
-
* @returns {StreamPromise<ReverseTransferGroupManyTxOutput>}
|
|
1051
|
-
*
|
|
1052
|
-
*/
|
|
1053
|
-
reverseTransferGroupMany(input) {
|
|
1054
|
-
const inputCopy = Validator.reverseTransferGroupManyTxInput.validateInputWOptions(input);
|
|
1055
|
-
return this._sendRaw("reverseTransferGroupMany", inputCopy);
|
|
1056
|
-
}
|
|
1057
|
-
/**
|
|
1058
|
-
*
|
|
1059
|
-
* @param {ReverseTransferManyTxInput} input
|
|
1060
|
-
* @returns {StreamPromise<ReverseTransferManyTxOutput>}
|
|
1061
|
-
*
|
|
1062
|
-
*/
|
|
1063
|
-
reverseTransferMany(input) {
|
|
1064
|
-
const inputCopy = Validator.reverseTransferManyTxInput.validateInputWOptions(input);
|
|
1065
|
-
return this._sendRaw("reverseTransferMany", inputCopy);
|
|
1066
|
-
}
|
|
1067
|
-
/**
|
|
1068
|
-
*
|
|
1069
|
-
* @param {SetFlagsTxInput} input
|
|
1070
|
-
* @returns {StreamPromise<SetFlagsTxOutput>}
|
|
1071
|
-
*
|
|
1072
|
-
*/
|
|
1073
|
-
setFlags(input) {
|
|
1074
|
-
const inputCopy = Validator.setFlagsTxInput.validateInputWOptions(input);
|
|
1075
|
-
return this._sendRaw(
|
|
1076
|
-
"setFlags",
|
|
1077
|
-
inputCopy
|
|
1078
|
-
);
|
|
1079
|
-
}
|
|
1080
|
-
/**
|
|
1081
|
-
*
|
|
1082
|
-
* @param {StartTransactionTxInput} input
|
|
1083
|
-
* @returns {StreamPromise<StartTransactionTxOutput>}
|
|
1084
|
-
*
|
|
1085
|
-
*/
|
|
1086
|
-
startTransaction(input) {
|
|
1087
|
-
const inputCopy = Validator.startTransactionTxInput.validateInputWOptions(
|
|
1088
|
-
input != null ? input : {}
|
|
1089
|
-
);
|
|
1090
|
-
return this._sendRaw(
|
|
1091
|
-
"startTransaction",
|
|
1092
|
-
inputCopy
|
|
1093
|
-
);
|
|
1094
|
-
}
|
|
1095
|
-
/**
|
|
1096
|
-
*
|
|
1097
|
-
* @param {UpdateApikeyTxInput} input
|
|
1098
|
-
* @returns {StreamPromise<UpdateApikeyTxOutput>}
|
|
1099
|
-
*
|
|
1100
|
-
*/
|
|
1101
|
-
updateApikey(input) {
|
|
1102
|
-
const inputCopy = Validator.updateApikeyTxInput.validateInputWOptions(input);
|
|
1103
|
-
return this._sendRaw(
|
|
1104
|
-
"updateApikey",
|
|
1105
|
-
inputCopy
|
|
1106
|
-
);
|
|
1107
|
-
}
|
|
1108
|
-
/**
|
|
1109
|
-
*
|
|
1110
|
-
* @param {UpdateTokenTxInput} input
|
|
1111
|
-
* @returns {StreamPromise<UpdateTokenTxOutput>}
|
|
1112
|
-
*
|
|
1113
|
-
*/
|
|
1114
|
-
updateToken(input) {
|
|
1115
|
-
const inputCopy = Validator.updateTokenTxInput.validateInputWOptions(input);
|
|
1116
|
-
return this._sendRaw(
|
|
1117
|
-
"updateToken",
|
|
1118
|
-
inputCopy
|
|
1119
|
-
);
|
|
1120
|
-
}
|
|
1121
|
-
/**
|
|
1122
|
-
*
|
|
1123
|
-
* @param {UpdateTransferTxInput} input
|
|
1124
|
-
* @returns {StreamPromise<UpdateTransferTxOutput>}
|
|
1125
|
-
*
|
|
1126
|
-
*/
|
|
1127
|
-
updateTransfer(input) {
|
|
1128
|
-
const inputCopy = Validator.updateTransferTxInput.validateInputWOptions(input);
|
|
1129
|
-
return this._sendRaw(
|
|
1130
|
-
"updateTransfer",
|
|
1131
|
-
inputCopy
|
|
1132
|
-
);
|
|
1133
|
-
}
|
|
1134
|
-
/**
|
|
1135
|
-
*
|
|
1136
|
-
* @param {UpdateTransferGroupTxInput} input
|
|
1137
|
-
* @returns {StreamPromise<UpdateTransferGroupTxOutput>}
|
|
1138
|
-
*
|
|
1139
|
-
*/
|
|
1140
|
-
updateTransferGroup(input) {
|
|
1141
|
-
const inputCopy = Validator.updateTransferGroupTxInput.validateInputWOptions(input);
|
|
1142
|
-
return this._sendRaw("updateTransferGroup", inputCopy);
|
|
1143
|
-
}
|
|
1144
|
-
/**
|
|
1145
|
-
*
|
|
1146
|
-
* @param {UpdateTransferGroupManyTxInput} input
|
|
1147
|
-
* @returns {StreamPromise<UpdateTransferGroupManyTxOutput>}
|
|
1148
|
-
*
|
|
1149
|
-
*/
|
|
1150
|
-
updateTransferGroupMany(input) {
|
|
1151
|
-
const inputCopy = Validator.updateTransferGroupManyTxInput.validateInputWOptions(input);
|
|
1152
|
-
return this._sendRaw("updateTransferGroupMany", inputCopy);
|
|
1153
|
-
}
|
|
1154
|
-
/**
|
|
1155
|
-
*
|
|
1156
|
-
* @param {UpdateTransferManyTxInput} input
|
|
1157
|
-
* @returns {StreamPromise<UpdateTransferManyTxOutput>}
|
|
1158
|
-
*
|
|
1159
|
-
*/
|
|
1160
|
-
updateTransferMany(input) {
|
|
1161
|
-
const inputCopy = Validator.updateTransferManyTxInput.validateInputWOptions(input);
|
|
1162
|
-
return this._sendRaw(
|
|
1163
|
-
"updateTransferMany",
|
|
1164
|
-
inputCopy
|
|
1165
|
-
);
|
|
1166
|
-
}
|
|
1167
|
-
/**
|
|
1168
|
-
*
|
|
1169
|
-
* @param {UpdateWalletTxInput} input
|
|
1170
|
-
* @returns {StreamPromise<UpdateWalletTxOutput>}
|
|
1171
|
-
*
|
|
1172
|
-
*/
|
|
1173
|
-
updateWallet(input) {
|
|
1174
|
-
const inputCopy = Validator.updateWalletTxInput.validateInputWOptions(input);
|
|
1175
|
-
return this._sendRaw(
|
|
1176
|
-
"updateWallet",
|
|
1177
|
-
inputCopy
|
|
1178
|
-
);
|
|
1179
|
-
}
|
|
1180
|
-
// TXSDEFS
|
|
1181
254
|
};
|
|
255
|
+
installTxMethods(BaseClient.prototype);
|
|
1182
256
|
export {
|
|
1183
257
|
BaseClient
|
|
1184
258
|
};
|