a 32-byte Secp256k1 ECDSA private key
the intended usage of the private key (e.g. mainnet
or
testnet
)
an implementation of sha256
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 private key using Wallet Import Format (WIF).
WIF encodes the 32-byte private key, a 4-byte checksum, and a
type
indicating the intended usage for the private key. See WalletImportFormatType for details.Remarks
WIF-encoding uses the Base58Address format with version wif (
128
/0x80
) or wifTestnet (239
/0xef
), respectively.To indicate that the private key is intended for use in a P2PKH address using the compressed form of its derived public key, a
0x01
is appended to the payload prior to encoding. For the uncompressed construction, the extra byte is omitted.