@aave/react 4.0.0-next.51 → 4.0.0-next.52
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 +194 -4
- package/dist/index.d.ts +194 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{misc-CLtLR-vZ.d.cts → misc-BYT0opC5.d.cts} +2 -2
- package/dist/{misc-CfqYr0kO.d.ts → misc-mjFkGr9I.d.ts} +2 -2
- package/dist/thirdweb.js +1 -1
- package/dist/viem/index.d.cts +1 -1
- package/dist/viem/index.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UnexpectedError, CurrencyQueryOptions } from '@aave/client';
|
|
2
2
|
import { UnexpectedError as UnexpectedError$1 } from '@aave/core';
|
|
3
|
-
import { ChainRequest,
|
|
3
|
+
import { ChainRequest, ChainsRequest, ExchangeRateRequest, NativeAmount, ActivityItem, PreviewAction, Chain, ExchangeAmount } from '@aave/graphql';
|
|
4
4
|
import { NullishDeep, Prettify } from '@aave/types';
|
|
5
5
|
import { a as UseAsyncTask } from './writes-sBt0thuG.cjs';
|
|
6
6
|
|
|
@@ -451,4 +451,4 @@ type UseNetworkFee<T extends NativeAmount = NativeAmount> =
|
|
|
451
451
|
*/
|
|
452
452
|
((args: Pausable<UseNetworkFeeArgs, PausableUseNetworkFeeArgs>) => PausableReadResult<T>);
|
|
453
453
|
|
|
454
|
-
export { type Pausable as P, ReadResult as R, type Suspendable as S, type UseNetworkFee as U, type SuspenseResult as a, type PausableSuspenseResult as b, type PausableReadResult as c, type UseChainArgs as d,
|
|
454
|
+
export { type Pausable as P, ReadResult as R, type Suspendable as S, type UseNetworkFee as U, type SuspenseResult as a, type PausableSuspenseResult as b, type PausableReadResult as c, type UseChainArgs as d, type UseChainsArgs as e, type UseExchangeRateArgs as f, type UseNetworkFeeArgs as g, type UseNetworkFeeRequestQuery as h, useChainAction as i, useChains as j, useExchangeRate as k, useExchangeRateAction as l, useChain as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UnexpectedError, CurrencyQueryOptions } from '@aave/client';
|
|
2
2
|
import { UnexpectedError as UnexpectedError$1 } from '@aave/core';
|
|
3
|
-
import { ChainRequest,
|
|
3
|
+
import { ChainRequest, ChainsRequest, ExchangeRateRequest, NativeAmount, ActivityItem, PreviewAction, Chain, ExchangeAmount } from '@aave/graphql';
|
|
4
4
|
import { NullishDeep, Prettify } from '@aave/types';
|
|
5
5
|
import { a as UseAsyncTask } from './writes-sBt0thuG.js';
|
|
6
6
|
|
|
@@ -451,4 +451,4 @@ type UseNetworkFee<T extends NativeAmount = NativeAmount> =
|
|
|
451
451
|
*/
|
|
452
452
|
((args: Pausable<UseNetworkFeeArgs, PausableUseNetworkFeeArgs>) => PausableReadResult<T>);
|
|
453
453
|
|
|
454
|
-
export { type Pausable as P, ReadResult as R, type Suspendable as S, type UseNetworkFee as U, type SuspenseResult as a, type PausableSuspenseResult as b, type PausableReadResult as c, type UseChainArgs as d,
|
|
454
|
+
export { type Pausable as P, ReadResult as R, type Suspendable as S, type UseNetworkFee as U, type SuspenseResult as a, type PausableSuspenseResult as b, type PausableReadResult as c, type UseChainArgs as d, type UseChainsArgs as e, type UseExchangeRateArgs as f, type UseNetworkFeeArgs as g, type UseNetworkFeeRequestQuery as h, useChainAction as i, useChains as j, useExchangeRate as k, useExchangeRateAction as l, useChain as u };
|
package/dist/thirdweb.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b}from'./chunk-4NA4FB6K.js';import {a,c}from'./chunk-4LHXPD6N.js';import {UnexpectedError,CancelError,SigningError,TransactionError}from'@aave/client';import {chain}from'@aave/client/actions';import {toThirdwebChain}from'@aave/client/thirdweb';import {invariant,ResultAsync,okAsync,
|
|
1
|
+
import {b}from'./chunk-4NA4FB6K.js';import {a,c}from'./chunk-4LHXPD6N.js';import {UnexpectedError,CancelError,SigningError,TransactionError}from'@aave/client';import {chain}from'@aave/client/actions';import {toThirdwebChain}from'@aave/client/thirdweb';import {invariant,ResultAsync,txHash,okAsync,signatureFrom}from'@aave/types';import {sendTransaction,prepareTransaction,waitForReceipt}from'thirdweb';import {useActiveAccount,useSwitchActiveWalletChain}from'thirdweb/react';function A(e){if(e&&typeof e=="object"){if("code"in e&&e.code===4001)return true;if("message"in e&&typeof e.message=="string"){let n=e.message.toLowerCase();return n.includes("user rejected")||n.includes("user denied")||n.includes("rejected the request")}}return false}function L(e){let n=b(),t=useActiveAccount(),m=useSwitchActiveWalletChain();return a(r=>(invariant(t,"No Account found. Ensure you have connected your wallet."),chain(n,{chainId:r.chainId},{batch:false}).map(a=>(invariant(a,`Chain ${r.chainId} is not supported`),toThirdwebChain(a))).andThen(a=>ResultAsync.fromPromise(m(a),o=>UnexpectedError.from(o)).andThen(()=>ResultAsync.fromPromise(sendTransaction({account:t,transaction:prepareTransaction({to:r.to,data:r.data,value:BigInt(r.value),chain:a,client:e})}),o=>A(o)?CancelError.from(o):SigningError.from(o))).map(({transactionHash:o})=>new c(()=>ResultAsync.fromPromise(waitForReceipt({client:e,chain:a,transactionHash:o}),s=>UnexpectedError.from(s)).andThen(({status:s,transactionHash:p})=>s==="reverted"?TransactionError.new({txHash:txHash(p),request:r}).asResultAsync():okAsync({operations:r.operations,txHash:txHash(p)})))))),[t,n,m,e])}function N(){let e=useActiveAccount();return a(n=>(invariant(e,"Expected an active account to sign typed data"),ResultAsync.fromPromise(e.signTypedData({types:n.types,domain:n.domain,primaryType:n.primaryType,message:n.message}),t=>A(t)?CancelError.from(t):SigningError.from(t)).map(signatureFrom)),[e])}export{L as useSendTransaction,N as useSignTypedData};//# sourceMappingURL=thirdweb.js.map
|
|
2
2
|
//# sourceMappingURL=thirdweb.js.map
|
package/dist/viem/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { TypedData, SignTypedDataError } from '@aave/client';
|
|
|
3
3
|
import { Signature } from '@aave/types';
|
|
4
4
|
import { WalletClient } from 'viem';
|
|
5
5
|
import { U as UseSendTransactionResult, a as UseAsyncTask } from '../writes-sBt0thuG.cjs';
|
|
6
|
-
import { U as UseNetworkFee } from '../misc-
|
|
6
|
+
import { U as UseNetworkFee } from '../misc-BYT0opC5.cjs';
|
|
7
7
|
import '@aave/core';
|
|
8
8
|
import '@aave/graphql';
|
|
9
9
|
|
package/dist/viem/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { TypedData, SignTypedDataError } from '@aave/client';
|
|
|
3
3
|
import { Signature } from '@aave/types';
|
|
4
4
|
import { WalletClient } from 'viem';
|
|
5
5
|
import { U as UseSendTransactionResult, a as UseAsyncTask } from '../writes-sBt0thuG.js';
|
|
6
|
-
import { U as UseNetworkFee } from '../misc-
|
|
6
|
+
import { U as UseNetworkFee } from '../misc-mjFkGr9I.js';
|
|
7
7
|
import '@aave/core';
|
|
8
8
|
import '@aave/graphql';
|
|
9
9
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aave/react",
|
|
3
|
-
"version": "4.0.0-next.
|
|
3
|
+
"version": "4.0.0-next.52",
|
|
4
4
|
"description": "The official React bindings for the Aave Protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aave",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"sideEffects": false,
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"urql": "^5.0.1",
|
|
75
|
+
"@aave/client": "4.0.0-next.52",
|
|
75
76
|
"@aave/core": "1.0.0-next.19",
|
|
76
|
-
"@aave/graphql": "1.0.0-next.
|
|
77
|
-
"@aave/client": "4.0.0-next.51",
|
|
77
|
+
"@aave/graphql": "1.0.0-next.36",
|
|
78
78
|
"@aave/types": "1.0.0-next.8"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
"thirdweb": "^5.105.25",
|
|
91
91
|
"tsup": "^8.5.1",
|
|
92
92
|
"typescript": "^5.9.2",
|
|
93
|
-
"
|
|
94
|
-
"
|
|
93
|
+
"viem": "^2.47.0",
|
|
94
|
+
"vitest": "^4.1.0"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"@privy-io/react-auth": "^2.20.0",
|