@chainflip/sdk 1.4.0-alpha.2 → 1.4.0-alpha.4
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/broker-ZOUQBZB6.mjs +79 -0
- package/dist/{chunk-4HLERQ4Y.mjs → chunk-LFAWGKTO.mjs} +22 -161
- package/dist/{chunk-LQGUI52U.mjs → chunk-M2KPIR26.mjs} +273 -705
- package/dist/chunk-VT6GEMQN.mjs +211 -0
- package/dist/{contracts-ZLesmWHT.d.mts → contracts-49zdGryt.d.mts} +9 -1
- package/dist/{contracts-ZLesmWHT.d.ts → contracts-49zdGryt.d.ts} +9 -1
- package/dist/funding.d.mts +1 -1
- package/dist/funding.d.ts +1 -1
- package/dist/funding.js +107 -4831
- package/dist/funding.mjs +2 -2
- package/dist/swap.d.mts +16 -4
- package/dist/swap.d.ts +16 -4
- package/dist/swap.js +311 -783
- package/dist/swap.mjs +5 -5
- package/package.json +4 -3
- package/dist/broker-XWF7RRDY.mjs +0 -124
- package/dist/chunk-KHC24Z3O.mjs +0 -65
package/dist/funding.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getFlipBalance, getFundingEnvironment, getStateChainGatewayContractAddress, approve, getTokenContractAddress, checkAllowance, extractOverrides, StateChainGateway__factory } from './chunk-
|
|
2
|
-
import { __name, __publicField, ChainflipNetworks, InternalAssets, assert } from './chunk-
|
|
1
|
+
import { getFlipBalance, getFundingEnvironment, getStateChainGatewayContractAddress, approve, getTokenContractAddress, checkAllowance, extractOverrides, StateChainGateway__factory } from './chunk-LFAWGKTO.mjs';
|
|
2
|
+
import { __name, __publicField, ChainflipNetworks, InternalAssets, assert } from './chunk-VT6GEMQN.mjs';
|
|
3
3
|
|
|
4
4
|
// ../shared/src/stateChainGateway/utils.ts
|
|
5
5
|
var getStateChainGateway = /* @__PURE__ */ __name((networkOpts) => {
|
package/dist/swap.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Signer } from 'ethers';
|
|
2
|
-
import { C as Chain,
|
|
3
|
-
export {
|
|
2
|
+
import { A as AssetAndChain, C as Chain, a as Asset, I as InternalAsset, b as AssetOfChain, c as ChainflipNetwork, T as TransactionOptions, d as ChainAssetMap, e as ChainMap } from './contracts-49zdGryt.mjs';
|
|
3
|
+
export { g as Assets, h as ChainflipIds, i as ChainflipNetworks, f as Chains, j as getChainflipId } from './contracts-49zdGryt.mjs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
6
|
declare const ccmMetadataSchema: z.ZodObject<{
|
|
@@ -31,16 +31,24 @@ declare const affiliateBroker: z.ZodEffects<z.ZodObject<{
|
|
|
31
31
|
commissionBps: number;
|
|
32
32
|
}>;
|
|
33
33
|
type AffiliateBroker = z.input<typeof affiliateBroker>;
|
|
34
|
-
type
|
|
35
|
-
type:
|
|
34
|
+
type Fee<T> = {
|
|
35
|
+
type: T;
|
|
36
36
|
chain: Chain;
|
|
37
37
|
asset: Asset;
|
|
38
38
|
amount: string;
|
|
39
39
|
};
|
|
40
|
+
type SwapFee = Fee<'NETWORK' | 'INGRESS' | 'EGRESS' | 'BROKER' | 'BOOST'>;
|
|
41
|
+
type PoolFee = Fee<'LIQUIDITY'>;
|
|
42
|
+
type PoolInfo = {
|
|
43
|
+
baseAsset: AssetAndChain;
|
|
44
|
+
quoteAsset: AssetAndChain;
|
|
45
|
+
fee: Omit<PoolFee, 'type'>;
|
|
46
|
+
};
|
|
40
47
|
type QuoteDetails = {
|
|
41
48
|
intermediateAmount?: string;
|
|
42
49
|
egressAmount: string;
|
|
43
50
|
includedFees: SwapFee[];
|
|
51
|
+
poolInfo: PoolInfo[];
|
|
44
52
|
lowLiquidityWarning: boolean | undefined;
|
|
45
53
|
estimatedDurationSeconds: number;
|
|
46
54
|
};
|
|
@@ -135,6 +143,8 @@ interface DepositAddressFields extends SwapStatusResponseCommonFields {
|
|
|
135
143
|
}[];
|
|
136
144
|
depositChannelMaxBoostFeeBps: number;
|
|
137
145
|
effectiveBoostFeeBps?: number;
|
|
146
|
+
boostSkippedAt?: number;
|
|
147
|
+
boostSkippedBlockIndex?: string;
|
|
138
148
|
}
|
|
139
149
|
type BroadcastRequested = {
|
|
140
150
|
swapId: string;
|
|
@@ -182,6 +192,8 @@ type SwapState = {
|
|
|
182
192
|
depositAmount: string;
|
|
183
193
|
depositReceivedAt: number;
|
|
184
194
|
depositReceivedBlockIndex: string;
|
|
195
|
+
depositBoostedAt?: number;
|
|
196
|
+
depositBoostedBlockIndex?: string;
|
|
185
197
|
} | {
|
|
186
198
|
state: 'SWAP_EXECUTED';
|
|
187
199
|
swapId: string;
|
package/dist/swap.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Signer } from 'ethers';
|
|
2
|
-
import { C as Chain,
|
|
3
|
-
export {
|
|
2
|
+
import { A as AssetAndChain, C as Chain, a as Asset, I as InternalAsset, b as AssetOfChain, c as ChainflipNetwork, T as TransactionOptions, d as ChainAssetMap, e as ChainMap } from './contracts-49zdGryt.js';
|
|
3
|
+
export { g as Assets, h as ChainflipIds, i as ChainflipNetworks, f as Chains, j as getChainflipId } from './contracts-49zdGryt.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
6
|
declare const ccmMetadataSchema: z.ZodObject<{
|
|
@@ -31,16 +31,24 @@ declare const affiliateBroker: z.ZodEffects<z.ZodObject<{
|
|
|
31
31
|
commissionBps: number;
|
|
32
32
|
}>;
|
|
33
33
|
type AffiliateBroker = z.input<typeof affiliateBroker>;
|
|
34
|
-
type
|
|
35
|
-
type:
|
|
34
|
+
type Fee<T> = {
|
|
35
|
+
type: T;
|
|
36
36
|
chain: Chain;
|
|
37
37
|
asset: Asset;
|
|
38
38
|
amount: string;
|
|
39
39
|
};
|
|
40
|
+
type SwapFee = Fee<'NETWORK' | 'INGRESS' | 'EGRESS' | 'BROKER' | 'BOOST'>;
|
|
41
|
+
type PoolFee = Fee<'LIQUIDITY'>;
|
|
42
|
+
type PoolInfo = {
|
|
43
|
+
baseAsset: AssetAndChain;
|
|
44
|
+
quoteAsset: AssetAndChain;
|
|
45
|
+
fee: Omit<PoolFee, 'type'>;
|
|
46
|
+
};
|
|
40
47
|
type QuoteDetails = {
|
|
41
48
|
intermediateAmount?: string;
|
|
42
49
|
egressAmount: string;
|
|
43
50
|
includedFees: SwapFee[];
|
|
51
|
+
poolInfo: PoolInfo[];
|
|
44
52
|
lowLiquidityWarning: boolean | undefined;
|
|
45
53
|
estimatedDurationSeconds: number;
|
|
46
54
|
};
|
|
@@ -135,6 +143,8 @@ interface DepositAddressFields extends SwapStatusResponseCommonFields {
|
|
|
135
143
|
}[];
|
|
136
144
|
depositChannelMaxBoostFeeBps: number;
|
|
137
145
|
effectiveBoostFeeBps?: number;
|
|
146
|
+
boostSkippedAt?: number;
|
|
147
|
+
boostSkippedBlockIndex?: string;
|
|
138
148
|
}
|
|
139
149
|
type BroadcastRequested = {
|
|
140
150
|
swapId: string;
|
|
@@ -182,6 +192,8 @@ type SwapState = {
|
|
|
182
192
|
depositAmount: string;
|
|
183
193
|
depositReceivedAt: number;
|
|
184
194
|
depositReceivedBlockIndex: string;
|
|
195
|
+
depositBoostedAt?: number;
|
|
196
|
+
depositBoostedBlockIndex?: string;
|
|
185
197
|
} | {
|
|
186
198
|
state: 'SWAP_EXECUTED';
|
|
187
199
|
swapId: string;
|