Skip to main content

fromString

@opcat-labs/scrypt-ts-opcat v1.0.4


@opcat-labs/scrypt-ts-opcat / Address / fromString

Function: fromString()

fromString(str, network?, type?): Address

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

Instantiate an address from an address string

Parameters​

str​

string

An string of the bitcoin address

network?​

any

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

type?​

string

The type of address: 'pubkey'

Returns​

Address

A new valid and frozen instance of an Address