@chainflip/rpc 2.2.1 → 2.3.0-dev.0
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 +20806 -11604
- package/dist/common.d.mts +20806 -11604
- package/dist/common.mjs +3 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/parsers.cjs +22 -1
- package/dist/parsers.d.cts +12498 -2520
- package/dist/parsers.d.mts +12498 -2520
- package/dist/parsers.mjs +22 -2
- package/dist/types.d.cts +3 -1
- package/dist/types.d.mts +3 -1
- package/package.json +2 -2
package/dist/parsers.mjs
CHANGED
|
@@ -45,6 +45,10 @@ const chainAssetMapFactory = (parser, _defaultValue) => z.object({
|
|
|
45
45
|
Tron: z.object({
|
|
46
46
|
TRX: parser,
|
|
47
47
|
USDT: parser
|
|
48
|
+
}),
|
|
49
|
+
Bsc: z.object({
|
|
50
|
+
BNB: parser,
|
|
51
|
+
USDT: parser
|
|
48
52
|
})
|
|
49
53
|
});
|
|
50
54
|
const chainBaseAssetMapFactory = (parser, _defaultValue) => z.object({
|
|
@@ -73,6 +77,10 @@ const chainBaseAssetMapFactory = (parser, _defaultValue) => z.object({
|
|
|
73
77
|
Tron: z.object({
|
|
74
78
|
TRX: parser,
|
|
75
79
|
USDT: parser
|
|
80
|
+
}),
|
|
81
|
+
Bsc: z.object({
|
|
82
|
+
BNB: parser,
|
|
83
|
+
USDT: parser
|
|
76
84
|
})
|
|
77
85
|
});
|
|
78
86
|
const chainMapFactory = (parser, _defaultValue = null) => z.object({
|
|
@@ -81,7 +89,8 @@ const chainMapFactory = (parser, _defaultValue = null) => z.object({
|
|
|
81
89
|
Arbitrum: parser,
|
|
82
90
|
Solana: parser,
|
|
83
91
|
Assethub: parser,
|
|
84
|
-
Tron: parser
|
|
92
|
+
Tron: parser,
|
|
93
|
+
Bsc: parser
|
|
85
94
|
});
|
|
86
95
|
const rpcAssetSchema = z.union([
|
|
87
96
|
z.object({
|
|
@@ -151,6 +160,14 @@ const rpcAssetSchema = z.union([
|
|
|
151
160
|
z.object({
|
|
152
161
|
chain: z.literal("Tron"),
|
|
153
162
|
asset: z.literal("USDT")
|
|
163
|
+
}),
|
|
164
|
+
z.object({
|
|
165
|
+
chain: z.literal("Bsc"),
|
|
166
|
+
asset: z.literal("BNB")
|
|
167
|
+
}),
|
|
168
|
+
z.object({
|
|
169
|
+
chain: z.literal("Bsc"),
|
|
170
|
+
asset: z.literal("USDT")
|
|
154
171
|
})
|
|
155
172
|
]);
|
|
156
173
|
const networkFee = z.object({
|
|
@@ -330,6 +347,7 @@ const requestSwapParameterEncoding = z.discriminatedUnion("chain", [
|
|
|
330
347
|
}),
|
|
331
348
|
evmBrokerRequestSwapParameterEncoding.extend({ chain: z.literal("Ethereum") }),
|
|
332
349
|
evmBrokerRequestSwapParameterEncoding.extend({ chain: z.literal("Arbitrum") }),
|
|
350
|
+
evmBrokerRequestSwapParameterEncoding.extend({ chain: z.literal("Bsc") }),
|
|
333
351
|
z.object({
|
|
334
352
|
chain: z.literal("Tron"),
|
|
335
353
|
to: tronAddress,
|
|
@@ -354,6 +372,7 @@ const delegationStatus = z.object({
|
|
|
354
372
|
bid: numberOrHex
|
|
355
373
|
});
|
|
356
374
|
const accountInfoCommon = {
|
|
375
|
+
account_id: accountId,
|
|
357
376
|
vanity_name: z.string().optional(),
|
|
358
377
|
flip_balance: numberOrHex,
|
|
359
378
|
asset_balances: chainAssetMapFactory(numberOrHex, 0),
|
|
@@ -456,6 +475,7 @@ const cfAccountInfo = z.discriminatedUnion("role", [
|
|
|
456
475
|
}
|
|
457
476
|
}
|
|
458
477
|
});
|
|
478
|
+
const cfAllAccountInfos = z.array(cfAccountInfo);
|
|
459
479
|
const cfAccounts = z.array(z.tuple([accountId, z.string()]));
|
|
460
480
|
const cfPoolPriceV2 = z.object({
|
|
461
481
|
sell: numberOrHex.nullable(),
|
|
@@ -874,4 +894,4 @@ const cfVaultAddresses = z.object({
|
|
|
874
894
|
const cfAllLoans = z.array(cfLoan);
|
|
875
895
|
|
|
876
896
|
//#endregion
|
|
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, tronAddress, u256, unregistered, validator };
|
|
897
|
+
export { accountInfoCommon, broker, brokerRequestAccountCreationDepositAddress, brokerRequestSwapDepositAddress, cfAccountInfo, cfAccounts, cfAllAccountInfos, 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, tronAddress, u256, unregistered, validator };
|
package/dist/types.d.cts
CHANGED
|
@@ -41,6 +41,7 @@ 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
43
|
type CfAllLoans = RpcResult<'cf_all_loans'>;
|
|
44
|
+
type CfAllAccountInfos = RpcResult<'cf_all_account_infos'>;
|
|
44
45
|
type CfAccountInfoResponse = RpcResponse<'cf_account_info'>;
|
|
45
46
|
type CfAccountsResponse = RpcResponse<'cf_accounts'>;
|
|
46
47
|
type CfAuctionStateResponse = RpcResponse<'cf_auction_state'>;
|
|
@@ -79,6 +80,7 @@ type CfLoanAccountsResponse = RpcResponse<'cf_loan_accounts'>;
|
|
|
79
80
|
type CfLendingPoolSupplyBalancesResponse = RpcResponse<'cf_lending_pool_supply_balances'>;
|
|
80
81
|
type CfVaultAddressesResponse = RpcResponse<'cf_get_vault_addresses'>;
|
|
81
82
|
type CfAllLoansResponse = RpcResponse<'cf_all_loans'>;
|
|
83
|
+
type CfAllAccountInfosResponse = RpcResponse<'cf_all_account_infos'>;
|
|
82
84
|
type CfUnregisteredAccount = z.output<typeof unregistered>;
|
|
83
85
|
type CfBrokerAccount = z.output<typeof broker>;
|
|
84
86
|
type CfValidatorAccount = z.output<typeof validator>;
|
|
@@ -87,4 +89,4 @@ type CfOperatorAccount = z.output<typeof operator>;
|
|
|
87
89
|
type LpTotalBalances = RpcResult<'lp_total_balances'>;
|
|
88
90
|
type LpTotalBalancesResponse = RpcResponse<'lp_total_balances'>;
|
|
89
91
|
//#endregion
|
|
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 };
|
|
92
|
+
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAllAccountInfos, CfAllAccountInfosResponse, 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
|
@@ -41,6 +41,7 @@ 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
43
|
type CfAllLoans = RpcResult<'cf_all_loans'>;
|
|
44
|
+
type CfAllAccountInfos = RpcResult<'cf_all_account_infos'>;
|
|
44
45
|
type CfAccountInfoResponse = RpcResponse<'cf_account_info'>;
|
|
45
46
|
type CfAccountsResponse = RpcResponse<'cf_accounts'>;
|
|
46
47
|
type CfAuctionStateResponse = RpcResponse<'cf_auction_state'>;
|
|
@@ -79,6 +80,7 @@ type CfLoanAccountsResponse = RpcResponse<'cf_loan_accounts'>;
|
|
|
79
80
|
type CfLendingPoolSupplyBalancesResponse = RpcResponse<'cf_lending_pool_supply_balances'>;
|
|
80
81
|
type CfVaultAddressesResponse = RpcResponse<'cf_get_vault_addresses'>;
|
|
81
82
|
type CfAllLoansResponse = RpcResponse<'cf_all_loans'>;
|
|
83
|
+
type CfAllAccountInfosResponse = RpcResponse<'cf_all_account_infos'>;
|
|
82
84
|
type CfUnregisteredAccount = z.output<typeof unregistered>;
|
|
83
85
|
type CfBrokerAccount = z.output<typeof broker>;
|
|
84
86
|
type CfValidatorAccount = z.output<typeof validator>;
|
|
@@ -87,4 +89,4 @@ type CfOperatorAccount = z.output<typeof operator>;
|
|
|
87
89
|
type LpTotalBalances = RpcResult<'lp_total_balances'>;
|
|
88
90
|
type LpTotalBalancesResponse = RpcResponse<'lp_total_balances'>;
|
|
89
91
|
//#endregion
|
|
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 };
|
|
92
|
+
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAllAccountInfos, CfAllAccountInfosResponse, 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