Skip to main content

isValid

scrypt-ts-opcat v1.0.1


scrypt-ts-opcat / Address / isValid

Function: isValid()

isValid(data, network, type): boolean

Defined in: node_modules/@opcat-labs/opcat/types/address.d.cts:251

Will return a boolean if an address is valid

Parameters

data

string

The encoded data

network

any

either a Network instance, 'livenet', or 'testnet'

type

string

The type of address: 'pubkey'

Returns

boolean

The corresponding error message

Example

assert(Address.isValid('15vkcKf7gB23wLAnZLmbVuMiiVDc1Nm4a2', 'livenet'));