@sodax/dapp-kit 2.3.0-rc.4 → 2.4.0-rc.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/index.d.ts +48 -28
- package/dist/index.mjs +108 -20
- package/package.json +10 -5
- package/src/hooks/bridge/getBridgeDetailedStatusRefetchInterval.test.ts +28 -3
- package/src/hooks/bridge/getBridgeDetailedStatusRefetchInterval.ts +17 -8
- package/src/hooks/bridge/useBridge.ts +6 -0
- package/src/hooks/bridge/useBridgeDetailedStatus.test.ts +56 -1
- package/src/hooks/bridge/useBridgeDetailedStatus.ts +26 -9
- package/src/hooks/bridge/useBridgeWithApproval.test.ts +24 -1
- package/src/hooks/bridge/useBridgeWithApproval.ts +6 -0
- package/src/hooks/dex/useDexDeposit.ts +6 -0
- package/src/hooks/dex/useDexWithdraw.ts +12 -5
- package/src/hooks/mm/useBorrow.ts +15 -4
- package/src/hooks/mm/useRepay.ts +6 -0
- package/src/hooks/mm/useSupply.ts +6 -0
- package/src/hooks/mm/useWithdraw.ts +12 -5
- package/src/hooks/recovery/useWithdrawHubAsset.ts +12 -5
- package/src/hooks/shared/notFoundStreak.ts +5 -0
- package/src/hooks/shared/retryBeforeSubmission.ts +26 -0
- package/src/hooks/shared/useBalances.test.ts +10 -0
- package/src/hooks/shared/useBalances.ts +17 -4
- package/src/hooks/shared/useSafeMutation.retry.test.ts +47 -0
- package/src/hooks/shared/useSafeMutation.ts +8 -1
- package/src/hooks/swap/useCreateLimitOrder.ts +8 -0
- package/src/hooks/swap/useSwap.ts +6 -0
- package/src/hooks/swap/useSwapLifecycle.test.ts +27 -1
- package/src/hooks/swap/useSwapWithApproval.test.ts +24 -1
- package/src/hooks/swap/useSwapWithApproval.ts +6 -0
- package/src/utils/swapLifecycle.ts +14 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UseMutationOptions, UseQueryOptions, UseMutationResult, MutateOptions, UseQueryResult, QueryClient, QueryClientConfig } from '@tanstack/react-query';
|
|
2
2
|
import * as _sodax_sdk from '@sodax/sdk';
|
|
3
|
-
import { Result, Sodax, SpokeChainKey, GetEstimateGasReturnType, EstimateGasParams, StellarChainKey, IStellarWalletProvider, INearWalletProvider, GetWalletProviderType, StellarAccountStatus, ActivateStellarAccountResult, IXServiceBase, XToken, EvmHubProvider, IBitcoinWalletProvider, RadfiWalletBalance, IWalletProvider, RadfiUtxo, MoneyMarketBorrowActionParams,
|
|
3
|
+
import { Result, Sodax, SpokeChainKey, GetEstimateGasReturnType, EstimateGasParams, StellarChainKey, IStellarWalletProvider, INearWalletProvider, GetWalletProviderType, StellarAccountStatus, ActivateStellarAccountResult, IXServiceBase, XToken, EvmHubProvider, IBitcoinWalletProvider, RadfiWalletBalance, IWalletProvider, RadfiUtxo, MoneyMarketBorrowActionParams, OutboundSettlement, MoneyMarketRepayActionParams, TxHashPair, MoneyMarketSupplyActionParams, MoneyMarketWithdrawActionParams, UserReserveData, AggregatedReserveData, BaseCurrencyInfo, ReservesDataHumanized, Address as Address$1, MoneyMarketParams, MoneyMarketApproveActionParams, TxReturnType, Erc20Token, ChainKey, ReserveDataHumanized, FormatReserveUSDResponse, FormatUserSummaryResponse, EmodeDataHumanized, SolverIntentQuoteRequest, SwapActionParams, SwapResponse, SolverIntentStatusResponse, SolverErrorResponse, Hex, DetailedSwapStatus, DetailedStatusError, CreateIntentParams, CreateLimitOrderParams, SwapApprovalStrategy, SwapWithApprovalParams, SwapWithApprovalResponse, SwapExtras, Intent, LimitOrderActionParams, IntentResponse, UserIntentsResponse, OrderbookResponse, MoneyMarketPosition, MoneyMarketAsset, MoneyMarketAssetBorrowers, MoneyMarketAssetSuppliers, MoneyMarketBorrowers, OracleMarketsResponse, OracleCandlesResponse, OracleCandleInterval, GetSwapTokensResponseV2, RequestOverrideConfig, GetSwapTokensByChainResponseV2, QuoteResponseV2, QuoteRequestV2, QuoteQueryV2, DeadlineResponseV2, DeadlineQueryV2, AllowanceCheckResponseV2, CreateIntentParamsV2, ApproveResponseV2, RawTxReturnType, Hash, ApprovalStrategy, ApprovalOptions, EvmRawTransaction, IEvmWalletProvider, CreateIntentResponseV2, SubmitIntentRequestV2, SubmitIntentResponseV2, StatusResponseV2, SwapIntentStatusCodeV2, CancelIntentRequestV2, CancelIntentResponseV2, IntentHashResponseV2, IntentRequestV2, IntentPacketResponseV2, IntentPacketRequestV2, IntentExtraDataResponseV2, IntentExtraDataRequestV2, IntentStateV2, GetIntentResponseV2, CreateLimitOrderParamsV2, CreateLimitOrderResponseV2, GasEstimateResponseV2, GasEstimateRequestV2, FeeResponseV2, SubmitTxRequestV2, SubmitTxResponseV2, SubmitTxStatusResponseV2, DetailedBridgeStatus, BridgeDetailedStatusError, BridgeParams, CreateBridgeIntentParams, BridgeWithApprovalParams, BridgeWithApprovalResponse, BridgeLimit, BridgeAllowanceCheckResponseV2, CreateBridgeIntentParamsV2, BridgeApproveResponseV2, BridgeableAmountResponseV2, BridgeQuoteRequestV2, CreateBridgeIntentResponseV2, BridgeFeeResponseV2, BridgeFeeRequestV2, BridgeableCheckResponseV2, BridgeSubmitTxRequestV2, BridgeSubmitTxResponseV2, BridgeSubmitTxStatusResponseV2, GetBridgeTokensResponseV2, GetBridgeTokensByChainResponseV2, StakeAction, StakeParams, UnstakeAction, ClaimAction, CancelUnstakeAction, StakingInfo, UnstakingInfo, UnstakeRequestWithPenalty, StakingConfig, InstantUnstakeAction, UnstakeParams, InstantUnstakeParams, PartnerFeeClaimAssetBalance, AutoSwapPreferences, FeeTokenApproveParams, FeeTokenApproveAction, HubChainKey, SetSwapPreferenceAction, PartnerFeeClaimSwapAction, IntentAutoSwapResult, PartnerFeeClaimCancelAction, GetUserIntentParams, HubAssetBalance, WithdrawHubAssetAction, SendMessageReturnType, IcxMigrateAction, IcxRevertMigrationAction, UnifiedBnUSDMigrateAction, BalnMigrateAction, MigrationAction, IcxMigrateParams, IcxCreateRevertMigrationParams, UnifiedBnUSDMigrateParams, BalnMigrateParams, PoolKey, PoolData, ClPositionInfo, AssetDepositAction, AssetWithdrawAction, CreateAssetDepositParams, ClSupplyParams, ClIncreaseLiquidityParams, ClLiquidityDecreaseLiquidityAction, ClDecreaseLiquidityParams, CreateAssetWithdrawParams, PoolSpokeAssets, DestinationParamsType, ClLiquidityClaimRewardsAction, LeverageYieldQuoteParams, LeverageYieldEffectiveApr, LeverageYieldPosition, LeverageYieldSwapDepositParams, LeverageYieldSwapPayload, SolverExecutionRequest, SolverExecutionResponse, DetailedLeverageYieldStatus, LeverageYieldDetailedStatusError, VaultSwapActionParams, VaultSwapResponse, VaultSwapWithApprovalParams, VaultSwapWithApprovalResponse, LeverageYieldSwapWithdrawParams, LeveragePositionAccount, LeveragePositionCollateral, LeveragePosition, LeveragePositionPendingState, SpokeExecActionParams, OpenPositionParams, OpenPositionFromDebtTokenParams, LeveragePositionIntentResult, PositionOperationParams, PositionBatchCall, PositionDirectCall, GetLeverageVaultsResponseV2, GetLeverageVaultResponseV2, VaultAssetResponseV2, LeverageYieldPositionV2, LeverageYieldAprV2, LeverageYieldEffectiveAprV2, LeverageYieldLsdAprV2, VaultTotalAssetsResponseV2, PreviewDepositResponseV2, PreviewWithdrawResponseV2, PreviewRedeemResponseV2, ShareBalanceResponseV2, MaxWithdrawResponseV2, LeverageYieldDepositQuoteRequestV2, LeverageYieldWithdrawQuoteRequestV2, CreateDepositIntentParamsV2, CreateWithdrawIntentParamsV2, LeverageYieldSubmitTxRequestV2, ActivateStellarAccountParams, StellarSponsorConfig, SodaxOptions } from '@sodax/sdk';
|
|
4
4
|
export * from '@sodax/sdk';
|
|
5
5
|
import { Address } from 'viem';
|
|
6
6
|
import { ReactNode, ReactElement } from 'react';
|
|
@@ -190,7 +190,7 @@ declare function getStellarTrustlineCheckQueryOptions({ sodax, token, amount, ch
|
|
|
190
190
|
chainId: SpokeChainKey | undefined;
|
|
191
191
|
walletAddress: string | undefined;
|
|
192
192
|
}): {
|
|
193
|
-
queryKey: readonly ["shared", "stellarTrustlineCheck", "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "robinhood" | undefined, string | undefined, string | undefined, string | undefined];
|
|
193
|
+
queryKey: readonly ["shared", "stellarTrustlineCheck", "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "tron" | "robinhood" | "xrp" | "monad" | "ton" | "zcash" | "cardano" | undefined, string | undefined, string | undefined, string | undefined];
|
|
194
194
|
queryFn: () => Promise<boolean>;
|
|
195
195
|
enabled: boolean;
|
|
196
196
|
};
|
|
@@ -404,7 +404,7 @@ type UseXBalancesParams = ReadHookParams<Record<string, bigint>, XBalancesInputs
|
|
|
404
404
|
* tests and for advanced callers that compose their own `useQuery` wrapper.
|
|
405
405
|
*/
|
|
406
406
|
declare function getXBalancesQueryOptions({ xService, xChainId, xTokens, address }: XBalancesInputs): {
|
|
407
|
-
queryKey: readonly ["shared", "xBalances", "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "robinhood" | undefined, (readonly [string, string])[], string | undefined];
|
|
407
|
+
queryKey: readonly ["shared", "xBalances", "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "tron" | "robinhood" | "xrp" | "monad" | "ton" | "zcash" | "cardano" | undefined, (readonly [string, string])[], string | undefined];
|
|
408
408
|
queryFn: () => Promise<Record<string, bigint>>;
|
|
409
409
|
enabled: boolean;
|
|
410
410
|
refetchInterval: number;
|
|
@@ -432,6 +432,8 @@ interface BalancesInputs {
|
|
|
432
432
|
chainKey: SpokeChainKey | undefined;
|
|
433
433
|
tokens: readonly XToken[];
|
|
434
434
|
address: string | undefined;
|
|
435
|
+
/** TON only: wallet account to read. Defaults to the public key’s wallet-v4R2 address. */
|
|
436
|
+
accountAddress?: string;
|
|
435
437
|
}
|
|
436
438
|
type UseBalancesParams = ReadHookParams<Record<string, bigint>, BalancesInputs>;
|
|
437
439
|
/**
|
|
@@ -439,8 +441,8 @@ type UseBalancesParams = ReadHookParams<Record<string, bigint>, BalancesInputs>;
|
|
|
439
441
|
* callers that compose their own `useQuery` wrapper. Takes the SDK instance explicitly (the hook
|
|
440
442
|
* supplies it from context).
|
|
441
443
|
*/
|
|
442
|
-
declare function getBalancesQueryOptions(sodax: Sodax, { chainKey, tokens, address }: BalancesInputs): {
|
|
443
|
-
queryKey: readonly ["shared", "balances", "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "robinhood" | undefined, (readonly [string, string])[], string | undefined];
|
|
444
|
+
declare function getBalancesQueryOptions(sodax: Sodax, { chainKey, tokens, address, accountAddress }: BalancesInputs): {
|
|
445
|
+
queryKey: readonly ["shared", "balances", "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "tron" | "robinhood" | "xrp" | "monad" | "ton" | "zcash" | "cardano" | undefined, (readonly [string, string])[], string | undefined, ...string[]];
|
|
444
446
|
queryFn: () => Promise<Record<string, bigint>>;
|
|
445
447
|
enabled: boolean;
|
|
446
448
|
refetchInterval: number;
|
|
@@ -639,9 +641,10 @@ type UseBorrowVars<K extends SpokeChainKey = SpokeChainKey> = Omit<MoneyMarketBo
|
|
|
639
641
|
* React hook for borrowing tokens from the Sodax money market protocol.
|
|
640
642
|
*
|
|
641
643
|
* Throws on SDK failure so React Query's native error model engages (`isError`, `error`,
|
|
642
|
-
* `onError`, `retry`). Returns the unwrapped
|
|
644
|
+
* `onError`, `retry`). Returns the unwrapped {@link OutboundSettlement} on success: a tx pair, or
|
|
645
|
+
* from Tron the relay's `trackingId` beside the destination tx.
|
|
643
646
|
*/
|
|
644
|
-
declare function useBorrow<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<
|
|
647
|
+
declare function useBorrow<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<OutboundSettlement<K>, UseBorrowVars<K>>): SafeUseMutationResult<OutboundSettlement<K>, Error, UseBorrowVars<K>>;
|
|
645
648
|
|
|
646
649
|
/**
|
|
647
650
|
* Mutation variables for {@link useRepay}. Generic over `K extends SpokeChainKey` (defaults to
|
|
@@ -693,9 +696,10 @@ type UseWithdrawVars<K extends SpokeChainKey = SpokeChainKey> = Omit<MoneyMarket
|
|
|
693
696
|
* React hook for withdrawing supplied tokens from the Sodax money market protocol.
|
|
694
697
|
*
|
|
695
698
|
* Throws on SDK failure so React Query's native error model engages (`isError`, `error`,
|
|
696
|
-
* `onError`, `retry`). Returns the unwrapped
|
|
699
|
+
* `onError`, `retry`). Returns the unwrapped {@link OutboundSettlement} on success: a tx pair, or
|
|
700
|
+
* from Tron the relay's `trackingId` beside the destination tx.
|
|
697
701
|
*/
|
|
698
|
-
declare function useWithdraw<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<
|
|
702
|
+
declare function useWithdraw<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<OutboundSettlement<K>, UseWithdrawVars<K>>): SafeUseMutationResult<OutboundSettlement<K>, Error, UseWithdrawVars<K>>;
|
|
699
703
|
|
|
700
704
|
type UseUserReservesDataParams = ReadHookParams<readonly [readonly UserReserveData[], number], {
|
|
701
705
|
spokeChainKey: SpokeChainKey | undefined;
|
|
@@ -846,9 +850,9 @@ declare function getSwapQuoteQueryOptions({ sodax, payload, }: {
|
|
|
846
850
|
}): {
|
|
847
851
|
queryKey: (string | {
|
|
848
852
|
token_src: string;
|
|
849
|
-
token_src_blockchain_id: "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "robinhood";
|
|
853
|
+
token_src_blockchain_id: "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "tron" | "robinhood" | "xrp" | "monad" | "ton" | "zcash" | "cardano";
|
|
850
854
|
token_dst: string;
|
|
851
|
-
token_dst_blockchain_id: "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "robinhood";
|
|
855
|
+
token_dst_blockchain_id: "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "tron" | "robinhood" | "xrp" | "monad" | "ton" | "zcash" | "cardano";
|
|
852
856
|
amount: string;
|
|
853
857
|
quote_type: "exact_input";
|
|
854
858
|
partnerFee: _sodax_sdk.PartnerFeePercentage | {
|
|
@@ -1030,7 +1034,8 @@ type SwapSetupReason = 'stellarActivation' | 'stellarFunding' | 'stellarTrustlin
|
|
|
1030
1034
|
* - `checking` — waiting before anything can be done: a gate or the approval strategy is still reading, or a
|
|
1031
1035
|
* setup tx (activation, trustline, NEAR storage) is in flight or its check is refreshing.
|
|
1032
1036
|
* - `submitting` — the swap call is in flight: signing, and on the default backend path settlement too.
|
|
1033
|
-
* - `pending` — the source tx
|
|
1037
|
+
* - `pending` — the source tx status is being read, or a recovery handle is waiting for identification.
|
|
1038
|
+
* `error` is set when the swap call
|
|
1034
1039
|
* failed after broadcast, or when the status read cannot recover (a rejected API key); the swap may
|
|
1035
1040
|
* still complete either way. The read can also stop polling without an error (after its budget of
|
|
1036
1041
|
* ambiguous reads), so keep `reset()` reachable here.
|
|
@@ -1057,6 +1062,12 @@ type SwapLifecycleState = {
|
|
|
1057
1062
|
srcChainKey: SpokeChainKey;
|
|
1058
1063
|
srcTxHash: string;
|
|
1059
1064
|
error?: Error;
|
|
1065
|
+
} | {
|
|
1066
|
+
kind: 'pending';
|
|
1067
|
+
srcChainKey: SpokeChainKey;
|
|
1068
|
+
srcTxHash?: never;
|
|
1069
|
+
recovery: unknown;
|
|
1070
|
+
error: Error;
|
|
1060
1071
|
} | {
|
|
1061
1072
|
kind: 'unconfirmed';
|
|
1062
1073
|
batchId: string;
|
|
@@ -1515,7 +1526,7 @@ type UseSwapsApiApproveAndBroadcastVars<K extends SpokeChainKey = SpokeChainKey>
|
|
|
1515
1526
|
* if (!result.ok) return;
|
|
1516
1527
|
* const { resetTxHash, approveTxHash } = result.value; // resetTxHash only on a guarded token
|
|
1517
1528
|
*/
|
|
1518
|
-
declare const useSwapsApiApproveAndBroadcast: <K extends SpokeChainKey = "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "robinhood">({ mutationOptions, }?: MutationHookParams<SwapsApiApprovalHashes, UseSwapsApiApproveAndBroadcastVars<K>>) => SafeUseMutationResult<SwapsApiApprovalHashes, Error, UseSwapsApiApproveAndBroadcastVars<K>>;
|
|
1529
|
+
declare const useSwapsApiApproveAndBroadcast: <K extends SpokeChainKey = "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "tron" | "robinhood" | "xrp" | "monad" | "ton" | "zcash" | "cardano">({ mutationOptions, }?: MutationHookParams<SwapsApiApprovalHashes, UseSwapsApiApproveAndBroadcastVars<K>>) => SafeUseMutationResult<SwapsApiApprovalHashes, Error, UseSwapsApiApproveAndBroadcastVars<K>>;
|
|
1519
1530
|
|
|
1520
1531
|
type UseSwapsApiBroadcastWithApprovalVars = ApprovalOptions & {
|
|
1521
1532
|
/** The swap's create-intent params — the same body `/swaps/intents` built `intentTx` from. */
|
|
@@ -1857,13 +1868,16 @@ type DetailedBridgeStatusRead = Result<DetailedBridgeStatus, BridgeDetailedStatu
|
|
|
1857
1868
|
* how the read recovers when the outage ends.
|
|
1858
1869
|
*/
|
|
1859
1870
|
declare function isBridgeNotDelivered(data: DetailedBridgeStatusRead): boolean;
|
|
1871
|
+
/** A read the SDK tags `context.mpcRelay`: a bridge with an MPC-relay end, which gets the longer budget. */
|
|
1872
|
+
declare function isBridgeMpcRelayRead(data: DetailedBridgeStatusRead): boolean;
|
|
1860
1873
|
/**
|
|
1861
1874
|
* Polling interval for `useBridgeDetailedStatus`.
|
|
1862
1875
|
*
|
|
1863
1876
|
* Unlike the swap analog there is no in-flight second arm to wait on: the relay arm only ever
|
|
1864
|
-
* carries a matched `executed` packet,
|
|
1865
|
-
* terminal
|
|
1866
|
-
* run `MAX_NOT_FOUND_POLLS` times in a row
|
|
1877
|
+
* carries a matched `executed` packet, and the MPC-relay arm a minted deposit record, so both are
|
|
1878
|
+
* terminal on arrival. That leaves three stops — a terminal or abandoned backend record, a rejected
|
|
1879
|
+
* API key, and the ambiguous relay miss once it has run `MAX_NOT_FOUND_POLLS` times in a row, or
|
|
1880
|
+
* `MAX_MPC_RELAY_NOT_FOUND_POLLS` when the SDK tags it `context.mpcRelay`.
|
|
1867
1881
|
*
|
|
1868
1882
|
* Kept in its own pure module (no React/context imports) so it is unit-testable in dapp-kit's `node`
|
|
1869
1883
|
* test environment — importing the hook itself pulls in `useSodaxContext`.
|
|
@@ -1888,25 +1902,29 @@ type UseBridgeDetailedStatusResult = Result<DetailedBridgeStatus, BridgeDetailed
|
|
|
1888
1902
|
type UseBridgeDetailedStatusParams = ReadHookParams<UseBridgeDetailedStatusResult, {
|
|
1889
1903
|
srcChainKey: SpokeChainKey | undefined;
|
|
1890
1904
|
srcTxHash: string | undefined;
|
|
1905
|
+
/** The bridge's destination; from Tron to another spoke the read waits for that leg. */
|
|
1906
|
+
dstChainKey?: SpokeChainKey;
|
|
1891
1907
|
apiConfig?: RequestOverrideConfig;
|
|
1892
1908
|
}>;
|
|
1893
1909
|
/**
|
|
1894
1910
|
* Hook for monitoring a bridge from its source-chain transaction.
|
|
1895
1911
|
*
|
|
1896
1912
|
* `useBridgeApiSubmitTxStatus` needs the backend to still hold a usable record; this takes
|
|
1897
|
-
* `(srcChainKey, srcTxHash)` — the pair you hold after `bridge()`
|
|
1913
|
+
* `(srcChainKey, srcTxHash)` — the pair you hold after `bridge()`, plus `dstChainKey` for a bridge from Tron —
|
|
1914
|
+
* and routes to whichever source
|
|
1898
1915
|
* can answer, so it also covers a bridge the client-side fallback completed. `data.value` is
|
|
1899
1916
|
* discriminated on `source`, and each variant carries that source's payload unmodified.
|
|
1900
1917
|
*
|
|
1901
1918
|
* Polls every 3s. Stops once the answering source is terminal (a relay packet always is), once the
|
|
1902
1919
|
* backend rejects the API key, and — like `useDetailedStatus` — after 40 consecutive *ambiguous*
|
|
1903
|
-
* reads, meaning a `LOOKUP_FAILED` whose relay has no packet for the tx
|
|
1920
|
+
* reads, meaning a `LOOKUP_FAILED` whose relay has no packet for the tx — 100, about 5 minutes, for a bridge
|
|
1921
|
+
* with an MPC-relay end (`context.mpcRelay`), which settles more slowly. A dependency outage keeps
|
|
1904
1922
|
* polling instead, so the read recovers by itself; any real answer resets the budget. Override with
|
|
1905
1923
|
* `queryOptions.refetchInterval`.
|
|
1906
1924
|
*
|
|
1907
1925
|
* @example
|
|
1908
1926
|
* ```typescript
|
|
1909
|
-
* const { data } = useBridgeDetailedStatus({ params: { srcChainKey, srcTxHash } });
|
|
1927
|
+
* const { data } = useBridgeDetailedStatus({ params: { srcChainKey, srcTxHash, dstChainKey } });
|
|
1910
1928
|
* if (data?.ok && data.value.source === 'relay') console.log(data.value.data.dst_tx_hash);
|
|
1911
1929
|
* ```
|
|
1912
1930
|
*/
|
|
@@ -2047,7 +2065,7 @@ type UseBridgeApiApproveAndBroadcastVars<K extends SpokeChainKey = SpokeChainKey
|
|
|
2047
2065
|
* if (!result.ok) return;
|
|
2048
2066
|
* const { resetTxHash, approveTxHash } = result.value; // resetTxHash only on a guarded token
|
|
2049
2067
|
*/
|
|
2050
|
-
declare const useBridgeApiApproveAndBroadcast: <K extends SpokeChainKey = "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "robinhood">({ mutationOptions, }?: MutationHookParams<BridgeApiApprovalHashes, UseBridgeApiApproveAndBroadcastVars<K>>) => SafeUseMutationResult<BridgeApiApprovalHashes, Error, UseBridgeApiApproveAndBroadcastVars<K>>;
|
|
2068
|
+
declare const useBridgeApiApproveAndBroadcast: <K extends SpokeChainKey = "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "tron" | "robinhood" | "xrp" | "monad" | "ton" | "zcash" | "cardano">({ mutationOptions, }?: MutationHookParams<BridgeApiApprovalHashes, UseBridgeApiApproveAndBroadcastVars<K>>) => SafeUseMutationResult<BridgeApiApprovalHashes, Error, UseBridgeApiApproveAndBroadcastVars<K>>;
|
|
2051
2069
|
|
|
2052
2070
|
type UseBridgeApiBridgeableAmountParams = ReadHookParams<BridgeableAmountResponseV2 | undefined, {
|
|
2053
2071
|
body: BridgeQuoteRequestV2 | undefined;
|
|
@@ -2552,9 +2570,10 @@ type UseWithdrawHubAssetVars<K extends SpokeChainKey = SpokeChainKey> = Omit<Wit
|
|
|
2552
2570
|
* React hook for withdrawing a hub-side asset back to the user's spoke chain wallet.
|
|
2553
2571
|
*
|
|
2554
2572
|
* Throws on SDK failure so React Query's native error model engages (`isError`, `error`,
|
|
2555
|
-
* `onError`, `retry`). Returns the
|
|
2573
|
+
* `onError`, `retry`). Returns the spoke tx hash on success, or from an MPC-relay chain (Tron) the
|
|
2574
|
+
* relay's `trackingId`, which is not a tx hash: never link it to an explorer.
|
|
2556
2575
|
*/
|
|
2557
|
-
declare function useWithdrawHubAsset<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<
|
|
2576
|
+
declare function useWithdrawHubAsset<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<SendMessageReturnType<K, false>, UseWithdrawHubAssetVars<K>>): SafeUseMutationResult<SendMessageReturnType<K, false>, Error, UseWithdrawHubAssetVars<K>>;
|
|
2558
2577
|
|
|
2559
2578
|
/**
|
|
2560
2579
|
* Mutation variables for {@link useMigrateIcxToSoda}. Wraps `IcxMigrateAction<false>` with `raw`
|
|
@@ -2728,9 +2747,10 @@ type UseDexWithdrawVars<K extends SpokeChainKey = SpokeChainKey> = Omit<AssetWit
|
|
|
2728
2747
|
* React hook for withdrawing an asset from a DEX pool.
|
|
2729
2748
|
*
|
|
2730
2749
|
* Throws on SDK failure so React Query's native error model engages (`isError`, `error`,
|
|
2731
|
-
* `onError`, `retry`). Returns the unwrapped
|
|
2750
|
+
* `onError`, `retry`). Returns the unwrapped {@link OutboundSettlement} on success: a tx pair, or
|
|
2751
|
+
* from Tron the relay's `trackingId` beside the destination tx.
|
|
2732
2752
|
*/
|
|
2733
|
-
declare function useDexWithdraw<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<
|
|
2753
|
+
declare function useDexWithdraw<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<OutboundSettlement<K>, UseDexWithdrawVars<K>>): SafeUseMutationResult<OutboundSettlement<K>, Error, UseDexWithdrawVars<K>>;
|
|
2734
2754
|
|
|
2735
2755
|
type UseDexAllowanceParams<K extends SpokeChainKey = SpokeChainKey> = ReadHookParams<boolean, {
|
|
2736
2756
|
payload: CreateAssetDepositParams<K> | undefined;
|
|
@@ -2932,9 +2952,9 @@ declare function getLeverageYieldQuoteQueryOptions({ sodax, payload, }: {
|
|
|
2932
2952
|
}): {
|
|
2933
2953
|
queryKey: (string | {
|
|
2934
2954
|
token_src: string;
|
|
2935
|
-
token_src_blockchain_id: "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "robinhood";
|
|
2955
|
+
token_src_blockchain_id: "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "tron" | "robinhood" | "xrp" | "monad" | "ton" | "zcash" | "cardano";
|
|
2936
2956
|
token_dst: string;
|
|
2937
|
-
token_dst_blockchain_id: "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "robinhood";
|
|
2957
|
+
token_dst_blockchain_id: "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "tron" | "robinhood" | "xrp" | "monad" | "ton" | "zcash" | "cardano";
|
|
2938
2958
|
amount: string;
|
|
2939
2959
|
quote_type: "exact_input";
|
|
2940
2960
|
partnerFee: _sodax_sdk.PartnerFeePercentage | {
|
|
@@ -3788,7 +3808,7 @@ type UseLeverageYieldApiApproveAndBroadcastVars<K extends SpokeChainKey = SpokeC
|
|
|
3788
3808
|
* if (!result.ok) return;
|
|
3789
3809
|
* const { resetTxHash, approveTxHash } = result.value; // resetTxHash only on a guarded token
|
|
3790
3810
|
*/
|
|
3791
|
-
declare const useLeverageYieldApiApproveAndBroadcast: <K extends SpokeChainKey = "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "robinhood">({ mutationOptions, }?: MutationHookParams<LeverageYieldApiApprovalHashes, UseLeverageYieldApiApproveAndBroadcastVars<K>>) => SafeUseMutationResult<LeverageYieldApiApprovalHashes, Error, UseLeverageYieldApiApproveAndBroadcastVars<K>>;
|
|
3811
|
+
declare const useLeverageYieldApiApproveAndBroadcast: <K extends SpokeChainKey = "0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "injective-1" | "sonic" | "0x1.icon" | "sui" | "0xa.optimism" | "0x89.polygon" | "solana" | "stellar" | "hyper" | "lightlink" | "near" | "ethereum" | "bitcoin" | "redbelly" | "0x2019.kaia" | "stacks" | "hedera" | "tron" | "robinhood" | "xrp" | "monad" | "ton" | "zcash" | "cardano">({ mutationOptions, }?: MutationHookParams<LeverageYieldApiApprovalHashes, UseLeverageYieldApiApproveAndBroadcastVars<K>>) => SafeUseMutationResult<LeverageYieldApiApprovalHashes, Error, UseLeverageYieldApiApproveAndBroadcastVars<K>>;
|
|
3792
3812
|
|
|
3793
3813
|
/**
|
|
3794
3814
|
* Mutation variables for {@link useLeverageYieldApiCreateDepositIntent}. The per-request `apiConfig` override belongs here
|
|
@@ -4139,4 +4159,4 @@ type CreateSodaxQueryClientOptions = {
|
|
|
4139
4159
|
*/
|
|
4140
4160
|
declare function createSodaxQueryClient({ onMutationError, config, }?: CreateSodaxQueryClientOptions): QueryClient;
|
|
4141
4161
|
|
|
4142
|
-
export { type ATokenData, type ApprovalHashes, type ApprovalPlan, type ApprovalProgress, type ApprovalProgressListener, type BackendPaginationParams, type BalancesInputs, type BitcoinTradingSetup, type BridgeApiApprovalHashes, type CreateSodaxQueryClientOptions, type DecreaseLiquidityParamsCore, type DepositParamsCore, type LeverageYieldApiApprovalHashes, type LeverageYieldShareHolder, type LeverageYieldShareHolding, type MutationHookOptions, type MutationHookParams, type NearStorageCheckResult, type NearStorageGate, type NearStorageGateState, type RadfiSession, type ReadHookParams, type ReadQueryOptions, type ReserveUsdFormat, type SafeUseMutationResult, SodaxProvider, type StellarCheckResult, type StellarGate, type StellarGateInputs, type StellarGateState, type SwapLifecycle, type SwapLifecycleState, type SwapSetupReason, type SwapsApiApprovalHashes, type SwapsApiBroadcastWithApprovalResult, type UseATokenParams, type UseATokensBalancesParams, type UseActivateStellarAccountVars, type UseApproveLeveragePositionFundingVars, type UseApproveTokenVars, type UseBalancesParams, type UseBitcoinBalanceParams, type UseBitcoinTradingSetupParams, type UseBorrowVars, type UseBridgeAllowanceParams, type UseBridgeApiAllowanceParams, type UseBridgeApiApproveAndBroadcastVars, type UseBridgeApiApproveVars, type UseBridgeApiBridgeableAmountParams, type UseBridgeApiCreateBridgeIntentVars, type UseBridgeApiFeeParams, type UseBridgeApiIsBridgeableParams, type UseBridgeApiSubmitTxStatusParams, type UseBridgeApiSubmitTxVars, type UseBridgeApiTokensByChainParams, type UseBridgeApiTokensParams, type UseBridgeApprovalStrategyParams, type UseBridgeApproveVars, type UseBridgeDetailedStatusParams, type UseBridgeDetailedStatusResult, type UseBridgeVars, type UseBridgeWithApprovalVars, type UseClaimRewardsVars, type UseCreateDecreaseLiquidityParamsProps, type UseCreateDepositParamsProps, type UseCreateLimitOrderVars, type UseCreateSupplyLiquidityParamsProps, type UseCreateSupplyLiquidityParamsResult, type UseCreateWithdrawParamsProps, type UseDecreaseLiquidityVars, type UseDeriveUserWalletAddressParams, type UseDetailedStatusParams, type UseDetailedStatusResult, type UseDexAllowanceParams, type UseDexApproveVars, type UseDexDepositVars, type UseDexWithdrawVars, type UseEModesParams, type UseEnsureRadfiAccessTokenVars, type UseEstablishTrustlineVars, type UseExpiredUtxosParams, type UseFeeClaimSwapVars, type UseFeeClaimWithdrawVars, type UseFetchAssetsBalancesParams, type UseFundTradingWalletVars, type UseGetAutoSwapPreferencesParams, type UseGetBridgeableAmountParams, type UseGetBridgeableTokensParams, type UseGetIntentDetailsParams, type UseGetUserHubWalletAddressParams, type UseGetUserIntentParams, type UseHubAssetBalancesParams, type UseIsTokenApprovedParams, type UseLeveragePositionAccountParams, type UseLeveragePositionCollateralParams, type UseLeveragePositionFundingAllowanceParams, type UseLeveragePositionInfoParams, type UseLeveragePositionPayoutAddressParams, type UseLeveragePositionPendingParams, type UseLeveragePositionsForUserParams, type UseLeveragePositionsParams, type UseLeverageYieldApiAllowanceParams, type UseLeverageYieldApiApproveAndBroadcastVars, type UseLeverageYieldApiApproveVars, type UseLeverageYieldApiAprParams, type UseLeverageYieldApiAssetParams, type UseLeverageYieldApiCancelIntentVars, type UseLeverageYieldApiCreateDepositIntentVars, type UseLeverageYieldApiCreateWithdrawIntentVars, type UseLeverageYieldApiDeadlineParams, type UseLeverageYieldApiDepositQuoteParams, type UseLeverageYieldApiEffectiveAprParams, type UseLeverageYieldApiEstimateGasParams, type UseLeverageYieldApiFilledIntentParams, type UseLeverageYieldApiIntentExtraDataParams, type UseLeverageYieldApiIntentHashParams, type UseLeverageYieldApiIntentPacketParams, type UseLeverageYieldApiIntentParams, type UseLeverageYieldApiLsdAprParams, type UseLeverageYieldApiMaxWithdrawParams, type UseLeverageYieldApiPartnerFeeParams, type UseLeverageYieldApiPositionParams, type UseLeverageYieldApiPreviewDepositParams, type UseLeverageYieldApiPreviewRedeemParams, type UseLeverageYieldApiPreviewWithdrawParams, type UseLeverageYieldApiShareBalanceParams, type UseLeverageYieldApiSolverFeeParams, type UseLeverageYieldApiStatusParams, type UseLeverageYieldApiSubmitIntentVars, type UseLeverageYieldApiSubmitTxStatusParams, type UseLeverageYieldApiSubmitTxVars, type UseLeverageYieldApiTotalAssetsParams, type UseLeverageYieldApiVaultParams, type UseLeverageYieldApiVaultsParams, type UseLeverageYieldApiWithdrawQuoteParams, type UseLeverageYieldApprovalStrategyParams, type UseLeverageYieldDepositVars, type UseLeverageYieldDetailedStatusParams, type UseLeverageYieldDetailedStatusResult, type UseLeverageYieldEffectiveAprParams, type UseLeverageYieldNotifySolverVars, type UseLeverageYieldPositionParams, type UseLeverageYieldPreviewRedeemParams, type UseLeverageYieldQuoteParams, type UseLeverageYieldShareBalancesParams, type UseLeverageYieldTotalAssetsParams, type UseLeverageYieldVaultSwapVars, type UseLeverageYieldVaultSwapWithApprovalVars, type UseLeverageYieldWithdrawVars, type UseLiquidityAmountsResult, type UseMMAllowanceParams, type UseMMApproveVars, type UseMigrateBalnVars, type UseMigrateIcxToSodaVars, type UseMigratebnUSDVars, type UseMigrationAllowanceInputs, type UseMigrationAllowanceParams, type UseMigrationApproveVars, type UseNearStorageCheckParams, type UseNearStorageGateParams, type UseOpenLeveragePositionVars, type UsePartnerCancelIntentVars, type UsePoolBalancesParams, type UsePoolBalancesResponse, type UsePoolDataParams, type UsePoolsParams, type UsePositionInfoParams, type UsePositionInfoResponse, type UseQuoteParams, type UseRadfiAuthVars, type UseRadfiSessionReturn, type UseRadfiWithdrawVars, type UseRegisterNearStorageVars, type UseRenewUtxosVars, type UseRepayVars, type UseReservesDataParams, type UseReservesHumanizedParams, type UseReservesListParams, type UseReservesUsdFormatParams, type UseRevertMigrateSodaToIcxVars, type UseRunLeveragePositionOperationVars, type UseSetSwapPreferenceVars, type UseSetSwapPreferenceVarsHub, type UseSponsorConfigParams, type UseStatusParams, type UseStellarAccountActiveParams, type UseStellarAccountStatusParams, type UseStellarGateParams, type UseStellarTrustlineCheckParams, type UseSubmitLeveragePositionIntentVars, type UseSupplyLiquidityVars, type UseSupplyVars, type UseSwapAllowanceParams, type UseSwapApprovalStrategyParams, type UseSwapApproveVars, type UseSwapLifecycleParams, type UseSwapVars, type UseSwapWithApprovalVars, type UseSwapsApiAllowanceParams, type UseSwapsApiApproveAndBroadcastVars, type UseSwapsApiApproveVars, type UseSwapsApiBroadcastWithApprovalVars, type UseSwapsApiCancelIntentVars, type UseSwapsApiCreateIntentVars, type UseSwapsApiCreateLimitOrderVars, type UseSwapsApiDeadlineParams, type UseSwapsApiEstimateGasParams, type UseSwapsApiFilledIntentParams, type UseSwapsApiIntentExtraDataParams, type UseSwapsApiIntentHashParams, type UseSwapsApiIntentPacketParams, type UseSwapsApiIntentParams, type UseSwapsApiPartnerFeeParams, type UseSwapsApiQuoteParams, type UseSwapsApiSolverFeeParams, type UseSwapsApiStatusParams, type UseSwapsApiSubmitIntentVars, type UseSwapsApiSubmitTxStatusParams, type UseSwapsApiSubmitTxVars, type UseSwapsApiTokensByChainParams, type UseSwapsApiTokensParams, type UseTradingWalletBalanceParams, type UseUserFormattedSummaryParams, type UseUserReservesDataParams, type UseWithdrawHubAssetVars, type UseWithdrawVars, type UseXBalancesParams, type WithdrawParamsCore, type XBalancesInputs, clearRadfiSession, createDecreaseLiquidityParamsProps, createDepositParamsProps, createSodaxQueryClient, createSupplyLiquidityParamsProps, createWithdrawParamsProps, getBalancesQueryOptions, getBridgeDetailedStatusRefetchInterval, getLeverageYieldQuoteQueryOptions, getSponsorConfigQueryOptions, getStellarAccountActiveQueryOptions, getStellarAccountStatusQueryOptions, getStellarTrustlineCheckQueryOptions, getSwapQuoteQueryOptions, getXBalancesQueryOptions, invalidateBalances, isBridgeNotDelivered, isTerminalSwapIntentStatus, isUserRejectedError, loadRadfiSession, resolveNearStorageGate, resolveStellarGate, retryUnlessAuthFailure, runApprovalPlan, saveRadfiSession, toResult, unwrapResult, useAToken, useATokensBalances, useActivateStellarAccount, useApproveLeveragePositionFunding, useApproveToken, useBackendAllMoneyMarketAssets, useBackendAllMoneyMarketBorrowers, useBackendIntentByHash, useBackendIntentByTxHash, useBackendMoneyMarketAsset, useBackendMoneyMarketAssetBorrowers, useBackendMoneyMarketAssetSuppliers, useBackendMoneyMarketPosition, useBackendOracleCandles, useBackendOracleMarkets, useBackendOrderbook, useBackendUserIntents, useBalances, useBitcoinBalance, useBitcoinTradingSetup, useBorrow, useBridge, useBridgeAllowance, useBridgeApiAllowance, useBridgeApiApprove, useBridgeApiApproveAndBroadcast, useBridgeApiBridgeableAmount, useBridgeApiCreateBridgeIntent, useBridgeApiFee, useBridgeApiIsBridgeable, useBridgeApiSubmitTx, useBridgeApiSubmitTxStatus, useBridgeApiTokens, useBridgeApiTokensByChain, useBridgeApprovalStrategy, useBridgeApprove, useBridgeDetailedStatus, useBridgeWithApproval, useCancelLimitOrder, useCancelSwap, useCancelUnstake, useClaim, useClaimRewards, useConvertedAssets, useCreateDecreaseLiquidityParams, useCreateDepositParams, useCreateLimitOrder, useCreateSupplyLiquidityParams, useCreateWithdrawParams, useDecreaseLiquidity, useDeriveUserWalletAddress, useDetailedStatus, useDexAllowance, useDexApprove, useDexDeposit, useDexWithdraw, useEModes, useEnsureRadfiAccessToken, useEstablishTrustline, useEstimateGas, useExpiredUtxos, useFeeClaimSwap, useFeeClaimWithdraw, useFetchAssetsBalances, useFundTradingWallet, useGetAutoSwapPreferences, useGetBridgeableAmount, useGetBridgeableTokens, useGetIntentDetails, useGetUserHubWalletAddress, useGetUserIntent, useHubAssetBalances, useHubProvider, useInstantUnstake, useInstantUnstakeAllowance, useInstantUnstakeApprove, useInstantUnstakeRatio, useIsTokenApproved, useLeveragePositionAccount, useLeveragePositionCollateral, useLeveragePositionFundingAllowance, useLeveragePositionInfo, useLeveragePositionPayoutAddress, useLeveragePositionPending, useLeveragePositions, useLeveragePositionsForUser, useLeverageYieldApiAllowance, useLeverageYieldApiApprove, useLeverageYieldApiApproveAndBroadcast, useLeverageYieldApiApr, useLeverageYieldApiAsset, useLeverageYieldApiCancelIntent, useLeverageYieldApiCreateDepositIntent, useLeverageYieldApiCreateWithdrawIntent, useLeverageYieldApiDeadline, useLeverageYieldApiDepositQuote, useLeverageYieldApiEffectiveApr, useLeverageYieldApiEstimateGas, useLeverageYieldApiFilledIntent, useLeverageYieldApiIntent, useLeverageYieldApiIntentExtraData, useLeverageYieldApiIntentHash, useLeverageYieldApiIntentPacket, useLeverageYieldApiLsdApr, useLeverageYieldApiMaxWithdraw, useLeverageYieldApiPartnerFee, useLeverageYieldApiPosition, useLeverageYieldApiPreviewDeposit, useLeverageYieldApiPreviewRedeem, useLeverageYieldApiPreviewWithdraw, useLeverageYieldApiShareBalance, useLeverageYieldApiSolverFee, useLeverageYieldApiStatus, useLeverageYieldApiSubmitIntent, useLeverageYieldApiSubmitTx, useLeverageYieldApiSubmitTxStatus, useLeverageYieldApiTotalAssets, useLeverageYieldApiVault, useLeverageYieldApiVaults, useLeverageYieldApiWithdrawQuote, useLeverageYieldApprovalStrategy, useLeverageYieldDeposit, useLeverageYieldDetailedStatus, useLeverageYieldEffectiveApr, useLeverageYieldNotifySolver, useLeverageYieldPosition, useLeverageYieldPreviewRedeem, useLeverageYieldQuote, useLeverageYieldShareBalances, useLeverageYieldTotalAssets, useLeverageYieldVaultSwap, useLeverageYieldVaultSwapWithApproval, useLeverageYieldWithdraw, useLiquidityAmounts, useMMAllowance, useMMApprove, useMigrateBaln, useMigrateIcxToSoda, useMigratebnUSD, useMigrationAllowance, useMigrationApprove, useNearStorageCheck, useNearStorageGate, useOpenLeveragePosition, usePartnerCancelIntent, usePoolBalances, usePoolData, usePools, usePositionInfo, useQuote, useRadfiAuth, useRadfiSession, useRadfiWithdraw, useRegisterNearStorage, useRenewUtxos, useRepay, useRequestTrustline, useReservesData, useReservesHumanized, useReservesList, useReservesUsdFormat, useRevertMigrateSodaToIcx, useRunLeveragePositionOperation, useSafeMutation, useSetSwapPreference, useSodaxContext, useSponsorConfig, useStake, useStakeAllowance, useStakeApprove, useStakeRatio, useStakingConfig, useStakingInfo, useStatus, useStellarAccountActive, useStellarAccountStatus, useStellarGate, useStellarTrustlineCheck, useSubmitLeveragePositionIntent, useSupply, useSupplyLiquidity, useSwap, useSwapAllowance, useSwapApprovalStrategy, useSwapApprove, useSwapLifecycle, useSwapWithApproval, useSwapsApiAllowance, useSwapsApiApprove, useSwapsApiApproveAndBroadcast, useSwapsApiBroadcastWithApproval, useSwapsApiCancelIntent, useSwapsApiCreateIntent, useSwapsApiCreateLimitOrder, useSwapsApiDeadline, useSwapsApiEstimateGas, useSwapsApiFilledIntent, useSwapsApiIntent, useSwapsApiIntentExtraData, useSwapsApiIntentHash, useSwapsApiIntentPacket, useSwapsApiPartnerFee, useSwapsApiQuote, useSwapsApiSolverFee, useSwapsApiStatus, useSwapsApiSubmitIntent, useSwapsApiSubmitTx, useSwapsApiSubmitTxStatus, useSwapsApiTokens, useSwapsApiTokensByChain, useTradingWallet, useTradingWalletBalance, useUnstake, useUnstakeAllowance, useUnstakeApprove, useUnstakingInfo, useUnstakingInfoWithPenalty, useUserFormattedSummary, useUserReservesData, useWithdraw, useWithdrawHubAsset, useXBalances };
|
|
4162
|
+
export { type ATokenData, type ApprovalHashes, type ApprovalPlan, type ApprovalProgress, type ApprovalProgressListener, type BackendPaginationParams, type BalancesInputs, type BitcoinTradingSetup, type BridgeApiApprovalHashes, type CreateSodaxQueryClientOptions, type DecreaseLiquidityParamsCore, type DepositParamsCore, type LeverageYieldApiApprovalHashes, type LeverageYieldShareHolder, type LeverageYieldShareHolding, type MutationHookOptions, type MutationHookParams, type NearStorageCheckResult, type NearStorageGate, type NearStorageGateState, type RadfiSession, type ReadHookParams, type ReadQueryOptions, type ReserveUsdFormat, type SafeUseMutationResult, SodaxProvider, type StellarCheckResult, type StellarGate, type StellarGateInputs, type StellarGateState, type SwapLifecycle, type SwapLifecycleState, type SwapSetupReason, type SwapsApiApprovalHashes, type SwapsApiBroadcastWithApprovalResult, type UseATokenParams, type UseATokensBalancesParams, type UseActivateStellarAccountVars, type UseApproveLeveragePositionFundingVars, type UseApproveTokenVars, type UseBalancesParams, type UseBitcoinBalanceParams, type UseBitcoinTradingSetupParams, type UseBorrowVars, type UseBridgeAllowanceParams, type UseBridgeApiAllowanceParams, type UseBridgeApiApproveAndBroadcastVars, type UseBridgeApiApproveVars, type UseBridgeApiBridgeableAmountParams, type UseBridgeApiCreateBridgeIntentVars, type UseBridgeApiFeeParams, type UseBridgeApiIsBridgeableParams, type UseBridgeApiSubmitTxStatusParams, type UseBridgeApiSubmitTxVars, type UseBridgeApiTokensByChainParams, type UseBridgeApiTokensParams, type UseBridgeApprovalStrategyParams, type UseBridgeApproveVars, type UseBridgeDetailedStatusParams, type UseBridgeDetailedStatusResult, type UseBridgeVars, type UseBridgeWithApprovalVars, type UseClaimRewardsVars, type UseCreateDecreaseLiquidityParamsProps, type UseCreateDepositParamsProps, type UseCreateLimitOrderVars, type UseCreateSupplyLiquidityParamsProps, type UseCreateSupplyLiquidityParamsResult, type UseCreateWithdrawParamsProps, type UseDecreaseLiquidityVars, type UseDeriveUserWalletAddressParams, type UseDetailedStatusParams, type UseDetailedStatusResult, type UseDexAllowanceParams, type UseDexApproveVars, type UseDexDepositVars, type UseDexWithdrawVars, type UseEModesParams, type UseEnsureRadfiAccessTokenVars, type UseEstablishTrustlineVars, type UseExpiredUtxosParams, type UseFeeClaimSwapVars, type UseFeeClaimWithdrawVars, type UseFetchAssetsBalancesParams, type UseFundTradingWalletVars, type UseGetAutoSwapPreferencesParams, type UseGetBridgeableAmountParams, type UseGetBridgeableTokensParams, type UseGetIntentDetailsParams, type UseGetUserHubWalletAddressParams, type UseGetUserIntentParams, type UseHubAssetBalancesParams, type UseIsTokenApprovedParams, type UseLeveragePositionAccountParams, type UseLeveragePositionCollateralParams, type UseLeveragePositionFundingAllowanceParams, type UseLeveragePositionInfoParams, type UseLeveragePositionPayoutAddressParams, type UseLeveragePositionPendingParams, type UseLeveragePositionsForUserParams, type UseLeveragePositionsParams, type UseLeverageYieldApiAllowanceParams, type UseLeverageYieldApiApproveAndBroadcastVars, type UseLeverageYieldApiApproveVars, type UseLeverageYieldApiAprParams, type UseLeverageYieldApiAssetParams, type UseLeverageYieldApiCancelIntentVars, type UseLeverageYieldApiCreateDepositIntentVars, type UseLeverageYieldApiCreateWithdrawIntentVars, type UseLeverageYieldApiDeadlineParams, type UseLeverageYieldApiDepositQuoteParams, type UseLeverageYieldApiEffectiveAprParams, type UseLeverageYieldApiEstimateGasParams, type UseLeverageYieldApiFilledIntentParams, type UseLeverageYieldApiIntentExtraDataParams, type UseLeverageYieldApiIntentHashParams, type UseLeverageYieldApiIntentPacketParams, type UseLeverageYieldApiIntentParams, type UseLeverageYieldApiLsdAprParams, type UseLeverageYieldApiMaxWithdrawParams, type UseLeverageYieldApiPartnerFeeParams, type UseLeverageYieldApiPositionParams, type UseLeverageYieldApiPreviewDepositParams, type UseLeverageYieldApiPreviewRedeemParams, type UseLeverageYieldApiPreviewWithdrawParams, type UseLeverageYieldApiShareBalanceParams, type UseLeverageYieldApiSolverFeeParams, type UseLeverageYieldApiStatusParams, type UseLeverageYieldApiSubmitIntentVars, type UseLeverageYieldApiSubmitTxStatusParams, type UseLeverageYieldApiSubmitTxVars, type UseLeverageYieldApiTotalAssetsParams, type UseLeverageYieldApiVaultParams, type UseLeverageYieldApiVaultsParams, type UseLeverageYieldApiWithdrawQuoteParams, type UseLeverageYieldApprovalStrategyParams, type UseLeverageYieldDepositVars, type UseLeverageYieldDetailedStatusParams, type UseLeverageYieldDetailedStatusResult, type UseLeverageYieldEffectiveAprParams, type UseLeverageYieldNotifySolverVars, type UseLeverageYieldPositionParams, type UseLeverageYieldPreviewRedeemParams, type UseLeverageYieldQuoteParams, type UseLeverageYieldShareBalancesParams, type UseLeverageYieldTotalAssetsParams, type UseLeverageYieldVaultSwapVars, type UseLeverageYieldVaultSwapWithApprovalVars, type UseLeverageYieldWithdrawVars, type UseLiquidityAmountsResult, type UseMMAllowanceParams, type UseMMApproveVars, type UseMigrateBalnVars, type UseMigrateIcxToSodaVars, type UseMigratebnUSDVars, type UseMigrationAllowanceInputs, type UseMigrationAllowanceParams, type UseMigrationApproveVars, type UseNearStorageCheckParams, type UseNearStorageGateParams, type UseOpenLeveragePositionVars, type UsePartnerCancelIntentVars, type UsePoolBalancesParams, type UsePoolBalancesResponse, type UsePoolDataParams, type UsePoolsParams, type UsePositionInfoParams, type UsePositionInfoResponse, type UseQuoteParams, type UseRadfiAuthVars, type UseRadfiSessionReturn, type UseRadfiWithdrawVars, type UseRegisterNearStorageVars, type UseRenewUtxosVars, type UseRepayVars, type UseReservesDataParams, type UseReservesHumanizedParams, type UseReservesListParams, type UseReservesUsdFormatParams, type UseRevertMigrateSodaToIcxVars, type UseRunLeveragePositionOperationVars, type UseSetSwapPreferenceVars, type UseSetSwapPreferenceVarsHub, type UseSponsorConfigParams, type UseStatusParams, type UseStellarAccountActiveParams, type UseStellarAccountStatusParams, type UseStellarGateParams, type UseStellarTrustlineCheckParams, type UseSubmitLeveragePositionIntentVars, type UseSupplyLiquidityVars, type UseSupplyVars, type UseSwapAllowanceParams, type UseSwapApprovalStrategyParams, type UseSwapApproveVars, type UseSwapLifecycleParams, type UseSwapVars, type UseSwapWithApprovalVars, type UseSwapsApiAllowanceParams, type UseSwapsApiApproveAndBroadcastVars, type UseSwapsApiApproveVars, type UseSwapsApiBroadcastWithApprovalVars, type UseSwapsApiCancelIntentVars, type UseSwapsApiCreateIntentVars, type UseSwapsApiCreateLimitOrderVars, type UseSwapsApiDeadlineParams, type UseSwapsApiEstimateGasParams, type UseSwapsApiFilledIntentParams, type UseSwapsApiIntentExtraDataParams, type UseSwapsApiIntentHashParams, type UseSwapsApiIntentPacketParams, type UseSwapsApiIntentParams, type UseSwapsApiPartnerFeeParams, type UseSwapsApiQuoteParams, type UseSwapsApiSolverFeeParams, type UseSwapsApiStatusParams, type UseSwapsApiSubmitIntentVars, type UseSwapsApiSubmitTxStatusParams, type UseSwapsApiSubmitTxVars, type UseSwapsApiTokensByChainParams, type UseSwapsApiTokensParams, type UseTradingWalletBalanceParams, type UseUserFormattedSummaryParams, type UseUserReservesDataParams, type UseWithdrawHubAssetVars, type UseWithdrawVars, type UseXBalancesParams, type WithdrawParamsCore, type XBalancesInputs, clearRadfiSession, createDecreaseLiquidityParamsProps, createDepositParamsProps, createSodaxQueryClient, createSupplyLiquidityParamsProps, createWithdrawParamsProps, getBalancesQueryOptions, getBridgeDetailedStatusRefetchInterval, getLeverageYieldQuoteQueryOptions, getSponsorConfigQueryOptions, getStellarAccountActiveQueryOptions, getStellarAccountStatusQueryOptions, getStellarTrustlineCheckQueryOptions, getSwapQuoteQueryOptions, getXBalancesQueryOptions, invalidateBalances, isBridgeMpcRelayRead, isBridgeNotDelivered, isTerminalSwapIntentStatus, isUserRejectedError, loadRadfiSession, resolveNearStorageGate, resolveStellarGate, retryUnlessAuthFailure, runApprovalPlan, saveRadfiSession, toResult, unwrapResult, useAToken, useATokensBalances, useActivateStellarAccount, useApproveLeveragePositionFunding, useApproveToken, useBackendAllMoneyMarketAssets, useBackendAllMoneyMarketBorrowers, useBackendIntentByHash, useBackendIntentByTxHash, useBackendMoneyMarketAsset, useBackendMoneyMarketAssetBorrowers, useBackendMoneyMarketAssetSuppliers, useBackendMoneyMarketPosition, useBackendOracleCandles, useBackendOracleMarkets, useBackendOrderbook, useBackendUserIntents, useBalances, useBitcoinBalance, useBitcoinTradingSetup, useBorrow, useBridge, useBridgeAllowance, useBridgeApiAllowance, useBridgeApiApprove, useBridgeApiApproveAndBroadcast, useBridgeApiBridgeableAmount, useBridgeApiCreateBridgeIntent, useBridgeApiFee, useBridgeApiIsBridgeable, useBridgeApiSubmitTx, useBridgeApiSubmitTxStatus, useBridgeApiTokens, useBridgeApiTokensByChain, useBridgeApprovalStrategy, useBridgeApprove, useBridgeDetailedStatus, useBridgeWithApproval, useCancelLimitOrder, useCancelSwap, useCancelUnstake, useClaim, useClaimRewards, useConvertedAssets, useCreateDecreaseLiquidityParams, useCreateDepositParams, useCreateLimitOrder, useCreateSupplyLiquidityParams, useCreateWithdrawParams, useDecreaseLiquidity, useDeriveUserWalletAddress, useDetailedStatus, useDexAllowance, useDexApprove, useDexDeposit, useDexWithdraw, useEModes, useEnsureRadfiAccessToken, useEstablishTrustline, useEstimateGas, useExpiredUtxos, useFeeClaimSwap, useFeeClaimWithdraw, useFetchAssetsBalances, useFundTradingWallet, useGetAutoSwapPreferences, useGetBridgeableAmount, useGetBridgeableTokens, useGetIntentDetails, useGetUserHubWalletAddress, useGetUserIntent, useHubAssetBalances, useHubProvider, useInstantUnstake, useInstantUnstakeAllowance, useInstantUnstakeApprove, useInstantUnstakeRatio, useIsTokenApproved, useLeveragePositionAccount, useLeveragePositionCollateral, useLeveragePositionFundingAllowance, useLeveragePositionInfo, useLeveragePositionPayoutAddress, useLeveragePositionPending, useLeveragePositions, useLeveragePositionsForUser, useLeverageYieldApiAllowance, useLeverageYieldApiApprove, useLeverageYieldApiApproveAndBroadcast, useLeverageYieldApiApr, useLeverageYieldApiAsset, useLeverageYieldApiCancelIntent, useLeverageYieldApiCreateDepositIntent, useLeverageYieldApiCreateWithdrawIntent, useLeverageYieldApiDeadline, useLeverageYieldApiDepositQuote, useLeverageYieldApiEffectiveApr, useLeverageYieldApiEstimateGas, useLeverageYieldApiFilledIntent, useLeverageYieldApiIntent, useLeverageYieldApiIntentExtraData, useLeverageYieldApiIntentHash, useLeverageYieldApiIntentPacket, useLeverageYieldApiLsdApr, useLeverageYieldApiMaxWithdraw, useLeverageYieldApiPartnerFee, useLeverageYieldApiPosition, useLeverageYieldApiPreviewDeposit, useLeverageYieldApiPreviewRedeem, useLeverageYieldApiPreviewWithdraw, useLeverageYieldApiShareBalance, useLeverageYieldApiSolverFee, useLeverageYieldApiStatus, useLeverageYieldApiSubmitIntent, useLeverageYieldApiSubmitTx, useLeverageYieldApiSubmitTxStatus, useLeverageYieldApiTotalAssets, useLeverageYieldApiVault, useLeverageYieldApiVaults, useLeverageYieldApiWithdrawQuote, useLeverageYieldApprovalStrategy, useLeverageYieldDeposit, useLeverageYieldDetailedStatus, useLeverageYieldEffectiveApr, useLeverageYieldNotifySolver, useLeverageYieldPosition, useLeverageYieldPreviewRedeem, useLeverageYieldQuote, useLeverageYieldShareBalances, useLeverageYieldTotalAssets, useLeverageYieldVaultSwap, useLeverageYieldVaultSwapWithApproval, useLeverageYieldWithdraw, useLiquidityAmounts, useMMAllowance, useMMApprove, useMigrateBaln, useMigrateIcxToSoda, useMigratebnUSD, useMigrationAllowance, useMigrationApprove, useNearStorageCheck, useNearStorageGate, useOpenLeveragePosition, usePartnerCancelIntent, usePoolBalances, usePoolData, usePools, usePositionInfo, useQuote, useRadfiAuth, useRadfiSession, useRadfiWithdraw, useRegisterNearStorage, useRenewUtxos, useRepay, useRequestTrustline, useReservesData, useReservesHumanized, useReservesList, useReservesUsdFormat, useRevertMigrateSodaToIcx, useRunLeveragePositionOperation, useSafeMutation, useSetSwapPreference, useSodaxContext, useSponsorConfig, useStake, useStakeAllowance, useStakeApprove, useStakeRatio, useStakingConfig, useStakingInfo, useStatus, useStellarAccountActive, useStellarAccountStatus, useStellarGate, useStellarTrustlineCheck, useSubmitLeveragePositionIntent, useSupply, useSupplyLiquidity, useSwap, useSwapAllowance, useSwapApprovalStrategy, useSwapApprove, useSwapLifecycle, useSwapWithApproval, useSwapsApiAllowance, useSwapsApiApprove, useSwapsApiApproveAndBroadcast, useSwapsApiBroadcastWithApproval, useSwapsApiCancelIntent, useSwapsApiCreateIntent, useSwapsApiCreateLimitOrder, useSwapsApiDeadline, useSwapsApiEstimateGas, useSwapsApiFilledIntent, useSwapsApiIntent, useSwapsApiIntentExtraData, useSwapsApiIntentHash, useSwapsApiIntentPacket, useSwapsApiPartnerFee, useSwapsApiQuote, useSwapsApiSolverFee, useSwapsApiStatus, useSwapsApiSubmitIntent, useSwapsApiSubmitTx, useSwapsApiSubmitTxStatus, useSwapsApiTokens, useSwapsApiTokensByChain, useTradingWallet, useTradingWalletBalance, useUnstake, useUnstakeAllowance, useUnstakeApprove, useUnstakingInfo, useUnstakingInfoWithPenalty, useUserFormattedSummary, useUserReservesData, useWithdraw, useWithdrawHubAsset, useXBalances };
|