@exodus/bytes
    Preparing search index...

    Base58Check encoder/decoder instance with both async and sync methods

    interface Base58CheckSync {
        decode(
            string: string,
            format?: "uint8",
        ): Promise<Uint8Array<ArrayBuffer>>;
        decode(string: string, format: "buffer"): Promise<Buffer<ArrayBufferLike>>;
        decode(
            string: string,
            format?: OutputFormat,
        ): Promise<Uint8Array<ArrayBuffer> | Buffer<ArrayBufferLike>>;
        decodeSync(string: string, format?: "uint8"): Uint8Array;
        decodeSync(string: string, format: "buffer"): Buffer;
        decodeSync(
            string: string,
            format?: OutputFormat,
        ): Uint8Array<ArrayBuffer> | Buffer<ArrayBufferLike>;
        encode(arr: Uint8Array): Promise<string>;
        encodeSync(arr: Uint8Array): string;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Decode a base58check string to bytes asynchronously

      Parameters

      • string: string

        The base58check encoded string

      • Optionalformat: "uint8"

        Output format (default: 'uint8')

      Returns Promise<Uint8Array<ArrayBuffer>>

      A Promise that resolves to the decoded bytes

    • Parameters

      • string: string
      • format: "buffer"

      Returns Promise<Buffer<ArrayBufferLike>>

    • Parameters

      Returns Promise<Uint8Array<ArrayBuffer> | Buffer<ArrayBufferLike>>

    • Decode a base58check string to bytes synchronously

      Parameters

      • string: string

        The base58check encoded string

      • Optionalformat: "uint8"

        Output format (default: 'uint8')

      Returns Uint8Array

      The decoded bytes

    • Parameters

      • string: string
      • format: "buffer"

      Returns Buffer

    • Parameters

      Returns Uint8Array<ArrayBuffer> | Buffer<ArrayBufferLike>

    • Encode bytes to base58check string asynchronously

      Parameters

      • arr: Uint8Array

        The input bytes to encode

      Returns Promise<string>

      A Promise that resolves to the base58check encoded string

    • Encode bytes to base58check string synchronously

      Parameters

      • arr: Uint8Array

        The input bytes to encode

      Returns string

      The base58check encoded string