Skip to main content

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


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.3.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

nanohelp-0.1.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file nanohelp-0.1.3.tar.gz.

File metadata

  • Download URL: nanohelp-0.1.3.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for nanohelp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4092802b70a5c2eb42b839ebf6bc8a6e6e36d51f828879de0cdc58c63e7899bb
MD5 4b2fc40ebc7c44a9efc9e7b191a13beb
BLAKE2b-256 20a7368215eb4b4ea460cbea44ee1d2f6474f77e6f730e3aef5071821a688b6e

See more details on using hashes here.

Provenance

File details

Details for the file nanohelp-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: nanohelp-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for nanohelp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 054f15f1ac28dd828aa742a7a86c9b5a5f878c4b3d0785277a685a050e324b87
MD5 02b09598e212458b0e4ddb74da0fd6f7
BLAKE2b-256 40ec937c04caadfbadbd0c7b0caab537028a6b0ccb16d764799e433fc9975637

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page