Interfaces with the Cardano full-node software.
Project description
Cardano Tools
A python module for interacting with the Cardano blockchain.
The Cardano-Tools module provides functionality for interfacing with running
full nodes on local or remote hosts. A running Cardano node is a prerequisite
for using this package.
Provided tools include:
- Interfacing with the node:
- Starting a relay or pool node locally and remotely.
- Getting the node tip.
- Creating and administrating a wallet:
- Create a new wallet address
- Get UTXO list
- Send a payment
- Register a staking address
- Get the blockchain tip
- Creating and administrating a stake pool:
- Create block producing keys
- Register a stake pool
- Retire a stake pool
This project is developed and maintained by the team at Viper Staking.
Installation
You can install Cardano Tools from PyPI:
pip install cardano-tools
The Cardano Tools package supports Python 3.7 and above.
Examples
For more detailed examples, see the example scripts.
Shelley Tools
The ShelleyTools class provides an interface to the cardano-cli shelley
commands. An example for creating a wallet is given below.
from cardano_tools import ShelleyTools
# Test Inputs (example paths)
path_to_cli = "/home/user/.cabal/bin/cardano-cli"
path_to_socket = "/home/user/relay-node/db/node.socket"
working_dir = "/home/user/.cardano-tools/"
# Create a ShelleyTools object
shelley = ShelleyTools(
path_to_cli,
path_to_socket,
working_dir,
network="--testnet-magic 42" # <-- For the testnet (default: --mainnet)
)
# Create a wallet address with both spending and staking keys.
print(shelley.make_address("my_wallet"))
Optionally, an SSH connection object may be specified if working with remote hosts.
from cardano_tools import ShelleyTools
from fabric import Connection
conn = Connection(
host="hostname",
user="admin",
connect_kwargs={
"key_filename": "/home/myuser/.ssh/private.key",
},
)
shelley = ShelleyTools(
path_to_cli,
path_to_socket,
working_dir,
ssh=conn
)
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 cardano-tools-0.1.0.tar.gz.
File metadata
- Download URL: cardano-tools-0.1.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
263fe28c7198501377c4b6c80e1b79ea6796c4c1d81f3aafc11eea356257f3ad
|
|
| MD5 |
efad049a0b5463591a8bd2bc64f7a97b
|
|
| BLAKE2b-256 |
4d30a82612090cdfae655527bfdd2941a648a4eb5d6e03cf9c535980113534fe
|
File details
Details for the file cardano_tools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cardano_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d871995f236a6162e95160bf6090bc3632be00d4918390a7b344813450c61779
|
|
| MD5 |
851a69b63cd660da468a1a832dfbe3ec
|
|
| BLAKE2b-256 |
f6ac7fb48151d20faaa231a72a0a77a2e9769196fd1dab634cc38778d3786509
|