Skip to content

kyle-anchorage/visualsign-parser

 
 

Repository files navigation

VisualSign Parser

Rust-based transaction parser that converts raw blockchain transactions into human-readable VisualSign payloads.

What is VisualSign?

VisualSign transforms opaque transaction data (hex strings, base64 blobs) into structured, human-readable JSON that describes what a transaction will do. See the full documentation. You can follow the Wallet Integration Guide that uses AWS Nitro Verifier Library and our minimal VisualSign TurnkeyClient to help you understand and bootstrap the security process.

Supported Chains

  • Ethereum (+ L2s: Arbitrum, Optimism, Base, Polygon)
  • Solana
  • Sui
  • Tron

You can follow the Chain Addition Guide to learn how to add a new chain. Often the basic chain addition can be done within a working day if you have a high quality Rust SDK but we're deploying a single binary at the moment and aren't focusing on expanding chains too broadly till we have some design patterns and deep DApp Frameworks for key chains implemented. If you are a blockchain that wants to be added, get in touch with Anchorage Digital team.

Architecture

flowchart TD
    subgraph API ["API Layer"]
        grpc["gRPC Server"]
    end

    subgraph Engine ["Parsing Engine"]
        router["Chain Router"]
        core["VisualSign Core"]
    end

    subgraph Chains ["Chain Parsers"]
        eth["Ethereum"]
        sol["Solana"]
        sui["Sui"]
        trn["Tron"]
    end

    grpc --> router
    router --> eth & sol & sui & trn
    eth & sol & sui & trn --> core
    core --> grpc
Loading

Quick Start

CLI

cargo run --bin parser_cli -- --chain ethereum -t '0xf86c...'

Output:

{
  "Version": "0",
  "Title": "Ethereum Transaction",
  "PayloadType": "EthereumTx",
  "Fields": [
    {"Label": "To", "FallbackText": "0x3535...", "Type": "address_v2", "AddressV2": {"Address": "0x3535..."}},
    {"Label": "Value", "FallbackText": "1 ETH", "Type": "amount_v2", "AmountV2": {"Amount": "1", "Abbreviation": "ETH"}}
  ]
}

gRPC Server

make -C src parser  # Starts server on port 44020
grpcurl -plaintext -d '{"unsigned_payload": "0x...", "chain": "CHAIN_ETHEREUM"}' \
  localhost:44020 parser.ParserService/Parse

Documentation

Full documentation at https://anchorageoss.github.io/visualsign-display:

Development

make -C src test    # Run tests
make -C src fmt     # Format code
make -C src lint    # Run clippy

Contributing

See CONTRIBUTING.md for development workflow and GOVERNANCE.md for project governance.

Security

Report vulnerabilities per SECURITY.md.

License

Apache 2.0

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 99.7%
  • Other 0.3%