VisualSign field types
Field types are the building blocks of VisualSign visualizations. Each type is designed to display specific kinds of blockchain data in a clear, consistent way.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 (can include commas)Currency: 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 | ”⚠️ 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
- Right-to-left (RTL) language support
- Locale-aware number formatting
- Currency symbol positioning
- Date/time formatting
Validation
Each field type has validation rules:amount_v2
- Must be valid numeric string
- Currency must be non-empty
- Supports decimal places
- Handles large numbers with 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
- Supports Unicode and emojis
- 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