Skip to content

VirtualAddress.validate

Validates that an address matches the TIP-1022 virtual address format.

TIP-1022

This only validates the reserved byte layout, not whether the masterId resolves to a registered master onchain.

Imports

Named
import { VirtualAddress } from 'ox/tempo'

Examples

import { VirtualAddress } from 'ox/tempo'
 
const valid = VirtualAddress.validate(
  '0x58e21090fdfdfdfdfdfdfdfdfdfd010203040506',
)
 
valid
true

Definition

function validate(
  address: string,
): boolean

Source: src/tempo/VirtualAddress.ts

Parameters

address

  • Type: string

Address to validate.

Return Type

true if the address has a valid virtual-address layout.

boolean