@aave/client 4.0.0-next.41 → 4.0.0-next.43

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/thirdweb.js CHANGED
@@ -1,2 +1,2 @@
1
- import {a}from'./chunk-N4LXBTGY.js';import {f}from'./chunk-XT6Q6AZR.js';import {ValidationError,SigningError,UnexpectedError,TransactionError}from'@aave/core';import {chainId,okAsync,errAsync,ResultAsync,signatureFrom,txHash,invariant}from'@aave/types';import {defineChain,waitForReceipt,Engine}from'thirdweb';import {sepolia,mainnet}from'thirdweb/chains';function w(e){switch(e.chainId){case chainId(mainnet.id):return mainnet;case chainId(sepolia.id):return sepolia}return defineChain({id:e.chainId,name:e.name,nativeCurrency:{name:e.nativeInfo.name,symbol:e.nativeInfo.symbol,decimals:e.nativeInfo.decimals},rpcUrls:{default:{http:[e.rpcUrl]}},blockExplorers:{default:{name:`${e.name} Explorer`,url:e.explorerUrl}}})}function D(e,r){switch(r){case chainId(mainnet.id):return okAsync(mainnet);case chainId(sepolia.id):return okAsync(sepolia)}return f(e,{chainId:r},{batch:false}).andThen(n=>(invariant(n,`Chain ${r} is not supported`),okAsync(w(n))))}async function b(e,r,n){let a=await Engine.serverWallet({client:e,chain:r,address:n.from}).sendTransaction({type:"eip1559",chainId:r.id,to:n.to,value:BigInt(n.value),data:n.data});return txHash(a.transactionHash)}function o(e,r,n){return D(e,n.chainId).andThen(t=>ResultAsync.fromPromise(b(r,t,n),a=>SigningError.from(a)).andThen(a=>ResultAsync.fromPromise(waitForReceipt({client:r,chain:t,transactionHash:a}),s=>UnexpectedError.from(s))).andThen(a=>{let s=txHash(a.transactionHash);return a.status==="reverted"?errAsync(TransactionError.new({txHash:s,request:n})):okAsync({txHash:s,operations:n.operations})}))}function m(e,r,n){switch(n.__typename){case "TransactionRequest":return o(e,r,n);case "Erc20ApprovalRequired":return n.approvals.reduce((t,a)=>t.andThen(()=>o(e,r,a.byTransaction)),okAsync(void 0)).andThen(()=>o(e,r,n.originalTransaction));case "PreContractActionRequired":return o(e,r,n.transaction).andThen(()=>o(e,r,n.originalTransaction));case "InsufficientBalanceError":return errAsync(ValidationError.fromGqlNode(n))}}function F(e,r,n){return n?m(e,r,n):m.bind(null,e,r)}function _(e,r){return r().andThen(n=>{if(a(n)){let t=n.approvals[0].bySignature;return S(e,t).map(a=>({deadline:t.message.deadline,value:a})).andThen(a=>r(a))}return okAsync(n)})}function y(e,r){return ResultAsync.fromPromise(e.signTypedData({types:r.types,domain:r.domain,primaryType:r.primaryType,message:r.message}),n=>SigningError.from(n)).map(signatureFrom)}function S(e,r){return r===void 0?n=>y(e,n):y(e,r)}export{_ as permitWith,F as sendWith,S as signTypedDataWith,w as toThirdwebChain};//# sourceMappingURL=thirdweb.js.map
1
+ import {a}from'./chunk-N4LXBTGY.js';import {f}from'./chunk-FL5D5Q7M.js';import {ValidationError,SigningError,UnexpectedError,TransactionError}from'@aave/core';import {chainId,okAsync,errAsync,ResultAsync,signatureFrom,txHash,invariant}from'@aave/types';import {defineChain,waitForReceipt,Engine}from'thirdweb';import {sepolia,mainnet}from'thirdweb/chains';function w(e){switch(e.chainId){case chainId(mainnet.id):return mainnet;case chainId(sepolia.id):return sepolia}return defineChain({id:e.chainId,name:e.name,nativeCurrency:{name:e.nativeInfo.name,symbol:e.nativeInfo.symbol,decimals:e.nativeInfo.decimals},rpcUrls:{default:{http:[e.rpcUrl]}},blockExplorers:{default:{name:`${e.name} Explorer`,url:e.explorerUrl}}})}function D(e,r){switch(r){case chainId(mainnet.id):return okAsync(mainnet);case chainId(sepolia.id):return okAsync(sepolia)}return f(e,{chainId:r},{batch:false}).andThen(n=>(invariant(n,`Chain ${r} is not supported`),okAsync(w(n))))}async function b(e,r,n){let a=await Engine.serverWallet({client:e,chain:r,address:n.from}).sendTransaction({type:"eip1559",chainId:r.id,to:n.to,value:BigInt(n.value),data:n.data});return txHash(a.transactionHash)}function o(e,r,n){return D(e,n.chainId).andThen(t=>ResultAsync.fromPromise(b(r,t,n),a=>SigningError.from(a)).andThen(a=>ResultAsync.fromPromise(waitForReceipt({client:r,chain:t,transactionHash:a}),s=>UnexpectedError.from(s))).andThen(a=>{let s=txHash(a.transactionHash);return a.status==="reverted"?errAsync(TransactionError.new({txHash:s,request:n})):okAsync({txHash:s,operations:n.operations})}))}function m(e,r,n){switch(n.__typename){case "TransactionRequest":return o(e,r,n);case "Erc20ApprovalRequired":return n.approvals.reduce((t,a)=>t.andThen(()=>o(e,r,a.byTransaction)),okAsync(void 0)).andThen(()=>o(e,r,n.originalTransaction));case "PreContractActionRequired":return o(e,r,n.transaction).andThen(()=>o(e,r,n.originalTransaction));case "InsufficientBalanceError":return errAsync(ValidationError.fromGqlNode(n))}}function F(e,r,n){return n?m(e,r,n):m.bind(null,e,r)}function _(e,r){return r().andThen(n=>{if(a(n)){let t=n.approvals[0].bySignature;return S(e,t).map(a=>({deadline:t.message.deadline,value:a})).andThen(a=>r(a))}return okAsync(n)})}function y(e,r){return ResultAsync.fromPromise(e.signTypedData({types:r.types,domain:r.domain,primaryType:r.primaryType,message:r.message}),n=>SigningError.from(n)).map(signatureFrom)}function S(e,r){return r===void 0?n=>y(e,n):y(e,r)}export{_ as permitWith,F as sendWith,S as signTypedDataWith,w as toThirdwebChain};//# sourceMappingURL=thirdweb.js.map
2
2
  //# sourceMappingURL=thirdweb.js.map
package/dist/viem.js CHANGED
@@ -1,2 +1,2 @@
1
- export{c as ensureChain,i as permitWith,d as sendTransaction,g as sendWith,h as signTypedDataWith,a as toViemChain,e as transactionError,b as viemChainsFrom,f as waitForTransactionResult}from'./chunk-TO3PPVNH.js';import'./chunk-N4LXBTGY.js';import'./chunk-XT6Q6AZR.js';//# sourceMappingURL=viem.js.map
1
+ export{c as ensureChain,i as permitWith,d as sendTransaction,g as sendWith,h as signTypedDataWith,a as toViemChain,e as transactionError,b as viemChainsFrom,f as waitForTransactionResult}from'./chunk-UCDF5T5C.js';import'./chunk-N4LXBTGY.js';import'./chunk-FL5D5Q7M.js';//# sourceMappingURL=viem.js.map
2
2
  //# sourceMappingURL=viem.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aave/client",
3
- "version": "4.0.0-next.41",
3
+ "version": "4.0.0-next.43",
4
4
  "description": "The official TypeScript client for the AaveKit API",
5
5
  "keywords": [
6
6
  "aave",
@@ -87,8 +87,8 @@
87
87
  "@urql/core": "^6.0.1",
88
88
  "@urql/exchange-graphcache": "^8.1.0",
89
89
  "graphql": "^16.11.0",
90
- "@aave/core": "1.0.0-next.15",
91
- "@aave/graphql": "1.0.0-next.30",
90
+ "@aave/core": "1.0.0-next.16",
91
+ "@aave/graphql": "1.0.0-next.31",
92
92
  "@aave/types": "1.0.0-next.8"
93
93
  },
94
94
  "devDependencies": {