@aave/react 4.0.0-next.32 → 4.0.0-next.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +152 -39
- package/dist/index.d.ts +152 -39
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/privy.cjs +1 -1
- package/dist/privy.cjs.map +1 -1
- package/dist/privy.js +1 -1
- package/dist/privy.js.map +1 -1
- package/dist/thirdweb.cjs +1 -1
- package/dist/thirdweb.cjs.map +1 -1
- package/dist/thirdweb.js +1 -1
- package/dist/thirdweb.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { AaveClient, CurrencyQueryOptions, TimeWindowQueryOptions, UnexpectedError,
|
|
1
|
+
import { AaveClient, CurrencyQueryOptions, TimeWindowQueryOptions, UnexpectedError, ActivitiesRequest, PaginatedActivitiesResult } from '@aave/client';
|
|
2
2
|
export * from '@aave/client';
|
|
3
3
|
import React, { ReactNode } from 'react';
|
|
4
4
|
import { a as UseAsyncTask, C as CancelOperation, P as PendingTransaction, S as SendTransactionError, b as PendingTransactionError, E as ExecutionPlanHandler } from './writes-CcVGQGt5.cjs';
|
|
5
5
|
export { A as AsyncTaskError, c as AsyncTaskIdle, d as AsyncTaskLoading, e as AsyncTaskState, f as AsyncTaskSuccess, T as TransactionHandlerOptions, U as UseSendTransactionResult } from './writes-CcVGQGt5.cjs';
|
|
6
|
-
import { HubRequest, Hub, HubsRequest, HubAssetsRequest, HubAsset, HubSummaryHistoryRequest, HubSummarySample, AssetRequest, Asset, AssetPriceHistoryRequest, AssetPriceSample, AssetSupplyHistoryRequest, AssetSupplySample, AssetBorrowHistoryRequest, AssetBorrowSample, ProtocolHistoryRequest, ProtocolHistorySample, ReserveRequest, Reserve, ReservesRequest, BorrowApyHistoryRequest, ApySample, SupplyApyHistoryRequest, SpokeRequest, Spoke, SpokesRequest, SpokePositionManagersRequest, PaginatedSpokePositionManagerResult, SpokeUserPositionManagersRequest, PaginatedSpokeUserPositionManagerResult, TokenSwapQuoteRequest, SwapQuote, SwappableTokensRequest, Token, UserSwapsRequest, PaginatedUserSwapsResult, SwapStatusRequest, SwapStatus, SupplySwapQuoteRequest, BorrowSwapQuoteRequest,
|
|
7
|
-
import { Prettify,
|
|
6
|
+
import { HubRequest, Hub, HubsRequest, HubAssetsRequest, HubAsset, HubSummaryHistoryRequest, HubSummarySample, AssetRequest, Asset, AssetPriceHistoryRequest, AssetPriceSample, AssetSupplyHistoryRequest, AssetSupplySample, AssetBorrowHistoryRequest, AssetBorrowSample, ProtocolHistoryRequest, ProtocolHistorySample, ReserveRequest, Reserve, ReservesRequest, BorrowApyHistoryRequest, ApySample, SupplyApyHistoryRequest, SpokeRequest, Spoke, SpokesRequest, SpokePositionManagersRequest, PaginatedSpokePositionManagerResult, SpokeUserPositionManagersRequest, PaginatedSpokeUserPositionManagerResult, TokenSwapQuoteRequest, SwapQuote, InsufficientLiquidityError, SwappableTokensRequest, Token, UserSwapsRequest, PaginatedUserSwapsResult, SwapStatusRequest, SwapStatus, SupplySwapQuoteRequest, BorrowSwapQuoteRequest, PositionSwapApproval, SwapTypedData, SwapReceipt, InsufficientBalanceError, RepayWithSupplyQuoteRequest, WithdrawSwapQuoteRequest, Erc20Approval, SwapTransactionRequest, TransactionRequest, PrepareSwapCancelRequest, SwapCancelledResult, PreContractActionRequired, SupplyRequest, BorrowRequest, RepayRequest, WithdrawRequest, RenounceSpokeUserPositionManagerRequest, UpdateUserPositionConditionsRequest, SetUserSuppliesAsCollateralRequest, LiquidatePositionRequest, SetSpokeUserPositionManagerRequest, PreviewRequest, PreviewUserPosition, UserSuppliesRequest, UserSupplyItem, UserBorrowsRequest, UserBorrowItem, UserSummaryRequest, UserSummary, UserPositionsRequest, UserPosition, UserPositionRequest, UserBalancesRequest, UserBalance, UserRiskPremiumBreakdownRequest, UserRiskPremiumBreakdownItem, UserSummaryHistoryRequest, UserSummaryHistoryItem } from '@aave/graphql';
|
|
7
|
+
import { Prettify, ResultAsync, Signature, ResultAwareError, TxHash } from '@aave/types';
|
|
8
8
|
import { S as Suspendable, a as SuspenseResult, P as Pausable, b as PausableSuspenseResult, R as ReadResult, c as PausableReadResult, d as Selector } from './misc-B2Lsewb5.cjs';
|
|
9
9
|
export { e as UseChainArgs, g as UseChainsArgs, j as UseExchangeRateArgs, U as UseNetworkFee, m as UseNetworkFeeArgs, l as UseNetworkFeeRequestQuery, u as useChain, f as useChainAction, h as useChains, k as useExchangeRate, i as useExchangeRateAction } from './misc-B2Lsewb5.cjs';
|
|
10
|
-
import { UnexpectedError as UnexpectedError$1, CancelError, SigningError, TimeoutError, TransactionError
|
|
10
|
+
import { UnexpectedError as UnexpectedError$1, ValidationError, CancelError, SigningError, TimeoutError, TransactionError } from '@aave/core';
|
|
11
11
|
import { UserPositionQueryOptions } from '@aave/client/actions';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -1274,7 +1274,7 @@ declare function useTokenSwapQuote(args: Pausable<UseTokenSwapQuoteArgs>): Pausa
|
|
|
1274
1274
|
* }
|
|
1275
1275
|
* ```
|
|
1276
1276
|
*/
|
|
1277
|
-
declare function useTokenSwapQuoteAction(options?: Required<CurrencyQueryOptions>): UseAsyncTask<TokenSwapQuoteRequest, SwapQuote, UnexpectedError$1
|
|
1277
|
+
declare function useTokenSwapQuoteAction(options?: Required<CurrencyQueryOptions>): UseAsyncTask<TokenSwapQuoteRequest, SwapQuote, UnexpectedError$1 | ValidationError<InsufficientLiquidityError>>;
|
|
1278
1278
|
type UseSwappableTokensArgs = SwappableTokensRequest;
|
|
1279
1279
|
/**
|
|
1280
1280
|
* Fetch the list of tokens available for swapping on a specific chain.
|
|
@@ -1537,7 +1537,7 @@ declare function useSupplySwapQuote(args: Pausable<UseSupplySwapQuoteArgs>): Pau
|
|
|
1537
1537
|
* }
|
|
1538
1538
|
* ```
|
|
1539
1539
|
*/
|
|
1540
|
-
declare function useSupplySwapQuoteAction(options?: Required<CurrencyQueryOptions>): UseAsyncTask<SupplySwapQuoteRequest, SwapQuote, UnexpectedError$1
|
|
1540
|
+
declare function useSupplySwapQuoteAction(options?: Required<CurrencyQueryOptions>): UseAsyncTask<SupplySwapQuoteRequest, SwapQuote, UnexpectedError$1 | ValidationError<InsufficientLiquidityError>>;
|
|
1541
1541
|
type UseBorrowSwapQuoteArgs = Prettify<BorrowSwapQuoteRequest & CurrencyQueryOptions>;
|
|
1542
1542
|
/**
|
|
1543
1543
|
* Fetch a quote for a borrow swap operation with the specified parameters.
|
|
@@ -1635,36 +1635,89 @@ declare function useBorrowSwapQuote(args: Pausable<UseBorrowSwapQuoteArgs>): Pau
|
|
|
1635
1635
|
* }
|
|
1636
1636
|
* ```
|
|
1637
1637
|
*/
|
|
1638
|
-
declare function useBorrowSwapQuoteAction(options?: Required<CurrencyQueryOptions>): UseAsyncTask<BorrowSwapQuoteRequest, SwapQuote, UnexpectedError$1
|
|
1638
|
+
declare function useBorrowSwapQuoteAction(options?: Required<CurrencyQueryOptions>): UseAsyncTask<BorrowSwapQuoteRequest, SwapQuote, UnexpectedError$1 | ValidationError<InsufficientLiquidityError>>;
|
|
1639
1639
|
type SwapHandlerOptions = {
|
|
1640
1640
|
cancel: CancelOperation;
|
|
1641
1641
|
};
|
|
1642
|
-
/**
|
|
1643
|
-
*/
|
|
1644
|
-
type UseSwapSignerRequest = TransactionRequest;
|
|
1645
|
-
/**
|
|
1646
|
-
*/
|
|
1647
1642
|
type SwapSignerError = CancelError | SigningError | UnexpectedError$1;
|
|
1648
|
-
/**
|
|
1649
|
-
*/
|
|
1650
|
-
type UseSwapSignerResult = UseAsyncTask<UseSwapSignerRequest, PendingTransaction | Signature, SwapSignerError>;
|
|
1651
1643
|
type PositionSwapPlan = PositionSwapApproval | SwapTypedData;
|
|
1652
1644
|
type PositionSwapHandler = (plan: PositionSwapPlan, options: SwapHandlerOptions) => ResultAsync<PendingTransaction | Signature, SwapSignerError>;
|
|
1653
1645
|
type PositionSwapValue = {
|
|
1654
1646
|
quote?: SwapQuote;
|
|
1655
1647
|
};
|
|
1656
|
-
/**
|
|
1657
|
-
*/
|
|
1658
1648
|
type UseSupplySwapRequest = Prettify<SupplySwapQuoteRequest & CurrencyQueryOptions>;
|
|
1659
1649
|
/**
|
|
1650
|
+
* Orchestrate the supply swap execution plan.
|
|
1651
|
+
*
|
|
1652
|
+
* ```tsx
|
|
1653
|
+
* const [signTypedData] = useSignTypedData(wallet);
|
|
1654
|
+
*
|
|
1655
|
+
* const [swapSupply, { loading, error }] = useSupplySwap((plan) => {
|
|
1656
|
+
* switch (plan.__typename) {
|
|
1657
|
+
* case 'PositionSwapAdapterContractApproval':
|
|
1658
|
+
* case 'PositionSwapPositionManagerApproval':
|
|
1659
|
+
* return signTypedData(plan.bySignature);
|
|
1660
|
+
*
|
|
1661
|
+
* case 'SwapTypedData':
|
|
1662
|
+
* return signTypedData(plan);
|
|
1663
|
+
* }
|
|
1664
|
+
* });
|
|
1665
|
+
*
|
|
1666
|
+
* const result = await swapSupply({
|
|
1667
|
+
* market: {
|
|
1668
|
+
* sellPosition: supplyPosition.id,
|
|
1669
|
+
* buyReserve: targetReserve.id,
|
|
1670
|
+
* amount: bigDecimal('1000'),
|
|
1671
|
+
* user: evmAddress('0x742d35cc…'),
|
|
1672
|
+
* enableCollateral: true,
|
|
1673
|
+
* },
|
|
1674
|
+
* });
|
|
1675
|
+
*
|
|
1676
|
+
* if (result.isErr()) {
|
|
1677
|
+
* console.error(result.error);
|
|
1678
|
+
* return;
|
|
1679
|
+
* }
|
|
1680
|
+
*
|
|
1681
|
+
* // result.value: SwapReceipt
|
|
1682
|
+
* ```
|
|
1660
1683
|
*/
|
|
1661
|
-
declare function useSupplySwap(handler: PositionSwapHandler): UseAsyncTask<SupplySwapQuoteRequest, SwapReceipt, SwapSignerError | SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError>>;
|
|
1662
|
-
/**
|
|
1663
|
-
*/
|
|
1684
|
+
declare function useSupplySwap(handler: PositionSwapHandler): UseAsyncTask<SupplySwapQuoteRequest, SwapReceipt, SwapSignerError | SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError | InsufficientLiquidityError>>;
|
|
1664
1685
|
type UseBorrowSwapRequest = Prettify<BorrowSwapQuoteRequest & CurrencyQueryOptions>;
|
|
1665
1686
|
/**
|
|
1687
|
+
* Orchestrate the borrow swap execution plan.
|
|
1688
|
+
*
|
|
1689
|
+
* ```tsx
|
|
1690
|
+
* const [signTypedData] = useSignTypedData(wallet);
|
|
1691
|
+
*
|
|
1692
|
+
* const [swapBorrow, { loading, error }] = useBorrowSwap((plan) => {
|
|
1693
|
+
* switch (plan.__typename) {
|
|
1694
|
+
* case 'PositionSwapAdapterContractApproval':
|
|
1695
|
+
* case 'PositionSwapPositionManagerApproval':
|
|
1696
|
+
* return signTypedData(plan.bySignature);
|
|
1697
|
+
*
|
|
1698
|
+
* case 'SwapTypedData':
|
|
1699
|
+
* return signTypedData(plan);
|
|
1700
|
+
* }
|
|
1701
|
+
* });
|
|
1702
|
+
*
|
|
1703
|
+
* const result = await swapBorrow({
|
|
1704
|
+
* market: {
|
|
1705
|
+
* debtPosition: userBorrowItem.id,
|
|
1706
|
+
* buyReserve: targetReserve.id,
|
|
1707
|
+
* amount: bigDecimal('1000'),
|
|
1708
|
+
* user: evmAddress('0x742d35cc…'),
|
|
1709
|
+
* },
|
|
1710
|
+
* });
|
|
1711
|
+
*
|
|
1712
|
+
* if (result.isErr()) {
|
|
1713
|
+
* console.error(result.error);
|
|
1714
|
+
* return;
|
|
1715
|
+
* }
|
|
1716
|
+
*
|
|
1717
|
+
* // result.value: SwapReceipt
|
|
1718
|
+
* ```
|
|
1666
1719
|
*/
|
|
1667
|
-
declare function useBorrowSwap(handler: PositionSwapHandler): UseAsyncTask<BorrowSwapQuoteRequest, SwapReceipt, SwapSignerError | SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError>>;
|
|
1720
|
+
declare function useBorrowSwap(handler: PositionSwapHandler): UseAsyncTask<BorrowSwapQuoteRequest, SwapReceipt, SwapSignerError | SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError | InsufficientLiquidityError>>;
|
|
1668
1721
|
type UseRepayWithSupplyQuoteArgs = Prettify<RepayWithSupplyQuoteRequest & CurrencyQueryOptions>;
|
|
1669
1722
|
/**
|
|
1670
1723
|
* Fetch a quote for a repay with supply operation with the specified parameters.
|
|
@@ -1762,13 +1815,43 @@ declare function useRepayWithSupplyQuote(args: Pausable<UseRepayWithSupplyQuoteA
|
|
|
1762
1815
|
* }
|
|
1763
1816
|
* ```
|
|
1764
1817
|
*/
|
|
1765
|
-
declare function useRepayWithSupplyQuoteAction(options?: Required<CurrencyQueryOptions>): UseAsyncTask<RepayWithSupplyQuoteRequest, SwapQuote, UnexpectedError$1
|
|
1766
|
-
/**
|
|
1767
|
-
*/
|
|
1818
|
+
declare function useRepayWithSupplyQuoteAction(options?: Required<CurrencyQueryOptions>): UseAsyncTask<RepayWithSupplyQuoteRequest, SwapQuote, UnexpectedError$1 | ValidationError<InsufficientLiquidityError>>;
|
|
1768
1819
|
type UseRepayWithSupplyRequest = Prettify<RepayWithSupplyQuoteRequest & CurrencyQueryOptions>;
|
|
1769
1820
|
/**
|
|
1821
|
+
* Orchestrate the repay with supply execution plan.
|
|
1822
|
+
*
|
|
1823
|
+
* ```tsx
|
|
1824
|
+
* const [signTypedData] = useSignTypedData(wallet);
|
|
1825
|
+
*
|
|
1826
|
+
* const [repayWithSupply, { loading, error }] = useRepayWithSupply((plan) => {
|
|
1827
|
+
* switch (plan.__typename) {
|
|
1828
|
+
* case 'PositionSwapAdapterContractApproval':
|
|
1829
|
+
* case 'PositionSwapPositionManagerApproval':
|
|
1830
|
+
* return signTypedData(plan.bySignature);
|
|
1831
|
+
*
|
|
1832
|
+
* case 'SwapTypedData':
|
|
1833
|
+
* return signTypedData(plan);
|
|
1834
|
+
* }
|
|
1835
|
+
* });
|
|
1836
|
+
*
|
|
1837
|
+
* const result = await repayWithSupply({
|
|
1838
|
+
* market: {
|
|
1839
|
+
* sellPosition: userSupplyItem.id,
|
|
1840
|
+
* buyPosition: userBorrowItem.id,
|
|
1841
|
+
* amount: bigDecimal('1000'),
|
|
1842
|
+
* user: evmAddress('0x742d35cc…'),
|
|
1843
|
+
* },
|
|
1844
|
+
* });
|
|
1845
|
+
*
|
|
1846
|
+
* if (result.isErr()) {
|
|
1847
|
+
* console.error(result.error);
|
|
1848
|
+
* return;
|
|
1849
|
+
* }
|
|
1850
|
+
*
|
|
1851
|
+
* // result.value: SwapReceipt
|
|
1852
|
+
* ```
|
|
1770
1853
|
*/
|
|
1771
|
-
declare function useRepayWithSupply(handler: PositionSwapHandler): UseAsyncTask<RepayWithSupplyQuoteRequest, SwapReceipt, SwapSignerError | SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError>>;
|
|
1854
|
+
declare function useRepayWithSupply(handler: PositionSwapHandler): UseAsyncTask<RepayWithSupplyQuoteRequest, SwapReceipt, SwapSignerError | SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError | InsufficientLiquidityError>>;
|
|
1772
1855
|
type UseWithdrawSwapQuoteArgs = Prettify<WithdrawSwapQuoteRequest & CurrencyQueryOptions>;
|
|
1773
1856
|
/**
|
|
1774
1857
|
* Fetch a quote for a withdraw swap operation with the specified parameters.
|
|
@@ -1866,18 +1949,48 @@ declare function useWithdrawSwapQuote(args: Pausable<UseWithdrawSwapQuoteArgs>):
|
|
|
1866
1949
|
* }
|
|
1867
1950
|
* ```
|
|
1868
1951
|
*/
|
|
1869
|
-
declare function useWithdrawSwapQuoteAction(options?: Required<CurrencyQueryOptions>): UseAsyncTask<WithdrawSwapQuoteRequest, SwapQuote, UnexpectedError$1
|
|
1870
|
-
/**
|
|
1871
|
-
*/
|
|
1952
|
+
declare function useWithdrawSwapQuoteAction(options?: Required<CurrencyQueryOptions>): UseAsyncTask<WithdrawSwapQuoteRequest, SwapQuote, UnexpectedError$1 | ValidationError<InsufficientLiquidityError>>;
|
|
1872
1953
|
type UseWithdrawSwapRequest = Prettify<WithdrawSwapQuoteRequest & CurrencyQueryOptions>;
|
|
1873
1954
|
/**
|
|
1955
|
+
* Orchestrate the withdraw swap execution plan.
|
|
1956
|
+
*
|
|
1957
|
+
* ```tsx
|
|
1958
|
+
* const [signTypedData] = useSignTypedData(wallet);
|
|
1959
|
+
*
|
|
1960
|
+
* const [withdrawSwap, { loading, error }] = useWithdrawSwap((plan) => {
|
|
1961
|
+
* switch (plan.__typename) {
|
|
1962
|
+
* case 'PositionSwapAdapterContractApproval':
|
|
1963
|
+
* case 'PositionSwapPositionManagerApproval':
|
|
1964
|
+
* return signTypedData(plan.bySignature);
|
|
1965
|
+
*
|
|
1966
|
+
* case 'SwapTypedData':
|
|
1967
|
+
* return signTypedData(plan);
|
|
1968
|
+
* }
|
|
1969
|
+
* });
|
|
1970
|
+
*
|
|
1971
|
+
* const result = await withdrawSwap({
|
|
1972
|
+
* market: {
|
|
1973
|
+
* position: userSupplyItem.id,
|
|
1974
|
+
* buyToken: { erc20: evmAddress('0xA0b86a33E6…') },
|
|
1975
|
+
* amount: bigDecimal('1000'),
|
|
1976
|
+
* user: evmAddress('0x742d35cc…'),
|
|
1977
|
+
* },
|
|
1978
|
+
* });
|
|
1979
|
+
*
|
|
1980
|
+
* if (result.isErr()) {
|
|
1981
|
+
* console.error(result.error);
|
|
1982
|
+
* return;
|
|
1983
|
+
* }
|
|
1984
|
+
*
|
|
1985
|
+
* // result.value: SwapReceipt
|
|
1986
|
+
* ```
|
|
1874
1987
|
*/
|
|
1875
|
-
declare function useWithdrawSwap(handler: PositionSwapHandler): UseAsyncTask<WithdrawSwapQuoteRequest, SwapReceipt, SwapSignerError | SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError>>;
|
|
1988
|
+
declare function useWithdrawSwap(handler: PositionSwapHandler): UseAsyncTask<WithdrawSwapQuoteRequest, SwapReceipt, SwapSignerError | SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError | InsufficientLiquidityError>>;
|
|
1876
1989
|
type UseTokenSwapRequest = Prettify<TokenSwapQuoteRequest & CurrencyQueryOptions>;
|
|
1877
1990
|
type TokenSwapPlan = SwapTypedData | Erc20Approval | SwapTransactionRequest;
|
|
1878
1991
|
type TokenSwapHandler = (plan: TokenSwapPlan, options: SwapHandlerOptions) => ResultAsync<PendingTransaction | Signature, SwapSignerError>;
|
|
1879
1992
|
/**
|
|
1880
|
-
* Orchestrate the swap execution plan.
|
|
1993
|
+
* Orchestrate the token swap execution plan.
|
|
1881
1994
|
*
|
|
1882
1995
|
* ```tsx
|
|
1883
1996
|
* const [sendTransaction] = useSendTransaction(wallet);
|
|
@@ -1913,7 +2026,7 @@ type TokenSwapHandler = (plan: TokenSwapPlan, options: SwapHandlerOptions) => Re
|
|
|
1913
2026
|
* // result.value: SwapReceipt
|
|
1914
2027
|
* ```
|
|
1915
2028
|
*/
|
|
1916
|
-
declare function useTokenSwap(handler: TokenSwapHandler): UseAsyncTask<UseTokenSwapRequest, SwapReceipt, SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError>>;
|
|
2029
|
+
declare function useTokenSwap(handler: TokenSwapHandler): UseAsyncTask<UseTokenSwapRequest, SwapReceipt, SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError | InsufficientLiquidityError>>;
|
|
1917
2030
|
type CancelSwapHandler = (data: SwapTypedData | TransactionRequest, options: SwapHandlerOptions) => ResultAsync<PendingTransaction | Signature, SwapSignerError>;
|
|
1918
2031
|
declare class CannotCancelSwapError extends ResultAwareError {
|
|
1919
2032
|
name: "CannotCancelSwapError";
|
|
@@ -1945,11 +2058,11 @@ type CancelSwapError = CancelError | CannotCancelSwapError | SigningError | Time
|
|
|
1945
2058
|
* return;
|
|
1946
2059
|
* }
|
|
1947
2060
|
*
|
|
1948
|
-
* // result.value:
|
|
2061
|
+
* // result.value: SwapCancelledResult
|
|
1949
2062
|
* console.log('Swap cancelled:', result.value);
|
|
1950
2063
|
* ```
|
|
1951
2064
|
*/
|
|
1952
|
-
declare function useCancelSwap(handler: CancelSwapHandler): UseAsyncTask<PrepareSwapCancelRequest,
|
|
2065
|
+
declare function useCancelSwap(handler: CancelSwapHandler): UseAsyncTask<PrepareSwapCancelRequest, SwapCancelledResult, CancelSwapError>;
|
|
1953
2066
|
|
|
1954
2067
|
/**
|
|
1955
2068
|
* A hook that provides a way to supply assets to an Aave reserve.
|
|
@@ -2007,7 +2120,7 @@ declare function useCancelSwap(handler: CancelSwapHandler): UseAsyncTask<Prepare
|
|
|
2007
2120
|
*
|
|
2008
2121
|
* @param handler - The handler that will be used to handle the transactions.
|
|
2009
2122
|
*/
|
|
2010
|
-
declare function useSupply(handler: ExecutionPlanHandler<TransactionRequest | Erc20Approval | PreContractActionRequired, Signature | PendingTransaction>): UseAsyncTask<SupplyRequest, TxHash, SendTransactionError | PendingTransactionError | ValidationError
|
|
2123
|
+
declare function useSupply(handler: ExecutionPlanHandler<TransactionRequest | Erc20Approval | PreContractActionRequired, Signature | PendingTransaction>): UseAsyncTask<SupplyRequest, TxHash, SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError>>;
|
|
2011
2124
|
/**
|
|
2012
2125
|
* A hook that provides a way to borrow assets from an Aave reserve.
|
|
2013
2126
|
*
|
|
@@ -2061,7 +2174,7 @@ declare function useSupply(handler: ExecutionPlanHandler<TransactionRequest | Er
|
|
|
2061
2174
|
*
|
|
2062
2175
|
* @param handler - The handler that will be used to handle the transactions.
|
|
2063
2176
|
*/
|
|
2064
|
-
declare function useBorrow(handler: ExecutionPlanHandler<TransactionRequest | PreContractActionRequired, PendingTransaction>): UseAsyncTask<BorrowRequest, TxHash, SendTransactionError | PendingTransactionError | ValidationError
|
|
2177
|
+
declare function useBorrow(handler: ExecutionPlanHandler<TransactionRequest | PreContractActionRequired, PendingTransaction>): UseAsyncTask<BorrowRequest, TxHash, SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError>>;
|
|
2065
2178
|
/**
|
|
2066
2179
|
* A hook that provides a way to repay borrowed assets to an Aave reserve.
|
|
2067
2180
|
*
|
|
@@ -2118,7 +2231,7 @@ declare function useBorrow(handler: ExecutionPlanHandler<TransactionRequest | Pr
|
|
|
2118
2231
|
*
|
|
2119
2232
|
* @param handler - The handler that will be used to handle the transactions.
|
|
2120
2233
|
*/
|
|
2121
|
-
declare function useRepay(handler: ExecutionPlanHandler<TransactionRequest | Erc20Approval | PreContractActionRequired, Signature | PendingTransaction>): UseAsyncTask<RepayRequest, TxHash, SendTransactionError | PendingTransactionError | ValidationError
|
|
2234
|
+
declare function useRepay(handler: ExecutionPlanHandler<TransactionRequest | Erc20Approval | PreContractActionRequired, Signature | PendingTransaction>): UseAsyncTask<RepayRequest, TxHash, SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError>>;
|
|
2122
2235
|
/**
|
|
2123
2236
|
* A hook that provides a way to withdraw supplied assets from an Aave reserve.
|
|
2124
2237
|
*
|
|
@@ -2172,7 +2285,7 @@ declare function useRepay(handler: ExecutionPlanHandler<TransactionRequest | Erc
|
|
|
2172
2285
|
*
|
|
2173
2286
|
* @param handler - The handler that will be used to handle the transactions.
|
|
2174
2287
|
*/
|
|
2175
|
-
declare function useWithdraw(handler: ExecutionPlanHandler<TransactionRequest | PreContractActionRequired, PendingTransaction>): UseAsyncTask<WithdrawRequest, TxHash, SendTransactionError | PendingTransactionError | ValidationError
|
|
2288
|
+
declare function useWithdraw(handler: ExecutionPlanHandler<TransactionRequest | PreContractActionRequired, PendingTransaction>): UseAsyncTask<WithdrawRequest, TxHash, SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError>>;
|
|
2176
2289
|
/**
|
|
2177
2290
|
* A hook that provides a way to renounce a position manager of a user for a specific spoke.
|
|
2178
2291
|
*
|
|
@@ -2374,7 +2487,7 @@ declare function useSetUserSuppliesAsCollateral(handler: ExecutionPlanHandler<Tr
|
|
|
2374
2487
|
*
|
|
2375
2488
|
* @param handler - The handler that will be used to handle the transactions.
|
|
2376
2489
|
*/
|
|
2377
|
-
declare function useLiquidatePosition(handler: ExecutionPlanHandler<TransactionRequest | Erc20Approval | PreContractActionRequired, PendingTransaction | Signature>): UseAsyncTask<LiquidatePositionRequest, TxHash, SendTransactionError | PendingTransactionError | ValidationError
|
|
2490
|
+
declare function useLiquidatePosition(handler: ExecutionPlanHandler<TransactionRequest | Erc20Approval | PreContractActionRequired, PendingTransaction | Signature>): UseAsyncTask<LiquidatePositionRequest, TxHash, SendTransactionError | PendingTransactionError | ValidationError<InsufficientBalanceError>>;
|
|
2378
2491
|
/**
|
|
2379
2492
|
* A hook that provides a way to set or remove a position manager for a user on a specific spoke.
|
|
2380
2493
|
*
|
|
@@ -3285,4 +3398,4 @@ declare function useUserSummaryHistory(args: UseUserSummaryHistoryArgs): ReadRes
|
|
|
3285
3398
|
*/
|
|
3286
3399
|
declare function useUserSummaryHistory(args: Pausable<UseUserSummaryHistoryArgs>): PausableReadResult<UserSummaryHistoryItem[]>;
|
|
3287
3400
|
|
|
3288
|
-
export { AaveProvider, type AaveProviderProps, type CancelSwapError, type CancelSwapHandler, CannotCancelSwapError, PendingTransactionError, type PositionSwapHandler, type PositionSwapPlan, type PositionSwapValue, SendTransactionError, type SwapHandlerOptions, type SwapSignerError, type TokenSwapHandler, type TokenSwapPlan, type UseActivitiesArgs, type UseAssetArgs, type UseAssetBorrowHistoryArgs, type UseAssetPriceHistoryArgs, type UseAssetSupplyHistoryArgs, UseAsyncTask, type UseBorrowApyHistoryArgs, type UseBorrowSwapQuoteArgs, type UseBorrowSwapRequest, type UseHubArgs, type UseHubAssetsArgs, type UseHubSummaryHistoryArgs, type UseHubsArgs, type UsePreviewArgs, type UseProtocolHistoryArgs, type UseRepayWithSupplyQuoteArgs, type UseRepayWithSupplyRequest, type UseReserveArgs, type UseReservesArgs, type UseSpokeArgs, type UseSpokePositionManagersArgs, type UseSpokeUserPositionManagersArgs, type UseSpokesArgs, type UseSupplyApyHistoryArgs, type UseSupplySwapQuoteArgs, type UseSupplySwapRequest, type
|
|
3401
|
+
export { AaveProvider, type AaveProviderProps, type CancelSwapError, type CancelSwapHandler, CannotCancelSwapError, PendingTransactionError, type PositionSwapHandler, type PositionSwapPlan, type PositionSwapValue, SendTransactionError, type SwapHandlerOptions, type SwapSignerError, type TokenSwapHandler, type TokenSwapPlan, type UseActivitiesArgs, type UseAssetArgs, type UseAssetBorrowHistoryArgs, type UseAssetPriceHistoryArgs, type UseAssetSupplyHistoryArgs, UseAsyncTask, type UseBorrowApyHistoryArgs, type UseBorrowSwapQuoteArgs, type UseBorrowSwapRequest, type UseHubArgs, type UseHubAssetsArgs, type UseHubSummaryHistoryArgs, type UseHubsArgs, type UsePreviewArgs, type UseProtocolHistoryArgs, type UseRepayWithSupplyQuoteArgs, type UseRepayWithSupplyRequest, type UseReserveArgs, type UseReservesArgs, type UseSpokeArgs, type UseSpokePositionManagersArgs, type UseSpokeUserPositionManagersArgs, type UseSpokesArgs, type UseSupplyApyHistoryArgs, type UseSupplySwapQuoteArgs, type UseSupplySwapRequest, type UseSwapStatusArgs, type UseSwappableTokensArgs, type UseTokenSwapQuoteArgs, type UseTokenSwapRequest, type UseUserBalancesArgs, type UseUserBorrowsArgs, type UseUserPositionArgs, type UseUserPositionsArgs, type UseUserRiskPremiumBreakdownArgs, type UseUserSummaryArgs, type UseUserSummaryHistoryArgs, type UseUserSuppliesArgs, type UseUserSwapsArgs, type UseWithdrawSwapQuoteArgs, type UseWithdrawSwapRequest, useAaveClient, useActivities, useActivitiesAction, useAsset, useAssetBorrowHistory, useAssetPriceHistory, useAssetSupplyHistory, useBorrow, useBorrowApyHistory, useBorrowSwap, useBorrowSwapQuote, useBorrowSwapQuoteAction, useCancelSwap, useHub, useHubAssets, useHubSummaryHistory, useHubs, useHubsAction, useLiquidatePosition, usePreview, usePreviewAction, useProtocolHistory, useRenounceSpokeUserPositionManager, useRepay, useRepayWithSupply, useRepayWithSupplyQuote, useRepayWithSupplyQuoteAction, useReserve, useReserveAction, useReserves, useReservesAction, useSetSpokeUserPositionManager, useSetUserSuppliesAsCollateral, useSpoke, useSpokePositionManagers, useSpokeUserPositionManagers, useSpokes, useSupply, useSupplyApyHistory, useSupplySwap, useSupplySwapQuote, useSupplySwapQuoteAction, useSwapStatus, useSwappableTokens, useTokenSwap, useTokenSwapQuote, useTokenSwapQuoteAction, useUpdateUserPositionConditions, useUserBalances, useUserBalancesAction, useUserBorrows, useUserBorrowsAction, useUserPosition, useUserPositions, useUserPositionsAction, useUserRiskPremiumBreakdown, useUserSummary, useUserSummaryHistory, useUserSupplies, useUserSuppliesAction, useUserSwaps, useWithdraw, useWithdrawSwap, useWithdrawSwapQuote, useWithdrawSwapQuoteAction };
|