This Python3 library implements support for Dash transactions.
It builds on top, and is intended to be used along with python-bitcointx library.
Requirements
- python-bitcointx (version >= 1.0.0)
Usage:
With contextual switch to Dash parameters:
import os
import dashtx
from bitcointx import ChainParams, get_current_chain_params
from bitcointx.wallet import (
CCoinKey, CCoinExtKey, P2WPKHCoinAddress, CCoinAddress
)
with ChainParams('dash'):
k = CCoinExtKey.from_seed(os.urandom(32))
a = P2WPKHCoinAddress.from_pubkey(k.derive_path("m/0h/0h/1").pub)
print('example {} address: {}'.format(get_current_chain_params().NAME, a))
assert CCoinAddress(str(a)) == a
With global switch to Dash parameters:
from dashtx import DashMainnetParams
from bitcointx import select_chain_params
select_chain_params('dash')
# or, using the chain params class directly
select_chain_params(DashMainnetParams)
Without the switch of chain parameters:
from dashtx.wallet import P2SHDashAddress
p2sh_addr = P2SHDashAddress('7UHUEqN8EwpHFJjf7U83YAUhEinxYt1MAK')
p2sh_addr = P2SHDashAddress.from_scriptPubKey(p2sh_addr.to_scriptPubKey())
assert str(p2sh_addr) == '7UHUEqN8EwpHFJjf7U83YAUhEinxYt1MAK'
from bitcointx import select_chain_params
from bitcointx.wallet import CCoinAddress
from dashtx.wallet import P2SHDashAddress
select_chain_params('dash')
p2sh_addr = CCoinAddress('7UHUEqN8EwpHFJjf7U83YAUhEinxYt1MAK')
assert isinstance(p2sh_addr, P2SHDashAddress)
this also works with ChainParams context manager.
Metadata
Release files for python-dashtx 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| python-dashtx-0.1.1.tar.gz | 7.0 kB | Without provenance | Details |
Release files / python-dashtx-0.1.1.tar.gz
| Download URL | python-dashtx-0.1.1.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df36373164247af47c0d56fa187d13de8ab7866704061f43ca5188566e5f83d4
|
|
BLAKE2b-256 checksum How to use checksums |
83384f2e042c38d7ebbd1d138af90582866cc5b28bfe52c0f57634425c9bdfc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.5
|
Security for python-dashtx 0.1.1
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.