Skip to main content

Official Python library for Tencoin – HD wallets, SegWit, BIP39, RPC client

Project description

Tencoinlib

Official Python library for Tencoin – HD wallets, transactions, RPC client, and message signing.

Features

  • HD Wallets: BIP-39 (seed phrases) + BIP-84 (SegWit native addresses)
  • Full BIP-32 Support: Standard xprv/xpub extended keys with master/account-level derivation
  • Watch-Only Wallets: Create wallets directly from xpub (no seed/private key required)
  • Multiple Address Types:
    • SegWit v0 (P2WPKH): Native SegWit addresses (tc1q...)
    • Legacy P2PKH: Pay-to-pubkey-hash addresses (T...)
    • Legacy P2SH: Pay-to-script-hash addresses (M...)
    • P2WSH: SegWit script addresses (tc1q... with 32-byte program)
  • Custom Scripts: Support for multisig and custom redeem/witness scripts
  • Transaction Signing: Automatic detection and signing for SegWit (BIP-143) and Legacy (P2PKH/P2SH) inputs
  • Message Signing: Bitcoin Core–compatible message signing and verification with public key recovery
  • Library Integrity Verification: Cryptographic proof that the installed library is authentic and unmodified
    • Key Derivation:
    • BIP-84 (P2WPKH): m/84'/5353'/0'/0/0 for native SegWit addresses
    • BIP-44 (P2PKH): m/44'/5353'/0'/0/0 for legacy P2PKH addresses
    • Additional custom BIP-32 paths supported via the BIP-32 API
  • Seed Phrases: 12–24 word English mnemonics (full BIP-39 compliance)
  • Wallet Recovery: From mnemonic phrases – compatible with standard BIP-39 implementations
  • Full BIP-39 Compatibility: Mnemonics generated by other standard libraries (e.g., bip-utils, Electrum, MetaMask, Ian Coleman's tool) are validated and recovered
  • Secure Seed Generation: PBKDF2-HMAC-SHA512 with official 2048-word English wordlist

Installation

pip install tencoinlib

Verify Authenticity

Each release is signed by the official Tencoin developer. You can verify that your installed library is authentic and has not been tampered with:

from tencoinlib.integrity import compute_library_hash, get_file_manifest
from tencoinlib import verify_message, DEVELOPER_ADDRESS
from tencoinlib import __version__

# Paste the signature for your release from tencoin.org
SIGNATURE = "PASTE_SIGNATURE_HERE"

library_hash = compute_library_hash()
is_valid = verify_message(DEVELOPER_ADDRESS, library_hash, SIGNATURE)

print("=" * 64)
print(f"  Version           : {__version__}")
print(f"  Developer address : {DEVELOPER_ADDRESS}")
print(f"  Library hash      : {library_hash}")
print(f"  Files hashed      : {len(get_file_manifest())}")
print(f"  Authentic         : {'✓ YES' if is_valid else '✗ NO — library may be tampered with'}")
print("=" * 64)

Release: v0.1.2
Developer: TASH999uKBUFN1AqAkDjJ8dQqWbXw6G5bh
Signature: XW+CkeicyOYo/wTkvJLqOGd3ns/3kguh3lL3jNkMcmQ0UCtanpZYVXpil8mDjFE/zDWPiPaaBzbEdhKEdmukOh8=

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

tencoinlib-0.1.2.tar.gz (41.6 kB view details)

Uploaded Source

Built Distribution

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

tencoinlib-0.1.2-py3-none-any.whl (45.7 kB view details)

Uploaded Python 3

File details

Details for the file tencoinlib-0.1.2.tar.gz.

File metadata

  • Download URL: tencoinlib-0.1.2.tar.gz
  • Upload date:
  • Size: 41.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for tencoinlib-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6be58ea4326d136833a632bee4b4cd6680a41627325bdb9c38f95426e54dc448
MD5 428af4c67445be0804112b2729239b3d
BLAKE2b-256 2007a1f7705b4a85b430a1270041732aca6a25f029659f60f7ff5b8b2b786617

See more details on using hashes here.

File details

Details for the file tencoinlib-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tencoinlib-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 45.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for tencoinlib-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 90e9b6a60d34dc368ef34bf503e6291cec68f24323e944bf2b726d3b21fa70e8
MD5 406ab55cf4db9381b8cd51d63b54d713
BLAKE2b-256 1a18d2b65af49550d762e81d17691d70cadd69cd2ad4a6ae6a566afd3d0a524d

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