signScript method

List<int> signScript(
  1. MerlinTranscript signingScript
)

Implementation

List<int> signScript(MerlinTranscript signingScript) {
  final cloneScript = signingScript.clone();
  final verifier = toVerifyKey();
  final signature = _signer.sign(signingScript);
  if (!verifier.verifyScript(signature.toBytes(), cloneScript)) {
    throw const MessageException(
        'The created signature does not pass verification.');
  }
  return signature.toBytes();
}