@chainflip/rpc 1.8.0 → 1.8.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/parsers.mjs CHANGED
@@ -158,7 +158,7 @@ var evmBrokerRequestSwapParameterEncoding = z.object({
158
158
  calldata: hexString,
159
159
  value: numberOrHex
160
160
  });
161
- var brokerRequestSwapParameterEncoding = z.discriminatedUnion("chain", [
161
+ var requestSwapParameterEncoding = z.discriminatedUnion("chain", [
162
162
  z.object({
163
163
  chain: z.literal("Bitcoin"),
164
164
  nulldata_payload: hexString,
@@ -191,7 +191,7 @@ var broker = z.object({
191
191
  role: z.literal("broker"),
192
192
  flip_balance: numberOrHex,
193
193
  earned_fees: chainAssetMapFactory(numberOrHex, 0),
194
- btc_vault_deposit_address: z.string().nullable()
194
+ btc_vault_deposit_address: z.string().nullable().optional()
195
195
  });
196
196
  var boostBalances = z.array(
197
197
  z.object({
@@ -226,7 +226,12 @@ var validator = z.object({
226
226
  apy_bp: z.number().nullable(),
227
227
  restricted_balances: z.record(hexString, numberOrHex)
228
228
  });
229
- var cfAccountInfo = z.union([unregistered, broker, liquidityProvider, validator]);
229
+ var cfAccountInfo = z.discriminatedUnion("role", [
230
+ unregistered,
231
+ broker,
232
+ liquidityProvider,
233
+ validator
234
+ ]);
230
235
  var cfAccounts = z.array(z.tuple([z.string(), z.string()]));
231
236
  var cfPoolPriceV2 = z.object({
232
237
  sell: numberOrHex.nullable(),
@@ -308,7 +313,6 @@ var cfBoostPoolPendingFees = z.array(
308
313
  export {
309
314
  broker,
310
315
  brokerRequestSwapDepositAddress,
311
- brokerRequestSwapParameterEncoding,
312
316
  cfAccountInfo,
313
317
  cfAccounts,
314
318
  cfBoostPoolDetails,
@@ -330,6 +334,7 @@ export {
330
334
  hexString,
331
335
  liquidityProvider,
332
336
  numberOrHex,
337
+ requestSwapParameterEncoding,
333
338
  rpcResponse,
334
339
  stateGetMetadata,
335
340
  stateGetRuntimeVersion,
package/dist/types.d.cts CHANGED
@@ -22,6 +22,7 @@ type CfSwapRateV2 = RpcResult<'cf_swap_rate_v2'>;
22
22
  type CfSwapRateV3 = RpcResult<'cf_swap_rate_v3'>;
23
23
  type CfPoolDepth = RpcResult<'cf_pool_depth'>;
24
24
  type CfAccounts = RpcResult<'cf_accounts'>;
25
+ type CfRequestSwapParameterEncoding = RpcResult<'cf_request_swap_parameter_encoding'>;
25
26
  type CfAccountInfoResponse = RpcResponse<'cf_account_info'>;
26
27
  type CfBoostPoolDetailsResponse = RpcResponse<'cf_boost_pool_details'>;
27
28
  type CfBoostPoolPendingFeesResponse = RpcResponse<'cf_boost_pool_pending_fees'>;
@@ -39,9 +40,10 @@ type CfSwapRateV2Response = RpcResponse<'cf_swap_rate_v2'>;
39
40
  type CfSwapRateV3Response = RpcResponse<'cf_swap_rate_v3'>;
40
41
  type CfPoolDepthResponse = RpcResponse<'cf_pool_depth'>;
41
42
  type CfAccountsResponse = RpcResponse<'cf_accounts'>;
43
+ type CfRequestSwapParameterEncodingResponse = RpcResponse<'cf_request_swap_parameter_encoding'>;
42
44
  type CfUnregisteredAccount = z.output<typeof unregistered>;
43
45
  type CfBrokerAccount = z.output<typeof broker>;
44
46
  type CfValidatorAccount = z.output<typeof validator>;
45
47
  type CfLiquidityProviderAccount = z.output<typeof liquidityProvider>;
46
48
 
47
- export { type CfAccountInfo, type CfAccountInfoResponse, type CfAccounts, type CfAccountsResponse, type CfBoostPoolDetails, type CfBoostPoolDetailsResponse, type CfBoostPoolPendingFees, type CfBoostPoolPendingFeesResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEnvironment, type CfEnvironmentResponse, type CfFundingEnvironment, type CfFundingEnvironmentResponse, type CfIngressEgressEnvironment, type CfIngressEgressEnvironmentResponse, type CfLiquidityProviderAccount, type CfPoolDepth, type CfPoolDepthResponse, type CfPoolOrders, type CfPoolOrdersResponse, type CfPoolPriceV2, type CfPoolPriceV2Response, type CfPoolsEnvironment, type CfPoolsEnvironmentResponse, type CfSupportedAssets, type CfSupportedAssetsResponse, type CfSwapRate, type CfSwapRateResponse, type CfSwapRateV2, type CfSwapRateV2Response, type CfSwapRateV3, type CfSwapRateV3Response, type CfSwappingEnvironment, type CfSwappingEnvironmentResponse, type CfUnregisteredAccount, type CfValidatorAccount, RpcResult };
49
+ export { type CfAccountInfo, type CfAccountInfoResponse, type CfAccounts, type CfAccountsResponse, type CfBoostPoolDetails, type CfBoostPoolDetailsResponse, type CfBoostPoolPendingFees, type CfBoostPoolPendingFeesResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEnvironment, type CfEnvironmentResponse, type CfFundingEnvironment, type CfFundingEnvironmentResponse, type CfIngressEgressEnvironment, type CfIngressEgressEnvironmentResponse, type CfLiquidityProviderAccount, type CfPoolDepth, type CfPoolDepthResponse, type CfPoolOrders, type CfPoolOrdersResponse, type CfPoolPriceV2, type CfPoolPriceV2Response, type CfPoolsEnvironment, type CfPoolsEnvironmentResponse, type CfRequestSwapParameterEncoding, type CfRequestSwapParameterEncodingResponse, type CfSupportedAssets, type CfSupportedAssetsResponse, type CfSwapRate, type CfSwapRateResponse, type CfSwapRateV2, type CfSwapRateV2Response, type CfSwapRateV3, type CfSwapRateV3Response, type CfSwappingEnvironment, type CfSwappingEnvironmentResponse, type CfUnregisteredAccount, type CfValidatorAccount, RpcResult };
package/dist/types.d.ts CHANGED
@@ -22,6 +22,7 @@ type CfSwapRateV2 = RpcResult<'cf_swap_rate_v2'>;
22
22
  type CfSwapRateV3 = RpcResult<'cf_swap_rate_v3'>;
23
23
  type CfPoolDepth = RpcResult<'cf_pool_depth'>;
24
24
  type CfAccounts = RpcResult<'cf_accounts'>;
25
+ type CfRequestSwapParameterEncoding = RpcResult<'cf_request_swap_parameter_encoding'>;
25
26
  type CfAccountInfoResponse = RpcResponse<'cf_account_info'>;
26
27
  type CfBoostPoolDetailsResponse = RpcResponse<'cf_boost_pool_details'>;
27
28
  type CfBoostPoolPendingFeesResponse = RpcResponse<'cf_boost_pool_pending_fees'>;
@@ -39,9 +40,10 @@ type CfSwapRateV2Response = RpcResponse<'cf_swap_rate_v2'>;
39
40
  type CfSwapRateV3Response = RpcResponse<'cf_swap_rate_v3'>;
40
41
  type CfPoolDepthResponse = RpcResponse<'cf_pool_depth'>;
41
42
  type CfAccountsResponse = RpcResponse<'cf_accounts'>;
43
+ type CfRequestSwapParameterEncodingResponse = RpcResponse<'cf_request_swap_parameter_encoding'>;
42
44
  type CfUnregisteredAccount = z.output<typeof unregistered>;
43
45
  type CfBrokerAccount = z.output<typeof broker>;
44
46
  type CfValidatorAccount = z.output<typeof validator>;
45
47
  type CfLiquidityProviderAccount = z.output<typeof liquidityProvider>;
46
48
 
47
- export { type CfAccountInfo, type CfAccountInfoResponse, type CfAccounts, type CfAccountsResponse, type CfBoostPoolDetails, type CfBoostPoolDetailsResponse, type CfBoostPoolPendingFees, type CfBoostPoolPendingFeesResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEnvironment, type CfEnvironmentResponse, type CfFundingEnvironment, type CfFundingEnvironmentResponse, type CfIngressEgressEnvironment, type CfIngressEgressEnvironmentResponse, type CfLiquidityProviderAccount, type CfPoolDepth, type CfPoolDepthResponse, type CfPoolOrders, type CfPoolOrdersResponse, type CfPoolPriceV2, type CfPoolPriceV2Response, type CfPoolsEnvironment, type CfPoolsEnvironmentResponse, type CfSupportedAssets, type CfSupportedAssetsResponse, type CfSwapRate, type CfSwapRateResponse, type CfSwapRateV2, type CfSwapRateV2Response, type CfSwapRateV3, type CfSwapRateV3Response, type CfSwappingEnvironment, type CfSwappingEnvironmentResponse, type CfUnregisteredAccount, type CfValidatorAccount, RpcResult };
49
+ export { type CfAccountInfo, type CfAccountInfoResponse, type CfAccounts, type CfAccountsResponse, type CfBoostPoolDetails, type CfBoostPoolDetailsResponse, type CfBoostPoolPendingFees, type CfBoostPoolPendingFeesResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEnvironment, type CfEnvironmentResponse, type CfFundingEnvironment, type CfFundingEnvironmentResponse, type CfIngressEgressEnvironment, type CfIngressEgressEnvironmentResponse, type CfLiquidityProviderAccount, type CfPoolDepth, type CfPoolDepthResponse, type CfPoolOrders, type CfPoolOrdersResponse, type CfPoolPriceV2, type CfPoolPriceV2Response, type CfPoolsEnvironment, type CfPoolsEnvironmentResponse, type CfRequestSwapParameterEncoding, type CfRequestSwapParameterEncodingResponse, type CfSupportedAssets, type CfSupportedAssetsResponse, type CfSwapRate, type CfSwapRateResponse, type CfSwapRateV2, type CfSwapRateV2Response, type CfSwapRateV3, type CfSwapRateV3Response, type CfSwappingEnvironment, type CfSwappingEnvironmentResponse, type CfUnregisteredAccount, type CfValidatorAccount, RpcResult };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@chainflip/rpc",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@chainflip/utils": "0.4.0",
7
7
  "zod": "^3.24.1"
8
8
  },
9
9
  "devDependencies": {
10
- "@types/node": "^22.13.0",
10
+ "@types/node": "^22.13.1",
11
11
  "@types/ws": "^8.5.14",
12
12
  "ws": "^8.18.0"
13
13
  },