> 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/higher-learning/bsv-academy/introduction-to-bitcoin-script.md).

# Introduction to Bitcoin Script

- [Chapter 1: About Bitcoin Script](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-1-about-bitcoin-script.md)
- [01 - Introduction](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-1-about-bitcoin-script/introduction-to-bitcoin-script.md)
- [02 - FORTH: A Precursor to Bitcoin Script](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-1-about-bitcoin-script/02-forth-a-precursor-to-bitcoin-script.md)
- [03 - From FORTH to Bitcoin Script](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-1-about-bitcoin-script/03-from-forth-to-bitcoin-script.md)
- [04 - Bitcoin's Transaction Protocol](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-1-about-bitcoin-script/04-bitcoins-transaction-protocol.md)
- [05 - Transaction Breakdown](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-1-about-bitcoin-script/05-transaction-breakdown.md)
- [06 - nLockTime](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-1-about-bitcoin-script/06-nlocktime.md)
- [07 - The Script Evaluator](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-1-about-bitcoin-script/07-the-script-evaluator.md)
- [Chapter 2: Basic Script Syntax](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-2-basic-script-syntax.md)
- [01 - Introduction](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-2-basic-script-syntax/01-introduction.md)
- [02 - Rules Around Data and Scripting Grammar](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-2-basic-script-syntax/02-rules-around-data-and-scripting-grammar.md)
- [03 - The Stacks](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-2-basic-script-syntax/03-the-stacks.md)
- [Chapter 4: Simple Scripts](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-4-simple-scripts.md)
- [01 - Introduction](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-4-simple-scripts/01-introduction.md)
- [01 - Pay to Public Key (P2PK)](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-4-simple-scripts/01-pay-to-public-key-p2pk.md)
- [02 - Pay to Hash Puzzle](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-4-simple-scripts/02-pay-to-hash-puzzle.md)
- [03 - Pay to Public Key Hash (P2PKH)](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-4-simple-scripts/03-pay-to-public-key-hash-p2pkh.md)
- [04 - Pay to MultiSig (P2MS)](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-4-simple-scripts/04-pay-to-multisig-p2ms.md)
- [05 - Pay to MultiSignature Hash (P2MSH)](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-4-simple-scripts/05-pay-to-multisignature-hash-p2msh.md)
- [06 - R-Puzzles](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-4-simple-scripts/06-r-puzzles.md)
- [Chapter 5: OP\_PUSH\_TX](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx.md)
- [01 - Turing Machines](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx/01-turing-machines.md): Despite much dispute over the years, there are now several known methods of using Bitcoin script to create Turing complete programs and scripts. This chapter looks at the OP\_PUSH\_TX method.
- [02 - Elliptic Curve Signatures in Bitcoin](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx/02-elliptic-curve-signatures-in-bitcoin.md)
- [03 - OP\_PUSH\_TX](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx/03-op_push_tx.md)
- [04 - Signing and Checking the Pre-Image](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx/04-signing-and-checking-the-pre-image.md)
- [05 - nVersion](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx/05-nversion.md)
- [06 - hashPrevouts](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx/06-hashprevouts.md)
- [07 - hashSequence](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx/07-hashsequence.md)
- [08 - Outpoint](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx/08-outpoint.md)
- [09 - scriptLen and scriptPubKey](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx/09-scriptlen-and-scriptpubkey.md)
- [10 - value](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx/10-value.md)
- [11 - nSequence](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx/11-nsequence.md)
- [12 - hashOutputs](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx/12-hashoutputs.md)
- [13 - nLocktime](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx/13-nlocktime.md)
- [14 - SIGHASH flags](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-5-op_push_tx/14-sighash-flags.md)
- [Chapter 6: Conclusion](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-6-conclusion.md)
- [Conclusion](https://hub.bsvblockchain.org/higher-learning/bsv-academy/introduction-to-bitcoin-script/chapter-6-conclusion/conclusion.md)


---

# 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/higher-learning/bsv-academy/introduction-to-bitcoin-script.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.
