@chainflip/sdk 1.2.1-alpha.1 → 1.2.1-alpha.2

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.
@@ -27,11 +27,16 @@ declare const chainConstants: {
27
27
  };
28
28
  };
29
29
  type AssetOfChain<C extends Chain> = (typeof chainConstants)[C]['assets'][number];
30
+ type UncheckedAssetAndChain = {
31
+ asset: Asset | string;
32
+ chain: Chain | string;
33
+ };
30
34
  type ChainAssetMap<T> = {
31
35
  [C in Chain]: {
32
36
  [A in AssetOfChain<C>]: T;
33
37
  };
34
38
  };
39
+ declare function getInternalAsset(asset: UncheckedAssetAndChain): InternalAsset;
35
40
 
36
41
  type TransactionOptions = {
37
42
  gasLimit?: bigint;
@@ -42,4 +47,4 @@ type TransactionOptions = {
42
47
  wait?: number;
43
48
  };
44
49
 
45
- export { type Asset as A, type ChainflipNetwork as C, type InternalAsset as I, type TransactionOptions as T, type Chain as a, type AssetOfChain as b, type ChainAssetMap as c, Chains as d, Assets as e, ChainflipNetworks as f };
50
+ export { type Asset as A, type ChainflipNetwork as C, type InternalAsset as I, type TransactionOptions as T, type Chain as a, type AssetOfChain as b, type ChainAssetMap as c, Chains as d, Assets as e, ChainflipNetworks as f, getInternalAsset as g };
@@ -27,11 +27,16 @@ declare const chainConstants: {
27
27
  };
28
28
  };
29
29
  type AssetOfChain<C extends Chain> = (typeof chainConstants)[C]['assets'][number];
30
+ type UncheckedAssetAndChain = {
31
+ asset: Asset | string;
32
+ chain: Chain | string;
33
+ };
30
34
  type ChainAssetMap<T> = {
31
35
  [C in Chain]: {
32
36
  [A in AssetOfChain<C>]: T;
33
37
  };
34
38
  };
39
+ declare function getInternalAsset(asset: UncheckedAssetAndChain): InternalAsset;
35
40
 
36
41
  type TransactionOptions = {
37
42
  gasLimit?: bigint;
@@ -42,4 +47,4 @@ type TransactionOptions = {
42
47
  wait?: number;
43
48
  };
44
49
 
45
- export { type Asset as A, type ChainflipNetwork as C, type InternalAsset as I, type TransactionOptions as T, type Chain as a, type AssetOfChain as b, type ChainAssetMap as c, Chains as d, Assets as e, ChainflipNetworks as f };
50
+ export { type Asset as A, type ChainflipNetwork as C, type InternalAsset as I, type TransactionOptions as T, type Chain as a, type AssetOfChain as b, type ChainAssetMap as c, Chains as d, Assets as e, ChainflipNetworks as f, getInternalAsset as g };
@@ -1,5 +1,5 @@
1
1
  import { Signer } from 'ethers';
2
- import { C as ChainflipNetwork, T as TransactionOptions } from './contracts-5Td0BhwY.mjs';
2
+ import { C as ChainflipNetwork, T as TransactionOptions } from './contracts-b4ZS6VAh.mjs';
3
3
 
4
4
  type PendingRedemption = {
5
5
  amount: bigint;
package/dist/funding.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Signer } from 'ethers';
2
- import { C as ChainflipNetwork, T as TransactionOptions } from './contracts-5Td0BhwY.js';
2
+ import { C as ChainflipNetwork, T as TransactionOptions } from './contracts-b4ZS6VAh.js';
3
3
 
4
4
  type PendingRedemption = {
5
5
  amount: bigint;
package/dist/swap.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Signer } from 'ethers';
2
- import { C as ChainflipNetwork, a as Chain, A as Asset, I as InternalAsset, b as AssetOfChain, T as TransactionOptions, c as ChainAssetMap } from './contracts-5Td0BhwY.mjs';
3
- export { e as Assets, f as ChainflipNetworks, d as Chains } from './contracts-5Td0BhwY.mjs';
2
+ import { C as ChainflipNetwork, a as Chain, A as Asset, I as InternalAsset, b as AssetOfChain, T as TransactionOptions, c as ChainAssetMap } from './contracts-b4ZS6VAh.mjs';
3
+ export { e as Assets, f as ChainflipNetworks, d as Chains, g as getChainflipId } from './contracts-b4ZS6VAh.mjs';
4
4
  import { z } from 'zod';
5
5
 
6
6
  declare const tokenSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion<[z.ZodObject<{
@@ -377,6 +377,7 @@ type QuoteQueryResponse = {
377
377
  intermediateAmount?: string;
378
378
  egressAmount: string;
379
379
  includedFees: SwapFee[];
380
+ lowLiquidityWarning: boolean | undefined;
380
381
  };
381
382
 
382
383
  interface ChainData {
package/dist/swap.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Signer } from 'ethers';
2
- import { C as ChainflipNetwork, a as Chain, A as Asset, I as InternalAsset, b as AssetOfChain, T as TransactionOptions, c as ChainAssetMap } from './contracts-5Td0BhwY.js';
3
- export { e as Assets, f as ChainflipNetworks, d as Chains } from './contracts-5Td0BhwY.js';
2
+ import { C as ChainflipNetwork, a as Chain, A as Asset, I as InternalAsset, b as AssetOfChain, T as TransactionOptions, c as ChainAssetMap } from './contracts-b4ZS6VAh.js';
3
+ export { e as Assets, f as ChainflipNetworks, d as Chains, g as getChainflipId } from './contracts-b4ZS6VAh.js';
4
4
  import { z } from 'zod';
5
5
 
6
6
  declare const tokenSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion<[z.ZodObject<{
@@ -377,6 +377,7 @@ type QuoteQueryResponse = {
377
377
  intermediateAmount?: string;
378
378
  egressAmount: string;
379
379
  includedFees: SwapFee[];
380
+ lowLiquidityWarning: boolean | undefined;
380
381
  };
381
382
 
382
383
  interface ChainData {
package/dist/swap.js CHANGED
@@ -8977,6 +8977,7 @@ var SwapSDK = _SwapSDK;
8977
8977
 
8978
8978
  // src/swap/index.ts
8979
8979
  init_enums();
8980
+ init_enums();
8980
8981
  /*! Bundled license information:
8981
8982
 
8982
8983
  @trpc/client/dist/httpUtils-b9d0cb48.mjs:
@@ -8987,3 +8988,4 @@ init_enums();
8987
8988
  */
8988
8989
 
8989
8990
  exports.SwapSDK = SwapSDK;
8991
+ exports.getChainflipId = getInternalAsset;
package/dist/swap.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { getTokenContractAddress, getEnvironment, getVaultManagerContractAddress, approve, checkAllowance, Vault__factory, extractOverrides } from './chunk-2GNHNTY7.mjs';
2
2
  import { ccmMetadataSchema } from './chunk-KLVDY4K6.mjs';
3
3
  import { __name, z, numericString, Chains, Assets, ethereumAddress, dotAddress, ChainflipNetworks, assetConstants, isTestnet, readChainAssetValue, __publicField, assert, isTokenCall, isTokenSwap, getInternalAsset, chainConstants, btcAddress } from './chunk-3LCS6BBP.mjs';
4
- export { Assets, ChainflipNetworks, Chains } from './chunk-3LCS6BBP.mjs';
4
+ export { Assets, ChainflipNetworks, Chains, getInternalAsset as getChainflipId } from './chunk-3LCS6BBP.mjs';
5
5
  import { decodeAddress } from '@polkadot/util-crypto';
6
6
  import axios from 'axios';
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainflip/sdk",
3
- "version": "1.2.1-alpha.1",
3
+ "version": "1.2.1-alpha.2",
4
4
  "description": "",
5
5
  "exports": {
6
6
  "./swap": {