@shapeshiftoss/caip 6.14.0 → 6.15.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.
- package/dist/adapters/banxa/index.js +16 -6
- package/package.json +1 -1
|
@@ -7,10 +7,16 @@ exports.getBanxaBlockchainFromBanxaAssetTicker = exports.getSupportedBanxaAssets
|
|
|
7
7
|
const entries_1 = __importDefault(require("lodash/entries"));
|
|
8
8
|
const toLower_1 = __importDefault(require("lodash/toLower"));
|
|
9
9
|
const assetId_1 = require("../../assetId/assetId");
|
|
10
|
+
const constants_1 = require("../../constants");
|
|
11
|
+
/**
|
|
12
|
+
* https://docs.google.com/spreadsheets/d/1KU6J1Hl4vxBTIWCwWdrFfSadNltuFheQRoJyPrd0LMQ/edit#gid=631982242
|
|
13
|
+
* source of truth per banxa
|
|
14
|
+
*/
|
|
10
15
|
const AssetIdToBanxaTickerMap = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
[constants_1.btcAssetId]: 'btc',
|
|
17
|
+
[constants_1.cosmosAssetId]: 'atom',
|
|
18
|
+
[constants_1.ethAssetId]: 'eth',
|
|
19
|
+
[constants_1.avalancheAssetId]: 'avax',
|
|
14
20
|
'eip155:1/erc20:0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9': 'aave',
|
|
15
21
|
'eip155:1/erc20:0xbb0e17ef65f82ab018d8edd776e8dd940327b28b': 'axs',
|
|
16
22
|
'eip155:1/erc20:0x4d224452801aced8b2f0aebe155379bb5d594381': 'ape',
|
|
@@ -52,11 +58,15 @@ exports.getSupportedBanxaAssets = getSupportedBanxaAssets;
|
|
|
52
58
|
* map ChainIds to Banxa blockchain codes (ETH, BTC, COSMOS),
|
|
53
59
|
* since some Banxa assets could be on multiple chains and their default
|
|
54
60
|
* chain won't be exactly the same as ours.
|
|
61
|
+
*
|
|
62
|
+
* https://docs.google.com/spreadsheets/d/1KU6J1Hl4vxBTIWCwWdrFfSadNltuFheQRoJyPrd0LMQ/edit#gid=631982242
|
|
63
|
+
* source of truth per banxa
|
|
55
64
|
*/
|
|
56
65
|
const chainIdToBanxaBlockchainCodeMap = {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
66
|
+
[constants_1.ethChainId]: 'ETH',
|
|
67
|
+
[constants_1.btcChainId]: 'BTC',
|
|
68
|
+
[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
|
|
60
70
|
};
|
|
61
71
|
/**
|
|
62
72
|
* Convert a banxa asset identifier to a Banxa chain identifier for use in Banxa HTTP URLs
|