Can I use binary opcodes usually used for verifying keys to verify payment sizes?
It looks like these opcodes like OP_EQUALVERIFY and OP_NUMEQUALVERIFY are used for checking signatures or keys, rather than bitcoin amounts.
Example:
For an example use case, say my brother and I run a partnership, and all Bitcoin payments to our invoices go to a specific address.
The client would pay their invoice to a P2SH address, but any further spending from that invoice would have to go to my brother and I equally.
Conditions:
I want to lock outputs for a given input such that:
- The bitcoin input can only be spent to two specific outputs*, my brother's address and mine
- The amounts paid to these specific outputs must equal each other
*aside from change addresses
In the example above, could I use OP_NUMEQUALVERIFY or even the non-binary operator OP_GREATERTHANOREQUAL enforce that any client income was paid to me in an equal or greater amount than my brother?