Skip to content

Address Class v1 Spec

Gabriel Cardona edited this page Jun 18, 2018 · 1 revision

Address

toLegacyAddress

Arguments

  1. cashAddress: String

Return Value

  1. legacyAddress: String

toCashAddress

Arguments

  1. legacyAddress: String
  2. prefix: Boolean. Default: true

Return Value

  1. cashAddress: String. Prefix will be absent if 2nd argument was passed.

isLegacyAddress

Arguments

  1. address: String

Return Value

  1. isAddress: Boolean

isCashAddress

Arguments

  1. address: String

Return Value

  1. isAddress: Boolean

isMainnetAddress

Arguments

  1. address: String

Return Value

  1. isMainnet: Boolean

isTestnetAddress

Arguments

  1. address: String

Return Value

  1. isTestnet: Boolean

isP2PKHAddress

Arguments

  1. address: String

Return Value

  1. isP2PKH: Boolean

isP2SHAddress

Arguments

  1. address: String

Return Value

  1. isP2PKH: Boolean

detectAddressFormat

Arguments

  1. address: String

Return Value

  1. isP2PKH: Boolean

detectAddressNetwork

Arguments

  1. address: String

Return Value

  1. network: String

detectAddressType

Arguments

  1. address: String

Return Value

  1. addressType: String

fromXPub

Arguments

  1. xpub: String
  2. path: String. Default: "0/0"

Return Value

  1. address: String

fromOutputScript

Arguments

  1. scriptPubKey: Buffer

Return Value

  1. address: String

details

Arguments

  1. address: String

Return Value

  1. Details: Object

utxo

Arguments

  1. address: String

Return Value

  1. UTXO: Object

unconfirmed

Arguments

  1. address: String

Return Value

  1. Unconfimed: Object