dash-platform-sdk
    Preparing search index...

    Class UtilsController

    Collection of conversion functions

    Index

    Methods

    • Converts base58 string to an Uint8Array

      Parameters

      • str: string

        {string}

      Returns Uint8Array

    • Converts Uint8Array to base58 string

      Parameters

      • bytes: Uint8Array

        {Uint8Array}

      Returns string

    • Converts Uint8Array to hex string

      Parameters

      • bytes: Uint8Array

        {Uint8Array}

      Returns string

    • Parameters

      • str: string

        {string}

      Returns string

      use sdk.names.normalizeLabel()

    • Creates a masternode identity identifier from proTxHash

      Parameters

      • proTxHash: string

        {string} Pro TX Hash in hex format

      Returns IdentifierWASM

    • Creates a voting identity identifier from proTxHash and voting address

      Parameters

      • proTxHash: string

        {string} Pro TX Hash in hex format

      • publicKeyHash: string

        {string} Voting address's public key hash (20 bytes), in hex

      Returns Promise<IdentifierWASM>

    • Allows to deserialize consensus error

      Parameters

      • error: string | Uint8Array<ArrayBufferLike>

        {string | Uint8Array} error in base64 or bytes

      Returns string

    • Converts a hex string to Uint8Array

      Parameters

      • hex: string

        {string} hex-encoded string

      Returns Uint8Array

    • Validates an identifier, accepts string or buffer

      Parameters

      • identifier: IdentifierLike

        {IdentifierLike} identifier to test

      Returns boolean