virtualAddress.getMasterAddress
Gets the registered master address for a given master ID. Learn more about virtual addresses
Usage
import { client } from './viem.config'
const master = await client.virtualAddress.getMasterAddress({
masterId: '0x58e21090',
})
console.log('Master address:', master)
Master address: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266import { Account, createClient } from 'viem/tempo'
export const client = createClient({
account: Account.fromSecp256k1('0x...'),
})Return Type
type ReturnType = Address | nullReturns null if the master ID is not registered.
Parameters
masterId
- Type:
Hex
The 4-byte master identifier (bytes4).
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.