feat: add CIP-20 transaction metadata to all tools#3
Closed
Conversation
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
830eddc to
6e31862
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
submit_transaction): Injects CIP-20 compliant metadata (label674) 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.get_addresses,get_utxos,get_balances,get_adahandles,get_stake_delegation): Adds_metadatafield 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
submit_transaction[Cardano MCP] - Submit Transactionget_addresses[Cardano MCP] - Get Addressesget_utxos[Cardano MCP] - Get UTXOsget_balances[Cardano MCP] - Get Balanceget_adahandles[Cardano MCP] - Get ADAHandlesget_stake_delegation[Cardano MCP] - Get Stake InfoTest plan
npm run buildcompiles without errorssubmit_transactionand verify CIP-20 metadata (label 674) appears on-chain_metadatafield is present in the response