Skip to content

pantherfoundation/escrow

Repository files navigation

DataEscrow CLI Decryption Tool

A secure and user-friendly command-line interface for decrypting data stored in the DataEscrow system.

Overview

The DataEscrow CLI Decryption Tool provides decryption capabilities for three escrow types:

  • DAO Escrow
  • Zone Escrow
  • Safe Escrow

It offers robust security features, optimized performance, and a straightforward user experience.

Key Features

  • Secure decryption for all escrow types
  • Transaction data parsing and validation
  • Ephemeral key management
  • HMAC verification
  • Comprehensive error handling and logging
  • Docker container for easy deployment

Getting Started

Basic Usage

For DAO Escrow:

bun run decrypt:escrow \
  --txHash=0x1234...abcd \
  --escrowType=dao \
  --escrowPrivateKey=0x1234...abcd \
  --network=polygon \
  --outputFile=out/dao.json

For Safe Escrow (requires ephemeral public key):

bun run decrypt:escrow \
  --txHash=0x1234...abcd \
  --escrowType=safe \
  --escrowPrivateKey=0x1234...abcd \
  --network=amoy \
  --outputFile=out/safe.json \
  --ephemeralPublicKeyX=123...789

Command Options

  • --txHash: Transaction hash (required)
  • --escrowType: Type of escrow (dao | safe | zone)
  • --escrowPrivateKey: Private key for decryption
  • --network: Network to use (amoy | polygon)
  • --outputFile: Path for the decrypted output
  • --ephemeralPublicKeyX: Required for safe escrow type

Decryption Process

The tool follows a secure decryption workflow:

  1. Parse and validate transaction data
  2. Extract escrow-specific encrypted messages
  3. Compute shared keys using ephemeral keys
  4. Verify HMAC for data integrity
  5. Decrypt messages and format output

Detailed Usage Guide

Transaction Types

Currently supported transaction types:

  • Main transaction
  • SwapZAsset transaction

Escrow Types

Each escrow type has specific data handling:

  • DAO Escrow: Uses derived ephemeral keys
  • Zone Escrow: Uses derived ephemeral keys
  • Safe Escrow: Uses provided ephemeral public key

Advanced Features

  • Custom transaction data configuration
  • Verbose logging mode
  • Data integrity checks
  • Progress tracking for long operations

Development Status

Completed Features

  • Core transaction data parsing
  • Ephemeral key handling
  • HMAC verification
  • Basic CLI interface
  • reconstruct the transaction data
  • Docker support

Contributing

We welcome contributions! Please check our contribution guidelines before submitting issues or pull requests.

License

BUSL-1.1 - See LICENSE for details.

Support

Need help?

About

A secure and user-friendly command-line interface for decrypting data stored in the DataEscrow system.

Resources

Stars

Watchers

Forks

Contributors