@chainflip/rpc 1.11.0-beta.0 → 1.11.0-beta.2
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.d.cts +1 -0
- package/dist/Client.d.ts +1 -0
- package/dist/HttpClient.d.cts +1 -0
- package/dist/HttpClient.d.ts +1 -0
- package/dist/WsClient.d.cts +1 -0
- package/dist/WsClient.d.ts +1 -0
- package/dist/common.cjs +3 -1
- package/dist/common.d.cts +1267 -1246
- package/dist/common.d.ts +1267 -1246
- package/dist/common.mjs +4 -2
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/parsers.cjs +15 -11
- package/dist/parsers.d.cts +1426 -1407
- package/dist/parsers.d.ts +1426 -1407
- package/dist/parsers.mjs +14 -10
- package/dist/types.d.cts +6 -2
- package/dist/types.d.ts +6 -2
- package/package.json +2 -2
package/dist/parsers.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/parsers.ts
|
|
2
|
+
import { priceAssets } from "@chainflip/utils/chainflip";
|
|
2
3
|
import { isUndefined } from "@chainflip/utils/guard";
|
|
3
4
|
import { isHex } from "@chainflip/utils/string";
|
|
4
5
|
import { z } from "zod";
|
|
@@ -113,8 +114,7 @@ var cfSwappingEnvironment = z.object({
|
|
|
113
114
|
max_swap_retry_duration_blocks: z.number().optional(),
|
|
114
115
|
max_swap_request_duration_blocks: z.number().optional(),
|
|
115
116
|
minimum_chunk_size: chainAssetMapFactory(numberOrHex.nullable(), null).optional(),
|
|
116
|
-
network_fees: networkFees
|
|
117
|
-
// TODO(1.10): remove optional
|
|
117
|
+
network_fees: networkFees
|
|
118
118
|
});
|
|
119
119
|
var cfFundingEnvironment = z.object({
|
|
120
120
|
redemption_tax: numberOrHex,
|
|
@@ -263,8 +263,7 @@ var validator = z.object({
|
|
|
263
263
|
bound_redeem_address: hexString.nullable(),
|
|
264
264
|
apy_bp: z.number().nullable(),
|
|
265
265
|
restricted_balances: z.record(hexString, numberOrHex),
|
|
266
|
-
estimated_redeemable_balance: numberOrHex
|
|
267
|
-
// TODO(1.10): remove optional
|
|
266
|
+
estimated_redeemable_balance: numberOrHex
|
|
268
267
|
});
|
|
269
268
|
var cfAccountInfo = z.discriminatedUnion("role", [
|
|
270
269
|
unregistered,
|
|
@@ -365,8 +364,7 @@ var cfAuctionState = z.object({
|
|
|
365
364
|
min_funding: numberOrHex,
|
|
366
365
|
auction_size_range: range(z.number()),
|
|
367
366
|
min_active_bid: numberOrHex,
|
|
368
|
-
min_bid: numberOrHex
|
|
369
|
-
// TODO(1.10): remove optional
|
|
367
|
+
min_bid: numberOrHex
|
|
370
368
|
}).transform(rename({ epoch_duration: "epoch_duration_blocks" }));
|
|
371
369
|
var cfFlipSuppy = range(numberOrHex).transform(([totalIssuance, offchainFunds]) => ({
|
|
372
370
|
totalIssuance,
|
|
@@ -419,6 +417,15 @@ var cfAvailablePools = z.array(
|
|
|
419
417
|
quote: z.object({ chain: z.literal("Ethereum"), asset: z.literal("USDC") })
|
|
420
418
|
})
|
|
421
419
|
);
|
|
420
|
+
var cfOraclePrices = z.array(
|
|
421
|
+
z.object({
|
|
422
|
+
price: numberOrHex,
|
|
423
|
+
updated_at_oracle_timestamp: z.number(),
|
|
424
|
+
updated_at_statechain_block: z.number(),
|
|
425
|
+
base_asset: z.enum(priceAssets),
|
|
426
|
+
quote_asset: z.enum(priceAssets)
|
|
427
|
+
})
|
|
428
|
+
);
|
|
422
429
|
var broadcastPalletSafeModeStatuses = z.object({
|
|
423
430
|
retry_enabled: z.boolean(),
|
|
424
431
|
// TODO(1.10): make not optional
|
|
@@ -460,10 +467,6 @@ var cfSafeModeStatusesBase = z.object({
|
|
|
460
467
|
strategy_updates_enabled: z.boolean(),
|
|
461
468
|
strategy_closure_enabled: z.boolean(),
|
|
462
469
|
strategy_execution_enabled: z.boolean()
|
|
463
|
-
}).optional().default({
|
|
464
|
-
strategy_updates_enabled: false,
|
|
465
|
-
strategy_closure_enabled: false,
|
|
466
|
-
strategy_execution_enabled: false
|
|
467
470
|
}),
|
|
468
471
|
reputation: z.object({
|
|
469
472
|
reporting_enabled: z.boolean()
|
|
@@ -560,6 +563,7 @@ export {
|
|
|
560
563
|
cfGetTradingStrategies,
|
|
561
564
|
cfGetTradingStrategyLimits,
|
|
562
565
|
cfIngressEgressEnvironment,
|
|
566
|
+
cfOraclePrices,
|
|
563
567
|
cfPoolDepth,
|
|
564
568
|
cfPoolOrderbook,
|
|
565
569
|
cfPoolOrders,
|
package/dist/types.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { RpcResult, RpcResponse } from './common.cjs';
|
|
3
3
|
export { RpcMethod, RpcRequest as RpcParams } from './common.cjs';
|
|
4
|
-
import { unregistered, broker, validator, liquidityProvider } from './parsers.cjs';
|
|
4
|
+
import { unregistered, broker, validator, liquidityProvider, operator } from './parsers.cjs';
|
|
5
5
|
export { RpcLimitOrder, RpcRangeOrder } from './parsers.cjs';
|
|
6
|
+
import '@chainflip/utils/chainflip';
|
|
6
7
|
import '@chainflip/utils/types';
|
|
7
8
|
|
|
8
9
|
type CfAccountInfo = RpcResult<'cf_account_info'>;
|
|
@@ -33,6 +34,7 @@ type CfSwappingEnvironment = RpcResult<'cf_swapping_environment'>;
|
|
|
33
34
|
type CfSwapRate = RpcResult<'cf_swap_rate'>;
|
|
34
35
|
type CfSwapRateV2 = RpcResult<'cf_swap_rate_v2'>;
|
|
35
36
|
type CfSwapRateV3 = RpcResult<'cf_swap_rate_v3'>;
|
|
37
|
+
type CfOraclePrices = RpcResult<'cf_oracle_prices'>;
|
|
36
38
|
type CfAccountInfoResponse = RpcResponse<'cf_account_info'>;
|
|
37
39
|
type CfAccountsResponse = RpcResponse<'cf_accounts'>;
|
|
38
40
|
type CfAuctionStateResponse = RpcResponse<'cf_auction_state'>;
|
|
@@ -61,11 +63,13 @@ type CfSwappingEnvironmentResponse = RpcResponse<'cf_swapping_environment'>;
|
|
|
61
63
|
type CfSwapRateResponse = RpcResponse<'cf_swap_rate'>;
|
|
62
64
|
type CfSwapRateV2Response = RpcResponse<'cf_swap_rate_v2'>;
|
|
63
65
|
type CfSwapRateV3Response = RpcResponse<'cf_swap_rate_v3'>;
|
|
66
|
+
type CfOraclePricesResponse = RpcResponse<'cf_oracle_prices'>;
|
|
64
67
|
type CfUnregisteredAccount = z.output<typeof unregistered>;
|
|
65
68
|
type CfBrokerAccount = z.output<typeof broker>;
|
|
66
69
|
type CfValidatorAccount = z.output<typeof validator>;
|
|
67
70
|
type CfLiquidityProviderAccount = z.output<typeof liquidityProvider>;
|
|
71
|
+
type CfOperatorAccount = z.output<typeof operator>;
|
|
68
72
|
type LpTotalBalances = RpcResult<'lp_total_balances'>;
|
|
69
73
|
type LpTotalBalancesResponse = RpcResponse<'lp_total_balances'>;
|
|
70
74
|
|
|
71
|
-
export { type CfAccountInfo, type CfAccountInfoResponse, type CfAccounts, type CfAccountsResponse, type CfAuctionState, type CfAuctionStateResponse, type CfAvailablePools, type CfAvailablePoolsResponse, type CfBoostPoolDetails, type CfBoostPoolDetailsResponse, type CfBoostPoolPendingFees, type CfBoostPoolPendingFeesResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEncodeCfParameters, type CfEncodeCfParametersResponse, 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 CfGetTradingStrategyLimits, type CfGetTradingStrategyLimitsResponse, 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 CfSafeModeStatuses, type CfSafeModeStatusesResponse, 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 };
|
|
75
|
+
export { type CfAccountInfo, type CfAccountInfoResponse, type CfAccounts, type CfAccountsResponse, type CfAuctionState, type CfAuctionStateResponse, type CfAvailablePools, type CfAvailablePoolsResponse, type CfBoostPoolDetails, type CfBoostPoolDetailsResponse, type CfBoostPoolPendingFees, type CfBoostPoolPendingFeesResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEncodeCfParameters, type CfEncodeCfParametersResponse, 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 CfGetTradingStrategyLimits, type CfGetTradingStrategyLimitsResponse, type CfIngressEgressEnvironment, type CfIngressEgressEnvironmentResponse, type CfLiquidityProviderAccount, type CfOperatorAccount, type CfOraclePrices, type CfOraclePricesResponse, 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 CfSafeModeStatuses, type CfSafeModeStatusesResponse, 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
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { RpcResult, RpcResponse } from './common.js';
|
|
3
3
|
export { RpcMethod, RpcRequest as RpcParams } from './common.js';
|
|
4
|
-
import { unregistered, broker, validator, liquidityProvider } from './parsers.js';
|
|
4
|
+
import { unregistered, broker, validator, liquidityProvider, operator } from './parsers.js';
|
|
5
5
|
export { RpcLimitOrder, RpcRangeOrder } from './parsers.js';
|
|
6
|
+
import '@chainflip/utils/chainflip';
|
|
6
7
|
import '@chainflip/utils/types';
|
|
7
8
|
|
|
8
9
|
type CfAccountInfo = RpcResult<'cf_account_info'>;
|
|
@@ -33,6 +34,7 @@ type CfSwappingEnvironment = RpcResult<'cf_swapping_environment'>;
|
|
|
33
34
|
type CfSwapRate = RpcResult<'cf_swap_rate'>;
|
|
34
35
|
type CfSwapRateV2 = RpcResult<'cf_swap_rate_v2'>;
|
|
35
36
|
type CfSwapRateV3 = RpcResult<'cf_swap_rate_v3'>;
|
|
37
|
+
type CfOraclePrices = RpcResult<'cf_oracle_prices'>;
|
|
36
38
|
type CfAccountInfoResponse = RpcResponse<'cf_account_info'>;
|
|
37
39
|
type CfAccountsResponse = RpcResponse<'cf_accounts'>;
|
|
38
40
|
type CfAuctionStateResponse = RpcResponse<'cf_auction_state'>;
|
|
@@ -61,11 +63,13 @@ type CfSwappingEnvironmentResponse = RpcResponse<'cf_swapping_environment'>;
|
|
|
61
63
|
type CfSwapRateResponse = RpcResponse<'cf_swap_rate'>;
|
|
62
64
|
type CfSwapRateV2Response = RpcResponse<'cf_swap_rate_v2'>;
|
|
63
65
|
type CfSwapRateV3Response = RpcResponse<'cf_swap_rate_v3'>;
|
|
66
|
+
type CfOraclePricesResponse = RpcResponse<'cf_oracle_prices'>;
|
|
64
67
|
type CfUnregisteredAccount = z.output<typeof unregistered>;
|
|
65
68
|
type CfBrokerAccount = z.output<typeof broker>;
|
|
66
69
|
type CfValidatorAccount = z.output<typeof validator>;
|
|
67
70
|
type CfLiquidityProviderAccount = z.output<typeof liquidityProvider>;
|
|
71
|
+
type CfOperatorAccount = z.output<typeof operator>;
|
|
68
72
|
type LpTotalBalances = RpcResult<'lp_total_balances'>;
|
|
69
73
|
type LpTotalBalancesResponse = RpcResponse<'lp_total_balances'>;
|
|
70
74
|
|
|
71
|
-
export { type CfAccountInfo, type CfAccountInfoResponse, type CfAccounts, type CfAccountsResponse, type CfAuctionState, type CfAuctionStateResponse, type CfAvailablePools, type CfAvailablePoolsResponse, type CfBoostPoolDetails, type CfBoostPoolDetailsResponse, type CfBoostPoolPendingFees, type CfBoostPoolPendingFeesResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEncodeCfParameters, type CfEncodeCfParametersResponse, 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 CfGetTradingStrategyLimits, type CfGetTradingStrategyLimitsResponse, 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 CfSafeModeStatuses, type CfSafeModeStatusesResponse, 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 };
|
|
75
|
+
export { type CfAccountInfo, type CfAccountInfoResponse, type CfAccounts, type CfAccountsResponse, type CfAuctionState, type CfAuctionStateResponse, type CfAvailablePools, type CfAvailablePoolsResponse, type CfBoostPoolDetails, type CfBoostPoolDetailsResponse, type CfBoostPoolPendingFees, type CfBoostPoolPendingFeesResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEncodeCfParameters, type CfEncodeCfParametersResponse, 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 CfGetTradingStrategyLimits, type CfGetTradingStrategyLimitsResponse, type CfIngressEgressEnvironment, type CfIngressEgressEnvironmentResponse, type CfLiquidityProviderAccount, type CfOperatorAccount, type CfOraclePrices, type CfOraclePricesResponse, 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 CfSafeModeStatuses, type CfSafeModeStatusesResponse, 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