Skip to content

Add pay-to-script-with-state script class#811

Draft
someone235 wants to merge 1 commit intokaspanet:covpp-reset2from
someone235:p2shws
Draft

Add pay-to-script-with-state script class#811
someone235 wants to merge 1 commit intokaspanet:covpp-reset2from
someone235:p2shws

Conversation

@someone235
Copy link
Contributor

@someone235 someone235 commented Jan 9, 2026

I'm suggesting to add a new script class p2shws, that works as follows:

  1. sig script contains <optional other data> <state> <script>
  2. The script pub key commits to <script hash> and <state hash> and validates that the witnesses correspond to them
  3. Then, the script engine pops <script> and runs it with <optional other data> <state> on the stack.

This, together with the proposed covenant ID scheme, will eliminate the need to bring as witness any data except the previous state to spend a covenant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant