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, andsendrawtransaction
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:
- Open the GitHub repo settings for
tensorium-labs/tensorium-sdk-py - Choose one publish mode:
- add repository secret
PYPI_API_TOKEN, or - configure PyPI Trusted Publisher for this GitHub repo
- add repository secret
- Run the
Publish PyPIworkflow manually from the Actions tab
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
230c16ea3b24e898384f05e415c359bcf146287a43d0d85c4c3c8f3479c598c9
|
|
| MD5 |
f6bf3bffb44231428c702f1247dee762
|
|
| BLAKE2b-256 |
0d6a5881501323aeb3f3f2236e1bf06eed3e4d888260786a57e6b62726fa8f0b
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tensorium_sdk-0.1.0.tar.gz -
Subject digest:
230c16ea3b24e898384f05e415c359bcf146287a43d0d85c4c3c8f3479c598c9 - Sigstore transparency entry: 1691186910
- Sigstore integration time:
-
Permalink:
tensorium-labs/tensorium-sdk-py@8ebf59a3611e31218e88c1bb0aad984894840295 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tensorium-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@8ebf59a3611e31218e88c1bb0aad984894840295 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc36a70c8dcb9ad39795a82c5ab83cef035e7f7e3361005ec7d97aea19a84940
|
|
| MD5 |
9992b727eea793f17ba3806776872588
|
|
| BLAKE2b-256 |
d44bc518db30ab6ed610a13739b0a88e9cf6fd5e63dd4108cec9fbf2b05189cc
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tensorium_sdk-0.1.0-py3-none-any.whl -
Subject digest:
fc36a70c8dcb9ad39795a82c5ab83cef035e7f7e3361005ec7d97aea19a84940 - Sigstore transparency entry: 1691187031
- Sigstore integration time:
-
Permalink:
tensorium-labs/tensorium-sdk-py@8ebf59a3611e31218e88c1bb0aad984894840295 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tensorium-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@8ebf59a3611e31218e88c1bb0aad984894840295 -
Trigger Event:
workflow_dispatch
-
Statement type: