@chainflip/sdk 1.6.7-rc.2 → 1.6.7-rc.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/swap.d.mts +14 -1
- package/dist/swap.d.ts +14 -1
- package/dist/swap.js +3 -2
- package/dist/swap.mjs +3 -2
- package/package.json +1 -1
package/dist/swap.d.mts
CHANGED
|
@@ -91,7 +91,13 @@ interface BaseQuoteDetails {
|
|
|
91
91
|
poolInfo: PoolInfo[];
|
|
92
92
|
lowLiquidityWarning: boolean | undefined;
|
|
93
93
|
estimatedDurationSeconds: number;
|
|
94
|
+
estimatedDurationsSeconds: {
|
|
95
|
+
deposit: number;
|
|
96
|
+
swap: number;
|
|
97
|
+
egress: number;
|
|
98
|
+
};
|
|
94
99
|
estimatedPrice: string;
|
|
100
|
+
recommendedSlippageTolerancePercent: number;
|
|
95
101
|
}
|
|
96
102
|
type WithBoostQuote<T> = Omit<T, 'boostQuote'> & BoostedQuoteDetails;
|
|
97
103
|
interface RegularQuote extends BaseQuoteDetails {
|
|
@@ -445,6 +451,11 @@ interface SwapStatusResponseCommonFields extends ChainsAndAssets {
|
|
|
445
451
|
ccmParams: CcmParams | undefined;
|
|
446
452
|
boost: Boost | undefined;
|
|
447
453
|
estimatedDurationSeconds: number | null | undefined;
|
|
454
|
+
estimatedDurationsSeconds: {
|
|
455
|
+
deposit: number;
|
|
456
|
+
swap: number;
|
|
457
|
+
egress: number;
|
|
458
|
+
};
|
|
448
459
|
srcChainRequiredBlockConfirmations: number | null;
|
|
449
460
|
fees: PaidFee[];
|
|
450
461
|
lastStatechainUpdateAt: number | undefined;
|
|
@@ -481,6 +492,7 @@ type SwapStatusResponseV2 = ({
|
|
|
481
492
|
|
|
482
493
|
interface DepositAddressRequestV2 {
|
|
483
494
|
quote: Quote | BoostQuote;
|
|
495
|
+
srcAddress?: string;
|
|
484
496
|
destAddress: string;
|
|
485
497
|
fillOrKillParams?: FillOrKillParamsWithMinPrice | FillOrKillParamsWithSlippage$1;
|
|
486
498
|
affiliateBrokers?: {
|
|
@@ -553,7 +565,7 @@ declare class SwapSDK {
|
|
|
553
565
|
asset: Asset;
|
|
554
566
|
chain: Chain;
|
|
555
567
|
}): Promise<BoostPoolDepth[]>;
|
|
556
|
-
requestDepositAddressV2({ quote, destAddress, fillOrKillParams: inputFoKParams, affiliateBrokers: affiliates, ccmParams, brokerCommissionBps, }: DepositAddressRequestV2): Promise<{
|
|
568
|
+
requestDepositAddressV2({ quote, srcAddress, destAddress, fillOrKillParams: inputFoKParams, affiliateBrokers: affiliates, ccmParams, brokerCommissionBps, }: DepositAddressRequestV2): Promise<{
|
|
557
569
|
depositChannelId: string;
|
|
558
570
|
depositAddress: string;
|
|
559
571
|
brokerCommissionBps: number;
|
|
@@ -570,6 +582,7 @@ declare class SwapSDK {
|
|
|
570
582
|
srcChain: "Bitcoin" | "Ethereum" | "Polkadot" | "Arbitrum" | "Solana";
|
|
571
583
|
destAsset: "FLIP" | "USDC" | "DOT" | "ETH" | "BTC" | "USDT" | "SOL";
|
|
572
584
|
destChain: "Bitcoin" | "Ethereum" | "Polkadot" | "Arbitrum" | "Solana";
|
|
585
|
+
srcAddress: string | undefined;
|
|
573
586
|
destAddress: string;
|
|
574
587
|
dcaParams: {
|
|
575
588
|
numberOfChunks: number;
|
package/dist/swap.d.ts
CHANGED
|
@@ -91,7 +91,13 @@ interface BaseQuoteDetails {
|
|
|
91
91
|
poolInfo: PoolInfo[];
|
|
92
92
|
lowLiquidityWarning: boolean | undefined;
|
|
93
93
|
estimatedDurationSeconds: number;
|
|
94
|
+
estimatedDurationsSeconds: {
|
|
95
|
+
deposit: number;
|
|
96
|
+
swap: number;
|
|
97
|
+
egress: number;
|
|
98
|
+
};
|
|
94
99
|
estimatedPrice: string;
|
|
100
|
+
recommendedSlippageTolerancePercent: number;
|
|
95
101
|
}
|
|
96
102
|
type WithBoostQuote<T> = Omit<T, 'boostQuote'> & BoostedQuoteDetails;
|
|
97
103
|
interface RegularQuote extends BaseQuoteDetails {
|
|
@@ -445,6 +451,11 @@ interface SwapStatusResponseCommonFields extends ChainsAndAssets {
|
|
|
445
451
|
ccmParams: CcmParams | undefined;
|
|
446
452
|
boost: Boost | undefined;
|
|
447
453
|
estimatedDurationSeconds: number | null | undefined;
|
|
454
|
+
estimatedDurationsSeconds: {
|
|
455
|
+
deposit: number;
|
|
456
|
+
swap: number;
|
|
457
|
+
egress: number;
|
|
458
|
+
};
|
|
448
459
|
srcChainRequiredBlockConfirmations: number | null;
|
|
449
460
|
fees: PaidFee[];
|
|
450
461
|
lastStatechainUpdateAt: number | undefined;
|
|
@@ -481,6 +492,7 @@ type SwapStatusResponseV2 = ({
|
|
|
481
492
|
|
|
482
493
|
interface DepositAddressRequestV2 {
|
|
483
494
|
quote: Quote | BoostQuote;
|
|
495
|
+
srcAddress?: string;
|
|
484
496
|
destAddress: string;
|
|
485
497
|
fillOrKillParams?: FillOrKillParamsWithMinPrice | FillOrKillParamsWithSlippage$1;
|
|
486
498
|
affiliateBrokers?: {
|
|
@@ -553,7 +565,7 @@ declare class SwapSDK {
|
|
|
553
565
|
asset: Asset;
|
|
554
566
|
chain: Chain;
|
|
555
567
|
}): Promise<BoostPoolDepth[]>;
|
|
556
|
-
requestDepositAddressV2({ quote, destAddress, fillOrKillParams: inputFoKParams, affiliateBrokers: affiliates, ccmParams, brokerCommissionBps, }: DepositAddressRequestV2): Promise<{
|
|
568
|
+
requestDepositAddressV2({ quote, srcAddress, destAddress, fillOrKillParams: inputFoKParams, affiliateBrokers: affiliates, ccmParams, brokerCommissionBps, }: DepositAddressRequestV2): Promise<{
|
|
557
569
|
depositChannelId: string;
|
|
558
570
|
depositAddress: string;
|
|
559
571
|
brokerCommissionBps: number;
|
|
@@ -570,6 +582,7 @@ declare class SwapSDK {
|
|
|
570
582
|
srcChain: "Bitcoin" | "Ethereum" | "Polkadot" | "Arbitrum" | "Solana";
|
|
571
583
|
destAsset: "FLIP" | "USDC" | "DOT" | "ETH" | "BTC" | "USDT" | "SOL";
|
|
572
584
|
destChain: "Bitcoin" | "Ethereum" | "Polkadot" | "Arbitrum" | "Solana";
|
|
585
|
+
srcAddress: string | undefined;
|
|
573
586
|
destAddress: string;
|
|
574
587
|
dcaParams: {
|
|
575
588
|
numberOfChunks: number;
|
package/dist/swap.js
CHANGED
|
@@ -14048,7 +14048,7 @@ var getChainData = /* @__PURE__ */ __name((chain2, network, env) => ({
|
|
|
14048
14048
|
}), "getChainData");
|
|
14049
14049
|
|
|
14050
14050
|
// package.json
|
|
14051
|
-
var version = "1.6.7-rc.
|
|
14051
|
+
var version = "1.6.7-rc.4";
|
|
14052
14052
|
|
|
14053
14053
|
// src/swap/consts.ts
|
|
14054
14054
|
var CF_SDK_VERSION_HEADERS = {
|
|
@@ -14377,7 +14377,7 @@ var _SwapSDK = class _SwapSDK {
|
|
|
14377
14377
|
...getAssetAndChain(depth.asset)
|
|
14378
14378
|
}));
|
|
14379
14379
|
}
|
|
14380
|
-
async requestDepositAddressV2({ quote, destAddress, fillOrKillParams: inputFoKParams, affiliateBrokers: affiliates, ccmParams, brokerCommissionBps }) {
|
|
14380
|
+
async requestDepositAddressV2({ quote, srcAddress, destAddress, fillOrKillParams: inputFoKParams, affiliateBrokers: affiliates, ccmParams, brokerCommissionBps }) {
|
|
14381
14381
|
await this.validateSwapAmount(quote.srcAsset, BigInt(quote.depositAmount));
|
|
14382
14382
|
assertQuoteValid(quote);
|
|
14383
14383
|
const depositAddressRequest = {
|
|
@@ -14385,6 +14385,7 @@ var _SwapSDK = class _SwapSDK {
|
|
|
14385
14385
|
srcChain: quote.srcAsset.chain,
|
|
14386
14386
|
destAsset: quote.destAsset.asset,
|
|
14387
14387
|
destChain: quote.destAsset.chain,
|
|
14388
|
+
srcAddress,
|
|
14388
14389
|
destAddress,
|
|
14389
14390
|
dcaParams: quote.type === "DCA" ? quote.dcaParams : void 0,
|
|
14390
14391
|
fillOrKillParams: parseFoKParams(inputFoKParams, quote),
|
package/dist/swap.mjs
CHANGED
|
@@ -12294,7 +12294,7 @@ var getChainData = /* @__PURE__ */ __name((chain2, network, env) => ({
|
|
|
12294
12294
|
}), "getChainData");
|
|
12295
12295
|
|
|
12296
12296
|
// package.json
|
|
12297
|
-
var version = "1.6.7-rc.
|
|
12297
|
+
var version = "1.6.7-rc.4";
|
|
12298
12298
|
|
|
12299
12299
|
// src/swap/consts.ts
|
|
12300
12300
|
var CF_SDK_VERSION_HEADERS = {
|
|
@@ -12623,7 +12623,7 @@ var _SwapSDK = class _SwapSDK {
|
|
|
12623
12623
|
...getAssetAndChain(depth.asset)
|
|
12624
12624
|
}));
|
|
12625
12625
|
}
|
|
12626
|
-
async requestDepositAddressV2({ quote, destAddress, fillOrKillParams: inputFoKParams, affiliateBrokers: affiliates, ccmParams, brokerCommissionBps }) {
|
|
12626
|
+
async requestDepositAddressV2({ quote, srcAddress, destAddress, fillOrKillParams: inputFoKParams, affiliateBrokers: affiliates, ccmParams, brokerCommissionBps }) {
|
|
12627
12627
|
await this.validateSwapAmount(quote.srcAsset, BigInt(quote.depositAmount));
|
|
12628
12628
|
assertQuoteValid(quote);
|
|
12629
12629
|
const depositAddressRequest = {
|
|
@@ -12631,6 +12631,7 @@ var _SwapSDK = class _SwapSDK {
|
|
|
12631
12631
|
srcChain: quote.srcAsset.chain,
|
|
12632
12632
|
destAsset: quote.destAsset.asset,
|
|
12633
12633
|
destChain: quote.destAsset.chain,
|
|
12634
|
+
srcAddress,
|
|
12634
12635
|
destAddress,
|
|
12635
12636
|
dcaParams: quote.type === "DCA" ? quote.dcaParams : void 0,
|
|
12636
12637
|
fillOrKillParams: parseFoKParams(inputFoKParams, quote),
|