navio-blsct
    Preparing search index...

    Class Address

    Provides static utility methods for encoding and decoding addresses.

    This class is intended to be used as a static container and should not be instantiated.

    Examples:

    const { Address, DoublePublicKey, AddressEncoding } = require('navio-blsct')
    const dpk = DoublePublicKey.random()
    const addr = Address.encode(dpk, AddressEncoding.Bech32M)
    addr
    const decDpk = Address.decode(addr)
    decDpk.serialize() === dpk.serialize() // true
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Decode an address string to a DoublePublicKey.

      Parameters

      • addrStr: string

        The address string to decode.

      Returns DoublePublicKey

      A DoublePublicKey instance representing the decoded address.

      Error if the decoding fails.