Skip to content

zone.useAuthorizationTokenInfo ​

Hook for getting information about the current Tempo zone authorization token.

This hook expects a zone authorization token to already exist in storage. Use zone.useSignAuthorizationToken first.

Requires viem >=2.56.2

Zone actions and hooks require viem >=2.56.2.

Usage ​

ts
import { Hooks } from 'wagmi/tempo'
import { Zone } from 'viem/tempo'

const zoneChain = Zone.b

const { data } = Hooks.zone.useAuthorizationTokenInfo({
  chainId: zoneChain.id,
  query: {
    initialData: {
      account: '0x20c0000000000000000000000000000000000000',
      expiresAt: 1_700_000_000n,
    },
  },
})

console.log('Expires At:', data?.expiresAt)
// @log: Expires At: 1700000000n

Return Type ​

See TanStack Query query docs for more info hook return types.

data ​

See Wagmi Action zone.getAuthorizationTokenInfo Return Type

Parameters ​

See Wagmi Action zone.getAuthorizationTokenInfo Parameters

query ​

See the TanStack Query query docs for more info hook parameters.

Action ​

Released under the MIT License.