Function privateKeyToP2pkhLockingBytecode
- private
Key To P2pkh Locking Bytecode<ThrowErrors>(__namedParameters): ThrowErrors extends true
? Uint8Array
: string | Uint8Array Type Parameters
Parameters
__namedParameters: {
privateKey: Uint8Array;
throwErrors?: ThrowErrors;
}private
Key: Uint8Array The private key from which to derive the P2PKH locking bytecode.
OptionalthrowErrors?: ThrowErrors If
true, this function will throw anErrorif the providedprivateKeyis invalid rather than returning the error as a string (defaults totrue).
Returns ThrowErrors extends true
? Uint8Array
: string | Uint8Array
Generated using TypeDoc

Derive the P2PKH locking bytecode of the provided private key.
Note that this function defaults to throwing an error if provided with an invalid private key. To handle errors in a type-safe way, set
throwErrorstofalse.To derive the resulting CashAddress, use privateKeyToP2pkhCashAddress. For HD private keys, use hdPrivateKeyToP2pkhLockingBytecode. For the public key equivalent, see publicKeyToP2pkhLockingBytecode.