@shapeshiftoss/unchained-client 9.8.3 → 10.0.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.
Files changed (36) hide show
  1. package/dist/cosmos/types.d.ts +2 -2
  2. package/dist/evm/ethereum/parser/cowswap.d.ts +4 -0
  3. package/dist/evm/ethereum/parser/foxy.d.ts +4 -0
  4. package/dist/evm/ethereum/parser/thor.d.ts +4 -0
  5. package/dist/evm/ethereum/parser/uniV2.d.ts +4 -0
  6. package/dist/evm/ethereum/parser/weth.d.ts +4 -0
  7. package/dist/evm/ethereum/parser/yearn.d.ts +7 -0
  8. package/dist/evm/ethereum/parser/yearn.js +30 -14
  9. package/dist/evm/parser/erc20.d.ts +6 -0
  10. package/dist/evm/parser/erc20.js +14 -11
  11. package/dist/evm/parser/types.d.ts +10 -9
  12. package/dist/evm/parser/types.js +0 -5
  13. package/dist/evm/parser/zrx.d.ts +4 -0
  14. package/dist/generated/cosmos/api.d.ts +183 -66
  15. package/dist/generated/cosmos/api.js +82 -13
  16. package/dist/generated/cosmos/base.d.ts +1 -1
  17. package/dist/generated/cosmos/base.js +1 -1
  18. package/dist/generated/cosmos/common.d.ts +1 -1
  19. package/dist/generated/cosmos/common.js +1 -1
  20. package/dist/generated/cosmos/configuration.d.ts +1 -1
  21. package/dist/generated/cosmos/configuration.js +1 -1
  22. package/dist/generated/cosmos/index.d.ts +1 -1
  23. package/dist/generated/cosmos/index.js +1 -1
  24. package/dist/generated/osmosis/api.d.ts +183 -66
  25. package/dist/generated/osmosis/api.js +82 -13
  26. package/dist/generated/osmosis/base.d.ts +1 -1
  27. package/dist/generated/osmosis/base.js +1 -1
  28. package/dist/generated/osmosis/common.d.ts +1 -1
  29. package/dist/generated/osmosis/common.js +1 -1
  30. package/dist/generated/osmosis/configuration.d.ts +1 -1
  31. package/dist/generated/osmosis/configuration.js +1 -1
  32. package/dist/generated/osmosis/index.d.ts +1 -1
  33. package/dist/generated/osmosis/index.js +1 -1
  34. package/dist/types.d.ts +0 -13
  35. package/dist/types.js +1 -12
  36. package/package.json +3 -3
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Osmosis Unchained API
6
- * Provides access to osmosis chain data
6
+ * Provides access to osmosis chain data.
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0.0
9
9
  *
@@ -30,7 +30,8 @@ const base_1 = require("./base");
30
30
  const V1ApiAxiosParamCreator = function (configuration) {
31
31
  return {
32
32
  /**
33
- * Get the estimated gas cost for a transaction
33
+ *
34
+ * @summary Get the estimated gas cost for a transaction.
34
35
  * @param {InlineObject} [body]
35
36
  * @param {*} [options] Override http request option.
36
37
  * @throws {RequiredError}
@@ -110,6 +111,34 @@ const V1ApiAxiosParamCreator = function (configuration) {
110
111
  options: localVarRequestOptions,
111
112
  };
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
+ },
113
142
  /**
114
143
  *
115
144
  * @summary Get paginated transaction history.
@@ -148,7 +177,8 @@ const V1ApiAxiosParamCreator = function (configuration) {
148
177
  };
149
178
  },
150
179
  /**
151
- * Get a specific validator
180
+ *
181
+ * @summary Get a specific validator.
152
182
  * @param {string} pubkey Account address or xpub
153
183
  * @param {*} [options] Override http request option.
154
184
  * @throws {RequiredError}
@@ -176,7 +206,8 @@ const V1ApiAxiosParamCreator = function (configuration) {
176
206
  };
177
207
  },
178
208
  /**
179
- * Get the list of current validators
209
+ *
210
+ * @summary Get the list of current validators.
180
211
  * @param {*} [options] Override http request option.
181
212
  * @throws {RequiredError}
182
213
  */
@@ -238,7 +269,8 @@ const V1ApiFp = function (configuration) {
238
269
  const localVarAxiosParamCreator = (0, exports.V1ApiAxiosParamCreator)(configuration);
239
270
  return {
240
271
  /**
241
- * Get the estimated gas cost for a transaction
272
+ *
273
+ * @summary Get the estimated gas cost for a transaction.
242
274
  * @param {InlineObject} [body]
243
275
  * @param {*} [options] Override http request option.
244
276
  * @throws {RequiredError}
@@ -268,6 +300,16 @@ const V1ApiFp = function (configuration) {
268
300
  const localVarAxiosArgs = await localVarAxiosParamCreator.getInfo(options);
269
301
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
270
302
  },
303
+ /**
304
+ * # Get transaction details
305
+ * @param {string} txid Transaction hash
306
+ * @param {*} [options] Override http request option.
307
+ * @throws {RequiredError}
308
+ */
309
+ async getTx(txid, options) {
310
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTx(txid, options);
311
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
312
+ },
271
313
  /**
272
314
  *
273
315
  * @summary Get paginated transaction history.
@@ -282,7 +324,8 @@ const V1ApiFp = function (configuration) {
282
324
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
283
325
  },
284
326
  /**
285
- * Get a specific validator
327
+ *
328
+ * @summary Get a specific validator.
286
329
  * @param {string} pubkey Account address or xpub
287
330
  * @param {*} [options] Override http request option.
288
331
  * @throws {RequiredError}
@@ -292,7 +335,8 @@ const V1ApiFp = function (configuration) {
292
335
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
293
336
  },
294
337
  /**
295
- * Get the list of current validators
338
+ *
339
+ * @summary Get the list of current validators.
296
340
  * @param {*} [options] Override http request option.
297
341
  * @throws {RequiredError}
298
342
  */
@@ -322,7 +366,8 @@ const V1ApiFactory = function (configuration, basePath, axios) {
322
366
  const localVarFp = (0, exports.V1ApiFp)(configuration);
323
367
  return {
324
368
  /**
325
- * Get the estimated gas cost for a transaction
369
+ *
370
+ * @summary Get the estimated gas cost for a transaction.
326
371
  * @param {InlineObject} [body]
327
372
  * @param {*} [options] Override http request option.
328
373
  * @throws {RequiredError}
@@ -349,6 +394,15 @@ const V1ApiFactory = function (configuration, basePath, axios) {
349
394
  getInfo(options) {
350
395
  return localVarFp.getInfo(options).then((request) => request(axios, basePath));
351
396
  },
397
+ /**
398
+ * # Get transaction details
399
+ * @param {string} txid Transaction hash
400
+ * @param {*} [options] Override http request option.
401
+ * @throws {RequiredError}
402
+ */
403
+ getTx(txid, options) {
404
+ return localVarFp.getTx(txid, options).then((request) => request(axios, basePath));
405
+ },
352
406
  /**
353
407
  *
354
408
  * @summary Get paginated transaction history.
@@ -362,7 +416,8 @@ const V1ApiFactory = function (configuration, basePath, axios) {
362
416
  return localVarFp.getTxHistory(pubkey, cursor, pageSize, options).then((request) => request(axios, basePath));
363
417
  },
364
418
  /**
365
- * Get a specific validator
419
+ *
420
+ * @summary Get a specific validator.
366
421
  * @param {string} pubkey Account address or xpub
367
422
  * @param {*} [options] Override http request option.
368
423
  * @throws {RequiredError}
@@ -371,7 +426,8 @@ const V1ApiFactory = function (configuration, basePath, axios) {
371
426
  return localVarFp.getValidator(pubkey, options).then((request) => request(axios, basePath));
372
427
  },
373
428
  /**
374
- * Get the list of current validators
429
+ *
430
+ * @summary Get the list of current validators.
375
431
  * @param {*} [options] Override http request option.
376
432
  * @throws {RequiredError}
377
433
  */
@@ -399,7 +455,8 @@ exports.V1ApiFactory = V1ApiFactory;
399
455
  */
400
456
  class V1Api extends base_1.BaseAPI {
401
457
  /**
402
- * Get the estimated gas cost for a transaction
458
+ *
459
+ * @summary Get the estimated gas cost for a transaction.
403
460
  * @param {V1ApiEstimateGasRequest} requestParameters Request parameters.
404
461
  * @param {*} [options] Override http request option.
405
462
  * @throws {RequiredError}
@@ -429,6 +486,16 @@ class V1Api extends base_1.BaseAPI {
429
486
  getInfo(options) {
430
487
  return (0, exports.V1ApiFp)(this.configuration).getInfo(options).then((request) => request(this.axios, this.basePath));
431
488
  }
489
+ /**
490
+ * # Get transaction details
491
+ * @param {V1ApiGetTxRequest} requestParameters Request parameters.
492
+ * @param {*} [options] Override http request option.
493
+ * @throws {RequiredError}
494
+ * @memberof V1Api
495
+ */
496
+ getTx(requestParameters, options) {
497
+ return (0, exports.V1ApiFp)(this.configuration).getTx(requestParameters.txid, options).then((request) => request(this.axios, this.basePath));
498
+ }
432
499
  /**
433
500
  *
434
501
  * @summary Get paginated transaction history.
@@ -441,7 +508,8 @@ class V1Api extends base_1.BaseAPI {
441
508
  return (0, exports.V1ApiFp)(this.configuration).getTxHistory(requestParameters.pubkey, requestParameters.cursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
442
509
  }
443
510
  /**
444
- * Get a specific validator
511
+ *
512
+ * @summary Get a specific validator.
445
513
  * @param {V1ApiGetValidatorRequest} requestParameters Request parameters.
446
514
  * @param {*} [options] Override http request option.
447
515
  * @throws {RequiredError}
@@ -451,7 +519,8 @@ class V1Api extends base_1.BaseAPI {
451
519
  return (0, exports.V1ApiFp)(this.configuration).getValidator(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
452
520
  }
453
521
  /**
454
- * Get the list of current validators
522
+ *
523
+ * @summary Get the list of current validators.
455
524
  * @param {*} [options] Override http request option.
456
525
  * @throws {RequiredError}
457
526
  * @memberof V1Api
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Osmosis Unchained API
3
- * Provides access to osmosis chain data
3
+ * Provides access to osmosis chain data.
4
4
  *
5
5
  * The version of the OpenAPI document: 1.0.0
6
6
  *
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Osmosis Unchained API
6
- * Provides access to osmosis chain data
6
+ * Provides access to osmosis chain data.
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0.0
9
9
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Osmosis Unchained API
3
- * Provides access to osmosis chain data
3
+ * Provides access to osmosis chain data.
4
4
  *
5
5
  * The version of the OpenAPI document: 1.0.0
6
6
  *
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Osmosis Unchained API
6
- * Provides access to osmosis chain data
6
+ * Provides access to osmosis chain data.
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0.0
9
9
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Osmosis Unchained API
3
- * Provides access to osmosis chain data
3
+ * Provides access to osmosis chain data.
4
4
  *
5
5
  * The version of the OpenAPI document: 1.0.0
6
6
  *
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Osmosis Unchained API
6
- * Provides access to osmosis chain data
6
+ * Provides access to osmosis chain data.
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0.0
9
9
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Osmosis Unchained API
3
- * Provides access to osmosis chain data
3
+ * Provides access to osmosis chain data.
4
4
  *
5
5
  * The version of the OpenAPI document: 1.0.0
6
6
  *
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Osmosis Unchained API
6
- * Provides access to osmosis chain data
6
+ * Provides access to osmosis chain data.
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0.0
9
9
  *
package/dist/types.d.ts CHANGED
@@ -44,23 +44,10 @@ export declare enum TransferType {
44
44
  Receive = "Receive",
45
45
  Contract = "Contract"
46
46
  }
47
- export declare enum TxParser {
48
- Cosmos = "cosmos",
49
- Yearn = "yearn",
50
- UniV2 = "uniV2",
51
- ZRX = "zrx",
52
- Thor = "thor",
53
- Foxy = "foxy",
54
- WETH = "weth",
55
- CowSwap = "cowswap"
56
- }
57
47
  export interface BaseTxMetadata {
58
48
  method?: string;
59
49
  parser: string;
60
50
  }
61
- export interface StandardTxMetadata extends BaseTxMetadata {
62
- parser: `${TxParser}`;
63
- }
64
51
  export interface StandardTx {
65
52
  address: string;
66
53
  blockHash?: string;
package/dist/types.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TxParser = exports.TransferType = exports.TradeType = exports.TxStatus = exports.Dex = void 0;
3
+ exports.TransferType = exports.TradeType = exports.TxStatus = exports.Dex = void 0;
4
4
  // these are user facing values, and should be rendered as such
5
5
  var Dex;
6
6
  (function (Dex) {
@@ -29,14 +29,3 @@ var TransferType;
29
29
  TransferType["Receive"] = "Receive";
30
30
  TransferType["Contract"] = "Contract";
31
31
  })(TransferType = exports.TransferType || (exports.TransferType = {}));
32
- var TxParser;
33
- (function (TxParser) {
34
- TxParser["Cosmos"] = "cosmos";
35
- TxParser["Yearn"] = "yearn";
36
- TxParser["UniV2"] = "uniV2";
37
- TxParser["ZRX"] = "zrx";
38
- TxParser["Thor"] = "thor";
39
- TxParser["Foxy"] = "foxy";
40
- TxParser["WETH"] = "weth";
41
- TxParser["CowSwap"] = "cowswap";
42
- })(TxParser = exports.TxParser || (exports.TxParser = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshiftoss/unchained-client",
3
- "version": "9.8.3",
3
+ "version": "10.0.1",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "source": "src/index.ts",
@@ -29,13 +29,13 @@
29
29
  "ws": "^8.3.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "@shapeshiftoss/caip": "^6.7.0",
32
+ "@shapeshiftoss/caip": "^8.0.0",
33
33
  "@shapeshiftoss/logger": "^1.1.2",
34
34
  "@shapeshiftoss/types": "^8.1.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@openapitools/openapi-generator-cli": "^2.5.1",
38
- "@shapeshiftoss/caip": "^6.7.0",
38
+ "@shapeshiftoss/caip": "^8.0.0",
39
39
  "@shapeshiftoss/common-api": "^8.0.0",
40
40
  "@shapeshiftoss/logger": "^1.1.2",
41
41
  "@shapeshiftoss/types": "^8.1.0",