PHPackages                             io-digital/a-block-php - 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. io-digital/a-block-php

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

io-digital/a-block-php
======================

Composer package for the a-block-chain

0.1.0(2y ago)01.4k↓40.6%1MITPHPPHP ^8.2

Since Jan 31Pushed 2y ago1 watchersCompare

[ Source](https://github.com/io-digital/a-block-php)[ Packagist](https://packagist.org/packages/io-digital/a-block-php)[ RSS](/packages/io-digital-a-block-php/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (6)Dependencies (2)Versions (9)Used By (1)

a-block-php
===========

[](#a-block-php)

Composer package for direct communication with A-Block's API

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

[](#requirements)

- PHP &gt;= 8.2
- composer

Features
--------

[](#features)

- Create wallets
- Create addresses/keypairs for wallets
- Create item assets (A-Block's equivalent to NFTs) related to keypairs
- Transfer assets (Items or Tokens) to another address
- Initiate and complete Dual Double Entry (DDE) using a DRUID to trade assets between addresses

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

[](#installation)

- Simply run `composer require io-digital/a-block-php`
- Include `IODigital\ABlockPHP\ABlockClient` in your PHP code and you're ready to go
- Instantiate the above client with `

A note on Data Transfer Objects (DTOs)
--------------------------------------

[](#a-note-on-data-transfer-objects-dtos)

This package makes use of PHP's typing of function definitions to increase robustness. Many of the client's functions require a Data Transfer Object (DTO) to be passed as input and some return a DTO. Some usage examples below will illustrate this.

It may seem cumbersome at first but it helps ensure that the data we send to the A-Block API is formatted correctly.

Usage Examples
--------------

[](#usage-examples)

These are listed in an order that you could follow to do most of the things this package allows you, as one may in the real world.

### Instantiating the client

[](#instantiating-the-client)

```
$client = new ABlockClient(
    computeHost: 'http://your-compute-host',
    intercomHost: 'http://your-intercom-host'
);

$client->setPassPhrase('my very intricate passphrase');

```

A pass phrase (text string) is used to encrypt and decrypt data in any typical cryptography implementation and this setup is no different.

Please ensure that you run `$client->setPassPhrase('my very intricate passphrase');` before attempting any interaction with the client.

### Creating a new wallet

[](#creating-a-new-wallet)

Creates and returns a new wallet. It is up to the developer to store this.

```
$encryptedWalletDTO = $client->createWallet();

```

### Opening an encrypted wallet

[](#opening-an-encrypted-wallet)

```
$walletIsOpen = $client->openWallet(
    wallet: $encryptedWalletDTO
);

```

### Create a new Address/Keypair for the opened wallet

[](#create-a-new-addresskeypair-for-the-opened-wallet)

```
$encryptedKeypairDTO = $client->createKeypair();

```

### Fetch opened wallet balance

[](#fetch-opened-wallet-balance)

```
$balance = $client->fetchBalance(
    addressList: [$encryptedKeypairDTO->getAddress()]
);

```

### Create an Item Asset at a specified address

[](#create-an-item-asset-at-a-specified-address)

```
$itemAssetArr = $client->createAsset(
    name: 'Some friendly identifier',
    encryptedKey: $encryptedKeypairDTO->getAddress(),
    nonce: $encryptedKeypairDTO->getNonce(),
    amount: 100,
    defaultDrsTxHash: false, // make true to create generic items
    metaData: [
        'foo' => 'bar'
    ]
);

```

Please note that this newly created asset will only reflect in a `fetchBalance` enquiry once it has been verified by A-Block's compute node.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

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 ~1 days

Total

6

Last Release

867d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0acb24b4d76853e47a3ad42fba61d9c623a7e0ea4d38e52ac134dd953174529b?d=identicon)[io-digital](/maintainers/io-digital)

---

Top Contributors

[![rianzietsman](https://avatars.githubusercontent.com/u/140623410?v=4)](https://github.com/rianzietsman "rianzietsman (22 commits)")

---

Tags

blockchainablock

### Embed Badge

![Health badge](/badges/io-digital-a-block-php/health.svg)

```
[![Health](https://phpackages.com/badges/io-digital-a-block-php/health.svg)](https://phpackages.com/packages/io-digital-a-block-php)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

749284.3k35](/packages/civicrm-civicrm-core)[roundcube/roundcubemail

The Roundcube Webmail suite

7.0k1.4k3](/packages/roundcube-roundcubemail)[spatie/laravel-export

Create a static site bundle from a Laravel app

672139.5k6](/packages/spatie-laravel-export)[nfse-nacional/nfse-php

This is my package nfse

1523.1k](/packages/nfse-nacional-nfse-php)

PHPackages © 2026

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