@chainflip/sdk 1.6.0-beta.0 → 1.6.0-beta.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/swap.d.mts CHANGED
@@ -71,6 +71,7 @@ type Fee<T> = {
71
71
  type SwapFee = Fee<'NETWORK' | 'INGRESS' | 'EGRESS' | 'BROKER' | 'BOOST'>;
72
72
  type PoolFee = Fee<'LIQUIDITY'>;
73
73
  type PaidFee = SwapFee | PoolFee;
74
+ type QuoteType = 'REGULAR' | 'DCA';
74
75
  type PoolInfo = {
75
76
  baseAsset: AssetAndChain;
76
77
  quoteAsset: AssetAndChain;
@@ -94,6 +95,7 @@ type QuoteQueryResponse = QuoteDetails & {
94
95
  numberOfChunks: number;
95
96
  chunkIntervalBlocks: number;
96
97
  };
98
+ type: QuoteType;
97
99
  };
98
100
 
99
101
  interface ExecuteSwapParams {
@@ -381,36 +383,29 @@ interface DepositFields {
381
383
  failedAt: number | undefined;
382
384
  failedBlockIndex: string | undefined;
383
385
  }
386
+ type ChunkInfo = {
387
+ inputAmount: string;
388
+ intermediateAmount?: string;
389
+ outputAmount?: string;
390
+ scheduledAt: number;
391
+ scheduledBlockIndex: string;
392
+ executedAt?: number;
393
+ executedBlockIndex?: string;
394
+ retryCount: number;
395
+ };
396
+ type PickRequired<T> = {
397
+ [K in keyof T as undefined extends T[K] ? never : K]: T[K];
398
+ } & {};
384
399
  interface SwapFields {
385
400
  originalInputAmount: string;
386
401
  remainingInputAmount: string;
387
402
  swappedInputAmount: string;
403
+ swappedIntermediateAmount: string;
388
404
  swappedOutputAmount: string;
389
- regular?: {
390
- inputAmount: string;
391
- outputAmount: string;
392
- scheduledAt: number;
393
- scheduledBlockIndex: string;
394
- executedAt?: number;
395
- executedBlockIndex?: string;
396
- retryCount: 0;
397
- };
405
+ regular?: ChunkInfo;
398
406
  dca?: {
399
- lastExecutedChunk: {
400
- inputAmount: string;
401
- outputAmount: string;
402
- scheduledAt: number;
403
- scheduledBlockIndex: string;
404
- executedAt: number;
405
- executedBlockIndex: string;
406
- retryCount: number;
407
- } | null;
408
- currentChunk: {
409
- inputAmount: string;
410
- scheduledAt: number;
411
- scheduledBlockIndex: string;
412
- retryCount: number;
413
- } | null;
407
+ lastExecutedChunk: ChunkInfo | null;
408
+ currentChunk: PickRequired<ChunkInfo> | null;
414
409
  executedChunks: number;
415
410
  remainingChunks: number;
416
411
  };
@@ -418,8 +413,8 @@ interface SwapFields {
418
413
  }
419
414
  interface EgressFields {
420
415
  amount: string;
421
- scheduledAt: number;
422
- scheduledBlockIndex: string;
416
+ scheduledAt: number | undefined;
417
+ scheduledBlockIndex: string | undefined;
423
418
  txRef: string | undefined;
424
419
  witnessedAt: number | undefined;
425
420
  witnessedBlockIndex: string | undefined;
package/dist/swap.d.ts CHANGED
@@ -71,6 +71,7 @@ type Fee<T> = {
71
71
  type SwapFee = Fee<'NETWORK' | 'INGRESS' | 'EGRESS' | 'BROKER' | 'BOOST'>;
72
72
  type PoolFee = Fee<'LIQUIDITY'>;
73
73
  type PaidFee = SwapFee | PoolFee;
74
+ type QuoteType = 'REGULAR' | 'DCA';
74
75
  type PoolInfo = {
75
76
  baseAsset: AssetAndChain;
76
77
  quoteAsset: AssetAndChain;
@@ -94,6 +95,7 @@ type QuoteQueryResponse = QuoteDetails & {
94
95
  numberOfChunks: number;
95
96
  chunkIntervalBlocks: number;
96
97
  };
98
+ type: QuoteType;
97
99
  };
98
100
 
99
101
  interface ExecuteSwapParams {
@@ -381,36 +383,29 @@ interface DepositFields {
381
383
  failedAt: number | undefined;
382
384
  failedBlockIndex: string | undefined;
383
385
  }
386
+ type ChunkInfo = {
387
+ inputAmount: string;
388
+ intermediateAmount?: string;
389
+ outputAmount?: string;
390
+ scheduledAt: number;
391
+ scheduledBlockIndex: string;
392
+ executedAt?: number;
393
+ executedBlockIndex?: string;
394
+ retryCount: number;
395
+ };
396
+ type PickRequired<T> = {
397
+ [K in keyof T as undefined extends T[K] ? never : K]: T[K];
398
+ } & {};
384
399
  interface SwapFields {
385
400
  originalInputAmount: string;
386
401
  remainingInputAmount: string;
387
402
  swappedInputAmount: string;
403
+ swappedIntermediateAmount: string;
388
404
  swappedOutputAmount: string;
389
- regular?: {
390
- inputAmount: string;
391
- outputAmount: string;
392
- scheduledAt: number;
393
- scheduledBlockIndex: string;
394
- executedAt?: number;
395
- executedBlockIndex?: string;
396
- retryCount: 0;
397
- };
405
+ regular?: ChunkInfo;
398
406
  dca?: {
399
- lastExecutedChunk: {
400
- inputAmount: string;
401
- outputAmount: string;
402
- scheduledAt: number;
403
- scheduledBlockIndex: string;
404
- executedAt: number;
405
- executedBlockIndex: string;
406
- retryCount: number;
407
- } | null;
408
- currentChunk: {
409
- inputAmount: string;
410
- scheduledAt: number;
411
- scheduledBlockIndex: string;
412
- retryCount: number;
413
- } | null;
407
+ lastExecutedChunk: ChunkInfo | null;
408
+ currentChunk: PickRequired<ChunkInfo> | null;
414
409
  executedChunks: number;
415
410
  remainingChunks: number;
416
411
  };
@@ -418,8 +413,8 @@ interface SwapFields {
418
413
  }
419
414
  interface EgressFields {
420
415
  amount: string;
421
- scheduledAt: number;
422
- scheduledBlockIndex: string;
416
+ scheduledAt: number | undefined;
417
+ scheduledBlockIndex: string | undefined;
423
418
  txRef: string | undefined;
424
419
  witnessedAt: number | undefined;
425
420
  witnessedBlockIndex: string | undefined;
package/dist/swap.js CHANGED
@@ -10029,7 +10029,7 @@ var getChainData = /* @__PURE__ */ __name((chain2, network, env) => ({
10029
10029
  }), "getChainData");
10030
10030
 
10031
10031
  // package.json
10032
- var version = "1.6.0-beta.0";
10032
+ var version = "1.6.0-beta.2";
10033
10033
 
10034
10034
  // src/swap/consts.ts
10035
10035
  var CF_SDK_VERSION_HEADERS = {
package/dist/swap.mjs CHANGED
@@ -8304,7 +8304,7 @@ var getChainData = /* @__PURE__ */ __name((chain2, network, env) => ({
8304
8304
  }), "getChainData");
8305
8305
 
8306
8306
  // package.json
8307
- var version = "1.6.0-beta.0";
8307
+ var version = "1.6.0-beta.2";
8308
8308
 
8309
8309
  // src/swap/consts.ts
8310
8310
  var CF_SDK_VERSION_HEADERS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainflip/sdk",
3
- "version": "1.6.0-beta.0",
3
+ "version": "1.6.0-beta.2",
4
4
  "description": "",
5
5
  "exports": {
6
6
  "./swap": {