> For the complete documentation index, see [llms.txt](https://hub.bsvblockchain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hub.bsvblockchain.org/wiki/bitcoin-script-and-opcodes/script/op-push-tx.md).

# OP PUSH TX

OP\_PUSH\_TX is a catch-all name for techniques that use ECDSA signature messages to access and enforce transactional states and other conditions in Bitcoin script. The technique requires the user or process that is using the UTXO to push the transaction pre-image message that is used to generate the signature onto the stack as part of the input scriptSig. This message can be pushed as a single contiguous blob, as multiple separate elements, or as a partial set, with the remaining elements of the message set via the output's scriptPubKey. The technique allows the process to enforce several elements of the transaction including (but not limited to):

1. The number of inputs in the transaction
2. The nSequence values of those inputs
3. The value of the input being spent
4. The value and script of any outputs being generated
5. The nLocktime condition set for the transaction In addition, the technique allows users to enforce the script into which the tokens the UTXO being spent will go, which is a crucial step in the creation of Turing complete machines. This is achieved by taking the current script (part of the message) and using it to build an image of the next script in the chain before re-inserting it into the message hash and performing an EC signature in script. When the signature is tested using OP\_CHECKSIG or any of its variants, the interpreters in the consensus layer will validate that the message and its conditions are a true representation of the transaction being processed, enabling the enforcement of next state conditions at the consensus layer. A significant shortcut has been developed that generates a signature using the keypair that corresponds to a private key of 1. In this situation, the signature is simply the hashed message with some simple byte-wise transformations performed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hub.bsvblockchain.org/wiki/bitcoin-script-and-opcodes/script/op-push-tx.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
