@sodax/dapp-kit 2.0.0-rc.18 → 2.0.0-rc.19
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 +12 -3
- package/dist/index.d.ts +371 -46
- package/dist/index.mjs +370 -46
- package/package.json +2 -2
- package/src/hooks/_mutationContract.test.ts +6 -1
- package/src/hooks/backend/index.ts +1 -5
- package/src/hooks/bitcoin/index.ts +1 -0
- package/src/hooks/bitcoin/useBitcoinTradingSetup.ts +45 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/swapsApi/index.ts +41 -0
- package/src/hooks/swapsApi/isTerminalSwapIntentStatus.test.ts +24 -0
- package/src/hooks/swapsApi/isTerminalSwapIntentStatus.ts +11 -0
- package/src/hooks/swapsApi/useSwapsApiAllowance.ts +40 -0
- package/src/hooks/swapsApi/useSwapsApiApprove.ts +42 -0
- package/src/hooks/swapsApi/useSwapsApiCancelIntent.ts +41 -0
- package/src/hooks/swapsApi/useSwapsApiCreateIntent.ts +41 -0
- package/src/hooks/swapsApi/useSwapsApiCreateLimitOrder.ts +41 -0
- package/src/hooks/swapsApi/useSwapsApiDeadline.ts +36 -0
- package/src/hooks/swapsApi/useSwapsApiEstimateGas.ts +40 -0
- package/src/hooks/swapsApi/useSwapsApiFilledIntent.ts +41 -0
- package/src/hooks/swapsApi/useSwapsApiIntent.ts +40 -0
- package/src/hooks/swapsApi/useSwapsApiIntentExtraData.ts +41 -0
- package/src/hooks/swapsApi/useSwapsApiIntentHash.ts +40 -0
- package/src/hooks/swapsApi/useSwapsApiIntentPacket.ts +43 -0
- package/src/hooks/swapsApi/useSwapsApiPartnerFee.ts +40 -0
- package/src/hooks/swapsApi/useSwapsApiQuote.ts +55 -0
- package/src/hooks/swapsApi/useSwapsApiSolverFee.ts +40 -0
- package/src/hooks/swapsApi/useSwapsApiStatus.ts +45 -0
- package/src/hooks/swapsApi/useSwapsApiSubmitIntent.ts +43 -0
- package/src/hooks/{backend/useBackendSubmitSwapTx.ts → swapsApi/useSwapsApiSubmitTx.ts} +16 -17
- package/src/hooks/swapsApi/useSwapsApiSubmitTxStatus.ts +55 -0
- package/src/hooks/swapsApi/useSwapsApiTokens.ts +34 -0
- package/src/hooks/swapsApi/useSwapsApiTokensByChain.ts +40 -0
- package/src/hooks/backend/useBackendSubmitSwapTxStatus.ts +0 -59
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ High-level React hooks library for dApp developers. Wraps `@sodax/sdk` with Reac
|
|
|
13
13
|
- **Bitcoin (Bound Exchange)** — `useRadfiAuth`, `useRadfiSession`, `useTradingWallet`, `useTradingWalletBalance`, `useBitcoinBalance`, `useFundTradingWallet`, `useRadfiWithdraw`, `useExpiredUtxos`, `useRenewUtxos`
|
|
14
14
|
- **Partner** — `useFetchAssetsBalances`, `useGetAutoSwapPreferences`, `useIsTokenApproved`, `useApproveToken`, `useSetSwapPreference`, `useFeeClaimSwap`
|
|
15
15
|
- **Recovery** — `useHubAssetBalances`, `useWithdrawHubAsset`
|
|
16
|
-
- **Backend Queries** — Intent tracking, orderbook, money market position queries
|
|
16
|
+
- **Backend Queries** — Intent tracking, swap-tx submission + status, orderbook, money market position queries
|
|
17
17
|
- **Shared** — `useXBalances`, `useDeriveUserWalletAddress`, `useGetUserHubWalletAddress`, `useStellarTrustlineCheck`, `useRequestTrustline`, `useEstimateGas`
|
|
18
18
|
|
|
19
19
|
## Installation
|
|
@@ -262,8 +262,17 @@ function SwapButton({ intentParams }: { intentParams: CreateIntentParams }) {
|
|
|
262
262
|
- [`useBackendMoneyMarketAssetBorrowers()`](src/hooks/backend/useBackendMoneyMarketAssetBorrowers.ts) — Asset borrowers
|
|
263
263
|
- [`useBackendMoneyMarketAssetSuppliers()`](src/hooks/backend/useBackendMoneyMarketAssetSuppliers.ts) — Asset suppliers
|
|
264
264
|
- [`useBackendAllMoneyMarketBorrowers()`](src/hooks/backend/useBackendAllMoneyMarketBorrowers.ts) — All borrowers
|
|
265
|
-
|
|
266
|
-
|
|
265
|
+
|
|
266
|
+
### Swaps API Hooks (`sodax.api.swaps`)
|
|
267
|
+
|
|
268
|
+
Typed wrappers over the backend Swaps API v2 — one `useSwapsApi*` hook per endpoint (21 total). Highlights:
|
|
269
|
+
|
|
270
|
+
- [`useSwapsApiQuote()`](src/hooks/swapsApi/useSwapsApiQuote.ts) — Solver quote for a cross-chain swap
|
|
271
|
+
- [`useSwapsApiCreateIntent()`](src/hooks/swapsApi/useSwapsApiCreateIntent.ts) — Build an unsigned create-intent tx
|
|
272
|
+
- [`useSwapsApiSubmitTx()`](src/hooks/swapsApi/useSwapsApiSubmitTx.ts) — Submit swap tx to backend
|
|
273
|
+
- [`useSwapsApiSubmitTxStatus()`](src/hooks/swapsApi/useSwapsApiSubmitTxStatus.ts) — Check submitted swap status
|
|
274
|
+
|
|
275
|
+
See [`src/hooks/swapsApi/`](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).
|
|
267
276
|
|
|
268
277
|
### DEX Utils
|
|
269
278
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseMutationOptions, UseQueryOptions, UseMutationResult, MutateOptions, UseQueryResult, QueryClientConfig, QueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { Result, Sodax, SpokeChainKey, GetEstimateGasReturnType, EstimateGasParams, IStellarWalletProvider, StellarChainKey, INearWalletProvider, GetWalletProviderType, IXServiceBase, XToken, EvmHubProvider, IBitcoinWalletProvider, RadfiWalletBalance, RadfiUtxo, MoneyMarketBorrowActionParams, TxHashPair, MoneyMarketRepayActionParams, MoneyMarketSupplyActionParams, MoneyMarketWithdrawActionParams, UserReserveData, AggregatedReserveData, BaseCurrencyInfo, ReservesDataHumanized, Address as Address$1, MoneyMarketParams, MoneyMarketApproveActionParams, TxReturnType, Erc20Token, ChainKey, ReserveDataHumanized, FormatReserveUSDResponse, FormatUserSummaryResponse, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentQuoteRequest, SwapActionParams, SwapResponse, SolverIntentStatusResponse, Hex, CreateIntentParams, CreateLimitOrderParams, Intent, LimitOrderActionParams, IntentResponse, UserIntentsResponse,
|
|
2
|
+
import { Result, Sodax, SpokeChainKey, GetEstimateGasReturnType, EstimateGasParams, IStellarWalletProvider, StellarChainKey, INearWalletProvider, GetWalletProviderType, 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, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentQuoteRequest, SwapActionParams, SwapResponse, SolverIntentStatusResponse, Hex, CreateIntentParams, CreateLimitOrderParams, Intent, LimitOrderActionParams, IntentResponse, UserIntentsResponse, OrderbookResponse, MoneyMarketPosition, MoneyMarketAsset, MoneyMarketAssetBorrowers, MoneyMarketAssetSuppliers, MoneyMarketBorrowers, GetSwapTokensResponseV2, RequestOverrideConfig, GetSwapTokensByChainResponseV2, QuoteResponseV2, QuoteRequestV2, QuoteQueryV2, DeadlineResponseV2, DeadlineQueryV2, AllowanceCheckResponseV2, CreateIntentParamsV2, ApproveResponseV2, 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, 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, LeverageYieldEffectiveApr, LeverageYieldPosition, LeverageYieldSwapDepositParams, LeverageYieldSwapPayload, SolverExecutionRequest, SolverExecutionResponse, VaultSwapActionParams, VaultSwapResponse, LeverageYieldSwapWithdrawParams, SodaxOptions } from '@sodax/sdk';
|
|
3
3
|
export * from '@sodax/sdk';
|
|
4
4
|
import { Address } from 'viem';
|
|
5
5
|
import { ReactNode, ReactElement } from 'react';
|
|
@@ -368,6 +368,23 @@ type UseTradingWalletBalanceParams = ReadHookParams<RadfiWalletBalance, {
|
|
|
368
368
|
}>;
|
|
369
369
|
declare function useTradingWalletBalance({ params, queryOptions, }?: UseTradingWalletBalanceParams): UseQueryResult<RadfiWalletBalance, Error>;
|
|
370
370
|
|
|
371
|
+
interface UseBitcoinTradingSetupParams {
|
|
372
|
+
chainKey: SpokeChainKey;
|
|
373
|
+
/** This side's wallet provider + account, e.g. `useWalletProvider` / `useXAccount`. */
|
|
374
|
+
walletProvider: IWalletProvider | undefined;
|
|
375
|
+
address: string | undefined;
|
|
376
|
+
}
|
|
377
|
+
interface BitcoinTradingSetup {
|
|
378
|
+
wallet: IBitcoinWalletProvider | undefined;
|
|
379
|
+
tradingBalance: RadfiWalletBalance | undefined;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Bitcoin trading-wallet setup for one side of a cross-chain flow: Bitcoin funds move through a
|
|
383
|
+
* Bound Exchange (Radfi) trading wallet, not the personal wallet. Inert (no work) unless `chainKey`
|
|
384
|
+
* is Bitcoin. Wallet-layer inputs are passed in — this package doesn't depend on wallet-sdk-react.
|
|
385
|
+
*/
|
|
386
|
+
declare function useBitcoinTradingSetup({ chainKey, walletProvider, address, }: UseBitcoinTradingSetupParams): BitcoinTradingSetup;
|
|
387
|
+
|
|
371
388
|
type UseExpiredUtxosParams = ReadHookParams<RadfiUtxo[], {
|
|
372
389
|
walletProvider: IBitcoinWalletProvider | undefined;
|
|
373
390
|
tradingAddress: string | undefined;
|
|
@@ -735,50 +752,6 @@ type UseBackendUserIntentsParams = ReadHookParams<UserIntentsResponse | undefine
|
|
|
735
752
|
*/
|
|
736
753
|
declare const useBackendUserIntents: ({ params, queryOptions, }?: UseBackendUserIntentsParams) => UseQueryResult<UserIntentsResponse | undefined, Error>;
|
|
737
754
|
|
|
738
|
-
/**
|
|
739
|
-
* Mutation variables for {@link useBackendSubmitSwapTx}. The per-request `apiConfig` override
|
|
740
|
-
* (e.g. base URL) belongs here rather than at the hook level — different submissions in the same
|
|
741
|
-
* component can target different endpoints without re-rendering.
|
|
742
|
-
*/
|
|
743
|
-
type UseBackendSubmitSwapTxVars = {
|
|
744
|
-
request: SubmitSwapTxRequest;
|
|
745
|
-
apiConfig?: RequestOverrideConfig;
|
|
746
|
-
};
|
|
747
|
-
/**
|
|
748
|
-
* React hook for submitting a swap transaction to be processed by the backend (relay, post
|
|
749
|
-
* execution to solver, etc.).
|
|
750
|
-
*
|
|
751
|
-
* Pure mutation: pass `{ request, apiConfig? }` to `mutate({...})`. Default `retry: 3` is applied
|
|
752
|
-
* at the hook level — consumers can override via `mutationOptions.retry`.
|
|
753
|
-
*
|
|
754
|
-
* @example
|
|
755
|
-
* const { mutateAsync: submitSwapTx, isPending, error } = useBackendSubmitSwapTx();
|
|
756
|
-
*
|
|
757
|
-
* const result = await submitSwapTx({
|
|
758
|
-
* request: { txHash: '0x123...', srcChainKey: 'sonic', walletAddress: '0xabc...', intent: { ... }, relayData: '0x...' },
|
|
759
|
-
* apiConfig: { baseURL: 'https://...' },
|
|
760
|
-
* });
|
|
761
|
-
*/
|
|
762
|
-
declare const useBackendSubmitSwapTx: ({ mutationOptions, }?: MutationHookParams<SubmitSwapTxResponse, UseBackendSubmitSwapTxVars>) => SafeUseMutationResult<SubmitSwapTxResponse, Error, UseBackendSubmitSwapTxVars>;
|
|
763
|
-
|
|
764
|
-
type UseBackendSubmitSwapTxStatusParams = ReadHookParams<SubmitSwapTxStatusResponse | undefined, {
|
|
765
|
-
txHash: string | undefined;
|
|
766
|
-
srcChainKey?: string;
|
|
767
|
-
apiConfig?: RequestOverrideConfig;
|
|
768
|
-
}>;
|
|
769
|
-
/**
|
|
770
|
-
* React hook for polling the processing status of a submitted swap transaction.
|
|
771
|
-
*
|
|
772
|
-
* @example
|
|
773
|
-
* const { data: status } = useBackendSubmitSwapTxStatus({
|
|
774
|
-
* params: { txHash: '0x123...', srcChainKey: 'sonic' },
|
|
775
|
-
* });
|
|
776
|
-
*
|
|
777
|
-
* @remarks
|
|
778
|
-
* - Default refetch interval is 1 second; stops on 'executed' or 'failed' status.
|
|
779
|
-
*/
|
|
780
|
-
declare const useBackendSubmitSwapTxStatus: ({ params, queryOptions, }?: UseBackendSubmitSwapTxStatusParams) => UseQueryResult<SubmitSwapTxStatusResponse | undefined, Error>;
|
|
781
|
-
|
|
782
755
|
type BackendPaginationParams = {
|
|
783
756
|
offset: string;
|
|
784
757
|
limit: string;
|
|
@@ -869,6 +842,358 @@ type UseBackendAllMoneyMarketBorrowersParams = ReadHookParams<MoneyMarketBorrowe
|
|
|
869
842
|
*/
|
|
870
843
|
declare const useBackendAllMoneyMarketBorrowers: ({ params, queryOptions, }?: UseBackendAllMoneyMarketBorrowersParams) => UseQueryResult<MoneyMarketBorrowers | undefined>;
|
|
871
844
|
|
|
845
|
+
type UseSwapsApiTokensParams = ReadHookParams<GetSwapTokensResponseV2, {
|
|
846
|
+
apiConfig?: RequestOverrideConfig;
|
|
847
|
+
}>;
|
|
848
|
+
/**
|
|
849
|
+
* React hook to fetch all supported swap tokens grouped by SpokeChainKey via the swaps API —
|
|
850
|
+
* `sodax.api.swaps.getTokens`.
|
|
851
|
+
*
|
|
852
|
+
* @example
|
|
853
|
+
* const { data: tokensByChain } = useSwapsApiTokens();
|
|
854
|
+
*/
|
|
855
|
+
declare const useSwapsApiTokens: ({ params, queryOptions, }?: UseSwapsApiTokensParams) => UseQueryResult<GetSwapTokensResponseV2, Error>;
|
|
856
|
+
|
|
857
|
+
type UseSwapsApiTokensByChainParams = ReadHookParams<GetSwapTokensByChainResponseV2 | undefined, {
|
|
858
|
+
chainKey: string | undefined;
|
|
859
|
+
apiConfig?: RequestOverrideConfig;
|
|
860
|
+
}>;
|
|
861
|
+
/**
|
|
862
|
+
* React hook to fetch supported swap tokens for a single SpokeChainKey via the swaps API —
|
|
863
|
+
* `sodax.api.swaps.getTokensByChain`.
|
|
864
|
+
*
|
|
865
|
+
* @example
|
|
866
|
+
* const { data: tokens } = useSwapsApiTokensByChain({ params: { chainKey: '0xa4b1.arbitrum' } });
|
|
867
|
+
*/
|
|
868
|
+
declare const useSwapsApiTokensByChain: ({ params, queryOptions, }?: UseSwapsApiTokensByChainParams) => UseQueryResult<GetSwapTokensByChainResponseV2 | undefined, Error>;
|
|
869
|
+
|
|
870
|
+
type UseSwapsApiQuoteParams = ReadHookParams<QuoteResponseV2 | undefined, {
|
|
871
|
+
body: QuoteRequestV2 | undefined;
|
|
872
|
+
query?: QuoteQueryV2;
|
|
873
|
+
apiConfig?: RequestOverrideConfig;
|
|
874
|
+
}>;
|
|
875
|
+
/**
|
|
876
|
+
* React hook to get a solver quote for a cross-chain swap via the swaps API —
|
|
877
|
+
* `sodax.api.swaps.getQuote`. Pass `query.includeTxData = true` to also build an unsigned
|
|
878
|
+
* create-intent transaction (`txData`); `srcAddress`/`dstAddress` are then required in the body.
|
|
879
|
+
*
|
|
880
|
+
* @example
|
|
881
|
+
* const { data: quote } = useSwapsApiQuote({
|
|
882
|
+
* params: {
|
|
883
|
+
* body: {
|
|
884
|
+
* tokenSrc: '0x...', tokenSrcChainKey: '0xa4b1.arbitrum',
|
|
885
|
+
* tokenDst: '0x...', tokenDstChainKey: 'sonic',
|
|
886
|
+
* amount: '1000000', quoteType: 'exact_input',
|
|
887
|
+
* },
|
|
888
|
+
* },
|
|
889
|
+
* });
|
|
890
|
+
*/
|
|
891
|
+
declare const useSwapsApiQuote: ({ params, queryOptions, }?: UseSwapsApiQuoteParams) => UseQueryResult<QuoteResponseV2 | undefined, Error>;
|
|
892
|
+
|
|
893
|
+
type UseSwapsApiDeadlineParams = ReadHookParams<DeadlineResponseV2, {
|
|
894
|
+
query?: DeadlineQueryV2;
|
|
895
|
+
apiConfig?: RequestOverrideConfig;
|
|
896
|
+
}>;
|
|
897
|
+
/**
|
|
898
|
+
* React hook to compute a swap deadline (hub timestamp + `offsetSeconds`, default 300s) via the
|
|
899
|
+
* swaps API — `sodax.api.swaps.getDeadline`.
|
|
900
|
+
*
|
|
901
|
+
* @example
|
|
902
|
+
* const { data: deadline } = useSwapsApiDeadline({ params: { query: { offsetSeconds: 600 } } });
|
|
903
|
+
*/
|
|
904
|
+
declare const useSwapsApiDeadline: ({ params, queryOptions, }?: UseSwapsApiDeadlineParams) => UseQueryResult<DeadlineResponseV2, Error>;
|
|
905
|
+
|
|
906
|
+
type UseSwapsApiAllowanceParams = ReadHookParams<AllowanceCheckResponseV2 | undefined, {
|
|
907
|
+
body: CreateIntentParamsV2 | undefined;
|
|
908
|
+
apiConfig?: RequestOverrideConfig;
|
|
909
|
+
}>;
|
|
910
|
+
/**
|
|
911
|
+
* React hook to check whether the source-token allowance is already sufficient for an intent via
|
|
912
|
+
* the swaps API — `sodax.api.swaps.checkAllowance`. Returns `{ valid }`.
|
|
913
|
+
*
|
|
914
|
+
* @example
|
|
915
|
+
* const { data: allowance } = useSwapsApiAllowance({ params: { body: createIntentParams } });
|
|
916
|
+
*/
|
|
917
|
+
declare const useSwapsApiAllowance: ({ params, queryOptions, }?: UseSwapsApiAllowanceParams) => UseQueryResult<AllowanceCheckResponseV2 | undefined, Error>;
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Mutation variables for {@link useSwapsApiApprove}. The per-request `apiConfig` override belongs
|
|
921
|
+
* here rather than at the hook level — different calls in the same component can target different
|
|
922
|
+
* endpoints without re-rendering.
|
|
923
|
+
*/
|
|
924
|
+
type UseSwapsApiApproveVars = {
|
|
925
|
+
body: CreateIntentParamsV2;
|
|
926
|
+
apiConfig?: RequestOverrideConfig;
|
|
927
|
+
};
|
|
928
|
+
/**
|
|
929
|
+
* React hook to build an unsigned token-approval transaction for the source token via the swaps
|
|
930
|
+
* API — `sodax.api.swaps.approve`. Returns `{ tx }` (chain-specific unsigned tx) to sign and
|
|
931
|
+
* broadcast yourself; it does not change state, so no queries are invalidated.
|
|
932
|
+
*
|
|
933
|
+
* @example
|
|
934
|
+
* const { mutateAsync: approve } = useSwapsApiApprove();
|
|
935
|
+
* const { tx } = await approve({ body: createIntentParams });
|
|
936
|
+
*/
|
|
937
|
+
declare const useSwapsApiApprove: ({ mutationOptions, }?: MutationHookParams<ApproveResponseV2, UseSwapsApiApproveVars>) => SafeUseMutationResult<ApproveResponseV2, Error, UseSwapsApiApproveVars>;
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* Mutation variables for {@link useSwapsApiCreateIntent}. The per-request `apiConfig` override
|
|
941
|
+
* belongs here rather than at the hook level.
|
|
942
|
+
*/
|
|
943
|
+
type UseSwapsApiCreateIntentVars = {
|
|
944
|
+
body: CreateIntentParamsV2;
|
|
945
|
+
apiConfig?: RequestOverrideConfig;
|
|
946
|
+
};
|
|
947
|
+
/**
|
|
948
|
+
* React hook to build an unsigned create-intent transaction via the swaps API —
|
|
949
|
+
* `sodax.api.swaps.createIntent`. Returns `{ tx, intent, relayData }` to sign and broadcast
|
|
950
|
+
* yourself; it does not change state, so no queries are invalidated.
|
|
951
|
+
*
|
|
952
|
+
* @example
|
|
953
|
+
* const { mutateAsync: createIntent } = useSwapsApiCreateIntent();
|
|
954
|
+
* const { tx, intent, relayData } = await createIntent({ body: createIntentParams });
|
|
955
|
+
*/
|
|
956
|
+
declare const useSwapsApiCreateIntent: ({ mutationOptions, }?: MutationHookParams<CreateIntentResponseV2, UseSwapsApiCreateIntentVars>) => SafeUseMutationResult<CreateIntentResponseV2, Error, UseSwapsApiCreateIntentVars>;
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* Mutation variables for {@link useSwapsApiSubmitIntent}. The per-request `apiConfig` override
|
|
960
|
+
* belongs here rather than at the hook level.
|
|
961
|
+
*/
|
|
962
|
+
type UseSwapsApiSubmitIntentVars = {
|
|
963
|
+
body: SubmitIntentRequestV2;
|
|
964
|
+
apiConfig?: RequestOverrideConfig;
|
|
965
|
+
};
|
|
966
|
+
/**
|
|
967
|
+
* React hook to submit the broadcast intent tx to the relay via the swaps API —
|
|
968
|
+
* `sodax.api.swaps.submitIntent`. Returns `{ result }` (opaque relay response).
|
|
969
|
+
*
|
|
970
|
+
* No auto-retry (`retry: false`): submitting is non-idempotent — a retry after a lost response
|
|
971
|
+
* could double-submit to the relay. Override via `mutationOptions.retry` if your relay dedupes.
|
|
972
|
+
*
|
|
973
|
+
* @example
|
|
974
|
+
* const { mutateAsync: submitIntent } = useSwapsApiSubmitIntent();
|
|
975
|
+
* const { result } = await submitIntent({ body: { chainId: '146', txHash: '0x123...' } });
|
|
976
|
+
*/
|
|
977
|
+
declare const useSwapsApiSubmitIntent: ({ mutationOptions, }?: MutationHookParams<SubmitIntentResponseV2, UseSwapsApiSubmitIntentVars>) => SafeUseMutationResult<SubmitIntentResponseV2, Error, UseSwapsApiSubmitIntentVars>;
|
|
978
|
+
|
|
979
|
+
type UseSwapsApiStatusParams = ReadHookParams<StatusResponseV2 | undefined, {
|
|
980
|
+
intentTxHash: string | undefined;
|
|
981
|
+
apiConfig?: RequestOverrideConfig;
|
|
982
|
+
}>;
|
|
983
|
+
/**
|
|
984
|
+
* React hook for polling the solver intent status by hub-chain intent tx hash via the swaps API —
|
|
985
|
+
* `sodax.api.swaps.getStatus`. Returns `{ status, fillTxHash? }` (`fillTxHash` set when `status === 3`).
|
|
986
|
+
*
|
|
987
|
+
* @example
|
|
988
|
+
* const { data } = useSwapsApiStatus({ params: { intentTxHash: '0x123...' } });
|
|
989
|
+
*
|
|
990
|
+
* @remarks
|
|
991
|
+
* - Default refetch interval is 1 second; stops once `status` is `3` (SOLVED) or `4` (FAILED).
|
|
992
|
+
*/
|
|
993
|
+
declare const useSwapsApiStatus: ({ params, queryOptions, }?: UseSwapsApiStatusParams) => UseQueryResult<StatusResponseV2 | undefined, Error>;
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* Terminal solver intent states: once reached, the intent is resolved and polling stops.
|
|
997
|
+
* `3` = SOLVED, `4` = FAILED (per `SwapIntentStatusCodeV2`); `-1` / `1` / `2` are non-terminal.
|
|
998
|
+
*
|
|
999
|
+
* Kept in its own pure module (no React/context imports) so it is unit-testable in dapp-kit's
|
|
1000
|
+
* `node` test environment — importing the hook itself pulls in `useSodaxContext`.
|
|
1001
|
+
*/
|
|
1002
|
+
declare const isTerminalSwapIntentStatus: (status: SwapIntentStatusCodeV2 | undefined) => boolean;
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Mutation variables for {@link useSwapsApiCancelIntent}. The per-request `apiConfig` override
|
|
1006
|
+
* belongs here rather than at the hook level.
|
|
1007
|
+
*/
|
|
1008
|
+
type UseSwapsApiCancelIntentVars = {
|
|
1009
|
+
body: CancelIntentRequestV2;
|
|
1010
|
+
apiConfig?: RequestOverrideConfig;
|
|
1011
|
+
};
|
|
1012
|
+
/**
|
|
1013
|
+
* React hook to build an unsigned cancel-intent transaction via the swaps API —
|
|
1014
|
+
* `sodax.api.swaps.cancelIntent`. The `intent` carries `bigint` numerics. Returns `{ tx }` to sign
|
|
1015
|
+
* and broadcast yourself; it does not change state, so no queries are invalidated.
|
|
1016
|
+
*
|
|
1017
|
+
* @example
|
|
1018
|
+
* const { mutateAsync: cancelIntent } = useSwapsApiCancelIntent();
|
|
1019
|
+
* const { tx } = await cancelIntent({ body: { srcChainKey: 'sonic', intent } });
|
|
1020
|
+
*/
|
|
1021
|
+
declare const useSwapsApiCancelIntent: ({ mutationOptions, }?: MutationHookParams<CancelIntentResponseV2, UseSwapsApiCancelIntentVars>) => SafeUseMutationResult<CancelIntentResponseV2, Error, UseSwapsApiCancelIntentVars>;
|
|
1022
|
+
|
|
1023
|
+
type UseSwapsApiIntentHashParams = ReadHookParams<IntentHashResponseV2 | undefined, {
|
|
1024
|
+
intent: IntentRequestV2 | undefined;
|
|
1025
|
+
apiConfig?: RequestOverrideConfig;
|
|
1026
|
+
}>;
|
|
1027
|
+
/**
|
|
1028
|
+
* React hook to compute the keccak256 hash of an Intent struct via the swaps API —
|
|
1029
|
+
* `sodax.api.swaps.getIntentHash`. The `intent` carries `bigint` numerics. Returns `{ hash }`.
|
|
1030
|
+
*
|
|
1031
|
+
* @example
|
|
1032
|
+
* const { data } = useSwapsApiIntentHash({ params: { intent } });
|
|
1033
|
+
*/
|
|
1034
|
+
declare const useSwapsApiIntentHash: ({ params, queryOptions, }?: UseSwapsApiIntentHashParams) => UseQueryResult<IntentHashResponseV2 | undefined, Error>;
|
|
1035
|
+
|
|
1036
|
+
type UseSwapsApiIntentPacketParams = ReadHookParams<IntentPacketResponseV2 | undefined, {
|
|
1037
|
+
body: IntentPacketRequestV2 | undefined;
|
|
1038
|
+
apiConfig?: RequestOverrideConfig;
|
|
1039
|
+
}>;
|
|
1040
|
+
/**
|
|
1041
|
+
* React hook to long-poll the relayer until the fill packet lands on the destination chain via the
|
|
1042
|
+
* swaps API — `sodax.api.swaps.getSolvedIntentPacket`. The request is held open server-side until
|
|
1043
|
+
* the packet arrives (or `body.timeout` ms elapses), so no client-side `refetchInterval` is set.
|
|
1044
|
+
*
|
|
1045
|
+
* @example
|
|
1046
|
+
* const { data: packet } = useSwapsApiIntentPacket({
|
|
1047
|
+
* params: { body: { chainId: '146', fillTxHash: '0x123...' } },
|
|
1048
|
+
* });
|
|
1049
|
+
*/
|
|
1050
|
+
declare const useSwapsApiIntentPacket: ({ params, queryOptions, }?: UseSwapsApiIntentPacketParams) => UseQueryResult<IntentPacketResponseV2 | undefined, Error>;
|
|
1051
|
+
|
|
1052
|
+
type UseSwapsApiIntentExtraDataParams = ReadHookParams<IntentExtraDataResponseV2 | undefined, {
|
|
1053
|
+
body: IntentExtraDataRequestV2 | undefined;
|
|
1054
|
+
apiConfig?: RequestOverrideConfig;
|
|
1055
|
+
}>;
|
|
1056
|
+
/**
|
|
1057
|
+
* React hook to recover the relay extra data needed by `/swaps/intents/submit` via the swaps API —
|
|
1058
|
+
* `sodax.api.swaps.getIntentSubmitTxExtraData`. Provide EITHER `txHash` OR `intent` in the body
|
|
1059
|
+
* (whose `bigint` numerics are serialized by the SDK). Returns `{ address, payload }`.
|
|
1060
|
+
*
|
|
1061
|
+
* @example
|
|
1062
|
+
* const { data } = useSwapsApiIntentExtraData({ params: { body: { txHash: '0x123...' } } });
|
|
1063
|
+
*/
|
|
1064
|
+
declare const useSwapsApiIntentExtraData: ({ params, queryOptions, }?: UseSwapsApiIntentExtraDataParams) => UseQueryResult<IntentExtraDataResponseV2 | undefined, Error>;
|
|
1065
|
+
|
|
1066
|
+
type UseSwapsApiFilledIntentParams = ReadHookParams<IntentStateV2 | undefined, {
|
|
1067
|
+
txHash: string | undefined;
|
|
1068
|
+
apiConfig?: RequestOverrideConfig;
|
|
1069
|
+
}>;
|
|
1070
|
+
/**
|
|
1071
|
+
* React hook to get the on-chain fill state for an intent by its hub-chain tx hash via the swaps
|
|
1072
|
+
* API — `sodax.api.swaps.getFilledIntent`. Returns
|
|
1073
|
+
* `{ exists, remainingInput, receivedOutput, pendingPayment }`.
|
|
1074
|
+
*
|
|
1075
|
+
* @example
|
|
1076
|
+
* const { data: fill } = useSwapsApiFilledIntent({ params: { txHash: '0x123...' } });
|
|
1077
|
+
*/
|
|
1078
|
+
declare const useSwapsApiFilledIntent: ({ params, queryOptions, }?: UseSwapsApiFilledIntentParams) => UseQueryResult<IntentStateV2 | undefined, Error>;
|
|
1079
|
+
|
|
1080
|
+
type UseSwapsApiIntentParams = ReadHookParams<GetIntentResponseV2 | undefined, {
|
|
1081
|
+
txHash: string | undefined;
|
|
1082
|
+
apiConfig?: RequestOverrideConfig;
|
|
1083
|
+
}>;
|
|
1084
|
+
/**
|
|
1085
|
+
* React hook to look up an Intent struct by its hub-chain creation tx hash via the swaps API —
|
|
1086
|
+
* `sodax.api.swaps.getIntent`. The decoded intent's bigint fields are returned as decimal strings.
|
|
1087
|
+
*
|
|
1088
|
+
* @example
|
|
1089
|
+
* const { data: intent } = useSwapsApiIntent({ params: { txHash: '0x123...' } });
|
|
1090
|
+
*/
|
|
1091
|
+
declare const useSwapsApiIntent: ({ params, queryOptions, }?: UseSwapsApiIntentParams) => UseQueryResult<GetIntentResponseV2 | undefined, Error>;
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* Mutation variables for {@link useSwapsApiCreateLimitOrder}. The per-request `apiConfig` override
|
|
1095
|
+
* belongs here rather than at the hook level.
|
|
1096
|
+
*/
|
|
1097
|
+
type UseSwapsApiCreateLimitOrderVars = {
|
|
1098
|
+
body: CreateLimitOrderParamsV2;
|
|
1099
|
+
apiConfig?: RequestOverrideConfig;
|
|
1100
|
+
};
|
|
1101
|
+
/**
|
|
1102
|
+
* React hook to build an unsigned create-limit-order-intent transaction via the swaps API —
|
|
1103
|
+
* `sodax.api.swaps.createLimitOrderIntent` (same as create-intent but `deadline` is optional).
|
|
1104
|
+
* Returns `{ tx, intent, relayData }`; it does not change state, so no queries are invalidated.
|
|
1105
|
+
*
|
|
1106
|
+
* @example
|
|
1107
|
+
* const { mutateAsync: createLimitOrder } = useSwapsApiCreateLimitOrder();
|
|
1108
|
+
* const { tx, intent, relayData } = await createLimitOrder({ body: createLimitOrderParams });
|
|
1109
|
+
*/
|
|
1110
|
+
declare const useSwapsApiCreateLimitOrder: ({ mutationOptions, }?: MutationHookParams<CreateLimitOrderResponseV2, UseSwapsApiCreateLimitOrderVars>) => SafeUseMutationResult<CreateLimitOrderResponseV2, Error, UseSwapsApiCreateLimitOrderVars>;
|
|
1111
|
+
|
|
1112
|
+
type UseSwapsApiEstimateGasParams = ReadHookParams<GasEstimateResponseV2 | undefined, {
|
|
1113
|
+
body: GasEstimateRequestV2 | undefined;
|
|
1114
|
+
apiConfig?: RequestOverrideConfig;
|
|
1115
|
+
}>;
|
|
1116
|
+
/**
|
|
1117
|
+
* React hook to estimate gas for a raw transaction on a spoke chain via the swaps API —
|
|
1118
|
+
* `sodax.api.swaps.estimateGas`. Returns `{ gas }` (chain-specific shape).
|
|
1119
|
+
*
|
|
1120
|
+
* @example
|
|
1121
|
+
* const { data } = useSwapsApiEstimateGas({ params: { body: { chainKey: 'sonic', tx } } });
|
|
1122
|
+
*/
|
|
1123
|
+
declare const useSwapsApiEstimateGas: ({ params, queryOptions, }?: UseSwapsApiEstimateGasParams) => UseQueryResult<GasEstimateResponseV2 | undefined, Error>;
|
|
1124
|
+
|
|
1125
|
+
type UseSwapsApiPartnerFeeParams = ReadHookParams<FeeResponseV2 | undefined, {
|
|
1126
|
+
amount: string | undefined;
|
|
1127
|
+
apiConfig?: RequestOverrideConfig;
|
|
1128
|
+
}>;
|
|
1129
|
+
/**
|
|
1130
|
+
* React hook to compute the partner fee for a given input amount via the swaps API —
|
|
1131
|
+
* `sodax.api.swaps.getPartnerFee`. Returns `{ fee }` (decimal string).
|
|
1132
|
+
*
|
|
1133
|
+
* @example
|
|
1134
|
+
* const { data } = useSwapsApiPartnerFee({ params: { amount: '1000000' } });
|
|
1135
|
+
*/
|
|
1136
|
+
declare const useSwapsApiPartnerFee: ({ params, queryOptions, }?: UseSwapsApiPartnerFeeParams) => UseQueryResult<FeeResponseV2 | undefined, Error>;
|
|
1137
|
+
|
|
1138
|
+
type UseSwapsApiSolverFeeParams = ReadHookParams<FeeResponseV2 | undefined, {
|
|
1139
|
+
amount: string | undefined;
|
|
1140
|
+
apiConfig?: RequestOverrideConfig;
|
|
1141
|
+
}>;
|
|
1142
|
+
/**
|
|
1143
|
+
* React hook to compute the protocol (solver) fee for a given input amount via the swaps API —
|
|
1144
|
+
* `sodax.api.swaps.getSolverFee`. Returns `{ fee }` (decimal string).
|
|
1145
|
+
*
|
|
1146
|
+
* @example
|
|
1147
|
+
* const { data } = useSwapsApiSolverFee({ params: { amount: '1000000' } });
|
|
1148
|
+
*/
|
|
1149
|
+
declare const useSwapsApiSolverFee: ({ params, queryOptions, }?: UseSwapsApiSolverFeeParams) => UseQueryResult<FeeResponseV2 | undefined, Error>;
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* Mutation variables for {@link useSwapsApiSubmitTx}. The per-request `apiConfig` override
|
|
1153
|
+
* (e.g. base URL) belongs here rather than at the hook level — different submissions in the same
|
|
1154
|
+
* component can target different endpoints without re-rendering.
|
|
1155
|
+
*/
|
|
1156
|
+
type UseSwapsApiSubmitTxVars = {
|
|
1157
|
+
request: SubmitTxRequestV2;
|
|
1158
|
+
apiConfig?: RequestOverrideConfig;
|
|
1159
|
+
};
|
|
1160
|
+
/**
|
|
1161
|
+
* React hook for submitting a swap transaction to be processed (relay, post execution to the
|
|
1162
|
+
* solver, etc.) via the swaps API — `sodax.api.swaps.submitTx`.
|
|
1163
|
+
*
|
|
1164
|
+
* Pure mutation: pass `{ request, apiConfig? }` to `mutate({...})`. Default `retry: 3` is applied
|
|
1165
|
+
* at the hook level — consumers can override via `mutationOptions.retry`.
|
|
1166
|
+
*
|
|
1167
|
+
* @example
|
|
1168
|
+
* const { mutateAsync: submitSwapTx, isPending, error } = useSwapsApiSubmitTx();
|
|
1169
|
+
*
|
|
1170
|
+
* const result = await submitSwapTx({
|
|
1171
|
+
* request: { txHash: '0x123...', srcChainKey: 'sonic', walletAddress: '0xabc...', intent: { ... }, relayData: '0x...' },
|
|
1172
|
+
* apiConfig: { baseURL: 'https://...' },
|
|
1173
|
+
* });
|
|
1174
|
+
*/
|
|
1175
|
+
declare const useSwapsApiSubmitTx: ({ mutationOptions, }?: MutationHookParams<SubmitTxResponseV2, UseSwapsApiSubmitTxVars>) => SafeUseMutationResult<SubmitTxResponseV2, Error, UseSwapsApiSubmitTxVars>;
|
|
1176
|
+
|
|
1177
|
+
type UseSwapsApiSubmitTxStatusParams = ReadHookParams<SubmitTxStatusResponseV2 | undefined, {
|
|
1178
|
+
txHash: string | undefined;
|
|
1179
|
+
srcChainKey?: string;
|
|
1180
|
+
apiConfig?: RequestOverrideConfig;
|
|
1181
|
+
}>;
|
|
1182
|
+
/**
|
|
1183
|
+
* React hook for polling the processing status of a submitted swap transaction via the swaps API —
|
|
1184
|
+
* `sodax.api.swaps.getSubmitTxStatus`. Both `txHash` and `srcChainKey` are required for the query
|
|
1185
|
+
* to run (the swaps API v2 status query requires the source chain key).
|
|
1186
|
+
*
|
|
1187
|
+
* @example
|
|
1188
|
+
* const { data: status } = useSwapsApiSubmitTxStatus({
|
|
1189
|
+
* params: { txHash: '0x123...', srcChainKey: 'sonic' },
|
|
1190
|
+
* });
|
|
1191
|
+
*
|
|
1192
|
+
* @remarks
|
|
1193
|
+
* - Default refetch interval is 1 second; stops on 'executed' or 'failed' status.
|
|
1194
|
+
*/
|
|
1195
|
+
declare const useSwapsApiSubmitTxStatus: ({ params, queryOptions, }?: UseSwapsApiSubmitTxStatusParams) => UseQueryResult<SubmitTxStatusResponseV2 | undefined, Error>;
|
|
1196
|
+
|
|
872
1197
|
/**
|
|
873
1198
|
* Mutation variables for {@link useBridge}. Generic over `K extends SpokeChainKey` (defaults to
|
|
874
1199
|
* the full union). Sophisticated callers can lock K at the hook call site to narrow the
|
|
@@ -1917,4 +2242,4 @@ interface NearStorageGateState {
|
|
|
1917
2242
|
*/
|
|
1918
2243
|
declare function resolveNearStorageGate(chainKey: SpokeChainKey, check: NearStorageCheckResult): NearStorageGateState;
|
|
1919
2244
|
|
|
1920
|
-
export { type ATokenData, type BackendPaginationParams, 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 UseATokenParams, type UseATokensBalancesParams, type UseApproveTokenVars, type UseBitcoinBalanceParams, type UseBorrowVars, type UseBridgeAllowanceParams, type UseBridgeApproveVars, type UseBridgeVars, type UseClaimRewardsVars, type UseCreateDecreaseLiquidityParamsProps, type UseCreateDepositParamsProps, type UseCreateLimitOrderVars, type UseCreateSupplyLiquidityParamsProps, type UseCreateSupplyLiquidityParamsResult, type UseCreateWithdrawParamsProps, type UseDecreaseLiquidityVars, type UseDeriveUserWalletAddressParams, type UseDexAllowanceParams, type UseDexApproveVars, type UseDexDepositVars, type UseDexWithdrawVars, type UseEnsureRadfiAccessTokenVars, 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 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 UseStatusParams, type UseStellarTrustlineCheckParams, type UseSupplyLiquidityVars, type UseSupplyVars, type UseSwapAllowanceParams, type UseSwapApproveVars, type UseSwapVars, type UseTradingWalletBalanceParams, type UseUserFormattedSummaryParams, type UseUserReservesDataParams, type UseWithdrawHubAssetVars, type UseWithdrawVars, type UseXBalancesParams, type WithdrawParamsCore, type XBalancesInputs, clearRadfiSession, createDecreaseLiquidityParamsProps, createDepositParamsProps, createSodaxQueryClient, createSupplyLiquidityParamsProps, createWithdrawParamsProps, getXBalancesQueryOptions, loadRadfiSession, resolveNearStorageGate, saveRadfiSession, toResult, unwrapResult, useAToken, useATokensBalances, useApproveToken, useBackendAllMoneyMarketAssets, useBackendAllMoneyMarketBorrowers, useBackendIntentByHash, useBackendIntentByTxHash, useBackendMoneyMarketAsset, useBackendMoneyMarketAssetBorrowers, useBackendMoneyMarketAssetSuppliers, useBackendMoneyMarketPosition, useBackendOrderbook,
|
|
2245
|
+
export { type ATokenData, type BackendPaginationParams, type BitcoinTradingSetup, 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 UseATokenParams, type UseATokensBalancesParams, type UseApproveTokenVars, type UseBitcoinBalanceParams, type UseBitcoinTradingSetupParams, type UseBorrowVars, type UseBridgeAllowanceParams, type UseBridgeApproveVars, type UseBridgeVars, type UseClaimRewardsVars, type UseCreateDecreaseLiquidityParamsProps, type UseCreateDepositParamsProps, type UseCreateLimitOrderVars, type UseCreateSupplyLiquidityParamsProps, type UseCreateSupplyLiquidityParamsResult, type UseCreateWithdrawParamsProps, type UseDecreaseLiquidityVars, type UseDeriveUserWalletAddressParams, type UseDexAllowanceParams, type UseDexApproveVars, type UseDexDepositVars, type UseDexWithdrawVars, type UseEnsureRadfiAccessTokenVars, 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 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 UseStatusParams, type UseStellarTrustlineCheckParams, type UseSupplyLiquidityVars, type UseSupplyVars, type UseSwapAllowanceParams, type UseSwapApproveVars, type UseSwapVars, type UseSwapsApiAllowanceParams, 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, getXBalancesQueryOptions, isTerminalSwapIntentStatus, loadRadfiSession, resolveNearStorageGate, saveRadfiSession, toResult, unwrapResult, useAToken, useATokensBalances, useApproveToken, useBackendAllMoneyMarketAssets, useBackendAllMoneyMarketBorrowers, useBackendIntentByHash, useBackendIntentByTxHash, useBackendMoneyMarketAsset, useBackendMoneyMarketAssetBorrowers, useBackendMoneyMarketAssetSuppliers, useBackendMoneyMarketPosition, useBackendOrderbook, useBackendUserIntents, useBitcoinBalance, useBitcoinTradingSetup, useBorrow, useBridge, useBridgeAllowance, useBridgeApprove, useCancelLimitOrder, useCancelSwap, useCancelUnstake, useClaim, useClaimRewards, useConvertedAssets, useCreateDecreaseLiquidityParams, useCreateDepositParams, useCreateLimitOrder, useCreateSupplyLiquidityParams, useCreateWithdrawParams, useDecreaseLiquidity, useDeriveUserWalletAddress, useDexAllowance, useDexApprove, useDexDeposit, useDexWithdraw, useEnsureRadfiAccessToken, useEstimateGas, useExpiredUtxos, useFeeClaimSwap, useFeeClaimWithdraw, useFetchAssetsBalances, useFundTradingWallet, useGetAutoSwapPreferences, useGetBridgeableAmount, useGetBridgeableTokens, useGetIntentDetails, useGetUserHubWalletAddress, useGetUserIntent, useHubAssetBalances, useHubProvider, useInstantUnstake, useInstantUnstakeAllowance, useInstantUnstakeApprove, useInstantUnstakeRatio, useIsTokenApproved, useLeverageYieldDeposit, useLeverageYieldEffectiveApr, useLeverageYieldNotifySolver, useLeverageYieldPosition, useLeverageYieldPreviewRedeem, 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, useStake, useStakeAllowance, useStakeApprove, useStakeRatio, useStakingConfig, useStakingInfo, useStatus, useStellarTrustlineCheck, useSupply, useSupplyLiquidity, useSwap, useSwapAllowance, useSwapApprove, useSwapsApiAllowance, useSwapsApiApprove, 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 };
|