Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 16 additions & 30 deletions docs/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,60 +7,55 @@ description: Test your DApp's transactions with the VisualSign parser CLI

- Rust development environment
- A raw transaction hex from your DApp

## Install the parser CLI

```bash
# Clone the repository
git clone https://github.com/anchorageoss/visualsign-parser.git
cd visualsign-parser/src

# Build the CLI
cargo build --release

# The binary is at target/release/parser_cli
```
- Clone the repository and navigate to the proper directory for following commands within the guide:
```bash
git clone https://github.com/anchorageoss/visualsign-parser.git
cd visualsign-parser/src
```

## Parse your first transaction

Run the parser with a transaction from your DApp:

```bash
./target/release/parser_cli --chain ethereum -t <your_transaction_hex> --output human
cargo run --bin parser_cli -- --chain ethereum -t <your_transaction_hex> --output human
```

Replace `ethereum` with your chain (`solana`, `sui`, or `tron`) and `<your_transaction_hex>` with your actual transaction data.

### Example: Ethereum Transfer

```bash
./target/release/parser_cli --chain ethereum -t 0xf86c808504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a0 --output human
cargo run --bin parser_cli -- --chain ethereum -t 0xf86c808504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a028ef61340bd939bc2195fe537567866003e1a15d3c71ff63e1590620aa636276a067cbe9d8997f761aecb703304b3800ccf555c9f3dc64214b297fb1966a3b6d83 --output human
```

Output:
```
β”Œβ”€ Transaction: Ethereum Transaction
β”‚ Version: 0
β”‚ Type: EthereumTx
β”‚
└─ Fields:
β”œβ”€ Network: Ethereum Mainnet
β”œβ”€ To: 0x3535353535353535353535353535353535353535
β”œβ”€ Value: 1 ETH
└─ Gas Limit: 21000
β”œβ”€ Gas Limit: 21000
β”œβ”€ Gas Price: 20 gwei
└─ Nonce: 0
```

### Example: Solana Transaction

```bash
./target/release/parser_cli --chain solana -t AgAAAAAAAA... --output human
cargo run --bin parser_cli -- --chain solana -t AgAAAAAAAA... --output human
```

## Test hardware wallet view

Users on hardware wallets see a condensed view. Test what they'll see:

```bash
./target/release/parser_cli --chain ethereum -t <tx_hex> --output human --condensed-only
cargo run --bin parser_cli -- --chain ethereum -t <tx_hex> --output human --condensed-only
```

This shows only the essential information that fits on small screens.
Expand All @@ -70,28 +65,19 @@ This shows only the essential information that fits on small screens.
For programmatic analysis or integration testing:

```bash
./target/release/parser_cli --chain ethereum -t <tx_hex> --output json
cargo run --bin parser_cli -- --chain ethereum -t <tx_hex> --output json
```

Use `jq` to extract specific fields:

```bash
# Get all field labels
./target/release/parser_cli --chain ethereum -t <tx_hex> --output json | jq -r '.Fields[].Label'
cargo run --bin parser_cli -- --chain ethereum -t <tx_hex> --output json | jq -r '.Fields[].Label'

# Get the transaction title
./target/release/parser_cli --chain ethereum -t <tx_hex> --output json | jq -r '.Title'
cargo run --bin parser_cli -- --chain ethereum -t <tx_hex> --output json | jq -r '.Title'
```

## What to check

When reviewing your transaction's visualization:

1. **Accuracy** - Do amounts, addresses, and parameters match your transaction?
2. **Clarity** - Can a non-technical user understand what will happen?
3. **Completeness** - Are all important details visible?
4. **Condensed view** - Does the hardware wallet view show critical information?

## Common issues

### Transaction fails to parse
Expand Down