Skip to content

create_input_signature (Func)

Create a signature for a specific transaction input.

PARAMETER DESCRIPTION
tx

The transaction containing the input to sign.

TYPE: Transaction

input_index

The index of the input to sign.

TYPE: int

private_key

The private key for signing.

TYPE: PrivateKey

sighash_type

The signature hash type (default: All).

TYPE: str | SighashType | None DEFAULT: None

RETURNS DESCRIPTION
str

The signature as a hex string.

TYPE: str

RAISES DESCRIPTION
Exception

If signing fails.