Skip to content
Discussion options

You must be logged in to vote

The stack is worked on from the back toward the front.
For me this works:

	builder := NewScriptBuilder()
	builder.AddData(schnorr.SerializePubKey(pubKey1))
	builder.AddOp(OP_CHECKSIG)
	builder.AddData(schnorr.SerializePubKey(pubKey2))
	builder.AddOp(OP_CHECKSIGADD)
	builder.AddData(schnorr.SerializePubKey(pubKey3))
	builder.AddOp(OP_CHECKSIGADD)
	builder.AddInt64(2)
	builder.AddOp(OP_GREATERTHANOREQUAL)

...

	txCopy.TxIn[0].Witness = wire.TxWitness{
		sig3, sig2, sig1, pkScript, ctrlBlockBytes,
	}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@readygo67
Comment options

@guggero
Comment options

guggero Jun 18, 2025
Collaborator

Answer selected by readygo67
@readygo67
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants