@chainflip/rpc 2.1.11 → 2.2.0-alpha.1

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/parsers.mjs CHANGED
@@ -39,6 +39,13 @@ const chainAssetMapFactory = (parser, defaultValue) => z.object({
39
39
  DOT: parser,
40
40
  USDC: parser,
41
41
  USDT: parser
42
+ }),
43
+ Tron: z.object({
44
+ TRX: parser,
45
+ USDT: parser.default(defaultValue)
46
+ }).default({
47
+ TRX: defaultValue,
48
+ USDT: defaultValue
42
49
  })
43
50
  });
44
51
  const chainBaseAssetMapFactory = (parser, defaultValue) => z.object({
@@ -63,14 +70,22 @@ const chainBaseAssetMapFactory = (parser, defaultValue) => z.object({
63
70
  DOT: parser,
64
71
  USDC: parser,
65
72
  USDT: parser
73
+ }),
74
+ Tron: z.object({
75
+ TRX: parser,
76
+ USDT: parser.default(defaultValue)
77
+ }).default({
78
+ TRX: defaultValue,
79
+ USDT: defaultValue
66
80
  })
67
81
  });
68
- const chainMapFactory = (parser, _defaultValue) => z.object({
82
+ const chainMapFactory = (parser, defaultValue) => z.object({
69
83
  Bitcoin: parser,
70
84
  Ethereum: parser,
71
85
  Arbitrum: parser,
72
86
  Solana: parser,
73
- Assethub: parser
87
+ Assethub: parser,
88
+ Tron: parser.default(defaultValue)
74
89
  });
75
90
  const rpcAssetSchema = z.union([
76
91
  z.object({
@@ -132,6 +147,14 @@ const rpcAssetSchema = z.union([
132
147
  z.object({
133
148
  chain: z.literal("Assethub"),
134
149
  asset: z.literal("USDT")
150
+ }),
151
+ z.object({
152
+ chain: z.literal("Tron"),
153
+ asset: z.literal("TRX")
154
+ }),
155
+ z.object({
156
+ chain: z.literal("Tron"),
157
+ asset: z.literal("USDT")
135
158
  })
136
159
  ]);
137
160
  const networkFee = z.object({
@@ -311,6 +334,10 @@ const requestSwapParameterEncoding = z.discriminatedUnion("chain", [
311
334
  }),
312
335
  evmBrokerRequestSwapParameterEncoding.extend({ chain: z.literal("Ethereum") }),
313
336
  evmBrokerRequestSwapParameterEncoding.extend({ chain: z.literal("Arbitrum") }),
337
+ evmBrokerRequestSwapParameterEncoding.extend({
338
+ chain: z.literal("Tron"),
339
+ note: hexString
340
+ }),
314
341
  z.object({
315
342
  chain: z.literal("Solana"),
316
343
  program_id: z.string(),
@@ -660,12 +687,14 @@ const cfSafeModeStatuses = z.object({
660
687
  broadcast_arbitrum: broadcastPalletSafeModeStatuses,
661
688
  broadcast_solana: broadcastPalletSafeModeStatuses,
662
689
  broadcast_assethub: broadcastPalletSafeModeStatuses,
690
+ broadcast_tron: broadcastPalletSafeModeStatuses.optional(),
663
691
  ingress_egress_ethereum: ingressEgressPalletSafeModeStatuses,
664
692
  ingress_egress_bitcoin: ingressEgressPalletSafeModeStatuses,
665
693
  ingress_egress_polkadot: ingressEgressPalletSafeModeStatuses,
666
694
  ingress_egress_arbitrum: ingressEgressPalletSafeModeStatuses,
667
695
  ingress_egress_solana: ingressEgressPalletSafeModeStatuses,
668
696
  ingress_egress_assethub: ingressEgressPalletSafeModeStatuses,
697
+ ingress_egress_tron: ingressEgressPalletSafeModeStatuses.optional(),
669
698
  witnesser: z.enum([
670
699
  "CodeRed",
671
700
  "CodeGreen",
package/dist/types.d.cts CHANGED
@@ -15,6 +15,7 @@ type CfEncodeCfParameters = RpcResult<'cf_encode_cf_parameters'>;
15
15
  type CfEnvironment = RpcResult<'cf_environment'>;
16
16
  type CfFailedCallArbitrum = RpcResult<'cf_failed_call_arbitrum'>;
17
17
  type CfFailedCallEthereum = RpcResult<'cf_failed_call_ethereum'>;
18
+ type CfFailedCallTron = RpcResult<'cf_failed_call_tron'>;
18
19
  type CfFlipSupply = RpcResult<'cf_flip_supply'>;
19
20
  type CfFundingEnvironment = RpcResult<'cf_funding_environment'>;
20
21
  type CfGetTradingStrategies = RpcResult<'cf_get_trading_strategies'>;
@@ -51,6 +52,7 @@ type CfEncodeCfParametersResponse = RpcResponse<'cf_encode_cf_parameters'>;
51
52
  type CfEnvironmentResponse = RpcResponse<'cf_environment'>;
52
53
  type CfFailedCallArbitrumResponse = RpcResponse<'cf_failed_call_arbitrum'>;
53
54
  type CfFailedCallEthereumResponse = RpcResponse<'cf_failed_call_ethereum'>;
55
+ type CfFailedCallTronResponse = RpcResponse<'cf_failed_call_tron'>;
54
56
  type CfFlipSupplyResponse = RpcResponse<'cf_flip_supply'>;
55
57
  type CfFundingEnvironmentResponse = RpcResponse<'cf_funding_environment'>;
56
58
  type CfGetTradingStrategiesResponse = RpcResponse<'cf_get_trading_strategies'>;
@@ -83,4 +85,4 @@ type CfOperatorAccount = z.output<typeof operator>;
83
85
  type LpTotalBalances = RpcResult<'lp_total_balances'>;
84
86
  type LpTotalBalancesResponse = RpcResponse<'lp_total_balances'>;
85
87
  //#endregion
86
- 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, 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 };
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 };
package/dist/types.d.mts CHANGED
@@ -15,6 +15,7 @@ type CfEncodeCfParameters = RpcResult<'cf_encode_cf_parameters'>;
15
15
  type CfEnvironment = RpcResult<'cf_environment'>;
16
16
  type CfFailedCallArbitrum = RpcResult<'cf_failed_call_arbitrum'>;
17
17
  type CfFailedCallEthereum = RpcResult<'cf_failed_call_ethereum'>;
18
+ type CfFailedCallTron = RpcResult<'cf_failed_call_tron'>;
18
19
  type CfFlipSupply = RpcResult<'cf_flip_supply'>;
19
20
  type CfFundingEnvironment = RpcResult<'cf_funding_environment'>;
20
21
  type CfGetTradingStrategies = RpcResult<'cf_get_trading_strategies'>;
@@ -51,6 +52,7 @@ type CfEncodeCfParametersResponse = RpcResponse<'cf_encode_cf_parameters'>;
51
52
  type CfEnvironmentResponse = RpcResponse<'cf_environment'>;
52
53
  type CfFailedCallArbitrumResponse = RpcResponse<'cf_failed_call_arbitrum'>;
53
54
  type CfFailedCallEthereumResponse = RpcResponse<'cf_failed_call_ethereum'>;
55
+ type CfFailedCallTronResponse = RpcResponse<'cf_failed_call_tron'>;
54
56
  type CfFlipSupplyResponse = RpcResponse<'cf_flip_supply'>;
55
57
  type CfFundingEnvironmentResponse = RpcResponse<'cf_funding_environment'>;
56
58
  type CfGetTradingStrategiesResponse = RpcResponse<'cf_get_trading_strategies'>;
@@ -83,4 +85,4 @@ type CfOperatorAccount = z.output<typeof operator>;
83
85
  type LpTotalBalances = RpcResult<'lp_total_balances'>;
84
86
  type LpTotalBalancesResponse = RpcResponse<'lp_total_balances'>;
85
87
  //#endregion
86
- 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, 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 };
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 };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@chainflip/rpc",
3
- "version": "2.1.11",
3
+ "version": "2.2.0-alpha.1",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "@chainflip/utils": "2.1.2",
6
+ "@chainflip/utils": "2.2.0-alpha.1",
7
7
  "zod": "^3.25.75"
8
8
  },
9
9
  "devDependencies": {