The public key from which to derive the P2PKH locking bytecode.
Optional
throwIf true
, this function will throw an Error
if the provided publicKey
is invalid rather than returning the error as a string (defaults
to true
).
Generated using TypeDoc
Derive the P2PKH locking bytecode of the provided public key.
Note that this function defaults to throwing an error if provided with an invalid public key. To handle errors in a type-safe way, set
throwErrors
tofalse
.To derive the resulting CashAddress, use publicKeyToP2pkhCashAddress. For HD public keys, use hdPublicKeyToP2pkhLockingBytecode. For the private key equivalent, see privateKeyToP2pkhLockingBytecode.