@shapeshiftoss/utils 1.0.4 → 1.0.6
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/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/assetData/baseAssets.d.ts +27 -1
- package/dist/cjs/assetData/baseAssets.js +427 -17
- package/dist/cjs/assetData/decodeAssetData.js +2 -2
- package/dist/cjs/assetData/getBaseAsset.js +54 -2
- package/dist/cjs/bigAmount/bigAmount.d.ts +82 -0
- package/dist/cjs/bigAmount/bigAmount.js +276 -0
- package/dist/cjs/bigAmount/bigAmount.test.d.ts +1 -0
- package/dist/cjs/bigAmount/bigAmount.test.js +1194 -0
- package/dist/cjs/chainIdToFeeAssetId.js +54 -2
- package/dist/cjs/encoding.d.ts +2 -0
- package/dist/cjs/encoding.js +13 -0
- package/dist/cjs/getAssetNamespaceFromChainId.js +32 -3
- package/dist/cjs/getChainShortName.d.ts +1 -1
- package/dist/cjs/getChainShortName.js +54 -2
- package/dist/cjs/getNativeFeeAssetReference.js +69 -2
- package/dist/cjs/index.d.ts +16 -13
- package/dist/cjs/index.js +22 -16
- package/dist/cjs/treasury.d.ts +6 -2
- package/dist/cjs/treasury.js +9 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/assetData/baseAssets.d.ts +27 -1
- package/dist/esm/assetData/baseAssets.js +426 -16
- package/dist/esm/assetData/decodeAssetData.js +1 -1
- package/dist/esm/assetData/getBaseAsset.js +55 -3
- package/dist/esm/bigAmount/bigAmount.d.ts +82 -0
- package/dist/esm/bigAmount/bigAmount.js +272 -0
- package/dist/esm/bigAmount/bigAmount.test.d.ts +1 -0
- package/dist/esm/bigAmount/bigAmount.test.js +1192 -0
- package/dist/esm/chainIdToFeeAssetId.js +55 -3
- package/dist/esm/encoding.d.ts +2 -0
- package/dist/esm/encoding.js +8 -0
- package/dist/esm/getAssetNamespaceFromChainId.js +32 -3
- package/dist/esm/getChainShortName.d.ts +1 -1
- package/dist/esm/getChainShortName.js +54 -2
- package/dist/esm/getNativeFeeAssetReference.js +69 -2
- package/dist/esm/index.d.ts +16 -13
- package/dist/esm/index.js +19 -14
- package/dist/esm/treasury.d.ts +6 -2
- package/dist/esm/treasury.js +8 -0
- package/package.json +7 -7
|
@@ -4,6 +4,7 @@ export declare const bitcoin: Readonly<Asset>;
|
|
|
4
4
|
export declare const bitcoincash: Readonly<Asset>;
|
|
5
5
|
export declare const dogecoin: Readonly<Asset>;
|
|
6
6
|
export declare const litecoin: Readonly<Asset>;
|
|
7
|
+
export declare const zcash: Readonly<Asset>;
|
|
7
8
|
export declare const atom: Readonly<Asset>;
|
|
8
9
|
export declare const avax: Readonly<Asset>;
|
|
9
10
|
export declare const thorchain: Readonly<Asset>;
|
|
@@ -16,9 +17,34 @@ export declare const bnbsmartchain: Readonly<Asset>;
|
|
|
16
17
|
export declare const polygon: Readonly<Asset>;
|
|
17
18
|
export declare const gnosis: Readonly<Asset>;
|
|
18
19
|
export declare const arbitrum: Readonly<Asset>;
|
|
19
|
-
export declare const arbitrumNova: Readonly<Asset>;
|
|
20
20
|
export declare const base: Readonly<Asset>;
|
|
21
21
|
export declare const monad: Readonly<Asset>;
|
|
22
|
+
export declare const hyperevm: Readonly<Asset>;
|
|
23
|
+
export declare const plasma: Readonly<Asset>;
|
|
24
|
+
export declare const plume: Readonly<Asset>;
|
|
25
|
+
export declare const worldchain: Readonly<Asset>;
|
|
26
|
+
export declare const mantle: Readonly<Asset>;
|
|
27
|
+
export declare const ink: Readonly<Asset>;
|
|
28
|
+
export declare const cronos: Readonly<Asset>;
|
|
29
|
+
export declare const megaeth: Readonly<Asset>;
|
|
30
|
+
export declare const berachain: Readonly<Asset>;
|
|
31
|
+
export declare const katana: Readonly<Asset>;
|
|
32
|
+
export declare const flowEvm: Readonly<Asset>;
|
|
33
|
+
export declare const celo: Readonly<Asset>;
|
|
34
|
+
export declare const story: Readonly<Asset>;
|
|
35
|
+
export declare const zkSyncEra: Readonly<Asset>;
|
|
36
|
+
export declare const blast: Readonly<Asset>;
|
|
37
|
+
export declare const hemi: Readonly<Asset>;
|
|
38
|
+
export declare const linea: Readonly<Asset>;
|
|
39
|
+
export declare const scroll: Readonly<Asset>;
|
|
40
|
+
export declare const sonic: Readonly<Asset>;
|
|
41
|
+
export declare const unichainChain: Readonly<Asset>;
|
|
42
|
+
export declare const bobChain: Readonly<Asset>;
|
|
43
|
+
export declare const modeChain: Readonly<Asset>;
|
|
44
|
+
export declare const soneium: Readonly<Asset>;
|
|
22
45
|
export declare const solana: Readonly<Asset>;
|
|
23
46
|
export declare const tron: Readonly<Asset>;
|
|
24
47
|
export declare const sui: Readonly<Asset>;
|
|
48
|
+
export declare const near: Readonly<Asset>;
|
|
49
|
+
export declare const starknet: Readonly<Asset>;
|
|
50
|
+
export declare const ton: Readonly<Asset>;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.sui = exports.tron = exports.solana = exports.
|
|
26
|
+
exports.ton = exports.starknet = exports.near = exports.sui = exports.tron = exports.solana = exports.soneium = exports.modeChain = exports.bobChain = exports.unichainChain = exports.sonic = exports.scroll = exports.linea = exports.hemi = exports.blast = exports.zkSyncEra = exports.story = exports.celo = exports.flowEvm = exports.katana = exports.berachain = exports.megaeth = exports.cronos = exports.ink = exports.mantle = exports.worldchain = exports.plume = exports.plasma = exports.hyperevm = exports.monad = exports.base = exports.arbitrum = exports.gnosis = exports.polygon = exports.bnbsmartchain = exports.optimism = exports.mayachain = exports.maya = exports.ruji = exports.tcy = exports.thorchain = exports.avax = exports.atom = exports.zcash = exports.litecoin = exports.dogecoin = exports.bitcoincash = exports.bitcoin = exports.ethereum = void 0;
|
|
27
27
|
const caip = __importStar(require("@shapeshiftoss/caip"));
|
|
28
28
|
const mayaTokenAssetId = 'cosmos:mayachain-mainnet-v1/slip44:maya';
|
|
29
29
|
exports.ethereum = Object.freeze({
|
|
@@ -96,6 +96,21 @@ exports.litecoin = Object.freeze({
|
|
|
96
96
|
explorerTxLink: 'https://live.blockcypher.com/ltc/tx/',
|
|
97
97
|
relatedAssetKey: null,
|
|
98
98
|
});
|
|
99
|
+
exports.zcash = Object.freeze({
|
|
100
|
+
assetId: caip.zecAssetId,
|
|
101
|
+
chainId: caip.zecChainId,
|
|
102
|
+
name: 'Zcash',
|
|
103
|
+
networkName: 'Zcash',
|
|
104
|
+
symbol: 'ZEC',
|
|
105
|
+
precision: 8,
|
|
106
|
+
color: '#f4b728',
|
|
107
|
+
networkColor: '#f4b728',
|
|
108
|
+
icon: 'https://rawcdn.githack.com/trustwallet/assets/fb59e296f64fe3df5afdf8148e88603851b613ae/blockchains/zcash/info/logo.png',
|
|
109
|
+
explorer: 'https://blockchair.com',
|
|
110
|
+
explorerAddressLink: 'https://blockchair.com/zcash/address/',
|
|
111
|
+
explorerTxLink: 'https://blockchair.com/zcash/transaction/',
|
|
112
|
+
relatedAssetKey: null,
|
|
113
|
+
});
|
|
99
114
|
exports.atom = Object.freeze({
|
|
100
115
|
assetId: caip.cosmosAssetId,
|
|
101
116
|
chainId: caip.cosmosChainId,
|
|
@@ -270,22 +285,6 @@ exports.arbitrum = Object.freeze({
|
|
|
270
285
|
explorerTxLink: 'https://arbiscan.io/tx/',
|
|
271
286
|
relatedAssetKey: 'eip155:1/slip44:60',
|
|
272
287
|
});
|
|
273
|
-
exports.arbitrumNova = Object.freeze({
|
|
274
|
-
assetId: caip.arbitrumNovaAssetId,
|
|
275
|
-
chainId: caip.arbitrumNovaChainId,
|
|
276
|
-
name: 'Ethereum',
|
|
277
|
-
networkName: 'Arbitrum Nova',
|
|
278
|
-
symbol: 'ETH',
|
|
279
|
-
precision: 18,
|
|
280
|
-
color: '#5C6BC0',
|
|
281
|
-
networkColor: '#E67408',
|
|
282
|
-
icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
|
|
283
|
-
networkIcon: 'https://assets.coingecko.com/asset_platforms/images/93/large/AN_logomark.png?1695026131',
|
|
284
|
-
explorer: 'https://nova.arbiscan.io',
|
|
285
|
-
explorerAddressLink: 'https://nova.arbiscan.io/address/',
|
|
286
|
-
explorerTxLink: 'https://nova.arbiscan.io/tx/',
|
|
287
|
-
relatedAssetKey: 'eip155:1/slip44:60',
|
|
288
|
-
});
|
|
289
288
|
exports.base = Object.freeze({
|
|
290
289
|
assetId: caip.baseAssetId,
|
|
291
290
|
chainId: caip.baseChainId,
|
|
@@ -318,6 +317,372 @@ exports.monad = Object.freeze({
|
|
|
318
317
|
explorerTxLink: 'https://monadvision.com/tx/',
|
|
319
318
|
relatedAssetKey: null,
|
|
320
319
|
});
|
|
320
|
+
exports.hyperevm = Object.freeze({
|
|
321
|
+
assetId: caip.hyperEvmAssetId,
|
|
322
|
+
chainId: caip.hyperEvmChainId,
|
|
323
|
+
name: 'HyperEVM',
|
|
324
|
+
networkName: 'HyperEVM',
|
|
325
|
+
symbol: 'HYPE',
|
|
326
|
+
precision: 18,
|
|
327
|
+
color: '#000000',
|
|
328
|
+
networkColor: '#000000',
|
|
329
|
+
icon: 'https://assets.coingecko.com/coins/images/50882/standard/hyperliquid.jpg?1729431300',
|
|
330
|
+
networkIcon: 'https://assets.coingecko.com/coins/images/50882/standard/hyperliquid.jpg?1729431300',
|
|
331
|
+
explorer: 'https://hyperevmscan.io',
|
|
332
|
+
explorerAddressLink: 'https://hyperevmscan.io/address/',
|
|
333
|
+
explorerTxLink: 'https://hyperevmscan.io/tx/',
|
|
334
|
+
relatedAssetKey: null,
|
|
335
|
+
});
|
|
336
|
+
exports.plasma = Object.freeze({
|
|
337
|
+
assetId: caip.plasmaAssetId,
|
|
338
|
+
chainId: caip.plasmaChainId,
|
|
339
|
+
name: 'Plasma',
|
|
340
|
+
networkName: 'Plasma',
|
|
341
|
+
symbol: 'XPL',
|
|
342
|
+
precision: 18,
|
|
343
|
+
color: '#8B5CF6',
|
|
344
|
+
networkColor: '#8B5CF6',
|
|
345
|
+
icon: 'https://assets.coingecko.com/coins/images/66489/standard/Plasma-symbol-green-1.png?1755142558',
|
|
346
|
+
networkIcon: 'https://assets.coingecko.com/asset_platforms/images/32256/small/plasma.jpg?1758000963',
|
|
347
|
+
explorer: 'https://plasmascan.to',
|
|
348
|
+
explorerAddressLink: 'https://plasmascan.to/address/',
|
|
349
|
+
explorerTxLink: 'https://plasmascan.to/tx/',
|
|
350
|
+
relatedAssetKey: null,
|
|
351
|
+
});
|
|
352
|
+
exports.plume = Object.freeze({
|
|
353
|
+
assetId: caip.plumeAssetId,
|
|
354
|
+
chainId: caip.plumeChainId,
|
|
355
|
+
name: 'Plume',
|
|
356
|
+
networkName: 'Plume',
|
|
357
|
+
symbol: 'PLUME',
|
|
358
|
+
precision: 18,
|
|
359
|
+
color: '#6C5DD3',
|
|
360
|
+
networkColor: '#6C5DD3',
|
|
361
|
+
icon: 'https://assets.coingecko.com/coins/images/49459/large/plume.jpg',
|
|
362
|
+
networkIcon: 'https://assets.coingecko.com/coins/images/49459/small/plume.jpg',
|
|
363
|
+
explorer: 'https://explorer.plume.org',
|
|
364
|
+
explorerAddressLink: 'https://explorer.plume.org/address/',
|
|
365
|
+
explorerTxLink: 'https://explorer.plume.org/tx/',
|
|
366
|
+
relatedAssetKey: null,
|
|
367
|
+
});
|
|
368
|
+
exports.worldchain = Object.freeze({
|
|
369
|
+
assetId: caip.worldChainAssetId,
|
|
370
|
+
chainId: caip.worldChainChainId,
|
|
371
|
+
name: 'Ethereum',
|
|
372
|
+
networkName: 'World Chain',
|
|
373
|
+
symbol: 'ETH',
|
|
374
|
+
precision: 18,
|
|
375
|
+
color: '#000000',
|
|
376
|
+
networkColor: '#000000',
|
|
377
|
+
icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
|
|
378
|
+
networkIcon: 'https://assets.relay.link/icons/480/light.png',
|
|
379
|
+
explorer: 'https://worldscan.org',
|
|
380
|
+
explorerAddressLink: 'https://worldscan.org/address/',
|
|
381
|
+
explorerTxLink: 'https://worldscan.org/tx/',
|
|
382
|
+
relatedAssetKey: 'eip155:1/slip44:60',
|
|
383
|
+
});
|
|
384
|
+
exports.mantle = Object.freeze({
|
|
385
|
+
assetId: caip.mantleAssetId,
|
|
386
|
+
chainId: caip.mantleChainId,
|
|
387
|
+
symbol: 'MNT',
|
|
388
|
+
name: 'Mantle',
|
|
389
|
+
networkName: 'Mantle',
|
|
390
|
+
precision: 18,
|
|
391
|
+
color: '#000000',
|
|
392
|
+
icon: 'https://assets.relay.link/icons/5000/light.png',
|
|
393
|
+
explorer: 'https://mantlescan.xyz',
|
|
394
|
+
explorerAddressLink: 'https://mantlescan.xyz/address/',
|
|
395
|
+
explorerTxLink: 'https://mantlescan.xyz/tx/',
|
|
396
|
+
relatedAssetKey: null,
|
|
397
|
+
});
|
|
398
|
+
exports.ink = Object.freeze({
|
|
399
|
+
assetId: caip.inkAssetId,
|
|
400
|
+
chainId: caip.inkChainId,
|
|
401
|
+
name: 'Ether',
|
|
402
|
+
networkName: 'Ink',
|
|
403
|
+
symbol: 'ETH',
|
|
404
|
+
precision: 18,
|
|
405
|
+
color: '#5A5AFF',
|
|
406
|
+
networkColor: '#5A5AFF',
|
|
407
|
+
icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
|
|
408
|
+
networkIcon: 'https://assets.relay.link/icons/57073/light.png',
|
|
409
|
+
explorer: 'https://explorer.inkonchain.com',
|
|
410
|
+
explorerAddressLink: 'https://explorer.inkonchain.com/address/',
|
|
411
|
+
explorerTxLink: 'https://explorer.inkonchain.com/tx/',
|
|
412
|
+
relatedAssetKey: 'eip155:1/slip44:60',
|
|
413
|
+
});
|
|
414
|
+
exports.cronos = Object.freeze({
|
|
415
|
+
assetId: caip.cronosAssetId,
|
|
416
|
+
chainId: caip.cronosChainId,
|
|
417
|
+
name: 'Cronos',
|
|
418
|
+
networkName: 'Cronos',
|
|
419
|
+
symbol: 'CRO',
|
|
420
|
+
precision: 18,
|
|
421
|
+
color: '#002D74',
|
|
422
|
+
networkColor: '#002D74',
|
|
423
|
+
icon: 'https://assets.relay.link/icons/25/light.png',
|
|
424
|
+
networkIcon: 'https://assets.relay.link/icons/25/light.png',
|
|
425
|
+
explorer: 'https://explorer.cronos.org',
|
|
426
|
+
explorerAddressLink: 'https://explorer.cronos.org/address/',
|
|
427
|
+
explorerTxLink: 'https://explorer.cronos.org/tx/',
|
|
428
|
+
relatedAssetKey: null,
|
|
429
|
+
});
|
|
430
|
+
exports.megaeth = Object.freeze({
|
|
431
|
+
assetId: caip.megaethAssetId,
|
|
432
|
+
chainId: caip.megaethChainId,
|
|
433
|
+
name: 'Ether',
|
|
434
|
+
networkName: 'MegaETH',
|
|
435
|
+
symbol: 'ETH',
|
|
436
|
+
precision: 18,
|
|
437
|
+
color: '#FF6B35',
|
|
438
|
+
networkColor: '#FF6B35',
|
|
439
|
+
icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
|
|
440
|
+
networkIcon: 'https://coin-images.coingecko.com/asset_platforms/images/32266/small/megaeth.jpg?1762329010',
|
|
441
|
+
explorer: 'https://megaeth.blockscout.com',
|
|
442
|
+
explorerAddressLink: 'https://megaeth.blockscout.com/address/',
|
|
443
|
+
explorerTxLink: 'https://megaeth.blockscout.com/tx/',
|
|
444
|
+
relatedAssetKey: 'eip155:1/slip44:60',
|
|
445
|
+
});
|
|
446
|
+
exports.berachain = Object.freeze({
|
|
447
|
+
assetId: caip.berachainAssetId,
|
|
448
|
+
chainId: caip.berachainChainId,
|
|
449
|
+
name: 'Berachain',
|
|
450
|
+
networkName: 'Berachain',
|
|
451
|
+
symbol: 'BERA',
|
|
452
|
+
precision: 18,
|
|
453
|
+
color: '#6B4226',
|
|
454
|
+
networkColor: '#6B4226',
|
|
455
|
+
icon: 'https://assets.relay.link/icons/80094/light.png',
|
|
456
|
+
networkIcon: 'https://assets.relay.link/icons/80094/light.png',
|
|
457
|
+
explorer: 'https://berascan.com',
|
|
458
|
+
explorerAddressLink: 'https://berascan.com/address/',
|
|
459
|
+
explorerTxLink: 'https://berascan.com/tx/',
|
|
460
|
+
relatedAssetKey: null,
|
|
461
|
+
});
|
|
462
|
+
exports.katana = Object.freeze({
|
|
463
|
+
assetId: caip.katanaAssetId,
|
|
464
|
+
chainId: caip.katanaChainId,
|
|
465
|
+
name: 'Ethereum',
|
|
466
|
+
networkName: 'Katana',
|
|
467
|
+
symbol: 'ETH',
|
|
468
|
+
precision: 18,
|
|
469
|
+
color: '#5C6BC0',
|
|
470
|
+
networkColor: '#E11D48',
|
|
471
|
+
icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
|
|
472
|
+
networkIcon: 'https://assets.coingecko.com/asset_platforms/images/32239/small/katana.jpg',
|
|
473
|
+
explorer: 'https://katanascan.com',
|
|
474
|
+
explorerAddressLink: 'https://katanascan.com/address/',
|
|
475
|
+
explorerTxLink: 'https://katanascan.com/tx/',
|
|
476
|
+
relatedAssetKey: 'eip155:1/slip44:60',
|
|
477
|
+
});
|
|
478
|
+
exports.flowEvm = Object.freeze({
|
|
479
|
+
assetId: caip.flowEvmAssetId,
|
|
480
|
+
chainId: caip.flowEvmChainId,
|
|
481
|
+
name: 'Flow',
|
|
482
|
+
networkName: 'Flow EVM',
|
|
483
|
+
symbol: 'FLOW',
|
|
484
|
+
precision: 18,
|
|
485
|
+
color: '#00EF8B',
|
|
486
|
+
networkColor: '#00EF8B',
|
|
487
|
+
icon: 'https://assets.coingecko.com/coins/images/13446/large/5f6294c0c7a8cda55cb1c936_Flow_Wordmark.png',
|
|
488
|
+
networkIcon: 'https://assets.coingecko.com/coins/images/13446/small/5f6294c0c7a8cda55cb1c936_Flow_Wordmark.png',
|
|
489
|
+
explorer: 'https://evm.flowscan.io',
|
|
490
|
+
explorerAddressLink: 'https://evm.flowscan.io/address/',
|
|
491
|
+
explorerTxLink: 'https://evm.flowscan.io/tx/',
|
|
492
|
+
relatedAssetKey: null,
|
|
493
|
+
});
|
|
494
|
+
exports.celo = Object.freeze({
|
|
495
|
+
assetId: caip.celoAssetId,
|
|
496
|
+
chainId: caip.celoChainId,
|
|
497
|
+
name: 'Celo',
|
|
498
|
+
networkName: 'Celo',
|
|
499
|
+
symbol: 'CELO',
|
|
500
|
+
precision: 18,
|
|
501
|
+
color: '#35D07F',
|
|
502
|
+
networkColor: '#35D07F',
|
|
503
|
+
icon: 'https://assets.coingecko.com/coins/images/11090/large/celo.png',
|
|
504
|
+
networkIcon: 'https://assets.coingecko.com/coins/images/11090/small/celo.png',
|
|
505
|
+
explorer: 'https://celoscan.io',
|
|
506
|
+
explorerAddressLink: 'https://celoscan.io/address/',
|
|
507
|
+
explorerTxLink: 'https://celoscan.io/tx/',
|
|
508
|
+
relatedAssetKey: null,
|
|
509
|
+
});
|
|
510
|
+
exports.story = Object.freeze({
|
|
511
|
+
assetId: caip.storyAssetId,
|
|
512
|
+
chainId: caip.storyChainId,
|
|
513
|
+
name: 'Story',
|
|
514
|
+
networkName: 'Story',
|
|
515
|
+
symbol: 'IP',
|
|
516
|
+
precision: 18,
|
|
517
|
+
color: '#EA580C',
|
|
518
|
+
networkColor: '#EA580C',
|
|
519
|
+
icon: 'https://assets.coingecko.com/coins/images/51994/large/story-2.png',
|
|
520
|
+
networkIcon: 'https://assets.coingecko.com/coins/images/51994/small/story-2.png',
|
|
521
|
+
explorer: 'https://storyscan.xyz',
|
|
522
|
+
explorerAddressLink: 'https://storyscan.xyz/address/',
|
|
523
|
+
explorerTxLink: 'https://storyscan.xyz/tx/',
|
|
524
|
+
relatedAssetKey: null,
|
|
525
|
+
});
|
|
526
|
+
exports.zkSyncEra = Object.freeze({
|
|
527
|
+
assetId: caip.zkSyncEraAssetId,
|
|
528
|
+
chainId: caip.zkSyncEraChainId,
|
|
529
|
+
name: 'Ethereum',
|
|
530
|
+
networkName: 'zkSync Era',
|
|
531
|
+
symbol: 'ETH',
|
|
532
|
+
precision: 18,
|
|
533
|
+
color: '#8C8DFC',
|
|
534
|
+
networkColor: '#8C8DFC',
|
|
535
|
+
icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
|
|
536
|
+
networkIcon: 'https://assets.relay.link/icons/324/light.png',
|
|
537
|
+
explorer: 'https://explorer.zksync.io',
|
|
538
|
+
explorerAddressLink: 'https://explorer.zksync.io/address/',
|
|
539
|
+
explorerTxLink: 'https://explorer.zksync.io/tx/',
|
|
540
|
+
relatedAssetKey: 'eip155:1/slip44:60',
|
|
541
|
+
});
|
|
542
|
+
exports.blast = Object.freeze({
|
|
543
|
+
assetId: caip.blastAssetId,
|
|
544
|
+
chainId: caip.blastChainId,
|
|
545
|
+
name: 'Ethereum',
|
|
546
|
+
networkName: 'Blast',
|
|
547
|
+
symbol: 'ETH',
|
|
548
|
+
precision: 18,
|
|
549
|
+
color: '#FCFC03',
|
|
550
|
+
networkColor: '#FCFC03',
|
|
551
|
+
icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
|
|
552
|
+
networkIcon: 'https://assets.relay.link/icons/81457/light.png',
|
|
553
|
+
explorer: 'https://blastscan.io',
|
|
554
|
+
explorerAddressLink: 'https://blastscan.io/address/',
|
|
555
|
+
explorerTxLink: 'https://blastscan.io/tx/',
|
|
556
|
+
relatedAssetKey: 'eip155:1/slip44:60',
|
|
557
|
+
});
|
|
558
|
+
exports.hemi = Object.freeze({
|
|
559
|
+
assetId: caip.hemiAssetId,
|
|
560
|
+
chainId: caip.hemiChainId,
|
|
561
|
+
name: 'Ethereum',
|
|
562
|
+
networkName: 'Hemi',
|
|
563
|
+
symbol: 'ETH',
|
|
564
|
+
precision: 18,
|
|
565
|
+
color: '#FF6B35',
|
|
566
|
+
networkColor: '#FF6B35',
|
|
567
|
+
icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
|
|
568
|
+
networkIcon: 'https://assets.relay.link/icons/43111/light.png',
|
|
569
|
+
explorer: 'https://explorer.hemi.xyz',
|
|
570
|
+
explorerAddressLink: 'https://explorer.hemi.xyz/address/',
|
|
571
|
+
explorerTxLink: 'https://explorer.hemi.xyz/tx/',
|
|
572
|
+
relatedAssetKey: 'eip155:1/slip44:60',
|
|
573
|
+
});
|
|
574
|
+
exports.linea = Object.freeze({
|
|
575
|
+
assetId: caip.lineaAssetId,
|
|
576
|
+
chainId: caip.lineaChainId,
|
|
577
|
+
name: 'Ethereum',
|
|
578
|
+
networkName: 'Linea',
|
|
579
|
+
symbol: 'ETH',
|
|
580
|
+
precision: 18,
|
|
581
|
+
color: '#5C6BC0',
|
|
582
|
+
networkColor: '#121212',
|
|
583
|
+
icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
|
|
584
|
+
networkIcon: 'https://assets.relay.link/icons/59144/light.png',
|
|
585
|
+
explorer: 'https://lineascan.build',
|
|
586
|
+
explorerAddressLink: 'https://lineascan.build/address/',
|
|
587
|
+
explorerTxLink: 'https://lineascan.build/tx/',
|
|
588
|
+
relatedAssetKey: 'eip155:1/slip44:60',
|
|
589
|
+
});
|
|
590
|
+
exports.scroll = Object.freeze({
|
|
591
|
+
assetId: caip.scrollAssetId,
|
|
592
|
+
chainId: caip.scrollChainId,
|
|
593
|
+
name: 'Ether',
|
|
594
|
+
networkName: 'Scroll',
|
|
595
|
+
symbol: 'ETH',
|
|
596
|
+
precision: 18,
|
|
597
|
+
color: '#FFEEDA',
|
|
598
|
+
networkColor: '#FFEEDA',
|
|
599
|
+
icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
|
|
600
|
+
networkIcon: 'https://scroll-tech.github.io/token-list/scroll.png',
|
|
601
|
+
explorer: 'https://scrollscan.com',
|
|
602
|
+
explorerAddressLink: 'https://scrollscan.com/address/',
|
|
603
|
+
explorerTxLink: 'https://scrollscan.com/tx/',
|
|
604
|
+
relatedAssetKey: 'eip155:1/slip44:60',
|
|
605
|
+
});
|
|
606
|
+
exports.sonic = Object.freeze({
|
|
607
|
+
assetId: caip.sonicAssetId,
|
|
608
|
+
chainId: caip.sonicChainId,
|
|
609
|
+
name: 'Sonic (S)',
|
|
610
|
+
networkName: 'Sonic',
|
|
611
|
+
symbol: 'S',
|
|
612
|
+
precision: 18,
|
|
613
|
+
color: '#1B1464',
|
|
614
|
+
networkColor: '#1B1464',
|
|
615
|
+
icon: 'https://assets.coingecko.com/coins/images/38108/standard/200x200_Sonic_Logo.png',
|
|
616
|
+
networkIcon: 'https://assets.coingecko.com/coins/images/38108/standard/200x200_Sonic_Logo.png',
|
|
617
|
+
explorer: 'https://sonicscan.org',
|
|
618
|
+
explorerAddressLink: 'https://sonicscan.org/address/',
|
|
619
|
+
explorerTxLink: 'https://sonicscan.org/tx/',
|
|
620
|
+
relatedAssetKey: null,
|
|
621
|
+
});
|
|
622
|
+
exports.unichainChain = Object.freeze({
|
|
623
|
+
assetId: caip.unichainAssetId,
|
|
624
|
+
chainId: caip.unichainChainId,
|
|
625
|
+
name: 'Ether',
|
|
626
|
+
networkName: 'Unichain',
|
|
627
|
+
symbol: 'ETH',
|
|
628
|
+
precision: 18,
|
|
629
|
+
color: '#5C6BC0',
|
|
630
|
+
networkColor: '#F50DB4',
|
|
631
|
+
icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
|
|
632
|
+
networkIcon: 'https://assets.coingecko.com/asset_platforms/images/22206/small/unichain.png',
|
|
633
|
+
explorer: 'https://uniscan.xyz',
|
|
634
|
+
explorerAddressLink: 'https://uniscan.xyz/address/',
|
|
635
|
+
explorerTxLink: 'https://uniscan.xyz/tx/',
|
|
636
|
+
relatedAssetKey: 'eip155:1/slip44:60',
|
|
637
|
+
});
|
|
638
|
+
exports.bobChain = Object.freeze({
|
|
639
|
+
assetId: caip.bobAssetId,
|
|
640
|
+
chainId: caip.bobChainId,
|
|
641
|
+
name: 'Ethereum',
|
|
642
|
+
networkName: 'BOB',
|
|
643
|
+
symbol: 'ETH',
|
|
644
|
+
precision: 18,
|
|
645
|
+
color: '#5C6BC0',
|
|
646
|
+
networkColor: '#F25D00',
|
|
647
|
+
icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
|
|
648
|
+
networkIcon: 'https://assets.coingecko.com/asset_platforms/images/255/small/bob.jpeg',
|
|
649
|
+
explorer: 'https://explorer.gobob.xyz',
|
|
650
|
+
explorerAddressLink: 'https://explorer.gobob.xyz/address/',
|
|
651
|
+
explorerTxLink: 'https://explorer.gobob.xyz/tx/',
|
|
652
|
+
relatedAssetKey: 'eip155:1/slip44:60',
|
|
653
|
+
});
|
|
654
|
+
exports.modeChain = Object.freeze({
|
|
655
|
+
assetId: caip.modeAssetId,
|
|
656
|
+
chainId: caip.modeChainId,
|
|
657
|
+
name: 'Ethereum',
|
|
658
|
+
networkName: 'Mode',
|
|
659
|
+
symbol: 'ETH',
|
|
660
|
+
precision: 18,
|
|
661
|
+
color: '#5C6BC0',
|
|
662
|
+
networkColor: '#DFFE00',
|
|
663
|
+
icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
|
|
664
|
+
networkIcon: 'https://assets.relay.link/icons/34443/light.png',
|
|
665
|
+
explorer: 'https://modescan.io',
|
|
666
|
+
explorerAddressLink: 'https://modescan.io/address/',
|
|
667
|
+
explorerTxLink: 'https://modescan.io/tx/',
|
|
668
|
+
relatedAssetKey: 'eip155:1/slip44:60',
|
|
669
|
+
});
|
|
670
|
+
exports.soneium = Object.freeze({
|
|
671
|
+
assetId: caip.soneiumAssetId,
|
|
672
|
+
chainId: caip.soneiumChainId,
|
|
673
|
+
name: 'Ethereum',
|
|
674
|
+
networkName: 'Soneium',
|
|
675
|
+
symbol: 'ETH',
|
|
676
|
+
precision: 18,
|
|
677
|
+
color: '#627EEA',
|
|
678
|
+
networkColor: '#1A1A2E',
|
|
679
|
+
icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
|
|
680
|
+
networkIcon: 'https://assets.relay.link/icons/1868/light.png',
|
|
681
|
+
explorer: 'https://soneium.blockscout.com',
|
|
682
|
+
explorerAddressLink: 'https://soneium.blockscout.com/address/',
|
|
683
|
+
explorerTxLink: 'https://soneium.blockscout.com/tx/',
|
|
684
|
+
relatedAssetKey: 'eip155:1/slip44:60',
|
|
685
|
+
});
|
|
321
686
|
exports.solana = Object.freeze({
|
|
322
687
|
assetId: caip.solAssetId,
|
|
323
688
|
chainId: caip.solanaChainId,
|
|
@@ -363,3 +728,48 @@ exports.sui = Object.freeze({
|
|
|
363
728
|
explorerTxLink: 'https://suiscan.xyz/mainnet/tx/',
|
|
364
729
|
relatedAssetKey: null,
|
|
365
730
|
});
|
|
731
|
+
exports.near = Object.freeze({
|
|
732
|
+
assetId: caip.nearAssetId,
|
|
733
|
+
chainId: caip.nearChainId,
|
|
734
|
+
name: 'NEAR Protocol',
|
|
735
|
+
networkName: 'NEAR',
|
|
736
|
+
symbol: 'NEAR',
|
|
737
|
+
precision: 24,
|
|
738
|
+
color: '#00C08B',
|
|
739
|
+
networkColor: '#00C08B',
|
|
740
|
+
icon: 'https://assets.coingecko.com/coins/images/10365/large/near.jpg?1696510367',
|
|
741
|
+
explorer: 'https://nearblocks.io',
|
|
742
|
+
explorerAddressLink: 'https://nearblocks.io/address/',
|
|
743
|
+
explorerTxLink: 'https://nearblocks.io/txns/',
|
|
744
|
+
relatedAssetKey: null,
|
|
745
|
+
});
|
|
746
|
+
exports.starknet = Object.freeze({
|
|
747
|
+
assetId: caip.starknetAssetId,
|
|
748
|
+
chainId: caip.starknetChainId,
|
|
749
|
+
name: 'Starknet',
|
|
750
|
+
networkName: 'Starknet',
|
|
751
|
+
symbol: 'STRK',
|
|
752
|
+
precision: 18,
|
|
753
|
+
color: '#EC796B',
|
|
754
|
+
networkColor: '#EC796B',
|
|
755
|
+
icon: 'https://assets.coingecko.com/coins/images/26433/large/starknet.png',
|
|
756
|
+
explorer: 'https://starkscan.co',
|
|
757
|
+
explorerAddressLink: 'https://starkscan.co/contract/',
|
|
758
|
+
explorerTxLink: 'https://starkscan.co/tx/',
|
|
759
|
+
relatedAssetKey: null,
|
|
760
|
+
});
|
|
761
|
+
exports.ton = Object.freeze({
|
|
762
|
+
assetId: caip.tonAssetId,
|
|
763
|
+
chainId: caip.tonChainId,
|
|
764
|
+
name: 'Toncoin',
|
|
765
|
+
networkName: 'TON',
|
|
766
|
+
symbol: 'TON',
|
|
767
|
+
precision: 9,
|
|
768
|
+
color: '#0098EA',
|
|
769
|
+
networkColor: '#0098EA',
|
|
770
|
+
icon: 'https://assets.coingecko.com/coins/images/17980/large/ton_symbol.png?1696517498',
|
|
771
|
+
explorer: 'https://tonscan.org',
|
|
772
|
+
explorerAddressLink: 'https://tonscan.org/address/',
|
|
773
|
+
explorerTxLink: 'https://tonscan.org/tx/',
|
|
774
|
+
relatedAssetKey: null,
|
|
775
|
+
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.decodeAssetData = void 0;
|
|
4
4
|
const caip_1 = require("@shapeshiftoss/caip");
|
|
5
|
-
const
|
|
5
|
+
const lodash_es_1 = require("lodash-es");
|
|
6
6
|
const assertUnreachable_1 = require("../assertUnreachable");
|
|
7
7
|
const constants_1 = require("./constants");
|
|
8
8
|
const getBaseAsset_1 = require("./getBaseAsset");
|
|
@@ -34,7 +34,7 @@ const decodeAssetData = (encodedAssetData, shouldAddNetworkName = false) => {
|
|
|
34
34
|
explorerAddressLink: '',
|
|
35
35
|
explorerTxLink: '',
|
|
36
36
|
relatedAssetKey: null,
|
|
37
|
-
}, (0,
|
|
37
|
+
}, (0, lodash_es_1.pick)(baseAsset, ['explorer', 'explorerAddressLink', 'explorerTxLink']));
|
|
38
38
|
if (assetId === baseAsset?.assetId) {
|
|
39
39
|
asset.networkName = baseAsset.networkName;
|
|
40
40
|
asset.networkIcon = baseAsset.networkIcon;
|
|
@@ -21,14 +21,14 @@ const getBaseAsset = (chainId) => {
|
|
|
21
21
|
return baseAssets_1.gnosis;
|
|
22
22
|
case types_1.KnownChainIds.ArbitrumMainnet:
|
|
23
23
|
return baseAssets_1.arbitrum;
|
|
24
|
-
case types_1.KnownChainIds.ArbitrumNovaMainnet:
|
|
25
|
-
return baseAssets_1.arbitrumNova;
|
|
26
24
|
case types_1.KnownChainIds.BaseMainnet:
|
|
27
25
|
return baseAssets_1.base;
|
|
28
26
|
case types_1.KnownChainIds.SolanaMainnet:
|
|
29
27
|
return baseAssets_1.solana;
|
|
30
28
|
case types_1.KnownChainIds.SuiMainnet:
|
|
31
29
|
return baseAssets_1.sui;
|
|
30
|
+
case types_1.KnownChainIds.StarknetMainnet:
|
|
31
|
+
return baseAssets_1.starknet;
|
|
32
32
|
case types_1.KnownChainIds.BitcoinMainnet:
|
|
33
33
|
return baseAssets_1.bitcoin;
|
|
34
34
|
case types_1.KnownChainIds.BitcoinCashMainnet:
|
|
@@ -47,6 +47,58 @@ const getBaseAsset = (chainId) => {
|
|
|
47
47
|
return baseAssets_1.tron;
|
|
48
48
|
case types_1.KnownChainIds.MonadMainnet:
|
|
49
49
|
return baseAssets_1.monad;
|
|
50
|
+
case types_1.KnownChainIds.HyperEvmMainnet:
|
|
51
|
+
return baseAssets_1.hyperevm;
|
|
52
|
+
case types_1.KnownChainIds.PlasmaMainnet:
|
|
53
|
+
return baseAssets_1.plasma;
|
|
54
|
+
case types_1.KnownChainIds.PlumeMainnet:
|
|
55
|
+
return baseAssets_1.plume;
|
|
56
|
+
case types_1.KnownChainIds.MantleMainnet:
|
|
57
|
+
return baseAssets_1.mantle;
|
|
58
|
+
case types_1.KnownChainIds.InkMainnet:
|
|
59
|
+
return baseAssets_1.ink;
|
|
60
|
+
case types_1.KnownChainIds.MegaEthMainnet:
|
|
61
|
+
return baseAssets_1.megaeth;
|
|
62
|
+
case types_1.KnownChainIds.BerachainMainnet:
|
|
63
|
+
return baseAssets_1.berachain;
|
|
64
|
+
case types_1.KnownChainIds.CronosMainnet:
|
|
65
|
+
return baseAssets_1.cronos;
|
|
66
|
+
case types_1.KnownChainIds.KatanaMainnet:
|
|
67
|
+
return baseAssets_1.katana;
|
|
68
|
+
case types_1.KnownChainIds.FlowEvmMainnet:
|
|
69
|
+
return baseAssets_1.flowEvm;
|
|
70
|
+
case types_1.KnownChainIds.CeloMainnet:
|
|
71
|
+
return baseAssets_1.celo;
|
|
72
|
+
case types_1.KnownChainIds.StoryMainnet:
|
|
73
|
+
return baseAssets_1.story;
|
|
74
|
+
case types_1.KnownChainIds.ZkSyncEraMainnet:
|
|
75
|
+
return baseAssets_1.zkSyncEra;
|
|
76
|
+
case types_1.KnownChainIds.BlastMainnet:
|
|
77
|
+
return baseAssets_1.blast;
|
|
78
|
+
case types_1.KnownChainIds.WorldChainMainnet:
|
|
79
|
+
return baseAssets_1.worldchain;
|
|
80
|
+
case types_1.KnownChainIds.HemiMainnet:
|
|
81
|
+
return baseAssets_1.hemi;
|
|
82
|
+
case types_1.KnownChainIds.LineaMainnet:
|
|
83
|
+
return baseAssets_1.linea;
|
|
84
|
+
case types_1.KnownChainIds.ScrollMainnet:
|
|
85
|
+
return baseAssets_1.scroll;
|
|
86
|
+
case types_1.KnownChainIds.SonicMainnet:
|
|
87
|
+
return baseAssets_1.sonic;
|
|
88
|
+
case types_1.KnownChainIds.UnichainMainnet:
|
|
89
|
+
return baseAssets_1.unichainChain;
|
|
90
|
+
case types_1.KnownChainIds.BobMainnet:
|
|
91
|
+
return baseAssets_1.bobChain;
|
|
92
|
+
case types_1.KnownChainIds.ModeMainnet:
|
|
93
|
+
return baseAssets_1.modeChain;
|
|
94
|
+
case types_1.KnownChainIds.SoneiumMainnet:
|
|
95
|
+
return baseAssets_1.soneium;
|
|
96
|
+
case types_1.KnownChainIds.NearMainnet:
|
|
97
|
+
return baseAssets_1.near;
|
|
98
|
+
case types_1.KnownChainIds.ZcashMainnet:
|
|
99
|
+
return baseAssets_1.zcash;
|
|
100
|
+
case types_1.KnownChainIds.TonMainnet:
|
|
101
|
+
return baseAssets_1.ton;
|
|
50
102
|
default:
|
|
51
103
|
return (0, assertUnreachable_1.assertUnreachable)(knownChainId);
|
|
52
104
|
}
|