@sodax/dapp-kit 2.2.0-rc.1 → 2.2.0-rc.3
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 +2 -0
- package/dist/index.d.ts +599 -3
- package/dist/index.mjs +705 -41
- package/package.json +3 -3
- package/src/hooks/_apiKeyWire.test.ts +384 -18
- package/src/hooks/_mutationContract.test.ts +13 -0
- package/src/hooks/backend/index.ts +4 -0
- package/src/hooks/backend/useBackendOracleCandles.ts +47 -0
- package/src/hooks/backend/useBackendOracleMarkets.ts +30 -0
- package/src/hooks/bitcoin/useFundTradingWallet.ts +2 -1
- package/src/hooks/bitcoin/useRadfiWithdraw.ts +2 -1
- package/src/hooks/bridge/useBridge.ts +2 -2
- package/src/hooks/dex/useDexDeposit.ts +2 -1
- package/src/hooks/dex/useDexWithdraw.ts +2 -1
- package/src/hooks/dex/useSupplyLiquidity.ts +2 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/leverageYield/useLeverageYieldVaultSwap.ts +2 -2
- package/src/hooks/leverageYieldApi/index.ts +55 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiAllowance.ts +50 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiApprove.ts +37 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiApproveAndBroadcast.test.ts +176 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiApproveAndBroadcast.ts +83 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiApr.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiAsset.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiCancelIntent.ts +37 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiCreateDepositIntent.ts +37 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiCreateWithdrawIntent.ts +37 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiDeadline.ts +38 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiDepositQuote.ts +57 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiEffectiveApr.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiEstimateGas.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiFilledIntent.ts +40 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiIntent.ts +40 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiIntentExtraData.ts +42 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiIntentHash.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiIntentPacket.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiLsdApr.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiMaxWithdraw.ts +43 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiPartnerFee.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiPosition.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiPreviewDeposit.ts +43 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiPreviewRedeem.ts +43 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiPreviewWithdraw.ts +43 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiShareBalance.ts +43 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiSolverFee.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiStatus.ts +48 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiSubmitIntent.ts +36 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiSubmitTx.ts +37 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiSubmitTxStatus.ts +60 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiTotalAssets.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiVault.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiVaults.ts +36 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiWithdrawQuote.ts +56 -0
- package/src/hooks/migrate/useMigrateBaln.ts +2 -2
- package/src/hooks/migrate/useMigrateIcxToSoda.ts +2 -2
- package/src/hooks/migrate/useMigratebnUSD.ts +2 -2
- package/src/hooks/migrate/useRevertMigrateSodaToIcx.ts +2 -2
- package/src/hooks/mm/useBorrow.ts +2 -4
- package/src/hooks/mm/useRepay.ts +2 -1
- package/src/hooks/mm/useSupply.ts +2 -1
- package/src/hooks/mm/useWithdraw.ts +2 -4
- package/src/hooks/partner/useFeeClaimWithdraw.ts +2 -1
- package/src/hooks/recovery/useWithdrawHubAsset.ts +2 -1
- package/src/hooks/shared/index.ts +2 -0
- package/src/hooks/shared/invalidateBalances.test.ts +71 -0
- package/src/hooks/shared/invalidateBalances.ts +25 -0
- package/src/hooks/shared/useBalances.test.ts +118 -0
- package/src/hooks/shared/useBalances.ts +81 -0
- package/src/hooks/shared/useEstablishTrustline.test.ts +2 -0
- package/src/hooks/shared/useEstablishTrustline.ts +2 -1
- package/src/hooks/shared/useStellarGate.test.ts +1 -1
- package/src/hooks/sponsoring/useActivateStellarAccount.test.ts +6 -4
- package/src/hooks/sponsoring/useActivateStellarAccount.ts +2 -1
- package/src/hooks/sponsoring/useSponsorConfig.test.ts +8 -2
- package/src/hooks/sponsoring/useStellarAccountActive.test.ts +2 -2
- package/src/hooks/sponsoring/useStellarAccountStatus.test.ts +8 -2
- package/src/hooks/staking/useClaim.ts +2 -1
- package/src/hooks/staking/useInstantUnstake.ts +2 -1
- package/src/hooks/staking/useStake.ts +2 -1
- package/src/hooks/swap/useDetailedStatus.test.ts +2 -2
- package/src/hooks/swap/useSwap.ts +2 -2
- package/src/hooks/swapsApi/useSwapsApiApproveAndBroadcast.test.ts +5 -1
- package/src/providers/SodaxProvider.test.ts +1 -1
- package/src/utils/approvalPlan.ts +4 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UseMutationOptions, UseQueryOptions, UseMutationResult, MutateOptions, UseQueryResult,
|
|
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, 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, 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, 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';
|
|
4
4
|
export * from '@sodax/sdk';
|
|
5
5
|
import { Address } from 'viem';
|
|
6
6
|
import { ReactNode, ReactElement } from 'react';
|
|
@@ -417,6 +417,70 @@ declare function getXBalancesQueryOptions({ xService, xChainId, xTokens, address
|
|
|
417
417
|
*/
|
|
418
418
|
declare function useXBalances({ params, queryOptions, }?: UseXBalancesParams): UseQueryResult<Record<string, bigint>>;
|
|
419
419
|
|
|
420
|
+
/**
|
|
421
|
+
* Domain inputs for {@link useBalances}. `chainKey` is optional so the hook can be mounted before a
|
|
422
|
+
* chain is selected; `enabled` gates execution on every required field being present.
|
|
423
|
+
*
|
|
424
|
+
* The SDK reads the chain named by `chainKey` and ignores `token.chainKey`, so a token that does
|
|
425
|
+
* not live on that chain reads as `0n` rather than erroring — keep the two in step.
|
|
426
|
+
*/
|
|
427
|
+
interface BalancesInputs {
|
|
428
|
+
chainKey: SpokeChainKey | undefined;
|
|
429
|
+
tokens: readonly XToken[];
|
|
430
|
+
address: string | undefined;
|
|
431
|
+
}
|
|
432
|
+
type UseBalancesParams = ReadHookParams<Record<string, bigint>, BalancesInputs>;
|
|
433
|
+
/**
|
|
434
|
+
* Pure builder for {@link useBalances} query options. Exported for unit tests and for advanced
|
|
435
|
+
* callers that compose their own `useQuery` wrapper. Takes the SDK instance explicitly (the hook
|
|
436
|
+
* supplies it from context).
|
|
437
|
+
*/
|
|
438
|
+
declare function getBalancesQueryOptions(sodax: Sodax, { chainKey, tokens, address }: BalancesInputs): {
|
|
439
|
+
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];
|
|
440
|
+
queryFn: () => Promise<Record<string, bigint>>;
|
|
441
|
+
enabled: boolean;
|
|
442
|
+
refetchInterval: number;
|
|
443
|
+
};
|
|
444
|
+
/**
|
|
445
|
+
* Fetch a user's own wallet balances for multiple tokens on a specific chain, straight from the
|
|
446
|
+
* core SDK (`sodax.spoke.getWalletBalances`) — no wallet SDK / `xService` required. Returns an
|
|
447
|
+
* object mapping each token's address to its balance in smallest units.
|
|
448
|
+
*
|
|
449
|
+
* This is the SDK-backed successor to {@link useXBalances} (which wraps a wallet-layer `xService`).
|
|
450
|
+
* Prefer this when the app already has a `SodaxProvider`.
|
|
451
|
+
*
|
|
452
|
+
* Failure model: a token that could not be read is logged by the SDK and reported as `0n`, so a
|
|
453
|
+
* flaky RPC is indistinguishable from an empty wallet — always the conservative direction, since
|
|
454
|
+
* under-reporting blocks a spend rather than permitting one. The query only errors when the whole
|
|
455
|
+
* batch is unusable: a shared round-trip every token depends on, or a batch in which no token
|
|
456
|
+
* could be read at all.
|
|
457
|
+
*
|
|
458
|
+
* Chain-specific notes: Stellar XLM reports the *spendable* amount (total minus the minimum reserve
|
|
459
|
+
* and selling liabilities); Bitcoin returns `0n` for Rune tokens, whose amounts are not exposed by
|
|
460
|
+
* the UTXO endpoint.
|
|
461
|
+
*
|
|
462
|
+
* @example
|
|
463
|
+
* ```tsx
|
|
464
|
+
* const { data: balances } = useBalances({ params: { chainKey, address, tokens } });
|
|
465
|
+
* const usdcBalance = balances?.[usdc.address] ?? 0n;
|
|
466
|
+
* ```
|
|
467
|
+
*/
|
|
468
|
+
declare function useBalances({ params, queryOptions }?: UseBalancesParams): UseQueryResult<Record<string, bigint>>;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Invalidate every wallet-balance query for the given chains.
|
|
472
|
+
*
|
|
473
|
+
* Two balance hooks ship side by side — {@link useBalances} (SDK-backed, keyed under
|
|
474
|
+
* `['shared','balances', …]`) and {@link useXBalances} (wallet-layer, `['shared','xBalances', …]`) —
|
|
475
|
+
* and an app may mount either. React Query matches query keys element-wise, so one key never
|
|
476
|
+
* matches the other; a mutation hook that invalidates only one silently leaves the other stale.
|
|
477
|
+
* Route every post-transaction balance refresh through here so the two cannot drift apart again.
|
|
478
|
+
*
|
|
479
|
+
* `undefined` chain keys are skipped and duplicates collapse, so callers can pass
|
|
480
|
+
* `(src, dst)` without guarding either.
|
|
481
|
+
*/
|
|
482
|
+
declare function invalidateBalances(queryClient: QueryClient, ...chainKeys: readonly (SpokeChainKey | undefined)[]): void;
|
|
483
|
+
|
|
420
484
|
declare function useHubProvider(): EvmHubProvider;
|
|
421
485
|
|
|
422
486
|
type RadfiSession = {
|
|
@@ -1049,6 +1113,35 @@ type UseBackendAllMoneyMarketBorrowersParams = ReadHookParams<MoneyMarketBorrowe
|
|
|
1049
1113
|
*/
|
|
1050
1114
|
declare const useBackendAllMoneyMarketBorrowers: ({ params, queryOptions, }?: UseBackendAllMoneyMarketBorrowersParams) => UseQueryResult<MoneyMarketBorrowers | undefined>;
|
|
1051
1115
|
|
|
1116
|
+
type UseBackendOracleMarketsParams = ReadHookParams<OracleMarketsResponse>;
|
|
1117
|
+
/**
|
|
1118
|
+
* Hook for fetching the oracle candle store's discovery payload (quote currency,
|
|
1119
|
+
* selectable intervals, and covered symbols) from the backend API.
|
|
1120
|
+
*
|
|
1121
|
+
* @example
|
|
1122
|
+
* const { data: markets } = useBackendOracleMarkets();
|
|
1123
|
+
*/
|
|
1124
|
+
declare const useBackendOracleMarkets: ({ queryOptions, }?: UseBackendOracleMarketsParams) => UseQueryResult<OracleMarketsResponse, Error>;
|
|
1125
|
+
|
|
1126
|
+
type UseBackendOracleCandlesParams = ReadHookParams<OracleCandlesResponse, {
|
|
1127
|
+
symbol: string;
|
|
1128
|
+
interval: OracleCandleInterval;
|
|
1129
|
+
/** Range start, UNIX seconds, inclusive. */
|
|
1130
|
+
from: number;
|
|
1131
|
+
/** Range end, UNIX seconds, exclusive; the range may cover at most 5000 buckets. */
|
|
1132
|
+
to: number;
|
|
1133
|
+
}>;
|
|
1134
|
+
/**
|
|
1135
|
+
* Hook for fetching USD OHLC candles for a symbol over the half-open range `[from, to)`
|
|
1136
|
+
* from the backend API. Responses are cached server-side for roughly 10 seconds.
|
|
1137
|
+
*
|
|
1138
|
+
* @example
|
|
1139
|
+
* const { data } = useBackendOracleCandles({
|
|
1140
|
+
* params: { symbol: 'ETH', interval: '1h', from: 1756000000, to: 1756360000 },
|
|
1141
|
+
* });
|
|
1142
|
+
*/
|
|
1143
|
+
declare const useBackendOracleCandles: ({ params, queryOptions, }?: UseBackendOracleCandlesParams) => UseQueryResult<OracleCandlesResponse, Error>;
|
|
1144
|
+
|
|
1052
1145
|
type UseSwapsApiTokensParams = ReadHookParams<GetSwapTokensResponseV2, {
|
|
1053
1146
|
apiConfig?: RequestOverrideConfig;
|
|
1054
1147
|
}>;
|
|
@@ -2721,6 +2814,509 @@ type UseLeverageYieldWithdrawVars = LeverageYieldSwapWithdrawParams;
|
|
|
2721
2814
|
*/
|
|
2722
2815
|
declare function useLeverageYieldWithdraw({ mutationOptions, }?: MutationHookParams<LeverageYieldSwapPayload, UseLeverageYieldWithdrawVars>): SafeUseMutationResult<LeverageYieldSwapPayload, Error, UseLeverageYieldWithdrawVars>;
|
|
2723
2816
|
|
|
2817
|
+
type UseLeverageYieldApiVaultsParams = ReadHookParams<GetLeverageVaultsResponseV2, {
|
|
2818
|
+
apiConfig?: RequestOverrideConfig;
|
|
2819
|
+
}>;
|
|
2820
|
+
/**
|
|
2821
|
+
* React hook to fetch the registry of deployed leverage-yield vaults via the leverage-yield API —
|
|
2822
|
+
* `sodax.api.leverageYield.getVaults`.
|
|
2823
|
+
*
|
|
2824
|
+
* @example
|
|
2825
|
+
* const { data: vaults } = useLeverageYieldApiVaults();
|
|
2826
|
+
*/
|
|
2827
|
+
declare const useLeverageYieldApiVaults: ({ params, queryOptions, }?: UseLeverageYieldApiVaultsParams) => UseQueryResult<GetLeverageVaultsResponseV2, Error>;
|
|
2828
|
+
|
|
2829
|
+
type UseLeverageYieldApiVaultParams = ReadHookParams<GetLeverageVaultResponseV2 | undefined, {
|
|
2830
|
+
name: string | undefined;
|
|
2831
|
+
apiConfig?: RequestOverrideConfig;
|
|
2832
|
+
}>;
|
|
2833
|
+
/**
|
|
2834
|
+
* React hook to fetch a single vault descriptor by its lsoda* share-token name via the
|
|
2835
|
+
* leverage-yield API — `sodax.api.leverageYield.getVault`.
|
|
2836
|
+
*
|
|
2837
|
+
* @example
|
|
2838
|
+
* const { data: vault } = useLeverageYieldApiVault({ params: { name: 'lsodaWEETH' } });
|
|
2839
|
+
*/
|
|
2840
|
+
declare const useLeverageYieldApiVault: ({ params, queryOptions, }?: UseLeverageYieldApiVaultParams) => UseQueryResult<GetLeverageVaultResponseV2 | undefined, Error>;
|
|
2841
|
+
|
|
2842
|
+
type UseLeverageYieldApiAssetParams = ReadHookParams<VaultAssetResponseV2 | undefined, {
|
|
2843
|
+
vault: string | undefined;
|
|
2844
|
+
apiConfig?: RequestOverrideConfig;
|
|
2845
|
+
}>;
|
|
2846
|
+
/**
|
|
2847
|
+
* React hook to fetch the underlying hub asset for a leverage-yield vault via the leverage-yield API —
|
|
2848
|
+
* `sodax.api.leverageYield.getAsset`.
|
|
2849
|
+
*
|
|
2850
|
+
* @example
|
|
2851
|
+
* const { data } = useLeverageYieldApiAsset({ params: { vault: '0x...' } });
|
|
2852
|
+
*/
|
|
2853
|
+
declare const useLeverageYieldApiAsset: ({ params, queryOptions, }?: UseLeverageYieldApiAssetParams) => UseQueryResult<VaultAssetResponseV2 | undefined, Error>;
|
|
2854
|
+
|
|
2855
|
+
type UseLeverageYieldApiPositionParams = ReadHookParams<LeverageYieldPositionV2 | undefined, {
|
|
2856
|
+
vault: string | undefined;
|
|
2857
|
+
apiConfig?: RequestOverrideConfig;
|
|
2858
|
+
}>;
|
|
2859
|
+
/**
|
|
2860
|
+
* React hook to fetch a leveraged-position snapshot for a leverage-yield vault via the leverage-yield API —
|
|
2861
|
+
* `sodax.api.leverageYield.getPosition`.
|
|
2862
|
+
*
|
|
2863
|
+
* @example
|
|
2864
|
+
* const { data } = useLeverageYieldApiPosition({ params: { vault: '0x...' } });
|
|
2865
|
+
*/
|
|
2866
|
+
declare const useLeverageYieldApiPosition: ({ params, queryOptions, }?: UseLeverageYieldApiPositionParams) => UseQueryResult<LeverageYieldPositionV2 | undefined, Error>;
|
|
2867
|
+
|
|
2868
|
+
type UseLeverageYieldApiAprParams = ReadHookParams<LeverageYieldAprV2 | undefined, {
|
|
2869
|
+
vault: string | undefined;
|
|
2870
|
+
apiConfig?: RequestOverrideConfig;
|
|
2871
|
+
}>;
|
|
2872
|
+
/**
|
|
2873
|
+
* React hook to fetch the AAVE-only steady-state APR for a leverage-yield vault via the leverage-yield API —
|
|
2874
|
+
* `sodax.api.leverageYield.getApr`.
|
|
2875
|
+
*
|
|
2876
|
+
* @example
|
|
2877
|
+
* const { data } = useLeverageYieldApiApr({ params: { vault: '0x...' } });
|
|
2878
|
+
*/
|
|
2879
|
+
declare const useLeverageYieldApiApr: ({ params, queryOptions, }?: UseLeverageYieldApiAprParams) => UseQueryResult<LeverageYieldAprV2 | undefined, Error>;
|
|
2880
|
+
|
|
2881
|
+
type UseLeverageYieldApiEffectiveAprParams = ReadHookParams<LeverageYieldEffectiveAprV2 | undefined, {
|
|
2882
|
+
vault: string | undefined;
|
|
2883
|
+
apiConfig?: RequestOverrideConfig;
|
|
2884
|
+
}>;
|
|
2885
|
+
/**
|
|
2886
|
+
* React hook to fetch the honest combined AAVE + LSD effective APR for a leverage-yield vault via the leverage-yield API —
|
|
2887
|
+
* `sodax.api.leverageYield.getEffectiveApr`.
|
|
2888
|
+
*
|
|
2889
|
+
* @example
|
|
2890
|
+
* const { data } = useLeverageYieldApiEffectiveApr({ params: { vault: '0x...' } });
|
|
2891
|
+
*/
|
|
2892
|
+
declare const useLeverageYieldApiEffectiveApr: ({ params, queryOptions, }?: UseLeverageYieldApiEffectiveAprParams) => UseQueryResult<LeverageYieldEffectiveAprV2 | undefined, Error>;
|
|
2893
|
+
|
|
2894
|
+
type UseLeverageYieldApiLsdAprParams = ReadHookParams<LeverageYieldLsdAprV2 | undefined, {
|
|
2895
|
+
vault: string | undefined;
|
|
2896
|
+
apiConfig?: RequestOverrideConfig;
|
|
2897
|
+
}>;
|
|
2898
|
+
/**
|
|
2899
|
+
* React hook to fetch the off-chain LSD staking-APR snapshot for a leverage-yield vault via the leverage-yield API —
|
|
2900
|
+
* `sodax.api.leverageYield.getLsdApr`.
|
|
2901
|
+
*
|
|
2902
|
+
* @example
|
|
2903
|
+
* const { data } = useLeverageYieldApiLsdApr({ params: { vault: '0x...' } });
|
|
2904
|
+
*/
|
|
2905
|
+
declare const useLeverageYieldApiLsdApr: ({ params, queryOptions, }?: UseLeverageYieldApiLsdAprParams) => UseQueryResult<LeverageYieldLsdAprV2 | undefined, Error>;
|
|
2906
|
+
|
|
2907
|
+
type UseLeverageYieldApiTotalAssetsParams = ReadHookParams<VaultTotalAssetsResponseV2 | undefined, {
|
|
2908
|
+
vault: string | undefined;
|
|
2909
|
+
apiConfig?: RequestOverrideConfig;
|
|
2910
|
+
}>;
|
|
2911
|
+
/**
|
|
2912
|
+
* React hook to fetch the total assets managed by the vault for a leverage-yield vault via the leverage-yield API —
|
|
2913
|
+
* `sodax.api.leverageYield.getTotalAssets`.
|
|
2914
|
+
*
|
|
2915
|
+
* @example
|
|
2916
|
+
* const { data } = useLeverageYieldApiTotalAssets({ params: { vault: '0x...' } });
|
|
2917
|
+
*/
|
|
2918
|
+
declare const useLeverageYieldApiTotalAssets: ({ params, queryOptions, }?: UseLeverageYieldApiTotalAssetsParams) => UseQueryResult<VaultTotalAssetsResponseV2 | undefined, Error>;
|
|
2919
|
+
|
|
2920
|
+
type UseLeverageYieldApiPreviewDepositParams = ReadHookParams<PreviewDepositResponseV2 | undefined, {
|
|
2921
|
+
vault: string | undefined;
|
|
2922
|
+
assets: string | undefined;
|
|
2923
|
+
apiConfig?: RequestOverrideConfig;
|
|
2924
|
+
}>;
|
|
2925
|
+
/**
|
|
2926
|
+
* React hook to preview the shares minted for depositing `assets` (ERC-4626 previewDeposit) via the leverage-yield API —
|
|
2927
|
+
* `sodax.api.leverageYield.previewDeposit`.
|
|
2928
|
+
*
|
|
2929
|
+
* @example
|
|
2930
|
+
* const { data } = useLeverageYieldApiPreviewDeposit({ params: { vault: '0x...', assets: '1000000000000000000' } });
|
|
2931
|
+
*/
|
|
2932
|
+
declare const useLeverageYieldApiPreviewDeposit: ({ params, queryOptions, }?: UseLeverageYieldApiPreviewDepositParams) => UseQueryResult<PreviewDepositResponseV2 | undefined, Error>;
|
|
2933
|
+
|
|
2934
|
+
type UseLeverageYieldApiPreviewWithdrawParams = ReadHookParams<PreviewWithdrawResponseV2 | undefined, {
|
|
2935
|
+
vault: string | undefined;
|
|
2936
|
+
assets: string | undefined;
|
|
2937
|
+
apiConfig?: RequestOverrideConfig;
|
|
2938
|
+
}>;
|
|
2939
|
+
/**
|
|
2940
|
+
* React hook to preview the shares burned to withdraw `assets` (ERC-4626 previewWithdraw) via the leverage-yield API —
|
|
2941
|
+
* `sodax.api.leverageYield.previewWithdraw`.
|
|
2942
|
+
*
|
|
2943
|
+
* @example
|
|
2944
|
+
* const { data } = useLeverageYieldApiPreviewWithdraw({ params: { vault: '0x...', assets: '1000000000000000000' } });
|
|
2945
|
+
*/
|
|
2946
|
+
declare const useLeverageYieldApiPreviewWithdraw: ({ params, queryOptions, }?: UseLeverageYieldApiPreviewWithdrawParams) => UseQueryResult<PreviewWithdrawResponseV2 | undefined, Error>;
|
|
2947
|
+
|
|
2948
|
+
type UseLeverageYieldApiPreviewRedeemParams = ReadHookParams<PreviewRedeemResponseV2 | undefined, {
|
|
2949
|
+
vault: string | undefined;
|
|
2950
|
+
shares: string | undefined;
|
|
2951
|
+
apiConfig?: RequestOverrideConfig;
|
|
2952
|
+
}>;
|
|
2953
|
+
/**
|
|
2954
|
+
* React hook to preview the assets returned for redeeming `shares` (ERC-4626 previewRedeem) via the leverage-yield API —
|
|
2955
|
+
* `sodax.api.leverageYield.previewRedeem`.
|
|
2956
|
+
*
|
|
2957
|
+
* @example
|
|
2958
|
+
* const { data } = useLeverageYieldApiPreviewRedeem({ params: { vault: '0x...', shares: '1000000000000000000' } });
|
|
2959
|
+
*/
|
|
2960
|
+
declare const useLeverageYieldApiPreviewRedeem: ({ params, queryOptions, }?: UseLeverageYieldApiPreviewRedeemParams) => UseQueryResult<PreviewRedeemResponseV2 | undefined, Error>;
|
|
2961
|
+
|
|
2962
|
+
type UseLeverageYieldApiShareBalanceParams = ReadHookParams<ShareBalanceResponseV2 | undefined, {
|
|
2963
|
+
vault: string | undefined;
|
|
2964
|
+
owner: string | undefined;
|
|
2965
|
+
apiConfig?: RequestOverrideConfig;
|
|
2966
|
+
}>;
|
|
2967
|
+
/**
|
|
2968
|
+
* React hook to get an owner's vault share (lsoda*) balance via the leverage-yield API —
|
|
2969
|
+
* `sodax.api.leverageYield.getShareBalance`.
|
|
2970
|
+
*
|
|
2971
|
+
* @example
|
|
2972
|
+
* const { data } = useLeverageYieldApiShareBalance({ params: { vault: '0x...', owner: '1000000000000000000' } });
|
|
2973
|
+
*/
|
|
2974
|
+
declare const useLeverageYieldApiShareBalance: ({ params, queryOptions, }?: UseLeverageYieldApiShareBalanceParams) => UseQueryResult<ShareBalanceResponseV2 | undefined, Error>;
|
|
2975
|
+
|
|
2976
|
+
type UseLeverageYieldApiMaxWithdrawParams = ReadHookParams<MaxWithdrawResponseV2 | undefined, {
|
|
2977
|
+
vault: string | undefined;
|
|
2978
|
+
owner: string | undefined;
|
|
2979
|
+
apiConfig?: RequestOverrideConfig;
|
|
2980
|
+
}>;
|
|
2981
|
+
/**
|
|
2982
|
+
* React hook to get the maximum assets an owner can withdraw (ERC-4626 maxWithdraw) via the leverage-yield API —
|
|
2983
|
+
* `sodax.api.leverageYield.getMaxWithdraw`.
|
|
2984
|
+
*
|
|
2985
|
+
* @example
|
|
2986
|
+
* const { data } = useLeverageYieldApiMaxWithdraw({ params: { vault: '0x...', owner: '1000000000000000000' } });
|
|
2987
|
+
*/
|
|
2988
|
+
declare const useLeverageYieldApiMaxWithdraw: ({ params, queryOptions, }?: UseLeverageYieldApiMaxWithdrawParams) => UseQueryResult<MaxWithdrawResponseV2 | undefined, Error>;
|
|
2989
|
+
|
|
2990
|
+
type UseLeverageYieldApiDepositQuoteParams = ReadHookParams<QuoteResponseV2 | undefined, {
|
|
2991
|
+
body: LeverageYieldDepositQuoteRequestV2 | undefined;
|
|
2992
|
+
query?: QuoteQueryV2;
|
|
2993
|
+
apiConfig?: RequestOverrideConfig;
|
|
2994
|
+
}>;
|
|
2995
|
+
/**
|
|
2996
|
+
* React hook to quote a swap-style leverage-yield deposit (any token → lsoda* shares) via the
|
|
2997
|
+
* leverage-yield API — `sodax.api.leverageYield.getDepositQuote`. Pass `query.includeTxData = true`
|
|
2998
|
+
* to also build the unsigned create-intent transaction (`srcAddress` then required in the body).
|
|
2999
|
+
*
|
|
3000
|
+
* @example
|
|
3001
|
+
* const { data: quote } = useLeverageYieldApiDepositQuote({
|
|
3002
|
+
* params: {
|
|
3003
|
+
* body: {
|
|
3004
|
+
* vault: '0x...', tokenSrc: '0x...', tokenSrcChainKey: '0xa4b1.arbitrum',
|
|
3005
|
+
* amount: '1000000', quoteType: 'exact_input',
|
|
3006
|
+
* },
|
|
3007
|
+
* },
|
|
3008
|
+
* });
|
|
3009
|
+
*/
|
|
3010
|
+
declare const useLeverageYieldApiDepositQuote: ({ params, queryOptions, }?: UseLeverageYieldApiDepositQuoteParams) => UseQueryResult<QuoteResponseV2 | undefined, Error>;
|
|
3011
|
+
|
|
3012
|
+
type UseLeverageYieldApiWithdrawQuoteParams = ReadHookParams<QuoteResponseV2 | undefined, {
|
|
3013
|
+
body: LeverageYieldWithdrawQuoteRequestV2 | undefined;
|
|
3014
|
+
query?: QuoteQueryV2;
|
|
3015
|
+
apiConfig?: RequestOverrideConfig;
|
|
3016
|
+
}>;
|
|
3017
|
+
/**
|
|
3018
|
+
* React hook to quote a swap-style leverage-yield withdraw (lsoda* shares → any token) via the
|
|
3019
|
+
* leverage-yield API — `sodax.api.leverageYield.getWithdrawQuote`. Pass `query.includeTxData = true`
|
|
3020
|
+
* to also build the unsigned transaction (`srcAddress`/`dstAddress` then required in the body).
|
|
3021
|
+
*
|
|
3022
|
+
* @example
|
|
3023
|
+
* const { data: quote } = useLeverageYieldApiWithdrawQuote({
|
|
3024
|
+
* params: {
|
|
3025
|
+
* body: {
|
|
3026
|
+
* vault: '0x...', srcChainKey: 'sonic', tokenDst: '0x...', tokenDstChainKey: '0xa4b1.arbitrum',
|
|
3027
|
+
* amount: '1000000000000000000', quoteType: 'exact_input',
|
|
3028
|
+
* },
|
|
3029
|
+
* },
|
|
3030
|
+
* });
|
|
3031
|
+
*/
|
|
3032
|
+
declare const useLeverageYieldApiWithdrawQuote: ({ params, queryOptions, }?: UseLeverageYieldApiWithdrawQuoteParams) => UseQueryResult<QuoteResponseV2 | undefined, Error>;
|
|
3033
|
+
|
|
3034
|
+
type UseLeverageYieldApiDeadlineParams = ReadHookParams<DeadlineResponseV2, {
|
|
3035
|
+
query?: DeadlineQueryV2;
|
|
3036
|
+
apiConfig?: RequestOverrideConfig;
|
|
3037
|
+
}>;
|
|
3038
|
+
/**
|
|
3039
|
+
* React hook to compute a deposit/withdraw deadline (hub timestamp + `offsetSeconds`, default 300s)
|
|
3040
|
+
* via the leverage-yield API — `sodax.api.leverageYield.getDeadline`.
|
|
3041
|
+
*
|
|
3042
|
+
* @example
|
|
3043
|
+
* const { data: deadline } = useLeverageYieldApiDeadline({ params: { query: { offsetSeconds: 600 } } });
|
|
3044
|
+
*/
|
|
3045
|
+
declare const useLeverageYieldApiDeadline: ({ params, queryOptions, }?: UseLeverageYieldApiDeadlineParams) => UseQueryResult<DeadlineResponseV2, Error>;
|
|
3046
|
+
|
|
3047
|
+
type UseLeverageYieldApiAllowanceParams = ReadHookParams<AllowanceCheckResponseV2 | undefined, {
|
|
3048
|
+
body: CreateDepositIntentParamsV2 | undefined;
|
|
3049
|
+
apiConfig?: RequestOverrideConfig;
|
|
3050
|
+
}>;
|
|
3051
|
+
/**
|
|
3052
|
+
* React hook to check whether the deposit input-token allowance is already sufficient for an intent
|
|
3053
|
+
* via the leverage-yield API — `sodax.api.leverageYield.checkAllowance`. Returns `{ valid }`.
|
|
3054
|
+
* (Withdraw needs no spoke allowance — it spends lsoda* from the hub wallet.)
|
|
3055
|
+
*
|
|
3056
|
+
* @example
|
|
3057
|
+
* const { data: allowance } = useLeverageYieldApiAllowance({ params: { body: depositIntentParams } });
|
|
3058
|
+
*/
|
|
3059
|
+
declare const useLeverageYieldApiAllowance: ({ params, queryOptions, }?: UseLeverageYieldApiAllowanceParams) => UseQueryResult<AllowanceCheckResponseV2 | undefined, Error>;
|
|
3060
|
+
|
|
3061
|
+
/**
|
|
3062
|
+
* Mutation variables for {@link useLeverageYieldApiApprove}. The per-request `apiConfig` override belongs here
|
|
3063
|
+
* rather than at the hook level — different calls in the same component can target different
|
|
3064
|
+
* endpoints without re-rendering.
|
|
3065
|
+
*/
|
|
3066
|
+
type UseLeverageYieldApiApproveVars = {
|
|
3067
|
+
body: CreateDepositIntentParamsV2;
|
|
3068
|
+
apiConfig?: RequestOverrideConfig;
|
|
3069
|
+
};
|
|
3070
|
+
/**
|
|
3071
|
+
* React hook to build an unsigned token-approval transaction for the deposit input token via the leverage-yield API — `sodax.api.leverageYield.approve`.
|
|
3072
|
+
*/
|
|
3073
|
+
declare const useLeverageYieldApiApprove: ({ mutationOptions, }?: MutationHookParams<ApproveResponseV2, UseLeverageYieldApiApproveVars>) => SafeUseMutationResult<ApproveResponseV2, Error, UseLeverageYieldApiApproveVars>;
|
|
3074
|
+
|
|
3075
|
+
type LeverageYieldApiApprovalHashes = ApprovalHashes;
|
|
3076
|
+
type UseLeverageYieldApiApproveAndBroadcastVars<K extends SpokeChainKey = SpokeChainKey> = {
|
|
3077
|
+
body: CreateDepositIntentParamsV2;
|
|
3078
|
+
walletProvider: GetWalletProviderType<K>;
|
|
3079
|
+
apiConfig?: RequestOverrideConfig;
|
|
3080
|
+
/** Per-step progress. In the vars, not the hook options, so it is never a stale closure. */
|
|
3081
|
+
onProgress?: ApprovalProgressListener;
|
|
3082
|
+
};
|
|
3083
|
+
/**
|
|
3084
|
+
* React hook that runs the whole leverage-yield-API deposit approval: asks the API for the
|
|
3085
|
+
* transactions, then signs, broadcasts, and waits for each one. (Only a deposit needs a spoke
|
|
3086
|
+
* allowance — a withdraw spends `lsoda*` from the hub wallet.)
|
|
3087
|
+
*
|
|
3088
|
+
* Prefer this over {@link useLeverageYieldApiApprove}, which hands back the unsigned
|
|
3089
|
+
* `{ tx, resetTx? }` and leaves the ordering — reset mined first, then approve — to the caller. A
|
|
3090
|
+
* deposit token of the 2017 TetherToken lineage rejects an allowance change from one non-zero value
|
|
3091
|
+
* to another, so broadcasting the approve without the reset spends the user's gas on a transaction
|
|
3092
|
+
* that is certain to revert. Confirmation happens inside the hook, so it invalidates
|
|
3093
|
+
* `['leverageYieldApi','allowance']` itself.
|
|
3094
|
+
*
|
|
3095
|
+
* Supports the chains the leverage-yield API can approve on — the hub (Sonic), EVM spokes, and
|
|
3096
|
+
* Stellar. Every other chain reports its allowance as always sufficient, so approval never runs.
|
|
3097
|
+
*
|
|
3098
|
+
* `onProgress` reports each transaction as `{ step, phase, index, total }`, so the UI can name the
|
|
3099
|
+
* wallet prompt the user is looking at instead of one flat "Approving…" across two signatures.
|
|
3100
|
+
*
|
|
3101
|
+
* @example
|
|
3102
|
+
* const { mutateAsyncSafe: approve } = useLeverageYieldApiApproveAndBroadcast();
|
|
3103
|
+
* const result = await approve({ body: depositIntentParams, walletProvider, onProgress: setStep });
|
|
3104
|
+
* if (!result.ok) return;
|
|
3105
|
+
* const { resetTxHash, approveTxHash } = result.value; // resetTxHash only on a guarded token
|
|
3106
|
+
*/
|
|
3107
|
+
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>>;
|
|
3108
|
+
|
|
3109
|
+
/**
|
|
3110
|
+
* Mutation variables for {@link useLeverageYieldApiCreateDepositIntent}. The per-request `apiConfig` override belongs here
|
|
3111
|
+
* rather than at the hook level — different calls in the same component can target different
|
|
3112
|
+
* endpoints without re-rendering.
|
|
3113
|
+
*/
|
|
3114
|
+
type UseLeverageYieldApiCreateDepositIntentVars = {
|
|
3115
|
+
body: CreateDepositIntentParamsV2;
|
|
3116
|
+
apiConfig?: RequestOverrideConfig;
|
|
3117
|
+
};
|
|
3118
|
+
/**
|
|
3119
|
+
* React hook to build an unsigned deposit create-intent transaction (any token → lsoda* shares) via the leverage-yield API — `sodax.api.leverageYield.createDepositIntent`.
|
|
3120
|
+
*/
|
|
3121
|
+
declare const useLeverageYieldApiCreateDepositIntent: ({ mutationOptions, }?: MutationHookParams<CreateIntentResponseV2, UseLeverageYieldApiCreateDepositIntentVars>) => SafeUseMutationResult<CreateIntentResponseV2, Error, UseLeverageYieldApiCreateDepositIntentVars>;
|
|
3122
|
+
|
|
3123
|
+
/**
|
|
3124
|
+
* Mutation variables for {@link useLeverageYieldApiCreateWithdrawIntent}. The per-request `apiConfig` override belongs here
|
|
3125
|
+
* rather than at the hook level — different calls in the same component can target different
|
|
3126
|
+
* endpoints without re-rendering.
|
|
3127
|
+
*/
|
|
3128
|
+
type UseLeverageYieldApiCreateWithdrawIntentVars = {
|
|
3129
|
+
body: CreateWithdrawIntentParamsV2;
|
|
3130
|
+
apiConfig?: RequestOverrideConfig;
|
|
3131
|
+
};
|
|
3132
|
+
/**
|
|
3133
|
+
* React hook to build an unsigned withdraw create-intent transaction (lsoda* shares → any token) via the leverage-yield API — `sodax.api.leverageYield.createWithdrawIntent`.
|
|
3134
|
+
*/
|
|
3135
|
+
declare const useLeverageYieldApiCreateWithdrawIntent: ({ mutationOptions, }?: MutationHookParams<CreateIntentResponseV2, UseLeverageYieldApiCreateWithdrawIntentVars>) => SafeUseMutationResult<CreateIntentResponseV2, Error, UseLeverageYieldApiCreateWithdrawIntentVars>;
|
|
3136
|
+
|
|
3137
|
+
/**
|
|
3138
|
+
* Mutation variables for {@link useLeverageYieldApiSubmitIntent}. The per-request `apiConfig` override belongs here
|
|
3139
|
+
* rather than at the hook level — different calls in the same component can target different
|
|
3140
|
+
* endpoints without re-rendering.
|
|
3141
|
+
*/
|
|
3142
|
+
type UseLeverageYieldApiSubmitIntentVars = {
|
|
3143
|
+
body: SubmitIntentRequestV2;
|
|
3144
|
+
apiConfig?: RequestOverrideConfig;
|
|
3145
|
+
};
|
|
3146
|
+
/**
|
|
3147
|
+
* React hook to submit the broadcast intent tx to the relay via the leverage-yield API — `sodax.api.leverageYield.submitIntent`.
|
|
3148
|
+
*/
|
|
3149
|
+
declare const useLeverageYieldApiSubmitIntent: ({ mutationOptions, }?: MutationHookParams<SubmitIntentResponseV2, UseLeverageYieldApiSubmitIntentVars>) => SafeUseMutationResult<SubmitIntentResponseV2, Error, UseLeverageYieldApiSubmitIntentVars>;
|
|
3150
|
+
|
|
3151
|
+
type UseLeverageYieldApiStatusParams = ReadHookParams<StatusResponseV2 | undefined, {
|
|
3152
|
+
intentTxHash: string | undefined;
|
|
3153
|
+
apiConfig?: RequestOverrideConfig;
|
|
3154
|
+
}>;
|
|
3155
|
+
/**
|
|
3156
|
+
* React hook for polling the solver intent status by hub-chain intent tx hash via the leverage-yield
|
|
3157
|
+
* API — `sodax.api.leverageYield.getStatus`. Returns `{ status, fillTxHash? }`.
|
|
3158
|
+
*
|
|
3159
|
+
* @example
|
|
3160
|
+
* const { data } = useLeverageYieldApiStatus({ params: { intentTxHash: '0x123...' } });
|
|
3161
|
+
*
|
|
3162
|
+
* @remarks
|
|
3163
|
+
* - Default refetch interval is 1 second; stops once `status` is `3` (SOLVED) or `4` (FAILED).
|
|
3164
|
+
*/
|
|
3165
|
+
declare const useLeverageYieldApiStatus: ({ params, queryOptions, }?: UseLeverageYieldApiStatusParams) => UseQueryResult<StatusResponseV2 | undefined, Error>;
|
|
3166
|
+
|
|
3167
|
+
/**
|
|
3168
|
+
* Mutation variables for {@link useLeverageYieldApiCancelIntent}. The per-request `apiConfig` override belongs here
|
|
3169
|
+
* rather than at the hook level — different calls in the same component can target different
|
|
3170
|
+
* endpoints without re-rendering.
|
|
3171
|
+
*/
|
|
3172
|
+
type UseLeverageYieldApiCancelIntentVars = {
|
|
3173
|
+
body: CancelIntentRequestV2;
|
|
3174
|
+
apiConfig?: RequestOverrideConfig;
|
|
3175
|
+
};
|
|
3176
|
+
/**
|
|
3177
|
+
* React hook to build an unsigned cancel-intent transaction via the leverage-yield API — `sodax.api.leverageYield.cancelIntent`.
|
|
3178
|
+
*/
|
|
3179
|
+
declare const useLeverageYieldApiCancelIntent: ({ mutationOptions, }?: MutationHookParams<CancelIntentResponseV2, UseLeverageYieldApiCancelIntentVars>) => SafeUseMutationResult<CancelIntentResponseV2, Error, UseLeverageYieldApiCancelIntentVars>;
|
|
3180
|
+
|
|
3181
|
+
type UseLeverageYieldApiIntentHashParams = ReadHookParams<IntentHashResponseV2 | undefined, {
|
|
3182
|
+
intent: IntentRequestV2 | undefined;
|
|
3183
|
+
apiConfig?: RequestOverrideConfig;
|
|
3184
|
+
}>;
|
|
3185
|
+
/**
|
|
3186
|
+
* React hook to compute the keccak256 hash of an Intent struct via the leverage-yield API —
|
|
3187
|
+
* `sodax.api.leverageYield.getIntentHash`. Returns `{ hash }`.
|
|
3188
|
+
*
|
|
3189
|
+
* @example
|
|
3190
|
+
* const { data } = useLeverageYieldApiIntentHash({ params: { intent } });
|
|
3191
|
+
*/
|
|
3192
|
+
declare const useLeverageYieldApiIntentHash: ({ params, queryOptions, }?: UseLeverageYieldApiIntentHashParams) => UseQueryResult<IntentHashResponseV2 | undefined, Error>;
|
|
3193
|
+
|
|
3194
|
+
type UseLeverageYieldApiIntentPacketParams = ReadHookParams<IntentPacketResponseV2 | undefined, {
|
|
3195
|
+
body: IntentPacketRequestV2 | undefined;
|
|
3196
|
+
apiConfig?: RequestOverrideConfig;
|
|
3197
|
+
}>;
|
|
3198
|
+
/**
|
|
3199
|
+
* React hook to long-poll the relayer until the fill packet lands on the destination chain via the
|
|
3200
|
+
* leverage-yield API — `sodax.api.leverageYield.getSolvedIntentPacket`.
|
|
3201
|
+
*
|
|
3202
|
+
* @example
|
|
3203
|
+
* const { data } = useLeverageYieldApiIntentPacket({ params: { body: { chainId: 'sonic', fillTxHash: '0x...' } } });
|
|
3204
|
+
*/
|
|
3205
|
+
declare const useLeverageYieldApiIntentPacket: ({ params, queryOptions, }?: UseLeverageYieldApiIntentPacketParams) => UseQueryResult<IntentPacketResponseV2 | undefined, Error>;
|
|
3206
|
+
|
|
3207
|
+
type UseLeverageYieldApiIntentExtraDataParams = ReadHookParams<IntentExtraDataResponseV2 | undefined, {
|
|
3208
|
+
body: IntentExtraDataRequestV2 | undefined;
|
|
3209
|
+
apiConfig?: RequestOverrideConfig;
|
|
3210
|
+
}>;
|
|
3211
|
+
/**
|
|
3212
|
+
* React hook to recover the relay extra data needed by `/leverage-yield/intents/submit` via the
|
|
3213
|
+
* leverage-yield API — `sodax.api.leverageYield.getIntentSubmitTxExtraData`. Provide EITHER `txHash`
|
|
3214
|
+
* OR `intent` in the body.
|
|
3215
|
+
*
|
|
3216
|
+
* @example
|
|
3217
|
+
* const { data } = useLeverageYieldApiIntentExtraData({ params: { body: { txHash: '0x...' } } });
|
|
3218
|
+
*/
|
|
3219
|
+
declare const useLeverageYieldApiIntentExtraData: ({ params, queryOptions, }?: UseLeverageYieldApiIntentExtraDataParams) => UseQueryResult<IntentExtraDataResponseV2 | undefined, Error>;
|
|
3220
|
+
|
|
3221
|
+
type UseLeverageYieldApiFilledIntentParams = ReadHookParams<IntentStateV2 | undefined, {
|
|
3222
|
+
txHash: string | undefined;
|
|
3223
|
+
apiConfig?: RequestOverrideConfig;
|
|
3224
|
+
}>;
|
|
3225
|
+
/**
|
|
3226
|
+
* React hook to get the on-chain fill state for an intent by its hub-chain tx hash via the leverage-yield API — `sodax.api.leverageYield.getFilledIntent`.
|
|
3227
|
+
*
|
|
3228
|
+
* @example
|
|
3229
|
+
* const { data } = useLeverageYieldApiFilledIntent({ params: { txHash: '0x123...' } });
|
|
3230
|
+
*/
|
|
3231
|
+
declare const useLeverageYieldApiFilledIntent: ({ params, queryOptions, }?: UseLeverageYieldApiFilledIntentParams) => UseQueryResult<IntentStateV2 | undefined, Error>;
|
|
3232
|
+
|
|
3233
|
+
type UseLeverageYieldApiIntentParams = ReadHookParams<GetIntentResponseV2 | undefined, {
|
|
3234
|
+
txHash: string | undefined;
|
|
3235
|
+
apiConfig?: RequestOverrideConfig;
|
|
3236
|
+
}>;
|
|
3237
|
+
/**
|
|
3238
|
+
* React hook to look up an Intent struct by its hub-chain creation tx hash via the leverage-yield API — `sodax.api.leverageYield.getIntent`.
|
|
3239
|
+
*
|
|
3240
|
+
* @example
|
|
3241
|
+
* const { data } = useLeverageYieldApiIntent({ params: { txHash: '0x123...' } });
|
|
3242
|
+
*/
|
|
3243
|
+
declare const useLeverageYieldApiIntent: ({ params, queryOptions, }?: UseLeverageYieldApiIntentParams) => UseQueryResult<GetIntentResponseV2 | undefined, Error>;
|
|
3244
|
+
|
|
3245
|
+
type UseLeverageYieldApiEstimateGasParams = ReadHookParams<GasEstimateResponseV2 | undefined, {
|
|
3246
|
+
body: GasEstimateRequestV2 | undefined;
|
|
3247
|
+
apiConfig?: RequestOverrideConfig;
|
|
3248
|
+
}>;
|
|
3249
|
+
/**
|
|
3250
|
+
* React hook to estimate gas for a raw transaction on a spoke chain via the leverage-yield API —
|
|
3251
|
+
* `sodax.api.leverageYield.estimateGas`. Returns `{ gas }` (chain-specific shape).
|
|
3252
|
+
*
|
|
3253
|
+
* @example
|
|
3254
|
+
* const { data } = useLeverageYieldApiEstimateGas({ params: { body: { chainKey: 'sonic', tx: {...} } } });
|
|
3255
|
+
*/
|
|
3256
|
+
declare const useLeverageYieldApiEstimateGas: ({ params, queryOptions, }?: UseLeverageYieldApiEstimateGasParams) => UseQueryResult<GasEstimateResponseV2 | undefined, Error>;
|
|
3257
|
+
|
|
3258
|
+
type UseLeverageYieldApiPartnerFeeParams = ReadHookParams<FeeResponseV2 | undefined, {
|
|
3259
|
+
amount: string | undefined;
|
|
3260
|
+
apiConfig?: RequestOverrideConfig;
|
|
3261
|
+
}>;
|
|
3262
|
+
/**
|
|
3263
|
+
* React hook to compute the partner fee for a given input amount via the leverage-yield API — `sodax.api.leverageYield.getPartnerFee`.
|
|
3264
|
+
* Returns `{ fee }` (decimal string).
|
|
3265
|
+
*
|
|
3266
|
+
* @example
|
|
3267
|
+
* const { data } = useLeverageYieldApiPartnerFee({ params: { amount: '1000000' } });
|
|
3268
|
+
*/
|
|
3269
|
+
declare const useLeverageYieldApiPartnerFee: ({ params, queryOptions, }?: UseLeverageYieldApiPartnerFeeParams) => UseQueryResult<FeeResponseV2 | undefined, Error>;
|
|
3270
|
+
|
|
3271
|
+
type UseLeverageYieldApiSolverFeeParams = ReadHookParams<FeeResponseV2 | undefined, {
|
|
3272
|
+
amount: string | undefined;
|
|
3273
|
+
apiConfig?: RequestOverrideConfig;
|
|
3274
|
+
}>;
|
|
3275
|
+
/**
|
|
3276
|
+
* React hook to compute the protocol (solver) fee for a given input amount via the leverage-yield API — `sodax.api.leverageYield.getSolverFee`.
|
|
3277
|
+
* Returns `{ fee }` (decimal string).
|
|
3278
|
+
*
|
|
3279
|
+
* @example
|
|
3280
|
+
* const { data } = useLeverageYieldApiSolverFee({ params: { amount: '1000000' } });
|
|
3281
|
+
*/
|
|
3282
|
+
declare const useLeverageYieldApiSolverFee: ({ params, queryOptions, }?: UseLeverageYieldApiSolverFeeParams) => UseQueryResult<FeeResponseV2 | undefined, Error>;
|
|
3283
|
+
|
|
3284
|
+
/**
|
|
3285
|
+
* Mutation variables for {@link useLeverageYieldApiSubmitTx}. The per-request `apiConfig` override belongs here
|
|
3286
|
+
* rather than at the hook level — different calls in the same component can target different
|
|
3287
|
+
* endpoints without re-rendering.
|
|
3288
|
+
*/
|
|
3289
|
+
type UseLeverageYieldApiSubmitTxVars = {
|
|
3290
|
+
request: LeverageYieldSubmitTxRequestV2;
|
|
3291
|
+
apiConfig?: RequestOverrideConfig;
|
|
3292
|
+
};
|
|
3293
|
+
/**
|
|
3294
|
+
* React hook to submit a vault-swap transaction to be processed (relay, post-execution, etc.) via the leverage-yield API — `sodax.api.leverageYield.submitTx`.
|
|
3295
|
+
*/
|
|
3296
|
+
declare const useLeverageYieldApiSubmitTx: ({ mutationOptions, }?: MutationHookParams<SubmitTxResponseV2, UseLeverageYieldApiSubmitTxVars>) => SafeUseMutationResult<SubmitTxResponseV2, Error, UseLeverageYieldApiSubmitTxVars>;
|
|
3297
|
+
|
|
3298
|
+
type UseLeverageYieldApiSubmitTxStatusParams = ReadHookParams<SubmitTxStatusResponseV2 | undefined, {
|
|
3299
|
+
txHash: string | undefined;
|
|
3300
|
+
srcChainKey?: string;
|
|
3301
|
+
apiConfig?: RequestOverrideConfig;
|
|
3302
|
+
}>;
|
|
3303
|
+
/**
|
|
3304
|
+
* React hook for polling the processing status of a submitted vault-swap transaction via the
|
|
3305
|
+
* leverage-yield API — `sodax.api.leverageYield.getSubmitTxStatus`. Both `txHash` and `srcChainKey`
|
|
3306
|
+
* are required for the query to run.
|
|
3307
|
+
*
|
|
3308
|
+
* @example
|
|
3309
|
+
* const { data: status } = useLeverageYieldApiSubmitTxStatus({
|
|
3310
|
+
* params: { txHash: '0x123...', srcChainKey: 'sonic' },
|
|
3311
|
+
* });
|
|
3312
|
+
*
|
|
3313
|
+
* @remarks
|
|
3314
|
+
* - Default refetch interval is 1 second; stops on 'solved' or 'failed' status, when the backend
|
|
3315
|
+
* marks the submission abandoned (`abandonedAt`) while `status` stays non-terminal, or once the
|
|
3316
|
+
* backend rejects the API key (401/403 is terminal — a retry cannot fix it).
|
|
3317
|
+
*/
|
|
3318
|
+
declare const useLeverageYieldApiSubmitTxStatus: ({ params, queryOptions, }?: UseLeverageYieldApiSubmitTxStatusParams) => UseQueryResult<SubmitTxStatusResponseV2 | undefined, Error>;
|
|
3319
|
+
|
|
2724
3320
|
/** Keep mutation variables aligned with the SDK operation. */
|
|
2725
3321
|
type UseActivateStellarAccountVars = ActivateStellarAccountParams;
|
|
2726
3322
|
/**
|
|
@@ -2885,4 +3481,4 @@ interface NearStorageGateState {
|
|
|
2885
3481
|
*/
|
|
2886
3482
|
declare function resolveNearStorageGate(chainKey: SpokeChainKey, check: NearStorageCheckResult): NearStorageGateState;
|
|
2887
3483
|
|
|
2888
|
-
export { type ATokenData, type ApprovalHashes, type ApprovalPlan, type ApprovalProgress, type ApprovalProgressListener, type BackendPaginationParams, type BitcoinTradingSetup, type BridgeApiApprovalHashes, type CreateSodaxQueryClientOptions, type DecreaseLiquidityParamsCore, type DepositParamsCore, 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 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 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, getLeverageYieldQuoteQueryOptions, getSponsorConfigQueryOptions, getStellarAccountActiveQueryOptions, getStellarAccountStatusQueryOptions, getStellarTrustlineCheckQueryOptions, getSwapQuoteQueryOptions, getXBalancesQueryOptions, isTerminalSwapIntentStatus, isUserRejectedError, loadRadfiSession, resolveNearStorageGate, resolveStellarGate, retryUnlessAuthFailure, runApprovalPlan, saveRadfiSession, toResult, unwrapResult, useAToken, useATokensBalances, useActivateStellarAccount, useApproveToken, useBackendAllMoneyMarketAssets, useBackendAllMoneyMarketBorrowers, useBackendIntentByHash, useBackendIntentByTxHash, useBackendMoneyMarketAsset, useBackendMoneyMarketAssetBorrowers, useBackendMoneyMarketAssetSuppliers, useBackendMoneyMarketPosition, useBackendOrderbook, useBackendUserIntents, 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, 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 };
|
|
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 };
|