You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR enriches the Codama IDL with display metadata for clear signing, per sRFC 39, and bumps codama to ^1.10.0 (the display node types shipped in 1.9). All 14 instructions gain intents and interpolated intents; accounts and arguments gain labels; lamport amounts render as SOL (decimals: 9), sizes as bytes; discriminators and fixed sysvar accounts (rent, recent blockhashes) are hidden from the fallback list. The nonce account's lamportsPerSignature field also renders as SOL.
Sample renders via @codama/dynamic-instructions:
Transfer 1.5 SOL from 3Wnd5…PxJX to 9WzDX…AWWM
Create account Fg6Pa…sLnS with 0.00203928 SOL
Withdraw 0.5 SOL from DRpbC…21hy to 9WzDX…AWWM
Clients were regenerated and are unaffected: renderers pass display metadata through untouched.
Retrofit: labels identical to the renderer's derived titleCase(name) are redundant; keeping only genuine renames makes the IDL smaller and the convention self-documenting. Kept labels are now Title Case to match the derived casing.
To make this JSON diff easier to review, every instruction below is rendered end-to-end through @codama/dynamic-instructions#getInstructionDisplay using synthetic sample data. Each collapsed line shows the interpolated intent at a glance (addresses abridged); expand for the full render showing both presentation modes a wallet chooses between — the interpolated sentence, or the intent-with-fields fallback screen. Address formatting (truncation, .sol names, token symbols) is left to the consuming wallet, so raw base58 appears in the full renders.
createAccount — Create account Fg6Pa…sLnS with 0.00203928 SOL
Interpolated intent:
│ Create account Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS with 0.00203928 SOL
Intent + fields (fallback):
│ Create account
│ Funding Amount: 0.00203928 SOL
│ Space: 165 bytes
│ Owner Program: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
│ Payer: 3Wnd5Df69KitZfUoPYZU438eFRNwGHkhLnSAWL65PxJX
│ New Account: Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS
transferSol(1.5 SOL transfer) — Transfer 1.5 SOL from 3Wnd5…PxJX to 9WzDX…AWWM
Interpolated intent:
│ Transfer 1.5 SOL from 3Wnd5Df69KitZfUoPYZU438eFRNwGHkhLnSAWL65PxJX to 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
Intent + fields (fallback):
│ Transfer SOL
│ Amount: 1.5 SOL
│ From: 3Wnd5Df69KitZfUoPYZU438eFRNwGHkhLnSAWL65PxJX
│ To: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
createAccountWithSeed — Create account Fg6Pa…sLnS with 0.01 SOL
Interpolated intent:
│ Create account Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS with 0.01 SOL
Intent + fields (fallback):
│ Create account with seed
│ Base Address: 3Wnd5Df69KitZfUoPYZU438eFRNwGHkhLnSAWL65PxJX
│ Seed: stake:0
│ Funding Amount: 0.01 SOL
│ Space: 200 bytes
│ Owner Program: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
│ Payer: 3Wnd5Df69KitZfUoPYZU438eFRNwGHkhLnSAWL65PxJX
│ New Account: Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS
│ Base Account: 3Wnd5Df69KitZfUoPYZU438eFRNwGHkhLnSAWL65PxJX
allocateWithSeed — Allocate 165 bytes for DRpbC…21hy
Interpolated intent:
│ Allocate 165 bytes for DRpbCBMxVnDK7maPM5tGv6MvB3v1sRMC86PZ8okm21hy
Intent + fields (fallback):
│ Allocate space with seed
│ Base Address: BPFLoaderUpgradeab1e11111111111111111111111
│ Seed: example seed
│ Space: 165 bytes
│ Owner Program: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
│ Account: DRpbCBMxVnDK7maPM5tGv6MvB3v1sRMC86PZ8okm21hy
│ Base Account: 6QuXb6mB6WmRASP2y8AavXh6aabBXEH5ZzrSH5xRrgSm
assignWithSeed — Assign DRpbC…21hy to program 9WzDX…AWWM
Interpolated intent:
│ Assign DRpbCBMxVnDK7maPM5tGv6MvB3v1sRMC86PZ8okm21hy to program 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
Intent + fields (fallback):
│ Assign account with seed
│ Base Address: BPFLoaderUpgradeab1e11111111111111111111111
│ Seed: example seed
│ Owner Program: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
│ Account: DRpbCBMxVnDK7maPM5tGv6MvB3v1sRMC86PZ8okm21hy
│ Base Account: 6QuXb6mB6WmRASP2y8AavXh6aabBXEH5ZzrSH5xRrgSm
transferSolWithSeed — Transfer 0.25 SOL from Fg6Pa…sLnS to 9WzDX…AWWM
Interpolated intent:
│ Transfer 0.25 SOL from Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS to 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
Intent + fields (fallback):
│ Transfer SOL with seed
│ Amount: 0.25 SOL
│ From Seed: vault
│ From Owner: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
│ From: Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS
│ Base Account: 3Wnd5Df69KitZfUoPYZU438eFRNwGHkhLnSAWL65PxJX
│ To: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
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
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.
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 14 instructions gain intents and interpolated intents; accounts and arguments gain labels; lamport amounts render as SOL (decimals: 9), sizes asbytes; discriminators and fixed sysvar accounts (rent, recent blockhashes) are hidden from the fallback list. Thenonceaccount'slamportsPerSignaturefield also renders as SOL.Sample renders via
@codama/dynamic-instructions:Clients were regenerated and are unaffected: renderers pass display metadata through untouched.