@chainflip/rpc 1.11.15 → 2.0.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/common.cjs CHANGED
@@ -40,12 +40,14 @@ var _zod = require('zod');
40
40
 
41
41
 
42
42
 
43
+
43
44
 
44
45
 
45
46
  var _parserscjs = require('./parsers.cjs');
46
47
 
47
48
  var rpcResult = {
48
49
  broker_request_swap_deposit_address: _parserscjs.brokerRequestSwapDepositAddress,
50
+ broker_request_account_creation_deposit_address: _parserscjs.brokerRequestAccountCreationDepositAddress,
49
51
  broker_request_swap_parameter_encoding: _parserscjs.requestSwapParameterEncoding,
50
52
  cf_request_swap_parameter_encoding: _parserscjs.requestSwapParameterEncoding,
51
53
  cf_accounts: _parserscjs.cfAccounts,
package/dist/common.d.cts CHANGED
@@ -94,6 +94,22 @@ type RpcRequest = WithHash<{
94
94
  fillOrKillParams: FillOrKillParams,
95
95
  dcaParams?: Nullish<DcaParams>
96
96
  ];
97
+ broker_request_account_creation_deposit_address: [
98
+ signatureData: {
99
+ Ethereum: {
100
+ signature: HexString;
101
+ signer: HexString;
102
+ sig_type: 'Eip712';
103
+ };
104
+ },
105
+ transactionMetadata: {
106
+ nonce: number;
107
+ expiry_block: number;
108
+ },
109
+ asset: UncheckedAssetAndChain,
110
+ boostFee: Nullish<number>,
111
+ refundAddress: string
112
+ ];
97
113
  broker_request_swap_parameter_encoding: RequestSwapParameterEncodingParams;
98
114
  cf_request_swap_parameter_encoding: [
99
115
  brokerAccountId: string,
@@ -220,6 +236,31 @@ declare const rpcResult: {
220
236
  source_chain_expiry_block: string | number;
221
237
  channel_opening_fee: string;
222
238
  }>;
239
+ readonly broker_request_account_creation_deposit_address: z.ZodObject<{
240
+ issued_block: z.ZodNumber;
241
+ channel_id: z.ZodNumber;
242
+ address: z.ZodString;
243
+ requested_for: z.ZodEffects<z.ZodString, `cF${string}`, string>;
244
+ deposit_chain_expiry_block: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
245
+ channel_opening_fee: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>;
246
+ refund_address: z.ZodString;
247
+ }, "strip", z.ZodTypeAny, {
248
+ address: string;
249
+ issued_block: number;
250
+ channel_id: number;
251
+ channel_opening_fee: bigint;
252
+ requested_for: `cF${string}`;
253
+ deposit_chain_expiry_block: bigint;
254
+ refund_address: string;
255
+ }, {
256
+ address: string;
257
+ issued_block: number;
258
+ channel_id: number;
259
+ channel_opening_fee: string;
260
+ requested_for: string;
261
+ deposit_chain_expiry_block: string | number;
262
+ refund_address: string;
263
+ }>;
223
264
  readonly broker_request_swap_parameter_encoding: z.ZodDiscriminatedUnion<"chain", [z.ZodObject<{
224
265
  chain: z.ZodLiteral<"Bitcoin">;
225
266
  nulldata_payload: z.ZodEffects<z.ZodString, `0x${string}`, string>;
package/dist/common.d.ts CHANGED
@@ -94,6 +94,22 @@ type RpcRequest = WithHash<{
94
94
  fillOrKillParams: FillOrKillParams,
95
95
  dcaParams?: Nullish<DcaParams>
96
96
  ];
97
+ broker_request_account_creation_deposit_address: [
98
+ signatureData: {
99
+ Ethereum: {
100
+ signature: HexString;
101
+ signer: HexString;
102
+ sig_type: 'Eip712';
103
+ };
104
+ },
105
+ transactionMetadata: {
106
+ nonce: number;
107
+ expiry_block: number;
108
+ },
109
+ asset: UncheckedAssetAndChain,
110
+ boostFee: Nullish<number>,
111
+ refundAddress: string
112
+ ];
97
113
  broker_request_swap_parameter_encoding: RequestSwapParameterEncodingParams;
98
114
  cf_request_swap_parameter_encoding: [
99
115
  brokerAccountId: string,
@@ -220,6 +236,31 @@ declare const rpcResult: {
220
236
  source_chain_expiry_block: string | number;
221
237
  channel_opening_fee: string;
222
238
  }>;
239
+ readonly broker_request_account_creation_deposit_address: z.ZodObject<{
240
+ issued_block: z.ZodNumber;
241
+ channel_id: z.ZodNumber;
242
+ address: z.ZodString;
243
+ requested_for: z.ZodEffects<z.ZodString, `cF${string}`, string>;
244
+ deposit_chain_expiry_block: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
245
+ channel_opening_fee: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>;
246
+ refund_address: z.ZodString;
247
+ }, "strip", z.ZodTypeAny, {
248
+ address: string;
249
+ issued_block: number;
250
+ channel_id: number;
251
+ channel_opening_fee: bigint;
252
+ requested_for: `cF${string}`;
253
+ deposit_chain_expiry_block: bigint;
254
+ refund_address: string;
255
+ }, {
256
+ address: string;
257
+ issued_block: number;
258
+ channel_id: number;
259
+ channel_opening_fee: string;
260
+ requested_for: string;
261
+ deposit_chain_expiry_block: string | number;
262
+ refund_address: string;
263
+ }>;
223
264
  readonly broker_request_swap_parameter_encoding: z.ZodDiscriminatedUnion<"chain", [z.ZodObject<{
224
265
  chain: z.ZodLiteral<"Bitcoin">;
225
266
  nulldata_payload: z.ZodEffects<z.ZodString, `0x${string}`, string>;
package/dist/common.mjs CHANGED
@@ -41,11 +41,13 @@ import {
41
41
  cfLoanAccounts,
42
42
  cfMonitoringSimulateAuction,
43
43
  cfVaultAddresses,
44
- cfLendingPoolSupplyBalances
44
+ cfLendingPoolSupplyBalances,
45
+ brokerRequestAccountCreationDepositAddress
45
46
  } from "./parsers.mjs";
46
47
  import { rpcResponse } from "./parsers.mjs";
47
48
  var rpcResult = {
48
49
  broker_request_swap_deposit_address: brokerRequestSwapDepositAddress,
50
+ broker_request_account_creation_deposit_address: brokerRequestAccountCreationDepositAddress,
49
51
  broker_request_swap_parameter_encoding: requestSwapParameterEncoding,
50
52
  cf_request_swap_parameter_encoding: requestSwapParameterEncoding,
51
53
  cf_accounts: cfAccounts,
package/dist/parsers.cjs CHANGED
@@ -4,6 +4,7 @@ var _chainflip = require('@chainflip/utils/chainflip');
4
4
  var _guard = require('@chainflip/utils/guard');
5
5
  var _string = require('@chainflip/utils/string');
6
6
  var _zod = require('zod');
7
+ var accountId = _zod.z.string().refine((val) => val.startsWith("cF"));
7
8
  var hexString = _zod.z.string().refine(_string.isHex, { message: "Invalid hex string" });
8
9
  var u256 = hexString.transform((value) => BigInt(value));
9
10
  var numericString = _zod.z.string().regex(/^[0-9]+$/);
@@ -180,6 +181,15 @@ var brokerRequestSwapDepositAddress = _zod.z.object({
180
181
  source_chain_expiry_block: numberOrHex,
181
182
  channel_opening_fee: u256
182
183
  });
184
+ var brokerRequestAccountCreationDepositAddress = _zod.z.object({
185
+ issued_block: _zod.z.number(),
186
+ channel_id: _zod.z.number(),
187
+ address: _zod.z.string(),
188
+ requested_for: accountId,
189
+ deposit_chain_expiry_block: numberOrHex,
190
+ channel_opening_fee: u256,
191
+ refund_address: _zod.z.string()
192
+ });
183
193
  var evmBrokerRequestSwapParameterEncoding = _zod.z.object({
184
194
  to: hexString,
185
195
  calldata: hexString,
@@ -211,7 +221,6 @@ var requestSwapParameterEncoding = _zod.z.discriminatedUnion("chain", [
211
221
  )
212
222
  })
213
223
  ]);
214
- var accountId = _zod.z.string().refine((val) => val.startsWith("cF"));
215
224
  var delegationStatus = _zod.z.object({
216
225
  operator: accountId,
217
226
  bid: numberOrHex
@@ -763,4 +772,5 @@ var cfVaultAddresses = _zod.z.object({
763
772
 
764
773
 
765
774
 
766
- exports.accountInfoCommon = accountInfoCommon; exports.broker = broker; exports.brokerRequestSwapDepositAddress = brokerRequestSwapDepositAddress; exports.cfAccountInfo = cfAccountInfo; exports.cfAccounts = cfAccounts; exports.cfAuctionState = cfAuctionState; exports.cfAvailablePools = cfAvailablePools; exports.cfBoostPoolDetails = cfBoostPoolDetails; exports.cfBoostPoolPendingFees = cfBoostPoolPendingFees; exports.cfBoostPoolsDepth = cfBoostPoolsDepth; exports.cfEnvironment = cfEnvironment; exports.cfFailedCallEvm = cfFailedCallEvm; exports.cfFlipSuppy = cfFlipSuppy; exports.cfFundingEnvironment = cfFundingEnvironment; exports.cfGetTradingStrategies = cfGetTradingStrategies; exports.cfGetTradingStrategyLimits = cfGetTradingStrategyLimits; exports.cfIngressEgressEnvironment = cfIngressEgressEnvironment; exports.cfLendingConfig = cfLendingConfig; exports.cfLendingPoolSupplyBalances = cfLendingPoolSupplyBalances; exports.cfLendingPools = cfLendingPools; exports.cfLoanAccount = cfLoanAccount; exports.cfLoanAccounts = cfLoanAccounts; exports.cfMonitoringSimulateAuction = cfMonitoringSimulateAuction; exports.cfOraclePrices = cfOraclePrices; exports.cfPoolDepth = cfPoolDepth; exports.cfPoolOrderbook = cfPoolOrderbook; exports.cfPoolOrders = cfPoolOrders; exports.cfPoolPriceV2 = cfPoolPriceV2; exports.cfPoolsEnvironment = cfPoolsEnvironment; exports.cfSafeModeStatuses = cfSafeModeStatuses; exports.cfSupportedAssets = cfSupportedAssets; exports.cfSwapRate = cfSwapRate; exports.cfSwapRateV2 = cfSwapRateV2; exports.cfSwapRateV3 = cfSwapRateV3; exports.cfSwappingEnvironment = cfSwappingEnvironment; exports.cfTradingStrategy = cfTradingStrategy; exports.cfVaultAddresses = cfVaultAddresses; exports.chainGetBlockHash = chainGetBlockHash; exports.ethereumAddress = ethereumAddress; exports.hexString = hexString; exports.liquidityProvider = liquidityProvider; exports.lpTotalBalances = lpTotalBalances; exports.numberOrHex = numberOrHex; exports.numericString = numericString; exports.operator = operator; exports.requestSwapParameterEncoding = requestSwapParameterEncoding; exports.rpcResponse = rpcResponse; exports.stateGetMetadata = stateGetMetadata; exports.stateGetRuntimeVersion = stateGetRuntimeVersion; exports.u256 = u256; exports.unregistered = unregistered; exports.validator = validator;
775
+
776
+ exports.accountInfoCommon = accountInfoCommon; exports.broker = broker; exports.brokerRequestAccountCreationDepositAddress = brokerRequestAccountCreationDepositAddress; exports.brokerRequestSwapDepositAddress = brokerRequestSwapDepositAddress; exports.cfAccountInfo = cfAccountInfo; exports.cfAccounts = cfAccounts; exports.cfAuctionState = cfAuctionState; exports.cfAvailablePools = cfAvailablePools; exports.cfBoostPoolDetails = cfBoostPoolDetails; exports.cfBoostPoolPendingFees = cfBoostPoolPendingFees; exports.cfBoostPoolsDepth = cfBoostPoolsDepth; exports.cfEnvironment = cfEnvironment; exports.cfFailedCallEvm = cfFailedCallEvm; exports.cfFlipSuppy = cfFlipSuppy; exports.cfFundingEnvironment = cfFundingEnvironment; exports.cfGetTradingStrategies = cfGetTradingStrategies; exports.cfGetTradingStrategyLimits = cfGetTradingStrategyLimits; exports.cfIngressEgressEnvironment = cfIngressEgressEnvironment; exports.cfLendingConfig = cfLendingConfig; exports.cfLendingPoolSupplyBalances = cfLendingPoolSupplyBalances; exports.cfLendingPools = cfLendingPools; exports.cfLoanAccount = cfLoanAccount; exports.cfLoanAccounts = cfLoanAccounts; exports.cfMonitoringSimulateAuction = cfMonitoringSimulateAuction; exports.cfOraclePrices = cfOraclePrices; exports.cfPoolDepth = cfPoolDepth; exports.cfPoolOrderbook = cfPoolOrderbook; exports.cfPoolOrders = cfPoolOrders; exports.cfPoolPriceV2 = cfPoolPriceV2; exports.cfPoolsEnvironment = cfPoolsEnvironment; exports.cfSafeModeStatuses = cfSafeModeStatuses; exports.cfSupportedAssets = cfSupportedAssets; exports.cfSwapRate = cfSwapRate; exports.cfSwapRateV2 = cfSwapRateV2; exports.cfSwapRateV3 = cfSwapRateV3; exports.cfSwappingEnvironment = cfSwappingEnvironment; exports.cfTradingStrategy = cfTradingStrategy; exports.cfVaultAddresses = cfVaultAddresses; exports.chainGetBlockHash = chainGetBlockHash; exports.ethereumAddress = ethereumAddress; exports.hexString = hexString; exports.liquidityProvider = liquidityProvider; exports.lpTotalBalances = lpTotalBalances; exports.numberOrHex = numberOrHex; exports.numericString = numericString; exports.operator = operator; exports.requestSwapParameterEncoding = requestSwapParameterEncoding; exports.rpcResponse = rpcResponse; exports.stateGetMetadata = stateGetMetadata; exports.stateGetRuntimeVersion = stateGetRuntimeVersion; exports.u256 = u256; exports.unregistered = unregistered; exports.validator = validator;
@@ -16337,6 +16337,31 @@ declare const brokerRequestSwapDepositAddress: z.ZodObject<{
16337
16337
  source_chain_expiry_block: string | number;
16338
16338
  channel_opening_fee: string;
16339
16339
  }>;
16340
+ declare const brokerRequestAccountCreationDepositAddress: z.ZodObject<{
16341
+ issued_block: z.ZodNumber;
16342
+ channel_id: z.ZodNumber;
16343
+ address: z.ZodString;
16344
+ requested_for: z.ZodEffects<z.ZodString, `cF${string}`, string>;
16345
+ deposit_chain_expiry_block: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
16346
+ channel_opening_fee: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>;
16347
+ refund_address: z.ZodString;
16348
+ }, "strip", z.ZodTypeAny, {
16349
+ address: string;
16350
+ issued_block: number;
16351
+ channel_id: number;
16352
+ channel_opening_fee: bigint;
16353
+ requested_for: `cF${string}`;
16354
+ deposit_chain_expiry_block: bigint;
16355
+ refund_address: string;
16356
+ }, {
16357
+ address: string;
16358
+ issued_block: number;
16359
+ channel_id: number;
16360
+ channel_opening_fee: string;
16361
+ requested_for: string;
16362
+ deposit_chain_expiry_block: string | number;
16363
+ refund_address: string;
16364
+ }>;
16340
16365
  declare const requestSwapParameterEncoding: z.ZodDiscriminatedUnion<"chain", [z.ZodObject<{
16341
16366
  chain: z.ZodLiteral<"Bitcoin">;
16342
16367
  nulldata_payload: z.ZodEffects<z.ZodString, `0x${string}`, string>;
@@ -31976,4 +32001,4 @@ declare const cfVaultAddresses: z.ZodEffects<z.ZodEffects<z.ZodObject<{
31976
32001
  }][];
31977
32002
  }>;
31978
32003
 
31979
- export { type AssetAndChain, type RpcLimitOrder, type RpcRangeOrder, accountInfoCommon, broker, brokerRequestSwapDepositAddress, cfAccountInfo, cfAccounts, cfAuctionState, cfAvailablePools, cfBoostPoolDetails, cfBoostPoolPendingFees, cfBoostPoolsDepth, cfEnvironment, cfFailedCallEvm, cfFlipSuppy, cfFundingEnvironment, cfGetTradingStrategies, cfGetTradingStrategyLimits, cfIngressEgressEnvironment, cfLendingConfig, cfLendingPoolSupplyBalances, cfLendingPools, cfLoanAccount, cfLoanAccounts, cfMonitoringSimulateAuction, cfOraclePrices, cfPoolDepth, cfPoolOrderbook, cfPoolOrders, cfPoolPriceV2, cfPoolsEnvironment, cfSafeModeStatuses, cfSupportedAssets, cfSwapRate, cfSwapRateV2, cfSwapRateV3, cfSwappingEnvironment, cfTradingStrategy, cfVaultAddresses, chainGetBlockHash, ethereumAddress, hexString, liquidityProvider, lpTotalBalances, numberOrHex, numericString, operator, requestSwapParameterEncoding, rpcResponse, stateGetMetadata, stateGetRuntimeVersion, u256, unregistered, validator };
32004
+ export { type AssetAndChain, type RpcLimitOrder, type RpcRangeOrder, accountInfoCommon, broker, brokerRequestAccountCreationDepositAddress, brokerRequestSwapDepositAddress, cfAccountInfo, cfAccounts, cfAuctionState, cfAvailablePools, cfBoostPoolDetails, cfBoostPoolPendingFees, cfBoostPoolsDepth, cfEnvironment, cfFailedCallEvm, cfFlipSuppy, cfFundingEnvironment, cfGetTradingStrategies, cfGetTradingStrategyLimits, cfIngressEgressEnvironment, cfLendingConfig, cfLendingPoolSupplyBalances, cfLendingPools, cfLoanAccount, cfLoanAccounts, cfMonitoringSimulateAuction, cfOraclePrices, cfPoolDepth, cfPoolOrderbook, cfPoolOrders, cfPoolPriceV2, cfPoolsEnvironment, cfSafeModeStatuses, cfSupportedAssets, cfSwapRate, cfSwapRateV2, cfSwapRateV3, cfSwappingEnvironment, cfTradingStrategy, cfVaultAddresses, chainGetBlockHash, ethereumAddress, hexString, liquidityProvider, lpTotalBalances, numberOrHex, numericString, operator, requestSwapParameterEncoding, rpcResponse, stateGetMetadata, stateGetRuntimeVersion, u256, unregistered, validator };
package/dist/parsers.d.ts CHANGED
@@ -16337,6 +16337,31 @@ declare const brokerRequestSwapDepositAddress: z.ZodObject<{
16337
16337
  source_chain_expiry_block: string | number;
16338
16338
  channel_opening_fee: string;
16339
16339
  }>;
16340
+ declare const brokerRequestAccountCreationDepositAddress: z.ZodObject<{
16341
+ issued_block: z.ZodNumber;
16342
+ channel_id: z.ZodNumber;
16343
+ address: z.ZodString;
16344
+ requested_for: z.ZodEffects<z.ZodString, `cF${string}`, string>;
16345
+ deposit_chain_expiry_block: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
16346
+ channel_opening_fee: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>;
16347
+ refund_address: z.ZodString;
16348
+ }, "strip", z.ZodTypeAny, {
16349
+ address: string;
16350
+ issued_block: number;
16351
+ channel_id: number;
16352
+ channel_opening_fee: bigint;
16353
+ requested_for: `cF${string}`;
16354
+ deposit_chain_expiry_block: bigint;
16355
+ refund_address: string;
16356
+ }, {
16357
+ address: string;
16358
+ issued_block: number;
16359
+ channel_id: number;
16360
+ channel_opening_fee: string;
16361
+ requested_for: string;
16362
+ deposit_chain_expiry_block: string | number;
16363
+ refund_address: string;
16364
+ }>;
16340
16365
  declare const requestSwapParameterEncoding: z.ZodDiscriminatedUnion<"chain", [z.ZodObject<{
16341
16366
  chain: z.ZodLiteral<"Bitcoin">;
16342
16367
  nulldata_payload: z.ZodEffects<z.ZodString, `0x${string}`, string>;
@@ -31976,4 +32001,4 @@ declare const cfVaultAddresses: z.ZodEffects<z.ZodEffects<z.ZodObject<{
31976
32001
  }][];
31977
32002
  }>;
31978
32003
 
31979
- export { type AssetAndChain, type RpcLimitOrder, type RpcRangeOrder, accountInfoCommon, broker, brokerRequestSwapDepositAddress, cfAccountInfo, cfAccounts, cfAuctionState, cfAvailablePools, cfBoostPoolDetails, cfBoostPoolPendingFees, cfBoostPoolsDepth, cfEnvironment, cfFailedCallEvm, cfFlipSuppy, cfFundingEnvironment, cfGetTradingStrategies, cfGetTradingStrategyLimits, cfIngressEgressEnvironment, cfLendingConfig, cfLendingPoolSupplyBalances, cfLendingPools, cfLoanAccount, cfLoanAccounts, cfMonitoringSimulateAuction, cfOraclePrices, cfPoolDepth, cfPoolOrderbook, cfPoolOrders, cfPoolPriceV2, cfPoolsEnvironment, cfSafeModeStatuses, cfSupportedAssets, cfSwapRate, cfSwapRateV2, cfSwapRateV3, cfSwappingEnvironment, cfTradingStrategy, cfVaultAddresses, chainGetBlockHash, ethereumAddress, hexString, liquidityProvider, lpTotalBalances, numberOrHex, numericString, operator, requestSwapParameterEncoding, rpcResponse, stateGetMetadata, stateGetRuntimeVersion, u256, unregistered, validator };
32004
+ export { type AssetAndChain, type RpcLimitOrder, type RpcRangeOrder, accountInfoCommon, broker, brokerRequestAccountCreationDepositAddress, brokerRequestSwapDepositAddress, cfAccountInfo, cfAccounts, cfAuctionState, cfAvailablePools, cfBoostPoolDetails, cfBoostPoolPendingFees, cfBoostPoolsDepth, cfEnvironment, cfFailedCallEvm, cfFlipSuppy, cfFundingEnvironment, cfGetTradingStrategies, cfGetTradingStrategyLimits, cfIngressEgressEnvironment, cfLendingConfig, cfLendingPoolSupplyBalances, cfLendingPools, cfLoanAccount, cfLoanAccounts, cfMonitoringSimulateAuction, cfOraclePrices, cfPoolDepth, cfPoolOrderbook, cfPoolOrders, cfPoolPriceV2, cfPoolsEnvironment, cfSafeModeStatuses, cfSupportedAssets, cfSwapRate, cfSwapRateV2, cfSwapRateV3, cfSwappingEnvironment, cfTradingStrategy, cfVaultAddresses, chainGetBlockHash, ethereumAddress, hexString, liquidityProvider, lpTotalBalances, numberOrHex, numericString, operator, requestSwapParameterEncoding, rpcResponse, stateGetMetadata, stateGetRuntimeVersion, u256, unregistered, validator };
package/dist/parsers.mjs CHANGED
@@ -4,6 +4,7 @@ import { priceAssets } from "@chainflip/utils/chainflip";
4
4
  import { isUndefined } from "@chainflip/utils/guard";
5
5
  import { isHex } from "@chainflip/utils/string";
6
6
  import { z } from "zod";
7
+ var accountId = z.string().refine((val) => val.startsWith("cF"));
7
8
  var hexString = z.string().refine(isHex, { message: "Invalid hex string" });
8
9
  var u256 = hexString.transform((value) => BigInt(value));
9
10
  var numericString = z.string().regex(/^[0-9]+$/);
@@ -180,6 +181,15 @@ var brokerRequestSwapDepositAddress = z.object({
180
181
  source_chain_expiry_block: numberOrHex,
181
182
  channel_opening_fee: u256
182
183
  });
184
+ var brokerRequestAccountCreationDepositAddress = z.object({
185
+ issued_block: z.number(),
186
+ channel_id: z.number(),
187
+ address: z.string(),
188
+ requested_for: accountId,
189
+ deposit_chain_expiry_block: numberOrHex,
190
+ channel_opening_fee: u256,
191
+ refund_address: z.string()
192
+ });
183
193
  var evmBrokerRequestSwapParameterEncoding = z.object({
184
194
  to: hexString,
185
195
  calldata: hexString,
@@ -211,7 +221,6 @@ var requestSwapParameterEncoding = z.discriminatedUnion("chain", [
211
221
  )
212
222
  })
213
223
  ]);
214
- var accountId = z.string().refine((val) => val.startsWith("cF"));
215
224
  var delegationStatus = z.object({
216
225
  operator: accountId,
217
226
  bid: numberOrHex
@@ -713,6 +722,7 @@ var cfVaultAddresses = z.object({
713
722
  export {
714
723
  accountInfoCommon,
715
724
  broker,
725
+ brokerRequestAccountCreationDepositAddress,
716
726
  brokerRequestSwapDepositAddress,
717
727
  cfAccountInfo,
718
728
  cfAccounts,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainflip/rpc",
3
- "version": "1.11.15",
3
+ "version": "2.0.1",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@chainflip/utils": "0.11.0",