@shapeshiftoss/utils 1.0.6 → 1.1.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/LICENSE.md +21 -0
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/assetData/baseAssets.d.ts +3 -0
- package/dist/cjs/assetData/baseAssets.js +57 -8
- package/dist/cjs/assetData/getBaseAsset.js +6 -0
- package/dist/cjs/chainIdToFeeAssetId.js +6 -0
- package/dist/cjs/getAssetNamespaceFromChainId.js +5 -1
- package/dist/cjs/getChainShortName.d.ts +1 -1
- package/dist/cjs/getChainShortName.js +6 -0
- package/dist/cjs/getNativeFeeAssetReference.js +6 -0
- package/dist/cjs/treasury.d.ts +10 -9
- package/dist/cjs/treasury.js +10 -9
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/assetData/baseAssets.d.ts +3 -0
- package/dist/esm/assetData/baseAssets.js +55 -7
- package/dist/esm/assetData/getBaseAsset.js +7 -1
- package/dist/esm/chainIdToFeeAssetId.js +7 -1
- package/dist/esm/getAssetNamespaceFromChainId.js +5 -1
- package/dist/esm/getChainShortName.d.ts +1 -1
- package/dist/esm/getChainShortName.js +6 -0
- package/dist/esm/getNativeFeeAssetReference.js +6 -0
- package/dist/esm/treasury.d.ts +10 -9
- package/dist/esm/treasury.js +9 -8
- package/package.json +12 -13
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Asset } from '@shapeshiftoss/types';
|
|
2
|
+
export declare const abstract: Readonly<Asset>;
|
|
2
3
|
export declare const ethereum: Readonly<Asset>;
|
|
3
4
|
export declare const bitcoin: Readonly<Asset>;
|
|
4
5
|
export declare const bitcoincash: Readonly<Asset>;
|
|
@@ -30,11 +31,13 @@ export declare const megaeth: Readonly<Asset>;
|
|
|
30
31
|
export declare const berachain: Readonly<Asset>;
|
|
31
32
|
export declare const katana: Readonly<Asset>;
|
|
32
33
|
export declare const flowEvm: Readonly<Asset>;
|
|
34
|
+
export declare const ethereal: Readonly<Asset>;
|
|
33
35
|
export declare const celo: Readonly<Asset>;
|
|
34
36
|
export declare const story: Readonly<Asset>;
|
|
35
37
|
export declare const zkSyncEra: Readonly<Asset>;
|
|
36
38
|
export declare const blast: Readonly<Asset>;
|
|
37
39
|
export declare const hemi: Readonly<Asset>;
|
|
40
|
+
export declare const sei: Readonly<Asset>;
|
|
38
41
|
export declare const linea: Readonly<Asset>;
|
|
39
42
|
export declare const scroll: Readonly<Asset>;
|
|
40
43
|
export declare const sonic: Readonly<Asset>;
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import * as caip from '@shapeshiftoss/caip';
|
|
2
|
+
export const abstract = Object.freeze({
|
|
3
|
+
assetId: caip.abstractAssetId,
|
|
4
|
+
chainId: caip.abstractChainId,
|
|
5
|
+
name: 'Ethereum',
|
|
6
|
+
networkName: 'Abstract',
|
|
7
|
+
symbol: 'ETH',
|
|
8
|
+
precision: 18,
|
|
9
|
+
color: '#00D4AA',
|
|
10
|
+
networkColor: '#00D4AA',
|
|
11
|
+
icon: 'https://assets.coingecko.com/coins/images/279/large/ethereum.png',
|
|
12
|
+
networkIcon: 'https://assets.relay.link/icons/2741/light.png',
|
|
13
|
+
explorer: 'https://abscan.org',
|
|
14
|
+
explorerAddressLink: 'https://abscan.org/address/',
|
|
15
|
+
explorerTxLink: 'https://abscan.org/tx/',
|
|
16
|
+
relatedAssetKey: 'eip155:1/slip44:60',
|
|
17
|
+
});
|
|
2
18
|
const mayaTokenAssetId = 'cosmos:mayachain-mainnet-v1/slip44:maya';
|
|
3
19
|
export const ethereum = Object.freeze({
|
|
4
20
|
assetId: caip.ethAssetId,
|
|
@@ -332,8 +348,8 @@ export const plume = Object.freeze({
|
|
|
332
348
|
precision: 18,
|
|
333
349
|
color: '#6C5DD3',
|
|
334
350
|
networkColor: '#6C5DD3',
|
|
335
|
-
icon: 'https://assets.coingecko.com/coins/images/
|
|
336
|
-
networkIcon: 'https://assets.coingecko.com/coins/images/
|
|
351
|
+
icon: 'https://assets.coingecko.com/coins/images/70470/large/plume.jpg',
|
|
352
|
+
networkIcon: 'https://assets.coingecko.com/coins/images/70470/small/plume.jpg',
|
|
337
353
|
explorer: 'https://explorer.plume.org',
|
|
338
354
|
explorerAddressLink: 'https://explorer.plume.org/address/',
|
|
339
355
|
explorerTxLink: 'https://explorer.plume.org/tx/',
|
|
@@ -404,7 +420,7 @@ export const cronos = Object.freeze({
|
|
|
404
420
|
export const megaeth = Object.freeze({
|
|
405
421
|
assetId: caip.megaethAssetId,
|
|
406
422
|
chainId: caip.megaethChainId,
|
|
407
|
-
name: '
|
|
423
|
+
name: 'Ethereum',
|
|
408
424
|
networkName: 'MegaETH',
|
|
409
425
|
symbol: 'ETH',
|
|
410
426
|
precision: 18,
|
|
@@ -465,6 +481,22 @@ export const flowEvm = Object.freeze({
|
|
|
465
481
|
explorerTxLink: 'https://evm.flowscan.io/tx/',
|
|
466
482
|
relatedAssetKey: null,
|
|
467
483
|
});
|
|
484
|
+
export const ethereal = Object.freeze({
|
|
485
|
+
assetId: caip.etherealAssetId,
|
|
486
|
+
chainId: caip.etherealChainId,
|
|
487
|
+
name: 'USDe',
|
|
488
|
+
networkName: 'Ethereal',
|
|
489
|
+
symbol: 'USDe',
|
|
490
|
+
precision: 18,
|
|
491
|
+
color: '#4A90D9',
|
|
492
|
+
networkColor: '#4A90D9',
|
|
493
|
+
icon: 'https://assets.coingecko.com/coins/images/33613/large/USDE.png',
|
|
494
|
+
networkIcon: 'https://assets.relay.link/icons/5064014/light.png',
|
|
495
|
+
explorer: 'https://explorer.ethereal.global',
|
|
496
|
+
explorerAddressLink: 'https://explorer.ethereal.global/address/',
|
|
497
|
+
explorerTxLink: 'https://explorer.ethereal.global/tx/',
|
|
498
|
+
relatedAssetKey: null,
|
|
499
|
+
});
|
|
468
500
|
export const celo = Object.freeze({
|
|
469
501
|
assetId: caip.celoAssetId,
|
|
470
502
|
chainId: caip.celoChainId,
|
|
@@ -474,8 +506,8 @@ export const celo = Object.freeze({
|
|
|
474
506
|
precision: 18,
|
|
475
507
|
color: '#35D07F',
|
|
476
508
|
networkColor: '#35D07F',
|
|
477
|
-
icon: 'https://assets.coingecko.com/
|
|
478
|
-
networkIcon: 'https://assets.coingecko.com/
|
|
509
|
+
icon: 'https://assets.coingecko.com/asset_platforms/images/21/large/celo.jpeg',
|
|
510
|
+
networkIcon: 'https://assets.coingecko.com/asset_platforms/images/21/small/celo.jpeg',
|
|
479
511
|
explorer: 'https://celoscan.io',
|
|
480
512
|
explorerAddressLink: 'https://celoscan.io/address/',
|
|
481
513
|
explorerTxLink: 'https://celoscan.io/tx/',
|
|
@@ -490,8 +522,8 @@ export const story = Object.freeze({
|
|
|
490
522
|
precision: 18,
|
|
491
523
|
color: '#EA580C',
|
|
492
524
|
networkColor: '#EA580C',
|
|
493
|
-
icon: 'https://assets.coingecko.com/
|
|
494
|
-
networkIcon: 'https://assets.coingecko.com/
|
|
525
|
+
icon: 'https://assets.coingecko.com/asset_platforms/images/22207/large/story.jpg',
|
|
526
|
+
networkIcon: 'https://assets.coingecko.com/asset_platforms/images/22207/small/story.jpg',
|
|
495
527
|
explorer: 'https://storyscan.xyz',
|
|
496
528
|
explorerAddressLink: 'https://storyscan.xyz/address/',
|
|
497
529
|
explorerTxLink: 'https://storyscan.xyz/tx/',
|
|
@@ -545,6 +577,22 @@ export const hemi = Object.freeze({
|
|
|
545
577
|
explorerTxLink: 'https://explorer.hemi.xyz/tx/',
|
|
546
578
|
relatedAssetKey: 'eip155:1/slip44:60',
|
|
547
579
|
});
|
|
580
|
+
export const sei = Object.freeze({
|
|
581
|
+
assetId: caip.seiAssetId,
|
|
582
|
+
chainId: caip.seiChainId,
|
|
583
|
+
name: 'SEI',
|
|
584
|
+
networkName: 'Sei',
|
|
585
|
+
symbol: 'SEI',
|
|
586
|
+
precision: 18,
|
|
587
|
+
color: '#9B1B30',
|
|
588
|
+
networkColor: '#9B1B30',
|
|
589
|
+
icon: 'https://assets.coingecko.com/coins/images/28205/large/Sei_Logo_-_Transparent.png',
|
|
590
|
+
networkIcon: 'https://assets.coingecko.com/coins/images/28205/small/Sei_Logo_-_Transparent.png',
|
|
591
|
+
explorer: 'https://seitrace.com',
|
|
592
|
+
explorerAddressLink: 'https://seitrace.com/address/',
|
|
593
|
+
explorerTxLink: 'https://seitrace.com/tx/',
|
|
594
|
+
relatedAssetKey: null,
|
|
595
|
+
});
|
|
548
596
|
export const linea = Object.freeze({
|
|
549
597
|
assetId: caip.lineaAssetId,
|
|
550
598
|
chainId: caip.lineaChainId,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KnownChainIds } from '@shapeshiftoss/types';
|
|
2
2
|
import { assertUnreachable } from '../assertUnreachable.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';
|
|
3
|
+
import { abstract, arbitrum, atom, avax, base, berachain, bitcoin, bitcoincash, blast, bnbsmartchain, bobChain, celo, cronos, dogecoin, ethereal, ethereum, flowEvm, gnosis, hemi, hyperevm, ink, katana, linea, litecoin, mantle, mayachain, megaeth, modeChain, monad, near, optimism, plasma, plume, polygon, scroll, sei, 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) {
|
|
@@ -62,6 +62,8 @@ export const getBaseAsset = (chainId) => {
|
|
|
62
62
|
return cronos;
|
|
63
63
|
case KnownChainIds.KatanaMainnet:
|
|
64
64
|
return katana;
|
|
65
|
+
case KnownChainIds.EtherealMainnet:
|
|
66
|
+
return ethereal;
|
|
65
67
|
case KnownChainIds.FlowEvmMainnet:
|
|
66
68
|
return flowEvm;
|
|
67
69
|
case KnownChainIds.CeloMainnet:
|
|
@@ -76,6 +78,8 @@ export const getBaseAsset = (chainId) => {
|
|
|
76
78
|
return worldchain;
|
|
77
79
|
case KnownChainIds.HemiMainnet:
|
|
78
80
|
return hemi;
|
|
81
|
+
case KnownChainIds.SeiMainnet:
|
|
82
|
+
return sei;
|
|
79
83
|
case KnownChainIds.LineaMainnet:
|
|
80
84
|
return linea;
|
|
81
85
|
case KnownChainIds.ScrollMainnet:
|
|
@@ -96,6 +100,8 @@ export const getBaseAsset = (chainId) => {
|
|
|
96
100
|
return zcash;
|
|
97
101
|
case KnownChainIds.TonMainnet:
|
|
98
102
|
return ton;
|
|
103
|
+
case KnownChainIds.AbstractMainnet:
|
|
104
|
+
return abstract;
|
|
99
105
|
default:
|
|
100
106
|
return assertUnreachable(knownChainId);
|
|
101
107
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { arbitrumAssetId, avalancheAssetId, baseAssetId, bchAssetId, berachainAssetId, blastAssetId, bobAssetId, bscAssetId, btcAssetId, celoAssetId, cosmosAssetId, cronosAssetId, dogeAssetId, ethAssetId, flowEvmAssetId, gnosisAssetId, hemiAssetId, hyperEvmAssetId, inkAssetId, katanaAssetId, lineaAssetId, ltcAssetId, mantleAssetId, mayachainAssetId, megaethAssetId, modeAssetId, monadAssetId, nearAssetId, optimismAssetId, plasmaAssetId, plumeAssetId, polygonAssetId, scrollAssetId, solAssetId, soneiumAssetId, sonicAssetId, starknetAssetId, storyAssetId, suiAssetId, thorchainAssetId, tonAssetId, tronAssetId, unichainAssetId, worldChainAssetId, zecAssetId, zkSyncEraAssetId, } from '@shapeshiftoss/caip';
|
|
1
|
+
import { abstractAssetId, arbitrumAssetId, avalancheAssetId, baseAssetId, bchAssetId, berachainAssetId, blastAssetId, bobAssetId, bscAssetId, btcAssetId, celoAssetId, cosmosAssetId, cronosAssetId, dogeAssetId, ethAssetId, etherealAssetId, flowEvmAssetId, gnosisAssetId, hemiAssetId, hyperEvmAssetId, inkAssetId, katanaAssetId, lineaAssetId, ltcAssetId, mantleAssetId, mayachainAssetId, megaethAssetId, modeAssetId, monadAssetId, nearAssetId, optimismAssetId, plasmaAssetId, plumeAssetId, polygonAssetId, scrollAssetId, seiAssetId, solAssetId, soneiumAssetId, sonicAssetId, starknetAssetId, storyAssetId, suiAssetId, thorchainAssetId, tonAssetId, tronAssetId, unichainAssetId, worldChainAssetId, zecAssetId, zkSyncEraAssetId, } from '@shapeshiftoss/caip';
|
|
2
2
|
import { KnownChainIds } from '@shapeshiftoss/types';
|
|
3
3
|
import { assertUnreachable } from './assertUnreachable.js';
|
|
4
4
|
export const chainIdToFeeAssetId = (_chainId) => {
|
|
@@ -62,6 +62,8 @@ export const chainIdToFeeAssetId = (_chainId) => {
|
|
|
62
62
|
return cronosAssetId;
|
|
63
63
|
case KnownChainIds.KatanaMainnet:
|
|
64
64
|
return katanaAssetId;
|
|
65
|
+
case KnownChainIds.EtherealMainnet:
|
|
66
|
+
return etherealAssetId;
|
|
65
67
|
case KnownChainIds.FlowEvmMainnet:
|
|
66
68
|
return flowEvmAssetId;
|
|
67
69
|
case KnownChainIds.CeloMainnet:
|
|
@@ -76,6 +78,8 @@ export const chainIdToFeeAssetId = (_chainId) => {
|
|
|
76
78
|
return worldChainAssetId;
|
|
77
79
|
case KnownChainIds.HemiMainnet:
|
|
78
80
|
return hemiAssetId;
|
|
81
|
+
case KnownChainIds.SeiMainnet:
|
|
82
|
+
return seiAssetId;
|
|
79
83
|
case KnownChainIds.LineaMainnet:
|
|
80
84
|
return lineaAssetId;
|
|
81
85
|
case KnownChainIds.ScrollMainnet:
|
|
@@ -96,6 +100,8 @@ export const chainIdToFeeAssetId = (_chainId) => {
|
|
|
96
100
|
return nearAssetId;
|
|
97
101
|
case KnownChainIds.TonMainnet:
|
|
98
102
|
return tonAssetId;
|
|
103
|
+
case KnownChainIds.AbstractMainnet:
|
|
104
|
+
return abstractAssetId;
|
|
99
105
|
default:
|
|
100
106
|
return assertUnreachable(chainId);
|
|
101
107
|
}
|
|
@@ -34,6 +34,7 @@ export const getAssetNamespaceFromChainId = (chainId) => {
|
|
|
34
34
|
case KnownChainIds.BlastMainnet:
|
|
35
35
|
case KnownChainIds.WorldChainMainnet:
|
|
36
36
|
case KnownChainIds.HemiMainnet:
|
|
37
|
+
case KnownChainIds.SeiMainnet:
|
|
37
38
|
case KnownChainIds.LineaMainnet:
|
|
38
39
|
case KnownChainIds.ScrollMainnet:
|
|
39
40
|
case KnownChainIds.SonicMainnet:
|
|
@@ -41,11 +42,15 @@ export const getAssetNamespaceFromChainId = (chainId) => {
|
|
|
41
42
|
case KnownChainIds.BobMainnet:
|
|
42
43
|
case KnownChainIds.ModeMainnet:
|
|
43
44
|
case KnownChainIds.SoneiumMainnet:
|
|
45
|
+
case KnownChainIds.EtherealMainnet:
|
|
44
46
|
case KnownChainIds.FlowEvmMainnet:
|
|
45
47
|
case KnownChainIds.CeloMainnet:
|
|
48
|
+
case KnownChainIds.AbstractMainnet:
|
|
46
49
|
return ASSET_NAMESPACE.erc20;
|
|
47
50
|
case KnownChainIds.StarknetMainnet:
|
|
48
51
|
return ASSET_NAMESPACE.starknetToken;
|
|
52
|
+
case KnownChainIds.TonMainnet:
|
|
53
|
+
return ASSET_NAMESPACE.jetton;
|
|
49
54
|
case KnownChainIds.CosmosMainnet:
|
|
50
55
|
case KnownChainIds.BitcoinMainnet:
|
|
51
56
|
case KnownChainIds.BitcoinCashMainnet:
|
|
@@ -54,7 +59,6 @@ export const getAssetNamespaceFromChainId = (chainId) => {
|
|
|
54
59
|
case KnownChainIds.ZcashMainnet:
|
|
55
60
|
case KnownChainIds.ThorchainMainnet:
|
|
56
61
|
case KnownChainIds.MayachainMainnet:
|
|
57
|
-
case KnownChainIds.TonMainnet:
|
|
58
62
|
throw Error(`Unhandled case '${chainId}'`);
|
|
59
63
|
default:
|
|
60
64
|
return assertUnreachable(chainId);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { KnownChainIds } from '@shapeshiftoss/types';
|
|
2
|
-
export declare const getChainShortName: (chainId: KnownChainIds) => "AVA" | "OP" | "ETH" | "POLY" | "GNO" | "BNB" | "ARB" | "BAS" | "BTC" | "BCH" | "COSM" | "THOR" | "MAYA" | "DOGE" | "LTC" | "SOL" | "TRX" | "SUI" | "STRK" | "MON" | "HYPE" | "XPL" | "MNT" | "INK" | "MEGA" | "BERA" | "CRO" | "KAT" | "FLOW" | "CELO" | "PLUME" | "STORY" | "ZKS" | "BLAST" | "WLD" | "HEM" | "LIN" | "SCR" | "S" | "UNI" | "BOB" | "MODE" | "SON" | "ZEC" | "NEAR" | "TON" | undefined;
|
|
2
|
+
export declare const getChainShortName: (chainId: KnownChainIds) => "AVA" | "OP" | "ETH" | "POLY" | "GNO" | "BNB" | "ARB" | "BAS" | "BTC" | "BCH" | "COSM" | "THOR" | "MAYA" | "DOGE" | "LTC" | "SOL" | "TRX" | "SUI" | "STRK" | "MON" | "HYPE" | "XPL" | "MNT" | "INK" | "MEGA" | "BERA" | "CRO" | "KAT" | "ETRL" | "FLOW" | "CELO" | "PLUME" | "STORY" | "ZKS" | "BLAST" | "WLD" | "HEM" | "SEI" | "LIN" | "SCR" | "S" | "UNI" | "BOB" | "MODE" | "SON" | "ZEC" | "NEAR" | "TON" | "ABS" | undefined;
|
|
@@ -58,6 +58,8 @@ export const getChainShortName = (chainId) => {
|
|
|
58
58
|
return 'CRO';
|
|
59
59
|
case KnownChainIds.KatanaMainnet:
|
|
60
60
|
return 'KAT';
|
|
61
|
+
case KnownChainIds.EtherealMainnet:
|
|
62
|
+
return 'ETRL';
|
|
61
63
|
case KnownChainIds.FlowEvmMainnet:
|
|
62
64
|
return 'FLOW';
|
|
63
65
|
case KnownChainIds.CeloMainnet:
|
|
@@ -74,6 +76,8 @@ export const getChainShortName = (chainId) => {
|
|
|
74
76
|
return 'WLD';
|
|
75
77
|
case KnownChainIds.HemiMainnet:
|
|
76
78
|
return 'HEM';
|
|
79
|
+
case KnownChainIds.SeiMainnet:
|
|
80
|
+
return 'SEI';
|
|
77
81
|
case KnownChainIds.LineaMainnet:
|
|
78
82
|
return 'LIN';
|
|
79
83
|
case KnownChainIds.ScrollMainnet:
|
|
@@ -94,6 +98,8 @@ export const getChainShortName = (chainId) => {
|
|
|
94
98
|
return 'NEAR';
|
|
95
99
|
case KnownChainIds.TonMainnet:
|
|
96
100
|
return 'TON';
|
|
101
|
+
case KnownChainIds.AbstractMainnet:
|
|
102
|
+
return 'ABS';
|
|
97
103
|
default: {
|
|
98
104
|
assertUnreachable(chainId);
|
|
99
105
|
}
|
|
@@ -53,6 +53,8 @@ export const getNativeFeeAssetReference = (chainNamespace, chainReference) => {
|
|
|
53
53
|
return ASSET_REFERENCE.Cronos;
|
|
54
54
|
case CHAIN_REFERENCE.KatanaMainnet:
|
|
55
55
|
return ASSET_REFERENCE.Katana;
|
|
56
|
+
case CHAIN_REFERENCE.EtherealMainnet:
|
|
57
|
+
return ASSET_REFERENCE.Ethereal;
|
|
56
58
|
case CHAIN_REFERENCE.FlowEvmMainnet:
|
|
57
59
|
return ASSET_REFERENCE.FlowEvm;
|
|
58
60
|
case CHAIN_REFERENCE.CeloMainnet:
|
|
@@ -65,10 +67,14 @@ export const getNativeFeeAssetReference = (chainNamespace, chainReference) => {
|
|
|
65
67
|
return ASSET_REFERENCE.ZkSyncEra;
|
|
66
68
|
case CHAIN_REFERENCE.BlastMainnet:
|
|
67
69
|
return ASSET_REFERENCE.Blast;
|
|
70
|
+
case CHAIN_REFERENCE.AbstractMainnet:
|
|
71
|
+
return ASSET_REFERENCE.Abstract;
|
|
68
72
|
case CHAIN_REFERENCE.WorldChainMainnet:
|
|
69
73
|
return ASSET_REFERENCE.WorldChain;
|
|
70
74
|
case CHAIN_REFERENCE.HemiMainnet:
|
|
71
75
|
return ASSET_REFERENCE.Hemi;
|
|
76
|
+
case CHAIN_REFERENCE.SeiMainnet:
|
|
77
|
+
return ASSET_REFERENCE.Sei;
|
|
72
78
|
case CHAIN_REFERENCE.LineaMainnet:
|
|
73
79
|
return ASSET_REFERENCE.Linea;
|
|
74
80
|
case CHAIN_REFERENCE.ScrollMainnet:
|
package/dist/esm/treasury.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ChainId } from '@shapeshiftoss/caip';
|
|
2
2
|
import { KnownChainIds } from '@shapeshiftoss/types';
|
|
3
|
-
export declare const treasuryChainIds: readonly [KnownChainIds.EthereumMainnet, KnownChainIds.AvalancheMainnet, KnownChainIds.OptimismMainnet, KnownChainIds.BnbSmartChainMainnet, KnownChainIds.PolygonMainnet, KnownChainIds.GnosisMainnet, KnownChainIds.ArbitrumMainnet, KnownChainIds.BaseMainnet, KnownChainIds.SolanaMainnet, KnownChainIds.BitcoinMainnet, KnownChainIds.StarknetMainnet, KnownChainIds.TonMainnet, KnownChainIds.MonadMainnet, KnownChainIds.HyperEvmMainnet];
|
|
3
|
+
export declare const treasuryChainIds: readonly [KnownChainIds.EthereumMainnet, KnownChainIds.AvalancheMainnet, KnownChainIds.OptimismMainnet, KnownChainIds.BnbSmartChainMainnet, KnownChainIds.PolygonMainnet, KnownChainIds.GnosisMainnet, KnownChainIds.ArbitrumMainnet, KnownChainIds.BaseMainnet, KnownChainIds.SolanaMainnet, KnownChainIds.BitcoinMainnet, KnownChainIds.StarknetMainnet, KnownChainIds.TonMainnet, KnownChainIds.MonadMainnet, KnownChainIds.HyperEvmMainnet, KnownChainIds.BobMainnet];
|
|
4
4
|
export type TreasuryChainId = (typeof treasuryChainIds)[number];
|
|
5
|
-
export declare const isTreasuryChainId: (chainId: ChainId) => chainId is KnownChainIds.EthereumMainnet | KnownChainIds.AvalancheMainnet | KnownChainIds.OptimismMainnet | KnownChainIds.BnbSmartChainMainnet | KnownChainIds.PolygonMainnet | KnownChainIds.GnosisMainnet | KnownChainIds.ArbitrumMainnet | KnownChainIds.BaseMainnet | KnownChainIds.MonadMainnet | KnownChainIds.HyperEvmMainnet | KnownChainIds.BitcoinMainnet | KnownChainIds.SolanaMainnet | KnownChainIds.StarknetMainnet | KnownChainIds.TonMainnet;
|
|
5
|
+
export declare const isTreasuryChainId: (chainId: ChainId) => chainId is KnownChainIds.EthereumMainnet | KnownChainIds.AvalancheMainnet | KnownChainIds.OptimismMainnet | KnownChainIds.BnbSmartChainMainnet | KnownChainIds.PolygonMainnet | KnownChainIds.GnosisMainnet | KnownChainIds.ArbitrumMainnet | KnownChainIds.BaseMainnet | KnownChainIds.MonadMainnet | KnownChainIds.HyperEvmMainnet | KnownChainIds.BobMainnet | KnownChainIds.BitcoinMainnet | KnownChainIds.SolanaMainnet | KnownChainIds.StarknetMainnet | KnownChainIds.TonMainnet;
|
|
6
6
|
export declare const DAO_TREASURY_ETHEREUM_MAINNET = "0x90a48d5cf7343b08da12e067680b4c6dbfe551be";
|
|
7
7
|
export declare const DAO_TREASURY_OPTIMISM = "0x6268d07327f4fb7380732dc6d63d95F88c0E083b";
|
|
8
8
|
export declare const DAO_TREASURY_AVALANCHE = "0x74d63F31C2335b5b3BA7ad2812357672b2624cEd";
|
|
@@ -11,10 +11,11 @@ export declare const DAO_TREASURY_GNOSIS = "0xb0E3175341794D1dc8E5F02a02F9D26989
|
|
|
11
11
|
export declare const DAO_TREASURY_BSC = "0x8b92b1698b57bEDF2142297e9397875ADBb2297E";
|
|
12
12
|
export declare const DAO_TREASURY_ARBITRUM = "0x38276553F8fbf2A027D901F8be45f00373d8Dd48";
|
|
13
13
|
export declare const DAO_TREASURY_BASE = "0x9c9aA90363630d4ab1D9dbF416cc3BBC8d3Ed502";
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
14
|
+
export declare const DAO_TREASURY_BITCOIN = "bc1q9xrjfet2a05r3jvsxx66rru7pysevk5dvqasdw9eeea3rfqlk33qr4hghh";
|
|
15
|
+
export declare const DAO_TREASURY_NEAR = "shapeshifttokenomics.sputnik-dao.near";
|
|
16
|
+
export declare const DAO_TREASURY_SOLANA = "FxXyPB5RH4uHLPPJR5H89zGwZp19juBetmRwrxfsLj2j";
|
|
17
|
+
export declare const DAO_TREASURY_MONAD = "0xF5AA59151bE6515C4Ca68A0282CF68B3eA4846fC";
|
|
18
|
+
export declare const DAO_TREASURY_HYPEREVM = "0xF5AA59151bE6515C4Ca68A0282CF68B3eA4846fC";
|
|
19
|
+
export declare const DAO_TREASURY_BOB = "0xF5AA59151bE6515C4Ca68A0282CF68B3eA4846fC";
|
|
20
|
+
export declare const DAO_TREASURY_STARKNET = "0x07ac2252f2da7cbf085e7a5ddc1318243aa818607cdd430dd2e17dd5d487606a";
|
|
21
|
+
export declare const DAO_TREASURY_TON = "UQAHHeOhXst-zSGGigQ8KgDzz89nACBR4TxXwXNjU4DsriLb";
|
package/dist/esm/treasury.js
CHANGED
|
@@ -16,11 +16,11 @@ export const treasuryChainIds = [
|
|
|
16
16
|
KnownChainIds.TonMainnet,
|
|
17
17
|
KnownChainIds.MonadMainnet,
|
|
18
18
|
KnownChainIds.HyperEvmMainnet,
|
|
19
|
+
KnownChainIds.BobMainnet,
|
|
19
20
|
];
|
|
20
21
|
export const isTreasuryChainId = (chainId) => {
|
|
21
22
|
return treasuryChainIds.includes(chainId);
|
|
22
23
|
};
|
|
23
|
-
// Safes
|
|
24
24
|
export const DAO_TREASURY_ETHEREUM_MAINNET = '0x90a48d5cf7343b08da12e067680b4c6dbfe551be';
|
|
25
25
|
export const DAO_TREASURY_OPTIMISM = '0x6268d07327f4fb7380732dc6d63d95F88c0E083b';
|
|
26
26
|
export const DAO_TREASURY_AVALANCHE = '0x74d63F31C2335b5b3BA7ad2812357672b2624cEd';
|
|
@@ -29,10 +29,11 @@ export const DAO_TREASURY_GNOSIS = '0xb0E3175341794D1dc8E5F02a02F9D26989EbedB3';
|
|
|
29
29
|
export const DAO_TREASURY_BSC = '0x8b92b1698b57bEDF2142297e9397875ADBb2297E';
|
|
30
30
|
export const DAO_TREASURY_ARBITRUM = '0x38276553F8fbf2A027D901F8be45f00373d8Dd48';
|
|
31
31
|
export const DAO_TREASURY_BASE = '0x9c9aA90363630d4ab1D9dbF416cc3BBC8d3Ed502';
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
37
|
-
export const
|
|
38
|
-
export const
|
|
32
|
+
export const DAO_TREASURY_BITCOIN = 'bc1q9xrjfet2a05r3jvsxx66rru7pysevk5dvqasdw9eeea3rfqlk33qr4hghh';
|
|
33
|
+
export const DAO_TREASURY_NEAR = 'shapeshifttokenomics.sputnik-dao.near';
|
|
34
|
+
export const DAO_TREASURY_SOLANA = 'FxXyPB5RH4uHLPPJR5H89zGwZp19juBetmRwrxfsLj2j';
|
|
35
|
+
export const DAO_TREASURY_MONAD = '0xF5AA59151bE6515C4Ca68A0282CF68B3eA4846fC';
|
|
36
|
+
export const DAO_TREASURY_HYPEREVM = '0xF5AA59151bE6515C4Ca68A0282CF68B3eA4846fC';
|
|
37
|
+
export const DAO_TREASURY_BOB = '0xF5AA59151bE6515C4Ca68A0282CF68B3eA4846fC';
|
|
38
|
+
export const DAO_TREASURY_STARKNET = '0x07ac2252f2da7cbf085e7a5ddc1318243aa818607cdd430dd2e17dd5d487606a';
|
|
39
|
+
export const DAO_TREASURY_TON = 'UQAHHeOhXst-zSGGigQ8KgDzz89nACBR4TxXwXNjU4DsriLb';
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapeshiftoss/utils",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"packageManager": "yarn@3.5.0",
|
|
3
|
+
"version": "1.1.0",
|
|
5
4
|
"repository": "https://github.com/shapeshift/web",
|
|
6
5
|
"license": "MIT",
|
|
7
6
|
"type": "module",
|
|
@@ -21,23 +20,23 @@
|
|
|
21
20
|
"publishConfig": {
|
|
22
21
|
"access": "public"
|
|
23
22
|
},
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "yarn clean && yarn run -T tsc --build && yarn postbuild",
|
|
26
|
-
"clean": "rm -rf dist",
|
|
27
|
-
"dev": "yarn run -T tsc --build --watch",
|
|
28
|
-
"postbuild": "yarn postbuild:esm && yarn postbuild:cjs",
|
|
29
|
-
"postbuild:esm": "yarn run -T tsc-esm-fix --target=dist/esm --ext=.js",
|
|
30
|
-
"postbuild:cjs": "echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json"
|
|
31
|
-
},
|
|
32
23
|
"dependencies": {
|
|
33
|
-
"@shapeshiftoss/caip": "^8.16.8",
|
|
34
|
-
"@shapeshiftoss/types": "^8.6.7",
|
|
35
24
|
"@sniptt/monads": "^0.5.10",
|
|
36
25
|
"bignumber.js": "^9.3.1",
|
|
37
26
|
"dayjs": "^1.11.3",
|
|
38
|
-
"lodash-es": "^4.17.23"
|
|
27
|
+
"lodash-es": "^4.17.23",
|
|
28
|
+
"@shapeshiftoss/caip": "^8.16.9",
|
|
29
|
+
"@shapeshiftoss/types": "^8.6.8"
|
|
39
30
|
},
|
|
40
31
|
"devDependencies": {
|
|
41
32
|
"@types/lodash-es": "^4.17.12"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "rm -rf dist && pnpm exec tsc --build && pnpm run postbuild",
|
|
36
|
+
"clean": "rm -rf dist node_modules",
|
|
37
|
+
"dev": "pnpm exec tsc --build --watch",
|
|
38
|
+
"postbuild": "pnpm run postbuild:esm && pnpm run postbuild:cjs",
|
|
39
|
+
"postbuild:esm": "pnpm exec tsc-esm-fix --target=dist/esm --ext=.js",
|
|
40
|
+
"postbuild:cjs": "echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json"
|
|
42
41
|
}
|
|
43
42
|
}
|