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
| Advantage | Consideration |
|---|---|
| No network latency | No attestation (trust your process) |
| Works offline | Larger binary size |
| Simpler deployment | Updates require app releases |
Rust integration
Dependencies
Add the required crates to yourCargo.toml. The parser_app crate provides the full parser registry with all chain support:
Basic usage
Working with the SignablePayload
The parser returns aSignablePayload 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
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:Complete example
A working example that demonstrates library integration is available in the repository: Run it with:Next steps
- Chain Metadata: Providing ABIs and IDLs for better parsing
- Error Handling: Handling parse failures gracefully
- Field Types: Understanding the SignablePayload schema