@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.
- package/dist/{contracts-5Td0BhwY.d.mts → contracts-b4ZS6VAh.d.mts} +6 -1
- package/dist/{contracts-5Td0BhwY.d.ts → contracts-b4ZS6VAh.d.ts} +6 -1
- package/dist/funding.d.mts +1 -1
- package/dist/funding.d.ts +1 -1
- package/dist/swap.d.mts +3 -2
- package/dist/swap.d.ts +3 -2
- package/dist/swap.js +2 -0
- package/dist/swap.mjs +1 -1
- package/package.json +1 -1
|
@@ -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 };
|
package/dist/funding.d.mts
CHANGED
package/dist/funding.d.ts
CHANGED
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-
|
|
3
|
-
export { e as Assets, f as ChainflipNetworks, d as Chains } from './contracts-
|
|
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-
|
|
3
|
-
export { e as Assets, f as ChainflipNetworks, d as Chains } from './contracts-
|
|
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
|
|