a 32-byte Secp256k1 ECDSA private key
the intended usage of the private key (e.g. mainnet
or
testnet
)
an implementation of sha256
WIF-encoding uses the Base58Address format with version
Base58AddressFormatVersion.wif (128
/0x80
) or
Base58AddressFormatVersion.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.
For the reverse, see decodePrivateKeyWif.
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.