Function encodeBase58Address
- encode
Base58 Address(type, payload, sha256?): string Parameters
type: "p2pkh" | "p2pkhCopayBCH" | "p2pkhTestnet" | "p2sh20" | "p2sh20CopayBCH" | "p2sh20Testnet"
the type of address to encode:
p2pkh,p2sh20,p2pkh-testnet, orp2sh20-testnetpayload: Uint8Array
sha256: {
hash: ((input) => Uint8Array) & ((input) => Uint8Array);
} = internalSha256an implementation of sha256 (defaults to the internal WASM implementation)
hash: ((input) => Uint8Array) & ((input) => Uint8Array)
Returns string
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
hashis not exactly 20 bytes. If needed, validate the length ofhashbefore calling this method.For other standards that use the Base58Address format but have other version or length requirements, use encodeCashAddressFormat.
To decode a Base58Address, see decodeBase58Address.