@chainflip/rpc 2.2.0-tron-dev.3 → 2.2.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/Client.cjs +2 -2
- package/dist/Client.mjs +3 -3
- package/dist/common.cjs +2 -1
- package/dist/common.d.cts +3239 -1771
- package/dist/common.d.mts +3239 -1771
- package/dist/common.mjs +3 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/parsers.cjs +74 -29
- package/dist/parsers.d.cts +5262 -2774
- package/dist/parsers.d.mts +5262 -2774
- package/dist/parsers.mjs +73 -30
- package/dist/types.d.cts +3 -1
- package/dist/types.d.mts +3 -1
- package/package.json +3 -3
package/dist/parsers.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { CHAINFLIP_SS58_PREFIX } from "@chainflip/utils/consts";
|
|
|
5
5
|
import { isUndefined } from "@chainflip/utils/guard";
|
|
6
6
|
import * as ss58 from "@chainflip/utils/ss58";
|
|
7
7
|
import { isHex } from "@chainflip/utils/string";
|
|
8
|
+
import { isValidTronAddress } from "@chainflip/utils/tron";
|
|
8
9
|
|
|
9
10
|
//#region src/parsers.ts
|
|
10
11
|
const accountId = z.string().refine((val) => val.startsWith("cF"));
|
|
@@ -16,6 +17,7 @@ const numberOrHex = z.union([
|
|
|
16
17
|
u256,
|
|
17
18
|
numericString
|
|
18
19
|
]).transform((n) => BigInt(n));
|
|
20
|
+
const tronAddress = z.string().refine(isValidTronAddress, { message: "Invalid tron address" });
|
|
19
21
|
const chainAssetMapFactory = (parser, defaultValue) => z.object({
|
|
20
22
|
Bitcoin: z.object({ BTC: parser }),
|
|
21
23
|
Ethereum: z.object({
|
|
@@ -43,6 +45,9 @@ const chainAssetMapFactory = (parser, defaultValue) => z.object({
|
|
|
43
45
|
Tron: z.object({
|
|
44
46
|
TRX: parser,
|
|
45
47
|
USDT: parser.default(defaultValue)
|
|
48
|
+
}).default({
|
|
49
|
+
TRX: defaultValue,
|
|
50
|
+
USDT: defaultValue
|
|
46
51
|
})
|
|
47
52
|
});
|
|
48
53
|
const chainBaseAssetMapFactory = (parser, defaultValue) => z.object({
|
|
@@ -71,15 +76,18 @@ const chainBaseAssetMapFactory = (parser, defaultValue) => z.object({
|
|
|
71
76
|
Tron: z.object({
|
|
72
77
|
TRX: parser,
|
|
73
78
|
USDT: parser.default(defaultValue)
|
|
79
|
+
}).default({
|
|
80
|
+
TRX: defaultValue,
|
|
81
|
+
USDT: defaultValue
|
|
74
82
|
})
|
|
75
83
|
});
|
|
76
|
-
const chainMapFactory = (parser,
|
|
84
|
+
const chainMapFactory = (parser, defaultValue) => z.object({
|
|
77
85
|
Bitcoin: parser,
|
|
78
86
|
Ethereum: parser,
|
|
79
87
|
Arbitrum: parser,
|
|
80
88
|
Solana: parser,
|
|
81
89
|
Assethub: parser,
|
|
82
|
-
Tron: parser
|
|
90
|
+
Tron: parser.default(defaultValue)
|
|
83
91
|
});
|
|
84
92
|
const rpcAssetSchema = z.union([
|
|
85
93
|
z.object({
|
|
@@ -328,6 +336,14 @@ const requestSwapParameterEncoding = z.discriminatedUnion("chain", [
|
|
|
328
336
|
}),
|
|
329
337
|
evmBrokerRequestSwapParameterEncoding.extend({ chain: z.literal("Ethereum") }),
|
|
330
338
|
evmBrokerRequestSwapParameterEncoding.extend({ chain: z.literal("Arbitrum") }),
|
|
339
|
+
z.object({
|
|
340
|
+
chain: z.literal("Tron"),
|
|
341
|
+
to: tronAddress,
|
|
342
|
+
calldata: z.string(),
|
|
343
|
+
note: hexString,
|
|
344
|
+
value: numberOrHex,
|
|
345
|
+
source_token_address: tronAddress.optional()
|
|
346
|
+
}),
|
|
331
347
|
z.object({
|
|
332
348
|
chain: z.literal("Solana"),
|
|
333
349
|
program_id: z.string(),
|
|
@@ -362,7 +378,7 @@ const broker = z.object({
|
|
|
362
378
|
role: z.literal("broker"),
|
|
363
379
|
...accountInfoCommon,
|
|
364
380
|
earned_fees: chainAssetMapFactory(numberOrHex, 0),
|
|
365
|
-
btc_vault_deposit_address: z.string().
|
|
381
|
+
btc_vault_deposit_address: z.string().nullish(),
|
|
366
382
|
affiliates: z.array(z.object({
|
|
367
383
|
account_id: accountId,
|
|
368
384
|
short_id: z.number(),
|
|
@@ -581,6 +597,14 @@ const cfTradingStrategy = z.object({
|
|
|
581
597
|
min_sell_tick: z.number(),
|
|
582
598
|
max_sell_tick: z.number(),
|
|
583
599
|
base_asset: rpcAssetSchema
|
|
600
|
+
}) }),
|
|
601
|
+
z.object({ OracleTracking: z.object({
|
|
602
|
+
min_buy_offset_tick: z.number(),
|
|
603
|
+
max_buy_offset_tick: z.number(),
|
|
604
|
+
min_sell_offset_tick: z.number(),
|
|
605
|
+
max_sell_offset_tick: z.number(),
|
|
606
|
+
base_asset: rpcAssetSchema,
|
|
607
|
+
quote_asset: rpcAssetSchema
|
|
584
608
|
}) })
|
|
585
609
|
]),
|
|
586
610
|
balance: z.array(z.tuple([rpcAssetSchema, numberOrHex]))
|
|
@@ -659,8 +683,8 @@ const cfSafeModeStatuses = z.object({
|
|
|
659
683
|
borrowing: cfSupportedAssets,
|
|
660
684
|
add_lender_funds: cfSupportedAssets,
|
|
661
685
|
withdraw_lender_funds: cfSupportedAssets,
|
|
662
|
-
add_collateral: cfSupportedAssets,
|
|
663
|
-
remove_collateral: cfSupportedAssets,
|
|
686
|
+
add_collateral: cfSupportedAssets.optional(),
|
|
687
|
+
remove_collateral: cfSupportedAssets.optional(),
|
|
664
688
|
liquidations_enabled: z.boolean()
|
|
665
689
|
}),
|
|
666
690
|
broadcast_ethereum: broadcastPalletSafeModeStatuses,
|
|
@@ -669,14 +693,14 @@ const cfSafeModeStatuses = z.object({
|
|
|
669
693
|
broadcast_arbitrum: broadcastPalletSafeModeStatuses,
|
|
670
694
|
broadcast_solana: broadcastPalletSafeModeStatuses,
|
|
671
695
|
broadcast_assethub: broadcastPalletSafeModeStatuses,
|
|
672
|
-
broadcast_tron: broadcastPalletSafeModeStatuses,
|
|
696
|
+
broadcast_tron: broadcastPalletSafeModeStatuses.optional(),
|
|
673
697
|
ingress_egress_ethereum: ingressEgressPalletSafeModeStatuses,
|
|
674
698
|
ingress_egress_bitcoin: ingressEgressPalletSafeModeStatuses,
|
|
675
699
|
ingress_egress_polkadot: ingressEgressPalletSafeModeStatuses,
|
|
676
700
|
ingress_egress_arbitrum: ingressEgressPalletSafeModeStatuses,
|
|
677
701
|
ingress_egress_solana: ingressEgressPalletSafeModeStatuses,
|
|
678
702
|
ingress_egress_assethub: ingressEgressPalletSafeModeStatuses,
|
|
679
|
-
ingress_egress_tron: ingressEgressPalletSafeModeStatuses,
|
|
703
|
+
ingress_egress_tron: ingressEgressPalletSafeModeStatuses.optional(),
|
|
680
704
|
witnesser: z.enum([
|
|
681
705
|
"CodeRed",
|
|
682
706
|
"CodeGreen",
|
|
@@ -695,6 +719,7 @@ const cfLendingPools = z.array(z.object({
|
|
|
695
719
|
total_amount: numberOrHex,
|
|
696
720
|
available_amount: numberOrHex,
|
|
697
721
|
utilisation_rate: z.number(),
|
|
722
|
+
utilisation_cap: z.number().optional(),
|
|
698
723
|
current_interest_rate: z.number(),
|
|
699
724
|
origination_fee: z.number(),
|
|
700
725
|
liquidation_fee: z.number(),
|
|
@@ -708,7 +733,7 @@ const cfLendingPools = z.array(z.object({
|
|
|
708
733
|
const cfLendingConfig = z.object({
|
|
709
734
|
ltv_thresholds: z.object({
|
|
710
735
|
target: z.number(),
|
|
711
|
-
topup: z.number().
|
|
736
|
+
topup: z.number().nullish(),
|
|
712
737
|
soft_liquidation: z.number(),
|
|
713
738
|
soft_liquidation_abort: z.number(),
|
|
714
739
|
hard_liquidation: z.number(),
|
|
@@ -733,18 +758,25 @@ const cfLendingConfig = z.object({
|
|
|
733
758
|
minimum_loan_amount_usd: numberOrHex,
|
|
734
759
|
minimum_supply_amount_usd: numberOrHex,
|
|
735
760
|
minimum_update_loan_amount_usd: numberOrHex,
|
|
736
|
-
minimum_update_collateral_amount_usd: numberOrHex
|
|
761
|
+
minimum_update_collateral_amount_usd: numberOrHex.optional()
|
|
762
|
+
});
|
|
763
|
+
const cfLoan = z.object({
|
|
764
|
+
loan_id: z.number(),
|
|
765
|
+
asset: rpcAssetSchema,
|
|
766
|
+
principal_amount: numberOrHex,
|
|
767
|
+
loan_type: z.union([z.object({ User: accountId }), z.object({ Boost: numberOrHex })]).optional(),
|
|
768
|
+
created_at: z.number().optional(),
|
|
769
|
+
broker: z.object({
|
|
770
|
+
account: accountId,
|
|
771
|
+
bps: z.number()
|
|
772
|
+
}).nullish()
|
|
737
773
|
});
|
|
738
774
|
const cfLoanAccount = z.object({
|
|
739
775
|
account: accountId,
|
|
740
|
-
collateral_topup_asset: rpcAssetSchema.
|
|
776
|
+
collateral_topup_asset: rpcAssetSchema.nullish(),
|
|
741
777
|
ltv_ratio: numberOrHex.nullable(),
|
|
742
778
|
collateral: z.array(z.intersection(rpcAssetSchema, z.object({ amount: numberOrHex }))),
|
|
743
|
-
loans: z.array(
|
|
744
|
-
loan_id: z.number(),
|
|
745
|
-
asset: rpcAssetSchema,
|
|
746
|
-
principal_amount: numberOrHex
|
|
747
|
-
})),
|
|
779
|
+
loans: z.array(cfLoan),
|
|
748
780
|
liquidation_status: z.object({
|
|
749
781
|
liquidation_swaps: z.array(z.object({
|
|
750
782
|
swap_request_id: z.number(),
|
|
@@ -762,10 +794,15 @@ const cfLendingPoolSupplyBalances = z.array(z.intersection(rpcAssetSchema, z.obj
|
|
|
762
794
|
lp_id: accountId,
|
|
763
795
|
total_amount: numberOrHex
|
|
764
796
|
})) })));
|
|
797
|
+
const u128 = z.union([
|
|
798
|
+
z.number(),
|
|
799
|
+
numericString,
|
|
800
|
+
hexString
|
|
801
|
+
]).transform((arg) => BigInt(arg));
|
|
765
802
|
const ingressEgressDeposit = z.object({
|
|
766
803
|
deposit_chain_block_height: z.number(),
|
|
767
804
|
deposit_address: z.string(),
|
|
768
|
-
amount:
|
|
805
|
+
amount: u128,
|
|
769
806
|
asset: z.object({
|
|
770
807
|
chain: z.string(),
|
|
771
808
|
asset: z.string()
|
|
@@ -773,17 +810,22 @@ const ingressEgressDeposit = z.object({
|
|
|
773
810
|
deposit_details: z.union([z.object({ tx_hashes: z.array(hexString) }), z.object({
|
|
774
811
|
tx_id: z.string().transform((v) => v.startsWith("0x") ? v : `0x${v}`),
|
|
775
812
|
vout: z.number().int()
|
|
776
|
-
})]).
|
|
813
|
+
})]).nullish()
|
|
777
814
|
});
|
|
815
|
+
const txRef = z.object({ hash: z.string() });
|
|
816
|
+
const txOutId = z.union([z.object({ hash: z.string() }), z.object({ signature: z.object({
|
|
817
|
+
s: z.array(z.number()),
|
|
818
|
+
k_times_g_address: z.array(z.number())
|
|
819
|
+
}) })]);
|
|
778
820
|
const ingressEgressBroadcast = z.object({
|
|
779
821
|
broadcast_id: z.number(),
|
|
780
822
|
broadcast_chain_block_height: z.number(),
|
|
781
|
-
tx_out_id:
|
|
782
|
-
tx_ref:
|
|
823
|
+
tx_out_id: txOutId,
|
|
824
|
+
tx_ref: txRef
|
|
783
825
|
});
|
|
784
826
|
const ingressEgressVaultDeposit = z.object({
|
|
785
827
|
tx_id: z.string(),
|
|
786
|
-
deposit_chain_block_height: z.number().
|
|
828
|
+
deposit_chain_block_height: z.number().nullish(),
|
|
787
829
|
input_asset: z.object({
|
|
788
830
|
chain: z.string(),
|
|
789
831
|
asset: z.string()
|
|
@@ -792,17 +834,17 @@ const ingressEgressVaultDeposit = z.object({
|
|
|
792
834
|
chain: z.string(),
|
|
793
835
|
asset: z.string()
|
|
794
836
|
}),
|
|
795
|
-
amount:
|
|
837
|
+
amount: u128,
|
|
796
838
|
destination_address: z.string(),
|
|
797
|
-
ccm_deposit_metadata: z.unknown().
|
|
798
|
-
deposit_details: z.unknown().
|
|
839
|
+
ccm_deposit_metadata: z.unknown().nullish(),
|
|
840
|
+
deposit_details: z.unknown().nullish(),
|
|
799
841
|
broker_fee: z.object({
|
|
800
842
|
account: z.string().transform((v) => ss58.encode({
|
|
801
843
|
data: ss58.decode(v).data,
|
|
802
844
|
ss58Format: CHAINFLIP_SS58_PREFIX
|
|
803
845
|
})),
|
|
804
846
|
bps: z.number()
|
|
805
|
-
}).
|
|
847
|
+
}).nullish(),
|
|
806
848
|
affiliate_fees: z.array(z.object({
|
|
807
849
|
account: z.string().transform((v) => ss58.encode({
|
|
808
850
|
data: ss58.decode(v).data,
|
|
@@ -813,14 +855,14 @@ const ingressEgressVaultDeposit = z.object({
|
|
|
813
855
|
refund_params: z.object({
|
|
814
856
|
retry_duration: z.number(),
|
|
815
857
|
refund_address: z.string(),
|
|
816
|
-
min_price:
|
|
817
|
-
refund_ccm_metadata: z.unknown().
|
|
818
|
-
max_oracle_price_slippage: z.
|
|
819
|
-
}).
|
|
858
|
+
min_price: u128,
|
|
859
|
+
refund_ccm_metadata: z.unknown().nullish(),
|
|
860
|
+
max_oracle_price_slippage: z.number().nullish()
|
|
861
|
+
}).nullish(),
|
|
820
862
|
dca_params: z.object({
|
|
821
863
|
number_of_chunks: z.number(),
|
|
822
864
|
chunk_interval: z.number()
|
|
823
|
-
}).
|
|
865
|
+
}).nullish(),
|
|
824
866
|
max_boost_fee: z.number().optional()
|
|
825
867
|
});
|
|
826
868
|
const cfIngressEgressEvents = z.object({
|
|
@@ -840,6 +882,7 @@ const cfVaultAddresses = z.object({
|
|
|
840
882
|
Bitcoin: bitcoinAddresses
|
|
841
883
|
};
|
|
842
884
|
});
|
|
885
|
+
const cfAllLoans = z.array(cfLoan);
|
|
843
886
|
|
|
844
887
|
//#endregion
|
|
845
|
-
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 };
|
|
888
|
+
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 };
|
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
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@chainflip/utils": "2.
|
|
6
|
+
"@chainflip/utils": "2.2.0",
|
|
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
|
},
|