@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.
Files changed (41) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/assetData/baseAssets.d.ts +27 -1
  3. package/dist/cjs/assetData/baseAssets.js +427 -17
  4. package/dist/cjs/assetData/decodeAssetData.js +2 -2
  5. package/dist/cjs/assetData/getBaseAsset.js +54 -2
  6. package/dist/cjs/bigAmount/bigAmount.d.ts +82 -0
  7. package/dist/cjs/bigAmount/bigAmount.js +276 -0
  8. package/dist/cjs/bigAmount/bigAmount.test.d.ts +1 -0
  9. package/dist/cjs/bigAmount/bigAmount.test.js +1194 -0
  10. package/dist/cjs/chainIdToFeeAssetId.js +54 -2
  11. package/dist/cjs/encoding.d.ts +2 -0
  12. package/dist/cjs/encoding.js +13 -0
  13. package/dist/cjs/getAssetNamespaceFromChainId.js +32 -3
  14. package/dist/cjs/getChainShortName.d.ts +1 -1
  15. package/dist/cjs/getChainShortName.js +54 -2
  16. package/dist/cjs/getNativeFeeAssetReference.js +69 -2
  17. package/dist/cjs/index.d.ts +16 -13
  18. package/dist/cjs/index.js +22 -16
  19. package/dist/cjs/treasury.d.ts +6 -2
  20. package/dist/cjs/treasury.js +9 -1
  21. package/dist/esm/.tsbuildinfo +1 -1
  22. package/dist/esm/assetData/baseAssets.d.ts +27 -1
  23. package/dist/esm/assetData/baseAssets.js +426 -16
  24. package/dist/esm/assetData/decodeAssetData.js +1 -1
  25. package/dist/esm/assetData/getBaseAsset.js +55 -3
  26. package/dist/esm/bigAmount/bigAmount.d.ts +82 -0
  27. package/dist/esm/bigAmount/bigAmount.js +272 -0
  28. package/dist/esm/bigAmount/bigAmount.test.d.ts +1 -0
  29. package/dist/esm/bigAmount/bigAmount.test.js +1192 -0
  30. package/dist/esm/chainIdToFeeAssetId.js +55 -3
  31. package/dist/esm/encoding.d.ts +2 -0
  32. package/dist/esm/encoding.js +8 -0
  33. package/dist/esm/getAssetNamespaceFromChainId.js +32 -3
  34. package/dist/esm/getChainShortName.d.ts +1 -1
  35. package/dist/esm/getChainShortName.js +54 -2
  36. package/dist/esm/getNativeFeeAssetReference.js +69 -2
  37. package/dist/esm/index.d.ts +16 -13
  38. package/dist/esm/index.js +19 -14
  39. package/dist/esm/treasury.d.ts +6 -2
  40. package/dist/esm/treasury.js +8 -0
  41. 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>;
@@ -70,6 +70,21 @@ export const litecoin = Object.freeze({
70
70
  explorerTxLink: 'https://live.blockcypher.com/ltc/tx/',
71
71
  relatedAssetKey: null,
72
72
  });
73
+ export const zcash = Object.freeze({
74
+ assetId: caip.zecAssetId,
75
+ chainId: caip.zecChainId,
76
+ name: 'Zcash',
77
+ networkName: 'Zcash',
78
+ symbol: 'ZEC',
79
+ precision: 8,
80
+ color: '#f4b728',
81
+ networkColor: '#f4b728',
82
+ icon: 'https://rawcdn.githack.com/trustwallet/assets/fb59e296f64fe3df5afdf8148e88603851b613ae/blockchains/zcash/info/logo.png',
83
+ explorer: 'https://blockchair.com',
84
+ explorerAddressLink: 'https://blockchair.com/zcash/address/',
85
+ explorerTxLink: 'https://blockchair.com/zcash/transaction/',
86
+ relatedAssetKey: null,
87
+ });
73
88
  export const atom = Object.freeze({
74
89
  assetId: caip.cosmosAssetId,
75
90
  chainId: caip.cosmosChainId,
@@ -244,22 +259,6 @@ export const arbitrum = Object.freeze({
244
259
  explorerTxLink: 'https://arbiscan.io/tx/',
245
260
  relatedAssetKey: 'eip155:1/slip44:60',
246
261
  });
247
- export const arbitrumNova = Object.freeze({
248
- assetId: caip.arbitrumNovaAssetId,
249
- chainId: caip.arbitrumNovaChainId,
250
- name: 'Ethereum',
251
- networkName: 'Arbitrum Nova',
252
- symbol: 'ETH',
253
- precision: 18,
254
- color: '#5C6BC0',
255
- networkColor: '#E67408',
256
- icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
257
- networkIcon: 'https://assets.coingecko.com/asset_platforms/images/93/large/AN_logomark.png?1695026131',
258
- explorer: 'https://nova.arbiscan.io',
259
- explorerAddressLink: 'https://nova.arbiscan.io/address/',
260
- explorerTxLink: 'https://nova.arbiscan.io/tx/',
261
- relatedAssetKey: 'eip155:1/slip44:60',
262
- });
263
262
  export const base = Object.freeze({
264
263
  assetId: caip.baseAssetId,
265
264
  chainId: caip.baseChainId,
@@ -292,6 +291,372 @@ export const monad = Object.freeze({
292
291
  explorerTxLink: 'https://monadvision.com/tx/',
293
292
  relatedAssetKey: null,
294
293
  });
294
+ export const hyperevm = Object.freeze({
295
+ assetId: caip.hyperEvmAssetId,
296
+ chainId: caip.hyperEvmChainId,
297
+ name: 'HyperEVM',
298
+ networkName: 'HyperEVM',
299
+ symbol: 'HYPE',
300
+ precision: 18,
301
+ color: '#000000',
302
+ networkColor: '#000000',
303
+ icon: 'https://assets.coingecko.com/coins/images/50882/standard/hyperliquid.jpg?1729431300',
304
+ networkIcon: 'https://assets.coingecko.com/coins/images/50882/standard/hyperliquid.jpg?1729431300',
305
+ explorer: 'https://hyperevmscan.io',
306
+ explorerAddressLink: 'https://hyperevmscan.io/address/',
307
+ explorerTxLink: 'https://hyperevmscan.io/tx/',
308
+ relatedAssetKey: null,
309
+ });
310
+ export const plasma = Object.freeze({
311
+ assetId: caip.plasmaAssetId,
312
+ chainId: caip.plasmaChainId,
313
+ name: 'Plasma',
314
+ networkName: 'Plasma',
315
+ symbol: 'XPL',
316
+ precision: 18,
317
+ color: '#8B5CF6',
318
+ networkColor: '#8B5CF6',
319
+ icon: 'https://assets.coingecko.com/coins/images/66489/standard/Plasma-symbol-green-1.png?1755142558',
320
+ networkIcon: 'https://assets.coingecko.com/asset_platforms/images/32256/small/plasma.jpg?1758000963',
321
+ explorer: 'https://plasmascan.to',
322
+ explorerAddressLink: 'https://plasmascan.to/address/',
323
+ explorerTxLink: 'https://plasmascan.to/tx/',
324
+ relatedAssetKey: null,
325
+ });
326
+ export const plume = Object.freeze({
327
+ assetId: caip.plumeAssetId,
328
+ chainId: caip.plumeChainId,
329
+ name: 'Plume',
330
+ networkName: 'Plume',
331
+ symbol: 'PLUME',
332
+ precision: 18,
333
+ color: '#6C5DD3',
334
+ networkColor: '#6C5DD3',
335
+ icon: 'https://assets.coingecko.com/coins/images/49459/large/plume.jpg',
336
+ networkIcon: 'https://assets.coingecko.com/coins/images/49459/small/plume.jpg',
337
+ explorer: 'https://explorer.plume.org',
338
+ explorerAddressLink: 'https://explorer.plume.org/address/',
339
+ explorerTxLink: 'https://explorer.plume.org/tx/',
340
+ relatedAssetKey: null,
341
+ });
342
+ export const worldchain = Object.freeze({
343
+ assetId: caip.worldChainAssetId,
344
+ chainId: caip.worldChainChainId,
345
+ name: 'Ethereum',
346
+ networkName: 'World Chain',
347
+ symbol: 'ETH',
348
+ precision: 18,
349
+ color: '#000000',
350
+ networkColor: '#000000',
351
+ icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
352
+ networkIcon: 'https://assets.relay.link/icons/480/light.png',
353
+ explorer: 'https://worldscan.org',
354
+ explorerAddressLink: 'https://worldscan.org/address/',
355
+ explorerTxLink: 'https://worldscan.org/tx/',
356
+ relatedAssetKey: 'eip155:1/slip44:60',
357
+ });
358
+ export const mantle = Object.freeze({
359
+ assetId: caip.mantleAssetId,
360
+ chainId: caip.mantleChainId,
361
+ symbol: 'MNT',
362
+ name: 'Mantle',
363
+ networkName: 'Mantle',
364
+ precision: 18,
365
+ color: '#000000',
366
+ icon: 'https://assets.relay.link/icons/5000/light.png',
367
+ explorer: 'https://mantlescan.xyz',
368
+ explorerAddressLink: 'https://mantlescan.xyz/address/',
369
+ explorerTxLink: 'https://mantlescan.xyz/tx/',
370
+ relatedAssetKey: null,
371
+ });
372
+ export const ink = Object.freeze({
373
+ assetId: caip.inkAssetId,
374
+ chainId: caip.inkChainId,
375
+ name: 'Ether',
376
+ networkName: 'Ink',
377
+ symbol: 'ETH',
378
+ precision: 18,
379
+ color: '#5A5AFF',
380
+ networkColor: '#5A5AFF',
381
+ icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
382
+ networkIcon: 'https://assets.relay.link/icons/57073/light.png',
383
+ explorer: 'https://explorer.inkonchain.com',
384
+ explorerAddressLink: 'https://explorer.inkonchain.com/address/',
385
+ explorerTxLink: 'https://explorer.inkonchain.com/tx/',
386
+ relatedAssetKey: 'eip155:1/slip44:60',
387
+ });
388
+ export const cronos = Object.freeze({
389
+ assetId: caip.cronosAssetId,
390
+ chainId: caip.cronosChainId,
391
+ name: 'Cronos',
392
+ networkName: 'Cronos',
393
+ symbol: 'CRO',
394
+ precision: 18,
395
+ color: '#002D74',
396
+ networkColor: '#002D74',
397
+ icon: 'https://assets.relay.link/icons/25/light.png',
398
+ networkIcon: 'https://assets.relay.link/icons/25/light.png',
399
+ explorer: 'https://explorer.cronos.org',
400
+ explorerAddressLink: 'https://explorer.cronos.org/address/',
401
+ explorerTxLink: 'https://explorer.cronos.org/tx/',
402
+ relatedAssetKey: null,
403
+ });
404
+ export const megaeth = Object.freeze({
405
+ assetId: caip.megaethAssetId,
406
+ chainId: caip.megaethChainId,
407
+ name: 'Ether',
408
+ networkName: 'MegaETH',
409
+ symbol: 'ETH',
410
+ precision: 18,
411
+ color: '#FF6B35',
412
+ networkColor: '#FF6B35',
413
+ icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
414
+ networkIcon: 'https://coin-images.coingecko.com/asset_platforms/images/32266/small/megaeth.jpg?1762329010',
415
+ explorer: 'https://megaeth.blockscout.com',
416
+ explorerAddressLink: 'https://megaeth.blockscout.com/address/',
417
+ explorerTxLink: 'https://megaeth.blockscout.com/tx/',
418
+ relatedAssetKey: 'eip155:1/slip44:60',
419
+ });
420
+ export const berachain = Object.freeze({
421
+ assetId: caip.berachainAssetId,
422
+ chainId: caip.berachainChainId,
423
+ name: 'Berachain',
424
+ networkName: 'Berachain',
425
+ symbol: 'BERA',
426
+ precision: 18,
427
+ color: '#6B4226',
428
+ networkColor: '#6B4226',
429
+ icon: 'https://assets.relay.link/icons/80094/light.png',
430
+ networkIcon: 'https://assets.relay.link/icons/80094/light.png',
431
+ explorer: 'https://berascan.com',
432
+ explorerAddressLink: 'https://berascan.com/address/',
433
+ explorerTxLink: 'https://berascan.com/tx/',
434
+ relatedAssetKey: null,
435
+ });
436
+ export const katana = Object.freeze({
437
+ assetId: caip.katanaAssetId,
438
+ chainId: caip.katanaChainId,
439
+ name: 'Ethereum',
440
+ networkName: 'Katana',
441
+ symbol: 'ETH',
442
+ precision: 18,
443
+ color: '#5C6BC0',
444
+ networkColor: '#E11D48',
445
+ icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
446
+ networkIcon: 'https://assets.coingecko.com/asset_platforms/images/32239/small/katana.jpg',
447
+ explorer: 'https://katanascan.com',
448
+ explorerAddressLink: 'https://katanascan.com/address/',
449
+ explorerTxLink: 'https://katanascan.com/tx/',
450
+ relatedAssetKey: 'eip155:1/slip44:60',
451
+ });
452
+ export const flowEvm = Object.freeze({
453
+ assetId: caip.flowEvmAssetId,
454
+ chainId: caip.flowEvmChainId,
455
+ name: 'Flow',
456
+ networkName: 'Flow EVM',
457
+ symbol: 'FLOW',
458
+ precision: 18,
459
+ color: '#00EF8B',
460
+ networkColor: '#00EF8B',
461
+ icon: 'https://assets.coingecko.com/coins/images/13446/large/5f6294c0c7a8cda55cb1c936_Flow_Wordmark.png',
462
+ networkIcon: 'https://assets.coingecko.com/coins/images/13446/small/5f6294c0c7a8cda55cb1c936_Flow_Wordmark.png',
463
+ explorer: 'https://evm.flowscan.io',
464
+ explorerAddressLink: 'https://evm.flowscan.io/address/',
465
+ explorerTxLink: 'https://evm.flowscan.io/tx/',
466
+ relatedAssetKey: null,
467
+ });
468
+ export const celo = Object.freeze({
469
+ assetId: caip.celoAssetId,
470
+ chainId: caip.celoChainId,
471
+ name: 'Celo',
472
+ networkName: 'Celo',
473
+ symbol: 'CELO',
474
+ precision: 18,
475
+ color: '#35D07F',
476
+ networkColor: '#35D07F',
477
+ icon: 'https://assets.coingecko.com/coins/images/11090/large/celo.png',
478
+ networkIcon: 'https://assets.coingecko.com/coins/images/11090/small/celo.png',
479
+ explorer: 'https://celoscan.io',
480
+ explorerAddressLink: 'https://celoscan.io/address/',
481
+ explorerTxLink: 'https://celoscan.io/tx/',
482
+ relatedAssetKey: null,
483
+ });
484
+ export const story = Object.freeze({
485
+ assetId: caip.storyAssetId,
486
+ chainId: caip.storyChainId,
487
+ name: 'Story',
488
+ networkName: 'Story',
489
+ symbol: 'IP',
490
+ precision: 18,
491
+ color: '#EA580C',
492
+ networkColor: '#EA580C',
493
+ icon: 'https://assets.coingecko.com/coins/images/51994/large/story-2.png',
494
+ networkIcon: 'https://assets.coingecko.com/coins/images/51994/small/story-2.png',
495
+ explorer: 'https://storyscan.xyz',
496
+ explorerAddressLink: 'https://storyscan.xyz/address/',
497
+ explorerTxLink: 'https://storyscan.xyz/tx/',
498
+ relatedAssetKey: null,
499
+ });
500
+ export const zkSyncEra = Object.freeze({
501
+ assetId: caip.zkSyncEraAssetId,
502
+ chainId: caip.zkSyncEraChainId,
503
+ name: 'Ethereum',
504
+ networkName: 'zkSync Era',
505
+ symbol: 'ETH',
506
+ precision: 18,
507
+ color: '#8C8DFC',
508
+ networkColor: '#8C8DFC',
509
+ icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
510
+ networkIcon: 'https://assets.relay.link/icons/324/light.png',
511
+ explorer: 'https://explorer.zksync.io',
512
+ explorerAddressLink: 'https://explorer.zksync.io/address/',
513
+ explorerTxLink: 'https://explorer.zksync.io/tx/',
514
+ relatedAssetKey: 'eip155:1/slip44:60',
515
+ });
516
+ export const blast = Object.freeze({
517
+ assetId: caip.blastAssetId,
518
+ chainId: caip.blastChainId,
519
+ name: 'Ethereum',
520
+ networkName: 'Blast',
521
+ symbol: 'ETH',
522
+ precision: 18,
523
+ color: '#FCFC03',
524
+ networkColor: '#FCFC03',
525
+ icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
526
+ networkIcon: 'https://assets.relay.link/icons/81457/light.png',
527
+ explorer: 'https://blastscan.io',
528
+ explorerAddressLink: 'https://blastscan.io/address/',
529
+ explorerTxLink: 'https://blastscan.io/tx/',
530
+ relatedAssetKey: 'eip155:1/slip44:60',
531
+ });
532
+ export const hemi = Object.freeze({
533
+ assetId: caip.hemiAssetId,
534
+ chainId: caip.hemiChainId,
535
+ name: 'Ethereum',
536
+ networkName: 'Hemi',
537
+ symbol: 'ETH',
538
+ precision: 18,
539
+ color: '#FF6B35',
540
+ networkColor: '#FF6B35',
541
+ icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
542
+ networkIcon: 'https://assets.relay.link/icons/43111/light.png',
543
+ explorer: 'https://explorer.hemi.xyz',
544
+ explorerAddressLink: 'https://explorer.hemi.xyz/address/',
545
+ explorerTxLink: 'https://explorer.hemi.xyz/tx/',
546
+ relatedAssetKey: 'eip155:1/slip44:60',
547
+ });
548
+ export const linea = Object.freeze({
549
+ assetId: caip.lineaAssetId,
550
+ chainId: caip.lineaChainId,
551
+ name: 'Ethereum',
552
+ networkName: 'Linea',
553
+ symbol: 'ETH',
554
+ precision: 18,
555
+ color: '#5C6BC0',
556
+ networkColor: '#121212',
557
+ icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
558
+ networkIcon: 'https://assets.relay.link/icons/59144/light.png',
559
+ explorer: 'https://lineascan.build',
560
+ explorerAddressLink: 'https://lineascan.build/address/',
561
+ explorerTxLink: 'https://lineascan.build/tx/',
562
+ relatedAssetKey: 'eip155:1/slip44:60',
563
+ });
564
+ export const scroll = Object.freeze({
565
+ assetId: caip.scrollAssetId,
566
+ chainId: caip.scrollChainId,
567
+ name: 'Ether',
568
+ networkName: 'Scroll',
569
+ symbol: 'ETH',
570
+ precision: 18,
571
+ color: '#FFEEDA',
572
+ networkColor: '#FFEEDA',
573
+ icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
574
+ networkIcon: 'https://scroll-tech.github.io/token-list/scroll.png',
575
+ explorer: 'https://scrollscan.com',
576
+ explorerAddressLink: 'https://scrollscan.com/address/',
577
+ explorerTxLink: 'https://scrollscan.com/tx/',
578
+ relatedAssetKey: 'eip155:1/slip44:60',
579
+ });
580
+ export const sonic = Object.freeze({
581
+ assetId: caip.sonicAssetId,
582
+ chainId: caip.sonicChainId,
583
+ name: 'Sonic (S)',
584
+ networkName: 'Sonic',
585
+ symbol: 'S',
586
+ precision: 18,
587
+ color: '#1B1464',
588
+ networkColor: '#1B1464',
589
+ icon: 'https://assets.coingecko.com/coins/images/38108/standard/200x200_Sonic_Logo.png',
590
+ networkIcon: 'https://assets.coingecko.com/coins/images/38108/standard/200x200_Sonic_Logo.png',
591
+ explorer: 'https://sonicscan.org',
592
+ explorerAddressLink: 'https://sonicscan.org/address/',
593
+ explorerTxLink: 'https://sonicscan.org/tx/',
594
+ relatedAssetKey: null,
595
+ });
596
+ export const unichainChain = Object.freeze({
597
+ assetId: caip.unichainAssetId,
598
+ chainId: caip.unichainChainId,
599
+ name: 'Ether',
600
+ networkName: 'Unichain',
601
+ symbol: 'ETH',
602
+ precision: 18,
603
+ color: '#5C6BC0',
604
+ networkColor: '#F50DB4',
605
+ icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
606
+ networkIcon: 'https://assets.coingecko.com/asset_platforms/images/22206/small/unichain.png',
607
+ explorer: 'https://uniscan.xyz',
608
+ explorerAddressLink: 'https://uniscan.xyz/address/',
609
+ explorerTxLink: 'https://uniscan.xyz/tx/',
610
+ relatedAssetKey: 'eip155:1/slip44:60',
611
+ });
612
+ export const bobChain = Object.freeze({
613
+ assetId: caip.bobAssetId,
614
+ chainId: caip.bobChainId,
615
+ name: 'Ethereum',
616
+ networkName: 'BOB',
617
+ symbol: 'ETH',
618
+ precision: 18,
619
+ color: '#5C6BC0',
620
+ networkColor: '#F25D00',
621
+ icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
622
+ networkIcon: 'https://assets.coingecko.com/asset_platforms/images/255/small/bob.jpeg',
623
+ explorer: 'https://explorer.gobob.xyz',
624
+ explorerAddressLink: 'https://explorer.gobob.xyz/address/',
625
+ explorerTxLink: 'https://explorer.gobob.xyz/tx/',
626
+ relatedAssetKey: 'eip155:1/slip44:60',
627
+ });
628
+ export const modeChain = Object.freeze({
629
+ assetId: caip.modeAssetId,
630
+ chainId: caip.modeChainId,
631
+ name: 'Ethereum',
632
+ networkName: 'Mode',
633
+ symbol: 'ETH',
634
+ precision: 18,
635
+ color: '#5C6BC0',
636
+ networkColor: '#DFFE00',
637
+ icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
638
+ networkIcon: 'https://assets.relay.link/icons/34443/light.png',
639
+ explorer: 'https://modescan.io',
640
+ explorerAddressLink: 'https://modescan.io/address/',
641
+ explorerTxLink: 'https://modescan.io/tx/',
642
+ relatedAssetKey: 'eip155:1/slip44:60',
643
+ });
644
+ export const soneium = Object.freeze({
645
+ assetId: caip.soneiumAssetId,
646
+ chainId: caip.soneiumChainId,
647
+ name: 'Ethereum',
648
+ networkName: 'Soneium',
649
+ symbol: 'ETH',
650
+ precision: 18,
651
+ color: '#627EEA',
652
+ networkColor: '#1A1A2E',
653
+ icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
654
+ networkIcon: 'https://assets.relay.link/icons/1868/light.png',
655
+ explorer: 'https://soneium.blockscout.com',
656
+ explorerAddressLink: 'https://soneium.blockscout.com/address/',
657
+ explorerTxLink: 'https://soneium.blockscout.com/tx/',
658
+ relatedAssetKey: 'eip155:1/slip44:60',
659
+ });
295
660
  export const solana = Object.freeze({
296
661
  assetId: caip.solAssetId,
297
662
  chainId: caip.solanaChainId,
@@ -337,3 +702,48 @@ export const sui = Object.freeze({
337
702
  explorerTxLink: 'https://suiscan.xyz/mainnet/tx/',
338
703
  relatedAssetKey: null,
339
704
  });
705
+ export const near = Object.freeze({
706
+ assetId: caip.nearAssetId,
707
+ chainId: caip.nearChainId,
708
+ name: 'NEAR Protocol',
709
+ networkName: 'NEAR',
710
+ symbol: 'NEAR',
711
+ precision: 24,
712
+ color: '#00C08B',
713
+ networkColor: '#00C08B',
714
+ icon: 'https://assets.coingecko.com/coins/images/10365/large/near.jpg?1696510367',
715
+ explorer: 'https://nearblocks.io',
716
+ explorerAddressLink: 'https://nearblocks.io/address/',
717
+ explorerTxLink: 'https://nearblocks.io/txns/',
718
+ relatedAssetKey: null,
719
+ });
720
+ export const starknet = Object.freeze({
721
+ assetId: caip.starknetAssetId,
722
+ chainId: caip.starknetChainId,
723
+ name: 'Starknet',
724
+ networkName: 'Starknet',
725
+ symbol: 'STRK',
726
+ precision: 18,
727
+ color: '#EC796B',
728
+ networkColor: '#EC796B',
729
+ icon: 'https://assets.coingecko.com/coins/images/26433/large/starknet.png',
730
+ explorer: 'https://starkscan.co',
731
+ explorerAddressLink: 'https://starkscan.co/contract/',
732
+ explorerTxLink: 'https://starkscan.co/tx/',
733
+ relatedAssetKey: null,
734
+ });
735
+ export const ton = Object.freeze({
736
+ assetId: caip.tonAssetId,
737
+ chainId: caip.tonChainId,
738
+ name: 'Toncoin',
739
+ networkName: 'TON',
740
+ symbol: 'TON',
741
+ precision: 9,
742
+ color: '#0098EA',
743
+ networkColor: '#0098EA',
744
+ icon: 'https://assets.coingecko.com/coins/images/17980/large/ton_symbol.png?1696517498',
745
+ explorer: 'https://tonscan.org',
746
+ explorerAddressLink: 'https://tonscan.org/address/',
747
+ explorerTxLink: 'https://tonscan.org/tx/',
748
+ relatedAssetKey: null,
749
+ });
@@ -1,5 +1,5 @@
1
1
  import { fromAssetId } from '@shapeshiftoss/caip';
2
- import { pick } from 'lodash';
2
+ import { pick } from 'lodash-es';
3
3
  import { assertUnreachable } from '../assertUnreachable.js';
4
4
  import { FIELDS } from './constants.js';
5
5
  import { getBaseAsset } from './getBaseAsset.js';
@@ -1,6 +1,6 @@
1
1
  import { KnownChainIds } from '@shapeshiftoss/types';
2
2
  import { assertUnreachable } from '../assertUnreachable.js';
3
- import { arbitrum, arbitrumNova, atom, avax, base, bitcoin, bitcoincash, bnbsmartchain, dogecoin, ethereum, gnosis, litecoin, mayachain, monad, optimism, polygon, solana, sui, thorchain, tron, } from './baseAssets.js';
3
+ import { arbitrum, atom, avax, base, berachain, bitcoin, bitcoincash, blast, bnbsmartchain, bobChain, celo, cronos, dogecoin, ethereum, flowEvm, gnosis, hemi, hyperevm, ink, katana, linea, litecoin, mantle, mayachain, megaeth, modeChain, monad, near, optimism, plasma, plume, polygon, scroll, solana, soneium, sonic, starknet, story, sui, thorchain, ton, tron, unichainChain, worldchain, zcash, zkSyncEra, } from './baseAssets.js';
4
4
  export const getBaseAsset = (chainId) => {
5
5
  const knownChainId = chainId;
6
6
  switch (knownChainId) {
@@ -18,14 +18,14 @@ export const getBaseAsset = (chainId) => {
18
18
  return gnosis;
19
19
  case KnownChainIds.ArbitrumMainnet:
20
20
  return arbitrum;
21
- case KnownChainIds.ArbitrumNovaMainnet:
22
- return arbitrumNova;
23
21
  case KnownChainIds.BaseMainnet:
24
22
  return base;
25
23
  case KnownChainIds.SolanaMainnet:
26
24
  return solana;
27
25
  case KnownChainIds.SuiMainnet:
28
26
  return sui;
27
+ case KnownChainIds.StarknetMainnet:
28
+ return starknet;
29
29
  case KnownChainIds.BitcoinMainnet:
30
30
  return bitcoin;
31
31
  case KnownChainIds.BitcoinCashMainnet:
@@ -44,6 +44,58 @@ export const getBaseAsset = (chainId) => {
44
44
  return tron;
45
45
  case KnownChainIds.MonadMainnet:
46
46
  return monad;
47
+ case KnownChainIds.HyperEvmMainnet:
48
+ return hyperevm;
49
+ case KnownChainIds.PlasmaMainnet:
50
+ return plasma;
51
+ case KnownChainIds.PlumeMainnet:
52
+ return plume;
53
+ case KnownChainIds.MantleMainnet:
54
+ return mantle;
55
+ case KnownChainIds.InkMainnet:
56
+ return ink;
57
+ case KnownChainIds.MegaEthMainnet:
58
+ return megaeth;
59
+ case KnownChainIds.BerachainMainnet:
60
+ return berachain;
61
+ case KnownChainIds.CronosMainnet:
62
+ return cronos;
63
+ case KnownChainIds.KatanaMainnet:
64
+ return katana;
65
+ case KnownChainIds.FlowEvmMainnet:
66
+ return flowEvm;
67
+ case KnownChainIds.CeloMainnet:
68
+ return celo;
69
+ case KnownChainIds.StoryMainnet:
70
+ return story;
71
+ case KnownChainIds.ZkSyncEraMainnet:
72
+ return zkSyncEra;
73
+ case KnownChainIds.BlastMainnet:
74
+ return blast;
75
+ case KnownChainIds.WorldChainMainnet:
76
+ return worldchain;
77
+ case KnownChainIds.HemiMainnet:
78
+ return hemi;
79
+ case KnownChainIds.LineaMainnet:
80
+ return linea;
81
+ case KnownChainIds.ScrollMainnet:
82
+ return scroll;
83
+ case KnownChainIds.SonicMainnet:
84
+ return sonic;
85
+ case KnownChainIds.UnichainMainnet:
86
+ return unichainChain;
87
+ case KnownChainIds.BobMainnet:
88
+ return bobChain;
89
+ case KnownChainIds.ModeMainnet:
90
+ return modeChain;
91
+ case KnownChainIds.SoneiumMainnet:
92
+ return soneium;
93
+ case KnownChainIds.NearMainnet:
94
+ return near;
95
+ case KnownChainIds.ZcashMainnet:
96
+ return zcash;
97
+ case KnownChainIds.TonMainnet:
98
+ return ton;
47
99
  default:
48
100
  return assertUnreachable(knownChainId);
49
101
  }
@@ -0,0 +1,82 @@
1
+ import type BigNumber from 'bignumber.js';
2
+ type NullableScalar = BigNumber.Value | null | undefined;
3
+ type WithPrecision = {
4
+ value: BigNumber.Value | null | undefined;
5
+ precision: number;
6
+ assetId?: never;
7
+ };
8
+ type WithAssetId = {
9
+ value: BigNumber.Value | null | undefined;
10
+ assetId: string;
11
+ precision?: never;
12
+ };
13
+ type FactoryArgs = WithPrecision | WithAssetId;
14
+ export type BigAmountConfig = {
15
+ resolvePrecision: (assetId: string) => number;
16
+ resolvePrice: (assetId: string) => string;
17
+ resolvePriceUsd: (assetId: string) => string;
18
+ };
19
+ export declare class BigAmount {
20
+ private readonly value;
21
+ readonly precision: number;
22
+ readonly assetId?: string;
23
+ private static config?;
24
+ private constructor();
25
+ static configure(config: BigAmountConfig): void;
26
+ static getConfig(): BigAmountConfig | undefined;
27
+ static resetConfig(): void;
28
+ static fromBaseUnit(args: FactoryArgs): BigAmount;
29
+ static fromPrecision(args: FactoryArgs): BigAmount;
30
+ static zero({ precision, assetId }: {
31
+ precision: number;
32
+ assetId?: string;
33
+ }): BigAmount;
34
+ static fromBN({ value, precision, assetId, }: {
35
+ value: BigNumber;
36
+ precision: number;
37
+ assetId?: string;
38
+ }): BigAmount;
39
+ static fromJSON({ value, precision, assetId, }: {
40
+ value: string;
41
+ precision: number;
42
+ assetId?: string;
43
+ }): BigAmount;
44
+ static min(...amounts: BigAmount[]): BigAmount;
45
+ static max(...amounts: BigAmount[]): BigAmount;
46
+ static isBigAmount(value: unknown): value is BigAmount;
47
+ plus(other: BigAmount | NullableScalar): BigAmount;
48
+ minus(other: BigAmount | NullableScalar): BigAmount;
49
+ times(scalar: NullableScalar): BigAmount;
50
+ div(scalar: NullableScalar): BigAmount;
51
+ abs(): BigAmount;
52
+ negated(): BigAmount;
53
+ positiveOrZero(): BigAmount;
54
+ decimalPlaces(n: number, rm?: BigNumber.RoundingMode): BigAmount;
55
+ gt(other: BigAmount | NullableScalar): boolean;
56
+ gte(other: BigAmount | NullableScalar): boolean;
57
+ lt(other: BigAmount | NullableScalar): boolean;
58
+ lte(other: BigAmount | NullableScalar): boolean;
59
+ eq(other: BigAmount | NullableScalar): boolean;
60
+ isZero(): boolean;
61
+ isPositive(): boolean;
62
+ isNegative(): boolean;
63
+ isFinite(): boolean;
64
+ toBaseUnit(): string;
65
+ toPrecision(): string;
66
+ toBN(): BigNumber;
67
+ toFixed(decimals?: number): string;
68
+ toString(): string;
69
+ toNumber(): number;
70
+ toSignificant(digits: number): string;
71
+ toUserCurrency(decimals?: number): string;
72
+ toUSD(decimals?: number): string;
73
+ static fromThorBaseUnit(value: BigNumber.Value | null | undefined): BigAmount;
74
+ toThorBaseUnit(): string;
75
+ toJSON(): {
76
+ value: string;
77
+ precision: number;
78
+ assetId?: string;
79
+ };
80
+ private static resolveConfigPrecision;
81
+ }
82
+ export {};