@chainflip/sdk 1.6.0-alpha.5 → 1.6.0-alpha.6
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 +10 -4
- package/dist/swap.d.ts +10 -4
- package/dist/swap.js +1 -1
- package/dist/swap.mjs +1 -1
- package/package.json +1 -1
package/dist/swap.d.mts
CHANGED
|
@@ -64,6 +64,7 @@ type Fee<T> = {
|
|
|
64
64
|
};
|
|
65
65
|
type SwapFee = Fee<'NETWORK' | 'INGRESS' | 'EGRESS' | 'BROKER' | 'BOOST'>;
|
|
66
66
|
type PoolFee = Fee<'LIQUIDITY'>;
|
|
67
|
+
type PaidFee = SwapFee | PoolFee;
|
|
67
68
|
type PoolInfo = {
|
|
68
69
|
baseAsset: AssetAndChain;
|
|
69
70
|
quoteAsset: AssetAndChain;
|
|
@@ -354,6 +355,7 @@ interface Boost {
|
|
|
354
355
|
skippedBlockIndex: string | undefined;
|
|
355
356
|
}
|
|
356
357
|
interface DepositChannelFields {
|
|
358
|
+
id: string;
|
|
357
359
|
createdAt: number;
|
|
358
360
|
brokerCommissionBps: number;
|
|
359
361
|
depositAddress: string;
|
|
@@ -367,12 +369,14 @@ interface DepositChannelFields {
|
|
|
367
369
|
dcaParams: DcaParameters | undefined;
|
|
368
370
|
}
|
|
369
371
|
interface DepositFields {
|
|
370
|
-
amount: string
|
|
372
|
+
amount: string;
|
|
371
373
|
txRef: string | undefined;
|
|
372
374
|
txConfirmations: number | undefined;
|
|
373
375
|
receivedAt: number | undefined;
|
|
374
376
|
receivedBlockIndex: string | undefined;
|
|
375
377
|
failure: Failure | undefined;
|
|
378
|
+
failedAt: number | undefined;
|
|
379
|
+
failedBlockIndex: string | undefined;
|
|
376
380
|
}
|
|
377
381
|
interface SwapChunk {
|
|
378
382
|
swapInputAmount: string;
|
|
@@ -384,7 +388,7 @@ interface SwapChunk {
|
|
|
384
388
|
retryCount: number;
|
|
385
389
|
latestSwapRescheduledAt: number | undefined;
|
|
386
390
|
latestSwapRescheduledBlockIndex: number | undefined;
|
|
387
|
-
fees:
|
|
391
|
+
fees: PaidFee[];
|
|
388
392
|
isDca: false;
|
|
389
393
|
}
|
|
390
394
|
interface SwapFields {
|
|
@@ -395,7 +399,7 @@ interface SwapFields {
|
|
|
395
399
|
lastExecutedChunk: SwapChunk | undefined;
|
|
396
400
|
currentChunk: SwapChunk;
|
|
397
401
|
type: SwapType;
|
|
398
|
-
fees:
|
|
402
|
+
fees: PaidFee[];
|
|
399
403
|
}
|
|
400
404
|
interface EgressFields {
|
|
401
405
|
amount: string;
|
|
@@ -420,7 +424,7 @@ interface SwapStatusResponseCommonFields extends ChainsAndAssets {
|
|
|
420
424
|
interface VaultSwapCommonFields extends Exclude<SwapStatusResponseCommonFields, 'boost'> {
|
|
421
425
|
}
|
|
422
426
|
interface ReceivingVaultSwap extends VaultSwapCommonFields {
|
|
423
|
-
deposit:
|
|
427
|
+
deposit: DepositFields;
|
|
424
428
|
}
|
|
425
429
|
interface SwappingVaultSwap extends ReceivingVaultSwap {
|
|
426
430
|
swap: Exclude<SwapChunk, 'latestSwapRescheduledAt' | 'latestSwapRescheduledBlockIndex'> | undefined;
|
|
@@ -444,6 +448,8 @@ interface Sending extends Receiving {
|
|
|
444
448
|
refundEgress: EgressFields | undefined;
|
|
445
449
|
}
|
|
446
450
|
type SwapState = ({
|
|
451
|
+
state: 'WAITING';
|
|
452
|
+
} & DepositChannel) | ({
|
|
447
453
|
state: 'RECEIVING';
|
|
448
454
|
} & Receiving) | ({
|
|
449
455
|
state: 'SWAPPING';
|
package/dist/swap.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ type Fee<T> = {
|
|
|
64
64
|
};
|
|
65
65
|
type SwapFee = Fee<'NETWORK' | 'INGRESS' | 'EGRESS' | 'BROKER' | 'BOOST'>;
|
|
66
66
|
type PoolFee = Fee<'LIQUIDITY'>;
|
|
67
|
+
type PaidFee = SwapFee | PoolFee;
|
|
67
68
|
type PoolInfo = {
|
|
68
69
|
baseAsset: AssetAndChain;
|
|
69
70
|
quoteAsset: AssetAndChain;
|
|
@@ -354,6 +355,7 @@ interface Boost {
|
|
|
354
355
|
skippedBlockIndex: string | undefined;
|
|
355
356
|
}
|
|
356
357
|
interface DepositChannelFields {
|
|
358
|
+
id: string;
|
|
357
359
|
createdAt: number;
|
|
358
360
|
brokerCommissionBps: number;
|
|
359
361
|
depositAddress: string;
|
|
@@ -367,12 +369,14 @@ interface DepositChannelFields {
|
|
|
367
369
|
dcaParams: DcaParameters | undefined;
|
|
368
370
|
}
|
|
369
371
|
interface DepositFields {
|
|
370
|
-
amount: string
|
|
372
|
+
amount: string;
|
|
371
373
|
txRef: string | undefined;
|
|
372
374
|
txConfirmations: number | undefined;
|
|
373
375
|
receivedAt: number | undefined;
|
|
374
376
|
receivedBlockIndex: string | undefined;
|
|
375
377
|
failure: Failure | undefined;
|
|
378
|
+
failedAt: number | undefined;
|
|
379
|
+
failedBlockIndex: string | undefined;
|
|
376
380
|
}
|
|
377
381
|
interface SwapChunk {
|
|
378
382
|
swapInputAmount: string;
|
|
@@ -384,7 +388,7 @@ interface SwapChunk {
|
|
|
384
388
|
retryCount: number;
|
|
385
389
|
latestSwapRescheduledAt: number | undefined;
|
|
386
390
|
latestSwapRescheduledBlockIndex: number | undefined;
|
|
387
|
-
fees:
|
|
391
|
+
fees: PaidFee[];
|
|
388
392
|
isDca: false;
|
|
389
393
|
}
|
|
390
394
|
interface SwapFields {
|
|
@@ -395,7 +399,7 @@ interface SwapFields {
|
|
|
395
399
|
lastExecutedChunk: SwapChunk | undefined;
|
|
396
400
|
currentChunk: SwapChunk;
|
|
397
401
|
type: SwapType;
|
|
398
|
-
fees:
|
|
402
|
+
fees: PaidFee[];
|
|
399
403
|
}
|
|
400
404
|
interface EgressFields {
|
|
401
405
|
amount: string;
|
|
@@ -420,7 +424,7 @@ interface SwapStatusResponseCommonFields extends ChainsAndAssets {
|
|
|
420
424
|
interface VaultSwapCommonFields extends Exclude<SwapStatusResponseCommonFields, 'boost'> {
|
|
421
425
|
}
|
|
422
426
|
interface ReceivingVaultSwap extends VaultSwapCommonFields {
|
|
423
|
-
deposit:
|
|
427
|
+
deposit: DepositFields;
|
|
424
428
|
}
|
|
425
429
|
interface SwappingVaultSwap extends ReceivingVaultSwap {
|
|
426
430
|
swap: Exclude<SwapChunk, 'latestSwapRescheduledAt' | 'latestSwapRescheduledBlockIndex'> | undefined;
|
|
@@ -444,6 +448,8 @@ interface Sending extends Receiving {
|
|
|
444
448
|
refundEgress: EgressFields | undefined;
|
|
445
449
|
}
|
|
446
450
|
type SwapState = ({
|
|
451
|
+
state: 'WAITING';
|
|
452
|
+
} & DepositChannel) | ({
|
|
447
453
|
state: 'RECEIVING';
|
|
448
454
|
} & Receiving) | ({
|
|
449
455
|
state: 'SWAPPING';
|
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-alpha.
|
|
10032
|
+
var version = "1.6.0-alpha.6";
|
|
10033
10033
|
|
|
10034
10034
|
// src/swap/consts.ts
|
|
10035
10035
|
var CF_SDK_VERSION_HEADERS = {
|
package/dist/swap.mjs
CHANGED
|
@@ -8307,7 +8307,7 @@ var getChainData = /* @__PURE__ */ __name((chain2, network, env) => ({
|
|
|
8307
8307
|
}), "getChainData");
|
|
8308
8308
|
|
|
8309
8309
|
// package.json
|
|
8310
|
-
var version = "1.6.0-alpha.
|
|
8310
|
+
var version = "1.6.0-alpha.6";
|
|
8311
8311
|
|
|
8312
8312
|
// src/swap/consts.ts
|
|
8313
8313
|
var CF_SDK_VERSION_HEADERS = {
|