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.12.tar.gz
(4.8 kB
view details)
Built Distribution
File details
Details for the file nanohelp-0.1.12.tar.gz
.
File metadata
- Download URL: nanohelp-0.1.12.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24bb1f38093ed100a772743fb04a088ed5f36d7fc54d8d9dfe3e6be2b21884ee |
|
MD5 | 14c3b45675e50bec74ee1d56cc862ddf |
|
BLAKE2b-256 | f45c6db2ad7116bf792fd4f17bcb02041ef88561c557ffe7252f91f5f776f3a8 |
Provenance
File details
Details for the file nanohelp-0.1.12-py3-none-any.whl
.
File metadata
- Download URL: nanohelp-0.1.12-py3-none-any.whl
- Upload date:
- Size: 6.0 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 | d1baee81d166f5505766334bf98d6449c3462e80ef27aef72afc6d446eaa1026 |
|
MD5 | ad935d189a1ece12f34754938afd76e8 |
|
BLAKE2b-256 | 7f8227c109984564c3a593e6510ea1a14672e192efac526064a4e09581b5b2e3 |