Skip to main content

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).

from cardanomsg.transaction import send_ada_message

blockfrost_project_id = "your_blockfrost_project_id"
skey_path_name = "path_to_your_secret_json_key_file"
recipient_address = "your_recipient_address"

transaction_hash = send_ada_message(blockfrost_project_id, skey_path_name, recipient_address, 1000000, "Hello World")

View the message

You can view the message on the blockchain using Cardanoscan.

https://preview.cardanoscan.io/transaction/{transaction_hash}?tab=metadata

Here is an example of the output:

Summary | UTXOs | Metadata (1)

Metadata Hash: 12345abcdefg606ab2b5f01298abxyz848e45187cf2c798ab389e6abcdefg
Public Label: 1
Value: "Hello World"

Sender JSON file format

The secret key for the sender is generated by pycardano. The format contains the following:

{
  "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

cardanomsg-0.1.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cardanomsg-0.1.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cardanomsg-0.1.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for cardanomsg-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b1de7f204d549e6a83ffcce74c8f537d5140a5b96d342df9a7bf933dd2872456
MD5 dce003b26db17e14b526a6061cef84a0
BLAKE2b-256 b9afe27aff5df6feedd081620af58a5236a8064823e6624cdf1c9abc84a64f9c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cardanomsg-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for cardanomsg-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1c7b3c922e1671445cb6c8cd86e0ccfa175066fc39e053c405dedd34a4a37e75
MD5 ac568a16aa98f295263dda17c189cdf1
BLAKE2b-256 d12513a9bb2c4459ab5f635942a6dcca67b41e0eec347784f156a0005421a1d4

See more details on using hashes here.

Supported by

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