@chainflip/sdk 1.6.0-alpha.0 → 1.6.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.
@@ -1,4 +1,4 @@
1
- import { z, assetAndChain, numericString, hexString, btcAddress, solanaAddress, ccmParamsSchema, affiliateBroker, fillOrKillParams, dotAddress, ethereumAddress } from './chunk-WBBIC5T3.mjs';
1
+ import { z, assetAndChain, numericString, hexString, btcAddress, solanaAddress, ccmParamsSchema, affiliateBroker, fillOrKillParams, dcaParams, dotAddress, ethereumAddress } from './chunk-NKAH7KWJ.mjs';
2
2
  import { __name, Chains } from './chunk-EBZERIHA.mjs';
3
3
  import { HttpClient } from '@chainflip/rpc';
4
4
  import * as ss58 from '@chainflip/utils/ss58';
@@ -30,6 +30,10 @@ var validateRequest = /* @__PURE__ */ __name((network, params) => z.tuple([
30
30
  retry_duration: retryDurationBlocks,
31
31
  refund_address: refundAddress,
32
32
  min_price: `0x${BigInt(minPriceX128).toString(16)}`
33
+ })).optional(),
34
+ dcaParams.transform(({ numberOfChunks, chunkInterval }) => ({
35
+ number_of_chunks: numberOfChunks,
36
+ chunk_interval: chunkInterval
33
37
  })).optional()
34
38
  ]).parse(params), "validateRequest");
35
39
  var validateResponse = /* @__PURE__ */ __name((network, response) => z.object({
@@ -70,6 +74,9 @@ async function requestSwapDepositAddress(swapRequest, opts, chainflipNetwork) {
70
74
  swapRequest.fillOrKillParams && {
71
75
  ...swapRequest.fillOrKillParams,
72
76
  refundAddress: submitAddress(srcChain, swapRequest.fillOrKillParams.refundAddress)
77
+ },
78
+ swapRequest.dcaParams && {
79
+ ...swapRequest.dcaParams
73
80
  }
74
81
  ]);
75
82
  const response = await client.sendRequest("broker_requestSwapDepositAddress", ...params);