accounts.verifyHash
Verifies a configurable account signature against the account's current configuration with the signature verifier precompile.
Returns false when the signature is for another account, or for a config that is not the
account's current config. Throws when the signature is malformed or its approvals do not reach
quorum.
verifyHash on a Tempo chain also verifies configurable
account signatures, and returns false instead of throwing.
Usage
import { } from 'viem/tempo'
import { } from './viem.config'
const = .(
'0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'
)
const = .({ : 'infer', : [] })
const =
'0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
const = await .({ })
const = await ..({
: .,
,
,
})
trueimport { , } from 'viem/tempo'
export const = .({
: .('0x...'),
})Return Value
boolean
Whether the signature is valid for the account.
Parameters
account
- Type:
Address
Configurable account address the signature is expected to belong to.
await ..({
: '0x...',
: '0x...',
: '0x...',
})hash
- Type:
Hex
Original message hash that was signed.
await ..({
: '0x...',
: '0x...',
: '0x...',
})signature
- Type:
Hex
Configurable account signature envelope.
await ..({
: '0x...',
: '0x...',
: '0x...',
})blockNumber (optional)
- Type:
bigint
Block number to read the state from.
blockOverrides (optional)
- Type:
BlockOverrides
Block overrides to apply to the state.
blockTag (optional)
- Type:
BlockTag
Block tag to read the state from.
stateOverride (optional)
- Type:
StateOverride
State override to apply.