@shapeshiftoss/unchained-client 6.11.1 → 6.12.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.
@@ -13,7 +13,7 @@ class TransactionParser {
13
13
  this.network = (_a = args.network) !== null && _a !== void 0 ? _a : 'mainnet';
14
14
  }
15
15
  async parse(tx, address) {
16
- const caip19Bitcoin = caip_1.caip19.toCAIP19({
16
+ const caip19Bitcoin = (0, caip_1.toCAIP19)({
17
17
  chain: types_1.ChainTypes.Bitcoin,
18
18
  network: (0, utils_2.toNetworkType)(this.network),
19
19
  assetNamespace: caip_1.AssetNamespace.Slip44,
@@ -24,8 +24,8 @@ class TransactionParser {
24
24
  blockHash: tx.blockHash,
25
25
  blockHeight: tx.blockHeight,
26
26
  blockTime: tx.blockTime,
27
- caip2: caip_1.caip2.toCAIP2({ chain: types_1.ChainTypes.Bitcoin, network: (0, utils_2.toNetworkType)(this.network) }),
28
- chainId: caip_1.caip2.toCAIP2({ chain: types_1.ChainTypes.Bitcoin, network: (0, utils_2.toNetworkType)(this.network) }),
27
+ caip2: (0, caip_1.toCAIP2)({ chain: types_1.ChainTypes.Bitcoin, network: (0, utils_2.toNetworkType)(this.network) }),
28
+ chainId: (0, caip_1.toCAIP2)({ chain: types_1.ChainTypes.Bitcoin, network: (0, utils_2.toNetworkType)(this.network) }),
29
29
  confirmations: tx.confirmations,
30
30
  status: tx.confirmations > 0 ? types_2.Status.Confirmed : types_2.Status.Pending,
31
31
  transfers: [],
@@ -8,8 +8,8 @@ const utils_1 = require("./utils");
8
8
  class TransactionParser {
9
9
  constructor(args) {
10
10
  this.chainId = args.chainId;
11
- this.assetId = caip_1.caip19.toCAIP19({
12
- ...caip_1.caip2.fromCAIP2(this.chainId),
11
+ this.assetId = (0, caip_1.toCAIP19)({
12
+ ...(0, caip_1.fromCAIP2)(this.chainId),
13
13
  assetNamespace: caip_1.AssetNamespace.Slip44,
14
14
  assetReference: caip_1.AssetReference.Cosmos
15
15
  });
@@ -70,8 +70,8 @@ class TransactionParser {
70
70
  blockHash: tx.blockHash,
71
71
  blockHeight: tx.blockHeight,
72
72
  blockTime: tx.blockTime,
73
- caip2: caip_1.caip2.toCAIP2({ chain: types_1.ChainTypes.Ethereum, network: (0, utils_2.toNetworkType)(this.network) }),
74
- chainId: caip_1.caip2.toCAIP2({ chain: types_1.ChainTypes.Ethereum, network: (0, utils_2.toNetworkType)(this.network) }),
73
+ caip2: (0, caip_1.toCAIP2)({ chain: types_1.ChainTypes.Ethereum, network: (0, utils_2.toNetworkType)(this.network) }),
74
+ chainId: (0, caip_1.toCAIP2)({ chain: types_1.ChainTypes.Ethereum, network: (0, utils_2.toNetworkType)(this.network) }),
75
75
  confirmations: tx.confirmations,
76
76
  status: TransactionParser.getStatus(tx),
77
77
  trade: contractParserResult === null || contractParserResult === void 0 ? void 0 : contractParserResult.trade,
@@ -94,7 +94,7 @@ class TransactionParser {
94
94
  }
95
95
  getParsedTxWithTransfers(tx, parsedTx, address, internalTxs) {
96
96
  var _a, _b, _c, _d, _e, _f;
97
- const caip19Ethereum = caip_1.caip19.toCAIP19({
97
+ const caip19Ethereum = (0, caip_1.toCAIP19)({
98
98
  chain: types_1.ChainTypes.Ethereum,
99
99
  network: (0, utils_2.toNetworkType)(this.network),
100
100
  assetNamespace: caip_1.AssetNamespace.Slip44,
@@ -134,7 +134,7 @@ class TransactionParser {
134
134
  symbol: transfer.symbol
135
135
  };
136
136
  const transferArgs = [
137
- caip_1.caip19.toCAIP19({
137
+ (0, caip_1.toCAIP19)({
138
138
  chain: types_1.ChainTypes.Ethereum,
139
139
  network: (0, utils_2.toNetworkType)(this.network),
140
140
  assetNamespace: caip_1.AssetNamespace.ERC20,
@@ -156,7 +156,7 @@ class TransactionParser {
156
156
  });
157
157
  internalTxs === null || internalTxs === void 0 ? void 0 : internalTxs.forEach((internalTx) => {
158
158
  const transferArgs = [
159
- caip_1.caip19.toCAIP19({
159
+ (0, caip_1.toCAIP19)({
160
160
  chain: types_1.ChainTypes.Ethereum,
161
161
  network: (0, utils_2.toNetworkType)(this.network),
162
162
  assetNamespace: caip_1.AssetNamespace.Slip44,
@@ -53,7 +53,7 @@ class Parser {
53
53
  const name = await contract.name();
54
54
  const symbol = await contract.symbol();
55
55
  const value = decoded.args.amountTokenDesired.toString();
56
- const assetId = caip_1.caip19.toCAIP19({
56
+ const assetId = (0, caip_1.toCAIP19)({
57
57
  chain: types_1.ChainTypes.Ethereum,
58
58
  network: (0, utils_1.toNetworkType)(this.network),
59
59
  assetNamespace: caip_1.AssetNamespace.ERC20,
@@ -78,7 +78,7 @@ class Parser {
78
78
  const name = await contract.name();
79
79
  const symbol = await contract.symbol();
80
80
  const value = decoded.args.liquidity.toString();
81
- const assetId = caip_1.caip19.toCAIP19({
81
+ const assetId = (0, caip_1.toCAIP19)({
82
82
  chain: types_1.ChainTypes.Ethereum,
83
83
  network: (0, utils_1.toNetworkType)(this.network),
84
84
  assetNamespace: caip_1.AssetNamespace.ERC20,
@@ -42,7 +42,7 @@ class Parser {
42
42
  return;
43
43
  const sendAddress = (_c = (_b = tx.vin[0].addresses) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : '';
44
44
  const contract = new ethers_1.ethers.Contract(this.wethContract, erc20_1.default, this.provider);
45
- const assetId = caip_1.caip19.toCAIP19({
45
+ const assetId = (0, caip_1.toCAIP19)({
46
46
  chain: types_1.ChainTypes.Ethereum,
47
47
  network: (0, utils_1.toNetworkType)(this.network),
48
48
  assetNamespace: caip_1.AssetNamespace.ERC20,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshiftoss/unchained-client",
3
- "version": "6.11.1",
3
+ "version": "6.12.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "source": "src/index.ts",