VirtualMaster.getRegistrationHash
Computes the TIP-1022 registration hash for a master address and salt.
The registration hash is keccak256(masterAddress || salt) where salt is encoded as a 32-byte value.
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 hash = VirtualMaster.getRegistrationHash({
address: Address.from('0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'),
salt: Hex.from('0x00000000000000000000000000000000000000000000000000000000abf52baf'),
})
hash
'0x0000000058e21090d8f4bee424b90cddc2378aefa1bbbfa1443631a929ae966d'Definition
function getRegistrationHash(
value: getRegistrationHash.Value,
): Hex.HexSource: src/tempo/VirtualMaster.ts
Parameters
value
- Type:
getRegistrationHash.Value
Master address and salt.
value.address
- Type:
TempoAddress.Address
Master address. Accepts both hex and Tempo addresses.
value.salt
- Type:
Salt
32-byte salt used for registration.
Return Type
The registration hash.
Hex.Hex

