A module to send ADA with a message in the metadata.
Project description
cardanomsg
Send ADA with a message in the metadata using the Cardano blockchain.
Installation
You can install the module using pip:
pip install cardanomsg
Usage
A BlockFrost API account is required (to prevent needing to run the blockchain locally on your PC).
Send message
Send a message in a transaction.
from cardanomsg.transaction import send_message
transaction_hash = send_message("<BLOCKFROST_PROJECT_ID>", "wallet.skey", "<RECIPIENT_ADDRESS>", 1000000, "Hello World")
Get message
Get a message from a transaction.
from cardanomsg.transaction import get_message
message = get_message("<BLOCKFROST_PROJECT_ID>", "079112f6a5192c6eeae57de0607d61e07dea864efc2bbad7aa953795a5c56aae")[0].json_metadata
You can also view the message on the blockchain using Cardanoscan.
Summary | UTXOs | Metadata (1)
Metadata Hash: 2f86fa9fdfcb606ab2b5f060bd125848e45187cf2c798ab389e6a9af98ba8ad1
Public Label: 1
Value: "Hello World"
Create wallet
Create a wallet.
from cardanomsg.wallet import create
result = create()
Two files will be created: wallet.skey and wallet.addr.
The contents of wallet.skey is the secret key with the following format.
{
"type": "PaymentSigningKeyShelley_ed25519",
"description": "Payment Signing Key",
"cborHex": "<SENDER_SECRET_KEY>"
}
License
MIT
Author
Kory Becker http://primaryobjects.com
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cardanomsg-0.1.2.tar.gz.
File metadata
- Download URL: cardanomsg-0.1.2.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d9c06eea6ccfe57cfd454326a7ddfdb0952445d347796ea2e6345a5377aa593
|
|
| MD5 |
15f1e21ad357dfd16d09d2a9fa457eef
|
|
| BLAKE2b-256 |
3de6119f809d1669846907b7df5b3db178fdf2d13be7179336698f838303a5aa
|
File details
Details for the file cardanomsg-0.1.2-py3-none-any.whl.
File metadata
- Download URL: cardanomsg-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c24b2d863531a41f10e26c938e5c05952a62e8b03220a22dcb9df1256df2864
|
|
| MD5 |
e2b5e3572378ee98b55f36e374ae98af
|
|
| BLAKE2b-256 |
2b8bc6bc2cbe2eeb0e8685357effcffdbffce5044080fea482d443adfba01bfe
|