@chainflip/rpc 2.2.0-alpha.1 → 2.2.0-alpha.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/common.cjs +2 -1
- package/dist/common.d.cts +1312 -998
- package/dist/common.d.mts +1312 -998
- package/dist/common.mjs +3 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/parsers.cjs +12 -8
- package/dist/parsers.d.cts +1886 -1554
- package/dist/parsers.d.mts +1886 -1554
- package/dist/parsers.mjs +12 -9
- package/dist/types.d.cts +3 -1
- package/dist/types.d.mts +3 -1
- package/package.json +2 -2
package/dist/parsers.mjs
CHANGED
|
@@ -726,7 +726,7 @@ const cfLendingPools = z.array(z.object({
|
|
|
726
726
|
const cfLendingConfig = z.object({
|
|
727
727
|
ltv_thresholds: z.object({
|
|
728
728
|
target: z.number(),
|
|
729
|
-
topup: z.number().
|
|
729
|
+
topup: z.number().nullish(),
|
|
730
730
|
soft_liquidation: z.number(),
|
|
731
731
|
soft_liquidation_abort: z.number(),
|
|
732
732
|
hard_liquidation: z.number(),
|
|
@@ -753,17 +753,19 @@ const cfLendingConfig = z.object({
|
|
|
753
753
|
minimum_update_loan_amount_usd: numberOrHex,
|
|
754
754
|
minimum_update_collateral_amount_usd: numberOrHex.optional()
|
|
755
755
|
});
|
|
756
|
+
const cfLoan = z.object({
|
|
757
|
+
loan_id: z.number(),
|
|
758
|
+
asset: rpcAssetSchema,
|
|
759
|
+
principal_amount: numberOrHex,
|
|
760
|
+
loan_type: z.union([z.object({ User: accountId }), z.object({ Boost: numberOrHex })]).optional(),
|
|
761
|
+
created_at: z.number().optional()
|
|
762
|
+
});
|
|
756
763
|
const cfLoanAccount = z.object({
|
|
757
764
|
account: accountId,
|
|
758
|
-
collateral_topup_asset: rpcAssetSchema.
|
|
765
|
+
collateral_topup_asset: rpcAssetSchema.nullish(),
|
|
759
766
|
ltv_ratio: numberOrHex.nullable(),
|
|
760
767
|
collateral: z.array(z.intersection(rpcAssetSchema, z.object({ amount: numberOrHex }))),
|
|
761
|
-
loans: z.array(
|
|
762
|
-
loan_id: z.number(),
|
|
763
|
-
asset: rpcAssetSchema,
|
|
764
|
-
principal_amount: numberOrHex,
|
|
765
|
-
loan_type: z.object({ User: accountId }).optional()
|
|
766
|
-
})),
|
|
768
|
+
loans: z.array(cfLoan),
|
|
767
769
|
liquidation_status: z.object({
|
|
768
770
|
liquidation_swaps: z.array(z.object({
|
|
769
771
|
swap_request_id: z.number(),
|
|
@@ -869,6 +871,7 @@ const cfVaultAddresses = z.object({
|
|
|
869
871
|
Bitcoin: bitcoinAddresses
|
|
870
872
|
};
|
|
871
873
|
});
|
|
874
|
+
const cfAllLoans = z.array(cfLoan);
|
|
872
875
|
|
|
873
876
|
//#endregion
|
|
874
|
-
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 };
|
|
877
|
+
export { accountInfoCommon, broker, brokerRequestAccountCreationDepositAddress, brokerRequestSwapDepositAddress, cfAccountInfo, cfAccounts, cfAllLoans, 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
|
@@ -40,6 +40,7 @@ type CfLendingConfig = RpcResult<'cf_lending_config'>;
|
|
|
40
40
|
type CfLoanAccounts = RpcResult<'cf_loan_accounts'>;
|
|
41
41
|
type CfLendingPoolSupplyBalances = RpcResult<'cf_lending_pool_supply_balances'>;
|
|
42
42
|
type CfVaultAddresses = RpcResult<'cf_get_vault_addresses'>;
|
|
43
|
+
type CfAllLoans = RpcResult<'cf_all_loans'>;
|
|
43
44
|
type CfAccountInfoResponse = RpcResponse<'cf_account_info'>;
|
|
44
45
|
type CfAccountsResponse = RpcResponse<'cf_accounts'>;
|
|
45
46
|
type CfAuctionStateResponse = RpcResponse<'cf_auction_state'>;
|
|
@@ -77,6 +78,7 @@ type CfLendingConfigResponse = RpcResponse<'cf_lending_config'>;
|
|
|
77
78
|
type CfLoanAccountsResponse = RpcResponse<'cf_loan_accounts'>;
|
|
78
79
|
type CfLendingPoolSupplyBalancesResponse = RpcResponse<'cf_lending_pool_supply_balances'>;
|
|
79
80
|
type CfVaultAddressesResponse = RpcResponse<'cf_get_vault_addresses'>;
|
|
81
|
+
type CfAllLoansResponse = RpcResponse<'cf_all_loans'>;
|
|
80
82
|
type CfUnregisteredAccount = z.output<typeof unregistered>;
|
|
81
83
|
type CfBrokerAccount = z.output<typeof broker>;
|
|
82
84
|
type CfValidatorAccount = z.output<typeof validator>;
|
|
@@ -85,4 +87,4 @@ type CfOperatorAccount = z.output<typeof operator>;
|
|
|
85
87
|
type LpTotalBalances = RpcResult<'lp_total_balances'>;
|
|
86
88
|
type LpTotalBalancesResponse = RpcResponse<'lp_total_balances'>;
|
|
87
89
|
//#endregion
|
|
88
|
-
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFailedCallTron, CfFailedCallTronResponse, 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 };
|
|
90
|
+
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAllLoans, CfAllLoansResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFailedCallTron, CfFailedCallTronResponse, 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
|
@@ -40,6 +40,7 @@ type CfLendingConfig = RpcResult<'cf_lending_config'>;
|
|
|
40
40
|
type CfLoanAccounts = RpcResult<'cf_loan_accounts'>;
|
|
41
41
|
type CfLendingPoolSupplyBalances = RpcResult<'cf_lending_pool_supply_balances'>;
|
|
42
42
|
type CfVaultAddresses = RpcResult<'cf_get_vault_addresses'>;
|
|
43
|
+
type CfAllLoans = RpcResult<'cf_all_loans'>;
|
|
43
44
|
type CfAccountInfoResponse = RpcResponse<'cf_account_info'>;
|
|
44
45
|
type CfAccountsResponse = RpcResponse<'cf_accounts'>;
|
|
45
46
|
type CfAuctionStateResponse = RpcResponse<'cf_auction_state'>;
|
|
@@ -77,6 +78,7 @@ type CfLendingConfigResponse = RpcResponse<'cf_lending_config'>;
|
|
|
77
78
|
type CfLoanAccountsResponse = RpcResponse<'cf_loan_accounts'>;
|
|
78
79
|
type CfLendingPoolSupplyBalancesResponse = RpcResponse<'cf_lending_pool_supply_balances'>;
|
|
79
80
|
type CfVaultAddressesResponse = RpcResponse<'cf_get_vault_addresses'>;
|
|
81
|
+
type CfAllLoansResponse = RpcResponse<'cf_all_loans'>;
|
|
80
82
|
type CfUnregisteredAccount = z.output<typeof unregistered>;
|
|
81
83
|
type CfBrokerAccount = z.output<typeof broker>;
|
|
82
84
|
type CfValidatorAccount = z.output<typeof validator>;
|
|
@@ -85,4 +87,4 @@ type CfOperatorAccount = z.output<typeof operator>;
|
|
|
85
87
|
type LpTotalBalances = RpcResult<'lp_total_balances'>;
|
|
86
88
|
type LpTotalBalancesResponse = RpcResponse<'lp_total_balances'>;
|
|
87
89
|
//#endregion
|
|
88
|
-
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFailedCallTron, CfFailedCallTronResponse, 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 };
|
|
90
|
+
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAllLoans, CfAllLoansResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFailedCallTron, CfFailedCallTronResponse, 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,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainflip/rpc",
|
|
3
|
-
"version": "2.2.0-alpha.
|
|
3
|
+
"version": "2.2.0-alpha.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@chainflip/utils": "2.2.0-alpha.1",
|
|
7
7
|
"zod": "^3.25.75"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@types/node": "^25.6.
|
|
10
|
+
"@types/node": "^25.6.2",
|
|
11
11
|
"@types/ws": "^8.18.1",
|
|
12
12
|
"ws": "^8.20.0"
|
|
13
13
|
},
|