Skip to main content

ombrachain

Official Python SDK for OmbraChain — Proof of AI Tokens Used blockchain with native AI compute pool.

PyPI Python License: MIT

  • REST clients for all mainnet endpoints
  • Wallet (BIP39 + HD m/44'/7777'/0'/0/* + Ed25519)
  • All 11 tx builders with bit-exact-match signatures cu TS SDK
  • EncryptedStorage (AES-256-GCM + PBKDF2 100k iter)
  • Async WebSocket + SSE streaming

Install

pip install ombrachain

Quick start

Check balance

from ombrachain import OmbraClient

client = OmbraClient("https://api.ombra-net.com")
account = client.chain.get_account("5bb5c50f185363cf913f93a18c6837c20d720a69")
print(f"balance: {account['balance']} micro-OMBRA, nonce: {account['nonce']}")

Create wallet + send OMBRA

from ombrachain import OmbraClient, Wallet

client = OmbraClient("https://api.ombra-net.com")

wallet = Wallet.generate()          # new BIP39 12-word
print("address:", wallet.address)
print("mnemonic (BACKUP!):", wallet.mnemonic)

# SAU
wallet = Wallet.from_mnemonic("twelve word mnemonic ...")

result = client.send(wallet, to="abc...", amount=1_000_000, fee=10_000)
print("tx hash:", result["hash"])

Submit AI task

result = client.submit_task(
    wallet,
    prompt="Explain Proof of AI Tokens Used in 100 words",
    task_type="chat",
    fee=500_000,
)
print("task ID:", result["task_id"])

# Poll for result
import time
while True:
    task = client.tasks.get_detailed(result["task_id"])
    if task["status"] in ("completed", "failed"):
        break
    time.sleep(5)
print("result:", task.get("result"))

Subscribe to new blocks (async)

import asyncio
from ombrachain import OmbraClient

async def main():
    client = OmbraClient("https://api.ombra-net.com")
    async with client.subscribe_chain() as sub:
        async for evt in sub:
            if evt["type"] == "block":
                print("new block:", evt["block"]["index"])

asyncio.run(main())

Encrypted wallet storage

from ombrachain import Wallet, EncryptedStorage

storage = EncryptedStorage("wallet.enc")

wallet = Wallet.generate()
storage.save(wallet, "user-password-123")

# Later
loaded = storage.load("user-password-123")
print(loaded.address)

Cross-language compatibility

Tx-uri semnate cu acest SDK sunt bit-exact identice cu cele semnate cu @ombrachain/sdk (TypeScript). Vector tests în tests/test_cross_language.py validează roundtrip TS ↔ Python pe mnemonic-uri și payload-uri fixe.

License

MIT © OmbraChain

Metadata

Release files for ombrachain 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ombrachain 0.1.0
File Size Uploaded Provenance Actions
ombrachain-0.1.0.tar.gz 17.6 kB Without provenance Details for ombrachain-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ombrachain 0.1.0
File Interpreter ABI Platform Actions
ombrachain-0.1.0-py3-none-any.whl Python 3 none any Details for ombrachain-0.1.0-py3-none-any.whl

Total release size: 33.9 kB

Release files / ombrachain-0.1.0.tar.gz

Download URL ombrachain-0.1.0.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fd85deab0033f76600a8d4323e7a7b3e7ab08ad200afa7d69428ab074673b8fc
BLAKE2b-256 checksum
How to use checksums
321a7a5f3858cff499b946ca52ae9ea344c757b605806157c3169a8ae15dae18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / ombrachain-0.1.0-py3-none-any.whl

Download URL ombrachain-0.1.0-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc66b08c65ca037b186a84e96344dd63e306928a2c9d88907ee26dfc8a881f01
BLAKE2b-256 checksum
How to use checksums
602303add4a33c6797b995aed7757f38e01659798734fb02010682dfabc19ab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Security for ombrachain 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page