Encode a Bech32 or Bech32m string. If hrp contains uppercase characters, this will cause an assertion error. Encoding must be one of BECH32 or BECH32M.

Synopsis

Declared in <bech32.h>

std::string
Encode(
    Encoding encoding,
    std::string const& hrp,
    std::vector<uint8_t> const& values);

Return Value

The encoded Bech32(m) string.

Parameters

Name

Description

encoding

The Bech32 variant to use (BECH32 or BECH32M).

hrp

The human‐readable part; must be lowercase.

values

The base32 data payload to encode.

Created with MrDocs