sign

fun sign(priv: PrivateKey, outPoint: OutPoint): Either<UpdateFailure, SignPsbtResult>

Implements the PSBT signer role: sign a given input. The caller needs to carefully verify that it wants to spend that input, and that the unsigned transaction matches what it expects.

Return

the psbt with a partial signature added (other inputs will not be modified).

Parameters

priv

private key used to sign the input.

outPoint

input that should be signed.


fun sign(priv: PrivateKey, inputIndex: Int): Either<UpdateFailure, SignPsbtResult>

Implements the PSBT signer role: sign a given input. The caller needs to carefully verify that it wants to spend that input, and that the unsigned transaction matches what it expects.

Return

the psbt with a partial signature added (other inputs will not be modified).

Parameters

priv

private key used to sign the input.

inputIndex

index of the input that should be signed.