Function fromBase58Check

  • decode address with base58 specification, return address version and address hash if valid *

    Parameters

    • address: string

    Returns Base58CheckResult

    Case

    // You can test it here and find more case in test/address.spec.ts

    const decode = address.fromBase58Check('1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH')

    console.log(decode.version) // 0

    console.log(decode.hash.toString('hex')) // 751e76e8199196d454941c45d1b3a323f1433bd6