@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/funding.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { getFlipBalance, getFundingEnvironment, getStateChainGatewayContractAddress, approve, getTokenContractAddress, checkAllowance, extractOverrides, StateChainGateway__factory } from './chunk-4HLERQ4Y.mjs';
2
- import { __name, __publicField, ChainflipNetworks, InternalAssets, assert } from './chunk-LQGUI52U.mjs';
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, A as Asset, I as InternalAsset, a as AssetOfChain, b as ChainflipNetwork, T as TransactionOptions, c as ChainAssetMap, d as ChainMap } from './contracts-ZLesmWHT.mjs';
3
- export { f as Assets, g as ChainflipIds, h as ChainflipNetworks, e as Chains, i as getChainflipId } from './contracts-ZLesmWHT.mjs';
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 SwapFee = {
35
- type: 'LIQUIDITY' | 'NETWORK' | 'INGRESS' | 'EGRESS' | 'BROKER' | 'BOOST';
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, A as Asset, I as InternalAsset, a as AssetOfChain, b as ChainflipNetwork, T as TransactionOptions, c as ChainAssetMap, d as ChainMap } from './contracts-ZLesmWHT.js';
3
- export { f as Assets, g as ChainflipIds, h as ChainflipNetworks, e as Chains, i as getChainflipId } from './contracts-ZLesmWHT.js';
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 SwapFee = {
35
- type: 'LIQUIDITY' | 'NETWORK' | 'INGRESS' | 'EGRESS' | 'BROKER' | 'BOOST';
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;