PHPackages                             kompendium-llc/factom-php-client - 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. kompendium-llc/factom-php-client

ActiveLibrary[API Development](/categories/api)

kompendium-llc/factom-php-client
================================

client library to access Factom blockchain

1.0.0(6y ago)993MITPHPPHP &gt;=7.0.0

Since Jan 2Pushed 5y ago3 watchersCompare

[ Source](https://github.com/kompendium-llc/factom-php-client)[ Packagist](https://packagist.org/packages/kompendium-llc/factom-php-client)[ Docs](https://github.com/kompendium-llc/factom-php-client)[ RSS](/packages/kompendium-llc-factom-php-client/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (3)Used By (0)

PHP JSON-RPC client for Factom API
==================================

[](#php-json-rpc-client-for-factom-api)

[![Build Status](https://camo.githubusercontent.com/c5fa8dee9f8d77dd6edc9634c413b0f5dcd8567011cb93c18354910d3b7e9baa/68747470733a2f2f7472617669732d63692e636f6d2f6b6f6d70656e6469756d2d6c6c632f666163746f6d2d7068702d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/kompendium-llc/factom-php-client)[![Coverage Status](https://camo.githubusercontent.com/45094f7a0289badb21060cd3c127f3bbced18180/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f7a656e646672616d65776f726b2f7a656e642d636f64652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/kompendium-llc/factom-ruby-client?branch=master)[![Packagist Version](https://camo.githubusercontent.com/2314354a2cf2d403433622982fae4b87e3cb7a6f8977a00dcebd4fe851639c7d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6f6d70656e6469756d2d6c6c632f666163746f6d2d7068702d636c69656e74)](https://camo.githubusercontent.com/2314354a2cf2d403433622982fae4b87e3cb7a6f8977a00dcebd4fe851639c7d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6f6d70656e6469756d2d6c6c632f666163746f6d2d7068702d636c69656e74)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/kompendium-llc/factom-php/blob/master/LICENSE)

A JSON-RPC Php client for the Factom protocol. Each response has unique type that automatically converted from JSON response and suitable for further usage in business logic. All responses are available in [Response](https://github.com/kompendium-llc/factom-php-client/tree/master/src/Factom/Api/Responses) directory along with convinient converters.

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

[](#installation)

**Composer**:

```
composer require kompendium-llc/factom-php-client
```

**Git**:

```
git clone https://github.com/kompendium-llc/factom-php-client.git
```

Config
------

[](#config)

```
You can change default node url or ports
Add this lines after this -
require_once __DIR__ . '/../vendor/autoload.php';

// Set Custom host of node
define('walletHost', 'https://dev.factomd.net/v2');
define('host', 'https://dev.factomd.net/v2');
define('debugHost', 'http://localhost:8088/debug');

```

Usage
-----

[](#usage)

```
require_once __DIR__ . '/../vendor/autoload.php';;
require_once __DIR__.'/../vendor/kompendium/factom-api-php/config.php';

use Factom\Api\Blocks;
```

### Retreiving a balance

[](#retreiving-a-balance)

```
use Factom\Api\Factoid;
result = Factoid::factoidBalance("EC2dTBH2Nc9t9Y7RFD3FYMN5ottoPeHdk6xqUWEc6eHVoBPj6CmH");
print_r(result);
```

### Reading Entry Data

[](#reading-entry-data)

```
# factomd -> entry api
use Factom\Api\Entry;
result = Entry::entry("61b3d3175f211f3b23b455bb8710fdbcf545cb40da397d9e20b26eca31c389a6");
print_r(result);
```

### Writing an Entry

[](#writing-an-entry)

*Note: Ensure data in the entry fields is hex-encoded. This includes the content section.*

```
use Factom\Api\Entry;
$composeEntry = Entry::composeEntry("48e0c94d00bf14d89ab10044075a370e1f55bcb28b2ff16206d865e192827645","EC2DKSYyRcNWf7RS963VFYgMExo1824HVeCfQ9PGPmNzwrcmgm2r");
print_r($composeEntry);

use Factom\Api\Commits;
$commitEntry = Commits::commitEntry("00015507C1024BF5C956749FC3EBA4ACC60FD485FB100E601070A44FCCE54FF358D60669854734013B6A27BCCEB6A42D62A3A8D02A6F0D73653215771DE243A63AC048A18B59DA29F4CBD953E6EBE684D693FDCA270CE231783E8ECC62D630F983CD59E559C6253F84D1F54C8E8D8665D493F7B4A4C1864751E3CDEC885A64C2144E0938BF648A00");
print_r($commitEntry);

use Factom\Api\Entry;
$revealEntry = Entry::revealEntry("007E18CCC911F057FB111C7570778F6FDC51E189F35A6E6DA683EC2A264443531F000E0005746573745A0005746573745A48656C6C6F20466163746F6D21");
print_r($revealEntry);
```

### Block Height and Current Minute

[](#block-height-and-current-minute)

```
# factomd -> Get Height
use Factom\Api\FactomWalletd;
$getheight = FactomWalletd::getHeight();
print_r($getheight);

# factomd -> current minute
use Factom\Api\Minute;
$currentMinute = Minute::currentMinute();
print_r($currentMinute);
```

### Sending A Transaction

[](#sending-a-transaction)

```
# send transaction
use Factom\Api\Transaction;
$data = [
    "txname" => "test1234",
    "inputAddress" => "FA2jK2HcLnRdS94dEcU27rF3meoJfpUcZPSinpb7AwQvPRY6RL1Q",
    "inputAmount" => 1000012000,
    "outputAddress" => "FA2yeHMMJR6rpjRYGe3Q4ogThHUmByk3WLhTjQDvPrxDoTYF8BbC",
    "outputAmount" => 1000000000
];
$transaction = Transaction::sendTransaction($data);
print_r($transaction);
```

Testing
-------

[](#testing)

```
$ php tests/blocks.php
$ php tests/chains.php
$ php tests/commits.php
$ php tests/debug.php
$ php tests/entry.php
$ php tests/factoid.php
$ php tests/factomaddress.php
$ php tests/factomd.php
$ php tests/factomwalletd.php
$ php tests/minute.php
$ php tests/pending.php
$ php tests/security.php
$ php tests/transaction.php
```

Additionally, tests are executed by Travis CI with config pointing at Factom's Open Node ().

### Examples

[](#examples)

Found in the [examples](%22examples/Readme.md%22) folder

Support
-------

[](#support)

Additional support for the Factom Protocol or library usage can be found on [discord](https://discord.gg/mYmcQM2)

Development
-----------

[](#development)

To contribute to the `factom-php-client` library, clone the repository, create a feature branch and submit a PRfor review.

Learn
-----

[](#learn)

- [Accessing the Factom blockchain from different programming languages](https://medium.com/kompendium-developments/accessing-factom-blockchain-from-different-programming-languages-7f09030efe16)
- [Building simple blockchain game with Factom](https://medium.com/kompendium-developments/accessing-factom-blockchain-from-different-programming-languages-7f09030efe16)

Contributions
-------------

[](#contributions)

The Library developed by Kompendium, LLC in partnership with Kelecorix, Inc and Sergey Bushnyak for the good of the Factom community. While we see the usage of the libraries over the months, the Factom community decided not to support this work in the form of a grant either upfront or as backpay on multiple occasions ([1](https://factomize.com/forums/threads/kompendium-12-back-pay-two-factom-community-sdks-client-libraries-php-ruby.4802/), [2](https://factomize.com/forums/threads/kompendium-12-back-pay-ruby-haskell-client-libraries-for-the-factom-blockchain.2740/), [3](https://factomize.com/forums/threads/back-pay-development-of-4-json-rpc-client-libraries-to-the-factom-community.2513/))

If you're an active user or find it useful we strongly encourage you to support our efforts and ensure long maintenance by contributing a small donation to one of the following cryptocurrency addresses:

BTC: 39oVXpsgsyW8ZgzsnX3sV7HLdtXWfT96qN
ETH: 0x9cDBA6bb44772259B3A3fb89cf233A147a720f34
FCT: FA38cwer93mmPw1HxjScLmK1yF9iJTu5P87T2vdkbuLovm2YXyss

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.4% 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

Unknown

Total

1

Last Release

2301d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1771634?v=4)[Sergey B](/maintainers/sigrlami)[@sigrlami](https://github.com/sigrlami)

---

Top Contributors

[![sigrlami](https://avatars.githubusercontent.com/u/1771634?v=4)](https://github.com/sigrlami "sigrlami (28 commits)")[![MohitMaliFtechiz](https://avatars.githubusercontent.com/u/34593983?v=4)](https://github.com/MohitMaliFtechiz "MohitMaliFtechiz (5 commits)")[![mberry](https://avatars.githubusercontent.com/u/17392435?v=4)](https://github.com/mberry "mberry (1 commits)")

---

Tags

factomfactom-blockchainfactom-protocoljson-rpc-clientphpphpapifactomfactomdfactom-walletdpegnet

### Embed Badge

![Health badge](/badges/kompendium-llc-factom-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/kompendium-llc-factom-php-client/health.svg)](https://phpackages.com/packages/kompendium-llc-factom-php-client)
```

###  Alternatives

[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)

PHPackages © 2026

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