CCC Docs
    Preparing search index...

    Represents a ckb address with associated script and prefix.

    Index

    Constructors

    • Creates an instance of Address.

      Parameters

      • script: Script

        The script associated with the address.

      • prefix: string

        The address prefix.

      Returns Address

    Properties

    script: Script

    The script associated with the address.

    prefix: string

    The address prefix.

    Methods

    • Creates an Address instance from an address string.

      Parameters

      • address: string

        The address string to parse.

      • clients: Client | Record<string, Client>

        A Client instance or a record of Client instances keyed by prefix.

      Returns Promise<Address>

      A promise that resolves to an Address instance.

      Will throw an error if the address prefix is unknown or mismatched.

    • Converts the Address instance to a string.

      Returns string

      The address as a string.