@aave/react 4.0.0-next.33 → 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/chunk-4GURAVFN.js +2 -0
- package/dist/chunk-4GURAVFN.js.map +1 -0
- package/dist/chunk-4NA4FB6K.js +2 -0
- package/dist/chunk-4NA4FB6K.js.map +1 -0
- package/dist/chunk-6REYOFJ4.js +2 -0
- package/dist/chunk-6REYOFJ4.js.map +1 -0
- package/dist/ethers.cjs +1 -1637
- package/dist/ethers.cjs.map +1 -1
- package/dist/ethers.d.cts +5 -2
- package/dist/ethers.d.ts +5 -2
- package/dist/ethers.js +1 -1
- package/dist/ethers.js.map +1 -1
- package/dist/index.cjs +1 -1663
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +153 -37
- package/dist/index.d.ts +153 -37
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{misc-B_3Pj33R.d.cts → misc-B2Lsewb5.d.cts} +7 -4
- package/dist/{misc-B5-hfFfF.d.ts → misc-Bb3e3jZd.d.ts} +7 -4
- package/dist/privy.cjs +1 -1637
- package/dist/privy.cjs.map +1 -1
- package/dist/privy.d.cts +5 -2
- package/dist/privy.d.ts +5 -2
- package/dist/privy.js +1 -1
- package/dist/privy.js.map +1 -1
- package/dist/thirdweb.cjs +1 -1637
- package/dist/thirdweb.cjs.map +1 -1
- package/dist/thirdweb.d.cts +5 -2
- package/dist/thirdweb.d.ts +5 -2
- package/dist/thirdweb.js +1 -1
- package/dist/thirdweb.js.map +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js +1 -1
- package/dist/utils.js.map +1 -1
- package/dist/viem/index.cjs +1 -1637
- package/dist/viem/index.cjs.map +1 -1
- package/dist/viem/index.d.cts +6 -3
- package/dist/viem/index.d.ts +6 -3
- package/dist/viem/index.js +1 -1
- package/dist/viem/index.js.map +1 -1
- package/dist/{writes-d5YEXauI.d.cts → writes-CcVGQGt5.d.cts} +4 -1
- package/dist/{writes-d5YEXauI.d.ts → writes-CcVGQGt5.d.ts} +4 -1
- package/package.json +5 -2
- package/dist/chunk-3TDVAQWZ.js +0 -1664
- package/dist/chunk-3TDVAQWZ.js.map +0 -1
- package/dist/chunk-6A77Z4MD.js +0 -2
- package/dist/chunk-6A77Z4MD.js.map +0 -1
- package/dist/chunk-PYBBLRVB.js +0 -2
- package/dist/chunk-PYBBLRVB.js.map +0 -1
- package/dist/chunk-Q5WBQO2R.js +0 -2
- package/dist/chunk-Q5WBQO2R.js.map +0 -1
- package/dist/chunk-SXNP4MR6.js +0 -2
- package/dist/chunk-SXNP4MR6.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {invariant,nonNullable,okAsync,isSignature}from'@aave/types';import {useState,useRef,useCallback}from'react';import {CancelError,UnexpectedError}from'@aave/core';var o={Idle:()=>({called:false,loading:false,data:void 0,error:void 0}),Loading:r=>({called:true,loading:true,data:r,error:void 0}),Success:r=>({called:true,loading:false,data:r,error:void 0}),Failed:r=>({called:true,loading:false,data:void 0,error:r})};function D(r,e){let[p,a]=useState(o.Idle()),t=useRef(false),c=useCallback(r,e);return [useCallback(y=>{invariant(!t.current,"Cannot execute a task while another is in progress."),t.current=true;let T;a(n=>(T=n,{called:true,loading:true,data:n.data,error:void 0}));try{let n=c(y);return n.match(s=>{t.current=!1,a(o.Success(s));},s=>{t.current=!1,a(o.Failed(s));}),n}catch(n){throw t.current=false,a(nonNullable(T)),n}},[c]),p]}var V=r=>CancelError.from(r).asResultAsync(),u=class r{constructor(e){this.wait=e;}static isInstanceOf(e){return e instanceof r}static tryFrom(e){return r.isInstanceOf(e)?okAsync(e):UnexpectedError.from(e).asResultAsync()}};function h(r){return isSignature(r)?okAsync(r):UnexpectedError.from(`Expected Signature, but got ${String(r)}`).asResultAsync()}export{D as a,V as b,u as c,h as d};//# sourceMappingURL=chunk-4GURAVFN.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-4GURAVFN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/helpers/tasks.ts","../src/helpers/writes.ts"],"names":["AsyncTaskState","data","error","useAsyncTask","handler","deps","state","setState","useState","loadingRef","useRef","handle","useCallback","input","invariant","previousState","result","value","nonNullable","cancel","message","CancelError","PendingTransaction","_PendingTransaction","wait","okAsync","UnexpectedError","trySignatureFrom","isSignature"],"mappings":"yKA6DA,IAAMA,CAAAA,CAAiB,CACrB,IAAA,CAAM,KAAqD,CACzD,MAAA,CAAQ,KAAA,CACR,OAAA,CAAS,KAAA,CACT,IAAA,CAAM,MAAA,CACN,KAAA,CAAO,MACT,CAAA,CAAA,CACA,OAAA,CAAyBC,CAAAA,GAAiD,CACxE,MAAA,CAAQ,IAAA,CACR,OAAA,CAAS,IAAA,CACT,IAAA,CAAAA,CAAAA,CACA,KAAA,CAAO,MACT,CAAA,CAAA,CACA,OAAA,CAAyBA,CAAAA,GAAgD,CACvE,MAAA,CAAQ,IAAA,CACR,OAAA,CAAS,KAAA,CACT,IAAA,CAAAA,CAAAA,CACA,KAAA,CAAO,MACT,CAAA,CAAA,CACA,MAAA,CAAwBC,CAAAA,GAAkD,CACxE,MAAA,CAAQ,IAAA,CACR,OAAA,CAAS,KAAA,CACT,IAAA,CAAM,OACN,KAAA,CAAAA,CACF,CAAA,CACF,CAAA,CA2CO,SAASC,CAAAA,CAMdC,CAAAA,CACAC,CAAAA,CACsC,CACtC,GAAM,CAACC,CAAAA,CAAOC,CAAQ,CAAA,CAAIC,QAAAA,CAASR,CAAAA,CAAe,IAAA,EAAsB,CAAA,CAClES,CAAAA,CAAaC,MAAAA,CAAO,KAAK,CAAA,CAEzBC,CAAAA,CAASC,WAAAA,CAAYR,CAAAA,CAASC,CAAI,CAAA,CA8CxC,OAAO,CA5CSO,WAAAA,CACbC,CAAAA,EAAkB,CACjBC,SAAAA,CACE,CAACL,CAAAA,CAAW,OAAA,CACZ,qDACF,C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S,eAAAA,CAAgB,IAAA,CAAKT,CAAK,CAAA,CAAE,aAAA,EACrC,CACF,EAwBO,SAASU,CAAAA,CACdV,CAAAA,CACyC,CACzC,OAAIW,WAAAA,CAAYX,CAAK,CAAA,CACZQ,OAAAA,CAAQR,CAAK,CAAA,CAEfS,eAAAA,CAAgB,IAAA,CACrB,CAAA,4BAAA,EAA+B,MAAA,CAAOT,CAAK,CAAC,CAAA,CAC9C,CAAA,CAAE,eACJ","file":"chunk-4GURAVFN.js","sourcesContent":["import { invariant, nonNullable, type ResultAsync } from '@aave/types';\nimport { type DependencyList, useCallback, useRef, useState } from 'react';\n\n/**\n * An async task is a function that can be executed multiple times and that can be in a pending state.\n *\n * @internal\n */\nexport type AsyncTask<TInput, TResult extends ResultAsync<unknown, unknown>> = (\n input: TInput,\n) => TResult;\n\n/**\n * The initial state of a async task.\n */\nexport type AsyncTaskIdle = {\n called: boolean;\n loading: false;\n data: undefined;\n error: undefined;\n};\n\n/**\n * The state of a async task during the loading.\n */\nexport type AsyncTaskLoading<TData> = {\n called: true;\n loading: true;\n data: TData | undefined;\n error: undefined;\n};\n\n/**\n * The state of a async task after a successful call.\n */\nexport type AsyncTaskSuccess<TData> = {\n called: true;\n loading: false;\n data: TData;\n error: undefined;\n};\n\n/**\n * The state of a async task after a failed call.\n */\nexport type AsyncTaskError<TError> = {\n called: true;\n loading: false;\n data: undefined;\n error: TError;\n};\n\n/**\n * The possible statuses of a async task.\n */\nexport type AsyncTaskState<TData, TError> =\n | AsyncTaskIdle\n | AsyncTaskLoading<TData>\n | AsyncTaskSuccess<TData>\n | AsyncTaskError<TError>;\n\nconst AsyncTaskState = {\n Idle: <TData, TError>(): AsyncTaskState<TData, TError> => ({\n called: false,\n loading: false,\n data: undefined,\n error: undefined,\n }),\n Loading: <TData, TError>(data?: TData): AsyncTaskState<TData, TError> => ({\n called: true,\n loading: true,\n data,\n error: undefined,\n }),\n Success: <TData, TError>(data: TData): AsyncTaskState<TData, TError> => ({\n called: true,\n loading: false,\n data,\n error: undefined,\n }),\n Failed: <TData, TError>(error: TError): AsyncTaskState<TData, TError> => ({\n called: true,\n loading: false,\n data: undefined,\n error,\n }),\n};\n\n/**\n * A async task React Hook is a lightweight wrapper for an asynchronous function.\n * It allows tracking of the task's execution status and provides access to the\n * last error that occurred during the task's execution, if any.\n *\n * ```ts\n * const [execute, { called, loading, data, error }]: UseAsyncTask<TData, TError, TInput> = useAnyAsyncTask();\n *\n * if (!called) {\n * // data === undefined\n * // error === undefined\n * return <p>Click the button to execute the task</p>;\n * }\n *\n * if (loading) {\n * // data === undefined on first call\n * // data === TData from previous successful call\n * // error === undefined\n * return <Loader />;\n * }\n *\n * if (error) {\n * // data === undefined\n * // error === TError\n * return <p>Something went wrong: {error.message}</p>;\n * }\n *\n * // called === true\n * // data === TData\n * // error === undefined\n * return <p>Task completed: {data}</p>;\n * ```\n */\nexport type UseAsyncTask<TInput, TValue, TError> = [\n AsyncTask<TInput, ResultAsync<TValue, TError>>,\n AsyncTaskState<TValue, TError>,\n];\n\n/**\n * @internal\n */\nexport function useAsyncTask<\n TInput,\n TValue,\n TError,\n TResult extends ResultAsync<TValue, TError>,\n>(\n handler: AsyncTask<TInput, TResult>,\n deps: DependencyList,\n): UseAsyncTask<TInput, TValue, TError> {\n const [state, setState] = useState(AsyncTaskState.Idle<TValue, TError>());\n const loadingRef = useRef(false);\n // biome-ignore lint/correctness/useExhaustiveDependencies: useAsyncTask is a low-level hook\n const handle = useCallback(handler, deps);\n\n const execute = useCallback(\n (input: TInput) => {\n invariant(\n !loadingRef.current,\n 'Cannot execute a task while another is in progress.',\n );\n\n loadingRef.current = true;\n\n let previousState: AsyncTaskState<TValue, TError> | undefined;\n setState((state) => {\n previousState = state;\n return {\n called: true,\n loading: true,\n data: state.data,\n error: undefined,\n };\n });\n\n try {\n const result = handle(input);\n\n result.match(\n (value) => {\n loadingRef.current = false;\n setState(AsyncTaskState.Success(value));\n },\n (error) => {\n loadingRef.current = false;\n setState(AsyncTaskState.Failed(error));\n },\n );\n\n return result;\n } catch (error) {\n loadingRef.current = false;\n setState(nonNullable(previousState));\n throw error;\n }\n },\n [handle],\n );\n\n return [execute, state];\n}\n","import type { TransactionResult } from '@aave/client';\nimport {\n CancelError,\n type SigningError,\n type TimeoutError,\n type TransactionError,\n UnexpectedError,\n} from '@aave/core';\nimport type { TransactionRequest } from '@aave/graphql';\nimport type { ResultAsync, Signature } from '@aave/types';\nimport { isSignature, okAsync } from '@aave/types';\nimport type { UseAsyncTask } from './tasks';\n\n/**\n * The errors that could occur in the early stage of sending a transaction.\n */\nexport type SendTransactionError = CancelError | SigningError | UnexpectedError;\n\nexport type CancelOperation = (\n message: string,\n) => ResultAsync<never, CancelError>;\n\n/**\n * @internal\n */\nexport const cancel: CancelOperation = (message: string) =>\n CancelError.from(message).asResultAsync();\n\nexport type TransactionHandlerOptions = {\n cancel: CancelOperation;\n};\n\n/**\n * The errors that could occur in the late stages of a transaction.\n */\nexport type PendingTransactionError =\n | CancelError\n | TimeoutError\n | TransactionError\n | UnexpectedError;\n\nexport class PendingTransaction {\n constructor(\n /**\n * @internal Do NOT rely on this method. It's used internally by the SDK and may be subject to breaking changes.\n */\n public readonly wait: () => ResultAsync<\n TransactionResult,\n PendingTransactionError\n >,\n ) {}\n\n /**\n * @internal\n */\n static isInstanceOf(value: unknown): value is PendingTransaction {\n return value instanceof PendingTransaction;\n }\n\n /**\n * Narrows a value to PendingTransaction.\n * Only accepts types that include PendingTransaction in the union.\n *\n * @internal\n */\n static tryFrom<T>(\n value: PendingTransaction extends T ? T : never,\n ): ResultAsync<PendingTransaction, UnexpectedError> {\n if (PendingTransaction.isInstanceOf(value)) {\n return okAsync(value);\n }\n return UnexpectedError.from(value).asResultAsync();\n }\n}\n\nexport type UseSendTransactionResult = UseAsyncTask<\n TransactionRequest,\n PendingTransaction,\n SendTransactionError\n>;\n\n/**\n * The Aave execution plan handler\n */\nexport type ExecutionPlanHandler<\n T,\n R extends Signature | PendingTransaction,\n> = (\n plan: T,\n options: TransactionHandlerOptions,\n) => ResultAsync<R, SendTransactionError>;\n\n/**\n * Tries to create a Signature from an unknown value.\n *\n * @internal\n */\nexport function trySignatureFrom(\n value: unknown,\n): ResultAsync<Signature, UnexpectedError> {\n if (isSignature(value)) {\n return okAsync(value);\n }\n return UnexpectedError.from(\n `Expected Signature, but got ${String(value)}`,\n ).asResultAsync();\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {invariant}from'@aave/types';import r,{useContext}from'react';import {Provider}from'urql';var o=r.createContext(null);function p({children:e,client:t}){return r.createElement(o.Provider,{value:t},r.createElement(Provider,{value:t.urql},e))}function u(){let e=useContext(o);return invariant(e,"Could not find Aave SDK context, ensure your code is wrapped in a <AaveProvider>"),e}export{p as a,u as b};//# sourceMappingURL=chunk-4NA4FB6K.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-4NA4FB6K.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/context.tsx"],"names":["AaveContext","React","AaveContextProvider","children","client","UrqlProvider","useAaveClient","useContext","invariant"],"mappings":"iGAKA,IAAMA,CAAAA,CAAcC,CAAAA,CAAM,aAAA,CAAiC,IAAI,CAAA,CAaxD,SAASC,CAAAA,CAAoB,CAClC,QAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CACF,CAAA,CAA6B,CAC3B,OACEH,CAAAA,CAAA,aAAA,CAACD,CAAAA,CAAY,QAAA,CAAZ,CAAqB,KAAA,CAAOI,CAAAA,CAAAA,CAC3BH,CAAAA,CAAA,aAAA,CAACI,QAAAA,CAAA,CAAa,KAAA,CAAOD,CAAAA,CAAO,IAAA,CAAA,CAAOD,CAAS,CAC9C,CAEJ,CAKO,SAASG,CAAAA,EAA4B,CAC1C,IAAMF,CAAAA,CAASG,UAAAA,CAAWP,CAAW,CAAA,CAErC,OAAAQ,SAAAA,CACEJ,CAAAA,CACA,kFACF,CAAA,CAEOA,CACT","file":"chunk-4NA4FB6K.js","sourcesContent":["import type { AaveClient } from '@aave/client';\nimport { invariant } from '@aave/types';\nimport React, { type ReactNode, useContext } from 'react';\nimport { Provider as UrqlProvider } from 'urql';\n\nconst AaveContext = React.createContext<AaveClient | null>(null);\n\n/**\n * @internal\n */\nexport type AaveContextProviderProps = {\n children: ReactNode;\n client: AaveClient;\n};\n\n/**\n * @internal\n */\nexport function AaveContextProvider({\n children,\n client,\n}: AaveContextProviderProps) {\n return (\n <AaveContext.Provider value={client}>\n <UrqlProvider value={client.urql}>{children}</UrqlProvider>\n </AaveContext.Provider>\n );\n}\n\n/**\n * @internal\n */\nexport function useAaveClient(): AaveClient {\n const client = useContext(AaveContext);\n\n invariant(\n client,\n 'Could not find Aave SDK context, ensure your code is wrapped in a <AaveProvider>',\n );\n\n return client;\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-4NA4FB6K.js';import {a}from'./chunk-4GURAVFN.js';import {chain,exchangeRate}from'@aave/client/actions';import {ChainsFilter,ChainQuery,ChainsQuery,ExchangeRateQuery}from'@aave/graphql';import {UnexpectedError}from'@aave/client';import {identity,invariant}from'@aave/types';import {useState,useMemo,useEffect}from'react';import {useQuery}from'urql';var u={Loading:()=>({data:void 0,error:void 0,loading:true,paused:false}),Success:e=>({data:e,error:void 0,loading:false,paused:false}),Failure:e=>({data:void 0,error:e,loading:false,paused:false}),Paused:(e,a)=>({data:e,error:a,loading:false,paused:true})};function i({document:e,variables:a,suspense:s,pause:t,selector:b=identity,pollInterval:d=0,batch:x=true}){let[g,h]=useState(true),[{fetching:n,data:r,error:l},R]=useQuery({query:e,variables:a,pause:t,context:useMemo(()=>({batch:x,suspense:s}),[x,s])});if(useEffect(()=>{t||n||h(false);},[n,t]),useEffect(()=>{if(d<=0||n||t)return;let o=setTimeout(()=>{R({requestPolicy:"network-only",batch:false});},d);return ()=>clearTimeout(o)},[n,R,d,t]),t)return u.Paused(r?b(r.value):void 0,l?UnexpectedError.from(l):void 0);if(!s&&g)return u.Loading();if(l){let o=UnexpectedError.from(l);if(s)throw o;return u.Failure(o)}return invariant(r,"No data returned"),u.Success(b(r.value))}function z({suspense:e=false,pause:a=false,...s}){return i({document:ChainQuery,variables:{request:s},suspense:e,pause:a})}function B(){let e=b();return a(a=>chain(e,a,{batch:false,requestPolicy:"cache-first"}),[e])}function G({suspense:e=false,pause:a=false,...s}={query:{filter:ChainsFilter.ALL}}){return i({document:ChainsQuery,variables:{request:s},suspense:e,pause:a})}function H(){let e=b();return a(a=>exchangeRate(e,a,{requestPolicy:"network-only"}),[e])}function J({suspense:e=false,pause:a=false,...s}){let t=b();return i({document:ExchangeRateQuery,variables:{request:s},suspense:e,pause:a,pollInterval:s.at?0:t.context.environment.exchangeRateInterval})}export{u as a,i as b,z as c,B as d,G as e,H as f,J as g};//# sourceMappingURL=chunk-6REYOFJ4.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-6REYOFJ4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/helpers/results.ts","../src/helpers/reads.ts","../src/misc.ts"],"names":["ReadResult","data","error","useSuspendableQuery","document","variables","suspense","pause","selector","identity","pollInterval","batch","loading","setLoading","useState","fetching","executeQuery","useQuery","useMemo","useEffect","timerId","UnexpectedError","unexpected","invariant","useChain","request","ChainQuery","useChainAction","client","useAaveClient","useAsyncTask","fetchChain","useChains","ChainsFilter","ChainsQuery","useExchangeRateAction","exchangeRate","useExchangeRate","ExchangeRateQuery"],"mappings":"uXA0DaA,CAAAA,CAAa,CACxB,OAAA,CAAS,KAGyB,CAChC,IAAA,CAAM,OACN,KAAA,CAAO,MAAA,CACP,OAAA,CAAS,IAAA,CACT,MAAA,CAAQ,KACV,GACA,OAAA,CACEC,CAAAA,GAC8B,CAC9B,IAAA,CAAAA,CAAAA,CACA,MAAO,MAAA,CACP,OAAA,CAAS,KAAA,CACT,MAAA,CAAQ,KACV,CAAA,CAAA,CACA,QACEC,CAAAA,GAC8B,CAC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1B,CAAAA,CAAW,KAAA,CACX,KAAA,CAAAC,CAAAA,CAAQ,KAAA,CACR,GAAGkB,CACL,CAAA,CAGI,CAAE,KAAA,CAAO,CAAE,OAAQQ,YAAAA,CAAa,GAAI,CAAE,CAAA,CACG,CAC7C,OAAO9B,EAAoB,CACzB,QAAA,CAAU+B,YACV,SAAA,CAAW,CAAE,QAAAT,CAAQ,CAAA,CACrB,QAAA,CAAAnB,CAAAA,CACA,KAAA,CAAAC,CACF,CAAC,CACH,CA0BO,SAAS4B,CAAAA,EAId,CACA,IAAMP,EAASC,CAAAA,EAAc,CAE7B,OAAOC,CAAAA,CACJL,CAAAA,EACCW,YAAAA,CAAaR,EAAQH,CAAAA,CAAS,CAAE,cAAe,cAAe,CAAC,EACjE,CAACG,CAAM,CACT,CACF,CAyFO,SAASS,EAAgB,CAC9B,QAAA,CAAA/B,CAAAA,CAAW,KAAA,CACX,KAAA,CAAAC,CAAAA,CAAQ,MACR,GAAGkB,CACL,CAAA,CAGuD,CACrD,IAAMG,CAAAA,CAASC,GAAc,CAE7B,OAAO1B,EAAoB,CACzB,QAAA,CAAUmC,kBACV,SAAA,CAAW,CAAE,OAAA,CAAAb,CAAQ,CAAA,CACrB,QAAA,CAAAnB,EACA,KAAA,CAAAC,CAAAA,CACA,YAAA,CAAckB,CAAAA,CAAQ,EAAA,CAClB,CAAA,CACAG,EAAO,OAAA,CAAQ,WAAA,CAAY,oBACjC,CAAC,CACH","file":"chunk-6REYOFJ4.js","sourcesContent":["import type { UnexpectedError } from '@aave/client';\n\n/**\n * A read hook result.\n *\n * It's a discriminated union of the possible results of a read operation:\n * - Rely on the `loading` value to determine if the `data` or `error` can be evaluated.\n * - If `error` is `undefined`, then `data` value will be available.\n */\nexport type ReadResult<T, E extends UnexpectedError = UnexpectedError> =\n | {\n data: undefined;\n error: undefined;\n loading: true;\n }\n | {\n data: T;\n error: undefined;\n loading: false;\n }\n | {\n data: undefined;\n error: E;\n loading: false;\n };\n\n/**\n * A read hook result that supports pausing.\n */\nexport type PausableReadResult<T, E extends UnexpectedError = UnexpectedError> =\n | {\n data: T | undefined;\n error: E | undefined;\n loading: false;\n paused: true;\n }\n | {\n data: undefined;\n error: undefined;\n loading: true;\n paused: false;\n }\n | {\n data: T;\n error: undefined;\n loading: false;\n paused: false;\n }\n | {\n data: undefined;\n error: E;\n loading: false;\n paused: false;\n };\n\n/**\n * @internal\n */\nexport const ReadResult = {\n Loading: <\n T,\n E extends UnexpectedError = UnexpectedError,\n >(): PausableReadResult<T, E> => ({\n data: undefined,\n error: undefined,\n loading: true,\n paused: false,\n }),\n Success: <T, E extends UnexpectedError = UnexpectedError>(\n data: T,\n ): PausableReadResult<T, E> => ({\n data,\n error: undefined,\n loading: false,\n paused: false,\n }),\n Failure: <T, E extends UnexpectedError = UnexpectedError>(\n error: E,\n ): PausableReadResult<T, E> => ({\n data: undefined,\n error,\n loading: false,\n paused: false,\n }),\n Paused: <T, E extends UnexpectedError = UnexpectedError>(\n data: T | undefined,\n error: E | undefined,\n ): PausableReadResult<T, E> => ({\n data,\n error,\n loading: false,\n paused: true,\n }),\n};\n\n/**\n * A read hook result that supports React Suspense.\n */\nexport type SuspenseResult<T> = {\n data: T;\n};\n\n/**\n * A read hook result that supports React Suspense and can be paused.\n */\nexport type PausableSuspenseResult<T> =\n | {\n paused: true;\n data: undefined;\n }\n | {\n paused: false;\n data: T;\n };\n\nexport type SuspendableResult<T, E extends UnexpectedError = UnexpectedError> =\n | ReadResult<T, E>\n | SuspenseResult<T>\n | PausableReadResult<T, E>\n | PausableSuspenseResult<T>;\n","import { type StandardData, UnexpectedError } from '@aave/client';\nimport {\n type AnyVariables,\n identity,\n invariant,\n type NullishDeep,\n type Prettify,\n} from '@aave/types';\nimport { useEffect, useMemo, useState } from 'react';\nimport { type TypedDocumentNode, useQuery } from 'urql';\nimport {\n type PausableReadResult,\n type PausableSuspenseResult,\n ReadResult,\n type SuspendableResult,\n type SuspenseResult,\n} from './results';\n\nexport type Selector<T, V> = (data: T) => V;\n\nexport type Pausable<T, WhenPaused = NullishDeep<T>> = Prettify<\n WhenPaused & {\n /**\n * Prevents the hook from automatically executing GraphQL query operations.\n *\n * @experimental This is an experimental feature and may change in the future.\n *\n * @remarks\n * `pause` may be set to `true` to stop the query operation from executing\n * automatically. The hook will stop receiving updates and won’t execute the query\n * operation until it’s set to `false`.\n */\n pause: boolean;\n }\n>;\n\nexport type Suspendable = { suspense: true };\n\n/**\n * @internal\n */\nexport type UseSuspendableQueryArgs<\n Value,\n Output,\n Variables extends AnyVariables,\n Suspense extends boolean,\n Pause extends boolean = never,\n> = {\n document: TypedDocumentNode<StandardData<Value>, Variables>;\n variables?: Pause extends boolean ? NullishDeep<Variables> : Variables;\n suspense: Suspense;\n selector?: Selector<Value, Output>;\n pollInterval?: number;\n batch?: boolean;\n pause?: Pause;\n};\n\n/**\n * @internal\n */\nexport function useSuspendableQuery<\n Value,\n Output,\n Variables extends AnyVariables,\n Pausable extends boolean = never,\n>({\n document,\n variables,\n suspense,\n pause,\n}: UseSuspendableQueryArgs<Value, Output, Variables, false, Pausable>):\n | ReadResult<Output>\n | PausableReadResult<Output>;\n/**\n * @internal\n */\nexport function useSuspendableQuery<\n Value,\n Output,\n Variables extends AnyVariables,\n Pausable extends boolean = never,\n>({\n document,\n variables,\n suspense,\n pause,\n}: UseSuspendableQueryArgs<Value, Output, Variables, true, Pausable>):\n | SuspenseResult<Output>\n | PausableSuspenseResult<Output>;\n/**\n * @internal\n */\nexport function useSuspendableQuery<\n Value,\n Output,\n Variables extends AnyVariables,\n Pausable extends boolean = never,\n>({\n document,\n variables,\n suspense,\n pause,\n}: UseSuspendableQueryArgs<\n Value,\n Output,\n Variables,\n boolean,\n Pausable\n>): SuspendableResult<Output, UnexpectedError>;\n/**\n * Implementation.\n */\nexport function useSuspendableQuery<\n Value,\n Output,\n Variables extends AnyVariables,\n>({\n document,\n variables,\n suspense,\n pause,\n selector = identity as Selector<Value, Output>,\n pollInterval = 0,\n batch = true,\n}: UseSuspendableQueryArgs<\n Value,\n Output,\n Variables,\n boolean,\n boolean\n>): SuspendableResult<Output, UnexpectedError> {\n const [loading, setLoading] = useState(true);\n const [{ fetching, data, error }, executeQuery] = useQuery({\n query: document,\n variables: variables as Variables,\n pause,\n context: useMemo(\n () => ({\n batch,\n suspense,\n }),\n [batch, suspense],\n ),\n });\n\n useEffect(() => {\n if (pause) return;\n\n if (!fetching) {\n setLoading(false);\n }\n }, [fetching, pause]);\n\n useEffect(() => {\n if (pollInterval <= 0 || fetching || pause) return undefined;\n\n const timerId = setTimeout(() => {\n executeQuery({\n requestPolicy: 'network-only',\n batch: false, // never batch, run now!\n });\n }, pollInterval);\n\n return () => clearTimeout(timerId);\n }, [fetching, executeQuery, pollInterval, pause]);\n\n if (pause) {\n return ReadResult.Paused(\n data ? selector(data.value) : undefined,\n error ? UnexpectedError.from(error) : undefined,\n );\n }\n\n if (!suspense && loading) {\n return ReadResult.Loading();\n }\n\n if (error) {\n const unexpected = UnexpectedError.from(error);\n if (suspense) {\n throw unexpected;\n }\n\n return ReadResult.Failure(unexpected);\n }\n\n invariant(data, 'No data returned');\n\n return ReadResult.Success(selector(data.value));\n}\n","import type { CurrencyQueryOptions } from '@aave/client';\nimport { exchangeRate, chain as fetchChain } from '@aave/client/actions';\nimport type { UnexpectedError } from '@aave/core';\nimport type { Chain, ExchangeAmount, ExchangeRateRequest } from '@aave/graphql';\nimport {\n type ActivityItem,\n ChainQuery,\n type ChainRequest,\n ChainsFilter,\n ChainsQuery,\n type ChainsRequest,\n ExchangeRateQuery,\n type NativeAmount,\n type PreviewAction,\n} from '@aave/graphql';\nimport type { NullishDeep, Prettify } from '@aave/types';\nimport { useAaveClient } from './context';\nimport {\n type Pausable,\n type PausableReadResult,\n type PausableSuspenseResult,\n type ReadResult,\n type Suspendable,\n type SuspendableResult,\n type SuspenseResult,\n useSuspendableQuery,\n} from './helpers';\nimport { type UseAsyncTask, useAsyncTask } from './helpers/tasks';\n\nexport type UseChainArgs = ChainRequest;\n\n/**\n * Fetch a specific chain by chain ID.\n *\n * This signature supports React Suspense:\n *\n * ```tsx\n * const { data } = useChain({\n * chainId: chainId(1),\n * suspense: true,\n * });\n * // data will be Chain | null\n * ```\n */\nexport function useChain(\n args: UseChainArgs & Suspendable,\n): SuspenseResult<Chain | null>;\n/**\n * Fetch a specific chain by chain ID.\n *\n * Pausable suspense mode.\n *\n * ```tsx\n * const { data } = useChain({\n * chainId: chainId(1),\n * suspense: true,\n * pause: true,\n * });\n * ```\n */\nexport function useChain(\n args: Pausable<UseChainArgs> & Suspendable,\n): PausableSuspenseResult<Chain | null>;\n/**\n * Fetch a specific chain by chain ID.\n *\n * ```tsx\n * const { data, error, loading } = useChain({\n * chainId: chainId(1),\n * });\n * // data will be Chain | null\n * ```\n */\nexport function useChain(args: UseChainArgs): ReadResult<Chain | null>;\n/**\n * Fetch a specific chain by chain ID.\n *\n * Pausable loading state mode.\n *\n * ```tsx\n * const { data, error, loading, paused } = useChain({\n * chainId: chainId(1),\n * pause: true,\n * });\n * ```\n */\nexport function useChain(\n args: Pausable<UseChainArgs>,\n): PausableReadResult<Chain | null>;\n\nexport function useChain({\n suspense = false,\n pause = false,\n ...request\n}: NullishDeep<UseChainArgs> & {\n suspense?: boolean;\n pause?: boolean;\n}): SuspendableResult<Chain | null, UnexpectedError> {\n return useSuspendableQuery({\n document: ChainQuery,\n variables: {\n request,\n },\n suspense,\n pause,\n });\n}\n\n/**\n * Low-level hook to execute a {@link chain} action directly.\n *\n * @experimental This hook is experimental and may be subject to breaking changes.\n * @remarks\n * This hook **does not** actively watch for updated data on the chain.\n * Use this hook to retrieve data on demand as part of a larger workflow\n * (e.g., in an event handler in order to move to the next step).\n *\n * ```ts\n * const [execute, { called, data, error, loading }] = useChainAction();\n *\n * // …\n *\n * const result = await execute({\n * chainId: chainId(1),\n * });\n *\n * if (result.isOk()) {\n * console.log(result.value); // Chain | null\n * } else {\n * console.error(result.error);\n * }\n * ```\n */\nexport function useChainAction(): UseAsyncTask<\n ChainRequest,\n Chain | null,\n UnexpectedError\n> {\n const client = useAaveClient();\n\n return useAsyncTask(\n (request: ChainRequest) =>\n fetchChain(client, request, {\n batch: false,\n requestPolicy: 'cache-first',\n }),\n [client],\n );\n}\n\nexport type UseChainsArgs = ChainsRequest;\n/**\n * Fetches the list of supported chains.\n *\n * This signature supports React Suspense:\n *\n * ```tsx\n * const { data } = useChains({\n * query: { filter: ChainsFilter.ALL },\n * suspense: true,\n * });\n * ```\n */\nexport function useChains(\n args: UseChainsArgs & Suspendable,\n): SuspenseResult<Chain[]>;\n/**\n * Fetches the list of supported chains.\n *\n * Pausable suspense mode.\n *\n * ```tsx\n * const { data } = useChains({\n * query: { filter: ChainsFilter.ALL },\n * suspense: true,\n * pause: true,\n * });\n * ```\n */\nexport function useChains(\n args: Pausable<UseChainsArgs> & Suspendable,\n): PausableSuspenseResult<Chain[]>;\n/**\n * Fetches the list of supported chains.\n *\n * ```tsx\n * const { data, error, loading } = useChains({\n * query: { filter: ChainsFilter.ALL },\n * });\n * ```\n */\nexport function useChains(args?: UseChainsArgs): ReadResult<Chain[]>;\n/**\n * Fetches the list of supported chains.\n *\n * Pausable loading state mode.\n *\n * ```tsx\n * const { data, error, loading, paused } = useChains({\n * query: { filter: ChainsFilter.ALL },\n * pause: true,\n * });\n * ```\n */\nexport function useChains(\n args?: Pausable<UseChainsArgs>,\n): PausableReadResult<Chain[]>;\n\nexport function useChains(\n {\n suspense = false,\n pause = false,\n ...request\n }: NullishDeep<UseChainsArgs> & {\n suspense?: boolean;\n pause?: boolean;\n } = { query: { filter: ChainsFilter.ALL } },\n): SuspendableResult<Chain[], UnexpectedError> {\n return useSuspendableQuery({\n document: ChainsQuery,\n variables: { request },\n suspense,\n pause,\n });\n}\n\n/**\n * Fetches exchange rates between tokens and fiat currencies.\n *\n * ```tsx\n * const [getExchangeRate, gettingRate] = useExchangeRateAction();\n *\n * const loading = gettingRate.loading;\n * const error = gettingRate.error;\n *\n * // …\n *\n * const result = await getExchangeRate({\n * from: { erc20: { chainId: chainId(1), address: evmAddress('0xA0b86a33E6...') } },\n * to: Currency.Usd,\n * });\n *\n * if (result.isErr()) {\n * console.error(result.error);\n * return;\n * }\n *\n * console.log('Exchange rate:', result.value);\n * ```\n */\nexport function useExchangeRateAction(): UseAsyncTask<\n ExchangeRateRequest,\n ExchangeAmount,\n UnexpectedError\n> {\n const client = useAaveClient();\n\n return useAsyncTask(\n (request: ExchangeRateRequest) =>\n exchangeRate(client, request, { requestPolicy: 'network-only' }),\n [client],\n );\n}\n\nexport type UseExchangeRateArgs = ExchangeRateRequest;\n\n/**\n * Fetches exchange rates between tokens and fiat currencies with automatic polling.\n *\n * This signature supports React Suspense:\n *\n * ```tsx\n * const { data } = useExchangeRate({\n * from: {\n * erc20: {\n * chainId: chainId(1),\n * address: evmAddress('0xA0b86a33E6...')\n * }\n * },\n * to: Currency.Usd,\n * suspense: true,\n * });\n * ```\n */\nexport function useExchangeRate(\n args: UseExchangeRateArgs & Suspendable,\n): SuspenseResult<ExchangeAmount>;\n/**\n * Fetches exchange rates between tokens and fiat currencies with automatic polling.\n *\n * Pausable suspense mode.\n *\n * ```tsx\n * const { data } = useExchangeRate({\n * from: {\n * erc20: {\n * chainId: chainId(1),\n * address: evmAddress('0xA0b86a33E6...')\n * }\n * },\n * to: Currency.Usd,\n * suspense: true,\n * pause: true,\n * });\n * ```\n */\nexport function useExchangeRate(\n args: Pausable<UseExchangeRateArgs> & Suspendable,\n): PausableSuspenseResult<ExchangeAmount>;\n/**\n * Fetches exchange rates between tokens and fiat currencies with automatic polling.\n *\n * ```tsx\n * const { data, error, loading } = useExchangeRate({\n * from: {\n * erc20: {\n * chainId: chainId(1),\n * address: evmAddress('0xA0b86a33E6...')\n * }\n * },\n * to: Currency.Usd,\n * });\n *\n * <Component value={somewhere} fxRate={data} />\n * ```\n */\nexport function useExchangeRate(\n args: UseExchangeRateArgs,\n): ReadResult<ExchangeAmount>;\n/**\n * Fetches exchange rates between tokens and fiat currencies with automatic polling.\n *\n * Pausable loading state mode.\n *\n * ```tsx\n * const { data, error, loading, paused } = useExchangeRate({\n * from: {\n * erc20: {\n * chainId: chainId(1),\n * address: evmAddress('0xA0b86a33E6...')\n * }\n * },\n * to: Currency.Usd,\n * pause: true,\n * });\n * ```\n */\nexport function useExchangeRate(\n args: Pausable<UseExchangeRateArgs>,\n): PausableReadResult<ExchangeAmount>;\n\nexport function useExchangeRate({\n suspense = false,\n pause = false,\n ...request\n}: NullishDeep<UseExchangeRateArgs> & {\n suspense?: boolean;\n pause?: boolean;\n}): SuspendableResult<ExchangeAmount, UnexpectedError> {\n const client = useAaveClient();\n\n return useSuspendableQuery({\n document: ExchangeRateQuery,\n variables: { request },\n suspense,\n pause,\n pollInterval: request.at\n ? 0\n : client.context.environment.exchangeRateInterval,\n });\n}\n\nexport type UseNetworkFeeRequestQuery =\n | {\n activity: ActivityItem;\n }\n | {\n estimate: PreviewAction;\n };\n\nexport type UseNetworkFeeArgs = Prettify<\n {\n query: UseNetworkFeeRequestQuery;\n } & CurrencyQueryOptions\n>;\n\ntype PausableUseNetworkFeeArgs = Partial<\n {\n query: Partial<UseNetworkFeeRequestQuery>;\n } & CurrencyQueryOptions\n>;\n\n/**\n * Fetch the network fee for an ActivityItem.\n *\n * @experimental This hook is experimental and may be subject to breaking changes.\n */\nexport type UseNetworkFee<T extends NativeAmount = NativeAmount> =\n /**\n * Fetches the network fee for a past ActivityItem.\n *\n * This signature supports React Suspense:\n *\n * ```tsx\n * const { data } = useNetworkFee({\n * query: { activity },\n * suspense: true,\n * });\n *\n * data: NativeAmount\n * ```\n */\n ((args: UseNetworkFeeArgs & Suspendable) => SuspenseResult<T>) &\n /**\n * Fetches the network fee for a past ActivityItem.\n *\n * Pausable suspense mode.\n *\n * ```tsx\n * const { data, paused } = useNetworkFee({\n * query: { activity },\n * suspense: true,\n * pause: true,\n * });\n *\n * data: NativeAmount | undefined\n * ```\n */\n ((\n args: Pausable<UseNetworkFeeArgs, PausableUseNetworkFeeArgs> &\n Suspendable,\n ) => PausableSuspenseResult<T>) &\n /**\n * Fetches the network fee for a past ActivityItem.\n *\n * ```tsx\n * const { data, error, loading } = useNetworkFee({\n * query: { activity },\n * });\n * ```\n */\n ((args: UseNetworkFeeArgs) => ReadResult<T>) &\n /**\n * Fetches the network fee for a past ActivityItem.\n *\n * Pausable loading state mode.\n *\n * ```tsx\n * const { data, error, loading, paused } = useNetworkFee({\n * query: { activity },\n * pause: true,\n * });\n *\n * data: NativeAmount | undefined\n * ```\n */\n ((\n args: Pausable<UseNetworkFeeArgs, PausableUseNetworkFeeArgs>,\n ) => PausableReadResult<T>);\n"]}
|