Skip to main content
The parser_cli tool parses raw transaction data and shows the resulting visualization, making it essential for developing and testing VisualSign parsers.

Installation

Basic usage

Parameters

Real-world examples

Ethereum: Complex Uniswap transaction

The following command parses a real Uniswap Universal Router transaction that includes multiple DeFi operations:

Output breakdown

This visualization shows how VisualSign transforms a complex 2470-character hex string into a clear, hierarchical representation that anyone can understand.

Hardware wallet view

Use --condensed-only to see what users see on hardware wallets with limited screen space:
This shows only the most essential information that fits on small screens.

Available test fixtures

The parser includes real-world transaction examples from production networks:

Ethereum fixtures

Located in src/chain_parsers/visualsign-ethereum/tests/fixtures/:
  • legacy.input: Simple ETH transfer
  • 1559.input: EIP-1559 transaction example
  • uniswap-v2swap.input: Uniswap V2 swap transaction
  • uniswap-v3swap.input: Uniswap V3 swap transaction

Solana fixtures

Located in src/chain_parsers/visualsign-solana/tests/fixtures/:
  • jupiter_swap/: Real mainnet Jupiter aggregator swap
    • WSOL → USELESS token swap
    • 25 accounts including Whirlpool DEX integration
    • Transaction signature: 441ttot8CzpgsiRHvAHnNTCBwbSnPuhuy43pCjzZU9BKwBuJeW8f4TMU7FYLeqBst6WJeMEHprdQxr4thxqZSxRs
  • token_2022/: Token-2022 program transactions
    • SPL Token-2022 (Token Extensions) operations

Sui fixtures

Located in src/chain_parsers/visualsign-sui/src/presets/:
  • cetus/: Concentrated liquidity DEX operations
    • Swaps (A→B, B→A, with/without partner fees)
    • Liquidity provision at specific price ranges
  • coin_transfer/: Native SUI transfer operations
  • momentum/: Liquidity protocol operations
    • Position management (open, close, add, remove)
    • Fee and reward collection
  • sui_native_staking/: Native staking operations
    • Stake and unstake SUI with validators
  • suilend/: Lending protocol operations
    • Borrow, deposit, repay operations
    • Collateral token management
    • Staking and unstaking

Development workflow

1. Testing new parsers

When developing a new parser or modifying existing ones:

2. Debugging complex transactions

For complex DeFi transactions with nested operations:

3. Validating hardware wallet display

Ensure your parser output works well on constrained devices:

Output formats

Human format

Best for development and debugging. Shows hierarchical structure with indentation and Unicode box drawing characters.

JSON format

Machine-readable format following the VisualSign JSON schema. Use with jq for analysis:

Developer options

Signed transaction support

The CLI enables allow_signed_transactions by default, which allows parsing already-signed transactions by extracting the unsigned portion. This is useful for development and debugging — you can paste transactions directly from block explorers. Important: The production gRPC API does not enable this option. Production wallets should only parse unsigned transactions to ensure users are signing exactly what they see.
When allow_signed_transactions is enabled:
  • Signed transactions are accepted and the unsigned portion is extracted
  • The visualization shows what the user originally approved
  • Useful for debugging and verifying production transactions

Best practices

  1. Always test with real transactions: Use mainnet transactions from block explorers
  2. Verify both views: Check both expanded and condensed layouts
  3. Test edge cases: Large numbers, special characters, long addresses
  4. Validate against hardware: Ensure condensed view fits actual device constraints
  5. Document complex logic: Add comments for protocol-specific parsing

Common issues and solutions

Issue: Transaction parsing fails

Solution: Verify the hex encoding and chain type match

Issue: Output too verbose for hardware wallet

Solution: Adjust the condensed view to show only critical fields

Issue: Missing protocol details

Solution: Add protocol-specific presets to decode contract calls

Next steps