Skip to main content

Chia-Py-RPC is a Python library that provides a convenient way to interact with the Chia blockchain using the Chia RPC (Remote Procedure Call) protocol.

Project description

Chia-Py-RPC

Chia-Py-RPC is a Python library that provides a convenient way to interact with the Chia blockchain using the Chia RPC (Remote Procedure Call) protocol. It allows you to send transactions, check balances, and perform other Chia-related operations programmatically from Python.

Features

  • Send transactions to multiple recipients in a single transaction
  • Check wallet balances and transaction history
  • Get information about Chia blocks, coins, and transactions
  • Create and manage Chia wallets
  • Simple and easy-to-use
  • Plus every RPC method avaliable in Chia Client 1.7.0 or previous.

Installation

To install Chia-Py-RPC, you can use pip, the Python package manager. Open a terminal and run the following command:

pip install chia-py-rpc

Usage

Here's an example of how you can use Chia-Py-RPC to send transactions to multiple recipients in a single transaction:

from chia_py_rpc.wallet import Wallet

# Create an instance of Wallet
chia_wallet = Wallet()

# Specify the wallet ID, additions (recipients), fee, and optional parameters
wallet_id = 1
additions = [
    {'amount': 1000000000000, 'puzzle_hash': '0x...'},  # Recipient 1
    {'amount': 500000000000, 'puzzle_hash': '0x...'},  # Recipient 2
]
fee = 0.00001

# Call the send_transaction_multi method to send the transaction
result = chia_wallet.send_transaction_multi(wallet_id, additions, fee)

# Parse the result and handle the transaction ID and status
transaction_id = result['transaction_id']
status = result['status']
print(f"Transaction ID: {transaction_id}")
print(f"Status: {status}")

For more examples and documentation, please refer to the official documentation.

Contributing

If you would like to contribute to Chia-Py-RPC, please open an issue or submit a pull request on GitHub. We welcome any contributions, including bug fixes, feature enhancements, and documentation improvements.

License

Chia-Py-RPC is open-source software licensed under the MIT License.

Acknowledgements

Chia-Py-RPC is not affilated with the Chia Network in any way and it purely to provide a simple method of utlising Chia RPC in python.

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

chia_py_rpc-0.1.1.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

chia_py_rpc-0.1.1-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file chia_py_rpc-0.1.1.tar.gz.

File metadata

  • Download URL: chia_py_rpc-0.1.1.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for chia_py_rpc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9afdaa8779475a886092f413956bc8d69493054e79a28a186215b88ae3cf95c8
MD5 08837d217c83a2a2396ea2435e46503a
BLAKE2b-256 0fc89268d4973d4a0b7f2f18ecb98db6e94fc853429ffb1a2fc2cb06ca5e8c80

See more details on using hashes here.

File details

Details for the file chia_py_rpc-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: chia_py_rpc-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for chia_py_rpc-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 964077ea28d152cb7dba070dfc04088ef94ba6c2e899e6d9e87ad9d7c2d26e26
MD5 bd3ff29c1daed508cf9450f118f8fb80
BLAKE2b-256 c2a6597d5410de2d122992a67f05cba965c8123faed3aa21d47ec6137aaf5078

See more details on using hashes here.

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