@chainflip/utils 0.8.13 → 0.8.15

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.
@@ -35,6 +35,7 @@ __export(chainflip_exports, {
35
35
  getInternalAssets: () => getInternalAssets,
36
36
  internalAssetToRpcAsset: () => internalAssetToRpcAsset,
37
37
  isValidAssetAndChain: () => isValidAssetAndChain,
38
+ orderedChainflipAssets: () => orderedChainflipAssets,
38
39
  readAssetValue: () => readAssetValue,
39
40
  rpcAssets: () => rpcAssets
40
41
  });
@@ -79,6 +80,24 @@ function readAssetValue(map, asset) {
79
80
  const chainValues = map[assetConstants[asset].chain];
80
81
  return chainValues[assetConstants[asset].symbol];
81
82
  }
83
+ function requireAllChainflipAssets(assets) {
84
+ return assets;
85
+ }
86
+ var orderedChainflipAssets = requireAllChainflipAssets([
87
+ "Btc",
88
+ "Eth",
89
+ "Sol",
90
+ "Usdt",
91
+ "Usdc",
92
+ "Flip",
93
+ "SolUsdc",
94
+ "ArbUsdc",
95
+ "ArbEth",
96
+ "Dot",
97
+ "HubDot",
98
+ "HubUsdt",
99
+ "HubUsdc"
100
+ ]);
82
101
  var assetConstants = {
83
102
  Eth: {
84
103
  chain: "Ethereum",
@@ -313,6 +332,7 @@ function getInternalAssets({
313
332
  getInternalAssets,
314
333
  internalAssetToRpcAsset,
315
334
  isValidAssetAndChain,
335
+ orderedChainflipAssets,
316
336
  readAssetValue,
317
337
  rpcAssets
318
338
  });
@@ -54,6 +54,7 @@ type UncheckedAssetAndChain = {
54
54
  declare function readAssetValue<T>(map: ChainAssetMap<T>, asset: ChainflipAsset | BaseChainflipAsset): T;
55
55
  declare function readAssetValue<T>(map: BaseChainAssetMap<T>, asset: BaseChainflipAsset): T;
56
56
  declare function readAssetValue<T>(map: ChainAssetMap<T> | BaseChainAssetMap<T>, asset: BaseChainflipAsset): T;
57
+ declare const orderedChainflipAssets: ("Usdc" | "Usdt" | "Flip" | "Eth" | "Dot" | "Btc" | "ArbUsdc" | "ArbEth" | "Sol" | "SolUsdc" | "HubDot" | "HubUsdt" | "HubUsdc")[];
57
58
  declare const assetConstants: {
58
59
  readonly Eth: {
59
60
  readonly chain: "Ethereum";
@@ -221,4 +222,4 @@ declare function getInternalAssets(data: {
221
222
  destAsset: ChainflipAsset | null;
222
223
  };
223
224
 
224
- export { type AddressType, type AssetAndChain, type AssetOfChain, type AssetSymbol, type BaseAssetAndChain, type BaseChainAssetMap, type BaseChainflipAsset, type ChainAssetMap, type ChainMap, type ChainflipAsset, type ChainflipChain, type ChainflipEvmChain, type ChainflipNetwork, type InternalAssetMap, type RpcAsset, type UncheckedAssetAndChain, addressTypes, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isValidAssetAndChain, readAssetValue, rpcAssets };
225
+ export { type AddressType, type AssetAndChain, type AssetOfChain, type AssetSymbol, type BaseAssetAndChain, type BaseChainAssetMap, type BaseChainflipAsset, type ChainAssetMap, type ChainMap, type ChainflipAsset, type ChainflipChain, type ChainflipEvmChain, type ChainflipNetwork, type InternalAssetMap, type RpcAsset, type UncheckedAssetAndChain, addressTypes, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isValidAssetAndChain, orderedChainflipAssets, readAssetValue, rpcAssets };
@@ -54,6 +54,7 @@ type UncheckedAssetAndChain = {
54
54
  declare function readAssetValue<T>(map: ChainAssetMap<T>, asset: ChainflipAsset | BaseChainflipAsset): T;
55
55
  declare function readAssetValue<T>(map: BaseChainAssetMap<T>, asset: BaseChainflipAsset): T;
56
56
  declare function readAssetValue<T>(map: ChainAssetMap<T> | BaseChainAssetMap<T>, asset: BaseChainflipAsset): T;
57
+ declare const orderedChainflipAssets: ("Usdc" | "Usdt" | "Flip" | "Eth" | "Dot" | "Btc" | "ArbUsdc" | "ArbEth" | "Sol" | "SolUsdc" | "HubDot" | "HubUsdt" | "HubUsdc")[];
57
58
  declare const assetConstants: {
58
59
  readonly Eth: {
59
60
  readonly chain: "Ethereum";
@@ -221,4 +222,4 @@ declare function getInternalAssets(data: {
221
222
  destAsset: ChainflipAsset | null;
222
223
  };
223
224
 
224
- export { type AddressType, type AssetAndChain, type AssetOfChain, type AssetSymbol, type BaseAssetAndChain, type BaseChainAssetMap, type BaseChainflipAsset, type ChainAssetMap, type ChainMap, type ChainflipAsset, type ChainflipChain, type ChainflipEvmChain, type ChainflipNetwork, type InternalAssetMap, type RpcAsset, type UncheckedAssetAndChain, addressTypes, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isValidAssetAndChain, readAssetValue, rpcAssets };
225
+ export { type AddressType, type AssetAndChain, type AssetOfChain, type AssetSymbol, type BaseAssetAndChain, type BaseChainAssetMap, type BaseChainflipAsset, type ChainAssetMap, type ChainMap, type ChainflipAsset, type ChainflipChain, type ChainflipEvmChain, type ChainflipNetwork, type InternalAssetMap, type RpcAsset, type UncheckedAssetAndChain, addressTypes, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isValidAssetAndChain, orderedChainflipAssets, readAssetValue, rpcAssets };
package/dist/chainflip.js CHANGED
@@ -14,9 +14,10 @@ import {
14
14
  getInternalAssets,
15
15
  internalAssetToRpcAsset,
16
16
  isValidAssetAndChain,
17
+ orderedChainflipAssets,
17
18
  readAssetValue,
18
19
  rpcAssets
19
- } from "./chunk-4DFBUXHM.js";
20
+ } from "./chunk-WGOAWQFT.js";
20
21
  export {
21
22
  addressTypes,
22
23
  assetConstants,
@@ -33,6 +34,7 @@ export {
33
34
  getInternalAssets,
34
35
  internalAssetToRpcAsset,
35
36
  isValidAssetAndChain,
37
+ orderedChainflipAssets,
36
38
  readAssetValue,
37
39
  rpcAssets
38
40
  };
@@ -39,6 +39,24 @@ function readAssetValue(map, asset) {
39
39
  const chainValues = map[assetConstants[asset].chain];
40
40
  return chainValues[assetConstants[asset].symbol];
41
41
  }
42
+ function requireAllChainflipAssets(assets) {
43
+ return assets;
44
+ }
45
+ var orderedChainflipAssets = requireAllChainflipAssets([
46
+ "Btc",
47
+ "Eth",
48
+ "Sol",
49
+ "Usdt",
50
+ "Usdc",
51
+ "Flip",
52
+ "SolUsdc",
53
+ "ArbUsdc",
54
+ "ArbEth",
55
+ "Dot",
56
+ "HubDot",
57
+ "HubUsdt",
58
+ "HubUsdc"
59
+ ]);
42
60
  var assetConstants = {
43
61
  Eth: {
44
62
  chain: "Ethereum",
@@ -267,6 +285,7 @@ export {
267
285
  chainflipNetworks,
268
286
  addressTypes,
269
287
  readAssetValue,
288
+ orderedChainflipAssets,
270
289
  assetConstants,
271
290
  chainConstants,
272
291
  internalAssetToRpcAsset,
package/dist/consts.cjs CHANGED
@@ -186,9 +186,17 @@ var brokerAliasMap = {
186
186
  name: "LeoDex",
187
187
  twitter: "@leodexio"
188
188
  },
189
+ cFKfDAGNTYdxJQm4TavKw1WGQqEv7K5QzbdmR2s6fuHorPfP5: {
190
+ name: "LeoDex",
191
+ twitter: "@leodexio"
192
+ },
189
193
  cFNDSNTJMRwL773EzoCLn3n2kFSvBHMhEoHDKaHdkDWUa6XVD: {
190
194
  name: "Gem Wallet",
191
195
  twitter: "@GemWalletApp"
196
+ },
197
+ cFKpid38PmmZ8V81AHaZAhHzzpRbsf7Xw5PYt5ajTXAUvHoTQ: {
198
+ name: "Li.Fi",
199
+ twitter: "@lifiprotocol"
192
200
  }
193
201
  };
194
202
  var lpAliasMap = {
package/dist/consts.js CHANGED
@@ -152,9 +152,17 @@ var brokerAliasMap = {
152
152
  name: "LeoDex",
153
153
  twitter: "@leodexio"
154
154
  },
155
+ cFKfDAGNTYdxJQm4TavKw1WGQqEv7K5QzbdmR2s6fuHorPfP5: {
156
+ name: "LeoDex",
157
+ twitter: "@leodexio"
158
+ },
155
159
  cFNDSNTJMRwL773EzoCLn3n2kFSvBHMhEoHDKaHdkDWUa6XVD: {
156
160
  name: "Gem Wallet",
157
161
  twitter: "@GemWalletApp"
162
+ },
163
+ cFKpid38PmmZ8V81AHaZAhHzzpRbsf7Xw5PYt5ajTXAUvHoTQ: {
164
+ name: "Li.Fi",
165
+ twitter: "@lifiprotocol"
158
166
  }
159
167
  };
160
168
  var lpAliasMap = {
package/dist/tickMath.cjs CHANGED
@@ -74,6 +74,24 @@ var chainflipChains = [
74
74
  "Solana",
75
75
  "Assethub"
76
76
  ];
77
+ function requireAllChainflipAssets(assets) {
78
+ return assets;
79
+ }
80
+ var orderedChainflipAssets = requireAllChainflipAssets([
81
+ "Btc",
82
+ "Eth",
83
+ "Sol",
84
+ "Usdt",
85
+ "Usdc",
86
+ "Flip",
87
+ "SolUsdc",
88
+ "ArbUsdc",
89
+ "ArbEth",
90
+ "Dot",
91
+ "HubDot",
92
+ "HubUsdt",
93
+ "HubUsdc"
94
+ ]);
77
95
  var assetConstants = {
78
96
  Eth: {
79
97
  chain: "Ethereum",
package/dist/tickMath.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  assetConstants
3
- } from "./chunk-4DFBUXHM.js";
3
+ } from "./chunk-WGOAWQFT.js";
4
4
 
5
5
  // src/tickMath.ts
6
6
  import BigNumber from "bignumber.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainflip/utils",
3
- "version": "0.8.13",
3
+ "version": "0.8.15",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@date-fns/utc": "^2.1.0",
34
- "bignumber.js": "^9.3.0",
34
+ "bignumber.js": "^9.3.1",
35
35
  "date-fns": "4.1.0"
36
36
  },
37
37
  "repository": "https://github.com/chainflip-io/chainflip-product-toolkit.git",