Skip to main content

fromBech32

reddcoinjs-lib v7.0.1-rdd.1Docs


reddcoinjs-lib v7.0.1-rdd.1 / address / fromBech32

Function: fromBech32()

fromBech32(address): Bech32Result

Converts a Bech32 or Bech32m encoded address to its corresponding data representation.

Parameters

address: string

The Bech32 or Bech32m encoded address.

Returns

Bech32Result

An object containing the version, prefix, and data of the address.

Throws

If the address uses the wrong encoding.

Defined in

ts_src/address.ts:111