Class represents both BaseDecoder and MultibaseDecoder so it could be used to decode multibases (with matching prefix) or just base decode strings with corresponding base encoding.

Implements

Implements

Implements

Type Parameters

  • Base extends string

  • Prefix extends string

Hierarchy

  • Decoder

Implements

Constructors

Properties

Methods

Constructors

  • Type Parameters

    • Base extends string

    • Prefix extends string

    Parameters

    • name: Base
    • prefix: Prefix
    • baseDecode: ((text) => Uint8Array)
        • (text): Uint8Array
        • Parameters

          • text: string

          Returns Uint8Array

    Returns Decoder<Base, Prefix>

Properties

baseDecode: ((text) => Uint8Array)

Type declaration

    • (text): Uint8Array
    • Parameters

      • text: string

      Returns Uint8Array

name: Base
prefix: Prefix
prefixCodePoint: any

Methods

  • Decodes multibase string (which must have a multibase prefix added). If prefix does not match

    Parameters

    • text: string

    Returns Uint8Array

  • Type Parameters

    • OtherPrefix extends string

    Parameters

    Returns ComposedDecoder<Prefix | OtherPrefix>

Generated using TypeDoc