Skip to content

feat: add CIP-20 transaction metadata to all tools#3

Closed
adacapo21 wants to merge 1 commit intomainfrom
feat/3RD-388-cip20-transaction-metadata
Closed

feat: add CIP-20 transaction metadata to all tools#3
adacapo21 wants to merge 1 commit intomainfrom
feat/3RD-388-cip20-transaction-metadata

Conversation

@adacapo21
Copy link
Copy Markdown
Member

@adacapo21 adacapo21 commented Mar 16, 2026

Summary

  • Write tools (submit_transaction): Injects CIP-20 compliant metadata (label 674) into the unsigned transaction CBOR before signing. Uses CML to deserialize the transaction, attach { msg: ["[Cardano MCP] - Submit Transaction"] } metadata, update the auxiliary data hash in the body, and re-serialize.
  • Read tools (get_addresses, get_utxos, get_balances, get_adahandles, get_stake_delegation): Adds _metadata field with CIP-20 formatted message to all API responses (e.g. { "674": { "msg": ["[Cardano MCP] - Get Balance"] } }).

CIP-20 Reference

https://cips.cardano.org/cip/CIP-20

Metadata Messages

Tool Message
submit_transaction [Cardano MCP] - Submit Transaction
get_addresses [Cardano MCP] - Get Addresses
get_utxos [Cardano MCP] - Get UTXOs
get_balances [Cardano MCP] - Get Balance
get_adahandles [Cardano MCP] - Get ADAHandles
get_stake_delegation [Cardano MCP] - Get Stake Info

Test plan

  • Verify npm run build compiles without errors
  • Submit a transaction via submit_transaction and verify CIP-20 metadata (label 674) appears on-chain
  • Call each read tool and verify _metadata field is present in the response

For write tools (submit_transaction): inject CIP-20 metadata (label 674)
directly into the unsigned transaction CBOR before signing, using CML to
deserialize, attach metadata, update the auxiliary data hash, and
re-serialize.

For read tools (get_addresses, get_utxos, get_balances, get_adahandles,
get_stake_delegation): add _metadata field with CIP-20 formatted message
to all API responses.

Resolves 3RD-388
@adacapo21 adacapo21 force-pushed the feat/3RD-388-cip20-transaction-metadata branch from 830eddc to 6e31862 Compare March 17, 2026 21:31
@adacapo21 adacapo21 closed this Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant