PHPackages                             appino/blockchain - 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. [API Development](/categories/api)
4. /
5. appino/blockchain

ActiveLibrary[API Development](/categories/api)

appino/blockchain
=================

Blockchain API client library

v1.4.1(5y ago)19MITPHPPHP ^7.1

Since Oct 16Pushed 5y ago1 watchersCompare

[ Source](https://github.com/appino/blockchain)[ Packagist](https://packagist.org/packages/appino/blockchain)[ Docs](https://github.com/appino/blockchain)[ RSS](/packages/appino-blockchain/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (2)Versions (12)Used By (0)

Blockchain v1 API
=================

[](#blockchain-v1-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1d1c04c97a44611c2ceaed4d60b5b49b9adafa09ce511d4172efadb1c7c709bc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617070696e6f2f626c6f636b636861696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/appino/blockchain)[![Quality Score](https://camo.githubusercontent.com/080c6ea497d89bf3feb41117e380849ea8341d514f0a5d41482e7c9b4db3960b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f617070696e6f2f626c6f636b636861696e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/appino/blockchain)[![Total Downloads](https://camo.githubusercontent.com/e2eed1e35ab068ffc0c833314997f8c009a9eb6942b2785eb76449fe3f2d380f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617070696e6f2f626c6f636b636861696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/appino/blockchain)

An unofficial PHP library for interacting with the blockchain.info API.

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

[](#installation)

In order to use this package you must provide an URL to an instance of service-my-wallet-v3. Before using these functionalities.[service-my-wallet-v3](https://github.com/blockchain/service-my-wallet-v3).

You can install the package via composer:

```
composer require appino/blockchain
```

### Add provider to app config

[](#add-provider-to-app-config)

```
Appino\Blockchain\BlockchainServiceProvider::class
```

### Publish Configuration File

[](#publish-configuration-file)

```
php artisan vendor:publish --provider="Appino\blockchain\BlockchainServiceProvider"
```

### Add 2 Lines to env File

[](#add-2-lines-to-env-file)

```
blockchain_api_code=123456789abcdefghijklmnop //you must get api code from blockchain.info
blockchain_base_url=http://localhost:3000
```

Usage
-----

[](#usage)

### Create

[](#create)

```
$blocchain = Blockchain::Create();
```

#### 1. Creating Wallet

[](#1-creating-wallet)

```
/**
 * @param string $password
 * @param string|null $email
 * @param string|null $label
 * @return WalletResponse
 * @throws ParameterError
 */
$blockchain->create($password, $email, $label);
```

#### 2. Creating Wallet with specific private key

[](#2-creating-wallet-with-specific-private-key)

```
/**
 * @param string $password
 * @param string $privKey
 * @param string|null $email
 * @param string|null $label
 * @return WalletResponse
 * @throws ParameterError
 */
$blockchain->createWithKey($password, $privKey, $email, $label);
```

### Wallet

[](#wallet)

```
$blockchain = Blockchain::Wallet();
$blockchain->credentials($guid, $password);
```

#### 1. Create new Address

[](#1-create-new-address)

```
/**
 * @param null|string $label
 * @return AccountResponse
 */
$blockchain->CreateAddress($label));
```

#### 2. Balance

[](#2-balance)

```
/**
 * @return int in satoshi
 */
$blockchain->balnce();
```

#### 3. Address Balance

[](#3-address-balance)

```
/**
 * @param int|string $param can be index of address in wallet or address
 * @return int in satoshi
 */
$blockchain->AddressBallance($param);
```

#### 4. Active Addresses

[](#4-active-addresses)

Return list of addresses of a Wallet

```
/**
 * @return array
 */
$blockchain->ActiveAddresses();
```

#### 5. List of Xpubs

[](#5-list-of-xpubs)

Return list of xpub

```
/**
 * @return array
 */
$blockchain->XpubList();
```

#### 6. Single Address Data

[](#6-single-address-data)

Return Single Address Data

```
/**
 * @param int|string $param can be index of address in wallet or address
 * @return AccountResponse
 */
$blockchain->SingleAddress($param);
```

#### 7. Get Receiving Address

[](#7-get-receiving-address)

Return Receiving Address

```
/**
 * @param int|string $param can be index of address in wallet or address
 * @return string
 */
$blockchain->ReceivingAddress($param);
```

#### 8. Archive Address

[](#8-archive-address)

```
/**
 * @param int|string $param can be index of address in wallet or address
 * @return AccountResponse
 */
$blockchain->ArchiveAddress($param);
```

#### 9. UnArchive Address

[](#9-unarchive-address)

```
/**
 * @param int|string $param can be index of address in wallet or address
 * @return AccountResponse
 */
$blockchain->UnArchiveAddress($param);
```

#### 10. Send Payment

[](#10-send-payment)

```
/**
 * @param string $to bitcoin address that you want to send payment to
 * @param integer $amount amount of payment you want to send in satoshi
 * @param integer|string|null $from xpub address or index of account that you want to send payment from
 * @param int|null $fee
 * @param int|null $fee_per_byte
 * @return PaymentResponse
 * @throws ParameterError
 */
$blockchain->SendPayment($to, $amount, $from, $fee, $fee_per_byte);
```

#### 11. Send Many Payment

[](#11-send-many-payment)

```
/**
 * @param array $recipients recipients must be an array of address as key and satoshi as integer
 * @param integer|string|null $from xpub address or index of account that you want to send payment from
 * @param integer|null $fee must be in satoshi (better to set null or use fee_per_byte)
 * @param integer|null $fee_per_byte must be in satoshi
 * @return PaymentResponse
 * @throws ParameterError
 */
$blockchain->SendManyPayment($recipients, $from=null, $fee=null, $fee_per_byte = null);
```

### Receive

[](#receive)

```
$blocchain = Blockchain::Receive();
```

#### 1. Generate Receiving Address

[](#1-generate-receiving-address)

```
/**
 * @param string $xpub The public key.
 * @param string $callback The callback URL.
 * @param int $gap_limit How many unused addresses are allowed.
 * @return ReceiveResponse
 */
 $blockchain->Generate($xpub, $callback, $gap_limit = 20);
```

#### 2. Get Address Gap

[](#2-get-address-gap)

```
/**
 * @param $xpub string
 * @return int
 * @throws \GuzzleHttp\Exception\GuzzleException
 */
 $blockchain->AddressGap($xpub);
```

#### 3. Balance Notification

[](#3-balance-notification)

```
/**
 * @param string $address
 * @param string $callback callback url
 * @param Notification|string $on what to do after notification called
 * @param int $confs how many confiramtion need to send notification
 * @param Operation|string $op on Receive/Send/All notification will send
 * @return NotificationResponse
 */
 $blockchain->BalanceNotification($address, $callback, $on, $confs, $op);
```

for deleting the notification use:

```
/**
 * @param $id int
 * @return bool
 * @throws \GuzzleHttp\Exception\GuzzleException
 */
 $blockchain->DeleteBalanceNotification($id);
```

#### 4. Block Notification

[](#4-block-notification)

```
/**
 * @param string $callback callback url
 * @param Notification|string $on what to do after notification called
 * @param int $confs how many confiramtion need to send notification
 * @param int|null $height height of block default(currentblock height  plus 1)
 * @return NotificationResponse
 * @throws \GuzzleHttp\Exception\GuzzleException
 */
 $blockchain->BlockNotification($callback, $on, $confs, $height);
```

for deleting the notification use:

```
/**
 * @param int $id
 * @return bool
 * @throws \GuzzleHttp\Exception\GuzzleException
 */
 $blockchain->DeleteBlockNotification($id);
```

#### 5. Get CallBack Logs

[](#5-get-callback-logs)

```
/**
 * @param string $callback callback url
 * @return array
 * @throws \GuzzleHttp\Exception\GuzzleException
 */
 $blockchain->CallbackLogs($callback);
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Pouya Biglari](https://github.com/appino)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Every ~3 days

Total

11

Last Release

2097d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fad338e9d808b410c6f94d03d8068869fa8d62ba79f862a20d5fe6c010bc2e5e?d=identicon)[appino](/maintainers/appino)

---

Top Contributors

[![cryptommer](https://avatars.githubusercontent.com/u/16734033?v=4)](https://github.com/cryptommer "cryptommer (34 commits)")

---

Tags

cryptocurrencyblockchainappinoblockchian.info

### Embed Badge

![Health badge](/badges/appino-blockchain/health.svg)

```
[![Health](https://phpackages.com/badges/appino-blockchain/health.svg)](https://phpackages.com/packages/appino-blockchain)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.7M3.4k](/packages/craftcms-cms)[illuminate/http

The Illuminate Http package.

11938.5M8.2k](/packages/illuminate-http)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5226.7k](/packages/simplestats-io-laravel-client)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1349.3k1](/packages/jasara-php-amzn-selling-partner-api)

PHPackages © 2026

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