btcd/txscript
Olaoluwa Osuntokun fdad1fab1f multi: pin new v2 submodule tags and bump to v0.26.0-beta.rc1
In this commit, we strip all of the local `replace ... => ../...`
directives that were introduced as part of #1825 (the v2 module
restructuring), now that proper tags exist for every freshly carved-out
submodule. Every in-tree go.mod is pinned to the newly published tags:
chainhash/v2.0.0, wire/v2.0.0, chaincfg/v2.0.0, address/v2.0.0,
txscript/v2.0.0, btcutil/v2.0.0, psbt/v2.0.0, and btcec is bumped to
v2.5.0 since it now depends on chainhash/v2 (previously
chaincfg/chainhash).

While here, we also unify the Go toolchain to 1.25 across every
submodule so the workspace resolves a consistent set of language
features.

Finally, we bump the main btcd version to v0.26.0-beta.rc1 in
preparation for the upcoming release candidate.
2026-05-14 19:25:06 -07:00
..
data txscript: update tx_invalid.json from Bitcoin Core 2026-04-28 22:44:05 -07:00
bench_test.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
consensus.go txscript: Implement CheckSequenceVerify (BIP0112) 2016-10-19 12:06:44 -04:00
doc.go fix some typos and make OP_DATA_20 explicit in comment (#2080) 2024-04-10 10:08:30 -04:00
engine.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
engine_debug_test.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
engine_p2a_test.go multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
engine_test.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
error.go Merge pull request #2178 from ProofOfKeags/standardness-cleanup 2024-05-21 15:44:24 -07:00
error_test.go txscript: make OP_CODESEPARATOR non-standard in non-segwit scripts 2024-05-21 12:30:16 -07:00
example_test.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
go.mod multi: pin new v2 submodule tags and bump to v0.26.0-beta.rc1 2026-05-14 19:25:06 -07:00
go.sum multi: pin new v2 submodule tags and bump to v0.26.0-beta.rc1 2026-05-14 19:25:06 -07:00
hashcache.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
hashcache_test.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
log.go all: Remove seelog logger. 2017-06-19 16:46:50 -04:00
opcode.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
opcode_test.go txscript: implement OP_CHECKSIGADD 2022-03-15 18:23:26 -07:00
p2a_test.go multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
pkscript.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
pkscript_test.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
README.md txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
reference_test.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
script.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
script_test.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
scriptbuilder.go txscript: allow script builder capacity to be specified 2023-02-27 12:38:13 +01:00
scriptbuilder_test.go txscript: allow script builder capacity to be specified 2023-02-27 12:38:13 +01:00
scriptnum.go multi: remove repetitive the 2023-06-26 15:40:51 +08:00
scriptnum_test.go Export MakeScritpNum, AsSmallInt, and IsSmallInt 2023-03-03 15:05:14 -05:00
sigcache.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
sigcache_test.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
sighash.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
sign.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
sign_test.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
sigvalidate.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
stack.go Export MakeScritpNum, AsSmallInt, and IsSmallInt 2023-03-03 15:05:14 -05:00
stack_test.go txscript: Significantly improve errors. 2017-01-12 13:12:39 -06:00
standard.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
standard_test.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
taproot.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
taproot_test.go txscript: turn into own module, use v2 2026-05-14 17:59:25 -07:00
template.go txscript: switch template engine from html/template to text/template 2026-03-10 10:38:49 -03:00
template_test.go txscript: add new ScriptTemplate DSL for writing Scripts 2025-07-11 12:20:05 -07:00
tokenizer.go txscript: add new OpcodePosition method to tokenizer to save code sep position 2022-03-15 18:23:21 -07:00
tokenizer_test.go txscript: Introduce zero-alloc script tokenizer. 2021-11-16 18:45:22 -08:00

txscript

Build Status ISC License GoDoc

Package txscript implements the bitcoin transaction script language. There is a comprehensive test suite.

This package has intentionally been designed so it can be used as a standalone package for any projects needing to use or validate bitcoin transaction scripts.

Bitcoin Scripts

Bitcoin provides a stack-based, FORTH-like language for the scripts in the bitcoin transactions. This language is not turing complete although it is still fairly powerful. A description of the language can be found at https://en.bitcoin.it/wiki/Script

Installation and Updating

$ go get -u github.com/btcsuite/btcd/txscript/v2

Examples

GPG Verification Key

All official release tags are signed by Conformal so users can ensure the code has not been tampered with and is coming from the btcsuite developers. To verify the signature perform the following:

  • Download the public key from the Conformal website at https://opensource.conformal.com/GIT-GPG-KEY-conformal.txt

  • Import the public key into your GPG keyring:

    gpg --import GIT-GPG-KEY-conformal.txt
    
  • Verify the release tag with the following command where TAG_NAME is a placeholder for the specific tag:

    git tag -v TAG_NAME
    

License

Package txscript is licensed under the copyfree ISC License.