@chainflip/sdk 1.8.0-beta.1 → 1.8.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 +5 -5
- package/dist/swap.d.ts +5 -5
- package/dist/swap.js +7 -7
- package/dist/swap.mjs +7 -7
- package/package.json +2 -2
package/dist/swap.d.mts
CHANGED
|
@@ -5,26 +5,26 @@ import { z } from 'zod';
|
|
|
5
5
|
declare const ccmParamsSchema: z.ZodEffects<z.ZodObject<{
|
|
6
6
|
gasBudget: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, `0x${string}`, string>]>, `0x${string}`, string>;
|
|
7
7
|
message: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
|
|
8
|
-
|
|
8
|
+
ccmAdditionalData: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>>;
|
|
9
9
|
cfParameters: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
11
|
message: `0x${string}`;
|
|
12
12
|
gasBudget: `0x${string}`;
|
|
13
|
-
|
|
13
|
+
ccmAdditionalData?: `0x${string}` | undefined;
|
|
14
14
|
cfParameters?: `0x${string}` | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
message: string;
|
|
17
17
|
gasBudget: string;
|
|
18
|
-
|
|
18
|
+
ccmAdditionalData?: string | undefined;
|
|
19
19
|
cfParameters?: string | undefined;
|
|
20
20
|
}>, {
|
|
21
21
|
gasBudget: `0x${string}`;
|
|
22
22
|
message: `0x${string}`;
|
|
23
|
-
|
|
23
|
+
ccmAdditionalData: `0x${string}` | undefined;
|
|
24
24
|
}, {
|
|
25
25
|
message: string;
|
|
26
26
|
gasBudget: string;
|
|
27
|
-
|
|
27
|
+
ccmAdditionalData?: string | undefined;
|
|
28
28
|
cfParameters?: string | undefined;
|
|
29
29
|
}>;
|
|
30
30
|
type CcmParams = Omit<z.input<typeof ccmParamsSchema>, 'cfParameters'> & {
|
package/dist/swap.d.ts
CHANGED
|
@@ -5,26 +5,26 @@ import { z } from 'zod';
|
|
|
5
5
|
declare const ccmParamsSchema: z.ZodEffects<z.ZodObject<{
|
|
6
6
|
gasBudget: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, `0x${string}`, string>]>, `0x${string}`, string>;
|
|
7
7
|
message: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
|
|
8
|
-
|
|
8
|
+
ccmAdditionalData: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>>;
|
|
9
9
|
cfParameters: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
11
|
message: `0x${string}`;
|
|
12
12
|
gasBudget: `0x${string}`;
|
|
13
|
-
|
|
13
|
+
ccmAdditionalData?: `0x${string}` | undefined;
|
|
14
14
|
cfParameters?: `0x${string}` | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
message: string;
|
|
17
17
|
gasBudget: string;
|
|
18
|
-
|
|
18
|
+
ccmAdditionalData?: string | undefined;
|
|
19
19
|
cfParameters?: string | undefined;
|
|
20
20
|
}>, {
|
|
21
21
|
gasBudget: `0x${string}`;
|
|
22
22
|
message: `0x${string}`;
|
|
23
|
-
|
|
23
|
+
ccmAdditionalData: `0x${string}` | undefined;
|
|
24
24
|
}, {
|
|
25
25
|
message: string;
|
|
26
26
|
gasBudget: string;
|
|
27
|
-
|
|
27
|
+
ccmAdditionalData?: string | undefined;
|
|
28
28
|
cfParameters?: string | undefined;
|
|
29
29
|
}>;
|
|
30
30
|
type CcmParams = Omit<z.input<typeof ccmParamsSchema>, 'cfParameters'> & {
|
package/dist/swap.js
CHANGED
|
@@ -430,13 +430,13 @@ var ccmParamsSchema = zod.z.object({
|
|
|
430
430
|
// https://github.com/chainflip-io/chainflip-backend/blob/415aa9e20ec4046c68892cd34798e5d831c5b83f/state-chain/chains/src/lib.rs#L709
|
|
431
431
|
message: hexStringWithMaxByteSize(15e3),
|
|
432
432
|
// https://github.com/chainflip-io/chainflip-backend/blob/415aa9e20ec4046c68892cd34798e5d831c5b83f/state-chain/chains/src/lib.rs#L710
|
|
433
|
-
|
|
433
|
+
ccmAdditionalData: hexStringWithMaxByteSize(3e3).optional(),
|
|
434
434
|
/** @deprecated DEPRECATED(1.8) pass additionalData instead */
|
|
435
435
|
cfParameters: hexStringWithMaxByteSize(3e3).optional()
|
|
436
|
-
}).transform(({ gasBudget, message,
|
|
436
|
+
}).transform(({ gasBudget, message, ccmAdditionalData, cfParameters }) => ({
|
|
437
437
|
gasBudget,
|
|
438
438
|
message,
|
|
439
|
-
|
|
439
|
+
ccmAdditionalData: ccmAdditionalData ?? cfParameters
|
|
440
440
|
}));
|
|
441
441
|
var affiliateBroker = zod.z.object({
|
|
442
442
|
account: chainflipAddress,
|
|
@@ -478,12 +478,12 @@ var transformedDcaParamsSchema = dcaParams.transform(
|
|
|
478
478
|
})
|
|
479
479
|
);
|
|
480
480
|
var transformedCcmParamsSchema = ccmParamsSchema.transform(
|
|
481
|
-
({ message, gasBudget,
|
|
481
|
+
({ message, gasBudget, ccmAdditionalData }) => ({
|
|
482
482
|
message,
|
|
483
483
|
gas_budget: gasBudget,
|
|
484
|
-
ccm_additional_data:
|
|
484
|
+
ccm_additional_data: ccmAdditionalData,
|
|
485
485
|
/** @deprecated DEPRECATED(1.8) we still need to pass cf_parameters until 1.8 is deployed to all networks */
|
|
486
|
-
cf_parameters:
|
|
486
|
+
cf_parameters: ccmAdditionalData
|
|
487
487
|
})
|
|
488
488
|
);
|
|
489
489
|
var getDepositAddressRequestSchema = (network) => zod.z.object({
|
|
@@ -877,7 +877,7 @@ var getChainData = (chain2, network, env) => ({
|
|
|
877
877
|
});
|
|
878
878
|
|
|
879
879
|
// package.json
|
|
880
|
-
var version = "1.8.0-beta.
|
|
880
|
+
var version = "1.8.0-beta.2";
|
|
881
881
|
|
|
882
882
|
// src/swap/consts.ts
|
|
883
883
|
var CF_SDK_VERSION_HEADERS = { "X-Chainflip-Sdk-Version": version };
|
package/dist/swap.mjs
CHANGED
|
@@ -207,13 +207,13 @@ var ccmParamsSchema = z.object({
|
|
|
207
207
|
// https://github.com/chainflip-io/chainflip-backend/blob/415aa9e20ec4046c68892cd34798e5d831c5b83f/state-chain/chains/src/lib.rs#L709
|
|
208
208
|
message: hexStringWithMaxByteSize(15e3),
|
|
209
209
|
// https://github.com/chainflip-io/chainflip-backend/blob/415aa9e20ec4046c68892cd34798e5d831c5b83f/state-chain/chains/src/lib.rs#L710
|
|
210
|
-
|
|
210
|
+
ccmAdditionalData: hexStringWithMaxByteSize(3e3).optional(),
|
|
211
211
|
/** @deprecated DEPRECATED(1.8) pass additionalData instead */
|
|
212
212
|
cfParameters: hexStringWithMaxByteSize(3e3).optional()
|
|
213
|
-
}).transform(({ gasBudget, message,
|
|
213
|
+
}).transform(({ gasBudget, message, ccmAdditionalData, cfParameters }) => ({
|
|
214
214
|
gasBudget,
|
|
215
215
|
message,
|
|
216
|
-
|
|
216
|
+
ccmAdditionalData: ccmAdditionalData ?? cfParameters
|
|
217
217
|
}));
|
|
218
218
|
var affiliateBroker = z.object({
|
|
219
219
|
account: chainflipAddress,
|
|
@@ -255,12 +255,12 @@ var transformedDcaParamsSchema = dcaParams.transform(
|
|
|
255
255
|
})
|
|
256
256
|
);
|
|
257
257
|
var transformedCcmParamsSchema = ccmParamsSchema.transform(
|
|
258
|
-
({ message, gasBudget,
|
|
258
|
+
({ message, gasBudget, ccmAdditionalData }) => ({
|
|
259
259
|
message,
|
|
260
260
|
gas_budget: gasBudget,
|
|
261
|
-
ccm_additional_data:
|
|
261
|
+
ccm_additional_data: ccmAdditionalData,
|
|
262
262
|
/** @deprecated DEPRECATED(1.8) we still need to pass cf_parameters until 1.8 is deployed to all networks */
|
|
263
|
-
cf_parameters:
|
|
263
|
+
cf_parameters: ccmAdditionalData
|
|
264
264
|
})
|
|
265
265
|
);
|
|
266
266
|
var getDepositAddressRequestSchema = (network) => z.object({
|
|
@@ -563,7 +563,7 @@ var getChainData = (chain2, network, env) => ({
|
|
|
563
563
|
});
|
|
564
564
|
|
|
565
565
|
// package.json
|
|
566
|
-
var version = "1.8.0-beta.
|
|
566
|
+
var version = "1.8.0-beta.2";
|
|
567
567
|
|
|
568
568
|
// src/swap/consts.ts
|
|
569
569
|
var CF_SDK_VERSION_HEADERS = { "X-Chainflip-Sdk-Version": version };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainflip/sdk",
|
|
3
|
-
"version": "1.8.0-beta.
|
|
3
|
+
"version": "1.8.0-beta.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./swap": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@chainflip/bitcoin": "^1.1.1",
|
|
45
|
-
"@chainflip/rpc": "^1.8.
|
|
45
|
+
"@chainflip/rpc": "^1.8.7",
|
|
46
46
|
"@chainflip/solana": "^2.0.1",
|
|
47
47
|
"@chainflip/utils": "^0.5.0",
|
|
48
48
|
"@trpc/client": "^10.45.2",
|