Add clear signing display metadata to the IDL - #171
Conversation
Rendered output for reviewTo make this JSON diff easier to review, every instruction below is rendered end-to-end through
|
joncinque
left a comment
There was a problem hiding this comment.
Looks great!
Sorry for the dumb question, but is there a mechanism for potentially substituting other labels for addresses?
For example, any time you see EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v you render USDC?
Also, up to you, but including the mint in the interpolated string for ATA creation could be nice
This PR enriches the Codama IDL with display metadata for clear signing, per sRFC 39, and bumps
codamato^1.10.0(the display node types shipped in 1.9). All 28 token instructions and the 3 associated-token-account instructions gain intents, interpolated intents and labels.Token amounts scale through the provide/inject graph:
decimalsfrom their owndecimalsargument — fully offline, ideal for hardware wallets; the redundant argument is hidden once consumed (skip: "whenInjected").mintTo/burnprovidedecimalsfrom the mint account (accountFieldValueNode+accountLink), degrading gracefully to raw without account access.transfer,approve) render explicitly asbase units.Sample renders via
@codama/dynamic-instructions(the mint address resolves to a symbol when the renderer names it):Clients were regenerated and are unaffected: renderers pass display metadata through untouched.