Skip to content

@lelantos-org/sdk / index / decodeAddress

Function: decodeAddress() โ€‹

ts
function decodeAddress(J, addr): DecodedAddress;

Defined in: @lelantos-org/sdk/dist/keys/address.d.ts:25

Decode a payment address, validating both point slots.

Every failure is an InvalidArgumentError: an address reaching here is something a user typed, pasted or was handed by a payee, so a malformed one is the caller's to report โ€” not an SDK invariant. bech32m.decode throws its library's own untyped error on a bad checksum or charset, which is why the whole body is wrapped rather than only the checks below it.

The address itself is left out of the message: it reaches application logs verbatim, and an address names a payee.

Parameters โ€‹

ParameterType
JWasmJubjub
addrstring

Returns โ€‹

DecodedAddress

Lelantosno cookies ๐Ÿช ยท no tracking ๐Ÿ‘๏ธ ยท no accounts ๐Ÿ‘คwalletexplorer4536080GitHub