Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/andkom/php-bitcoin-wallet

A simple PHP library for reading Bitcoin wallet.dat file.
https://github.com/andkom/php-bitcoin-wallet

bitcoin bitcoin-protocol bitcoin-wallet php php-library

Last synced: 3 months ago
JSON representation

A simple PHP library for reading Bitcoin wallet.dat file.

Awesome Lists containing this project

README

        

## PHP Bitcoin Wallet

A simple PHP library for reading Bitcoin wallet.dat file.

### Installation

```bash
composer require andkom/php-bitcoin-wallet
```

### Usage

```PHP
read("/path/to/wallet.dat");

// check if wallet is encrypted
if ($wallet->isEncrypted()) {

// print wallet master key
echo $wallet->getMasterKey()->getEncryptedKey() . "\n";

// decrypt wallet
$wallet->decrypt("password");
}

// print stored keys
foreach ($wallet->getKeys() as $key) {
echo $key->getPrivateKey()->toWif() . " => " . $key->getPublicKey()->getAddress()->getAddress() . "\n";
}
```