the type of address to encode: p2pkh
, p2sh20
,
p2pkh-testnet
, or p2sh20-testnet
an implementation of sha256 (defaults to the internal WASM implementation)
Returns the sha256 hash of the provided input.
To incrementally construct a sha256 hash (e.g. for streaming), use init
,
update
, and final
.
a Uint8Array to be hashed using sha256
Generated using TypeDoc
Encode a hash as a Base58Address.
Note, this method does not enforce error handling via the type system. The returned string will not be a valid Base58Address if
hash
is not exactly 20 bytes. If needed, validate the length ofhash
before calling this method.For other standards that use the Base58Address format but have other version or length requirements, use encodeCashAddressFormat.