Skip to main content
Adds a DER-encoded ECDSA signature to a transparent input in the PCZT.

Signature

Parameters

pczt
Pczt
required
The PCZT to add the signature to
input_index
number
required
Index of the transparent input (0-based)
pubkey
string
required
33-byte compressed public key (hex)
signature
string
required
DER-encoded ECDSA signature with sighash type byte appended (hex)

Returns

Updated PCZT with the signature added.

Signature Format

The signature must be DER-encoded with SIGHASH_ALL (0x01) appended:

Example

See Also