@chainflip/utils 0.5.0 → 0.6.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/dist/chainflip.cjs +23 -0
- package/dist/chainflip.d.cts +3 -1
- package/dist/chainflip.d.ts +3 -1
- package/dist/chainflip.js +5 -1
- package/dist/{chunk-FKSZD3R5.js → chunk-YOAHWTE7.js} +22 -1
- package/dist/consts.cjs +4 -0
- package/dist/consts.js +4 -0
- package/dist/tickMath.js +1 -1
- package/package.json +2 -2
package/dist/chainflip.cjs
CHANGED
|
@@ -22,8 +22,10 @@ var chainflip_exports = {};
|
|
|
22
22
|
__export(chainflip_exports, {
|
|
23
23
|
addressTypes: () => addressTypes,
|
|
24
24
|
assetConstants: () => assetConstants,
|
|
25
|
+
assetContractId: () => assetContractId,
|
|
25
26
|
baseChainflipAssets: () => baseChainflipAssets,
|
|
26
27
|
chainConstants: () => chainConstants,
|
|
28
|
+
chainContractId: () => chainContractId,
|
|
27
29
|
chainflipAssets: () => chainflipAssets,
|
|
28
30
|
chainflipChains: () => chainflipChains,
|
|
29
31
|
chainflipEvmChains: () => chainflipEvmChains,
|
|
@@ -153,12 +155,33 @@ var internalAssetToRpcAsset = {
|
|
|
153
155
|
Sol: { chain: "Solana", asset: "SOL" },
|
|
154
156
|
SolUsdc: { chain: "Solana", asset: "USDC" }
|
|
155
157
|
};
|
|
158
|
+
var chainContractId = {
|
|
159
|
+
Ethereum: 1,
|
|
160
|
+
Polkadot: 2,
|
|
161
|
+
Bitcoin: 3,
|
|
162
|
+
Arbitrum: 4,
|
|
163
|
+
Solana: 5
|
|
164
|
+
};
|
|
165
|
+
var assetContractId = {
|
|
166
|
+
Eth: 1,
|
|
167
|
+
Flip: 2,
|
|
168
|
+
Usdc: 3,
|
|
169
|
+
Usdt: 8,
|
|
170
|
+
Dot: 4,
|
|
171
|
+
Btc: 5,
|
|
172
|
+
ArbEth: 6,
|
|
173
|
+
ArbUsdc: 7,
|
|
174
|
+
Sol: 9,
|
|
175
|
+
SolUsdc: 10
|
|
176
|
+
};
|
|
156
177
|
// Annotate the CommonJS export names for ESM import in node:
|
|
157
178
|
0 && (module.exports = {
|
|
158
179
|
addressTypes,
|
|
159
180
|
assetConstants,
|
|
181
|
+
assetContractId,
|
|
160
182
|
baseChainflipAssets,
|
|
161
183
|
chainConstants,
|
|
184
|
+
chainContractId,
|
|
162
185
|
chainflipAssets,
|
|
163
186
|
chainflipChains,
|
|
164
187
|
chainflipEvmChains,
|
package/dist/chainflip.d.cts
CHANGED
|
@@ -116,5 +116,7 @@ declare const chainConstants: {
|
|
|
116
116
|
};
|
|
117
117
|
};
|
|
118
118
|
declare const internalAssetToRpcAsset: Record<ChainflipAsset, AssetAndChain>;
|
|
119
|
+
declare const chainContractId: Record<ChainflipChain, number>;
|
|
120
|
+
declare const assetContractId: Record<ChainflipAsset, number>;
|
|
119
121
|
|
|
120
|
-
export { type AddressType, type AssetOfChain, type BaseChainAssetMap, type BaseChainflipAsset, type ChainAssetMap, type ChainflipAsset, type ChainflipChain, type ChainflipEvmChain, type ChainflipNetwork, addressTypes, assetConstants, baseChainflipAssets, chainConstants, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, internalAssetToRpcAsset, readAssetValue, rpcAssets };
|
|
122
|
+
export { type AddressType, type AssetOfChain, type BaseChainAssetMap, type BaseChainflipAsset, type ChainAssetMap, type ChainflipAsset, type ChainflipChain, type ChainflipEvmChain, type ChainflipNetwork, addressTypes, assetConstants, assetContractId, baseChainflipAssets, chainConstants, chainContractId, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, internalAssetToRpcAsset, readAssetValue, rpcAssets };
|
package/dist/chainflip.d.ts
CHANGED
|
@@ -116,5 +116,7 @@ declare const chainConstants: {
|
|
|
116
116
|
};
|
|
117
117
|
};
|
|
118
118
|
declare const internalAssetToRpcAsset: Record<ChainflipAsset, AssetAndChain>;
|
|
119
|
+
declare const chainContractId: Record<ChainflipChain, number>;
|
|
120
|
+
declare const assetContractId: Record<ChainflipAsset, number>;
|
|
119
121
|
|
|
120
|
-
export { type AddressType, type AssetOfChain, type BaseChainAssetMap, type BaseChainflipAsset, type ChainAssetMap, type ChainflipAsset, type ChainflipChain, type ChainflipEvmChain, type ChainflipNetwork, addressTypes, assetConstants, baseChainflipAssets, chainConstants, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, internalAssetToRpcAsset, readAssetValue, rpcAssets };
|
|
122
|
+
export { type AddressType, type AssetOfChain, type BaseChainAssetMap, type BaseChainflipAsset, type ChainAssetMap, type ChainflipAsset, type ChainflipChain, type ChainflipEvmChain, type ChainflipNetwork, addressTypes, assetConstants, assetContractId, baseChainflipAssets, chainConstants, chainContractId, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, internalAssetToRpcAsset, readAssetValue, rpcAssets };
|
package/dist/chainflip.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addressTypes,
|
|
3
3
|
assetConstants,
|
|
4
|
+
assetContractId,
|
|
4
5
|
baseChainflipAssets,
|
|
5
6
|
chainConstants,
|
|
7
|
+
chainContractId,
|
|
6
8
|
chainflipAssets,
|
|
7
9
|
chainflipChains,
|
|
8
10
|
chainflipEvmChains,
|
|
@@ -10,12 +12,14 @@ import {
|
|
|
10
12
|
internalAssetToRpcAsset,
|
|
11
13
|
readAssetValue,
|
|
12
14
|
rpcAssets
|
|
13
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YOAHWTE7.js";
|
|
14
16
|
export {
|
|
15
17
|
addressTypes,
|
|
16
18
|
assetConstants,
|
|
19
|
+
assetContractId,
|
|
17
20
|
baseChainflipAssets,
|
|
18
21
|
chainConstants,
|
|
22
|
+
chainContractId,
|
|
19
23
|
chainflipAssets,
|
|
20
24
|
chainflipChains,
|
|
21
25
|
chainflipEvmChains,
|
|
@@ -119,6 +119,25 @@ var internalAssetToRpcAsset = {
|
|
|
119
119
|
Sol: { chain: "Solana", asset: "SOL" },
|
|
120
120
|
SolUsdc: { chain: "Solana", asset: "USDC" }
|
|
121
121
|
};
|
|
122
|
+
var chainContractId = {
|
|
123
|
+
Ethereum: 1,
|
|
124
|
+
Polkadot: 2,
|
|
125
|
+
Bitcoin: 3,
|
|
126
|
+
Arbitrum: 4,
|
|
127
|
+
Solana: 5
|
|
128
|
+
};
|
|
129
|
+
var assetContractId = {
|
|
130
|
+
Eth: 1,
|
|
131
|
+
Flip: 2,
|
|
132
|
+
Usdc: 3,
|
|
133
|
+
Usdt: 8,
|
|
134
|
+
Dot: 4,
|
|
135
|
+
Btc: 5,
|
|
136
|
+
ArbEth: 6,
|
|
137
|
+
ArbUsdc: 7,
|
|
138
|
+
Sol: 9,
|
|
139
|
+
SolUsdc: 10
|
|
140
|
+
};
|
|
122
141
|
|
|
123
142
|
export {
|
|
124
143
|
chainflipAssets,
|
|
@@ -131,5 +150,7 @@ export {
|
|
|
131
150
|
readAssetValue,
|
|
132
151
|
assetConstants,
|
|
133
152
|
chainConstants,
|
|
134
|
-
internalAssetToRpcAsset
|
|
153
|
+
internalAssetToRpcAsset,
|
|
154
|
+
chainContractId,
|
|
155
|
+
assetContractId
|
|
135
156
|
};
|
package/dist/consts.cjs
CHANGED
|
@@ -132,6 +132,10 @@ var brokerAliasMap = {
|
|
|
132
132
|
cFKe4xhoVd783CUTYNxMua4eVE3pSDnbvjLXVRpeq2qC9bSZi: {
|
|
133
133
|
name: "Cake Wallet",
|
|
134
134
|
twitter: "@cakewallet"
|
|
135
|
+
},
|
|
136
|
+
cFLre1qinRDSoxnQ4sFEXRde58jkmkVMX7B2NFGkgZJ9pQLqF: {
|
|
137
|
+
name: "Trust Wallet",
|
|
138
|
+
twitter: "@TrustWallet"
|
|
135
139
|
}
|
|
136
140
|
};
|
|
137
141
|
var lpAliasMap = {
|
package/dist/consts.js
CHANGED
|
@@ -99,6 +99,10 @@ var brokerAliasMap = {
|
|
|
99
99
|
cFKe4xhoVd783CUTYNxMua4eVE3pSDnbvjLXVRpeq2qC9bSZi: {
|
|
100
100
|
name: "Cake Wallet",
|
|
101
101
|
twitter: "@cakewallet"
|
|
102
|
+
},
|
|
103
|
+
cFLre1qinRDSoxnQ4sFEXRde58jkmkVMX7B2NFGkgZJ9pQLqF: {
|
|
104
|
+
name: "Trust Wallet",
|
|
105
|
+
twitter: "@TrustWallet"
|
|
102
106
|
}
|
|
103
107
|
};
|
|
104
108
|
var lpAliasMap = {
|
package/dist/tickMath.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainflip/utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@noble/hashes": "^1.7.1",
|
|
23
|
-
"@vitest/ui": "3.0.
|
|
23
|
+
"@vitest/ui": "3.0.7"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@date-fns/utc": "^2.1.0",
|