Skip to main content
Embed VisualSign parsing directly in your application without network calls. The parser is available as Rust crates that can be compiled into your application.

When to use library integration

Library integration is ideal when:
  • You’re building a Rust application (CLI tool, backend service)
  • Parsing should happen without external service dependencies
  • Network latency is unacceptable
  • You want the smallest deployment footprint

Trade-offs

Rust integration

Dependencies

Add the required crates to your Cargo.toml. The parser_app crate provides the full parser registry with all chain support:

Basic usage

Working with the SignablePayload

The parser returns a SignablePayload containing structured fields:

Supported chains

The registry includes parsers for:
  • Ethereum — Mainnet and L2s (Arbitrum, Optimism, Base, Polygon)
  • Solana — With IDL support for program parsing
  • Sui — Move-based transactions
  • Tron — TRX transfers and Stake 2.0 resource staking
Use the Chain enum to specify which parser to use:

Adding custom ABIs (Ethereum)

For Ethereum transactions, you can provide custom ABIs to improve parsing of unrecognized contracts:

Adding custom IDLs (Solana)

For Solana transactions, provide Anchor IDLs to parse program instructions:

Testing your integration

Use the CLI to verify expected output before integrating:
Compare the CLI’s JSON output with your integration to ensure consistent parsing.

Complete example

A working example that demonstrates library integration is available in the repository: Run it with:

Next steps