@chainflip/rpc 2.1.4 → 2.1.5
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/Client.cjs +33 -13
- package/dist/Client.d.cts +3 -0
- package/dist/Client.d.mts +3 -0
- package/dist/Client.mjs +33 -13
- package/dist/common.cjs +2 -1
- package/dist/common.d.cts +342 -0
- package/dist/common.d.mts +342 -0
- package/dist/common.mjs +3 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/parsers.cjs +61 -0
- package/dist/parsers.d.cts +342 -1
- package/dist/parsers.d.mts +342 -1
- package/dist/parsers.mjs +61 -1
- package/dist/types.d.cts +3 -1
- package/dist/types.d.mts +3 -1
- package/package.json +3 -3
package/dist/parsers.mjs
CHANGED
|
@@ -741,6 +741,66 @@ const cfLendingPoolSupplyBalances = z.array(z.intersection(rpcAssetSchema, z.obj
|
|
|
741
741
|
lp_id: accountId,
|
|
742
742
|
total_amount: numberOrHex
|
|
743
743
|
})) })));
|
|
744
|
+
const ingressEgressDeposit = z.object({
|
|
745
|
+
deposit_chain_block_height: z.number(),
|
|
746
|
+
deposit_address: z.string(),
|
|
747
|
+
amount: z.string(),
|
|
748
|
+
asset: z.object({
|
|
749
|
+
chain: z.string(),
|
|
750
|
+
asset: z.string()
|
|
751
|
+
}),
|
|
752
|
+
deposit_details: z.union([z.object({ tx_hashes: z.array(z.string()) }), z.object({
|
|
753
|
+
tx_id: z.string(),
|
|
754
|
+
vout: z.number()
|
|
755
|
+
})]).nullable()
|
|
756
|
+
});
|
|
757
|
+
const ingressEgressBroadcast = z.object({
|
|
758
|
+
broadcast_id: z.number(),
|
|
759
|
+
broadcast_chain_block_height: z.number(),
|
|
760
|
+
tx_out_id: z.unknown(),
|
|
761
|
+
tx_ref: z.unknown()
|
|
762
|
+
});
|
|
763
|
+
const ingressEgressVaultDeposit = z.object({
|
|
764
|
+
tx_id: z.string(),
|
|
765
|
+
deposit_chain_block_height: z.number().nullable().optional(),
|
|
766
|
+
input_asset: z.object({
|
|
767
|
+
chain: z.string(),
|
|
768
|
+
asset: z.string()
|
|
769
|
+
}),
|
|
770
|
+
output_asset: z.object({
|
|
771
|
+
chain: z.string(),
|
|
772
|
+
asset: z.string()
|
|
773
|
+
}),
|
|
774
|
+
amount: z.string(),
|
|
775
|
+
destination_address: z.string(),
|
|
776
|
+
ccm_deposit_metadata: z.unknown().nullable().optional(),
|
|
777
|
+
deposit_details: z.unknown().nullable().optional(),
|
|
778
|
+
broker_fee: z.object({
|
|
779
|
+
account: z.string(),
|
|
780
|
+
bps: z.number()
|
|
781
|
+
}).nullable().optional(),
|
|
782
|
+
affiliate_fees: z.array(z.object({
|
|
783
|
+
account: z.string(),
|
|
784
|
+
bps: z.number()
|
|
785
|
+
})),
|
|
786
|
+
refund_params: z.object({
|
|
787
|
+
retry_duration: z.number(),
|
|
788
|
+
refund_address: z.string(),
|
|
789
|
+
min_price: z.string(),
|
|
790
|
+
refund_ccm_metadata: z.unknown().nullable().optional(),
|
|
791
|
+
max_oracle_price_slippage: z.unknown().nullable().optional()
|
|
792
|
+
}).nullable().optional(),
|
|
793
|
+
dca_params: z.object({
|
|
794
|
+
number_of_chunks: z.number(),
|
|
795
|
+
chunk_interval: z.number()
|
|
796
|
+
}).nullable().optional(),
|
|
797
|
+
max_boost_fee: z.number().optional()
|
|
798
|
+
});
|
|
799
|
+
const cfIngressEgressEvents = z.object({
|
|
800
|
+
deposits: z.array(ingressEgressDeposit),
|
|
801
|
+
broadcasts: z.array(ingressEgressBroadcast),
|
|
802
|
+
vault_deposits: z.array(ingressEgressVaultDeposit)
|
|
803
|
+
});
|
|
744
804
|
const cfVaultAddresses = z.object({
|
|
745
805
|
ethereum: z.object({ Eth: z.array(z.number()).length(20).transform(bytesToHex) }),
|
|
746
806
|
arbitrum: z.object({ Arb: z.array(z.number()).length(20).transform(bytesToHex) }),
|
|
@@ -755,4 +815,4 @@ const cfVaultAddresses = z.object({
|
|
|
755
815
|
});
|
|
756
816
|
|
|
757
817
|
//#endregion
|
|
758
|
-
export { 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 };
|
|
818
|
+
export { accountInfoCommon, broker, brokerRequestAccountCreationDepositAddress, brokerRequestSwapDepositAddress, cfAccountInfo, cfAccounts, cfAuctionState, cfAvailablePools, cfBoostPoolDetails, cfBoostPoolPendingFees, cfBoostPoolsDepth, cfEnvironment, cfFailedCallEvm, cfFlipSuppy, cfFundingEnvironment, cfGetTradingStrategies, cfGetTradingStrategyLimits, cfIngressEgressEnvironment, cfIngressEgressEvents, 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/types.d.cts
CHANGED
|
@@ -20,6 +20,7 @@ type CfFundingEnvironment = RpcResult<'cf_funding_environment'>;
|
|
|
20
20
|
type CfGetTradingStrategies = RpcResult<'cf_get_trading_strategies'>;
|
|
21
21
|
type CfGetTradingStrategyLimits = RpcResult<'cf_get_trading_strategy_limits'>;
|
|
22
22
|
type CfIngressEgressEnvironment = RpcResult<'cf_ingress_egress_environment'>;
|
|
23
|
+
type CfIngressEgressEvents = RpcResult<'cf_ingress_egress_events'>;
|
|
23
24
|
type CfPoolDepth = RpcResult<'cf_pool_depth'>;
|
|
24
25
|
type CfPoolOrderbook = RpcResult<'cf_pool_orderbook'>;
|
|
25
26
|
type CfPoolOrders = RpcResult<'cf_pool_orders'>;
|
|
@@ -55,6 +56,7 @@ type CfFundingEnvironmentResponse = RpcResponse<'cf_funding_environment'>;
|
|
|
55
56
|
type CfGetTradingStrategiesResponse = RpcResponse<'cf_get_trading_strategies'>;
|
|
56
57
|
type CfGetTradingStrategyLimitsResponse = RpcResponse<'cf_get_trading_strategy_limits'>;
|
|
57
58
|
type CfIngressEgressEnvironmentResponse = RpcResponse<'cf_ingress_egress_environment'>;
|
|
59
|
+
type CfIngressEgressEventsResponse = RpcResponse<'cf_ingress_egress_events'>;
|
|
58
60
|
type CfPoolDepthResponse = RpcResponse<'cf_pool_depth'>;
|
|
59
61
|
type CfPoolOrderbookResponse = RpcResponse<'cf_pool_orderbook'>;
|
|
60
62
|
type CfPoolOrdersResponse = RpcResponse<'cf_pool_orders'>;
|
|
@@ -81,4 +83,4 @@ type CfOperatorAccount = z.output<typeof operator>;
|
|
|
81
83
|
type LpTotalBalances = RpcResult<'lp_total_balances'>;
|
|
82
84
|
type LpTotalBalancesResponse = RpcResponse<'lp_total_balances'>;
|
|
83
85
|
//#endregion
|
|
84
|
-
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfGetTradingStrategies, CfGetTradingStrategiesResponse, CfGetTradingStrategyLimits, CfGetTradingStrategyLimitsResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfLendingConfig, CfLendingConfigResponse, CfLendingPoolSupplyBalances, CfLendingPoolSupplyBalancesResponse, CfLendingPools, CfLendingPoolsResponse, CfLiquidityProviderAccount, CfLoanAccounts, CfLoanAccountsResponse, CfMonitoringSimulateAuction, CfMonitoringSimulateAuctionResponse, CfOperatorAccount, CfOraclePrices, CfOraclePricesResponse, CfPoolDepth, CfPoolDepthResponse, CfPoolOrderbook, CfPoolOrderbookResponse, CfPoolOrders, CfPoolOrdersResponse, CfPoolPriceV2, CfPoolPriceV2Response, CfPoolsEnvironment, CfPoolsEnvironmentResponse, CfRequestSwapParameterEncoding, CfRequestSwapParameterEncodingResponse, CfSafeModeStatuses, CfSafeModeStatusesResponse, CfSupportedAssets, CfSupportedAssetsResponse, CfSwapRate, CfSwapRateResponse, CfSwapRateV2, CfSwapRateV2Response, CfSwapRateV3, CfSwapRateV3Response, CfSwappingEnvironment, CfSwappingEnvironmentResponse, CfUnregisteredAccount, CfValidatorAccount, CfVaultAddresses, CfVaultAddressesResponse, LpTotalBalances, LpTotalBalancesResponse, type RpcLimitOrder, type RpcMethod, type RpcRequest as RpcParams, type RpcRangeOrder, type RpcResult };
|
|
86
|
+
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfGetTradingStrategies, CfGetTradingStrategiesResponse, CfGetTradingStrategyLimits, CfGetTradingStrategyLimitsResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfIngressEgressEvents, CfIngressEgressEventsResponse, CfLendingConfig, CfLendingConfigResponse, CfLendingPoolSupplyBalances, CfLendingPoolSupplyBalancesResponse, CfLendingPools, CfLendingPoolsResponse, CfLiquidityProviderAccount, CfLoanAccounts, CfLoanAccountsResponse, CfMonitoringSimulateAuction, CfMonitoringSimulateAuctionResponse, CfOperatorAccount, CfOraclePrices, CfOraclePricesResponse, CfPoolDepth, CfPoolDepthResponse, CfPoolOrderbook, CfPoolOrderbookResponse, CfPoolOrders, CfPoolOrdersResponse, CfPoolPriceV2, CfPoolPriceV2Response, CfPoolsEnvironment, CfPoolsEnvironmentResponse, CfRequestSwapParameterEncoding, CfRequestSwapParameterEncodingResponse, CfSafeModeStatuses, CfSafeModeStatusesResponse, CfSupportedAssets, CfSupportedAssetsResponse, CfSwapRate, CfSwapRateResponse, CfSwapRateV2, CfSwapRateV2Response, CfSwapRateV3, CfSwapRateV3Response, CfSwappingEnvironment, CfSwappingEnvironmentResponse, CfUnregisteredAccount, CfValidatorAccount, CfVaultAddresses, CfVaultAddressesResponse, LpTotalBalances, LpTotalBalancesResponse, type RpcLimitOrder, type RpcMethod, type RpcRequest as RpcParams, type RpcRangeOrder, type RpcResult };
|
package/dist/types.d.mts
CHANGED
|
@@ -20,6 +20,7 @@ type CfFundingEnvironment = RpcResult<'cf_funding_environment'>;
|
|
|
20
20
|
type CfGetTradingStrategies = RpcResult<'cf_get_trading_strategies'>;
|
|
21
21
|
type CfGetTradingStrategyLimits = RpcResult<'cf_get_trading_strategy_limits'>;
|
|
22
22
|
type CfIngressEgressEnvironment = RpcResult<'cf_ingress_egress_environment'>;
|
|
23
|
+
type CfIngressEgressEvents = RpcResult<'cf_ingress_egress_events'>;
|
|
23
24
|
type CfPoolDepth = RpcResult<'cf_pool_depth'>;
|
|
24
25
|
type CfPoolOrderbook = RpcResult<'cf_pool_orderbook'>;
|
|
25
26
|
type CfPoolOrders = RpcResult<'cf_pool_orders'>;
|
|
@@ -55,6 +56,7 @@ type CfFundingEnvironmentResponse = RpcResponse<'cf_funding_environment'>;
|
|
|
55
56
|
type CfGetTradingStrategiesResponse = RpcResponse<'cf_get_trading_strategies'>;
|
|
56
57
|
type CfGetTradingStrategyLimitsResponse = RpcResponse<'cf_get_trading_strategy_limits'>;
|
|
57
58
|
type CfIngressEgressEnvironmentResponse = RpcResponse<'cf_ingress_egress_environment'>;
|
|
59
|
+
type CfIngressEgressEventsResponse = RpcResponse<'cf_ingress_egress_events'>;
|
|
58
60
|
type CfPoolDepthResponse = RpcResponse<'cf_pool_depth'>;
|
|
59
61
|
type CfPoolOrderbookResponse = RpcResponse<'cf_pool_orderbook'>;
|
|
60
62
|
type CfPoolOrdersResponse = RpcResponse<'cf_pool_orders'>;
|
|
@@ -81,4 +83,4 @@ type CfOperatorAccount = z.output<typeof operator>;
|
|
|
81
83
|
type LpTotalBalances = RpcResult<'lp_total_balances'>;
|
|
82
84
|
type LpTotalBalancesResponse = RpcResponse<'lp_total_balances'>;
|
|
83
85
|
//#endregion
|
|
84
|
-
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfGetTradingStrategies, CfGetTradingStrategiesResponse, CfGetTradingStrategyLimits, CfGetTradingStrategyLimitsResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfLendingConfig, CfLendingConfigResponse, CfLendingPoolSupplyBalances, CfLendingPoolSupplyBalancesResponse, CfLendingPools, CfLendingPoolsResponse, CfLiquidityProviderAccount, CfLoanAccounts, CfLoanAccountsResponse, CfMonitoringSimulateAuction, CfMonitoringSimulateAuctionResponse, CfOperatorAccount, CfOraclePrices, CfOraclePricesResponse, CfPoolDepth, CfPoolDepthResponse, CfPoolOrderbook, CfPoolOrderbookResponse, CfPoolOrders, CfPoolOrdersResponse, CfPoolPriceV2, CfPoolPriceV2Response, CfPoolsEnvironment, CfPoolsEnvironmentResponse, CfRequestSwapParameterEncoding, CfRequestSwapParameterEncodingResponse, CfSafeModeStatuses, CfSafeModeStatusesResponse, CfSupportedAssets, CfSupportedAssetsResponse, CfSwapRate, CfSwapRateResponse, CfSwapRateV2, CfSwapRateV2Response, CfSwapRateV3, CfSwapRateV3Response, CfSwappingEnvironment, CfSwappingEnvironmentResponse, CfUnregisteredAccount, CfValidatorAccount, CfVaultAddresses, CfVaultAddressesResponse, LpTotalBalances, LpTotalBalancesResponse, type RpcLimitOrder, type RpcMethod, type RpcRequest as RpcParams, type RpcRangeOrder, type RpcResult };
|
|
86
|
+
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfGetTradingStrategies, CfGetTradingStrategiesResponse, CfGetTradingStrategyLimits, CfGetTradingStrategyLimitsResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfIngressEgressEvents, CfIngressEgressEventsResponse, CfLendingConfig, CfLendingConfigResponse, CfLendingPoolSupplyBalances, CfLendingPoolSupplyBalancesResponse, CfLendingPools, CfLendingPoolsResponse, CfLiquidityProviderAccount, CfLoanAccounts, CfLoanAccountsResponse, CfMonitoringSimulateAuction, CfMonitoringSimulateAuctionResponse, CfOperatorAccount, CfOraclePrices, CfOraclePricesResponse, CfPoolDepth, CfPoolDepthResponse, CfPoolOrderbook, CfPoolOrderbookResponse, CfPoolOrders, CfPoolOrdersResponse, CfPoolPriceV2, CfPoolPriceV2Response, CfPoolsEnvironment, CfPoolsEnvironmentResponse, CfRequestSwapParameterEncoding, CfRequestSwapParameterEncodingResponse, CfSafeModeStatuses, CfSafeModeStatusesResponse, CfSupportedAssets, CfSupportedAssetsResponse, CfSwapRate, CfSwapRateResponse, CfSwapRateV2, CfSwapRateV2Response, CfSwapRateV3, CfSwapRateV3Response, CfSwappingEnvironment, CfSwappingEnvironmentResponse, CfUnregisteredAccount, CfValidatorAccount, CfVaultAddresses, CfVaultAddressesResponse, LpTotalBalances, LpTotalBalancesResponse, type RpcLimitOrder, type RpcMethod, type RpcRequest as RpcParams, type RpcRangeOrder, type RpcResult };
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainflip/rpc",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@chainflip/utils": "2.1.2",
|
|
7
7
|
"zod": "^3.25.75"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@types/node": "^25.
|
|
10
|
+
"@types/node": "^25.5.0",
|
|
11
11
|
"@types/ws": "^8.18.1",
|
|
12
|
-
"ws": "^8.
|
|
12
|
+
"ws": "^8.20.0"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
15
|
"dist",
|