@chainflip/sdk 1.5.0-alpha.0 → 1.5.0-alpha.1
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-QFRN2UBT.mjs → broker-4AIV4KDP.mjs} +3 -3
- package/dist/{chunk-7ENWS5RM.mjs → chunk-HWJAHLL7.mjs} +1 -1
- package/dist/swap.d.mts +9 -4
- package/dist/swap.d.ts +9 -4
- package/dist/swap.js +1389 -7
- package/dist/swap.mjs +1383 -6
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z, assetAndChain, numericString, hexString, btcAddress, ccmParamsSchema, affiliateBroker, fillOrKillParams, dotAddress, ethereumAddress } from './chunk-
|
|
1
|
+
import { z, assetAndChain, numericString, hexString, btcAddress, ccmParamsSchema, affiliateBroker, fillOrKillParams, dotAddress, ethereumAddress } from './chunk-HWJAHLL7.mjs';
|
|
2
2
|
import { __name, Chains } from './chunk-3V7QJANN.mjs';
|
|
3
3
|
import { HttpClient } from '@chainflip/rpc';
|
|
4
4
|
import { bytesToHex } from '@chainflip/utils/bytes';
|
|
@@ -31,10 +31,10 @@ var validateRequest = /* @__PURE__ */ __name((network, params) => z.tuple([
|
|
|
31
31
|
})).optional(),
|
|
32
32
|
z.number().optional(),
|
|
33
33
|
z.array(affiliateBroker).optional(),
|
|
34
|
-
fillOrKillParams.transform(({ retryDurationBlocks, refundAddress,
|
|
34
|
+
fillOrKillParams.transform(({ retryDurationBlocks, refundAddress, minPriceX128 }) => ({
|
|
35
35
|
retry_duration: retryDurationBlocks,
|
|
36
36
|
refund_address: refundAddress,
|
|
37
|
-
min_price: `0x${BigInt(
|
|
37
|
+
min_price: `0x${BigInt(minPriceX128).toString(16)}`
|
|
38
38
|
})).optional()
|
|
39
39
|
]).parse(params), "validateRequest");
|
|
40
40
|
var validateResponse = /* @__PURE__ */ __name((network, response) => z.object({
|
|
@@ -4456,7 +4456,7 @@ var affiliateBroker = z.object({
|
|
|
4456
4456
|
var fillOrKillParams = z.object({
|
|
4457
4457
|
retryDurationBlocks: number,
|
|
4458
4458
|
refundAddress: z.string(),
|
|
4459
|
-
|
|
4459
|
+
minPriceX128: numericString
|
|
4460
4460
|
});
|
|
4461
4461
|
z.object({
|
|
4462
4462
|
srcAsset: asset,
|
package/dist/swap.d.mts
CHANGED
|
@@ -34,17 +34,20 @@ type AffiliateBroker = z.input<typeof affiliateBroker>;
|
|
|
34
34
|
declare const fillOrKillParams: z.ZodObject<{
|
|
35
35
|
retryDurationBlocks: z.ZodNumber;
|
|
36
36
|
refundAddress: z.ZodString;
|
|
37
|
-
|
|
37
|
+
minPriceX128: z.ZodString;
|
|
38
38
|
}, "strip", z.ZodTypeAny, {
|
|
39
39
|
retryDurationBlocks: number;
|
|
40
40
|
refundAddress: string;
|
|
41
|
-
|
|
41
|
+
minPriceX128: string;
|
|
42
42
|
}, {
|
|
43
43
|
retryDurationBlocks: number;
|
|
44
44
|
refundAddress: string;
|
|
45
|
-
|
|
45
|
+
minPriceX128: string;
|
|
46
46
|
}>;
|
|
47
|
-
type
|
|
47
|
+
type FillOrKillParamsX128 = z.input<typeof fillOrKillParams>;
|
|
48
|
+
type FillOrKillParams = Omit<FillOrKillParamsX128, 'minPriceX128'> & {
|
|
49
|
+
minPrice: string;
|
|
50
|
+
};
|
|
48
51
|
type Fee<T> = {
|
|
49
52
|
type: T;
|
|
50
53
|
chain: Chain;
|
|
@@ -149,6 +152,8 @@ interface SwapStatusResponseCommonFields extends ChainsAndAssets {
|
|
|
149
152
|
estimatedDefaultDurationSeconds: number | undefined;
|
|
150
153
|
srcChainRequiredBlockConfirmations: number | undefined;
|
|
151
154
|
depositTransactionRef: string | undefined;
|
|
155
|
+
latestSwapScheduledAt: number | undefined;
|
|
156
|
+
latestSwapScheduledBlockIndex: string | undefined;
|
|
152
157
|
depositTransactionHash: string | undefined;
|
|
153
158
|
ccmMetadata?: CcmParams;
|
|
154
159
|
}
|
package/dist/swap.d.ts
CHANGED
|
@@ -34,17 +34,20 @@ type AffiliateBroker = z.input<typeof affiliateBroker>;
|
|
|
34
34
|
declare const fillOrKillParams: z.ZodObject<{
|
|
35
35
|
retryDurationBlocks: z.ZodNumber;
|
|
36
36
|
refundAddress: z.ZodString;
|
|
37
|
-
|
|
37
|
+
minPriceX128: z.ZodString;
|
|
38
38
|
}, "strip", z.ZodTypeAny, {
|
|
39
39
|
retryDurationBlocks: number;
|
|
40
40
|
refundAddress: string;
|
|
41
|
-
|
|
41
|
+
minPriceX128: string;
|
|
42
42
|
}, {
|
|
43
43
|
retryDurationBlocks: number;
|
|
44
44
|
refundAddress: string;
|
|
45
|
-
|
|
45
|
+
minPriceX128: string;
|
|
46
46
|
}>;
|
|
47
|
-
type
|
|
47
|
+
type FillOrKillParamsX128 = z.input<typeof fillOrKillParams>;
|
|
48
|
+
type FillOrKillParams = Omit<FillOrKillParamsX128, 'minPriceX128'> & {
|
|
49
|
+
minPrice: string;
|
|
50
|
+
};
|
|
48
51
|
type Fee<T> = {
|
|
49
52
|
type: T;
|
|
50
53
|
chain: Chain;
|
|
@@ -149,6 +152,8 @@ interface SwapStatusResponseCommonFields extends ChainsAndAssets {
|
|
|
149
152
|
estimatedDefaultDurationSeconds: number | undefined;
|
|
150
153
|
srcChainRequiredBlockConfirmations: number | undefined;
|
|
151
154
|
depositTransactionRef: string | undefined;
|
|
155
|
+
latestSwapScheduledAt: number | undefined;
|
|
156
|
+
latestSwapScheduledBlockIndex: string | undefined;
|
|
152
157
|
depositTransactionHash: string | undefined;
|
|
153
158
|
ccmMetadata?: CcmParams;
|
|
154
159
|
}
|