@shapeshiftoss/utils 1.0.5 → 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 +21 -1
  3. package/dist/cjs/assetData/baseAssets.js +334 -17
  4. package/dist/cjs/assetData/decodeAssetData.js +2 -2
  5. package/dist/cjs/assetData/getBaseAsset.js +42 -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 +42 -2
  11. package/dist/cjs/encoding.d.ts +2 -0
  12. package/dist/cjs/encoding.js +13 -0
  13. package/dist/cjs/getAssetNamespaceFromChainId.js +21 -1
  14. package/dist/cjs/getChainShortName.d.ts +1 -1
  15. package/dist/cjs/getChainShortName.js +42 -2
  16. package/dist/cjs/getNativeFeeAssetReference.js +47 -2
  17. package/dist/cjs/index.d.ts +3 -0
  18. package/dist/cjs/index.js +7 -3
  19. package/dist/cjs/treasury.d.ts +5 -2
  20. package/dist/cjs/treasury.js +7 -1
  21. package/dist/esm/.tsbuildinfo +1 -1
  22. package/dist/esm/assetData/baseAssets.d.ts +21 -1
  23. package/dist/esm/assetData/baseAssets.js +333 -16
  24. package/dist/esm/assetData/decodeAssetData.js +1 -1
  25. package/dist/esm/assetData/getBaseAsset.js +43 -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 +43 -3
  31. package/dist/esm/encoding.d.ts +2 -0
  32. package/dist/esm/encoding.js +8 -0
  33. package/dist/esm/getAssetNamespaceFromChainId.js +21 -1
  34. package/dist/esm/getChainShortName.d.ts +1 -1
  35. package/dist/esm/getChainShortName.js +42 -2
  36. package/dist/esm/getNativeFeeAssetReference.js +47 -2
  37. package/dist/esm/index.d.ts +3 -0
  38. package/dist/esm/index.js +4 -1
  39. package/dist/esm/treasury.d.ts +5 -2
  40. package/dist/esm/treasury.js +6 -0
  41. package/package.json +7 -7
@@ -17,14 +17,34 @@ export declare const bnbsmartchain: Readonly<Asset>;
17
17
  export declare const polygon: Readonly<Asset>;
18
18
  export declare const gnosis: Readonly<Asset>;
19
19
  export declare const arbitrum: Readonly<Asset>;
20
- export declare const arbitrumNova: Readonly<Asset>;
21
20
  export declare const base: Readonly<Asset>;
22
21
  export declare const monad: Readonly<Asset>;
23
22
  export declare const hyperevm: Readonly<Asset>;
24
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>;
25
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>;
26
45
  export declare const solana: Readonly<Asset>;
27
46
  export declare const tron: Readonly<Asset>;
28
47
  export declare const sui: Readonly<Asset>;
29
48
  export declare const near: Readonly<Asset>;
30
49
  export declare const starknet: Readonly<Asset>;
50
+ export declare const ton: Readonly<Asset>;
@@ -259,22 +259,6 @@ export const arbitrum = Object.freeze({
259
259
  explorerTxLink: 'https://arbiscan.io/tx/',
260
260
  relatedAssetKey: 'eip155:1/slip44:60',
261
261
  });
262
- export const arbitrumNova = Object.freeze({
263
- assetId: caip.arbitrumNovaAssetId,
264
- chainId: caip.arbitrumNovaChainId,
265
- name: 'Ethereum',
266
- networkName: 'Arbitrum Nova',
267
- symbol: 'ETH',
268
- precision: 18,
269
- color: '#5C6BC0',
270
- networkColor: '#E67408',
271
- icon: 'https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png',
272
- networkIcon: 'https://assets.coingecko.com/asset_platforms/images/93/large/AN_logomark.png?1695026131',
273
- explorer: 'https://nova.arbiscan.io',
274
- explorerAddressLink: 'https://nova.arbiscan.io/address/',
275
- explorerTxLink: 'https://nova.arbiscan.io/tx/',
276
- relatedAssetKey: 'eip155:1/slip44:60',
277
- });
278
262
  export const base = Object.freeze({
279
263
  assetId: caip.baseAssetId,
280
264
  chainId: caip.baseChainId,
@@ -339,6 +323,116 @@ export const plasma = Object.freeze({
339
323
  explorerTxLink: 'https://plasmascan.to/tx/',
340
324
  relatedAssetKey: null,
341
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
+ });
342
436
  export const katana = Object.freeze({
343
437
  assetId: caip.katanaAssetId,
344
438
  chainId: caip.katanaChainId,
@@ -355,6 +449,214 @@ export const katana = Object.freeze({
355
449
  explorerTxLink: 'https://katanascan.com/tx/',
356
450
  relatedAssetKey: 'eip155:1/slip44:60',
357
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
+ });
358
660
  export const solana = Object.freeze({
359
661
  assetId: caip.solAssetId,
360
662
  chainId: caip.solanaChainId,
@@ -430,3 +732,18 @@ export const starknet = Object.freeze({
430
732
  explorerTxLink: 'https://starkscan.co/tx/',
431
733
  relatedAssetKey: null,
432
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, hyperevm, katana, litecoin, mayachain, monad, near, optimism, plasma, polygon, solana, starknet, sui, thorchain, tron, zcash, } 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,8 +18,6 @@ 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:
@@ -50,12 +48,54 @@ export const getBaseAsset = (chainId) => {
50
48
  return hyperevm;
51
49
  case KnownChainIds.PlasmaMainnet:
52
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;
53
63
  case KnownChainIds.KatanaMainnet:
54
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;
55
93
  case KnownChainIds.NearMainnet:
56
94
  return near;
57
95
  case KnownChainIds.ZcashMainnet:
58
96
  return zcash;
97
+ case KnownChainIds.TonMainnet:
98
+ return ton;
59
99
  default:
60
100
  return assertUnreachable(knownChainId);
61
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 {};