Zipwire Documentation
Visit Zipwire
  • 👋Welcome to Zipwire
  • Overview
    • 💡What is it?
    • 🙋‍♀️Who can use it?
    • ✨Our Features
    • 🚗Can I test drive it?
      • 📦Setting up Zipwire Approve
      • 📥Setting up Zipwire Collect
    • 🔑Logins & Invitations
    • 🐢Zipwire Collect: Rapid Onboarding, Effortless Compliance
    • 💾Data Ownership in Zipwire
  • Zipwire Approve
    • 🏅How Zipwire Approve is radically different and speeds up pay day
    • ⛔Why we don't track start and end times
    • 📦Unboxing key concepts
      • 📜Accounts
      • ⏲️Timesheets
      • 👷Senders
      • 🚦Approvers
      • 👑Processors
      • ⤵️Workflows
      • 🏷️Assignments
      • 📐Billing Plans
      • 💱Rate Plans
      • 📬Teams & Inboxes
      • 🏢Workplaces
      • 🛡️Clients
      • ✍️The Journal
      • 🤸Activities
      • 💸Payment Methods
    • 🔲Logical structure
    • 🛠️Set up your workplace
    • 🚥Processing stages
    • 💵Understanding invoicing
    • 🏷️Using assignments
      • 🏖️Holiday assignment
  • Zipwire Collect
    • 🗄️Effortless Document Collection for Any Need
    • 🟢Get Started
    • 😭IDSP, IDVT, KYC, KYB and AML
      • 🤳Selfie Checks Powered by Yoti
      • ⛓️Blockchain Attestations
    • 📄Using Packs
    • 🤖Machine Vision
      • 🤷Failure to Recognise
      • 🪪Document Types
    • ✍️Manual Entry for Streamlined Information Gathering
    • ✨Creating a Collection with AI
    • 👀What the Respondent Sees at Their End
    • ♻️Lifecycle of a Collection
    • 🚚Bulk Upload
    • 🔍Document Inspection
  • Fundamentals
    • 🛡️Security
      • 📲Authenticator mobile apps
      • 🔐Two factor in Zipwire
      • Wallet Connections
      • Sign-in with Ethereum
      • Attestations
        • The "IsAHuman" Attestation: Purpose and Limitations
        • Zipwire’s Master Attester Wallet Address and Public Key
      • Wallet Verification Guide
        • Introduction to Sleeper Wallets and Blockchain Legends
        • How Sleeper Wallets Are Created
        • Verifying Attested Wallets
        • The Market for Selling and Buying Attested Wallets
        • Holistic Evaluation of Ethereum Wallets
        • The Future of Attestations and Wallet Verification
        • Verifying Zipwire’s Merkle Root Attestations for Developers
      • Understanding Merkle Trees and Proofs
  • Use Cases
    • 🎭Identity Checks - Right to Work
    • 🪪Compliance - Know Your Customer
    • 🎨For Senders
      • 💬Sending journal updates via WhatsApp
      • 🤸‍♂️Naming activities
      • ✍️Tracking time in your Journal
      • ⏲️Send your first timesheet
    • 📱Tracking time via WhatsApp
    • 🖥️For Approvers
      • 💬Approving timesheets via WhatsApp
  • Troubleshooting
    • 🔀Tangled Identities
Powered by GitBook
On this page
  • Overview
  • Prerequisites
  • Verification Steps
  • 1. Obtain the User’s Merkle Proof Document
  • 2. Verify the Merkle Proof
  • 3. Validate Zipwire's Signature
  • 4. Check the Proof’s Date
  • 5. Cross-Verify the Attester
  • Best Practices
  • Why It Matters
  1. Fundamentals
  2. Security
  3. Wallet Verification Guide

Verifying Zipwire’s Merkle Root Attestations for Developers

PreviousThe Future of Attestations and Wallet VerificationNextUnderstanding Merkle Trees and Proofs

Last updated 4 days ago

Overview

Zipwire issues attestations to Ethereum wallets, including those with a Merkle root hash representing identity data (e.g., a passport). Developers can verify these attestations to ensure a wallet holder’s identity is trustworthy. This page guides you through validating a user-supplied, signed, and dated Merkle proof document to confirm it matches the attested Merkle root, check the signature, and assess the proof’s age.

Prerequisites

  • Familiarity with Ethereum, Merkle trees, and cryptographic signatures.

  • Access to Zipwire’s master attester details: Zipwire’s Master Attester Wallet Address and Public Key (./master-attester).

  • Tools: A blockchain explorer (e.g., EAS Scan: ) and a library for hash verification (e.g., Web3.js or ethers.js).

Verification Steps

To trust a Zipwire attestation with a Merkle root hash, follow these steps:

1. Obtain the User’s Merkle Proof Document

Ask the user to:

  • Sign in with Ethereum: Prompt the user to authenticate using their Ethereum wallet (e.g., via MetaMask) to prove they control the private key associated with the attested wallet address. This involves signing a message (e.g., a nonce or timestamp) using a standard like EIP-191 or EIP-712.

  • Provide the Merkle Proof Document: The user submits a Zipwire-signed, dated Merkle proof document, which includes:

    • Proof Data: The specific identity attribute (e.g., name or passport number), its hash, and intermediate hashes linking to the Merkle root.

    • Signature: A cryptographic signature from Zipwire (using its master attester key) verifying the proof’s authenticity.

    • Date: The issuance date of the proof to assess its freshness.

2. Verify the Merkle Proof

Ensure the proof’s hashes match the attested Merkle root:

  • Retrieve the Merkle root from the attestation on the Base blockchain using EAS Scan. Search for the user’s wallet address and locate the attestation issued by Zipwire’s master address (0x2651ef3d909828eff9a9bdd6454eb5f98b045e76).

  • Compute the hash of the provided attribute (e.g., SHA-256 of “Alice Smith”).

  • Use the intermediate hashes in the proof to reconstruct the Merkle root. Libraries like merkletreejs (JavaScript) can automate this.

  • Compare the reconstructed root with the on-chain Merkle root. A match confirms the attribute belongs to the attested dataset.

3. Validate Zipwire's Signature

  • Confirm the proof document’s authenticity:

    • Extract the public key from Zipwire’s signature using a library like ethers.js.

    • Verify the signature was created by Zipwire’s master attester address (0x2651ef3d909828eff9a9bdd6454eb5f98b045e76). For example, use ethers.verifyMessage(message, signature) to check the signed proof, ensuring it includes the proof data and date.

4. Check the Proof’s Date

Assess the proof’s age to ensure it’s recent:

  • Review the date in the proof document. A proof older than your application’s threshold (e.g., 30 days) may indicate a stale or compromised wallet.

  • Optionally, check the attestation’s timestamp on EAS Scan to confirm it aligns with the proof’s date.

5. Cross-Verify the Attester

Confirm the attestation comes from Zipwire:

  • Verify the attester’s address matches 0x2651ef3d909828eff9a9bdd6454eb5f98b045e76.

Best Practices

  • Security: Always validate signatures and hashes to prevent forged proofs.

  • Freshness: Set a maximum age for proofs (e.g., 7-30 days) based on your use case.

  • Error Handling: Gracefully handle invalid proofs or mismatches, prompting users to resubmit.

  • Privacy: Avoid storing sensitive proof data; verify and discard.

Why It Matters

Confirm the signature matches Zipwire’s public key, available at .

Cross-check details on Zipwire’s GitHub: .

By verifying Zipwire’s Merkle root attestations, developers can trust user identities without compromising privacy, enabling secure dApp interactions, bot prevention, and compliance. For broader verification strategies, see .

🛡️
https://base.easscan.org/
Zipwire’s GitHub
https://github.com/zipwireapp/zipwireapp/blob/master/PUBLICKEYS.md
Holistic Evaluation of Ethereum Wallets