import type { UseMutationResult } from '@tanstack/react-query'; import type { Config, ResolvedRegister } from '@wagmi/core'; import type { ConfigParameter, ExactPartial } from '@wagmi/core/internal'; import { Actions } from '@wagmi/core/tempo'; import { type UseMutationParameters, type UseQueryReturnType } from '../../utils/query.js'; import type { QueryParameter } from '../utils.js'; /** * Hook for getting information about the current zone authorization token. * * @example * ```tsx * import { Hooks } from 'wagmi/tempo' * import { zone } from 'viem/tempo/zones' * * const zoneChain = zone(7) * * function App() { * const { data, isLoading } = Hooks.zone.useAuthorizationTokenInfo({ * chainId: zoneChain.id, * }) * * if (isLoading) return
Loading...
* return
Expires At: {data?.expiresAt.toString()}
* } * ``` * * @param parameters - Parameters. * @returns Query result with the current authorization token info. */ export declare function useAuthorizationTokenInfo(parameters?: useAuthorizationTokenInfo.Parameters): useAuthorizationTokenInfo.ReturnValue; export declare namespace useAuthorizationTokenInfo { type Parameters = ConfigParameter & QueryParameter> & ExactPartial>; type ReturnValue = UseQueryReturnType; } /** * Hook for getting deposit processing status for a Tempo block number. * * @example * ```tsx * import { Hooks } from 'wagmi/tempo' * import { zone } from 'viem/tempo/zones' * * const zoneChain = zone(7) * * function App() { * const { data, isLoading } = Hooks.zone.useDepositStatus({ * chainId: zoneChain.id, * tempoBlockNumber: 42n, * }) * * if (isLoading) return
Loading...
* return
Processed: {String(data?.processed)}
* } * ``` * * @param parameters - Parameters. * @returns Query result with the current deposit status. */ export declare function useDepositStatus(parameters?: useDepositStatus.Parameters): useDepositStatus.ReturnValue; export declare namespace useDepositStatus { type Parameters = ConfigParameter & QueryParameter> & ExactPartial>; type ReturnValue = UseQueryReturnType; } /** * Hook for getting the withdrawal fee for a given gas limit. * * @example * ```tsx * import { Hooks } from 'wagmi/tempo' * import { zone } from 'viem/tempo/zones' * * const zoneChain = zone(7) * * function App() { * const { data, isLoading } = Hooks.zone.useWithdrawalFee({ * chainId: zoneChain.id, * gas: 21_000n, * }) * * if (isLoading) return
Loading...
* return
Fee: {data?.toString()}
* } * ``` * * @param parameters - Parameters. * @returns Query result with the withdrawal fee. */ export declare function useWithdrawalFee(parameters?: useWithdrawalFee.Parameters): useWithdrawalFee.ReturnValue; export declare namespace useWithdrawalFee { type Parameters = ConfigParameter & QueryParameter> & ExactPartial>; type ReturnValue = UseQueryReturnType; } /** * Hook for getting the current zone metadata. * * @example * ```tsx * import { Hooks } from 'wagmi/tempo' * import { zone } from 'viem/tempo/zones' * * const zoneChain = zone(7) * * function App() { * const { data, isLoading } = Hooks.zone.useZoneInfo({ * chainId: zoneChain.id, * }) * * if (isLoading) return
Loading...
* return
Zone ID: {data?.zoneId}
* } * ``` * * @param parameters - Parameters. * @returns Query result with the current zone metadata. */ export declare function useZoneInfo(parameters?: useZoneInfo.Parameters): useZoneInfo.ReturnValue; export declare namespace useZoneInfo { type Parameters = ConfigParameter & QueryParameter> & ExactPartial>; type ReturnValue = UseQueryReturnType; } /** * Hook for signing and storing a zone authorization token. * * @example * ```tsx * import { Hooks } from 'wagmi/tempo' * import { zone } from 'viem/tempo/zones' * * const zoneChain = zone(7) * * function App() { * const { mutate, isPending } = Hooks.zone.useSignAuthorizationToken() * * return ( * * ) * } * ``` * * @param parameters - Parameters. * @returns Mutation result. */ export declare function useSignAuthorizationToken(parameters?: useSignAuthorizationToken.Parameters): useSignAuthorizationToken.ReturnType; export declare namespace useSignAuthorizationToken { type Parameters = ConfigParameter & { mutation?: UseMutationParameters, context> | undefined; }; type ReturnType = UseMutationResult, context>; } /** * Hook for depositing tokens into a zone on the parent Tempo chain. * * @example * ```tsx * import { Hooks } from 'wagmi/tempo' * * function App() { * const { mutate, isPending } = Hooks.zone.useDeposit() * * return ( * * ) * } * ``` * * @param parameters - Parameters. * @returns Mutation result. */ export declare function useDeposit(parameters?: useDeposit.Parameters): useDeposit.ReturnType; export declare namespace useDeposit { type Parameters = ConfigParameter & { mutation?: UseMutationParameters, context> | undefined; }; type ReturnType = UseMutationResult, context>; } /** * Hook for depositing tokens into a zone on the parent Tempo chain. * * Note: This is a synchronous hook that waits for the transaction * to be included on a block before returning a response. * * @example * ```tsx * import { Hooks } from 'wagmi/tempo' * * function App() { * const { mutate, isPending } = Hooks.zone.useDepositSync() * * return ( * * ) * } * ``` * * @param parameters - Parameters. * @returns Mutation result. */ export declare function useDepositSync(parameters?: useDepositSync.Parameters): useDepositSync.ReturnType; export declare namespace useDepositSync { type Parameters = ConfigParameter & { mutation?: UseMutationParameters, context> | undefined; }; type ReturnType = UseMutationResult, context>; } /** * Hook for depositing tokens into a zone on the parent Tempo chain with an * encrypted recipient and memo. * * @example * ```tsx * import { Hooks } from 'wagmi/tempo' * * function App() { * const { mutate, isPending } = Hooks.zone.useEncryptedDeposit() * * return ( * * ) * } * ``` * * @param parameters - Parameters. * @returns Mutation result. */ export declare function useEncryptedDeposit(parameters?: useEncryptedDeposit.Parameters): useEncryptedDeposit.ReturnType; export declare namespace useEncryptedDeposit { type Parameters = ConfigParameter & { mutation?: UseMutationParameters, context> | undefined; }; type ReturnType = UseMutationResult, context>; } /** * Hook for depositing tokens into a zone on the parent Tempo chain with an * encrypted recipient and memo. * * Note: This is a synchronous hook that waits for the transaction * to be included on a block before returning a response. * * @example * ```tsx * import { Hooks } from 'wagmi/tempo' * * function App() { * const { mutate, isPending } = Hooks.zone.useEncryptedDepositSync() * * return ( * * ) * } * ``` * * @param parameters - Parameters. * @returns Mutation result. */ export declare function useEncryptedDepositSync(parameters?: useEncryptedDepositSync.Parameters): useEncryptedDepositSync.ReturnType; export declare namespace useEncryptedDepositSync { type Parameters = ConfigParameter & { mutation?: UseMutationParameters, context> | undefined; }; type ReturnType = UseMutationResult, context>; } /** * Hook for requesting a withdrawal from a zone to the parent Tempo chain. * * @example * ```tsx * import { Hooks } from 'wagmi/tempo' * import { zone } from 'viem/tempo/zones' * * const zoneChain = zone(7) * * function App() { * const { mutate, isPending } = Hooks.zone.useRequestWithdrawal() * * return ( * * ) * } * ``` * * @param parameters - Parameters. * @returns Mutation result. */ export declare function useRequestWithdrawal(parameters?: useRequestWithdrawal.Parameters): useRequestWithdrawal.ReturnType; export declare namespace useRequestWithdrawal { type Parameters = ConfigParameter & { mutation?: UseMutationParameters, context> | undefined; }; type ReturnType = UseMutationResult, context>; } /** * Hook for requesting a withdrawal from a zone to the parent Tempo chain. * * Note: This is a synchronous hook that waits for the transaction * to be included on a block before returning a response. * * @example * ```tsx * import { Hooks } from 'wagmi/tempo' * import { zone } from 'viem/tempo/zones' * * const zoneChain = zone(7) * * function App() { * const { mutate, isPending } = Hooks.zone.useRequestWithdrawalSync() * * return ( * * ) * } * ``` * * @param parameters - Parameters. * @returns Mutation result. */ export declare function useRequestWithdrawalSync(parameters?: useRequestWithdrawalSync.Parameters): useRequestWithdrawalSync.ReturnType; export declare namespace useRequestWithdrawalSync { type Parameters = ConfigParameter & { mutation?: UseMutationParameters, context> | undefined; }; type ReturnType = UseMutationResult, context>; } /** * Hook for requesting a verifiable withdrawal from a zone to the parent Tempo * chain. * * @example * ```tsx * import { Hooks } from 'wagmi/tempo' * import { zone } from 'viem/tempo/zones' * * const zoneChain = zone(7) * * function App() { * const { mutate, isPending } = Hooks.zone.useRequestVerifiableWithdrawal() * * return ( * * ) * } * ``` * * @param parameters - Parameters. * @returns Mutation result. */ export declare function useRequestVerifiableWithdrawal(parameters?: useRequestVerifiableWithdrawal.Parameters): useRequestVerifiableWithdrawal.ReturnType; export declare namespace useRequestVerifiableWithdrawal { type Parameters = ConfigParameter & { mutation?: UseMutationParameters, context> | undefined; }; type ReturnType = UseMutationResult, context>; } /** * Hook for requesting a verifiable withdrawal from a zone to the parent Tempo * chain. * * Note: This is a synchronous hook that waits for the transaction * to be included on a block before returning a response. * * @example * ```tsx * import { Hooks } from 'wagmi/tempo' * import { zone } from 'viem/tempo/zones' * * const zoneChain = zone(7) * * function App() { * const { mutate, isPending } = Hooks.zone.useRequestVerifiableWithdrawalSync() * * return ( * * ) * } * ``` * * @param parameters - Parameters. * @returns Mutation result. */ export declare function useRequestVerifiableWithdrawalSync(parameters?: useRequestVerifiableWithdrawalSync.Parameters): useRequestVerifiableWithdrawalSync.ReturnType; export declare namespace useRequestVerifiableWithdrawalSync { type Parameters = ConfigParameter & { mutation?: UseMutationParameters, context> | undefined; }; type ReturnType = UseMutationResult, context>; } //# sourceMappingURL=zone.d.ts.map