@chainflip/utils 2.1.2-beta.4 → 2.1.2-beta.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.
@@ -139,8 +139,16 @@ const anyAssetConstants = {
139
139
  decimals: 10
140
140
  }
141
141
  };
142
- const assetSymbols = Object.values(assetConstants).map((a) => a.symbol).filter((s, i, arr) => arr.indexOf(s) === i);
143
- const anyAssetSymbols = Object.values(anyAssetConstants).map((a) => a.symbol).filter((s, i, arr) => arr.indexOf(s) === i);
142
+ const assetSymbols = [
143
+ "BTC",
144
+ "DOT",
145
+ "ETH",
146
+ "FLIP",
147
+ "SOL",
148
+ "USDC",
149
+ "USDT",
150
+ "WBTC"
151
+ ];
144
152
  const chainConstants = {
145
153
  Ethereum: {
146
154
  chainflipAssets: [
@@ -234,7 +242,7 @@ const chainConstants = {
234
242
  ],
235
243
  gasAsset: "HubDot",
236
244
  addressType: "Hub",
237
- blockTimeSeconds: 12
245
+ blockTimeSeconds: 3
238
246
  }
239
247
  };
240
248
  const anyChainConstants = {
@@ -431,7 +439,6 @@ function isAnyChainflipChain(chain) {
431
439
  //#endregion
432
440
  exports.addressTypes = addressTypes;
433
441
  exports.anyAssetConstants = anyAssetConstants;
434
- exports.anyAssetSymbols = anyAssetSymbols;
435
442
  exports.anyChainConstants = anyChainConstants;
436
443
  exports.anyInternalAssetToRpcAsset = anyInternalAssetToRpcAsset;
437
444
  exports.assetConstants = assetConstants;
@@ -224,10 +224,8 @@ declare const anyAssetConstants: {
224
224
  readonly decimals: 6;
225
225
  };
226
226
  };
227
- type AssetSymbol = (typeof assetConstants)[ChainflipAsset]['symbol'];
228
- declare const assetSymbols: AssetSymbol[];
229
- type AnyAssetSymbol = (typeof anyAssetConstants)[AnyChainflipAsset]['symbol'];
230
- declare const anyAssetSymbols: AnyAssetSymbol[];
227
+ declare const assetSymbols: readonly ["BTC", "DOT", "ETH", "FLIP", "SOL", "USDC", "USDT", "WBTC"];
228
+ type AssetSymbol = (typeof assetSymbols)[number];
231
229
  declare const chainConstants: {
232
230
  readonly Ethereum: {
233
231
  readonly chainflipAssets: ["Eth", "Flip", "Usdc", "Usdt", "Wbtc"];
@@ -267,7 +265,7 @@ declare const chainConstants: {
267
265
  readonly rpcAssets: ["DOT", "USDT", "USDC"];
268
266
  readonly gasAsset: "HubDot";
269
267
  readonly addressType: "Hub";
270
- readonly blockTimeSeconds: 12;
268
+ readonly blockTimeSeconds: 3;
271
269
  };
272
270
  };
273
271
  declare const anyChainConstants: {
@@ -317,7 +315,7 @@ declare const anyChainConstants: {
317
315
  readonly rpcAssets: ["DOT", "USDT", "USDC"];
318
316
  readonly gasAsset: "HubDot";
319
317
  readonly addressType: "Hub";
320
- readonly blockTimeSeconds: 12;
318
+ readonly blockTimeSeconds: 3;
321
319
  };
322
320
  };
323
321
  declare const internalAssetToRpcAsset: InternalAssetMap<AssetAndChain>;
@@ -368,4 +366,4 @@ declare function isChainflipChain(chain: string): chain is ChainflipChain;
368
366
  declare function isLegacyChainflipChain(chain: string): chain is LegacyChainflipChain;
369
367
  declare function isAnyChainflipChain(chain: string): chain is AnyChainflipChain;
370
368
  //#endregion
371
- export { AddressType, AnyAddressType, AnyAssetAndChain, AnyAssetOfChain, AnyAssetSymbol, AnyBaseAssetAndChain, AnyBaseChainAssetMap, AnyBaseChainflipAsset, AnyChainAssetMap, AnyChainMap, AnyChainflipAsset, AnyChainflipChain, AnyInternalAssetMap, AnyUncheckedAssetAndChain, AssetAndChain, AssetOfChain, AssetSymbol, BaseAssetAndChain, BaseChainAssetMap, BaseChainflipAsset, ChainAssetMap, ChainMap, ChainflipAsset, ChainflipChain, ChainflipEvmChain, ChainflipNetwork, InternalAssetMap, LegacyAddressType, LegacyChainflipAsset, LegacyChainflipChain, NonDeprecatedBaseChainflipAsset, PriceAsset, UncheckedAssetAndChain, addressTypes, anyAssetConstants, anyAssetSymbols, anyChainConstants, anyInternalAssetToRpcAsset, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssetToPriceAssetMap, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getAnyInternalAsset, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isAnyChainflipAsset, isAnyChainflipChain, isChainflipAsset, isChainflipChain, isLegacyChainflipAsset, isLegacyChainflipChain, isValidAssetAndChain, legacyAddressTypes, legacyChainflipAssets, legacyChainflipChains, priceAssets, readAssetValue };
369
+ export { AddressType, AnyAddressType, AnyAssetAndChain, AnyAssetOfChain, AnyBaseAssetAndChain, AnyBaseChainAssetMap, AnyBaseChainflipAsset, AnyChainAssetMap, AnyChainMap, AnyChainflipAsset, AnyChainflipChain, AnyInternalAssetMap, AnyUncheckedAssetAndChain, AssetAndChain, AssetOfChain, AssetSymbol, BaseAssetAndChain, BaseChainAssetMap, BaseChainflipAsset, ChainAssetMap, ChainMap, ChainflipAsset, ChainflipChain, ChainflipEvmChain, ChainflipNetwork, InternalAssetMap, LegacyAddressType, LegacyChainflipAsset, LegacyChainflipChain, NonDeprecatedBaseChainflipAsset, PriceAsset, UncheckedAssetAndChain, addressTypes, anyAssetConstants, anyChainConstants, anyInternalAssetToRpcAsset, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssetToPriceAssetMap, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getAnyInternalAsset, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isAnyChainflipAsset, isAnyChainflipChain, isChainflipAsset, isChainflipChain, isLegacyChainflipAsset, isLegacyChainflipChain, isValidAssetAndChain, legacyAddressTypes, legacyChainflipAssets, legacyChainflipChains, priceAssets, readAssetValue };
@@ -224,10 +224,8 @@ declare const anyAssetConstants: {
224
224
  readonly decimals: 6;
225
225
  };
226
226
  };
227
- type AssetSymbol = (typeof assetConstants)[ChainflipAsset]['symbol'];
228
- declare const assetSymbols: AssetSymbol[];
229
- type AnyAssetSymbol = (typeof anyAssetConstants)[AnyChainflipAsset]['symbol'];
230
- declare const anyAssetSymbols: AnyAssetSymbol[];
227
+ declare const assetSymbols: readonly ["BTC", "DOT", "ETH", "FLIP", "SOL", "USDC", "USDT", "WBTC"];
228
+ type AssetSymbol = (typeof assetSymbols)[number];
231
229
  declare const chainConstants: {
232
230
  readonly Ethereum: {
233
231
  readonly chainflipAssets: ["Eth", "Flip", "Usdc", "Usdt", "Wbtc"];
@@ -267,7 +265,7 @@ declare const chainConstants: {
267
265
  readonly rpcAssets: ["DOT", "USDT", "USDC"];
268
266
  readonly gasAsset: "HubDot";
269
267
  readonly addressType: "Hub";
270
- readonly blockTimeSeconds: 12;
268
+ readonly blockTimeSeconds: 3;
271
269
  };
272
270
  };
273
271
  declare const anyChainConstants: {
@@ -317,7 +315,7 @@ declare const anyChainConstants: {
317
315
  readonly rpcAssets: ["DOT", "USDT", "USDC"];
318
316
  readonly gasAsset: "HubDot";
319
317
  readonly addressType: "Hub";
320
- readonly blockTimeSeconds: 12;
318
+ readonly blockTimeSeconds: 3;
321
319
  };
322
320
  };
323
321
  declare const internalAssetToRpcAsset: InternalAssetMap<AssetAndChain>;
@@ -368,4 +366,4 @@ declare function isChainflipChain(chain: string): chain is ChainflipChain;
368
366
  declare function isLegacyChainflipChain(chain: string): chain is LegacyChainflipChain;
369
367
  declare function isAnyChainflipChain(chain: string): chain is AnyChainflipChain;
370
368
  //#endregion
371
- export { AddressType, AnyAddressType, AnyAssetAndChain, AnyAssetOfChain, AnyAssetSymbol, AnyBaseAssetAndChain, AnyBaseChainAssetMap, AnyBaseChainflipAsset, AnyChainAssetMap, AnyChainMap, AnyChainflipAsset, AnyChainflipChain, AnyInternalAssetMap, AnyUncheckedAssetAndChain, AssetAndChain, AssetOfChain, AssetSymbol, BaseAssetAndChain, BaseChainAssetMap, BaseChainflipAsset, ChainAssetMap, ChainMap, ChainflipAsset, ChainflipChain, ChainflipEvmChain, ChainflipNetwork, InternalAssetMap, LegacyAddressType, LegacyChainflipAsset, LegacyChainflipChain, NonDeprecatedBaseChainflipAsset, PriceAsset, UncheckedAssetAndChain, addressTypes, anyAssetConstants, anyAssetSymbols, anyChainConstants, anyInternalAssetToRpcAsset, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssetToPriceAssetMap, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getAnyInternalAsset, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isAnyChainflipAsset, isAnyChainflipChain, isChainflipAsset, isChainflipChain, isLegacyChainflipAsset, isLegacyChainflipChain, isValidAssetAndChain, legacyAddressTypes, legacyChainflipAssets, legacyChainflipChains, priceAssets, readAssetValue };
369
+ export { AddressType, AnyAddressType, AnyAssetAndChain, AnyAssetOfChain, AnyBaseAssetAndChain, AnyBaseChainAssetMap, AnyBaseChainflipAsset, AnyChainAssetMap, AnyChainMap, AnyChainflipAsset, AnyChainflipChain, AnyInternalAssetMap, AnyUncheckedAssetAndChain, AssetAndChain, AssetOfChain, AssetSymbol, BaseAssetAndChain, BaseChainAssetMap, BaseChainflipAsset, ChainAssetMap, ChainMap, ChainflipAsset, ChainflipChain, ChainflipEvmChain, ChainflipNetwork, InternalAssetMap, LegacyAddressType, LegacyChainflipAsset, LegacyChainflipChain, NonDeprecatedBaseChainflipAsset, PriceAsset, UncheckedAssetAndChain, addressTypes, anyAssetConstants, anyChainConstants, anyInternalAssetToRpcAsset, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssetToPriceAssetMap, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getAnyInternalAsset, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isAnyChainflipAsset, isAnyChainflipChain, isChainflipAsset, isChainflipChain, isLegacyChainflipAsset, isLegacyChainflipChain, isValidAssetAndChain, legacyAddressTypes, legacyChainflipAssets, legacyChainflipChains, priceAssets, readAssetValue };
@@ -137,8 +137,16 @@ const anyAssetConstants = {
137
137
  decimals: 10
138
138
  }
139
139
  };
140
- const assetSymbols = Object.values(assetConstants).map((a) => a.symbol).filter((s, i, arr) => arr.indexOf(s) === i);
141
- const anyAssetSymbols = Object.values(anyAssetConstants).map((a) => a.symbol).filter((s, i, arr) => arr.indexOf(s) === i);
140
+ const assetSymbols = [
141
+ "BTC",
142
+ "DOT",
143
+ "ETH",
144
+ "FLIP",
145
+ "SOL",
146
+ "USDC",
147
+ "USDT",
148
+ "WBTC"
149
+ ];
142
150
  const chainConstants = {
143
151
  Ethereum: {
144
152
  chainflipAssets: [
@@ -232,7 +240,7 @@ const chainConstants = {
232
240
  ],
233
241
  gasAsset: "HubDot",
234
242
  addressType: "Hub",
235
- blockTimeSeconds: 12
243
+ blockTimeSeconds: 3
236
244
  }
237
245
  };
238
246
  const anyChainConstants = {
@@ -427,4 +435,4 @@ function isAnyChainflipChain(chain) {
427
435
  }
428
436
 
429
437
  //#endregion
430
- export { addressTypes, anyAssetConstants, anyAssetSymbols, anyChainConstants, anyInternalAssetToRpcAsset, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssetToPriceAssetMap, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getAnyInternalAsset, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isAnyChainflipAsset, isAnyChainflipChain, isChainflipAsset, isChainflipChain, isLegacyChainflipAsset, isLegacyChainflipChain, isValidAssetAndChain, legacyAddressTypes, legacyChainflipAssets, legacyChainflipChains, priceAssets, readAssetValue };
438
+ export { addressTypes, anyAssetConstants, anyChainConstants, anyInternalAssetToRpcAsset, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssetToPriceAssetMap, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getAnyInternalAsset, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isAnyChainflipAsset, isAnyChainflipChain, isChainflipAsset, isChainflipChain, isLegacyChainflipAsset, isLegacyChainflipChain, isValidAssetAndChain, legacyAddressTypes, legacyChainflipAssets, legacyChainflipChains, priceAssets, readAssetValue };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainflip/utils",
3
- "version": "2.1.2-beta.4",
3
+ "version": "2.1.2-beta.6",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",