PHPackages                             php-core/simple-crypto - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. php-core/simple-crypto

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

php-core/simple-crypto
======================

Simple PHP Cryptocurrency and Blockchain Helper Library

v0.0.1(8mo ago)0840MITPHPPHP &gt;=8.3

Since Oct 16Pushed 8mo agoCompare

[ Source](https://github.com/php-core/simple-crypto)[ Packagist](https://packagist.org/packages/php-core/simple-crypto)[ RSS](/packages/php-core-simple-crypto/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

Simple Crypto PHP
=================

[](#simple-crypto-php)

A simple and efficient PHP library for cryptocurrency wallet generation and management. Generate addresses for Bitcoin, Ethereum, and all EVM-compatible chains (Polygon, BSC, etc.) using standard BIP protocols.

Features
--------

[](#features)

- **Multiple Chain Support**:

    - Bitcoin (BTC)
        - Legacy addresses (1...)
        - SegWit addresses (3...)
        - Native SegWit addresses (bc1...)
    - All EVM-compatible chains:
        - Ethereum (ETH)
        - Polygon (MATIC)
        - Binance Smart Chain (BSC)
        - Avalanche (AVAX)
        - And any other EVM chain
- **Standards Compliance**:

    - BIP32 (Hierarchical Deterministic Wallets)
    - BIP39 (Mnemonic Phrases)
    - BIP44 (Multi-Account Hierarchy)
    - BIP84 (Native SegWit)
- **Security Features**:

    - Message signing and verification
    - Hardened derivation support
    - Secure key generation

Requirements
------------

[](#requirements)

- PHP 8.3+
- GMP extension
- Sodium extension
- MBString extension

Installation
------------

[](#installation)

```
composer require php-core/simple-crypto
```

Quick Start
-----------

[](#quick-start)

### Generate Multi-Chain Addresses

[](#generate-multi-chain-addresses)

```
use PHPCore\SimpleCrypto\Wallet\Mnemonic\BIP39Mnemonic;
use PHPCore\SimpleCrypto\Wallet\KeyPair\BTCKeyPair;
use PHPCore\SimpleCrypto\Wallet\KeyPair\EVMKeyPair;

// Create or import a mnemonic
$mnemonic = new BIP39Mnemonic();
$phrase = $mnemonic->generate(12);
$seed = $mnemonic->toSeed($phrase);

// Create master key pairs
$btcMaster = BTCKeyPair::fromSeed($seed);
$evmMaster = EVMKeyPair::fromSeed($seed);

// Generate Bitcoin addresses
$btcPath = "m/84'/0'/0'/0/0"; // BIP84 for native SegWit
$btcAccount = $btcMaster->derivePath($btcPath);

echo "Bitcoin Legacy: " . $btcAccount->getAddress('legacy') . "\n";
echo "Bitcoin SegWit: " . $btcAccount->getAddress('segwit') . "\n";
echo "Bitcoin Native SegWit: " . $btcAccount->getAddress('native_segwit') . "\n";

// Generate EVM address (works for ETH, MATIC, BSC, etc.)
$evmPath = "m/44'/60'/0'/0/0"; // BIP44 for Ethereum
$evmAccount = $evmMaster->derivePath($evmPath);
echo "EVM Address: " . $evmAccount->getAddress() . "\n";
```

### Generate Multiple Addresses

[](#generate-multiple-addresses)

```
// Generate multiple Bitcoin addresses
for ($i = 0; $i < 5; $i++) {
    $path = "m/84'/0'/0'/0/{$i}";
    $account = $btcMaster->derivePath($path);
    echo "Address #{$i}: " . $account->getAddress('native_segwit') . "\n";
}

// Generate multiple EVM addresses
for ($i = 0; $i < 5; $i++) {
    $path = "m/44'/60'/0'/0/{$i}";
    $account = $evmMaster->derivePath($path);
    echo "Address #{$i}: " . $account->getAddress() . "\n";
}
```

### Sign and Verify Messages

[](#sign-and-verify-messages)

```
// Bitcoin message signing
$btcAccount = BTCKeyPair::fromSeed($seed);
$message = "Hello, Bitcoin!";
$signature = $btcAccount->sign($message);
$isValid = $btcAccount->verify($message, $signature);

// EVM message signing
$evmAccount = EVMKeyPair::fromSeed($seed);
$message = "Hello, Ethereum!";
$signature = $evmAccount->sign($message);
$isValid = $evmAccount->verify($message, $signature);
```

Advanced Usage
--------------

[](#advanced-usage)

### Custom Derivation Paths

[](#custom-derivation-paths)

```
// Bitcoin paths
$legacyPath = "m/44'/0'/0'/0/0";     // BIP44 legacy
$segwitPath = "m/49'/0'/0'/0/0";      // BIP49 SegWit
$nativePath = "m/84'/0'/0'/0/0";      // BIP84 Native SegWit

// EVM paths
$standardPath = "m/44'/60'/0'/0/0";   // Standard Ethereum
$ledgerPath = "m/44'/60'/0'";         // Ledger Live
$customPath = "m/44'/60'/1'/0/0";     // Custom account
```

### Working with Private Keys

[](#working-with-private-keys)

```
$account = EVMKeyPair::fromSeed($seed);

// Get private key (for import into wallets)
$privateKey = $account->getPrivateKey();

// Get public key
$publicKey = $account->getPublicKey();

// Get compressed public key
$compressedPubKey = $account->getCompressedPublicKey();
```

Security Considerations
-----------------------

[](#security-considerations)

1. **Mnemonic Phrases**:

    - Store securely
    - Never share with anyone
    - Enables recovery of all derived addresses
2. **Private Keys**:

    - Keep offline when possible
    - Use hardware wallets for large amounts
    - Each address has its own private key
3. **Testing**:

    - Use testnet addresses during development
    - Verify addresses before sending real funds

Contributing
------------

[](#contributing)

1. Fork the repository
2. Create your feature branch
3. Run tests: `composer test`
4. Submit a pull request

License
-------

[](#license)

MIT License. See LICENSE file for details.

Credits
-------

[](#credits)

Developed by PHPCore Team.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance59

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

260d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/103283996?v=4)[PHP Core](/maintainers/php-core)[@php-core](https://github.com/php-core)

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/php-core-simple-crypto/health.svg)

```
[![Health](https://phpackages.com/badges/php-core-simple-crypto/health.svg)](https://phpackages.com/packages/php-core-simple-crypto)
```

###  Alternatives

[ramsey/uuid

A PHP library for generating and working with universally unique identifiers (UUIDs).

12.6k745.0M4.0k](/packages/ramsey-uuid)[brick/money

Money and currency library

1.9k41.8M157](/packages/brick-money)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

378604.0k104](/packages/flow-php-etl)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.4k](/packages/blair2004-nexopos)[julien-boudry/condorcet

Complete election manager, providing natively many voting methods including: Condorcet / Borda (+ Nauru variant) / Copeland / Dodgson (2 Approximations) / FTPT / Instant-runoff (alternative vote) / Kemeny–Young / Minimax (+ variants) / Ranked Pairs (+ variants) / Schulze (+ variants), Single Transferable Vote (STV) / Comparison of Pairs of Outcomes by the Single Transferable Vote (CPO-STV)

13110.0k2](/packages/julien-boudry-condorcet)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
