Bash & cURL
Using Bash & cURL to create a transaction with CIP-20 metadata
Introduction
This example demonstrates how to create a transaction with CIP-20 metadata using the Anvil API. CIP-20 provides a standardized way to include human-readable messages in Cardano transactions using metadata label 674.
For more information about transactions, please refer to the Transaction Overview.
Objectives
This example creates a transaction with a CIP-20 compliant message on the Preprod network.
Requirements
A Cardano wallet with ADA
A valid API key
Bash shell environment
API Request Structure
Payload Format
{
"changeAddress": "addr_sender...",
"message": "Your message" // String or array of strings
}Message Format Options
Single String Message
Array of Strings
Auto-split for Long Messages
For messages exceeding 64 bytes, the API automatically splits them:
Will be formatted as:
Implementation
Configuration and Parameters (using Bash and cURL)
Using a preprod wallet for the transaction
API Call (using cURL)
Basic POST call with cURL
Expected Output
The Whole Script (Bash Version)
Last updated
Was this helpful?

