@shapeshiftoss/caip 8.10.0 → 8.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.
@@ -18,6 +18,7 @@ const AssetIdToBanxaTickerMap = {
18
18
  [constants_1.cosmosAssetId]: 'atom',
19
19
  [constants_1.ethAssetId]: 'eth',
20
20
  [constants_1.avalancheAssetId]: 'avax',
21
+ [constants_1.optimismAssetId]: 'eth',
21
22
  'eip155:1/erc20:0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9': 'aave',
22
23
  'eip155:1/erc20:0xbb0e17ef65f82ab018d8edd776e8dd940327b28b': 'axs',
23
24
  'eip155:1/erc20:0x4d224452801aced8b2f0aebe155379bb5d594381': 'ape',
@@ -43,6 +44,7 @@ const AssetIdToBanxaTickerMap = {
43
44
  'eip155:1/erc20:0x8e870d67f660d95d5be530380d0ec0bd388289e1': 'usdp',
44
45
  'eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7': 'usdt',
45
46
  'eip155:1/erc20:0x2260fac5e5542a773aa44fbcfedf7c193bc2c599': 'wbtc',
47
+ 'eip155:10/erc20:0x94b008aa00579c1307b0ef2c499ad98a8ce58e58': 'usdt',
46
48
  };
47
49
  const banxaTickerToAssetIdMap = (0, invert_1.default)(AssetIdToBanxaTickerMap);
48
50
  const banxaTickerToAssetId = (id) => banxaTickerToAssetIdMap[id];
@@ -66,7 +68,8 @@ const chainIdToBanxaBlockchainCodeMap = {
66
68
  [constants_1.ethChainId]: 'ETH',
67
69
  [constants_1.btcChainId]: 'BTC',
68
70
  [constants_1.cosmosChainId]: 'COSMOS',
69
- [constants_1.avalancheChainId]: 'AVAX-C', // note - the AVAX-C chain is not the same as the AVAX "ticker" on the banxa side
71
+ [constants_1.avalancheChainId]: 'AVAX-C',
72
+ [constants_1.optimismChainId]: 'OPTIMISM',
70
73
  };
71
74
  /**
72
75
  * Convert a banxa asset identifier to a Banxa chain identifier for use in Banxa HTTP URLs
package/dist/utils.js CHANGED
@@ -50,6 +50,13 @@ const generateAssetIdFromOsmosisDenom = (denom) => {
50
50
  chainId: constants.osmosisChainId,
51
51
  });
52
52
  }
53
+ if (denom.startsWith('gamm')) {
54
+ return (0, assetId_1.toAssetId)({
55
+ assetNamespace: constants.ASSET_NAMESPACE.ibc,
56
+ assetReference: denom,
57
+ chainId: constants.osmosisChainId,
58
+ });
59
+ }
53
60
  return (0, assetId_1.toAssetId)({
54
61
  assetNamespace: constants.ASSET_NAMESPACE.slip44,
55
62
  assetReference: constants.ASSET_REFERENCE.Osmosis,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshiftoss/caip",
3
- "version": "8.10.0",
3
+ "version": "8.12.0",
4
4
  "description": "CAIP Implementation",
5
5
  "homepage": "",
6
6
  "license": "MIT",