@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/common.mjs
CHANGED
|
@@ -34,7 +34,8 @@ import {
|
|
|
34
34
|
cfAvailablePools,
|
|
35
35
|
cfSafeModeStatuses,
|
|
36
36
|
cfGetTradingStrategyLimits,
|
|
37
|
-
hexString
|
|
37
|
+
hexString,
|
|
38
|
+
cfOraclePrices
|
|
38
39
|
} from "./parsers.mjs";
|
|
39
40
|
import { rpcResponse } from "./parsers.mjs";
|
|
40
41
|
var rpcResult = {
|
|
@@ -76,7 +77,8 @@ var rpcResult = {
|
|
|
76
77
|
cf_available_pools: cfAvailablePools,
|
|
77
78
|
cf_safe_mode_statuses: cfSafeModeStatuses,
|
|
78
79
|
broker_encode_cf_parameters: hexString,
|
|
79
|
-
cf_encode_cf_parameters: hexString
|
|
80
|
+
cf_encode_cf_parameters: hexString,
|
|
81
|
+
cf_oracle_prices: cfOraclePrices
|
|
80
82
|
};
|
|
81
83
|
export {
|
|
82
84
|
rpcResponse,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { default as HttpClient } from './HttpClient.cjs';
|
|
2
2
|
export { default as WsClient } from './WsClient.cjs';
|
|
3
|
-
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, CfLiquidityProviderAccount, 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, LpTotalBalances, LpTotalBalancesResponse } from './types.cjs';
|
|
3
|
+
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, CfLiquidityProviderAccount, 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, LpTotalBalances, LpTotalBalancesResponse } from './types.cjs';
|
|
4
4
|
export { c as constants } from './constants-jLrn-AnI.cjs';
|
|
5
5
|
export { RpcLimitOrder, RpcRangeOrder } from './parsers.cjs';
|
|
6
6
|
export { RpcMethod, RpcRequest as RpcParams, RpcResult } from './common.cjs';
|
|
7
7
|
import './Client.cjs';
|
|
8
8
|
import '@chainflip/utils/async';
|
|
9
9
|
import 'zod';
|
|
10
|
+
import '@chainflip/utils/chainflip';
|
|
10
11
|
import '@chainflip/utils/types';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { default as HttpClient } from './HttpClient.js';
|
|
2
2
|
export { default as WsClient } from './WsClient.js';
|
|
3
|
-
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, CfLiquidityProviderAccount, 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, LpTotalBalances, LpTotalBalancesResponse } from './types.js';
|
|
3
|
+
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, CfLiquidityProviderAccount, 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, LpTotalBalances, LpTotalBalancesResponse } from './types.js';
|
|
4
4
|
export { c as constants } from './constants-jLrn-AnI.js';
|
|
5
5
|
export { RpcLimitOrder, RpcRangeOrder } from './parsers.js';
|
|
6
6
|
export { RpcMethod, RpcRequest as RpcParams, RpcResult } from './common.js';
|
|
7
7
|
import './Client.js';
|
|
8
8
|
import '@chainflip/utils/async';
|
|
9
9
|
import 'zod';
|
|
10
|
+
import '@chainflip/utils/chainflip';
|
|
10
11
|
import '@chainflip/utils/types';
|
package/dist/parsers.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/parsers.ts
|
|
2
|
+
var _chainflip = require('@chainflip/utils/chainflip');
|
|
2
3
|
var _guard = require('@chainflip/utils/guard');
|
|
3
4
|
var _string = require('@chainflip/utils/string');
|
|
4
5
|
var _zod = require('zod');
|
|
@@ -113,8 +114,7 @@ var cfSwappingEnvironment = _zod.z.object({
|
|
|
113
114
|
max_swap_retry_duration_blocks: _zod.z.number().optional(),
|
|
114
115
|
max_swap_request_duration_blocks: _zod.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 = _zod.z.object({
|
|
120
120
|
redemption_tax: numberOrHex,
|
|
@@ -263,8 +263,7 @@ var validator = _zod.z.object({
|
|
|
263
263
|
bound_redeem_address: hexString.nullable(),
|
|
264
264
|
apy_bp: _zod.z.number().nullable(),
|
|
265
265
|
restricted_balances: _zod.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 = _zod.z.discriminatedUnion("role", [
|
|
270
269
|
unregistered,
|
|
@@ -365,8 +364,7 @@ var cfAuctionState = _zod.z.object({
|
|
|
365
364
|
min_funding: numberOrHex,
|
|
366
365
|
auction_size_range: range(_zod.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 = _zod.z.array(
|
|
|
419
417
|
quote: _zod.z.object({ chain: _zod.z.literal("Ethereum"), asset: _zod.z.literal("USDC") })
|
|
420
418
|
})
|
|
421
419
|
);
|
|
420
|
+
var cfOraclePrices = _zod.z.array(
|
|
421
|
+
_zod.z.object({
|
|
422
|
+
price: numberOrHex,
|
|
423
|
+
updated_at_oracle_timestamp: _zod.z.number(),
|
|
424
|
+
updated_at_statechain_block: _zod.z.number(),
|
|
425
|
+
base_asset: _zod.z.enum(_chainflip.priceAssets),
|
|
426
|
+
quote_asset: _zod.z.enum(_chainflip.priceAssets)
|
|
427
|
+
})
|
|
428
|
+
);
|
|
422
429
|
var broadcastPalletSafeModeStatuses = _zod.z.object({
|
|
423
430
|
retry_enabled: _zod.z.boolean(),
|
|
424
431
|
// TODO(1.10): make not optional
|
|
@@ -460,10 +467,6 @@ var cfSafeModeStatusesBase = _zod.z.object({
|
|
|
460
467
|
strategy_updates_enabled: _zod.z.boolean(),
|
|
461
468
|
strategy_closure_enabled: _zod.z.boolean(),
|
|
462
469
|
strategy_execution_enabled: _zod.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: _zod.z.object({
|
|
469
472
|
reporting_enabled: _zod.z.boolean()
|
|
@@ -586,4 +589,5 @@ var cfSafeModeStatuses = _zod.z.union([
|
|
|
586
589
|
|
|
587
590
|
|
|
588
591
|
|
|
589
|
-
|
|
592
|
+
|
|
593
|
+
exports.broker = broker; exports.brokerRequestSwapDepositAddress = brokerRequestSwapDepositAddress; exports.cfAccountInfo = cfAccountInfo; exports.cfAccounts = cfAccounts; exports.cfAuctionState = cfAuctionState; exports.cfAvailablePools = cfAvailablePools; exports.cfBoostPoolDetails = cfBoostPoolDetails; exports.cfBoostPoolPendingFees = cfBoostPoolPendingFees; exports.cfBoostPoolsDepth = cfBoostPoolsDepth; exports.cfEnvironment = cfEnvironment; exports.cfFailedCallEvm = cfFailedCallEvm; exports.cfFlipSuppy = cfFlipSuppy; exports.cfFundingEnvironment = cfFundingEnvironment; exports.cfGetTradingStrategies = cfGetTradingStrategies; exports.cfGetTradingStrategyLimits = cfGetTradingStrategyLimits; exports.cfIngressEgressEnvironment = cfIngressEgressEnvironment; exports.cfOraclePrices = cfOraclePrices; exports.cfPoolDepth = cfPoolDepth; exports.cfPoolOrderbook = cfPoolOrderbook; exports.cfPoolOrders = cfPoolOrders; exports.cfPoolPriceV2 = cfPoolPriceV2; exports.cfPoolsEnvironment = cfPoolsEnvironment; exports.cfSafeModeStatuses = cfSafeModeStatuses; exports.cfSupportedAssets = cfSupportedAssets; exports.cfSwapRate = cfSwapRate; exports.cfSwapRateV2 = cfSwapRateV2; exports.cfSwapRateV3 = cfSwapRateV3; exports.cfSwappingEnvironment = cfSwappingEnvironment; exports.cfTradingStrategy = cfTradingStrategy; exports.chainGetBlockHash = chainGetBlockHash; exports.ethereumAddress = ethereumAddress; exports.hexString = hexString; exports.liquidityProvider = liquidityProvider; exports.lpTotalBalances = lpTotalBalances; exports.numberOrHex = numberOrHex; exports.operator = operator; exports.requestSwapParameterEncoding = requestSwapParameterEncoding; exports.rpcResponse = rpcResponse; exports.stateGetMetadata = stateGetMetadata; exports.stateGetRuntimeVersion = stateGetRuntimeVersion; exports.u256 = u256; exports.unregistered = unregistered; exports.validator = validator;
|