Skip to main content

Python SDK for the Tensorium Proof-of-Work chain

Project description

tensorium-sdk-py

Python SDK for the Tensorium Proof-of-Work chain.

Install

pip install tensorium-sdk

Quick Start

from tensorium_sdk import TxmRPC, TxmWallet, send

rpc = TxmRPC("https://rpc.tensoriumlabs.com")
wallet = TxmWallet.from_private_key_hex("YOUR_PRIVATE_KEY_HEX")

utxos = rpc.get_utxos(wallet.address)["utxos"]
balance_atoms = sum(u["value_atoms"] for u in utxos if u["mature"])
print("Balance:", balance_atoms, "atoms")

txid = send(rpc, wallet, "txm1qdestination...", 100_000_000)
print("Sent:", txid)

Features

  • Wallet generation and restore from private key
  • Tensorium address derivation (txm1...)
  • UTXO selection
  • Raw transaction build and deterministic signing
  • HTTP RPC client for getblockcount, getutxos, and sendrawtransaction

Development

python3 -m pip install -e '.[dev]'
pytest

Publish To PyPI

Local publish path:

python3 -m venv .venv
.venv/bin/python -m pip install -e '.[dev]' build twine
.venv/bin/python -m build
.venv/bin/python -m twine check dist/*
.venv/bin/python -m twine upload dist/*

GitHub Actions publish path:

  1. Open the GitHub repo settings for tensorium-labs/tensorium-sdk-py
  2. Choose one publish mode:
    • add repository secret PYPI_API_TOKEN, or
    • configure PyPI Trusted Publisher for this GitHub repo
  3. Run the Publish PyPI workflow manually from the Actions tab

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

tensorium_sdk-0.1.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

tensorium_sdk-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file tensorium_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: tensorium_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tensorium_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 230c16ea3b24e898384f05e415c359bcf146287a43d0d85c4c3c8f3479c598c9
MD5 f6bf3bffb44231428c702f1247dee762
BLAKE2b-256 0d6a5881501323aeb3f3f2236e1bf06eed3e4d888260786a57e6b62726fa8f0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tensorium_sdk-0.1.0.tar.gz:

Publisher: publish-pypi.yml on tensorium-labs/tensorium-sdk-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tensorium_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tensorium_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tensorium_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc36a70c8dcb9ad39795a82c5ab83cef035e7f7e3361005ec7d97aea19a84940
MD5 9992b727eea793f17ba3806776872588
BLAKE2b-256 d44bc518db30ab6ed610a13739b0a88e9cf6fd5e63dd4108cec9fbf2b05189cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for tensorium_sdk-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on tensorium-labs/tensorium-sdk-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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