@chainflip/rpc 2.2.0-alpha.2 → 2.2.0-alpha.4
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 +1874 -1557
- package/dist/common.d.mts +1874 -1557
- package/dist/common.mjs +3 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/parsers.cjs +11 -6
- package/dist/parsers.d.cts +1769 -1434
- package/dist/parsers.d.mts +1769 -1434
- package/dist/parsers.mjs +11 -7
- package/dist/types.d.cts +3 -1
- package/dist/types.d.mts +3 -1
- package/package.json +2 -2
package/dist/parsers.mjs
CHANGED
|
@@ -713,6 +713,7 @@ const cfLendingPools = z.array(z.object({
|
|
|
713
713
|
total_amount: numberOrHex,
|
|
714
714
|
available_amount: numberOrHex,
|
|
715
715
|
utilisation_rate: z.number(),
|
|
716
|
+
utilisation_cap: z.number().optional(),
|
|
716
717
|
current_interest_rate: z.number(),
|
|
717
718
|
origination_fee: z.number(),
|
|
718
719
|
liquidation_fee: z.number(),
|
|
@@ -753,17 +754,19 @@ const cfLendingConfig = z.object({
|
|
|
753
754
|
minimum_update_loan_amount_usd: numberOrHex,
|
|
754
755
|
minimum_update_collateral_amount_usd: numberOrHex.optional()
|
|
755
756
|
});
|
|
757
|
+
const cfLoan = z.object({
|
|
758
|
+
loan_id: z.number(),
|
|
759
|
+
asset: rpcAssetSchema,
|
|
760
|
+
principal_amount: numberOrHex,
|
|
761
|
+
loan_type: z.union([z.object({ User: accountId }), z.object({ Boost: numberOrHex })]).optional(),
|
|
762
|
+
created_at: z.number().optional()
|
|
763
|
+
});
|
|
756
764
|
const cfLoanAccount = z.object({
|
|
757
765
|
account: accountId,
|
|
758
766
|
collateral_topup_asset: rpcAssetSchema.nullish(),
|
|
759
767
|
ltv_ratio: numberOrHex.nullable(),
|
|
760
768
|
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
|
-
})),
|
|
769
|
+
loans: z.array(cfLoan),
|
|
767
770
|
liquidation_status: z.object({
|
|
768
771
|
liquidation_swaps: z.array(z.object({
|
|
769
772
|
swap_request_id: z.number(),
|
|
@@ -869,6 +872,7 @@ const cfVaultAddresses = z.object({
|
|
|
869
872
|
Bitcoin: bitcoinAddresses
|
|
870
873
|
};
|
|
871
874
|
});
|
|
875
|
+
const cfAllLoans = z.array(cfLoan);
|
|
872
876
|
|
|
873
877
|
//#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 };
|
|
878
|
+
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.4",
|
|
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
|
},
|