https://github.com/nanoswap/nanohelp
Business logic to abstract the raw nano node RPC logic
https://github.com/nanoswap/nanohelp
business-logic nanocurrency nox pypi-package python
Last synced: 17 days ago
JSON representation
Business logic to abstract the raw nano node RPC logic
- Host: GitHub
- URL: https://github.com/nanoswap/nanohelp
- Owner: nanoswap
- License: unlicense
- Created: 2023-04-24T17:38:44.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-02T02:08:40.000Z (almost 3 years ago)
- Last Synced: 2025-07-25T22:49:59.914Z (10 months ago)
- Topics: business-logic, nanocurrency, nox, pypi-package, python
- Language: Python
- Homepage:
- Size: 41 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nanohelp
Business logic to abstract the raw nano node RPC logic
## Documentation
https://nanohelp.readthedocs.io/en/latest/
## Installation
```
pip install nanohelp
```
## Usage
```python
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}")
```