node-lib

@wtasnorg/node-lib


@wtasnorg/node-lib / decode58

Function: decode58()

decode58(input, charset?): string

Defined in: base58.ts:132

Decode a Base58 string.

Parameters

input

string

The Base58 encoded string.

charset?

The charset variant to use (default: “bitcoin”).

"bitcoin" "flickr" "ripple"

Returns

string

The decoded string.

Example

import { decode58 } from "./base58.js";

decode58("JxF12TrwUP45BMd");
// => "Hello World"

decode58("jXf12sRWto45bmD", "flickr");
// => "Hello World"

Throws

Error if the input contains invalid characters.