PHPackages                             gryfoss/symfony-form-crypto-transaction-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. gryfoss/symfony-form-crypto-transaction-validator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

gryfoss/symfony-form-crypto-transaction-validator
=================================================

Cryptocurrency hash and transaction validator for Symfony Form.

v1.0.1(5mo ago)029MITPHPPHP ^8.2CI passing

Since Nov 10Pushed 5mo agoCompare

[ Source](https://github.com/GryfOSS/symfony-form-crypto-transaction-validator)[ Packagist](https://packagist.org/packages/gryfoss/symfony-form-crypto-transaction-validator)[ RSS](/packages/gryfoss-symfony-form-crypto-transaction-validator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (14)Versions (3)Used By (0)

Symfony Form Crypto Transaction Validator
=========================================

[](#symfony-form-crypto-transaction-validator)

[![Tests](https://github.com/GryfOSS/symfony-form-crypto-transaction-validator/workflows/Tests/badge.svg)](https://github.com/GryfOSS/symfony-form-crypto-transaction-validator/actions)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

A Symfony Form validation library for cryptocurrency addresses and transaction hashes. This library provides custom validation constraints to validate cryptocurrency addresses and verify transaction hashes against their respective blockchain networks.

📋 Purpose
---------

[](#-purpose)

This library enables Symfony applications to:

- **Validate cryptocurrency wallet addresses** with proper format checking
- **Verify transaction hashes** against real blockchain networks
- **Integrate seamlessly** with Symfony Form components
- **Support multiple cryptocurrencies** with a unified interface

Perfect for applications that need to validate user-provided cryptocurrency data, such as:

- Payment processors
- Cryptocurrency exchanges
- Wallet applications
- DeFi platforms

🪙 Supported Cryptocurrencies
----------------------------

[](#-supported-cryptocurrencies)

### Currently Supported

[](#currently-supported)

CryptocurrencyAddress ValidationTransaction ValidationNetwork Verification**Ethereum (ETH)**✅ Format + Checksum✅ Hash format + API✅ Etherscan API v2**Tron (TRX)**✅ Base58 + Validation✅ Hash format + API✅ TronGrid API### Address Validation Features

[](#address-validation-features)

- **Ethereum**: EIP-55 checksum validation, proper hex format, length validation
- **Tron**: Base58 encoding validation, checksum verification, proper format

### Transaction Validation Features

[](#transaction-validation-features)

- **Ethereum**: 0x-prefixed hex format, 66-character length, network existence check
- **Tron**: 64-character hex format, network existence verification

🚀 Future Plans
--------------

[](#-future-plans)

### Upcoming Cryptocurrency Support

[](#upcoming-cryptocurrency-support)

We plan to add support for more cryptocurrencies:

- **Bitcoin (BTC)** - Address validation and transaction verification
- **Litecoin (LTC)** - P2PKH, P2SH, and Bech32 address formats
- **Cardano (ADA)** - Byron and Shelley address formats
- **Polkadot (DOT)** - SS58 address format validation
- **Binance Smart Chain (BSC)** - Ethereum-compatible validation
- **Polygon (MATIC)** - Ethereum-compatible validation

### Technical Improvements

[](#technical-improvements)

- **HTTP Client Integration**: Replace `file_get_contents()` with proper HTTP client (Guzzle/Symfony HTTP Client) in Ethereum validator for:

    - Better error handling
    - Timeout configuration
    - Request/response middleware
    - Retry mechanisms
    - Connection pooling
- **Async Validation**: Support for asynchronous transaction verification
- **Caching Layer**: Add caching for API responses to reduce external calls
- **Rate Limiting**: Built-in rate limiting for API calls
- **Mock Providers**: Test-friendly mock implementations

📦 Installation
--------------

[](#-installation)

```
composer require gryfoss/symfony-form-crypto-transaction-validator
```

🛠️ Usage
--------

[](#️-usage)

### Basic Address Validation

[](#basic-address-validation)

```
