The parsing pipeline
- Decode — Deserialize the raw transaction bytes
- Parse — Extract semantic meaning (amounts, addresses, function calls)
- Visualize — Transform into VisualSign field types
Input: Raw transactions
The parser accepts transactions in their native format:| Chain | Input format | Encoding |
|---|---|---|
| Ethereum | RLP-encoded transaction | Hex |
| Solana | Serialized transaction | Base64 |
| Sui | BCS-encoded transaction | Base64 |
| Tron | Protobuf-encoded transaction | Hex |
Output: VisualSign JSON
The parser returns a JSON structure with:Field types
VisualSign uses typed fields to represent different kinds of data:| Type | Purpose | Example |
|---|---|---|
text_v2 | Labels, descriptions, numbers | ”Ethereum Mainnet”, “21000” |
amount_v2 | Token amounts with symbols | ”1.5 ETH”, “2847.32 USDC” |
address_v2 | Wallet/contract addresses | ”0x1234…” |
preview_layout | Grouped related fields | Swap details, transfer info |
list_layout | Multiple items | NFT batch transfers, multi-send |
Displaying to users
Parse the VisualSign JSON and render it in your UI:Condensed vs expanded output
VisualSign supports two display modes:- Condensed — Essential fields only, designed for hardware wallet screens with limited display
- Expanded — Full transaction details for software wallets with more screen space
Testing with the CLI
Use the parser CLI to test transaction parsing locally:-o json— Output as JSON for programmatic use-o human— Human-readable tree format--condensed-only— Show only condensed fields-n NETWORK— Specify network (e.g.,POLYGON_MAINNET)
Next steps
- Chain Metadata — Provide ABIs and IDLs for better parsing
- Error Handling — Handle parse failures gracefully
- Field Types — Complete field type reference