• Converts a buffer to a Bech32 or Bech32m encoded string.

    Parameters

    • data: Uint8Array

      The buffer to be encoded.

    • version: number

      The version number to be used in the encoding.

    • prefix: string

      The prefix string to be used in the encoding.

    Returns string

    The Bech32 or Bech32m encoded string.