Business logic to abstract the raw nano node RPC logic
Project description
nanohelp
Business logic to abstract the raw nano node RPC logic
Documentation
https://nanohelp.readthedocs.io/en/latest/
Installation
pip install nanohelp
Usage
from nanohelp.secret import SecretManager
from nanohelp.wallet import WalletManager
# Initialize a SecretManager
secret_manager = SecretManager()
# Initialize a WalletManager, passing in the secret manager
wallet_manager = WalletManager(secret_manager)
# Define user and project details
user1 = "user1"
user2 = "user2"
project_id = "my-project"
# Create a new wallet for User1, this also generates and stores a new private key
wallet_id_user1, account_address_user1 = wallet_manager.create_wallet(user1)
# Create a new wallet for User2
wallet_id_user2, account_address_user2 = wallet_manager.create_wallet(user2)
# Transaction from User1's account to User2's account
amount = 1000 # amount of Nano to be sent
transaction_block = wallet_manager.make_transaction(
wallet_id_user1,
account_address_user1,
account_address_user2,
amount,
secret_manager.get_private_key(project_id, user1)
)
# Print transaction block
print(f"Transaction block: {transaction_block}")
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
nanohelp-0.1.13.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for nanohelp-0.1.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d83017e0773396367bf62b97384ebfcfbb75d6917b6d522d1d5ff686286fb77 |
|
MD5 | bd6c45b10b8bdcd872d6ece23a03cde3 |
|
BLAKE2b-256 | e92d1a90ab9dce76d1b1823986b0c2581133e91d333e1661b11d91a6cbc54635 |