@shapeshiftoss/types 9.0.0-alpha.0 → 9.0.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/README.md +1 -1
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/api.d.ts +52 -0
- package/dist/cjs/api.js +2 -0
- package/dist/cjs/base.d.ts +45 -4
- package/dist/cjs/base.js +33 -1
- package/dist/cjs/cowSwap.d.ts +6 -2
- package/dist/cjs/cowSwap.js +4 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/zerion.d.ts +1 -1
- package/dist/cjs/zerion.js +50 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/api.d.ts +52 -0
- package/dist/esm/api.js +1 -0
- package/dist/esm/base.d.ts +46 -5
- package/dist/esm/base.js +33 -1
- package/dist/esm/cowSwap.d.ts +7 -3
- package/dist/esm/cowSwap.js +4 -0
- package/dist/esm/index.d.ts +6 -5
- package/dist/esm/index.js +6 -5
- package/dist/esm/zerion.d.ts +1 -1
- package/dist/esm/zerion.js +51 -2
- package/package.json +16 -11
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export type ZrxPermit2SignatureRequired = {
|
|
2
|
+
type: 'zrx_permit2';
|
|
3
|
+
eip712: Record<string, unknown>;
|
|
4
|
+
};
|
|
5
|
+
export type EvmTransactionData = {
|
|
6
|
+
type: 'evm';
|
|
7
|
+
chainId: number;
|
|
8
|
+
to: string;
|
|
9
|
+
data: string;
|
|
10
|
+
value: string;
|
|
11
|
+
gasLimit?: string;
|
|
12
|
+
signatureRequired?: ZrxPermit2SignatureRequired;
|
|
13
|
+
};
|
|
14
|
+
export type SolanaTransactionData = {
|
|
15
|
+
type: 'solana_instructions';
|
|
16
|
+
instructions: {
|
|
17
|
+
programId: string;
|
|
18
|
+
keys: {
|
|
19
|
+
pubkey: string;
|
|
20
|
+
isSigner: boolean;
|
|
21
|
+
isWritable: boolean;
|
|
22
|
+
}[];
|
|
23
|
+
data: string;
|
|
24
|
+
}[];
|
|
25
|
+
addressLookupTableAddresses: string[];
|
|
26
|
+
};
|
|
27
|
+
export type SolanaSerializedTxTransactionData = {
|
|
28
|
+
type: 'solana_serialized_tx';
|
|
29
|
+
serializedTx: string;
|
|
30
|
+
};
|
|
31
|
+
export type UtxoTransactionData = {
|
|
32
|
+
type: 'utxo';
|
|
33
|
+
to: string;
|
|
34
|
+
opReturnData?: string;
|
|
35
|
+
value: string;
|
|
36
|
+
};
|
|
37
|
+
export type CosmosSdkMsgSendTransactionData = {
|
|
38
|
+
type: 'cosmossdk_msg_send';
|
|
39
|
+
chainId: string;
|
|
40
|
+
to: string;
|
|
41
|
+
denom: string;
|
|
42
|
+
value: string;
|
|
43
|
+
memo?: string;
|
|
44
|
+
};
|
|
45
|
+
export type CosmosSdkMsgDepositTransactionData = {
|
|
46
|
+
type: 'cosmossdk_msg_deposit';
|
|
47
|
+
chainId: string;
|
|
48
|
+
value: string;
|
|
49
|
+
memo: string;
|
|
50
|
+
coin: string;
|
|
51
|
+
};
|
|
52
|
+
export type TransactionData = EvmTransactionData | SolanaTransactionData | SolanaSerializedTxTransactionData | UtxoTransactionData | CosmosSdkMsgSendTransactionData | CosmosSdkMsgDepositTransactionData;
|
package/dist/esm/api.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AccountId, AssetId, ChainId } from '@shapeshiftoss/caip';
|
|
2
|
-
import type { PartialRecord } from './utility';
|
|
2
|
+
import type { PartialRecord } from './utility.js';
|
|
3
3
|
export type RootBip44Params = {
|
|
4
4
|
purpose: number;
|
|
5
5
|
coinType: number;
|
|
@@ -17,20 +17,59 @@ export declare enum KnownChainIds {
|
|
|
17
17
|
PolygonMainnet = "eip155:137",
|
|
18
18
|
GnosisMainnet = "eip155:100",
|
|
19
19
|
ArbitrumMainnet = "eip155:42161",
|
|
20
|
-
ArbitrumNovaMainnet = "eip155:42170",
|
|
21
20
|
BaseMainnet = "eip155:8453",
|
|
21
|
+
MonadMainnet = "eip155:143",
|
|
22
|
+
HyperEvmMainnet = "eip155:999",
|
|
23
|
+
PlasmaMainnet = "eip155:9745",
|
|
24
|
+
MantleMainnet = "eip155:5000",
|
|
25
|
+
InkMainnet = "eip155:57073",
|
|
26
|
+
MegaEthMainnet = "eip155:4326",
|
|
27
|
+
BerachainMainnet = "eip155:80094",
|
|
28
|
+
CronosMainnet = "eip155:25",
|
|
29
|
+
KatanaMainnet = "eip155:747474",
|
|
30
|
+
EtherealMainnet = "eip155:5064014",
|
|
31
|
+
FlowEvmMainnet = "eip155:747",
|
|
32
|
+
CeloMainnet = "eip155:42220",
|
|
33
|
+
PlumeMainnet = "eip155:98866",
|
|
34
|
+
StoryMainnet = "eip155:1514",
|
|
35
|
+
ZkSyncEraMainnet = "eip155:324",
|
|
36
|
+
BlastMainnet = "eip155:81457",
|
|
37
|
+
WorldChainMainnet = "eip155:480",
|
|
38
|
+
HemiMainnet = "eip155:43111",
|
|
39
|
+
SeiMainnet = "eip155:1329",
|
|
40
|
+
LineaMainnet = "eip155:59144",
|
|
41
|
+
ScrollMainnet = "eip155:534352",
|
|
42
|
+
SonicMainnet = "eip155:146",
|
|
43
|
+
UnichainMainnet = "eip155:130",
|
|
44
|
+
BobMainnet = "eip155:60808",
|
|
45
|
+
ModeMainnet = "eip155:34443",
|
|
46
|
+
SoneiumMainnet = "eip155:1868",
|
|
22
47
|
BitcoinMainnet = "bip122:000000000019d6689c085ae165831e93",
|
|
23
48
|
BitcoinCashMainnet = "bip122:000000000000000000651ef99cb9fcbe",
|
|
24
49
|
DogecoinMainnet = "bip122:00000000001a91e3dace36e2be3bf030",
|
|
25
50
|
LitecoinMainnet = "bip122:12a765e31ffd4059bada1e25190f6e98",
|
|
51
|
+
ZcashMainnet = "bip122:00040fe8ec8471911baa1db1266ea15d",
|
|
26
52
|
CosmosMainnet = "cosmos:cosmoshub-4",
|
|
27
53
|
ThorchainMainnet = "cosmos:thorchain-1",
|
|
28
54
|
MayachainMainnet = "cosmos:mayachain-mainnet-v1",
|
|
29
|
-
SolanaMainnet = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"
|
|
55
|
+
SolanaMainnet = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
|
56
|
+
TronMainnet = "tron:0x2b6653dc",
|
|
57
|
+
SuiMainnet = "sui:35834a8a",
|
|
58
|
+
NearMainnet = "near:mainnet",
|
|
59
|
+
StarknetMainnet = "starknet:SN_MAIN",
|
|
60
|
+
TonMainnet = "ton:mainnet",
|
|
61
|
+
AbstractMainnet = "eip155:2741"
|
|
30
62
|
}
|
|
31
|
-
export type EvmChainId = KnownChainIds.EthereumMainnet | KnownChainIds.AvalancheMainnet | KnownChainIds.OptimismMainnet | KnownChainIds.BnbSmartChainMainnet | KnownChainIds.PolygonMainnet | KnownChainIds.GnosisMainnet | KnownChainIds.ArbitrumMainnet | KnownChainIds.
|
|
63
|
+
export type EvmChainId = KnownChainIds.EthereumMainnet | KnownChainIds.AvalancheMainnet | KnownChainIds.OptimismMainnet | KnownChainIds.BnbSmartChainMainnet | KnownChainIds.PolygonMainnet | KnownChainIds.GnosisMainnet | KnownChainIds.ArbitrumMainnet | KnownChainIds.BaseMainnet | KnownChainIds.MonadMainnet | KnownChainIds.HyperEvmMainnet | KnownChainIds.PlasmaMainnet | KnownChainIds.MantleMainnet | KnownChainIds.InkMainnet | KnownChainIds.MegaEthMainnet | KnownChainIds.BerachainMainnet | KnownChainIds.CronosMainnet | KnownChainIds.KatanaMainnet | KnownChainIds.EtherealMainnet | KnownChainIds.FlowEvmMainnet | KnownChainIds.CeloMainnet | KnownChainIds.PlumeMainnet | KnownChainIds.StoryMainnet | KnownChainIds.ZkSyncEraMainnet | KnownChainIds.BlastMainnet | KnownChainIds.WorldChainMainnet | KnownChainIds.HemiMainnet | KnownChainIds.SeiMainnet | KnownChainIds.LineaMainnet | KnownChainIds.ScrollMainnet | KnownChainIds.SonicMainnet | KnownChainIds.UnichainMainnet | KnownChainIds.BobMainnet | KnownChainIds.ModeMainnet | KnownChainIds.SoneiumMainnet | KnownChainIds.AbstractMainnet;
|
|
32
64
|
export type CosmosSdkChainId = KnownChainIds.CosmosMainnet | KnownChainIds.ThorchainMainnet | KnownChainIds.MayachainMainnet;
|
|
33
|
-
export type
|
|
65
|
+
export type ThorMayaChainId = KnownChainIds.ThorchainMainnet | KnownChainIds.MayachainMainnet;
|
|
66
|
+
export type UtxoChainId = KnownChainIds.BitcoinMainnet | KnownChainIds.BitcoinCashMainnet | KnownChainIds.DogecoinMainnet | KnownChainIds.LitecoinMainnet | KnownChainIds.ZcashMainnet;
|
|
67
|
+
export type TronChainId = KnownChainIds.TronMainnet;
|
|
68
|
+
export type SuiChainId = KnownChainIds.SuiMainnet;
|
|
69
|
+
export type NearChainId = KnownChainIds.NearMainnet;
|
|
70
|
+
export type SolanaChainId = KnownChainIds.SolanaMainnet;
|
|
71
|
+
export type StarknetChainId = KnownChainIds.StarknetMainnet;
|
|
72
|
+
export type TonChainId = KnownChainIds.TonMainnet;
|
|
34
73
|
export declare enum WithdrawType {
|
|
35
74
|
DELAYED = 0,
|
|
36
75
|
INSTANT = 1
|
|
@@ -59,6 +98,8 @@ export type Asset = {
|
|
|
59
98
|
explorerTxLink: string;
|
|
60
99
|
explorerAddressLink: string;
|
|
61
100
|
relatedAssetKey: AssetId | null | undefined;
|
|
101
|
+
isPrimary?: boolean;
|
|
102
|
+
isChainSpecific?: boolean;
|
|
62
103
|
isPool?: boolean;
|
|
63
104
|
};
|
|
64
105
|
export type AssetsById = Record<AssetId, Asset>;
|
package/dist/esm/base.js
CHANGED
|
@@ -7,16 +7,48 @@ export var KnownChainIds;
|
|
|
7
7
|
KnownChainIds["PolygonMainnet"] = "eip155:137";
|
|
8
8
|
KnownChainIds["GnosisMainnet"] = "eip155:100";
|
|
9
9
|
KnownChainIds["ArbitrumMainnet"] = "eip155:42161";
|
|
10
|
-
KnownChainIds["ArbitrumNovaMainnet"] = "eip155:42170";
|
|
11
10
|
KnownChainIds["BaseMainnet"] = "eip155:8453";
|
|
11
|
+
KnownChainIds["MonadMainnet"] = "eip155:143";
|
|
12
|
+
KnownChainIds["HyperEvmMainnet"] = "eip155:999";
|
|
13
|
+
KnownChainIds["PlasmaMainnet"] = "eip155:9745";
|
|
14
|
+
KnownChainIds["MantleMainnet"] = "eip155:5000";
|
|
15
|
+
KnownChainIds["InkMainnet"] = "eip155:57073";
|
|
16
|
+
KnownChainIds["MegaEthMainnet"] = "eip155:4326";
|
|
17
|
+
KnownChainIds["BerachainMainnet"] = "eip155:80094";
|
|
18
|
+
KnownChainIds["CronosMainnet"] = "eip155:25";
|
|
19
|
+
KnownChainIds["KatanaMainnet"] = "eip155:747474";
|
|
20
|
+
KnownChainIds["EtherealMainnet"] = "eip155:5064014";
|
|
21
|
+
KnownChainIds["FlowEvmMainnet"] = "eip155:747";
|
|
22
|
+
KnownChainIds["CeloMainnet"] = "eip155:42220";
|
|
23
|
+
KnownChainIds["PlumeMainnet"] = "eip155:98866";
|
|
24
|
+
KnownChainIds["StoryMainnet"] = "eip155:1514";
|
|
25
|
+
KnownChainIds["ZkSyncEraMainnet"] = "eip155:324";
|
|
26
|
+
KnownChainIds["BlastMainnet"] = "eip155:81457";
|
|
27
|
+
KnownChainIds["WorldChainMainnet"] = "eip155:480";
|
|
28
|
+
KnownChainIds["HemiMainnet"] = "eip155:43111";
|
|
29
|
+
KnownChainIds["SeiMainnet"] = "eip155:1329";
|
|
30
|
+
KnownChainIds["LineaMainnet"] = "eip155:59144";
|
|
31
|
+
KnownChainIds["ScrollMainnet"] = "eip155:534352";
|
|
32
|
+
KnownChainIds["SonicMainnet"] = "eip155:146";
|
|
33
|
+
KnownChainIds["UnichainMainnet"] = "eip155:130";
|
|
34
|
+
KnownChainIds["BobMainnet"] = "eip155:60808";
|
|
35
|
+
KnownChainIds["ModeMainnet"] = "eip155:34443";
|
|
36
|
+
KnownChainIds["SoneiumMainnet"] = "eip155:1868";
|
|
12
37
|
KnownChainIds["BitcoinMainnet"] = "bip122:000000000019d6689c085ae165831e93";
|
|
13
38
|
KnownChainIds["BitcoinCashMainnet"] = "bip122:000000000000000000651ef99cb9fcbe";
|
|
14
39
|
KnownChainIds["DogecoinMainnet"] = "bip122:00000000001a91e3dace36e2be3bf030";
|
|
15
40
|
KnownChainIds["LitecoinMainnet"] = "bip122:12a765e31ffd4059bada1e25190f6e98";
|
|
41
|
+
KnownChainIds["ZcashMainnet"] = "bip122:00040fe8ec8471911baa1db1266ea15d";
|
|
16
42
|
KnownChainIds["CosmosMainnet"] = "cosmos:cosmoshub-4";
|
|
17
43
|
KnownChainIds["ThorchainMainnet"] = "cosmos:thorchain-1";
|
|
18
44
|
KnownChainIds["MayachainMainnet"] = "cosmos:mayachain-mainnet-v1";
|
|
19
45
|
KnownChainIds["SolanaMainnet"] = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
|
46
|
+
KnownChainIds["TronMainnet"] = "tron:0x2b6653dc";
|
|
47
|
+
KnownChainIds["SuiMainnet"] = "sui:35834a8a";
|
|
48
|
+
KnownChainIds["NearMainnet"] = "near:mainnet";
|
|
49
|
+
KnownChainIds["StarknetMainnet"] = "starknet:SN_MAIN";
|
|
50
|
+
KnownChainIds["TonMainnet"] = "ton:mainnet";
|
|
51
|
+
KnownChainIds["AbstractMainnet"] = "eip155:2741";
|
|
20
52
|
})(KnownChainIds || (KnownChainIds = {}));
|
|
21
53
|
export var WithdrawType;
|
|
22
54
|
(function (WithdrawType) {
|
package/dist/esm/cowSwap.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { AppDataRootSchema as AppDataRootSchemaLatest } from '@cowprotocol/
|
|
|
3
3
|
import type { Nominal } from '@shapeshiftoss/caip';
|
|
4
4
|
import type { TypedDataField } from 'ethers5';
|
|
5
5
|
import type { Address } from 'viem';
|
|
6
|
-
import type { KnownChainIds } from './base';
|
|
6
|
+
import type { KnownChainIds } from './base.js';
|
|
7
7
|
export type AppDataHash = Nominal<string, 'AppDataHash'>;
|
|
8
8
|
export type AppData = Nominal<string, 'AppData'>;
|
|
9
9
|
export type OrderId = Nominal<string, 'OrderId'>;
|
|
@@ -264,9 +264,13 @@ export declare enum CowNetwork {
|
|
|
264
264
|
ArbitrumOne = "arbitrum_one",
|
|
265
265
|
Base = "base",
|
|
266
266
|
Avalanche = "avalanche",
|
|
267
|
-
Polygon = "polygon"
|
|
267
|
+
Polygon = "polygon",
|
|
268
|
+
Bnb = "bnb",
|
|
269
|
+
Plasma = "plasma",
|
|
270
|
+
Linea = "linea",
|
|
271
|
+
Ink = "ink"
|
|
268
272
|
}
|
|
269
|
-
export type CowChainId = KnownChainIds.EthereumMainnet | KnownChainIds.GnosisMainnet | KnownChainIds.ArbitrumMainnet;
|
|
273
|
+
export type CowChainId = KnownChainIds.EthereumMainnet | KnownChainIds.GnosisMainnet | KnownChainIds.ArbitrumMainnet | KnownChainIds.BaseMainnet | KnownChainIds.AvalancheMainnet | KnownChainIds.PolygonMainnet | KnownChainIds.BnbSmartChainMainnet | KnownChainIds.PlasmaMainnet | KnownChainIds.LineaMainnet | KnownChainIds.InkMainnet;
|
|
270
274
|
export type TypedDataTypes = Record<string, TypedDataField[]>;
|
|
271
275
|
export type ParsedAppData = AppDataRootSchemaLatest | AppDataRootSchemaLegacy;
|
|
272
276
|
export declare const isLegacyAppData: (appData: ParsedAppData) => appData is AppDataRootSchemaLegacy;
|
package/dist/esm/cowSwap.js
CHANGED
|
@@ -119,6 +119,10 @@ export var CowNetwork;
|
|
|
119
119
|
CowNetwork["Base"] = "base";
|
|
120
120
|
CowNetwork["Avalanche"] = "avalanche";
|
|
121
121
|
CowNetwork["Polygon"] = "polygon";
|
|
122
|
+
CowNetwork["Bnb"] = "bnb";
|
|
123
|
+
CowNetwork["Plasma"] = "plasma";
|
|
124
|
+
CowNetwork["Linea"] = "linea";
|
|
125
|
+
CowNetwork["Ink"] = "ink";
|
|
122
126
|
})(CowNetwork || (CowNetwork = {}));
|
|
123
127
|
export const isLegacyAppData = (appData) => {
|
|
124
128
|
return appData.version === 'v0.4.0';
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
1
|
+
export * from './api.js';
|
|
2
|
+
export * from './cowSwap.js';
|
|
3
|
+
export * from './base.js';
|
|
4
|
+
export * from './market.js';
|
|
5
|
+
export * from './utility.js';
|
|
6
|
+
export * from './zerion.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
1
|
+
export * from './api.js';
|
|
2
|
+
export * from './cowSwap.js';
|
|
3
|
+
export * from './base.js';
|
|
4
|
+
export * from './market.js';
|
|
5
|
+
export * from './utility.js';
|
|
6
|
+
export * from './zerion.js';
|
package/dist/esm/zerion.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChainId } from '@shapeshiftoss/caip';
|
|
2
|
-
export declare const ZERION_CHAINS: readonly ["avalanche", "binance-smart-chain", "ethereum", "optimism", "polygon", "arbitrum", "xdai", "base"];
|
|
2
|
+
export declare const ZERION_CHAINS: readonly ["avalanche", "binance-smart-chain", "ethereum", "optimism", "polygon", "arbitrum", "xdai", "base", "solana", "tron", "monad", "sui", "plasma", "plume", "world-chain", "katana", "celo", "flow-evm", "story", "zksync-era", "blast", "hemi", "mantle", "linea", "berachain", "sei", "ink", "cronos", "sonic", "unichain", "bob", "mode", "soneium"];
|
|
3
3
|
export type ZerionChainId = (typeof ZERION_CHAINS)[number];
|
|
4
4
|
export declare const ZERION_CHAINS_MAP: Record<ZerionChainId, ChainId>;
|
|
5
5
|
export declare const zerionChainIdToChainId: (chainId: ZerionChainId) => ChainId | undefined;
|
package/dist/esm/zerion.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { arbitrumChainId, avalancheChainId, baseChainId, bscChainId, ethChainId, gnosisChainId, optimismChainId, polygonChainId, } from '@shapeshiftoss/caip';
|
|
1
|
+
import { arbitrumChainId, avalancheChainId, baseChainId, berachainChainId, blastChainId, bobChainId, bscChainId, celoChainId, cronosChainId, ethChainId, flowEvmChainId, gnosisChainId, hemiChainId, inkChainId, katanaChainId, lineaChainId, mantleChainId, modeChainId, monadChainId, optimismChainId, plasmaChainId, plumeChainId, polygonChainId, seiChainId, solanaChainId, soneiumChainId, sonicChainId, storyChainId, suiChainId, tronChainId, unichainChainId, worldChainChainId, zkSyncEraChainId, } from '@shapeshiftoss/caip';
|
|
2
2
|
export const ZERION_CHAINS = [
|
|
3
3
|
// shapeshift supported
|
|
4
4
|
'avalanche',
|
|
@@ -9,10 +9,34 @@ export const ZERION_CHAINS = [
|
|
|
9
9
|
'arbitrum',
|
|
10
10
|
'xdai',
|
|
11
11
|
'base',
|
|
12
|
+
'solana',
|
|
13
|
+
'tron',
|
|
14
|
+
'monad',
|
|
15
|
+
'sui',
|
|
16
|
+
'plasma',
|
|
17
|
+
'plume',
|
|
18
|
+
'world-chain',
|
|
19
|
+
'katana',
|
|
20
|
+
'celo',
|
|
21
|
+
'flow-evm',
|
|
22
|
+
'story',
|
|
23
|
+
'zksync-era',
|
|
24
|
+
'blast',
|
|
25
|
+
'hemi',
|
|
26
|
+
'mantle',
|
|
27
|
+
'linea',
|
|
28
|
+
'berachain',
|
|
29
|
+
'sei',
|
|
30
|
+
'ink',
|
|
31
|
+
'cronos',
|
|
32
|
+
'sonic',
|
|
33
|
+
'unichain',
|
|
34
|
+
'bob',
|
|
35
|
+
'mode',
|
|
36
|
+
'soneium',
|
|
12
37
|
// not yet
|
|
13
38
|
// 'aurora',
|
|
14
39
|
// 'fantom',
|
|
15
|
-
// 'solana',
|
|
16
40
|
];
|
|
17
41
|
export const ZERION_CHAINS_MAP = {
|
|
18
42
|
avalanche: avalancheChainId,
|
|
@@ -23,5 +47,30 @@ export const ZERION_CHAINS_MAP = {
|
|
|
23
47
|
arbitrum: arbitrumChainId,
|
|
24
48
|
xdai: gnosisChainId,
|
|
25
49
|
base: baseChainId,
|
|
50
|
+
solana: solanaChainId,
|
|
51
|
+
tron: tronChainId,
|
|
52
|
+
monad: monadChainId,
|
|
53
|
+
sui: suiChainId,
|
|
54
|
+
plasma: plasmaChainId,
|
|
55
|
+
plume: plumeChainId,
|
|
56
|
+
'world-chain': worldChainChainId,
|
|
57
|
+
katana: katanaChainId,
|
|
58
|
+
celo: celoChainId,
|
|
59
|
+
'flow-evm': flowEvmChainId,
|
|
60
|
+
story: storyChainId,
|
|
61
|
+
'zksync-era': zkSyncEraChainId,
|
|
62
|
+
blast: blastChainId,
|
|
63
|
+
hemi: hemiChainId,
|
|
64
|
+
mantle: mantleChainId,
|
|
65
|
+
linea: lineaChainId,
|
|
66
|
+
berachain: berachainChainId,
|
|
67
|
+
sei: seiChainId,
|
|
68
|
+
ink: inkChainId,
|
|
69
|
+
cronos: cronosChainId,
|
|
70
|
+
sonic: sonicChainId,
|
|
71
|
+
unichain: unichainChainId,
|
|
72
|
+
bob: bobChainId,
|
|
73
|
+
mode: modeChainId,
|
|
74
|
+
soneium: soneiumChainId,
|
|
26
75
|
};
|
|
27
76
|
export const zerionChainIdToChainId = (chainId) => ZERION_CHAINS_MAP[chainId];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapeshiftoss/types",
|
|
3
|
-
"version": "9.0.0
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Common types shared across packages",
|
|
5
5
|
"repository": "https://github.com/shapeshift/web",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"types": "dist/esm/index.d.ts",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"types": "./dist/esm/index.d.ts",
|
|
13
14
|
"import": "./dist/esm/index.js",
|
|
14
|
-
"require": "./dist/cjs/index.js"
|
|
15
|
-
"types": "./dist/esm/index.d.ts"
|
|
15
|
+
"require": "./dist/cjs/index.js"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
@@ -21,13 +21,18 @@
|
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@cowprotocol/app-data": "^2.3.0",
|
|
26
|
+
"ethers5": "npm:ethers@5.7.2",
|
|
27
|
+
"viem": "2.43.5",
|
|
28
|
+
"@shapeshiftoss/caip": "^8.16.10"
|
|
29
29
|
},
|
|
30
|
-
"
|
|
31
|
-
"
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "rm -rf dist && pnpm exec tsc --build && pnpm run postbuild",
|
|
32
|
+
"clean": "rm -rf dist node_modules",
|
|
33
|
+
"dev": "pnpm exec tsc --build --watch",
|
|
34
|
+
"postbuild": "pnpm run postbuild:esm && pnpm run postbuild:cjs",
|
|
35
|
+
"postbuild:esm": "pnpm exec tsc-esm-fix --target=dist/esm --ext=.js",
|
|
36
|
+
"postbuild:cjs": "echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json"
|
|
32
37
|
}
|
|
33
|
-
}
|
|
38
|
+
}
|