@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
Name | Type |
---|---|
str | string |
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
Name | Type |
---|---|
data | Uint8Array |
prefix? | string |
Returns
string
Defined in
packages/core/dist/support/base.d.ts:34