Core field types
text_v2
Displays plain text information. Use for labels, status messages, and non-monetary values.- Network names
- Protocol identifiers
- Status messages
- Transaction types
- Warning messages
amount_v2
Displays monetary values with proper formatting. Automatically handles decimal places and currency symbols.Amount: Numeric string (must be a valid signed decimal number)Abbreviation: Token symbol or currency code
- Large, prominent display for amounts
- Currency symbol or code shown clearly
- Automatic formatting for readability
address_v2
Displays blockchain addresses with optional identity resolution and verification badges.Address: The blockchain addressName(optional): ENS name, contract name, or identityBadgeText(optional): Verification status or warning
- Truncated address display (0x742d…bEb7)
- Copy-to-clipboard functionality
- Visual badges for verification status
- Color coding for risk levels
Layout field types
list_layout
Groups related fields together in a vertical list. Perfect for showing multiple related parameters.- Grouping related parameters
- Showing inputs/outputs
- Listing multiple recipients
- Displaying step sequences
preview_layout
Provides expandable/collapsible content with progressive disclosure. Shows essential info collapsed, full details when expanded.Title: Main heading for the previewSubtitle(optional): Secondary informationCondensed: Fields shown when collapsedExpanded: Full field list when expanded
- Chevron indicator for expand/collapse
- Smooth animation between states
- Preserves user’s expand/collapse choice
Field type selection guide
| Data Type | Recommended Field | Example Use Case |
|---|---|---|
| Token amounts | amount_v2 | ”Sending 100 USDC” |
| Fees | amount_v2 | ”Network fee: 0.002 ETH” |
| Wallet addresses | address_v2 | ”To: alice.eth” |
| Contract addresses | address_v2 | ”Interacting with: Compound V3” |
| Status/State | text_v2 | ”Status: Pending” |
| Network info | text_v2 | ”Network: Ethereum Mainnet” |
| Multiple values | list_layout | List of recipients |
| Complex data | preview_layout | Detailed gas breakdown |
| Warnings | text_v2 | ”Warning: High slippage” |
Combining field types
Example: DeFi position
Best practices
1. Label clarity
- Use action-oriented labels (“You’re sending” vs “Amount”)
- Keep labels concise but descriptive
- Use consistent terminology across transactions
2. Progressive complexity
- Show critical information with basic field types
- Use
preview_layoutfor advanced details - Group related items with
list_layout
3. Risk communication
4. Visual hierarchy
- Primary action: Large
amount_v2fields - Recipients: Clear
address_v2with names - Context:
text_v2for supporting information - Details:
preview_layoutfor optional viewing
Platform considerations
Mobile optimization
- Field types automatically adapt to screen size
preview_layoutdefaults to collapsed on mobile- Touch-friendly expand/collapse controls
- Horizontal scrolling for addresses
Accessibility
- All field types support screen readers
- Keyboard navigation between fields
- High contrast mode support
- ARIA labels for interactive elements
Internationalization
Parser output is ASCII-only (see Character set validation). Wallet applications handle localization:- Locale-aware number formatting (decimal separators, grouping)
- Currency symbol positioning based on locale
- Date/time formatting for timestamps
- UI translation of standard labels
Validation
Each field type has validation rules:Character set (all fields)
All text content is restricted to printable ASCII characters only (codes 0x20-0x7E). The following are rejected:- Unicode characters (Chinese, Japanese, Arabic, Cyrillic, etc.)
- Emoji
- Non-ASCII currency symbols (€, £, ¥)
- Control characters and zero-width characters
- Unicode escape sequences (
\u)
- Homoglyph attacks: Cyrillic “а” (U+0430) looks identical to Latin “a” (U+0061)
- Right-to-left override: Characters that reverse text direction
- Invisible characters: Zero-width spaces that hide content
amount_v2
Amountmust be a valid signed decimal number (validated by regex)Abbreviationmust be non-empty- Supports decimal places
- Large numbers should use decimal notation, not scientific notation
address_v2
- Must be valid for target chain
- Ethereum: 40 hex characters with 0x prefix
- Solana: Valid Base58 public key
- Sui: 32-byte hex address with 0x prefix
- Tron: Base58 address starting with T
text_v2
- Maximum 500 characters
- ASCII printable characters only (see character set above)
- HTML is escaped for security
Layout types
- Maximum 20 nested fields
- Recursive nesting not allowed
- At least one field required
Chain-specific patterns
Ethereum ERC-20 approval
Solana SPL token transfer
Future field types
Planned additions to the field type system:- image_v2: NFT previews and token logos
- chart_v2: Price charts and historical data
- qr_v2: QR codes for addresses
- signature_v2: Signature visualization
- timeline_v2: Transaction history display