@shapeshiftoss/unchained-client 10.0.0 → 10.1.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.
Files changed (54) hide show
  1. package/dist/cosmossdk/cosmos/index.d.ts +2 -0
  2. package/dist/{cosmos → cosmossdk/cosmos}/index.js +1 -2
  3. package/dist/cosmossdk/cosmos/parser/index.d.ts +6 -0
  4. package/dist/cosmossdk/cosmos/parser/index.js +12 -0
  5. package/dist/cosmossdk/index.d.ts +5 -0
  6. package/dist/cosmossdk/index.js +34 -0
  7. package/dist/cosmossdk/osmosis/index.d.ts +2 -0
  8. package/dist/{osmosis → cosmossdk/osmosis}/index.js +2 -1
  9. package/dist/cosmossdk/osmosis/parser/index.d.ts +6 -0
  10. package/dist/cosmossdk/osmosis/parser/index.js +12 -0
  11. package/dist/cosmossdk/parser/index.d.ts +12 -0
  12. package/dist/cosmossdk/parser/index.js +85 -0
  13. package/dist/{cosmos → cosmossdk/parser}/types.d.ts +3 -1
  14. package/dist/{cosmos → cosmossdk/parser}/types.js +0 -0
  15. package/dist/cosmossdk/parser/utils.d.ts +3 -0
  16. package/dist/cosmossdk/parser/utils.js +63 -0
  17. package/dist/cosmossdk/thorchain/index.d.ts +2 -0
  18. package/dist/cosmossdk/thorchain/index.js +18 -0
  19. package/dist/cosmossdk/thorchain/parser/index.d.ts +6 -0
  20. package/dist/cosmossdk/thorchain/parser/index.js +12 -0
  21. package/dist/cosmossdk/types.d.ts +1 -0
  22. package/dist/cosmossdk/types.js +2 -0
  23. package/dist/evm/ethereum/parser/abi/foxyStaking.d.ts +1 -1
  24. package/dist/evm/ethereum/parser/abi/shapeShiftRouter.d.ts +1 -1
  25. package/dist/evm/ethereum/parser/abi/thor.d.ts +1 -1
  26. package/dist/evm/ethereum/parser/abi/uniV2.d.ts +1 -1
  27. package/dist/evm/ethereum/parser/abi/uniV2StakingRewards.d.ts +1 -1
  28. package/dist/evm/ethereum/parser/abi/weth.d.ts +1 -1
  29. package/dist/evm/ethereum/parser/abi/yearnVault.d.ts +1 -1
  30. package/dist/evm/parser/abi/erc20.d.ts +1 -1
  31. package/dist/evm/parser/index.d.ts +1 -1
  32. package/dist/generated/cosmos/api.d.ts +18 -10
  33. package/dist/generated/osmosis/api.d.ts +18 -10
  34. package/dist/generated/thorchain/api.d.ts +1300 -0
  35. package/dist/generated/thorchain/api.js +520 -0
  36. package/dist/generated/thorchain/base.d.ts +55 -0
  37. package/dist/generated/thorchain/base.js +64 -0
  38. package/dist/generated/thorchain/common.d.ts +65 -0
  39. package/dist/generated/thorchain/common.js +137 -0
  40. package/dist/generated/thorchain/configuration.d.ts +83 -0
  41. package/dist/generated/thorchain/configuration.js +42 -0
  42. package/dist/generated/thorchain/index.d.ts +13 -0
  43. package/dist/generated/thorchain/index.js +31 -0
  44. package/dist/index.d.ts +4 -2
  45. package/dist/index.js +5 -3
  46. package/dist/types.d.ts +3 -3
  47. package/dist/utils.d.ts +1 -1
  48. package/package.json +3 -3
  49. package/dist/cosmos/index.d.ts +0 -3
  50. package/dist/cosmos/parser/index.d.ts +0 -13
  51. package/dist/cosmos/parser/index.js +0 -71
  52. package/dist/cosmos/parser/utils.d.ts +0 -13
  53. package/dist/cosmos/parser/utils.js +0 -145
  54. package/dist/osmosis/index.d.ts +0 -1
@@ -0,0 +1,520 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Thorchain Unchained API
6
+ * Provides access to thorchain chain data.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.WebsocketApi = exports.WebsocketApiFactory = exports.WebsocketApiFp = exports.WebsocketApiAxiosParamCreator = exports.V1Api = exports.V1ApiFactory = exports.V1ApiFp = exports.V1ApiAxiosParamCreator = void 0;
20
+ const axios_1 = __importDefault(require("axios"));
21
+ // Some imports not used depending on template conditions
22
+ // @ts-ignore
23
+ const common_1 = require("./common");
24
+ // @ts-ignore
25
+ const base_1 = require("./base");
26
+ /**
27
+ * V1Api - axios parameter creator
28
+ * @export
29
+ */
30
+ const V1ApiAxiosParamCreator = function (configuration) {
31
+ return {
32
+ /**
33
+ *
34
+ * @summary Get the estimated gas cost for a transaction.
35
+ * @param {InlineObject} [body]
36
+ * @param {*} [options] Override http request option.
37
+ * @throws {RequiredError}
38
+ */
39
+ estimateGas: async (body, options = {}) => {
40
+ const localVarPath = `/api/v1/gas/estimate`;
41
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
42
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
43
+ let baseOptions;
44
+ if (configuration) {
45
+ baseOptions = configuration.baseOptions;
46
+ }
47
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
48
+ const localVarHeaderParameter = {};
49
+ const localVarQueryParameter = {};
50
+ localVarHeaderParameter['Content-Type'] = 'application/json';
51
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
52
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
53
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
54
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
55
+ return {
56
+ url: (0, common_1.toPathString)(localVarUrlObj),
57
+ options: localVarRequestOptions,
58
+ };
59
+ },
60
+ /**
61
+ *
62
+ * @summary Get account details.
63
+ * @param {string} pubkey Account address or xpub
64
+ * @param {*} [options] Override http request option.
65
+ * @throws {RequiredError}
66
+ */
67
+ getAccount: async (pubkey, options = {}) => {
68
+ // verify required parameter 'pubkey' is not null or undefined
69
+ (0, common_1.assertParamExists)('getAccount', 'pubkey', pubkey);
70
+ const localVarPath = `/api/v1/account/{pubkey}`
71
+ .replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
72
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
73
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
74
+ let baseOptions;
75
+ if (configuration) {
76
+ baseOptions = configuration.baseOptions;
77
+ }
78
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
79
+ const localVarHeaderParameter = {};
80
+ const localVarQueryParameter = {};
81
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
82
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
83
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
84
+ return {
85
+ url: (0, common_1.toPathString)(localVarUrlObj),
86
+ options: localVarRequestOptions,
87
+ };
88
+ },
89
+ /**
90
+ *
91
+ * @summary Get information about the running coinstack.
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ */
95
+ getInfo: async (options = {}) => {
96
+ const localVarPath = `/api/v1/info`;
97
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
98
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
99
+ let baseOptions;
100
+ if (configuration) {
101
+ baseOptions = configuration.baseOptions;
102
+ }
103
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
104
+ const localVarHeaderParameter = {};
105
+ const localVarQueryParameter = {};
106
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
107
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
108
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
109
+ return {
110
+ url: (0, common_1.toPathString)(localVarUrlObj),
111
+ options: localVarRequestOptions,
112
+ };
113
+ },
114
+ /**
115
+ * # Get transaction details
116
+ * @param {string} txid Transaction hash
117
+ * @param {*} [options] Override http request option.
118
+ * @throws {RequiredError}
119
+ */
120
+ getTx: async (txid, options = {}) => {
121
+ // verify required parameter 'txid' is not null or undefined
122
+ (0, common_1.assertParamExists)('getTx', 'txid', txid);
123
+ const localVarPath = `/api/v1/tx/{txid}`
124
+ .replace(`{${"txid"}}`, encodeURIComponent(String(txid)));
125
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
126
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
127
+ let baseOptions;
128
+ if (configuration) {
129
+ baseOptions = configuration.baseOptions;
130
+ }
131
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
132
+ const localVarHeaderParameter = {};
133
+ const localVarQueryParameter = {};
134
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
135
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
136
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
137
+ return {
138
+ url: (0, common_1.toPathString)(localVarUrlObj),
139
+ options: localVarRequestOptions,
140
+ };
141
+ },
142
+ /**
143
+ *
144
+ * @summary Get paginated transaction history.
145
+ * @param {string} pubkey Account address or xpub
146
+ * @param {string} [cursor] Pagination cursor from previous response or empty string for first page fetch
147
+ * @param {number} [pageSize] Page size (default 10)
148
+ * @param {*} [options] Override http request option.
149
+ * @throws {RequiredError}
150
+ */
151
+ getTxHistory: async (pubkey, cursor, pageSize, options = {}) => {
152
+ // verify required parameter 'pubkey' is not null or undefined
153
+ (0, common_1.assertParamExists)('getTxHistory', 'pubkey', pubkey);
154
+ const localVarPath = `/api/v1/account/{pubkey}/txs`
155
+ .replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
156
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
157
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
158
+ let baseOptions;
159
+ if (configuration) {
160
+ baseOptions = configuration.baseOptions;
161
+ }
162
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
163
+ const localVarHeaderParameter = {};
164
+ const localVarQueryParameter = {};
165
+ if (cursor !== undefined) {
166
+ localVarQueryParameter['cursor'] = cursor;
167
+ }
168
+ if (pageSize !== undefined) {
169
+ localVarQueryParameter['pageSize'] = pageSize;
170
+ }
171
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
172
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
173
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
174
+ return {
175
+ url: (0, common_1.toPathString)(localVarUrlObj),
176
+ options: localVarRequestOptions,
177
+ };
178
+ },
179
+ /**
180
+ *
181
+ * @summary Sends raw transaction to be broadcast to the node.
182
+ * @param {InlineObject1} [body]
183
+ * @param {*} [options] Override http request option.
184
+ * @throws {RequiredError}
185
+ */
186
+ sendTx: async (body, options = {}) => {
187
+ const localVarPath = `/api/v1/send`;
188
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
189
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
190
+ let baseOptions;
191
+ if (configuration) {
192
+ baseOptions = configuration.baseOptions;
193
+ }
194
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
195
+ const localVarHeaderParameter = {};
196
+ const localVarQueryParameter = {};
197
+ localVarHeaderParameter['Content-Type'] = 'application/json';
198
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
199
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
200
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
201
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
202
+ return {
203
+ url: (0, common_1.toPathString)(localVarUrlObj),
204
+ options: localVarRequestOptions,
205
+ };
206
+ },
207
+ };
208
+ };
209
+ exports.V1ApiAxiosParamCreator = V1ApiAxiosParamCreator;
210
+ /**
211
+ * V1Api - functional programming interface
212
+ * @export
213
+ */
214
+ const V1ApiFp = function (configuration) {
215
+ const localVarAxiosParamCreator = (0, exports.V1ApiAxiosParamCreator)(configuration);
216
+ return {
217
+ /**
218
+ *
219
+ * @summary Get the estimated gas cost for a transaction.
220
+ * @param {InlineObject} [body]
221
+ * @param {*} [options] Override http request option.
222
+ * @throws {RequiredError}
223
+ */
224
+ async estimateGas(body, options) {
225
+ const localVarAxiosArgs = await localVarAxiosParamCreator.estimateGas(body, options);
226
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
227
+ },
228
+ /**
229
+ *
230
+ * @summary Get account details.
231
+ * @param {string} pubkey Account address or xpub
232
+ * @param {*} [options] Override http request option.
233
+ * @throws {RequiredError}
234
+ */
235
+ async getAccount(pubkey, options) {
236
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAccount(pubkey, options);
237
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
238
+ },
239
+ /**
240
+ *
241
+ * @summary Get information about the running coinstack.
242
+ * @param {*} [options] Override http request option.
243
+ * @throws {RequiredError}
244
+ */
245
+ async getInfo(options) {
246
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInfo(options);
247
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
248
+ },
249
+ /**
250
+ * # Get transaction details
251
+ * @param {string} txid Transaction hash
252
+ * @param {*} [options] Override http request option.
253
+ * @throws {RequiredError}
254
+ */
255
+ async getTx(txid, options) {
256
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTx(txid, options);
257
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
258
+ },
259
+ /**
260
+ *
261
+ * @summary Get paginated transaction history.
262
+ * @param {string} pubkey Account address or xpub
263
+ * @param {string} [cursor] Pagination cursor from previous response or empty string for first page fetch
264
+ * @param {number} [pageSize] Page size (default 10)
265
+ * @param {*} [options] Override http request option.
266
+ * @throws {RequiredError}
267
+ */
268
+ async getTxHistory(pubkey, cursor, pageSize, options) {
269
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTxHistory(pubkey, cursor, pageSize, options);
270
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
271
+ },
272
+ /**
273
+ *
274
+ * @summary Sends raw transaction to be broadcast to the node.
275
+ * @param {InlineObject1} [body]
276
+ * @param {*} [options] Override http request option.
277
+ * @throws {RequiredError}
278
+ */
279
+ async sendTx(body, options) {
280
+ const localVarAxiosArgs = await localVarAxiosParamCreator.sendTx(body, options);
281
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
282
+ },
283
+ };
284
+ };
285
+ exports.V1ApiFp = V1ApiFp;
286
+ /**
287
+ * V1Api - factory interface
288
+ * @export
289
+ */
290
+ const V1ApiFactory = function (configuration, basePath, axios) {
291
+ const localVarFp = (0, exports.V1ApiFp)(configuration);
292
+ return {
293
+ /**
294
+ *
295
+ * @summary Get the estimated gas cost for a transaction.
296
+ * @param {InlineObject} [body]
297
+ * @param {*} [options] Override http request option.
298
+ * @throws {RequiredError}
299
+ */
300
+ estimateGas(body, options) {
301
+ return localVarFp.estimateGas(body, options).then((request) => request(axios, basePath));
302
+ },
303
+ /**
304
+ *
305
+ * @summary Get account details.
306
+ * @param {string} pubkey Account address or xpub
307
+ * @param {*} [options] Override http request option.
308
+ * @throws {RequiredError}
309
+ */
310
+ getAccount(pubkey, options) {
311
+ return localVarFp.getAccount(pubkey, options).then((request) => request(axios, basePath));
312
+ },
313
+ /**
314
+ *
315
+ * @summary Get information about the running coinstack.
316
+ * @param {*} [options] Override http request option.
317
+ * @throws {RequiredError}
318
+ */
319
+ getInfo(options) {
320
+ return localVarFp.getInfo(options).then((request) => request(axios, basePath));
321
+ },
322
+ /**
323
+ * # Get transaction details
324
+ * @param {string} txid Transaction hash
325
+ * @param {*} [options] Override http request option.
326
+ * @throws {RequiredError}
327
+ */
328
+ getTx(txid, options) {
329
+ return localVarFp.getTx(txid, options).then((request) => request(axios, basePath));
330
+ },
331
+ /**
332
+ *
333
+ * @summary Get paginated transaction history.
334
+ * @param {string} pubkey Account address or xpub
335
+ * @param {string} [cursor] Pagination cursor from previous response or empty string for first page fetch
336
+ * @param {number} [pageSize] Page size (default 10)
337
+ * @param {*} [options] Override http request option.
338
+ * @throws {RequiredError}
339
+ */
340
+ getTxHistory(pubkey, cursor, pageSize, options) {
341
+ return localVarFp.getTxHistory(pubkey, cursor, pageSize, options).then((request) => request(axios, basePath));
342
+ },
343
+ /**
344
+ *
345
+ * @summary Sends raw transaction to be broadcast to the node.
346
+ * @param {InlineObject1} [body]
347
+ * @param {*} [options] Override http request option.
348
+ * @throws {RequiredError}
349
+ */
350
+ sendTx(body, options) {
351
+ return localVarFp.sendTx(body, options).then((request) => request(axios, basePath));
352
+ },
353
+ };
354
+ };
355
+ exports.V1ApiFactory = V1ApiFactory;
356
+ /**
357
+ * V1Api - object-oriented interface
358
+ * @export
359
+ * @class V1Api
360
+ * @extends {BaseAPI}
361
+ */
362
+ class V1Api extends base_1.BaseAPI {
363
+ /**
364
+ *
365
+ * @summary Get the estimated gas cost for a transaction.
366
+ * @param {V1ApiEstimateGasRequest} requestParameters Request parameters.
367
+ * @param {*} [options] Override http request option.
368
+ * @throws {RequiredError}
369
+ * @memberof V1Api
370
+ */
371
+ estimateGas(requestParameters = {}, options) {
372
+ return (0, exports.V1ApiFp)(this.configuration).estimateGas(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
373
+ }
374
+ /**
375
+ *
376
+ * @summary Get account details.
377
+ * @param {V1ApiGetAccountRequest} requestParameters Request parameters.
378
+ * @param {*} [options] Override http request option.
379
+ * @throws {RequiredError}
380
+ * @memberof V1Api
381
+ */
382
+ getAccount(requestParameters, options) {
383
+ return (0, exports.V1ApiFp)(this.configuration).getAccount(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
384
+ }
385
+ /**
386
+ *
387
+ * @summary Get information about the running coinstack.
388
+ * @param {*} [options] Override http request option.
389
+ * @throws {RequiredError}
390
+ * @memberof V1Api
391
+ */
392
+ getInfo(options) {
393
+ return (0, exports.V1ApiFp)(this.configuration).getInfo(options).then((request) => request(this.axios, this.basePath));
394
+ }
395
+ /**
396
+ * # Get transaction details
397
+ * @param {V1ApiGetTxRequest} requestParameters Request parameters.
398
+ * @param {*} [options] Override http request option.
399
+ * @throws {RequiredError}
400
+ * @memberof V1Api
401
+ */
402
+ getTx(requestParameters, options) {
403
+ return (0, exports.V1ApiFp)(this.configuration).getTx(requestParameters.txid, options).then((request) => request(this.axios, this.basePath));
404
+ }
405
+ /**
406
+ *
407
+ * @summary Get paginated transaction history.
408
+ * @param {V1ApiGetTxHistoryRequest} requestParameters Request parameters.
409
+ * @param {*} [options] Override http request option.
410
+ * @throws {RequiredError}
411
+ * @memberof V1Api
412
+ */
413
+ getTxHistory(requestParameters, options) {
414
+ return (0, exports.V1ApiFp)(this.configuration).getTxHistory(requestParameters.pubkey, requestParameters.cursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
415
+ }
416
+ /**
417
+ *
418
+ * @summary Sends raw transaction to be broadcast to the node.
419
+ * @param {V1ApiSendTxRequest} requestParameters Request parameters.
420
+ * @param {*} [options] Override http request option.
421
+ * @throws {RequiredError}
422
+ * @memberof V1Api
423
+ */
424
+ sendTx(requestParameters = {}, options) {
425
+ return (0, exports.V1ApiFp)(this.configuration).sendTx(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
426
+ }
427
+ }
428
+ exports.V1Api = V1Api;
429
+ /**
430
+ * WebsocketApi - axios parameter creator
431
+ * @export
432
+ */
433
+ const WebsocketApiAxiosParamCreator = function (configuration) {
434
+ return {
435
+ /**
436
+ *
437
+ * @summary Subscribe to pending and confirmed transactions.
438
+ * @param {*} [options] Override http request option.
439
+ * @throws {RequiredError}
440
+ */
441
+ websocket: async (options = {}) => {
442
+ const localVarPath = `/`;
443
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
444
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
445
+ let baseOptions;
446
+ if (configuration) {
447
+ baseOptions = configuration.baseOptions;
448
+ }
449
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
450
+ const localVarHeaderParameter = {};
451
+ const localVarQueryParameter = {};
452
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
453
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
454
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
455
+ return {
456
+ url: (0, common_1.toPathString)(localVarUrlObj),
457
+ options: localVarRequestOptions,
458
+ };
459
+ },
460
+ };
461
+ };
462
+ exports.WebsocketApiAxiosParamCreator = WebsocketApiAxiosParamCreator;
463
+ /**
464
+ * WebsocketApi - functional programming interface
465
+ * @export
466
+ */
467
+ const WebsocketApiFp = function (configuration) {
468
+ const localVarAxiosParamCreator = (0, exports.WebsocketApiAxiosParamCreator)(configuration);
469
+ return {
470
+ /**
471
+ *
472
+ * @summary Subscribe to pending and confirmed transactions.
473
+ * @param {*} [options] Override http request option.
474
+ * @throws {RequiredError}
475
+ */
476
+ async websocket(options) {
477
+ const localVarAxiosArgs = await localVarAxiosParamCreator.websocket(options);
478
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
479
+ },
480
+ };
481
+ };
482
+ exports.WebsocketApiFp = WebsocketApiFp;
483
+ /**
484
+ * WebsocketApi - factory interface
485
+ * @export
486
+ */
487
+ const WebsocketApiFactory = function (configuration, basePath, axios) {
488
+ const localVarFp = (0, exports.WebsocketApiFp)(configuration);
489
+ return {
490
+ /**
491
+ *
492
+ * @summary Subscribe to pending and confirmed transactions.
493
+ * @param {*} [options] Override http request option.
494
+ * @throws {RequiredError}
495
+ */
496
+ websocket(options) {
497
+ return localVarFp.websocket(options).then((request) => request(axios, basePath));
498
+ },
499
+ };
500
+ };
501
+ exports.WebsocketApiFactory = WebsocketApiFactory;
502
+ /**
503
+ * WebsocketApi - object-oriented interface
504
+ * @export
505
+ * @class WebsocketApi
506
+ * @extends {BaseAPI}
507
+ */
508
+ class WebsocketApi extends base_1.BaseAPI {
509
+ /**
510
+ *
511
+ * @summary Subscribe to pending and confirmed transactions.
512
+ * @param {*} [options] Override http request option.
513
+ * @throws {RequiredError}
514
+ * @memberof WebsocketApi
515
+ */
516
+ websocket(options) {
517
+ return (0, exports.WebsocketApiFp)(this.configuration).websocket(options).then((request) => request(this.axios, this.basePath));
518
+ }
519
+ }
520
+ exports.WebsocketApi = WebsocketApi;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Thorchain Unchained API
3
+ * Provides access to thorchain chain data.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { Configuration } from "./configuration";
13
+ import { AxiosInstance, AxiosRequestConfig } from 'axios';
14
+ export declare const BASE_PATH: string;
15
+ /**
16
+ *
17
+ * @export
18
+ */
19
+ export declare const COLLECTION_FORMATS: {
20
+ csv: string;
21
+ ssv: string;
22
+ tsv: string;
23
+ pipes: string;
24
+ };
25
+ /**
26
+ *
27
+ * @export
28
+ * @interface RequestArgs
29
+ */
30
+ export interface RequestArgs {
31
+ url: string;
32
+ options: AxiosRequestConfig;
33
+ }
34
+ /**
35
+ *
36
+ * @export
37
+ * @class BaseAPI
38
+ */
39
+ export declare class BaseAPI {
40
+ protected basePath: string;
41
+ protected axios: AxiosInstance;
42
+ protected configuration: Configuration | undefined;
43
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
44
+ }
45
+ /**
46
+ *
47
+ * @export
48
+ * @class RequiredError
49
+ * @extends {Error}
50
+ */
51
+ export declare class RequiredError extends Error {
52
+ field: string;
53
+ name: "RequiredError";
54
+ constructor(field: string, msg?: string);
55
+ }
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Thorchain Unchained API
6
+ * Provides access to thorchain chain data.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
20
+ // Some imports not used depending on template conditions
21
+ // @ts-ignore
22
+ const axios_1 = __importDefault(require("axios"));
23
+ exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
24
+ /**
25
+ *
26
+ * @export
27
+ */
28
+ exports.COLLECTION_FORMATS = {
29
+ csv: ",",
30
+ ssv: " ",
31
+ tsv: "\t",
32
+ pipes: "|",
33
+ };
34
+ /**
35
+ *
36
+ * @export
37
+ * @class BaseAPI
38
+ */
39
+ class BaseAPI {
40
+ constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
41
+ this.basePath = basePath;
42
+ this.axios = axios;
43
+ if (configuration) {
44
+ this.configuration = configuration;
45
+ this.basePath = configuration.basePath || this.basePath;
46
+ }
47
+ }
48
+ }
49
+ exports.BaseAPI = BaseAPI;
50
+ ;
51
+ /**
52
+ *
53
+ * @export
54
+ * @class RequiredError
55
+ * @extends {Error}
56
+ */
57
+ class RequiredError extends Error {
58
+ constructor(field, msg) {
59
+ super(msg);
60
+ this.field = field;
61
+ this.name = "RequiredError";
62
+ }
63
+ }
64
+ exports.RequiredError = RequiredError;