A python nanoclient to easily interact with the nano blockchain.
Project description
Nanoclient Python
This project was made to make it easier to interact with nano blockchain in python.
Getting Started
import NanoClient from nanoclient
# get your nanswap node api here, https://nanswap.com/nodes
client = NanoClient({"nodeUrl": "https://nodes.nanswap.com/XNO", "currency": "xno", "nanswapApi": "your_nanswap_api","workUrl": "https://nodes.nanswap.com/XNO"});
# this should only be called once and seed should be backed up
client.setRetrieveSeed(client.randomSeed()) # a file is created with the seed in your directory. i.e, after running this code once, remove this line
# 0 is the index, you can continue deriving as many wallets as you need, the number is the index and each derives unique wallet on the seed stored in file
wallet = client.wallet(0) # while 0=0 and 1=1, returns json with keys
Key Commands
seed = client.randomSeed()
privateKey = client.derivePrivateKey(seed, 0)
publicKey = client.derivePublicKey(privateKey)
deriveAddress = client.deriveAddress(publicKey)
RPC Commands
node actions after '#'
client.rpc.account_info(nanoAddress) # account_info
client.rpc.work_generate(blockHash) # work_generate
client.rpc.recievable(nanoAddress) # pending
client.rpc.process(block, "(send/recieve)") # process
client.rpc.req(any_json_rpc_command)
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
nanoclient-0.0.2.tar.gz
(3.2 kB
view details)
File details
Details for the file nanoclient-0.0.2.tar.gz
.
File metadata
- Download URL: nanoclient-0.0.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd337504545f1b9d7e7c01fad1823a816868c051cd55331d5e74a088a40d8b70 |
|
MD5 | b1e98541991ac8d2cb5bb572aab8e332 |
|
BLAKE2b-256 | 9329e331b8d0cb8128900bf470b1577610cce31dd8ebdac638b8a9e31e4b2382 |