Create Transaction with Metadata (CIP-20)
Adding human-readable messages to transactions (CIP-20)
Last updated
Was this helpful?
Adding human-readable messages to transactions (CIP-20)
Last updated
Was this helpful?
Sometimes you want to attach a message, comment, or memo to a Cardano transaction—whether it's a receipt reference, a note for future auditing, or just user-friendly text. CIP-20 standardizes how these messages appear on-chain by using label 674 in transaction metadata. With the Anvil API, you can easily attach messages to your transactions with minimal configuration.
The Anvil API lets you supply a simple message or array of messages. Under the hood, Anvil auto-formats them for CIP-20 compliance:
Single string → ["Your message"]
Array of strings → ["Line 1", "Line 2"]
Long string → Automatically split across multiple array entries if it exceeds 64 bytes
For more information on transactions, please refer to the .
Simple message attachment to transactions
Automatic CIP-20 compliance formatting
Support for single strings or arrays of strings
Automatic handling of messages exceeding 64 bytes
A Cardano wallet with sufficient ADA
Valid API key for authentication
The Anvil API automatically formats your messages for CIP-20 compliance:
Single string → ["Your message"]
Array of strings → ["Line 1", "Line 2"]
Long string → Automatically split across multiple array entries if it exceeds 64 bytes
Keep messages concise and relevant
Consider privacy implications of on-chain messages
Test transactions on testnet before moving to mainnet
Remember that all on-chain metadata is publicly visible
Keep your API key secure and never expose it in client-side code