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.4.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file nanohelp-0.1.4.tar.gz
.
File metadata
- Download URL: nanohelp-0.1.4.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f6b5af7b0b9a153e43507211e3f97f051bc6cddaccb2ce441ac41fd98f8196f |
|
MD5 | 33c25a56bc44a854c832acf3013af7e5 |
|
BLAKE2b-256 | 2918a0c222702ce7ee63286d52e00ada7a72765ae248caf47851d2547c0276b3 |
Provenance
File details
Details for the file nanohelp-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: nanohelp-0.1.4-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6583cc3b90bac2c742ae68ab3df69d11326d6b9360517c8f6d811da7cfccd3c |
|
MD5 | 265ce211a3413c42efc0b48d9fff997b |
|
BLAKE2b-256 | 19b94701d2399cb551b9c70320cb48d458ef729cbecf2c23ccd3224ec0b9d9e3 |