Skip to main content

This library provides a Python interface for building BitcoinSV scripts and transactions.

Project description

TX Engine

Python interface for building Bitcoin SV scripts and transactions. The native core is the Rust chain-gang library.

Requires Python 3.11+. Install from PyPI:

pip install tx-engine

Documentation

Topic Link
Documentation index docs/README.md
Python class reference docs/Python-API.md
Chronicle (Python examples) docs/Chronicle-Python.md
Chronicle (full spec) docs/Chronicle.md
Local development python/README.md

Quick example

from tx_engine import Tx

src_tx = (
    "0100000001c7151ebaf14dbfe922bd90700a7580f6db7d5a1b898ce79cb9ce459e17f1290900000000"
    "6b4830450221008b001e8d8110804ac66e467cd2452f468cba4a2a1d90d59679fe5075d24e5f530220"
    "6eb04e79214c09913fad1e3c0c2498be7f457ed63323ac6f2d9a38d53586a58d41210395deb00349c0ae7"
    "3412a55bec70a7793fc6860a193d29dd61d73c6271ffcbd4cffffffff0103000000000000001976a914"
    "96795fb99fd6c0f214f7a0e96019f642225f52d288ac00000000"
)

tx = Tx.parse_hexstr(src_tx)
print(tx)

Chronicle upgrade

Bitcoin SV Chronicle is supported in both the Rust library and Python bindings. Guide: docs/Chronicle-Python.md.

Chronicle script rules apply when tx.version > 1. Use version: 2 (or higher) on spending transactions to opt in.

Check Python API
Version-only (offline / mempool-style) Tx.validate(utxos)
Consensus at a known block height Tx.validate_at_height(utxos, block_height, network)network is BSV_Mainnet, BSV_Testnet, or BSV_STN
Script debugger / partial eval Context(tx_version=2, lock_script=...)

See docs/Chronicle.md for sighash routing, opcodes, two-phase evaluation, malleability rules, and script number limits.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tx_engine-0.8.0.tar.gz (470.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tx_engine-0.8.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

tx_engine-0.8.0-cp314-cp314-win_amd64.whl (912.8 kB view details)

Uploaded CPython 3.14Windows x86-64

tx_engine-0.8.0-cp314-cp314-win32.whl (822.5 kB view details)

Uploaded CPython 3.14Windows x86

tx_engine-0.8.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

tx_engine-0.8.0-cp314-cp314-macosx_11_0_arm64.whl (969.3 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

tx_engine-0.8.0-cp314-cp314-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.14macOS 10.12+ x86-64

tx_engine-0.8.0-cp313-cp313-win_amd64.whl (915.7 kB view details)

Uploaded CPython 3.13Windows x86-64

tx_engine-0.8.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

tx_engine-0.8.0-cp313-cp313-macosx_11_0_arm64.whl (971.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

tx_engine-0.8.0-cp313-cp313-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

tx_engine-0.8.0-cp312-cp312-win_amd64.whl (915.7 kB view details)

Uploaded CPython 3.12Windows x86-64

tx_engine-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

tx_engine-0.8.0-cp312-cp312-macosx_11_0_arm64.whl (971.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

tx_engine-0.8.0-cp312-cp312-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

tx_engine-0.8.0-cp311-cp311-win_amd64.whl (919.0 kB view details)

Uploaded CPython 3.11Windows x86-64

tx_engine-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tx_engine-0.8.0-cp311-cp311-macosx_11_0_arm64.whl (973.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

tx_engine-0.8.0-cp311-cp311-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

File details

Details for the file tx_engine-0.8.0.tar.gz.

File metadata

  • Download URL: tx_engine-0.8.0.tar.gz
  • Upload date:
  • Size: 470.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.3

File hashes

Hashes for tx_engine-0.8.0.tar.gz
Algorithm Hash digest
SHA256 05766b947b7c6e3e8f8ad0f2f381314195a2d01f4463bee54e79f4796e9d8af1
MD5 77d60ff7187de43d482134a5dee41b58
BLAKE2b-256 ab9fb355a7d86dd4f4094527f7a3690ad939c8c9fab9fcd96d054e0c90976479

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fbc3c89f4e8e041d354fd11371729e8b12b5d3443cc749e0e063334d2a9d943a
MD5 a4f2376568387a0d1f462ef20dd9ca79
BLAKE2b-256 fa29a277cdb71c1c2b4c20610f5227f1f74d89f72bfbe70d7000cdc0ffb8458a

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 e44f409883083e164d3185c2d2456f200fc32e33aa1c2e74015a9061678a799f
MD5 4afe1b929c9c2431837d7cedb8de2975
BLAKE2b-256 e5723016086401e5fc61e4468c3f8cec6eae03919f5c08dc3648791f90f4830e

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp314-cp314-win32.whl.

File metadata

  • Download URL: tx_engine-0.8.0-cp314-cp314-win32.whl
  • Upload date:
  • Size: 822.5 kB
  • Tags: CPython 3.14, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.3

File hashes

Hashes for tx_engine-0.8.0-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 80ce9b1926353ef6ce97270393c230f5717b825036e3966a09295da17ed8e76f
MD5 8ae94fc82203baf28013ab0c412ce13a
BLAKE2b-256 c1b85983e68c99cbd134f98ca4b3be08fdbbe01f8a372d88714782b5ff18cd30

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4e6b309542f08bb3ab9dc1cfa11ac6db680372e8594159a8a3d011f95ed27183
MD5 81ed25f26472729884a2f654b38ffb77
BLAKE2b-256 a6510defb3ce39bfea0183abd810126b6b88e53ecdab873f8239d64d0ee36479

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 68e632d50e7a94d031d5493771cf9fdcccfafc4576cbf351c57f246c146f33db
MD5 d21da63164dc348a837edf4c6c85b124
BLAKE2b-256 667dc0adf6ad2e5021c5f41bbb1b01bf8eae976e934ace70ff711248a80e2643

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp314-cp314-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 56ebed8cba208c39f4a21e33e5e82c68ff10f0ea84181238711bcf078a8dab09
MD5 9c8d6f429c9898838b8505a52c5653d3
BLAKE2b-256 158cac29d3d10bcdf1c0786b1105e21a83bbd84a3d3777f51d62a25076cdc92b

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ee0e91ef2ae0159cc681cefad3bd5f69e47d88f37fd565fd0bfa6bfa07122905
MD5 d584db25d5811217f5ffc40be8aaf065
BLAKE2b-256 84791aaa445234de91a6a53de43509f4a3c4612e0bafb88e051715f5391f0c68

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c7afacfa6cd6f20dc26dedf374285404abc0fd0f3d80f9f0a4d6d9e0e2d57015
MD5 215a2d96079bd8c2db8bc51136fb296a
BLAKE2b-256 1346fd4d4a539ed7bb44f29e3a8e86b6622e50ed9f6671484e7252467b0a938e

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fa8dc2c16257b3b62b2216e9ec8f1ecdcdd7caf6905de54d0d68cb84efd09367
MD5 0879347404ed43a377c165328ee737bb
BLAKE2b-256 9a273ed73f37a866f186f2dd07cdf5deb69e3d1b5c253ba6103d14d60eef11f1

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4bd2638d4650d1a81d91cefab2253282f07d6c1d8de3cd24bab0d9e9fce02bc6
MD5 30c993906c59cca368b455fd7880e757
BLAKE2b-256 8f373ad4c8449feebdf13ce1e090c99fe1b9c07299c7a1d0988b2dfd60207940

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2fc72126d4245473413d4e9b9edfb4a399d57c34b9769a2c9048d28b246af624
MD5 3494ee22b2b70a3bd7b2ba6c3e03ebc0
BLAKE2b-256 b4a3748d2d7d7d7ee5b2f7876df83a8eccc2fd3ab1cd42ec96bda2ca3407c83d

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ae698415a160db54319d97f5514ffb77c8f253f97cecd8d661ca290a8db866af
MD5 f247deb6f3f4b957d4c58cb88fbf2d81
BLAKE2b-256 015a23d6a755f70bfc1afead97bd4db65f18e2ab68f6f7c3d8e7af3c5eb31806

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fa2153766c64c4b5bed265e55efb47ab2c5695955d770803787e6338272fa5ee
MD5 3dd35afdf81ef3dc95defad08b45c87a
BLAKE2b-256 72ee5e029992eea192d80e28b91cc87e09207f425c77e1f685df1e8e7b812b38

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 42ce26ab8302a5e1e8d4b103a9e51d4f893ca3fcdcfc69d1a7e4942ac8750b45
MD5 97f58c52871f119d1875356be1f52bee
BLAKE2b-256 d50085aee485a9f54f9d378e394da39e36997c1f6a479b241f95b10e315a28e5

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 106d3306422c0d0821266a0f643af51c729a24475ae160becdb3ae6bc6c11c8c
MD5 44957ca5fabe6df0d0c3c817b005c2b0
BLAKE2b-256 2ba5fbd0481bcadbea198172a068f06ffe2eafc00a3dd0845b7e26782c65d6c5

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e6fb5f2977aeab3bb31b85004ccb29ebae8882977689b05cf051db2cdc279242
MD5 cb100db644cc6162045f355e30c199d8
BLAKE2b-256 06742971a7c56cbe0ec9a5b35fe7f8a9eb51cb6412a5352d25b7272f98bf5ac4

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 12c5f21820434dec1fbff4eabd9a14527500abcab0aad328bd90b3b95e3cc42d
MD5 b53dc1217a19456add3252a9826676d0
BLAKE2b-256 94ee5877b47b01c8cd2c49ecabdb4c961c62015db84b8f3d7635d52798c1f638

See more details on using hashes here.

File details

Details for the file tx_engine-0.8.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tx_engine-0.8.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8e812fc4600c025cfea7779d786a50e7cddc88d8b07138b7f27dc2da8e8164cb
MD5 16344eff4bd74c3fd8ef57143f032751
BLAKE2b-256 9d12770af2e7bc24a9b51fa3d383ca6533c27c820a70b7d290b7cd98b44e8a8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page