@aave/react 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ethers.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { SigningError, TimeoutError, TransactionError, UnexpectedError } from '@aave/client';
2
- import { TransactionRequest, PermitTypedDataRequest, ERC712Signature } from '@aave/graphql';
2
+ import { PermitTypedDataRequest, ERC712Signature, TransactionRequest } from '@aave/graphql';
3
3
  import { TxHash } from '@aave/types';
4
4
  import { Signer } from 'ethers';
5
5
  import { U as UseAsyncTask } from './tasks-DUn7x8pK.cjs';
package/dist/ethers.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { SigningError, TimeoutError, TransactionError, UnexpectedError } from '@aave/client';
2
- import { TransactionRequest, PermitTypedDataRequest, ERC712Signature } from '@aave/graphql';
2
+ import { PermitTypedDataRequest, ERC712Signature, TransactionRequest } from '@aave/graphql';
3
3
  import { TxHash } from '@aave/types';
4
4
  import { Signer } from 'ethers';
5
5
  import { U as UseAsyncTask } from './tasks-DUn7x8pK.js';
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AaveClient, UnexpectedError } from '@aave/client';
2
2
  export * from '@aave/client';
3
3
  import React, { ReactNode } from 'react';
4
- import { SavingsGhoBalanceRequest, TokenAmount, SavingsGhoWithdrawRequest, ExecutionPlan, SavingsGhoDepositRequest, UserMeritRewardsRequest, UserMeritRewards, Market, ChainsFilter, Chain, UsdExchangeRatesRequest, UsdExchangeRate, HealthFactorPreviewRequest, HealthFactorPreviewResponse, ReserveRequest, Reserve, BorrowAPYHistoryRequest, APYSample, SupplyAPYHistoryRequest, CreditDelegateeAmountRequest, SupplyRequest, BorrowRequest, RepayRequest, WithdrawRequest, UserSetEmodeRequest, TransactionRequest, CollateralToggleRequest, LiquidateRequest, VaultDepositRequest, VaultMintSharesRequest, VaultRedeemSharesRequest, VaultWithdrawRequest, VaultDeployRequest, VaultSetFeeRequest, VaultWithdrawFeesRequest, VaultTransferOwnershipRequest, ApproveBorrowCreditDelegatorRequest, UserSuppliesRequest, MarketUserReserveSupplyPosition, UserBorrowsRequest, MarketUserReserveBorrowPosition, UserMarketStateRequest, MarketUserState, UserTransactionHistoryRequest, PaginatedUserTransactionHistoryResult, VaultRequest, Vault, VaultsRequest, PaginatedVaultsResult, UserVaultsRequest, VaultPreviewDepositRequest, VaultPreviewMintRequest, VaultPreviewWithdrawRequest, VaultPreviewRedeemRequest, VaultUserTransactionHistoryRequest, PaginatedVaultUserTransactionHistoryResult, VaultUserActivityRequest, VaultUserActivityResult } from '@aave/graphql';
4
+ import { SavingsGhoBalanceRequest, TokenAmount, SavingsGhoDepositRequest, ExecutionPlan, SavingsGhoWithdrawRequest, UserMeritRewardsRequest, UserMeritRewards, Market, ChainsFilter, UsdExchangeRatesRequest, Chain, HealthFactorPreviewRequest, HealthFactorPreviewResponse, UsdExchangeRate, ReserveRequest, BorrowAPYHistoryRequest, CreditDelegateeAmountRequest, SupplyAPYHistoryRequest, Reserve, APYSample, ApproveBorrowCreditDelegatorRequest, TransactionRequest, BorrowRequest, CollateralToggleRequest, LiquidateRequest, RepayRequest, SupplyRequest, UserSetEmodeRequest, VaultDeployRequest, VaultDepositRequest, VaultMintSharesRequest, VaultRedeemSharesRequest, VaultSetFeeRequest, VaultTransferOwnershipRequest, VaultWithdrawRequest, VaultWithdrawFeesRequest, WithdrawRequest, UserBorrowsRequest, UserMarketStateRequest, UserSuppliesRequest, UserTransactionHistoryRequest, MarketUserReserveBorrowPosition, MarketUserState, MarketUserReserveSupplyPosition, PaginatedUserTransactionHistoryResult, UserVaultsRequest, VaultRequest, VaultUserActivityRequest, VaultUserTransactionHistoryRequest, VaultsRequest, PaginatedVaultsResult, Vault, VaultPreviewDepositRequest, VaultPreviewMintRequest, VaultPreviewRedeemRequest, VaultUserActivityResult, PaginatedVaultUserTransactionHistoryResult, VaultPreviewWithdrawRequest } from '@aave/graphql';
5
5
  import { U as UseAsyncTask } from './tasks-DUn7x8pK.cjs';
6
6
  import { MarketRequest, MarketsRequest } from '@aave/client/actions';
7
7
  import '@aave/types';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AaveClient, UnexpectedError } from '@aave/client';
2
2
  export * from '@aave/client';
3
3
  import React, { ReactNode } from 'react';
4
- import { SavingsGhoBalanceRequest, TokenAmount, SavingsGhoWithdrawRequest, ExecutionPlan, SavingsGhoDepositRequest, UserMeritRewardsRequest, UserMeritRewards, Market, ChainsFilter, Chain, UsdExchangeRatesRequest, UsdExchangeRate, HealthFactorPreviewRequest, HealthFactorPreviewResponse, ReserveRequest, Reserve, BorrowAPYHistoryRequest, APYSample, SupplyAPYHistoryRequest, CreditDelegateeAmountRequest, SupplyRequest, BorrowRequest, RepayRequest, WithdrawRequest, UserSetEmodeRequest, TransactionRequest, CollateralToggleRequest, LiquidateRequest, VaultDepositRequest, VaultMintSharesRequest, VaultRedeemSharesRequest, VaultWithdrawRequest, VaultDeployRequest, VaultSetFeeRequest, VaultWithdrawFeesRequest, VaultTransferOwnershipRequest, ApproveBorrowCreditDelegatorRequest, UserSuppliesRequest, MarketUserReserveSupplyPosition, UserBorrowsRequest, MarketUserReserveBorrowPosition, UserMarketStateRequest, MarketUserState, UserTransactionHistoryRequest, PaginatedUserTransactionHistoryResult, VaultRequest, Vault, VaultsRequest, PaginatedVaultsResult, UserVaultsRequest, VaultPreviewDepositRequest, VaultPreviewMintRequest, VaultPreviewWithdrawRequest, VaultPreviewRedeemRequest, VaultUserTransactionHistoryRequest, PaginatedVaultUserTransactionHistoryResult, VaultUserActivityRequest, VaultUserActivityResult } from '@aave/graphql';
4
+ import { SavingsGhoBalanceRequest, TokenAmount, SavingsGhoDepositRequest, ExecutionPlan, SavingsGhoWithdrawRequest, UserMeritRewardsRequest, UserMeritRewards, Market, ChainsFilter, UsdExchangeRatesRequest, Chain, HealthFactorPreviewRequest, HealthFactorPreviewResponse, UsdExchangeRate, ReserveRequest, BorrowAPYHistoryRequest, CreditDelegateeAmountRequest, SupplyAPYHistoryRequest, Reserve, APYSample, ApproveBorrowCreditDelegatorRequest, TransactionRequest, BorrowRequest, CollateralToggleRequest, LiquidateRequest, RepayRequest, SupplyRequest, UserSetEmodeRequest, VaultDeployRequest, VaultDepositRequest, VaultMintSharesRequest, VaultRedeemSharesRequest, VaultSetFeeRequest, VaultTransferOwnershipRequest, VaultWithdrawRequest, VaultWithdrawFeesRequest, WithdrawRequest, UserBorrowsRequest, UserMarketStateRequest, UserSuppliesRequest, UserTransactionHistoryRequest, MarketUserReserveBorrowPosition, MarketUserState, MarketUserReserveSupplyPosition, PaginatedUserTransactionHistoryResult, UserVaultsRequest, VaultRequest, VaultUserActivityRequest, VaultUserTransactionHistoryRequest, VaultsRequest, PaginatedVaultsResult, Vault, VaultPreviewDepositRequest, VaultPreviewMintRequest, VaultPreviewRedeemRequest, VaultUserActivityResult, PaginatedVaultUserTransactionHistoryResult, VaultPreviewWithdrawRequest } from '@aave/graphql';
5
5
  import { U as UseAsyncTask } from './tasks-DUn7x8pK.js';
6
6
  import { MarketRequest, MarketsRequest } from '@aave/client/actions';
7
7
  import '@aave/types';
package/dist/privy.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { SigningError, TimeoutError, TransactionError, UnexpectedError } from '@aave/client';
2
- import { TransactionRequest, PermitTypedDataRequest, ERC712Signature } from '@aave/graphql';
2
+ import { PermitTypedDataRequest, ERC712Signature, TransactionRequest } from '@aave/graphql';
3
3
  import { TxHash } from '@aave/types';
4
4
  import { U as UseAsyncTask } from './tasks-DUn7x8pK.cjs';
5
5
 
package/dist/privy.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { SigningError, TimeoutError, TransactionError, UnexpectedError } from '@aave/client';
2
- import { TransactionRequest, PermitTypedDataRequest, ERC712Signature } from '@aave/graphql';
2
+ import { PermitTypedDataRequest, ERC712Signature, TransactionRequest } from '@aave/graphql';
3
3
  import { TxHash } from '@aave/types';
4
4
  import { U as UseAsyncTask } from './tasks-DUn7x8pK.js';
5
5
 
package/dist/privy.js CHANGED
@@ -1,2 +1,2 @@
1
- import {b,c}from'./chunk-SECI6TSB.js';import {UnexpectedError,SigningError}from'@aave/client';import {permitTypedData}from'@aave/client/actions';import {supportedChains,sendTransactionAndWait}from'@aave/client/viem';import {ResultAsync,invariant,signatureFrom}from'@aave/types';import {useWallets,useSignTypedData}from'@privy-io/react-auth';import {createWalletClient,custom}from'viem';function U(){let n=b(),{wallets:a}=useWallets();return c(t=>{let r=a.find(e=>e.address===t.from);return invariant(r,`Expected a connected wallet with address ${t.from} to be found.`),ResultAsync.fromPromise(r.switchChain(t.chainId),e=>UnexpectedError.from(e)).map(()=>r.getEthereumProvider()).andThen(e=>{let m=createWalletClient({account:t.from,chain:supportedChains[t.chainId],transport:custom(e)});return sendTransactionAndWait(m,t)}).andThen(n.waitForSupportedTransaction)})}function v(){let n=b(),{signTypedData:a}=useSignTypedData();return c(t=>permitTypedData(n,t).andThen(r=>ResultAsync.fromPromise(a({types:r.types,primaryType:r.primaryType,domain:r.domain,message:r.message}),e=>SigningError.from(e)).map(({signature:e})=>({deadline:r.message.deadline,value:signatureFrom(e)}))))}export{v as useERC20Permit,U as useSendTransaction};//# sourceMappingURL=privy.js.map
1
+ import {b,c}from'./chunk-SECI6TSB.js';import {UnexpectedError,SigningError}from'@aave/client';import {permitTypedData}from'@aave/client/actions';import {supportedChains,sendTransactionAndWait}from'@aave/client/viem';import {invariant,ResultAsync,signatureFrom}from'@aave/types';import {useWallets,useSignTypedData}from'@privy-io/react-auth';import {createWalletClient,custom}from'viem';function U(){let n=b(),{wallets:a}=useWallets();return c(t=>{let r=a.find(e=>e.address===t.from);return invariant(r,`Expected a connected wallet with address ${t.from} to be found.`),ResultAsync.fromPromise(r.switchChain(t.chainId),e=>UnexpectedError.from(e)).map(()=>r.getEthereumProvider()).andThen(e=>{let m=createWalletClient({account:t.from,chain:supportedChains[t.chainId],transport:custom(e)});return sendTransactionAndWait(m,t)}).andThen(n.waitForSupportedTransaction)})}function v(){let n=b(),{signTypedData:a}=useSignTypedData();return c(t=>permitTypedData(n,t).andThen(r=>ResultAsync.fromPromise(a({types:r.types,primaryType:r.primaryType,domain:r.domain,message:r.message}),e=>SigningError.from(e)).map(({signature:e})=>({deadline:r.message.deadline,value:signatureFrom(e)}))))}export{v as useERC20Permit,U as useSendTransaction};//# sourceMappingURL=privy.js.map
2
2
  //# sourceMappingURL=privy.js.map
@@ -1,5 +1,5 @@
1
1
  import { SigningError, TimeoutError, TransactionError, UnexpectedError } from '@aave/client';
2
- import { TransactionRequest, PermitTypedDataRequest, ERC712Signature } from '@aave/graphql';
2
+ import { PermitTypedDataRequest, ERC712Signature, TransactionRequest } from '@aave/graphql';
3
3
  import { TxHash } from '@aave/types';
4
4
  import { ThirdwebClient } from 'thirdweb';
5
5
  import { U as UseAsyncTask } from './tasks-DUn7x8pK.cjs';
@@ -1,5 +1,5 @@
1
1
  import { SigningError, TimeoutError, TransactionError, UnexpectedError } from '@aave/client';
2
- import { TransactionRequest, PermitTypedDataRequest, ERC712Signature } from '@aave/graphql';
2
+ import { PermitTypedDataRequest, ERC712Signature, TransactionRequest } from '@aave/graphql';
3
3
  import { TxHash } from '@aave/types';
4
4
  import { ThirdwebClient } from 'thirdweb';
5
5
  import { U as UseAsyncTask } from './tasks-DUn7x8pK.js';
package/dist/thirdweb.js CHANGED
@@ -1,3 +1,3 @@
1
- import {b,c}from'./chunk-SECI6TSB.js';import {UnexpectedError,SigningError,TransactionError}from'@aave/client';import {permitTypedData}from'@aave/client/actions';import {ResultAsync,okAsync,txHash,invariant,signatureFrom}from'@aave/types';import {defineChain}from'thirdweb';import {useSwitchActiveWalletChain,useSendAndConfirmTransaction,useActiveAccount}from'thirdweb/react';function H(t){let a=b(),o=useSwitchActiveWalletChain(),{mutateAsync:e}=useSendAndConfirmTransaction();return c(n=>ResultAsync.fromPromise(o(defineChain({id:n.chainId})),r=>UnexpectedError.from(r)).andThen(()=>ResultAsync.fromPromise(e({to:n.to,data:n.data,value:BigInt(n.value),chain:{id:n.chainId,rpc:`https://${n.chainId}.rpc.thirdweb.com/${t.clientId}`},client:t}),r=>SigningError.from(r))).andThen(r=>r.status==="reverted"?TransactionError.new({txHash:txHash(r.transactionHash),request:n}).asResultAsync():okAsync(txHash(r.transactionHash))).map(r=>({operation:n.operation,txHash:r})).andThen(a.waitForSupportedTransaction))}function k(){let t=b(),a=useActiveAccount();return c(o=>(invariant(a,"No Account found. Ensure you have connected your wallet."),permitTypedData(t,o).andThen(e=>ResultAsync.fromPromise(a.signTypedData({types:e.types,domain:e.domain,primaryType:e.primaryType,message:e.message}),n=>SigningError.from(n)).map(n=>({deadline:e.message.deadline,value:signatureFrom(n)})))))}
1
+ import {b,c}from'./chunk-SECI6TSB.js';import {UnexpectedError,SigningError,TransactionError}from'@aave/client';import {permitTypedData}from'@aave/client/actions';import {ResultAsync,txHash,okAsync,invariant,signatureFrom}from'@aave/types';import {defineChain}from'thirdweb';import {useSwitchActiveWalletChain,useSendAndConfirmTransaction,useActiveAccount}from'thirdweb/react';function H(t){let a=b(),o=useSwitchActiveWalletChain(),{mutateAsync:e}=useSendAndConfirmTransaction();return c(n=>ResultAsync.fromPromise(o(defineChain({id:n.chainId})),r=>UnexpectedError.from(r)).andThen(()=>ResultAsync.fromPromise(e({to:n.to,data:n.data,value:BigInt(n.value),chain:{id:n.chainId,rpc:`https://${n.chainId}.rpc.thirdweb.com/${t.clientId}`},client:t}),r=>SigningError.from(r))).andThen(r=>r.status==="reverted"?TransactionError.new({txHash:txHash(r.transactionHash),request:n}).asResultAsync():okAsync(txHash(r.transactionHash))).map(r=>({operation:n.operation,txHash:r})).andThen(a.waitForSupportedTransaction))}function k(){let t=b(),a=useActiveAccount();return c(o=>(invariant(a,"No Account found. Ensure you have connected your wallet."),permitTypedData(t,o).andThen(e=>ResultAsync.fromPromise(a.signTypedData({types:e.types,domain:e.domain,primaryType:e.primaryType,message:e.message}),n=>SigningError.from(n)).map(n=>({deadline:e.message.deadline,value:signatureFrom(n)})))))}
2
2
  export{k as useERC20Permit,H as useSendTransaction};//# sourceMappingURL=thirdweb.js.map
3
3
  //# sourceMappingURL=thirdweb.js.map
package/dist/viem.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { SigningError, TimeoutError, TransactionError, UnexpectedError } from '@aave/client';
2
- import { TransactionRequest, PermitTypedDataRequest, ERC712Signature } from '@aave/graphql';
2
+ import { PermitTypedDataRequest, ERC712Signature, TransactionRequest } from '@aave/graphql';
3
3
  import { TxHash } from '@aave/types';
4
4
  import { WalletClient } from 'viem';
5
5
  import { U as UseAsyncTask } from './tasks-DUn7x8pK.cjs';
package/dist/viem.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { SigningError, TimeoutError, TransactionError, UnexpectedError } from '@aave/client';
2
- import { TransactionRequest, PermitTypedDataRequest, ERC712Signature } from '@aave/graphql';
2
+ import { PermitTypedDataRequest, ERC712Signature, TransactionRequest } from '@aave/graphql';
3
3
  import { TxHash } from '@aave/types';
4
4
  import { WalletClient } from 'viem';
5
5
  import { U as UseAsyncTask } from './tasks-DUn7x8pK.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aave/react",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "The official React bindings for the Aave Protocol",
5
5
  "repository": {
6
6
  "directory": "packages/react",
@@ -55,8 +55,8 @@
55
55
  "sideEffects": false,
56
56
  "dependencies": {
57
57
  "urql": "^4.2.2",
58
- "@aave/client": "0.9.2",
59
- "@aave/graphql": "0.11.0",
58
+ "@aave/client": "0.9.3",
59
+ "@aave/graphql": "0.11.1",
60
60
  "@aave/types": "0.2.0"
61
61
  },
62
62
  "devDependencies": {
@@ -65,12 +65,12 @@
65
65
  "@testing-library/react": "^16.3.0",
66
66
  "@types/react": "^19.1.8",
67
67
  "ethers": "^6.14.4",
68
- "happy-dom": "^18.0.1",
68
+ "happy-dom": "^20.0.11",
69
69
  "msw": "^2.10.5",
70
70
  "react": "^19.1.0",
71
71
  "react-dom": "^19.1.0",
72
72
  "thirdweb": "^5.105.25",
73
- "tsup": "^8.5.0",
73
+ "tsup": "^8.5.1",
74
74
  "typescript": "^5.9.2",
75
75
  "viem": "^2.31.6"
76
76
  },