nimble miner api
Project description
Nimble Miner API
It provides CLI, wallet and other APIs for the miners.
Development
Install
# installer option
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/nimble-technology/nimble-miner-api/master/scripts/install.sh)"
# pip install option
$ pip3 install nimble-miner-api
# from source
$ git clone https://github.com/nimble-technology/nimble-miner-api.git
$ cd nimble-miner-api
$ python3 -m pip install -e ./
# test install from command line
# usage: nbcli <command> <command args>
# commands:
# subnets (s, subnet) - Commands for managing and viewing subnetworks.
# root (r, roots) - Commands for managing and viewing the root network.
# wallet (w, wallets) - Commands for managing and viewing wallets.
# stake (st, stakes) - Commands for staking and removing stake from hotkey accounts.
# sudo (su, sudos) - Commands for subnet management.
# legacy (l) - Miscellaneous commands.
$ nbcli --help
# test install from python
import nimble-miner-api as nimble
# cuda dependency for cubit install - python 3.10 example
pip install https://github.com/nimble-technology/cubit/releases/download/v1.1.2/cubit-1.1.2-cp310-cp310-linux_x86_64.whl
Wallet
Each wallet has a coldkey. Each coldkey may contain multiple hotkeys and each hotkey belong to a single coldkey. Coldkeys are for secure fund management like transfer, staking, and fund storage. Hotkeys are for all online operations like signing, mining and validating.
# wallet creation in python
import nimble-miner-api as nimble
wallet = nimble.wallet()
wallet.create_new_coldkey()
wallet.create_new_hotkey()
# Sign data with the keypair.
wallet.coldkey.sign( data )
# use nbcli with wallet subcommand or alias w.
$ nbcli wallet new_coldkey
$ nbcli wallet new_hotkey
$ nbcli wallet regen_coldkey --mnemonic **** *** **** **** ***** **** *** **** **** **** ***** *****
# keys are available here: ~/.nimble/wallets
$ nbcli wallet list
# more commands
$ nbcli wallet list
$ nbcli wallet transfer
Release (Admin Only)
Run the following command to create dist folder
python setup.py sdist
Then use the following command to publish to pypi
twine upload dist/nimble-miner-api-{version}.tar.gz
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
nimble-miner-api-0.0.16.tar.gz
(170.0 kB
view details)
File details
Details for the file nimble-miner-api-0.0.16.tar.gz
.
File metadata
- Download URL: nimble-miner-api-0.0.16.tar.gz
- Upload date:
- Size: 170.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fbaef54bb09fd40c7a1b0b1c897b78b6c2853cb51f96a54376973f9244685ed |
|
MD5 | 841aed6bf6b6958df29d4723d7d38e6d |
|
BLAKE2b-256 | fbcad3e1edd13b72f204c3b0f66b673857896a013c5826395bdc122cc77e2b87 |