VirtualMaster.getMasterId
Derives the 4-byte TIP-1022 masterId from a master address and salt.
This returns bytes [4:8] of the registration hash, regardless of whether the salt satisfies the proof-of-work requirement.
Master addresses must satisfy TIP-1022 registration constraints: they cannot be the zero address, another virtual address, or a TIP-20 token address.
Imports
Named
import { VirtualMaster } from 'ox/tempo'Examples
import { Address, Hex } from 'ox'
import { VirtualMaster } from 'ox/tempo'
const masterId = VirtualMaster.getMasterId({
address: Address.from('0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'),
salt: Hex.from('0x00000000000000000000000000000000000000000000000000000000abf52baf'),
})
masterId
'0x58e21090'Definition
function getMasterId(
value: getMasterId.Value,
): Hex.HexSource: src/tempo/VirtualMaster.ts
Parameters
value
- Type:
getMasterId.Value
Master address and salt.
Return Type
The derived master identifier.
Hex.Hex

