Skip to content

@aldea/sdk / Exports / bech32m

Namespace: bech32m

Interface for encoding two and from bech32m.

Table of contents

Functions

Functions

decode

decode(str, prefix?): Uint8Array

Decodes the given bech32 string to bytes, ensuring a matching prefix.

Parameters

NameType
strstring
prefix?string

Returns

Uint8Array

Defined in

packages/core/dist/support/base.d.ts:38


encode

encode(data, prefix?): string

Encodes the given bytes as a bech32 string with the specified prefix.

Parameters

NameType
dataUint8Array
prefix?string

Returns

string

Defined in

packages/core/dist/support/base.d.ts:34