@chainflip/rpc 1.9.1 → 1.9.3

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
@@ -93,12 +93,15 @@ var cfIngressEgressEnvironment = z.object({
93
93
  egress_fees: chainAssetMapFactory(numberOrHex.nullable(), null),
94
94
  witness_safety_margins: chainMapFactory(z.number().nullable(), null),
95
95
  egress_dust_limits: chainAssetMapFactory(numberOrHex, 0),
96
- channel_opening_fees: chainMapFactory(numberOrHex, 0),
97
- max_swap_retry_duration_blocks: chainMapFactory(z.number(), 0)
96
+ channel_opening_fees: chainMapFactory(numberOrHex, 0)
98
97
  }).transform(rename({ egress_dust_limits: "minimum_egress_amounts" }));
99
98
  var cfSwappingEnvironment = z.object({
100
99
  maximum_swap_amounts: chainAssetMapFactory(numberOrHex.nullable(), null),
101
- network_fee_hundredth_pips: z.number()
100
+ network_fee_hundredth_pips: z.number(),
101
+ swap_retry_delay_blocks: z.number().optional(),
102
+ max_swap_retry_duration_blocks: z.number().optional(),
103
+ max_swap_request_duration_blocks: z.number().optional(),
104
+ minimum_chunk_size: chainAssetMapFactory(numberOrHex.nullable(), null).optional()
102
105
  });
103
106
  var cfFundingEnvironment = z.object({
104
107
  redemption_tax: numberOrHex,
@@ -345,6 +348,18 @@ var cfPoolOrderbook = z.object({
345
348
  bids: z.array(z.object({ amount: u256, sqrt_price: u256 })),
346
349
  asks: z.array(z.object({ amount: u256, sqrt_price: u256 }))
347
350
  });
351
+ var cfTradingStrategy = z.object({
352
+ lp_id: z.string(),
353
+ strategy_id: z.string(),
354
+ strategy: z.object({
355
+ TickZeroCentered: z.object({
356
+ spread_tick: z.number(),
357
+ base_asset: rpcAssetSchema
358
+ })
359
+ }),
360
+ balance: z.array(z.tuple([rpcAssetSchema, numberOrHex]))
361
+ });
362
+ var cfGetTradingStrategies = z.array(cfTradingStrategy).default([]);
348
363
  export {
349
364
  broker,
350
365
  brokerRequestSwapDepositAddress,
@@ -358,6 +373,7 @@ export {
358
373
  cfFailedCallEvm,
359
374
  cfFlipSuppy,
360
375
  cfFundingEnvironment,
376
+ cfGetTradingStrategies,
361
377
  cfIngressEgressEnvironment,
362
378
  cfPoolDepth,
363
379
  cfPoolOrderbook,
@@ -369,6 +385,7 @@ export {
369
385
  cfSwapRateV2,
370
386
  cfSwapRateV3,
371
387
  cfSwappingEnvironment,
388
+ cfTradingStrategy,
372
389
  chainGetBlockHash,
373
390
  ethereumAddress,
374
391
  hexString,
package/dist/types.d.cts CHANGED
@@ -28,6 +28,7 @@ type CfSwappingEnvironment = RpcResult<'cf_swapping_environment'>;
28
28
  type CfSwapRate = RpcResult<'cf_swap_rate'>;
29
29
  type CfSwapRateV2 = RpcResult<'cf_swap_rate_v2'>;
30
30
  type CfSwapRateV3 = RpcResult<'cf_swap_rate_v3'>;
31
+ type CfGetTradingStrategies = RpcResult<'cf_get_trading_strategies'>;
31
32
  type CfAccountInfoResponse = RpcResponse<'cf_account_info'>;
32
33
  type CfAccountsResponse = RpcResponse<'cf_accounts'>;
33
34
  type CfAuctionStateResponse = RpcResponse<'cf_auction_state'>;
@@ -51,6 +52,7 @@ type CfSwappingEnvironmentResponse = RpcResponse<'cf_swapping_environment'>;
51
52
  type CfSwapRateResponse = RpcResponse<'cf_swap_rate'>;
52
53
  type CfSwapRateV2Response = RpcResponse<'cf_swap_rate_v2'>;
53
54
  type CfSwapRateV3Response = RpcResponse<'cf_swap_rate_v3'>;
55
+ type CfGetTradingStrategiesResponse = RpcResponse<'cf_get_trading_strategies'>;
54
56
  type CfUnregisteredAccount = z.output<typeof unregistered>;
55
57
  type CfBrokerAccount = z.output<typeof broker>;
56
58
  type CfValidatorAccount = z.output<typeof validator>;
@@ -58,4 +60,4 @@ type CfLiquidityProviderAccount = z.output<typeof liquidityProvider>;
58
60
  type LpTotalBalances = RpcResult<'lp_total_balances'>;
59
61
  type LpTotalBalancesResponse = RpcResponse<'lp_total_balances'>;
60
62
 
61
- export { type CfAccountInfo, type CfAccountInfoResponse, type CfAccounts, type CfAccountsResponse, type CfAuctionState, type CfAuctionStateResponse, type CfBoostPoolDetails, type CfBoostPoolDetailsResponse, type CfBoostPoolPendingFees, type CfBoostPoolPendingFeesResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEnvironment, type CfEnvironmentResponse, type CfFailedCallArbitrum, type CfFailedCallArbitrumResponse, type CfFailedCallEthereum, type CfFailedCallEthereumResponse, type CfFlipSupply, type CfFlipSupplyResponse, type CfFundingEnvironment, type CfFundingEnvironmentResponse, type CfIngressEgressEnvironment, type CfIngressEgressEnvironmentResponse, type CfLiquidityProviderAccount, type CfPoolDepth, type CfPoolDepthResponse, type CfPoolOrderbook, type CfPoolOrderbookResponse, 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, type LpTotalBalances, type LpTotalBalancesResponse, RpcResult };
63
+ export { type CfAccountInfo, type CfAccountInfoResponse, type CfAccounts, type CfAccountsResponse, type CfAuctionState, type CfAuctionStateResponse, type CfBoostPoolDetails, type CfBoostPoolDetailsResponse, type CfBoostPoolPendingFees, type CfBoostPoolPendingFeesResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEnvironment, type CfEnvironmentResponse, type CfFailedCallArbitrum, type CfFailedCallArbitrumResponse, type CfFailedCallEthereum, type CfFailedCallEthereumResponse, type CfFlipSupply, type CfFlipSupplyResponse, type CfFundingEnvironment, type CfFundingEnvironmentResponse, type CfGetTradingStrategies, type CfGetTradingStrategiesResponse, type CfIngressEgressEnvironment, type CfIngressEgressEnvironmentResponse, type CfLiquidityProviderAccount, type CfPoolDepth, type CfPoolDepthResponse, type CfPoolOrderbook, type CfPoolOrderbookResponse, 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, type LpTotalBalances, type LpTotalBalancesResponse, RpcResult };
package/dist/types.d.ts CHANGED
@@ -28,6 +28,7 @@ type CfSwappingEnvironment = RpcResult<'cf_swapping_environment'>;
28
28
  type CfSwapRate = RpcResult<'cf_swap_rate'>;
29
29
  type CfSwapRateV2 = RpcResult<'cf_swap_rate_v2'>;
30
30
  type CfSwapRateV3 = RpcResult<'cf_swap_rate_v3'>;
31
+ type CfGetTradingStrategies = RpcResult<'cf_get_trading_strategies'>;
31
32
  type CfAccountInfoResponse = RpcResponse<'cf_account_info'>;
32
33
  type CfAccountsResponse = RpcResponse<'cf_accounts'>;
33
34
  type CfAuctionStateResponse = RpcResponse<'cf_auction_state'>;
@@ -51,6 +52,7 @@ type CfSwappingEnvironmentResponse = RpcResponse<'cf_swapping_environment'>;
51
52
  type CfSwapRateResponse = RpcResponse<'cf_swap_rate'>;
52
53
  type CfSwapRateV2Response = RpcResponse<'cf_swap_rate_v2'>;
53
54
  type CfSwapRateV3Response = RpcResponse<'cf_swap_rate_v3'>;
55
+ type CfGetTradingStrategiesResponse = RpcResponse<'cf_get_trading_strategies'>;
54
56
  type CfUnregisteredAccount = z.output<typeof unregistered>;
55
57
  type CfBrokerAccount = z.output<typeof broker>;
56
58
  type CfValidatorAccount = z.output<typeof validator>;
@@ -58,4 +60,4 @@ type CfLiquidityProviderAccount = z.output<typeof liquidityProvider>;
58
60
  type LpTotalBalances = RpcResult<'lp_total_balances'>;
59
61
  type LpTotalBalancesResponse = RpcResponse<'lp_total_balances'>;
60
62
 
61
- export { type CfAccountInfo, type CfAccountInfoResponse, type CfAccounts, type CfAccountsResponse, type CfAuctionState, type CfAuctionStateResponse, type CfBoostPoolDetails, type CfBoostPoolDetailsResponse, type CfBoostPoolPendingFees, type CfBoostPoolPendingFeesResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEnvironment, type CfEnvironmentResponse, type CfFailedCallArbitrum, type CfFailedCallArbitrumResponse, type CfFailedCallEthereum, type CfFailedCallEthereumResponse, type CfFlipSupply, type CfFlipSupplyResponse, type CfFundingEnvironment, type CfFundingEnvironmentResponse, type CfIngressEgressEnvironment, type CfIngressEgressEnvironmentResponse, type CfLiquidityProviderAccount, type CfPoolDepth, type CfPoolDepthResponse, type CfPoolOrderbook, type CfPoolOrderbookResponse, 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, type LpTotalBalances, type LpTotalBalancesResponse, RpcResult };
63
+ export { type CfAccountInfo, type CfAccountInfoResponse, type CfAccounts, type CfAccountsResponse, type CfAuctionState, type CfAuctionStateResponse, type CfBoostPoolDetails, type CfBoostPoolDetailsResponse, type CfBoostPoolPendingFees, type CfBoostPoolPendingFeesResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEnvironment, type CfEnvironmentResponse, type CfFailedCallArbitrum, type CfFailedCallArbitrumResponse, type CfFailedCallEthereum, type CfFailedCallEthereumResponse, type CfFlipSupply, type CfFlipSupplyResponse, type CfFundingEnvironment, type CfFundingEnvironmentResponse, type CfGetTradingStrategies, type CfGetTradingStrategiesResponse, type CfIngressEgressEnvironment, type CfIngressEgressEnvironmentResponse, type CfLiquidityProviderAccount, type CfPoolDepth, type CfPoolDepthResponse, type CfPoolOrderbook, type CfPoolOrderbookResponse, 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, type LpTotalBalances, type LpTotalBalancesResponse, RpcResult };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@chainflip/rpc",
3
- "version": "1.9.1",
3
+ "version": "1.9.3",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "@chainflip/utils": "0.7.0",
6
+ "@chainflip/utils": "0.8.2",
7
7
  "zod": "^3.24.2"
8
8
  },
9
9
  "devDependencies": {