@sodax/dapp-kit 2.2.0-rc.5 → 2.2.0-rc.7
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/README.md +77 -7
- package/dist/index.d.ts +382 -14
- package/dist/index.mjs +336 -38
- package/package.json +4 -4
- package/src/hooks/_mutationContract.test.ts +4 -0
- package/src/hooks/bridge/getBridgeDetailedStatusRefetchInterval.test.ts +144 -0
- package/src/hooks/bridge/getBridgeDetailedStatusRefetchInterval.ts +52 -0
- package/src/hooks/bridge/index.ts +2 -0
- package/src/hooks/bridge/useBridgeDetailedStatus.test.ts +93 -0
- package/src/hooks/bridge/useBridgeDetailedStatus.ts +79 -0
- package/src/hooks/bridgeApi/getBridgeSubmitTxStatusRefetchInterval.test.ts +81 -0
- package/src/hooks/bridgeApi/getBridgeSubmitTxStatusRefetchInterval.ts +25 -0
- package/src/hooks/bridgeApi/useBridgeApiAllowance.ts +2 -1
- package/src/hooks/bridgeApi/useBridgeApiApprove.ts +2 -1
- package/src/hooks/bridgeApi/useBridgeApiBridgeableAmount.ts +2 -1
- package/src/hooks/bridgeApi/useBridgeApiCreateBridgeIntent.ts +2 -1
- package/src/hooks/bridgeApi/useBridgeApiFee.ts +2 -1
- package/src/hooks/bridgeApi/useBridgeApiIsBridgeable.ts +2 -1
- package/src/hooks/bridgeApi/useBridgeApiSubmitTx.ts +5 -3
- package/src/hooks/bridgeApi/useBridgeApiSubmitTxStatus.test.ts +63 -0
- package/src/hooks/bridgeApi/useBridgeApiSubmitTxStatus.ts +7 -10
- package/src/hooks/bridgeApi/useBridgeApiTokens.ts +2 -1
- package/src/hooks/bridgeApi/useBridgeApiTokensByChain.ts +2 -1
- package/src/hooks/leverageYield/index.ts +13 -0
- package/src/hooks/leverageYield/useApproveLeveragePositionFunding.ts +48 -0
- package/src/hooks/leverageYield/useLeveragePositionAccount.ts +45 -0
- package/src/hooks/leverageYield/useLeveragePositionCollateral.ts +47 -0
- package/src/hooks/leverageYield/useLeveragePositionFundingAllowance.ts +51 -0
- package/src/hooks/leverageYield/useLeveragePositionInfo.ts +39 -0
- package/src/hooks/leverageYield/useLeveragePositionPayoutAddress.ts +36 -0
- package/src/hooks/leverageYield/useLeveragePositionPending.ts +48 -0
- package/src/hooks/leverageYield/useLeveragePositions.ts +41 -0
- package/src/hooks/leverageYield/useLeveragePositionsForUser.ts +45 -0
- package/src/hooks/leverageYield/useLeverageYieldDetailedStatus.test.ts +131 -0
- package/src/hooks/leverageYield/useLeverageYieldDetailedStatus.ts +83 -0
- package/src/hooks/leverageYield/useLeverageYieldVaultSwap.ts +13 -3
- package/src/hooks/leverageYield/useOpenLeveragePosition.ts +59 -0
- package/src/hooks/leverageYield/useRunLeveragePositionOperation.ts +63 -0
- package/src/hooks/leverageYield/useSubmitLeveragePositionIntent.ts +55 -0
- package/src/hooks/leverageYieldApi/index.ts +2 -2
- package/src/hooks/mm/index.ts +1 -0
- package/src/hooks/mm/useEModes.ts +31 -0
- package/src/hooks/shared/notFoundStreak.ts +59 -0
- package/src/hooks/shared/retryUnlessAuthFailure.ts +1 -1
- package/src/hooks/{swap/getSwapStatusRefetchInterval.test.ts → shared/solverStatusPolicy.test.ts} +25 -25
- package/src/hooks/shared/solverStatusPolicy.ts +117 -0
- package/src/hooks/swap/useDetailedStatus.test.ts +65 -21
- package/src/hooks/swap/useDetailedStatus.ts +9 -9
- package/src/hooks/swap/useStatus.ts +4 -7
- package/src/hooks/swapsApi/index.ts +2 -2
- package/src/hooks/swapsApi/useSwapsApiSubmitTxStatus.ts +2 -2
- package/src/hooks/swap/getSwapStatusRefetchInterval.ts +0 -126
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, TxHashPair, MoneyMarketRepayActionParams, MoneyMarketSupplyActionParams, MoneyMarketWithdrawActionParams, UserReserveData, AggregatedReserveData, BaseCurrencyInfo, ReservesDataHumanized, Address as Address$1, MoneyMarketParams, MoneyMarketApproveActionParams, TxReturnType, Erc20Token, ChainKey, ReserveDataHumanized, FormatReserveUSDResponse, FormatUserSummaryResponse, SolverIntentQuoteRequest, SwapActionParams, SwapResponse, SolverIntentStatusResponse, SolverErrorResponse, Hex, DetailedSwapStatus, DetailedStatusError, CreateIntentParams, CreateLimitOrderParams, 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, CreateIntentResponseV2, SubmitIntentRequestV2, SubmitIntentResponseV2, StatusResponseV2, SwapIntentStatusCodeV2, CancelIntentRequestV2, CancelIntentResponseV2, IntentHashResponseV2, IntentRequestV2, IntentPacketResponseV2, IntentPacketRequestV2, IntentExtraDataResponseV2, IntentExtraDataRequestV2, IntentStateV2, GetIntentResponseV2, CreateLimitOrderParamsV2, CreateLimitOrderResponseV2, GasEstimateResponseV2, GasEstimateRequestV2, FeeResponseV2, SubmitTxRequestV2, SubmitTxResponseV2, SubmitTxStatusResponseV2, BridgeParams, CreateBridgeIntentParams, 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, 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, VaultSwapActionParams, VaultSwapResponse, LeverageYieldSwapWithdrawParams, GetLeverageVaultsResponseV2, GetLeverageVaultResponseV2, VaultAssetResponseV2, LeverageYieldPositionV2, LeverageYieldAprV2, LeverageYieldEffectiveAprV2, LeverageYieldLsdAprV2, VaultTotalAssetsResponseV2, PreviewDepositResponseV2, PreviewWithdrawResponseV2, PreviewRedeemResponseV2, ShareBalanceResponseV2, MaxWithdrawResponseV2, LeverageYieldDepositQuoteRequestV2, LeverageYieldWithdrawQuoteRequestV2, CreateDepositIntentParamsV2, CreateWithdrawIntentParamsV2, LeverageYieldSubmitTxRequestV2, ActivateStellarAccountParams, StellarSponsorConfig, SodaxOptions } from '@sodax/sdk';
|
|
3
|
+
import { Result, Sodax, SpokeChainKey, GetEstimateGasReturnType, EstimateGasParams, StellarChainKey, IStellarWalletProvider, INearWalletProvider, GetWalletProviderType, StellarAccountStatus, ActivateStellarAccountResult, IXServiceBase, XToken, EvmHubProvider, IBitcoinWalletProvider, RadfiWalletBalance, IWalletProvider, RadfiUtxo, MoneyMarketBorrowActionParams, TxHashPair, MoneyMarketRepayActionParams, 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, 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, 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, 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, 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, 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';
|
|
@@ -33,7 +33,7 @@ import { ReactNode, ReactElement } from 'react';
|
|
|
33
33
|
declare function isUserRejectedError(error: unknown): boolean;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* Default React Query `retry` policy for the backend swaps-
|
|
36
|
+
* Default React Query `retry` policy for the backend API hooks (swaps, leverage-yield, bridge): replay a transport blip, never a
|
|
37
37
|
* terminal API-key rejection (see `isAuthFailure`). Retrying a rejected key only multiplies doomed
|
|
38
38
|
* requests before the consumer sees the error.
|
|
39
39
|
*
|
|
@@ -807,6 +807,24 @@ type UseUserFormattedSummaryParams = ReadHookParams<FormatUserSummaryResponse<Fo
|
|
|
807
807
|
*/
|
|
808
808
|
declare function useUserFormattedSummary({ params, queryOptions, }?: UseUserFormattedSummaryParams): UseQueryResult<FormatUserSummaryResponse<FormatReserveUSDResponse>, Error>;
|
|
809
809
|
|
|
810
|
+
type UseEModesParams = ReadHookParams<EmodeDataHumanized[]>;
|
|
811
|
+
/**
|
|
812
|
+
* Reads the pool's configured eMode categories — LTV, liquidation threshold and bonus in basis
|
|
813
|
+
* points, plus the collateral/borrowable bitmaps and label.
|
|
814
|
+
*
|
|
815
|
+
* A category's LTV replaces the reserve's own when a user opts into it, so anything projecting
|
|
816
|
+
* borrowing power for an eMode position must read it from here rather than from the reserve.
|
|
817
|
+
* Categories only change by governance, so this is not polled.
|
|
818
|
+
*
|
|
819
|
+
* @example
|
|
820
|
+
* ```typescript
|
|
821
|
+
* const { data: categories } = useEModes();
|
|
822
|
+
* const cat = categories?.find(c => Number(c.id) === selected);
|
|
823
|
+
* const ltv = Number(cat?.eMode.ltv ?? 0) / 10_000;
|
|
824
|
+
* ```
|
|
825
|
+
*/
|
|
826
|
+
declare function useEModes({ queryOptions }?: UseEModesParams): UseQueryResult<EmodeDataHumanized[], Error>;
|
|
827
|
+
|
|
810
828
|
/**
|
|
811
829
|
* Derived from the SDK method rather than restated, so the error union stays exact and cannot
|
|
812
830
|
* drift. `undefined` is the disabled state, before a `payload` exists.
|
|
@@ -900,9 +918,9 @@ type UseDetailedStatusParams = ReadHookParams<UseDetailedStatusResult, {
|
|
|
900
918
|
* `data.value` is discriminated on `source`, and each variant carries that source's payload
|
|
901
919
|
* unmodified.
|
|
902
920
|
*
|
|
903
|
-
* Polls every 3s. Stops once the answering source is terminal,
|
|
904
|
-
* consecutive *ambiguous* reads: a solver `NOT_FOUND`, or a
|
|
905
|
-
* packet for the tx. Neither can distinguish "still in flight" from "never will be", so the budget
|
|
921
|
+
* Polls every 3s. Stops once the answering source is terminal, once the backend rejects the API
|
|
922
|
+
* key, and — like `useStatus` — after 40 consecutive *ambiguous* reads: a solver `NOT_FOUND`, or a
|
|
923
|
+
* `LOOKUP_FAILED` whose relay has no packet for the tx. Neither can distinguish "still in flight" from "never will be", so the budget
|
|
906
924
|
* is what stops a swap nothing can resolve. A dependency outage — relay unreachable, solver down —
|
|
907
925
|
* keeps polling instead, so the read recovers by itself; any real status resets the budget.
|
|
908
926
|
* Override with `queryOptions.refetchInterval`.
|
|
@@ -1567,7 +1585,7 @@ type UseSwapsApiSubmitTxStatusParams = ReadHookParams<SubmitTxStatusResponseV2 |
|
|
|
1567
1585
|
/**
|
|
1568
1586
|
* React hook for polling the processing status of a submitted swap transaction via the swaps API —
|
|
1569
1587
|
* `sodax.api.swaps.getSubmitTxStatus`. Both `txHash` and `srcChainKey` are required for the query
|
|
1570
|
-
* to run (the swaps API
|
|
1588
|
+
* to run (the swaps API status query requires the source chain key).
|
|
1571
1589
|
*
|
|
1572
1590
|
* @example
|
|
1573
1591
|
* const { data: status } = useSwapsApiSubmitTxStatus({
|
|
@@ -1581,6 +1599,31 @@ type UseSwapsApiSubmitTxStatusParams = ReadHookParams<SubmitTxStatusResponseV2 |
|
|
|
1581
1599
|
*/
|
|
1582
1600
|
declare const useSwapsApiSubmitTxStatus: ({ params, queryOptions, }?: UseSwapsApiSubmitTxStatusParams) => UseQueryResult<SubmitTxStatusResponseV2 | undefined, Error>;
|
|
1583
1601
|
|
|
1602
|
+
/**
|
|
1603
|
+
* Structural mirror of `useBridgeDetailedStatus`'s data type. Declared locally rather than imported
|
|
1604
|
+
* so this module does not own the hook's public contract.
|
|
1605
|
+
*/
|
|
1606
|
+
type DetailedBridgeStatusRead = Result<DetailedBridgeStatus, BridgeDetailedStatusError> | undefined;
|
|
1607
|
+
/**
|
|
1608
|
+
* The read the budget counts: the relay has no packet for this source tx *and* the backend answered,
|
|
1609
|
+
* so the miss is real rather than unprovable. Every other `LOOKUP_FAILED` is a dependency failing
|
|
1610
|
+
* right now — the relay unreachable, a malformed response — and those keep polling, because that is
|
|
1611
|
+
* how the read recovers when the outage ends.
|
|
1612
|
+
*/
|
|
1613
|
+
declare function isBridgeNotDelivered(data: DetailedBridgeStatusRead): boolean;
|
|
1614
|
+
/**
|
|
1615
|
+
* Polling interval for `useBridgeDetailedStatus`.
|
|
1616
|
+
*
|
|
1617
|
+
* Unlike the swap analog there is no in-flight second arm to wait on: the relay arm only ever
|
|
1618
|
+
* carries a matched `executed` packet, so it is terminal on arrival. That leaves three stops — a
|
|
1619
|
+
* terminal or abandoned backend record, a rejected API key, and the ambiguous relay miss once it has
|
|
1620
|
+
* run `MAX_NOT_FOUND_POLLS` times in a row.
|
|
1621
|
+
*
|
|
1622
|
+
* Kept in its own pure module (no React/context imports) so it is unit-testable in dapp-kit's `node`
|
|
1623
|
+
* test environment — importing the hook itself pulls in `useSodaxContext`.
|
|
1624
|
+
*/
|
|
1625
|
+
declare function getBridgeDetailedStatusRefetchInterval(data: DetailedBridgeStatusRead, consecutiveNotFound: number): number | false;
|
|
1626
|
+
|
|
1584
1627
|
/**
|
|
1585
1628
|
* Mutation variables for {@link useBridge}. Generic over `K extends SpokeChainKey` (defaults to
|
|
1586
1629
|
* the full union). Sophisticated callers can lock K at the hook call site to narrow the
|
|
@@ -1595,6 +1638,34 @@ type UseBridgeVars<K extends SpokeChainKey = SpokeChainKey> = Omit<BridgeParams<
|
|
|
1595
1638
|
*/
|
|
1596
1639
|
declare function useBridge<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<TxHashPair, UseBridgeVars<K>>): SafeUseMutationResult<TxHashPair, Error, UseBridgeVars<K>>;
|
|
1597
1640
|
|
|
1641
|
+
type UseBridgeDetailedStatusResult = Result<DetailedBridgeStatus, BridgeDetailedStatusError> | undefined;
|
|
1642
|
+
type UseBridgeDetailedStatusParams = ReadHookParams<UseBridgeDetailedStatusResult, {
|
|
1643
|
+
srcChainKey: SpokeChainKey | undefined;
|
|
1644
|
+
srcTxHash: string | undefined;
|
|
1645
|
+
apiConfig?: RequestOverrideConfig;
|
|
1646
|
+
}>;
|
|
1647
|
+
/**
|
|
1648
|
+
* Hook for monitoring a bridge from its source-chain transaction.
|
|
1649
|
+
*
|
|
1650
|
+
* `useBridgeApiSubmitTxStatus` needs the backend to still hold a usable record; this takes
|
|
1651
|
+
* `(srcChainKey, srcTxHash)` — the pair you hold after `bridge()` — and routes to whichever source
|
|
1652
|
+
* can answer, so it also covers a bridge the client-side fallback completed. `data.value` is
|
|
1653
|
+
* discriminated on `source`, and each variant carries that source's payload unmodified.
|
|
1654
|
+
*
|
|
1655
|
+
* Polls every 3s. Stops once the answering source is terminal (a relay packet always is), once the
|
|
1656
|
+
* backend rejects the API key, and — like `useDetailedStatus` — after 40 consecutive *ambiguous*
|
|
1657
|
+
* reads, meaning a `LOOKUP_FAILED` whose relay has no packet for the tx. A dependency outage keeps
|
|
1658
|
+
* polling instead, so the read recovers by itself; any real answer resets the budget. Override with
|
|
1659
|
+
* `queryOptions.refetchInterval`.
|
|
1660
|
+
*
|
|
1661
|
+
* @example
|
|
1662
|
+
* ```typescript
|
|
1663
|
+
* const { data } = useBridgeDetailedStatus({ params: { srcChainKey, srcTxHash } });
|
|
1664
|
+
* if (data?.ok && data.value.source === 'relay') console.log(data.value.data.dst_tx_hash);
|
|
1665
|
+
* ```
|
|
1666
|
+
*/
|
|
1667
|
+
declare const useBridgeDetailedStatus: ({ params, queryOptions, }?: UseBridgeDetailedStatusParams) => UseQueryResult<UseBridgeDetailedStatusResult>;
|
|
1668
|
+
|
|
1598
1669
|
type UseBridgeAllowanceParams<K extends SpokeChainKey> = ReadHookParams<boolean, {
|
|
1599
1670
|
payload: CreateBridgeIntentParams<K> | undefined;
|
|
1600
1671
|
walletProvider: GetWalletProviderType<K> | undefined;
|
|
@@ -1786,8 +1857,9 @@ type UseBridgeApiSubmitTxVars = {
|
|
|
1786
1857
|
* broadcasting the spoke-deposit tx, handing it (with the FULL `relayData { address, payload }`
|
|
1787
1858
|
* envelope) to the backend.
|
|
1788
1859
|
*
|
|
1789
|
-
* Pure mutation: pass `{ request, apiConfig? }` to `mutate({...})`.
|
|
1790
|
-
*
|
|
1860
|
+
* Pure mutation: pass `{ request, apiConfig? }` to `mutate({...})`. Retries up to 3 times at the
|
|
1861
|
+
* hook level, except on a terminal API-key rejection (401/403) — see `retryUnlessAuthFailure`.
|
|
1862
|
+
* Consumers can override via `mutationOptions.retry`.
|
|
1791
1863
|
*
|
|
1792
1864
|
* @example
|
|
1793
1865
|
* const { mutateAsync: submitBridgeTx, isPending, error } = useBridgeApiSubmitTx();
|
|
@@ -1815,8 +1887,9 @@ type UseBridgeApiSubmitTxStatusParams = ReadHookParams<BridgeSubmitTxStatusRespo
|
|
|
1815
1887
|
* });
|
|
1816
1888
|
*
|
|
1817
1889
|
* @remarks
|
|
1818
|
-
* - Default refetch interval is 1 second; stops on 'executed' or 'failed' status,
|
|
1819
|
-
* backend marks the submission abandoned (`abandonedAt`) while `status` stays non-terminal
|
|
1890
|
+
* - Default refetch interval is 1 second; stops on 'executed' or 'failed' status, when the
|
|
1891
|
+
* backend marks the submission abandoned (`abandonedAt`) while `status` stays non-terminal, or
|
|
1892
|
+
* once the backend rejects the API key (401/403 is terminal — a retry cannot fix it) —
|
|
1820
1893
|
* mirroring the SDK's backend submit-tx poll (no solver `posting_execution` state — bridge has
|
|
1821
1894
|
* no post-execution).
|
|
1822
1895
|
*/
|
|
@@ -2774,6 +2847,35 @@ type UseLeverageYieldNotifySolverVars = SolverExecutionRequest;
|
|
|
2774
2847
|
*/
|
|
2775
2848
|
declare function useLeverageYieldNotifySolver({ mutationOptions, }?: MutationHookParams<SolverExecutionResponse, UseLeverageYieldNotifySolverVars>): SafeUseMutationResult<SolverExecutionResponse, Error, UseLeverageYieldNotifySolverVars>;
|
|
2776
2849
|
|
|
2850
|
+
type UseLeverageYieldDetailedStatusResult = Result<DetailedLeverageYieldStatus, LeverageYieldDetailedStatusError> | undefined;
|
|
2851
|
+
type UseLeverageYieldDetailedStatusParams = ReadHookParams<UseLeverageYieldDetailedStatusResult, {
|
|
2852
|
+
srcChainKey: SpokeChainKey | undefined;
|
|
2853
|
+
srcTxHash: string | undefined;
|
|
2854
|
+
apiConfig?: RequestOverrideConfig;
|
|
2855
|
+
}>;
|
|
2856
|
+
/**
|
|
2857
|
+
* Hook for monitoring a leverage-yield vault swap from its source-chain transaction.
|
|
2858
|
+
*
|
|
2859
|
+
* `useLeverageYieldApiSubmitTxStatus` needs the backend to still hold a usable record; this takes
|
|
2860
|
+
* `(srcChainKey, srcTxHash)` — the pair you hold after `vaultSwap()` — and routes to whichever
|
|
2861
|
+
* source can answer, so it also covers a vault swap the client-side fallback completed. `data.value`
|
|
2862
|
+
* is discriminated on `source`, and each variant carries that source's payload unmodified.
|
|
2863
|
+
*
|
|
2864
|
+
* Polls every 3s. Stops once the answering source is terminal, once the backend rejects the API
|
|
2865
|
+
* key, and — like `useDetailedStatus` — after 40 consecutive *ambiguous* reads: a solver
|
|
2866
|
+
* `NOT_FOUND`, or a `LOOKUP_FAILED` whose relay has no packet for the tx. Neither can distinguish "still in flight" from "never will be", so the
|
|
2867
|
+
* budget is what stops a vault swap nothing can resolve. A dependency outage — relay unreachable,
|
|
2868
|
+
* solver down — keeps polling instead, so the read recovers by itself; any real status resets the
|
|
2869
|
+
* budget. Override with `queryOptions.refetchInterval`.
|
|
2870
|
+
*
|
|
2871
|
+
* @example
|
|
2872
|
+
* ```typescript
|
|
2873
|
+
* const { data } = useLeverageYieldDetailedStatus({ params: { srcChainKey, srcTxHash } });
|
|
2874
|
+
* if (data?.ok && data.value.source === 'backend') console.log(data.value.data.status);
|
|
2875
|
+
* ```
|
|
2876
|
+
*/
|
|
2877
|
+
declare const useLeverageYieldDetailedStatus: ({ params, queryOptions, }?: UseLeverageYieldDetailedStatusParams) => UseQueryResult<UseLeverageYieldDetailedStatusResult>;
|
|
2878
|
+
|
|
2777
2879
|
/**
|
|
2778
2880
|
* Mutation variables for {@link useLeverageYieldVaultSwap}. Generic over `K extends SpokeChainKey`
|
|
2779
2881
|
* (defaults to the full union). Sophisticated callers can lock K at the hook call site to narrow
|
|
@@ -2785,9 +2887,19 @@ type UseLeverageYieldVaultSwapVars<K extends SpokeChainKey = SpokeChainKey> = Om
|
|
|
2785
2887
|
*
|
|
2786
2888
|
* Spread a `LeverageYieldSwapPayload` built by {@link useLeverageYieldDeposit} /
|
|
2787
2889
|
* {@link useLeverageYieldWithdraw} into `mutate` alongside the wallet provider:
|
|
2788
|
-
* `vaultSwap({ ...payload, walletProvider })`. Runs `sodax.leverageYield.vaultSwap
|
|
2789
|
-
*
|
|
2790
|
-
*
|
|
2890
|
+
* `vaultSwap({ ...payload, walletProvider })`. Runs `sodax.leverageYield.vaultSwap`, so vault flows
|
|
2891
|
+
* never touch the generic swap surface.
|
|
2892
|
+
*
|
|
2893
|
+
* Which transport it takes is config, not an argument. With `leverageYield.useBackendSubmitTx` on,
|
|
2894
|
+
* it creates the intent and hands the broadcast tx to the leverage-yield API, which relays and
|
|
2895
|
+
* post-executes server-side, falling back to the client-side path (verify → relay → notify solver)
|
|
2896
|
+
* on any non-success. With it off, that client-side path runs outright. Read the effective value on
|
|
2897
|
+
* `sodax.config.leverageYieldUseBackendSubmitTx` rather than assuming which way it points.
|
|
2898
|
+
* Either way the resolved value is the same `VaultSwapResponse`.
|
|
2899
|
+
*
|
|
2900
|
+
* Pass `extras.apiKey` to key the backend leg per action, overriding the instance key. Poll the
|
|
2901
|
+
* result with {@link useLeverageYieldDetailedStatus}, which reads a vault swap's status from the
|
|
2902
|
+
* source-chain tx hash whichever transport completed it.
|
|
2791
2903
|
*
|
|
2792
2904
|
* Throws on SDK failure so React Query's native error model engages (`isError`, `error`,
|
|
2793
2905
|
* `onError`, `retry`). Returns the unwrapped `VaultSwapResponse` on success.
|
|
@@ -2814,6 +2926,262 @@ type UseLeverageYieldWithdrawVars = LeverageYieldSwapWithdrawParams;
|
|
|
2814
2926
|
*/
|
|
2815
2927
|
declare function useLeverageYieldWithdraw({ mutationOptions, }?: MutationHookParams<LeverageYieldSwapPayload, UseLeverageYieldWithdrawVars>): SafeUseMutationResult<LeverageYieldSwapPayload, Error, UseLeverageYieldWithdrawVars>;
|
|
2816
2928
|
|
|
2929
|
+
type UseLeveragePositionsParams = ReadHookParams<readonly Address$1[], {
|
|
2930
|
+
owner: Address$1 | undefined;
|
|
2931
|
+
}>;
|
|
2932
|
+
/**
|
|
2933
|
+
* Lists the leverage-position clones owned by `owner`, in creation order.
|
|
2934
|
+
*
|
|
2935
|
+
* Positions are the unpooled counterpart to leverage-yield vaults: each is its own AAVE
|
|
2936
|
+
* account, so one owner can hold several at different eMode categories and leverage tiers.
|
|
2937
|
+
* There is no static registry — discovery goes through the factory.
|
|
2938
|
+
*
|
|
2939
|
+
* Requires `leverageYield.positionFactory` in the `Sodax` config; without it the underlying
|
|
2940
|
+
* SDK call fails with a lookup error rather than guessing an address.
|
|
2941
|
+
*
|
|
2942
|
+
* @example
|
|
2943
|
+
* ```typescript
|
|
2944
|
+
* const { data: positions } = useLeveragePositions({ params: { owner } });
|
|
2945
|
+
* ```
|
|
2946
|
+
*/
|
|
2947
|
+
declare function useLeveragePositions({ params, queryOptions, }?: UseLeveragePositionsParams): UseQueryResult<readonly Address$1[], Error>;
|
|
2948
|
+
|
|
2949
|
+
type UseLeveragePositionAccountParams = ReadHookParams<LeveragePositionAccount, {
|
|
2950
|
+
position: Address$1 | undefined;
|
|
2951
|
+
}>;
|
|
2952
|
+
/**
|
|
2953
|
+
* Reads the live AAVE account snapshot for a leverage position — collateral, debt, LTV and
|
|
2954
|
+
* health factor.
|
|
2955
|
+
*
|
|
2956
|
+
* The figures come from the pool's `getUserAccountData`, not from the position contract,
|
|
2957
|
+
* which keeps no accounting of its own. Health factor is WAD (1e18); below 1e18 the position
|
|
2958
|
+
* is liquidatable, and there is no keeper deleveraging on the owner's behalf, so this is the
|
|
2959
|
+
* number a UI should surface most prominently. Debt accrues continuously, hence the 30s
|
|
2960
|
+
* default refresh.
|
|
2961
|
+
*
|
|
2962
|
+
* @example
|
|
2963
|
+
* ```typescript
|
|
2964
|
+
* const { data: account } = useLeveragePositionAccount({ params: { position } });
|
|
2965
|
+
* ```
|
|
2966
|
+
*/
|
|
2967
|
+
declare function useLeveragePositionAccount({ params, queryOptions, }?: UseLeveragePositionAccountParams): UseQueryResult<LeveragePositionAccount, Error>;
|
|
2968
|
+
|
|
2969
|
+
type UseLeveragePositionCollateralParams = ReadHookParams<LeveragePositionCollateral, {
|
|
2970
|
+
position: Address$1 | undefined;
|
|
2971
|
+
collateral?: Address$1;
|
|
2972
|
+
}>;
|
|
2973
|
+
/**
|
|
2974
|
+
* Reads a leverage position's collateral as an exact aToken balance.
|
|
2975
|
+
*
|
|
2976
|
+
* Use this, not `useLeveragePositionAccount().totalCollateralBase`, whenever an amount is going into
|
|
2977
|
+
* a transaction. The account snapshot is denominated in the oracle's base currency at 8 decimals, so
|
|
2978
|
+
* dividing it back out by a price gives an amount near the balance rather than the balance — and a
|
|
2979
|
+
* decrease-leverage call for more collateral than the position holds expires as an unfillable intent
|
|
2980
|
+
* instead of failing up front.
|
|
2981
|
+
*
|
|
2982
|
+
* @example
|
|
2983
|
+
* ```typescript
|
|
2984
|
+
* const { data: collateral } = useLeveragePositionCollateral({ params: { position } });
|
|
2985
|
+
* // collateral.balance is what a full exit sells
|
|
2986
|
+
* ```
|
|
2987
|
+
*/
|
|
2988
|
+
declare function useLeveragePositionCollateral({ params, queryOptions, }?: UseLeveragePositionCollateralParams): UseQueryResult<LeveragePositionCollateral, Error>;
|
|
2989
|
+
|
|
2990
|
+
type UseLeveragePositionInfoParams = ReadHookParams<LeveragePosition, {
|
|
2991
|
+
position: Address$1 | undefined;
|
|
2992
|
+
}>;
|
|
2993
|
+
/**
|
|
2994
|
+
* Reads a leverage position's static descriptor — owner, collateral, borrow token, and the
|
|
2995
|
+
* eMode category it was created with.
|
|
2996
|
+
*
|
|
2997
|
+
* All four are fixed at creation, so this never goes stale for a given position and is left
|
|
2998
|
+
* on the default cache behaviour rather than polled. Pair it with
|
|
2999
|
+
* `useLeveragePositionAccount` for the values that do move.
|
|
3000
|
+
*
|
|
3001
|
+
* @example
|
|
3002
|
+
* ```typescript
|
|
3003
|
+
* const { data: info } = useLeveragePositionInfo({ params: { position } });
|
|
3004
|
+
* ```
|
|
3005
|
+
*/
|
|
3006
|
+
declare function useLeveragePositionInfo({ params, queryOptions, }?: UseLeveragePositionInfoParams): UseQueryResult<LeveragePosition, Error>;
|
|
3007
|
+
|
|
3008
|
+
type UseLeveragePositionPendingParams = ReadHookParams<LeveragePositionPendingState, {
|
|
3009
|
+
position: Address$1 | undefined;
|
|
3010
|
+
}>;
|
|
3011
|
+
/**
|
|
3012
|
+
* A position's operation slot: what it recorded, whether that intent is still live, and whether it
|
|
3013
|
+
* is stuck resolved-but-unswept.
|
|
3014
|
+
*
|
|
3015
|
+
* Gate leverage controls on `isLive` — a position permits one intent at a time, so offering a button
|
|
3016
|
+
* that can only revert is worse than disabling it. Offer a settle on `needsSettle`: that is the state
|
|
3017
|
+
* where the intent is gone but the position still holds the grant and any contribution, and it is
|
|
3018
|
+
* invisible from `isLive` alone.
|
|
3019
|
+
*
|
|
3020
|
+
* Polled, because both change without the user acting: a solver fills, or the intent expires. The
|
|
3021
|
+
* interval sits well inside the 5-minute intent deadline so a resolution shows up while it matters.
|
|
3022
|
+
*
|
|
3023
|
+
* @example
|
|
3024
|
+
* ```typescript
|
|
3025
|
+
* const { data: slot } = useLeveragePositionPending({ params: { position } });
|
|
3026
|
+
* if (slot?.needsSettle) offerSettle();
|
|
3027
|
+
* ```
|
|
3028
|
+
*/
|
|
3029
|
+
declare function useLeveragePositionPending({ params, queryOptions, }?: UseLeveragePositionPendingParams): UseQueryResult<LeveragePositionPendingState, Error>;
|
|
3030
|
+
|
|
3031
|
+
type UseLeveragePositionsForUserParams = ReadHookParams<readonly Address$1[], {
|
|
3032
|
+
spokeChainKey: SpokeChainKey | undefined;
|
|
3033
|
+
spokeAddress: string | undefined;
|
|
3034
|
+
}>;
|
|
3035
|
+
/**
|
|
3036
|
+
* Lists a user's leverage positions from their spoke-side address and chain.
|
|
3037
|
+
*
|
|
3038
|
+
* Positions are owned by the user's hub wallet, not their EOA, so discovery resolves that address
|
|
3039
|
+
* first — the wallet router for a Sonic user, the cross-chain wallet for a spoke user, via one
|
|
3040
|
+
* call. Use this in user-facing code; {@link useLeveragePositions} takes a hub address directly
|
|
3041
|
+
* and will find nothing if handed an EOA.
|
|
3042
|
+
*
|
|
3043
|
+
* @example
|
|
3044
|
+
* ```typescript
|
|
3045
|
+
* const { data: positions } = useLeveragePositionsForUser({
|
|
3046
|
+
* params: { spokeChainKey: chain, spokeAddress: account.address },
|
|
3047
|
+
* });
|
|
3048
|
+
* ```
|
|
3049
|
+
*/
|
|
3050
|
+
declare function useLeveragePositionsForUser({ params, queryOptions, }?: UseLeveragePositionsForUserParams): UseQueryResult<readonly Address$1[], Error>;
|
|
3051
|
+
|
|
3052
|
+
/**
|
|
3053
|
+
* Mutation variables for {@link useOpenLeveragePosition}.
|
|
3054
|
+
*
|
|
3055
|
+
* `side` picks which asset funds the open, and the two take different params — so the union is
|
|
3056
|
+
* discriminated rather than merged, and the wrong field set is a type error instead of a revert.
|
|
3057
|
+
*/
|
|
3058
|
+
type UseOpenLeveragePositionVars<K extends SpokeChainKey = SpokeChainKey> = ({
|
|
3059
|
+
side?: 'collateral';
|
|
3060
|
+
} & Omit<SpokeExecActionParams<K, false, OpenPositionParams<K>>, 'raw'>) | ({
|
|
3061
|
+
side: 'debt';
|
|
3062
|
+
} & Omit<SpokeExecActionParams<K, false, OpenPositionFromDebtTokenParams<K>>, 'raw'>);
|
|
3063
|
+
/**
|
|
3064
|
+
* Opens a leveraged position, funded from any chain, and reports the intent it posts.
|
|
3065
|
+
*
|
|
3066
|
+
* Thin over `sodax.leverageYield.openLeveragePosition`, which owns the pairing — a non-React caller
|
|
3067
|
+
* gets the same guarantee. Resolving means the intent is LIVE, not that the position is open: read
|
|
3068
|
+
* `notified` before telling the owner to wait, since a failed notification still resolves.
|
|
3069
|
+
*
|
|
3070
|
+
* Positions are owned by the hub wallet, never the signing address — pass the signer as
|
|
3071
|
+
* `params.srcAddress` and the SDK resolves the owner.
|
|
3072
|
+
*
|
|
3073
|
+
* @experimental Off-hub (spoke) origins are unverified on-chain; see the SDK method.
|
|
3074
|
+
*/
|
|
3075
|
+
declare function useOpenLeveragePosition<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<LeveragePositionIntentResult, UseOpenLeveragePositionVars<K>>): SafeUseMutationResult<LeveragePositionIntentResult, Error, UseOpenLeveragePositionVars<K>>;
|
|
3076
|
+
|
|
3077
|
+
/** Mutation variables for {@link useSubmitLeveragePositionIntent} — the calls to run as the owner. */
|
|
3078
|
+
type UseSubmitLeveragePositionIntentVars<K extends SpokeChainKey = SpokeChainKey> = Omit<SpokeExecActionParams<K, false, PositionOperationParams<K, PositionBatchCall>>, 'raw'>;
|
|
3079
|
+
/**
|
|
3080
|
+
* Runs position calls that POST A SOLVER INTENT — `increaseLeverage` and `decreaseLeverage` — as the
|
|
3081
|
+
* owning hub wallet, then reports it.
|
|
3082
|
+
*
|
|
3083
|
+
* USE {@link useRunLeveragePositionOperation} for `withdraw`, `settle` and `cancel`. The split is the
|
|
3084
|
+
* SDK's: those three are synchronous on the hub and need no notification, while these two only post
|
|
3085
|
+
* a request a solver fills later. Sending a leverage change through the other hook leaves an intent
|
|
3086
|
+
* nothing will fill, and it expires without a word.
|
|
3087
|
+
*
|
|
3088
|
+
* A position permits one intent at a time, so poll `useLeveragePositionPending` rather than assuming
|
|
3089
|
+
* the next call may go out.
|
|
3090
|
+
*
|
|
3091
|
+
* @experimental Off-hub (spoke) origins are unverified on-chain; see the SDK method.
|
|
3092
|
+
*/
|
|
3093
|
+
declare function useSubmitLeveragePositionIntent<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<LeveragePositionIntentResult, UseSubmitLeveragePositionIntentVars<K>>): SafeUseMutationResult<LeveragePositionIntentResult, Error, UseSubmitLeveragePositionIntentVars<K>>;
|
|
3094
|
+
|
|
3095
|
+
/** Mutation variables for {@link useRunLeveragePositionOperation} — the calls to run as the owner. */
|
|
3096
|
+
type UseRunLeveragePositionOperationVars<K extends SpokeChainKey = SpokeChainKey> = Omit<SpokeExecActionParams<K, false, PositionOperationParams<K, PositionDirectCall>>, 'raw'>;
|
|
3097
|
+
/**
|
|
3098
|
+
* Runs position calls that DO NOT post an intent — `withdraw`, `settle` and `cancel` — as the owning
|
|
3099
|
+
* hub wallet. They are synchronous on the hub, so resolving means the work is done.
|
|
3100
|
+
*
|
|
3101
|
+
* Still routed, never sent directly: the position's `onlyOwner` is the hub wallet, so a call sent
|
|
3102
|
+
* from the signer reverts `NotOwner`. Locally through the wallet router on the hub, relayed from
|
|
3103
|
+
* anywhere else.
|
|
3104
|
+
*
|
|
3105
|
+
* USE {@link useSubmitLeveragePositionIntent} FOR `increaseLeverage` AND `decreaseLeverage`. Those
|
|
3106
|
+
* only post a request a solver fills later, and this hook does not notify the solver, so sending one
|
|
3107
|
+
* through here creates an intent nothing will fill. It expires silently and the operation is lost.
|
|
3108
|
+
* The other direction is harmless by comparison: notifying about a withdraw is noise, not damage.
|
|
3109
|
+
*
|
|
3110
|
+
* Balances are invalidated for `srcChainKey` because a withdraw pays out.
|
|
3111
|
+
*
|
|
3112
|
+
* @experimental OFF-HUB (SPOKE) ORIGINS ARE UNVERIFIED ON-CHAIN, and this is the hook that carries the
|
|
3113
|
+
* worst of it: an exit or cancellation delivering the underlying back to the spoke it
|
|
3114
|
+
* came from has never run on mainnet. Bitcoin is refused outright.
|
|
3115
|
+
*/
|
|
3116
|
+
declare function useRunLeveragePositionOperation<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<TxHashPair, UseRunLeveragePositionOperationVars<K>>): SafeUseMutationResult<TxHashPair, Error, UseRunLeveragePositionOperationVars<K>>;
|
|
3117
|
+
|
|
3118
|
+
/** Params for {@link useLeveragePositionPayoutAddress}. */
|
|
3119
|
+
type UseLeveragePositionPayoutAddressParams = {
|
|
3120
|
+
/** The chain the user signs on. */
|
|
3121
|
+
chainKey: SpokeChainKey;
|
|
3122
|
+
/**
|
|
3123
|
+
* Their address on that chain. Supplied by the caller — this package does not depend on a wallet
|
|
3124
|
+
* layer, so it cannot read the connected account itself.
|
|
3125
|
+
*/
|
|
3126
|
+
signerAddress: Address$1 | undefined;
|
|
3127
|
+
/** The position's owner, from `useGetUserHubWalletAddress`. */
|
|
3128
|
+
owner: Address$1 | undefined;
|
|
3129
|
+
};
|
|
3130
|
+
/**
|
|
3131
|
+
* Where funds leaving a position can actually be paid.
|
|
3132
|
+
*
|
|
3133
|
+
* `withdraw` is a plain pool withdrawal, so it pays out to an address ON THE HUB. For a hub-chain
|
|
3134
|
+
* user that can be their own address; for anyone else it cannot — their signing address belongs to
|
|
3135
|
+
* another chain, and for a non-EVM chain it is not an address the hub could pay at all. The hub
|
|
3136
|
+
* wallet is the one destination that is always theirs, and bridging onward is a separate operation.
|
|
3137
|
+
*
|
|
3138
|
+
* Returns `undefined` while either address is still resolving, which is the disabled state for a
|
|
3139
|
+
* withdraw button rather than a reason to fall back to the signer.
|
|
3140
|
+
*/
|
|
3141
|
+
declare function useLeveragePositionPayoutAddress({ params, }?: {
|
|
3142
|
+
params?: UseLeveragePositionPayoutAddressParams;
|
|
3143
|
+
}): Address$1 | undefined;
|
|
3144
|
+
|
|
3145
|
+
/** Params for {@link useLeveragePositionFundingAllowance}. */
|
|
3146
|
+
type UseLeveragePositionFundingAllowanceParams = ReadHookParams<boolean, {
|
|
3147
|
+
srcChainKey: SpokeChainKey;
|
|
3148
|
+
/** The user's address on `srcChainKey`. */
|
|
3149
|
+
srcAddress: string | undefined;
|
|
3150
|
+
/** Funding token, from `resolvePositionFunding` — not the reserve and not the vault. */
|
|
3151
|
+
token: string | undefined;
|
|
3152
|
+
amount: bigint | undefined;
|
|
3153
|
+
}>;
|
|
3154
|
+
/**
|
|
3155
|
+
* Whether the funding token is already approved for an open from `srcChainKey`.
|
|
3156
|
+
*
|
|
3157
|
+
* THE SPENDER IS CHAIN-DEPENDENT — the hub wallet on the hub, the spoke asset manager elsewhere —
|
|
3158
|
+
* so a hand-rolled `allowance` call against a guessed spender is right half the time. The SDK
|
|
3159
|
+
* resolves it; this only supplies React Query.
|
|
3160
|
+
*
|
|
3161
|
+
* Returns the SDK's answer as data. A chain with no allowance concept answers `true` without a call.
|
|
3162
|
+
*/
|
|
3163
|
+
declare function useLeveragePositionFundingAllowance({ params, queryOptions, }?: UseLeveragePositionFundingAllowanceParams): UseQueryResult<boolean, Error>;
|
|
3164
|
+
|
|
3165
|
+
/** Mutation variables for {@link useApproveLeveragePositionFunding}. */
|
|
3166
|
+
type UseApproveLeveragePositionFundingVars<K extends SpokeChainKey = SpokeChainKey> = {
|
|
3167
|
+
srcChainKey: K;
|
|
3168
|
+
srcAddress: string;
|
|
3169
|
+
/** Funding token, from `resolvePositionFunding` — not the reserve and not the vault. */
|
|
3170
|
+
token: string;
|
|
3171
|
+
amount: bigint;
|
|
3172
|
+
walletProvider?: GetWalletProviderType<K>;
|
|
3173
|
+
};
|
|
3174
|
+
/**
|
|
3175
|
+
* Approves the funding token for an open, against the spender the SDK resolves.
|
|
3176
|
+
*
|
|
3177
|
+
* THE SPENDER IS CHAIN-DEPENDENT — the hub wallet on the hub, the spoke asset manager elsewhere.
|
|
3178
|
+
* Nothing is ever approved to the position factory: it pulls from nobody.
|
|
3179
|
+
*
|
|
3180
|
+
* Wait for this before opening, and gate it on {@link useLeveragePositionFundingAllowance}, whose
|
|
3181
|
+
* query is invalidated here on success.
|
|
3182
|
+
*/
|
|
3183
|
+
declare function useApproveLeveragePositionFunding<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<TxReturnType<K, false>, UseApproveLeveragePositionFundingVars<K>>): SafeUseMutationResult<TxReturnType<K, false>, Error, UseApproveLeveragePositionFundingVars<K>>;
|
|
3184
|
+
|
|
2817
3185
|
type UseLeverageYieldApiVaultsParams = ReadHookParams<GetLeverageVaultsResponseV2, {
|
|
2818
3186
|
apiConfig?: RequestOverrideConfig;
|
|
2819
3187
|
}>;
|
|
@@ -3481,4 +3849,4 @@ interface NearStorageGateState {
|
|
|
3481
3849
|
*/
|
|
3482
3850
|
declare function resolveNearStorageGate(chainKey: SpokeChainKey, check: NearStorageCheckResult): NearStorageGateState;
|
|
3483
3851
|
|
|
3484
|
-
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 NearStorageGateState, type RadfiSession, type ReadHookParams, type ReadQueryOptions, type ReserveUsdFormat, type SafeUseMutationResult, SodaxProvider, type StellarCheckResult, type StellarGate, type StellarGateInputs, type StellarGateState, type SwapsApiApprovalHashes, type UseATokenParams, type UseATokensBalancesParams, type UseActivateStellarAccountVars, 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 UseBridgeApproveVars, type UseBridgeVars, 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 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 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 UseLeverageYieldDepositVars, type UseLeverageYieldEffectiveAprParams, type UseLeverageYieldNotifySolverVars, type UseLeverageYieldPositionParams, type UseLeverageYieldPreviewRedeemParams, type UseLeverageYieldQuoteParams, type UseLeverageYieldShareBalancesParams, type UseLeverageYieldTotalAssetsParams, type UseLeverageYieldVaultSwapVars, type UseLeverageYieldWithdrawVars, type UseLiquidityAmountsResult, type UseMMAllowanceParams, type UseMMApproveVars, type UseMigrateBalnVars, type UseMigrateIcxToSodaVars, type UseMigratebnUSDVars, type UseMigrationAllowanceInputs, type UseMigrationAllowanceParams, type UseMigrationApproveVars, type UseNearStorageCheckParams, 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 UseSetSwapPreferenceVars, type UseSetSwapPreferenceVarsHub, type UseSponsorConfigParams, type UseStatusParams, type UseStellarAccountActiveParams, type UseStellarAccountStatusParams, type UseStellarGateParams, type UseStellarTrustlineCheckParams, type UseSupplyLiquidityVars, type UseSupplyVars, type UseSwapAllowanceParams, type UseSwapApproveVars, type UseSwapVars, type UseSwapsApiAllowanceParams, type UseSwapsApiApproveAndBroadcastVars, type UseSwapsApiApproveVars, 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, getLeverageYieldQuoteQueryOptions, getSponsorConfigQueryOptions, getStellarAccountActiveQueryOptions, getStellarAccountStatusQueryOptions, getStellarTrustlineCheckQueryOptions, getSwapQuoteQueryOptions, getXBalancesQueryOptions, invalidateBalances, isTerminalSwapIntentStatus, isUserRejectedError, loadRadfiSession, resolveNearStorageGate, resolveStellarGate, retryUnlessAuthFailure, runApprovalPlan, saveRadfiSession, toResult, unwrapResult, useAToken, useATokensBalances, useActivateStellarAccount, 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, useBridgeApprove, useCancelLimitOrder, useCancelSwap, useCancelUnstake, useClaim, useClaimRewards, useConvertedAssets, useCreateDecreaseLiquidityParams, useCreateDepositParams, useCreateLimitOrder, useCreateSupplyLiquidityParams, useCreateWithdrawParams, useDecreaseLiquidity, useDeriveUserWalletAddress, useDetailedStatus, useDexAllowance, useDexApprove, useDexDeposit, useDexWithdraw, useEnsureRadfiAccessToken, useEstablishTrustline, useEstimateGas, useExpiredUtxos, useFeeClaimSwap, useFeeClaimWithdraw, useFetchAssetsBalances, useFundTradingWallet, useGetAutoSwapPreferences, useGetBridgeableAmount, useGetBridgeableTokens, useGetIntentDetails, useGetUserHubWalletAddress, useGetUserIntent, useHubAssetBalances, useHubProvider, useInstantUnstake, useInstantUnstakeAllowance, useInstantUnstakeApprove, useInstantUnstakeRatio, useIsTokenApproved, 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, useLeverageYieldDeposit, useLeverageYieldEffectiveApr, useLeverageYieldNotifySolver, useLeverageYieldPosition, useLeverageYieldPreviewRedeem, useLeverageYieldQuote, useLeverageYieldShareBalances, useLeverageYieldTotalAssets, useLeverageYieldVaultSwap, useLeverageYieldWithdraw, useLiquidityAmounts, useMMAllowance, useMMApprove, useMigrateBaln, useMigrateIcxToSoda, useMigratebnUSD, useMigrationAllowance, useMigrationApprove, useNearStorageCheck, useNearStorageGate, usePartnerCancelIntent, usePoolBalances, usePoolData, usePools, usePositionInfo, useQuote, useRadfiAuth, useRadfiSession, useRadfiWithdraw, useRegisterNearStorage, useRenewUtxos, useRepay, useRequestTrustline, useReservesData, useReservesHumanized, useReservesList, useReservesUsdFormat, useRevertMigrateSodaToIcx, useSafeMutation, useSetSwapPreference, useSodaxContext, useSponsorConfig, useStake, useStakeAllowance, useStakeApprove, useStakeRatio, useStakingConfig, useStakingInfo, useStatus, useStellarAccountActive, useStellarAccountStatus, useStellarGate, useStellarTrustlineCheck, useSupply, useSupplyLiquidity, useSwap, useSwapAllowance, useSwapApprove, useSwapsApiAllowance, useSwapsApiApprove, useSwapsApiApproveAndBroadcast, 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 };
|
|
3852
|
+
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 NearStorageGateState, type RadfiSession, type ReadHookParams, type ReadQueryOptions, type ReserveUsdFormat, type SafeUseMutationResult, SodaxProvider, type StellarCheckResult, type StellarGate, type StellarGateInputs, type StellarGateState, type SwapsApiApprovalHashes, 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 UseBridgeApproveVars, type UseBridgeDetailedStatusParams, type UseBridgeDetailedStatusResult, type UseBridgeVars, 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 UseLeverageYieldDepositVars, type UseLeverageYieldDetailedStatusParams, type UseLeverageYieldDetailedStatusResult, type UseLeverageYieldEffectiveAprParams, type UseLeverageYieldNotifySolverVars, type UseLeverageYieldPositionParams, type UseLeverageYieldPreviewRedeemParams, type UseLeverageYieldQuoteParams, type UseLeverageYieldShareBalancesParams, type UseLeverageYieldTotalAssetsParams, type UseLeverageYieldVaultSwapVars, type UseLeverageYieldWithdrawVars, type UseLiquidityAmountsResult, type UseMMAllowanceParams, type UseMMApproveVars, type UseMigrateBalnVars, type UseMigrateIcxToSodaVars, type UseMigratebnUSDVars, type UseMigrationAllowanceInputs, type UseMigrationAllowanceParams, type UseMigrationApproveVars, type UseNearStorageCheckParams, 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 UseSwapApproveVars, type UseSwapVars, type UseSwapsApiAllowanceParams, type UseSwapsApiApproveAndBroadcastVars, type UseSwapsApiApproveVars, 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, useBridgeApprove, useBridgeDetailedStatus, 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, useLeverageYieldDeposit, useLeverageYieldDetailedStatus, useLeverageYieldEffectiveApr, useLeverageYieldNotifySolver, useLeverageYieldPosition, useLeverageYieldPreviewRedeem, useLeverageYieldQuote, useLeverageYieldShareBalances, useLeverageYieldTotalAssets, useLeverageYieldVaultSwap, 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, useSwapApprove, useSwapsApiAllowance, useSwapsApiApprove, useSwapsApiApproveAndBroadcast, 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 };
|