@sodax/dapp-kit 2.2.0-rc.5 → 2.2.0-rc.6
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 +59 -6
- package/dist/index.d.ts +277 -3
- package/dist/index.mjs +219 -1
- package/package.json +2 -2
- package/src/hooks/_mutationContract.test.ts +4 -0
- package/src/hooks/leverageYield/index.ts +12 -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/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/swapsApi/index.ts +2 -2
- package/src/hooks/swapsApi/useSwapsApiSubmitTxStatus.ts +2 -2
package/README.md
CHANGED
|
@@ -9,12 +9,13 @@ High-level React hooks library for dApp developers. Wraps `@sodax/sdk` with Reac
|
|
|
9
9
|
- **Money Market** — `useSupply`, `useWithdraw`, `useBorrow`, `useRepay`, `useMMAllowance`, `useMMApprove`, plus reserves data hooks
|
|
10
10
|
- **Staking** — `useStake`, `useUnstake`, `useInstantUnstake`, `useClaim`, `useCancelUnstake`, approval hooks, info/config/ratio queries
|
|
11
11
|
- **DEX** — `useDexDeposit`, `useDexWithdraw`, `useSupplyLiquidity`, `useDecreaseLiquidity`, `useClaimRewards`, pool/position queries, param builders
|
|
12
|
+
- **Leverage Yield** — `useLeverageYieldDeposit`, `useLeverageYieldWithdraw`, `useLeverageYieldVaultSwap`, `useLeverageYieldNotifySolver`, plus vault position/APR/TVL/share queries
|
|
12
13
|
- **Migration** — `useMigrateIcxToSoda`, `useRevertMigrateSodaToIcx`, `useMigratebnUSD`, `useMigrateBaln`, `useMigrationApprove`, `useMigrationAllowance`
|
|
13
|
-
- **Bitcoin (Bound Exchange)** — `useRadfiAuth`, `useRadfiSession`, `useTradingWallet`, `useTradingWalletBalance`, `useBitcoinBalance`, `useFundTradingWallet`, `useRadfiWithdraw`, `useExpiredUtxos`, `useRenewUtxos`
|
|
14
|
-
- **Partner** — `useFetchAssetsBalances`, `useGetAutoSwapPreferences`, `useIsTokenApproved`, `useApproveToken`, `useSetSwapPreference`, `useFeeClaimSwap`
|
|
14
|
+
- **Bitcoin (Bound Exchange)** — `useRadfiAuth`, `useEnsureRadfiAccessToken`, `useRadfiSession`, `useTradingWallet`, `useTradingWalletBalance`, `useBitcoinBalance`, `useBitcoinTradingSetup`, `useFundTradingWallet`, `useRadfiWithdraw`, `useExpiredUtxos`, `useRenewUtxos`
|
|
15
|
+
- **Partner** — `useFetchAssetsBalances`, `useGetAutoSwapPreferences`, `useIsTokenApproved`, `useApproveToken`, `useSetSwapPreference`, `useFeeClaimSwap`, `useFeeClaimWithdraw`, `usePartnerCancelIntent`, `useGetUserIntent`, `useGetIntentDetails`
|
|
15
16
|
- **Recovery** — `useHubAssetBalances`, `useWithdrawHubAsset`
|
|
16
17
|
- **Backend Queries** — Intent tracking, swap-tx submission + status, orderbook, money market position queries
|
|
17
|
-
- **Shared** — `useXBalances`, `useDeriveUserWalletAddress`, `useGetUserHubWalletAddress`, `useStellarTrustlineCheck`, `useEstablishTrustline`, `useStellarGate`, `useEstimateGas`
|
|
18
|
+
- **Shared** — `useXBalances`, `useDeriveUserWalletAddress`, `useGetUserHubWalletAddress`, `useStellarTrustlineCheck`, `useEstablishTrustline`, `useStellarGate`, `useNearStorageCheck`, `useRegisterNearStorage`, `useNearStorageGate`, `useEstimateGas`
|
|
18
19
|
- **Sponsoring** — `useStellarAccountActive`, `useStellarAccountStatus`, `useSponsorConfig`, `useActivateStellarAccount`
|
|
19
20
|
|
|
20
21
|
## Installation
|
|
@@ -118,7 +119,7 @@ function SwapButton({ intentParams }: { intentParams: CreateIntentParams }) {
|
|
|
118
119
|
|
|
119
120
|
## Requirements
|
|
120
121
|
|
|
121
|
-
- Node.js >=
|
|
122
|
+
- Node.js >= 22.12.0
|
|
122
123
|
- React >= 18
|
|
123
124
|
- TypeScript
|
|
124
125
|
|
|
@@ -186,6 +187,31 @@ function SwapButton({ intentParams }: { intentParams: CreateIntentParams }) {
|
|
|
186
187
|
- [`useInstantUnstakeRatio()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/staking/useInstantUnstakeRatio.ts) — Instant unstake rate
|
|
187
188
|
- [`useConvertedAssets()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/staking/useConvertedAssets.ts) — xSODA to SODA conversion
|
|
188
189
|
|
|
190
|
+
### Leverage Position Hooks
|
|
191
|
+
|
|
192
|
+
A position is one Aave account owned by the user's **hub wallet**, never their signing address — pass
|
|
193
|
+
the signer as `params.srcAddress` and the SDK resolves the owner.
|
|
194
|
+
|
|
195
|
+
Which write hook to use is decided by the operation, not by preference. `increaseLeverage` and
|
|
196
|
+
`decreaseLeverage` only **post** a solver intent, and an intent the solver was never told about
|
|
197
|
+
expires unfilled, so those go through `useSubmitLeveragePositionIntent()`, which reports it.
|
|
198
|
+
`withdraw`, `settle` and `cancel` are synchronous on the hub and need no notification.
|
|
199
|
+
|
|
200
|
+
- [`useOpenLeveragePosition()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useOpenLeveragePosition.ts) — Open a position (`side: 'collateral' | 'debt'`) and report its intent
|
|
201
|
+
- [`useSubmitLeveragePositionIntent()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useSubmitLeveragePositionIntent.ts) — Run `increaseLeverage` / `decreaseLeverage` and report the intent
|
|
202
|
+
- [`useRunLeveragePositionOperation()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useRunLeveragePositionOperation.ts) — Run `withdraw` / `settle` / `cancel`; no intent, nothing to report
|
|
203
|
+
- [`useLeveragePositionPayoutAddress()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeveragePositionPayoutAddress.ts) — Where a withdrawal can be paid, which off the hub is not the signer
|
|
204
|
+
- [`useLeveragePositionFundingAllowance()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeveragePositionFundingAllowance.ts) — Whether the funding token is approved; the spender is chain-dependent
|
|
205
|
+
- [`useApproveLeveragePositionFunding()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useApproveLeveragePositionFunding.ts) — Approve it, against the spender the SDK resolves
|
|
206
|
+
- [`useLeveragePositionsForUser()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeveragePositionsForUser.ts) — A user's positions, discovered through their hub wallet
|
|
207
|
+
- [`useLeveragePositionAccount()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeveragePositionAccount.ts) — Collateral, debt, LTV and health factor
|
|
208
|
+
- [`useLeveragePositionInfo()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeveragePositionInfo.ts) — The position's collateral and borrow reserves
|
|
209
|
+
- [`useLeveragePositionCollateral()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeveragePositionCollateral.ts) — Collateral balance held
|
|
210
|
+
- [`useLeveragePositionPending()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeveragePositionPending.ts) — The pending-operation slot; a position permits one at a time
|
|
211
|
+
|
|
212
|
+
> Resolving means the intent is **live**, not that leverage moved. Off-hub (spoke) origins are
|
|
213
|
+
> experimental and unverified on-chain; see each hook's JSDoc.
|
|
214
|
+
|
|
189
215
|
### DEX Hooks
|
|
190
216
|
|
|
191
217
|
- [`usePools()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/dex/usePools.ts) — List available pools
|
|
@@ -205,6 +231,18 @@ function SwapButton({ intentParams }: { intentParams: CreateIntentParams }) {
|
|
|
205
231
|
- [`useCreateSupplyLiquidityParams()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/dex/useCreateSupplyLiquidityParams.ts) — Build tick range + liquidity params
|
|
206
232
|
- [`useCreateDecreaseLiquidityParams()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/dex/useCreateDecreaseLiquidityParams.ts) — Build decrease params from position state
|
|
207
233
|
|
|
234
|
+
### Leverage Yield Hooks
|
|
235
|
+
|
|
236
|
+
- [`useLeverageYieldEffectiveApr()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeverageYieldEffectiveApr.ts) — Vault effective APR (AAVE rates + LSD yield, leverage-adjusted; refreshes 60s)
|
|
237
|
+
- [`useLeverageYieldPosition()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeverageYieldPosition.ts) — Live position snapshot: collateral, debt, LTV, health factor, idle assets (refreshes 30s)
|
|
238
|
+
- [`useLeverageYieldTotalAssets()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeverageYieldTotalAssets.ts) — Vault total underlying assets (TVL)
|
|
239
|
+
- [`useLeverageYieldPreviewRedeem()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeverageYieldPreviewRedeem.ts) — Assets received for redeeming shares (ERC-4626 `previewRedeem`)
|
|
240
|
+
- [`useLeverageYieldShareBalances()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeverageYieldShareBalances.ts) — User `lsoda*` share balances across every chain they may hold a position under
|
|
241
|
+
- [`useLeverageYieldDeposit()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeverageYieldDeposit.ts) — Build the deposit payload (any token → `lsoda*` shares) for `useLeverageYieldVaultSwap`
|
|
242
|
+
- [`useLeverageYieldWithdraw()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeverageYieldWithdraw.ts) — Build the withdraw payload (`lsoda*` shares → any token) for `useLeverageYieldVaultSwap`
|
|
243
|
+
- [`useLeverageYieldVaultSwap()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeverageYieldVaultSwap.ts) — Execute an end-to-end vault swap (deposit or withdraw): create intent → verify → relay → notify solver
|
|
244
|
+
- [`useLeverageYieldNotifySolver()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/leverageYield/useLeverageYieldNotifySolver.ts) — Notify the solver that a vault intent landed on the hub (standalone step for manual relay flows)
|
|
245
|
+
|
|
208
246
|
### Migration Hooks
|
|
209
247
|
|
|
210
248
|
- [`useMigrateIcxToSoda()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/migrate/useMigrateIcxToSoda.ts) — ICX/wICX (ICON) → SODA (Sonic)
|
|
@@ -218,9 +256,11 @@ function SwapButton({ intentParams }: { intentParams: CreateIntentParams }) {
|
|
|
218
256
|
|
|
219
257
|
- [`useRadfiSession()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/bitcoin/useRadfiSession.ts) — Manage Bound Exchange session (login, auto-refresh)
|
|
220
258
|
- [`useRadfiAuth()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/bitcoin/useRadfiAuth.ts) — Authenticate with Bound Exchange via BIP322 signing
|
|
259
|
+
- [`useEnsureRadfiAccessToken()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/bitcoin/useEnsureRadfiAccessToken.ts) — Ensure a valid Bound Exchange access token (refresh, or full re-auth), returning it for a Bitcoin-source createIntent
|
|
221
260
|
- [`useTradingWallet()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/bitcoin/useTradingWallet.ts) — Get trading wallet address from persisted session
|
|
222
261
|
- [`useBitcoinBalance()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/bitcoin/useBitcoinBalance.ts) — BTC balance for any address
|
|
223
262
|
- [`useTradingWalletBalance()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/bitcoin/useTradingWalletBalance.ts) — Trading wallet balance from Bound Exchange API
|
|
263
|
+
- [`useBitcoinTradingSetup()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/bitcoin/useBitcoinTradingSetup.ts) — Bitcoin trading-wallet setup for one side of a cross-chain flow (inert unless the chain is Bitcoin)
|
|
224
264
|
- [`useFundTradingWallet()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/bitcoin/useFundTradingWallet.ts) — Fund trading wallet from personal wallet
|
|
225
265
|
- [`useRadfiWithdraw()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/bitcoin/useRadfiWithdraw.ts) — Withdraw from trading wallet
|
|
226
266
|
- [`useExpiredUtxos()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/bitcoin/useExpiredUtxos.ts) — Fetch expired UTXOs (polls every 60s)
|
|
@@ -234,6 +274,10 @@ function SwapButton({ intentParams }: { intentParams: CreateIntentParams }) {
|
|
|
234
274
|
- [`useApproveToken()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/partner/useApproveToken.ts) — Approve token
|
|
235
275
|
- [`useSetSwapPreference()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/partner/useSetSwapPreference.ts) — Set swap preference
|
|
236
276
|
- [`useFeeClaimSwap()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/partner/useFeeClaimSwap.ts) — Claim partner fees via swap
|
|
277
|
+
- [`useFeeClaimWithdraw()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/partner/useFeeClaimWithdraw.ts) — Withdraw a partner fee balance via a Sonic-sourced bridge to the destination chain
|
|
278
|
+
- [`usePartnerCancelIntent()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/partner/usePartnerCancelIntent.ts) — Cancel a stuck partner fee-claim auto-swap intent and recover the locked tokens
|
|
279
|
+
- [`useGetUserIntent()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/partner/useGetUserIntent.ts) — Look up the stored intent hash for a partner `(user, fromToken, toToken)` pair
|
|
280
|
+
- [`useGetIntentDetails()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/partner/useGetIntentDetails.ts) — Fetch the full intent details for a ProtocolIntents intent hash
|
|
237
281
|
|
|
238
282
|
### Recovery Hooks
|
|
239
283
|
|
|
@@ -252,6 +296,9 @@ function SwapButton({ intentParams }: { intentParams: CreateIntentParams }) {
|
|
|
252
296
|
- [`useEstablishTrustline()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/shared/useEstablishTrustline.ts) — Request Stellar trustline
|
|
253
297
|
- [`useRequestTrustline()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/shared/useRequestTrustline.ts) — **Deprecated**, use `useEstablishTrustline()`
|
|
254
298
|
- [`useStellarGate()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/shared/useStellarGate.ts) — Sequences the Stellar destination prerequisites (activation → funding → trustline)
|
|
299
|
+
- [`useNearStorageCheck()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/shared/useNearStorageCheck.ts) — Check NEP-141 storage registration for a token on NEAR (NEAR's analogue of a Stellar trustline)
|
|
300
|
+
- [`useRegisterNearStorage()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/shared/useRegisterNearStorage.ts) — Submit a NEP-141 `storage_deposit` so a NEAR account can receive a token
|
|
301
|
+
- [`useNearStorageGate()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/shared/useNearStorageGate.ts) — Derive the NEP-141 storage-registration UI gate state for a NEAR delivery
|
|
255
302
|
|
|
256
303
|
### Sponsoring Hooks
|
|
257
304
|
|
|
@@ -280,7 +327,7 @@ These drive sponsored activation, where the SODAX sponsor pays the account's bas
|
|
|
280
327
|
|
|
281
328
|
### Swaps API Hooks (`sodax.api.swaps`)
|
|
282
329
|
|
|
283
|
-
Typed wrappers over the backend Swaps API
|
|
330
|
+
Typed wrappers over the backend Swaps API — one `useSwapsApi*` hook per endpoint (21 total). Highlights:
|
|
284
331
|
|
|
285
332
|
- [`useSwapsApiQuote()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/swapsApi/useSwapsApiQuote.ts) — Solver quote for a cross-chain swap
|
|
286
333
|
- [`useSwapsApiCreateIntent()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/hooks/swapsApi/useSwapsApiCreateIntent.ts) — Build an unsigned create-intent tx
|
|
@@ -289,13 +336,19 @@ Typed wrappers over the backend Swaps API v2 — one `useSwapsApi*` hook per end
|
|
|
289
336
|
|
|
290
337
|
See [`src/hooks/swapsApi/`](https://github.com/icon-project/sodax-sdks/tree/main/packages/dapp-kit/src/hooks/swapsApi) for the full set (tokens, deadline, allowance, approve, submit/cancel intent, status, hash, packet, extra-data, intent lookups, limit orders, gas, fees).
|
|
291
338
|
|
|
292
|
-
###
|
|
339
|
+
### Utils
|
|
340
|
+
|
|
341
|
+
DEX param builders:
|
|
293
342
|
|
|
294
343
|
- [`createDepositParamsProps()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/utils/dex-utils.ts) — Build deposit params from pool data and spoke asset info
|
|
295
344
|
- [`createWithdrawParamsProps()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/utils/dex-utils.ts) — Build withdraw params with optional destination info
|
|
296
345
|
- [`createSupplyLiquidityParamsProps()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/utils/dex-utils.ts) — Build concentrated liquidity supply params
|
|
297
346
|
- [`createDecreaseLiquidityParamsProps()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/utils/dex-utils.ts) — Build decrease liquidity params
|
|
298
347
|
|
|
348
|
+
NEAR storage gate:
|
|
349
|
+
|
|
350
|
+
- [`resolveNearStorageGate()`](https://github.com/icon-project/sodax-sdks/blob/main/packages/dapp-kit/src/utils/nearStorageGate.ts) — Derive the NEP-141 storage-registration UI gate state (hook-free counterpart of `useNearStorageGate`)
|
|
351
|
+
|
|
299
352
|
## Development
|
|
300
353
|
|
|
301
354
|
```bash
|
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, 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, 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';
|
|
@@ -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.
|
|
@@ -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({
|
|
@@ -2814,6 +2832,262 @@ type UseLeverageYieldWithdrawVars = LeverageYieldSwapWithdrawParams;
|
|
|
2814
2832
|
*/
|
|
2815
2833
|
declare function useLeverageYieldWithdraw({ mutationOptions, }?: MutationHookParams<LeverageYieldSwapPayload, UseLeverageYieldWithdrawVars>): SafeUseMutationResult<LeverageYieldSwapPayload, Error, UseLeverageYieldWithdrawVars>;
|
|
2816
2834
|
|
|
2835
|
+
type UseLeveragePositionsParams = ReadHookParams<readonly Address$1[], {
|
|
2836
|
+
owner: Address$1 | undefined;
|
|
2837
|
+
}>;
|
|
2838
|
+
/**
|
|
2839
|
+
* Lists the leverage-position clones owned by `owner`, in creation order.
|
|
2840
|
+
*
|
|
2841
|
+
* Positions are the unpooled counterpart to leverage-yield vaults: each is its own AAVE
|
|
2842
|
+
* account, so one owner can hold several at different eMode categories and leverage tiers.
|
|
2843
|
+
* There is no static registry — discovery goes through the factory.
|
|
2844
|
+
*
|
|
2845
|
+
* Requires `leverageYield.positionFactory` in the `Sodax` config; without it the underlying
|
|
2846
|
+
* SDK call fails with a lookup error rather than guessing an address.
|
|
2847
|
+
*
|
|
2848
|
+
* @example
|
|
2849
|
+
* ```typescript
|
|
2850
|
+
* const { data: positions } = useLeveragePositions({ params: { owner } });
|
|
2851
|
+
* ```
|
|
2852
|
+
*/
|
|
2853
|
+
declare function useLeveragePositions({ params, queryOptions, }?: UseLeveragePositionsParams): UseQueryResult<readonly Address$1[], Error>;
|
|
2854
|
+
|
|
2855
|
+
type UseLeveragePositionAccountParams = ReadHookParams<LeveragePositionAccount, {
|
|
2856
|
+
position: Address$1 | undefined;
|
|
2857
|
+
}>;
|
|
2858
|
+
/**
|
|
2859
|
+
* Reads the live AAVE account snapshot for a leverage position — collateral, debt, LTV and
|
|
2860
|
+
* health factor.
|
|
2861
|
+
*
|
|
2862
|
+
* The figures come from the pool's `getUserAccountData`, not from the position contract,
|
|
2863
|
+
* which keeps no accounting of its own. Health factor is WAD (1e18); below 1e18 the position
|
|
2864
|
+
* is liquidatable, and there is no keeper deleveraging on the owner's behalf, so this is the
|
|
2865
|
+
* number a UI should surface most prominently. Debt accrues continuously, hence the 30s
|
|
2866
|
+
* default refresh.
|
|
2867
|
+
*
|
|
2868
|
+
* @example
|
|
2869
|
+
* ```typescript
|
|
2870
|
+
* const { data: account } = useLeveragePositionAccount({ params: { position } });
|
|
2871
|
+
* ```
|
|
2872
|
+
*/
|
|
2873
|
+
declare function useLeveragePositionAccount({ params, queryOptions, }?: UseLeveragePositionAccountParams): UseQueryResult<LeveragePositionAccount, Error>;
|
|
2874
|
+
|
|
2875
|
+
type UseLeveragePositionCollateralParams = ReadHookParams<LeveragePositionCollateral, {
|
|
2876
|
+
position: Address$1 | undefined;
|
|
2877
|
+
collateral?: Address$1;
|
|
2878
|
+
}>;
|
|
2879
|
+
/**
|
|
2880
|
+
* Reads a leverage position's collateral as an exact aToken balance.
|
|
2881
|
+
*
|
|
2882
|
+
* Use this, not `useLeveragePositionAccount().totalCollateralBase`, whenever an amount is going into
|
|
2883
|
+
* a transaction. The account snapshot is denominated in the oracle's base currency at 8 decimals, so
|
|
2884
|
+
* dividing it back out by a price gives an amount near the balance rather than the balance — and a
|
|
2885
|
+
* decrease-leverage call for more collateral than the position holds expires as an unfillable intent
|
|
2886
|
+
* instead of failing up front.
|
|
2887
|
+
*
|
|
2888
|
+
* @example
|
|
2889
|
+
* ```typescript
|
|
2890
|
+
* const { data: collateral } = useLeveragePositionCollateral({ params: { position } });
|
|
2891
|
+
* // collateral.balance is what a full exit sells
|
|
2892
|
+
* ```
|
|
2893
|
+
*/
|
|
2894
|
+
declare function useLeveragePositionCollateral({ params, queryOptions, }?: UseLeveragePositionCollateralParams): UseQueryResult<LeveragePositionCollateral, Error>;
|
|
2895
|
+
|
|
2896
|
+
type UseLeveragePositionInfoParams = ReadHookParams<LeveragePosition, {
|
|
2897
|
+
position: Address$1 | undefined;
|
|
2898
|
+
}>;
|
|
2899
|
+
/**
|
|
2900
|
+
* Reads a leverage position's static descriptor — owner, collateral, borrow token, and the
|
|
2901
|
+
* eMode category it was created with.
|
|
2902
|
+
*
|
|
2903
|
+
* All four are fixed at creation, so this never goes stale for a given position and is left
|
|
2904
|
+
* on the default cache behaviour rather than polled. Pair it with
|
|
2905
|
+
* `useLeveragePositionAccount` for the values that do move.
|
|
2906
|
+
*
|
|
2907
|
+
* @example
|
|
2908
|
+
* ```typescript
|
|
2909
|
+
* const { data: info } = useLeveragePositionInfo({ params: { position } });
|
|
2910
|
+
* ```
|
|
2911
|
+
*/
|
|
2912
|
+
declare function useLeveragePositionInfo({ params, queryOptions, }?: UseLeveragePositionInfoParams): UseQueryResult<LeveragePosition, Error>;
|
|
2913
|
+
|
|
2914
|
+
type UseLeveragePositionPendingParams = ReadHookParams<LeveragePositionPendingState, {
|
|
2915
|
+
position: Address$1 | undefined;
|
|
2916
|
+
}>;
|
|
2917
|
+
/**
|
|
2918
|
+
* A position's operation slot: what it recorded, whether that intent is still live, and whether it
|
|
2919
|
+
* is stuck resolved-but-unswept.
|
|
2920
|
+
*
|
|
2921
|
+
* Gate leverage controls on `isLive` — a position permits one intent at a time, so offering a button
|
|
2922
|
+
* that can only revert is worse than disabling it. Offer a settle on `needsSettle`: that is the state
|
|
2923
|
+
* where the intent is gone but the position still holds the grant and any contribution, and it is
|
|
2924
|
+
* invisible from `isLive` alone.
|
|
2925
|
+
*
|
|
2926
|
+
* Polled, because both change without the user acting: a solver fills, or the intent expires. The
|
|
2927
|
+
* interval sits well inside the 5-minute intent deadline so a resolution shows up while it matters.
|
|
2928
|
+
*
|
|
2929
|
+
* @example
|
|
2930
|
+
* ```typescript
|
|
2931
|
+
* const { data: slot } = useLeveragePositionPending({ params: { position } });
|
|
2932
|
+
* if (slot?.needsSettle) offerSettle();
|
|
2933
|
+
* ```
|
|
2934
|
+
*/
|
|
2935
|
+
declare function useLeveragePositionPending({ params, queryOptions, }?: UseLeveragePositionPendingParams): UseQueryResult<LeveragePositionPendingState, Error>;
|
|
2936
|
+
|
|
2937
|
+
type UseLeveragePositionsForUserParams = ReadHookParams<readonly Address$1[], {
|
|
2938
|
+
spokeChainKey: SpokeChainKey | undefined;
|
|
2939
|
+
spokeAddress: string | undefined;
|
|
2940
|
+
}>;
|
|
2941
|
+
/**
|
|
2942
|
+
* Lists a user's leverage positions from their spoke-side address and chain.
|
|
2943
|
+
*
|
|
2944
|
+
* Positions are owned by the user's hub wallet, not their EOA, so discovery resolves that address
|
|
2945
|
+
* first — the wallet router for a Sonic user, the cross-chain wallet for a spoke user, via one
|
|
2946
|
+
* call. Use this in user-facing code; {@link useLeveragePositions} takes a hub address directly
|
|
2947
|
+
* and will find nothing if handed an EOA.
|
|
2948
|
+
*
|
|
2949
|
+
* @example
|
|
2950
|
+
* ```typescript
|
|
2951
|
+
* const { data: positions } = useLeveragePositionsForUser({
|
|
2952
|
+
* params: { spokeChainKey: chain, spokeAddress: account.address },
|
|
2953
|
+
* });
|
|
2954
|
+
* ```
|
|
2955
|
+
*/
|
|
2956
|
+
declare function useLeveragePositionsForUser({ params, queryOptions, }?: UseLeveragePositionsForUserParams): UseQueryResult<readonly Address$1[], Error>;
|
|
2957
|
+
|
|
2958
|
+
/**
|
|
2959
|
+
* Mutation variables for {@link useOpenLeveragePosition}.
|
|
2960
|
+
*
|
|
2961
|
+
* `side` picks which asset funds the open, and the two take different params — so the union is
|
|
2962
|
+
* discriminated rather than merged, and the wrong field set is a type error instead of a revert.
|
|
2963
|
+
*/
|
|
2964
|
+
type UseOpenLeveragePositionVars<K extends SpokeChainKey = SpokeChainKey> = ({
|
|
2965
|
+
side?: 'collateral';
|
|
2966
|
+
} & Omit<SpokeExecActionParams<K, false, OpenPositionParams<K>>, 'raw'>) | ({
|
|
2967
|
+
side: 'debt';
|
|
2968
|
+
} & Omit<SpokeExecActionParams<K, false, OpenPositionFromDebtTokenParams<K>>, 'raw'>);
|
|
2969
|
+
/**
|
|
2970
|
+
* Opens a leveraged position, funded from any chain, and reports the intent it posts.
|
|
2971
|
+
*
|
|
2972
|
+
* Thin over `sodax.leverageYield.openLeveragePosition`, which owns the pairing — a non-React caller
|
|
2973
|
+
* gets the same guarantee. Resolving means the intent is LIVE, not that the position is open: read
|
|
2974
|
+
* `notified` before telling the owner to wait, since a failed notification still resolves.
|
|
2975
|
+
*
|
|
2976
|
+
* Positions are owned by the hub wallet, never the signing address — pass the signer as
|
|
2977
|
+
* `params.srcAddress` and the SDK resolves the owner.
|
|
2978
|
+
*
|
|
2979
|
+
* @experimental Off-hub (spoke) origins are unverified on-chain; see the SDK method.
|
|
2980
|
+
*/
|
|
2981
|
+
declare function useOpenLeveragePosition<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<LeveragePositionIntentResult, UseOpenLeveragePositionVars<K>>): SafeUseMutationResult<LeveragePositionIntentResult, Error, UseOpenLeveragePositionVars<K>>;
|
|
2982
|
+
|
|
2983
|
+
/** Mutation variables for {@link useSubmitLeveragePositionIntent} — the calls to run as the owner. */
|
|
2984
|
+
type UseSubmitLeveragePositionIntentVars<K extends SpokeChainKey = SpokeChainKey> = Omit<SpokeExecActionParams<K, false, PositionOperationParams<K, PositionBatchCall>>, 'raw'>;
|
|
2985
|
+
/**
|
|
2986
|
+
* Runs position calls that POST A SOLVER INTENT — `increaseLeverage` and `decreaseLeverage` — as the
|
|
2987
|
+
* owning hub wallet, then reports it.
|
|
2988
|
+
*
|
|
2989
|
+
* USE {@link useRunLeveragePositionOperation} for `withdraw`, `settle` and `cancel`. The split is the
|
|
2990
|
+
* SDK's: those three are synchronous on the hub and need no notification, while these two only post
|
|
2991
|
+
* a request a solver fills later. Sending a leverage change through the other hook leaves an intent
|
|
2992
|
+
* nothing will fill, and it expires without a word.
|
|
2993
|
+
*
|
|
2994
|
+
* A position permits one intent at a time, so poll `useLeveragePositionPending` rather than assuming
|
|
2995
|
+
* the next call may go out.
|
|
2996
|
+
*
|
|
2997
|
+
* @experimental Off-hub (spoke) origins are unverified on-chain; see the SDK method.
|
|
2998
|
+
*/
|
|
2999
|
+
declare function useSubmitLeveragePositionIntent<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<LeveragePositionIntentResult, UseSubmitLeveragePositionIntentVars<K>>): SafeUseMutationResult<LeveragePositionIntentResult, Error, UseSubmitLeveragePositionIntentVars<K>>;
|
|
3000
|
+
|
|
3001
|
+
/** Mutation variables for {@link useRunLeveragePositionOperation} — the calls to run as the owner. */
|
|
3002
|
+
type UseRunLeveragePositionOperationVars<K extends SpokeChainKey = SpokeChainKey> = Omit<SpokeExecActionParams<K, false, PositionOperationParams<K, PositionDirectCall>>, 'raw'>;
|
|
3003
|
+
/**
|
|
3004
|
+
* Runs position calls that DO NOT post an intent — `withdraw`, `settle` and `cancel` — as the owning
|
|
3005
|
+
* hub wallet. They are synchronous on the hub, so resolving means the work is done.
|
|
3006
|
+
*
|
|
3007
|
+
* Still routed, never sent directly: the position's `onlyOwner` is the hub wallet, so a call sent
|
|
3008
|
+
* from the signer reverts `NotOwner`. Locally through the wallet router on the hub, relayed from
|
|
3009
|
+
* anywhere else.
|
|
3010
|
+
*
|
|
3011
|
+
* USE {@link useSubmitLeveragePositionIntent} FOR `increaseLeverage` AND `decreaseLeverage`. Those
|
|
3012
|
+
* only post a request a solver fills later, and this hook does not notify the solver, so sending one
|
|
3013
|
+
* through here creates an intent nothing will fill. It expires silently and the operation is lost.
|
|
3014
|
+
* The other direction is harmless by comparison: notifying about a withdraw is noise, not damage.
|
|
3015
|
+
*
|
|
3016
|
+
* Balances are invalidated for `srcChainKey` because a withdraw pays out.
|
|
3017
|
+
*
|
|
3018
|
+
* @experimental OFF-HUB (SPOKE) ORIGINS ARE UNVERIFIED ON-CHAIN, and this is the hook that carries the
|
|
3019
|
+
* worst of it: an exit or cancellation delivering the underlying back to the spoke it
|
|
3020
|
+
* came from has never run on mainnet. Bitcoin is refused outright.
|
|
3021
|
+
*/
|
|
3022
|
+
declare function useRunLeveragePositionOperation<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<TxHashPair, UseRunLeveragePositionOperationVars<K>>): SafeUseMutationResult<TxHashPair, Error, UseRunLeveragePositionOperationVars<K>>;
|
|
3023
|
+
|
|
3024
|
+
/** Params for {@link useLeveragePositionPayoutAddress}. */
|
|
3025
|
+
type UseLeveragePositionPayoutAddressParams = {
|
|
3026
|
+
/** The chain the user signs on. */
|
|
3027
|
+
chainKey: SpokeChainKey;
|
|
3028
|
+
/**
|
|
3029
|
+
* Their address on that chain. Supplied by the caller — this package does not depend on a wallet
|
|
3030
|
+
* layer, so it cannot read the connected account itself.
|
|
3031
|
+
*/
|
|
3032
|
+
signerAddress: Address$1 | undefined;
|
|
3033
|
+
/** The position's owner, from `useGetUserHubWalletAddress`. */
|
|
3034
|
+
owner: Address$1 | undefined;
|
|
3035
|
+
};
|
|
3036
|
+
/**
|
|
3037
|
+
* Where funds leaving a position can actually be paid.
|
|
3038
|
+
*
|
|
3039
|
+
* `withdraw` is a plain pool withdrawal, so it pays out to an address ON THE HUB. For a hub-chain
|
|
3040
|
+
* user that can be their own address; for anyone else it cannot — their signing address belongs to
|
|
3041
|
+
* another chain, and for a non-EVM chain it is not an address the hub could pay at all. The hub
|
|
3042
|
+
* wallet is the one destination that is always theirs, and bridging onward is a separate operation.
|
|
3043
|
+
*
|
|
3044
|
+
* Returns `undefined` while either address is still resolving, which is the disabled state for a
|
|
3045
|
+
* withdraw button rather than a reason to fall back to the signer.
|
|
3046
|
+
*/
|
|
3047
|
+
declare function useLeveragePositionPayoutAddress({ params, }?: {
|
|
3048
|
+
params?: UseLeveragePositionPayoutAddressParams;
|
|
3049
|
+
}): Address$1 | undefined;
|
|
3050
|
+
|
|
3051
|
+
/** Params for {@link useLeveragePositionFundingAllowance}. */
|
|
3052
|
+
type UseLeveragePositionFundingAllowanceParams = ReadHookParams<boolean, {
|
|
3053
|
+
srcChainKey: SpokeChainKey;
|
|
3054
|
+
/** The user's address on `srcChainKey`. */
|
|
3055
|
+
srcAddress: string | undefined;
|
|
3056
|
+
/** Funding token, from `resolvePositionFunding` — not the reserve and not the vault. */
|
|
3057
|
+
token: string | undefined;
|
|
3058
|
+
amount: bigint | undefined;
|
|
3059
|
+
}>;
|
|
3060
|
+
/**
|
|
3061
|
+
* Whether the funding token is already approved for an open from `srcChainKey`.
|
|
3062
|
+
*
|
|
3063
|
+
* THE SPENDER IS CHAIN-DEPENDENT — the hub wallet on the hub, the spoke asset manager elsewhere —
|
|
3064
|
+
* so a hand-rolled `allowance` call against a guessed spender is right half the time. The SDK
|
|
3065
|
+
* resolves it; this only supplies React Query.
|
|
3066
|
+
*
|
|
3067
|
+
* Returns the SDK's answer as data. A chain with no allowance concept answers `true` without a call.
|
|
3068
|
+
*/
|
|
3069
|
+
declare function useLeveragePositionFundingAllowance({ params, queryOptions, }?: UseLeveragePositionFundingAllowanceParams): UseQueryResult<boolean, Error>;
|
|
3070
|
+
|
|
3071
|
+
/** Mutation variables for {@link useApproveLeveragePositionFunding}. */
|
|
3072
|
+
type UseApproveLeveragePositionFundingVars<K extends SpokeChainKey = SpokeChainKey> = {
|
|
3073
|
+
srcChainKey: K;
|
|
3074
|
+
srcAddress: string;
|
|
3075
|
+
/** Funding token, from `resolvePositionFunding` — not the reserve and not the vault. */
|
|
3076
|
+
token: string;
|
|
3077
|
+
amount: bigint;
|
|
3078
|
+
walletProvider?: GetWalletProviderType<K>;
|
|
3079
|
+
};
|
|
3080
|
+
/**
|
|
3081
|
+
* Approves the funding token for an open, against the spender the SDK resolves.
|
|
3082
|
+
*
|
|
3083
|
+
* THE SPENDER IS CHAIN-DEPENDENT — the hub wallet on the hub, the spoke asset manager elsewhere.
|
|
3084
|
+
* Nothing is ever approved to the position factory: it pulls from nobody.
|
|
3085
|
+
*
|
|
3086
|
+
* Wait for this before opening, and gate it on {@link useLeveragePositionFundingAllowance}, whose
|
|
3087
|
+
* query is invalidated here on success.
|
|
3088
|
+
*/
|
|
3089
|
+
declare function useApproveLeveragePositionFunding<K extends SpokeChainKey = SpokeChainKey>({ mutationOptions, }?: MutationHookParams<TxReturnType<K, false>, UseApproveLeveragePositionFundingVars<K>>): SafeUseMutationResult<TxReturnType<K, false>, Error, UseApproveLeveragePositionFundingVars<K>>;
|
|
3090
|
+
|
|
2817
3091
|
type UseLeverageYieldApiVaultsParams = ReadHookParams<GetLeverageVaultsResponseV2, {
|
|
2818
3092
|
apiConfig?: RequestOverrideConfig;
|
|
2819
3093
|
}>;
|
|
@@ -3481,4 +3755,4 @@ interface NearStorageGateState {
|
|
|
3481
3755
|
*/
|
|
3482
3756
|
declare function resolveNearStorageGate(chainKey: SpokeChainKey, check: NearStorageCheckResult): NearStorageGateState;
|
|
3483
3757
|
|
|
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 };
|
|
3758
|
+
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 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 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, getLeverageYieldQuoteQueryOptions, getSponsorConfigQueryOptions, getStellarAccountActiveQueryOptions, getStellarAccountStatusQueryOptions, getStellarTrustlineCheckQueryOptions, getSwapQuoteQueryOptions, getXBalancesQueryOptions, invalidateBalances, 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, 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, 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 };
|