PHPackages                             circularprotocol/circular-enterprise-apis - 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. circularprotocol/circular-enterprise-apis

ActiveLibrary[API Development](/categories/api)

circularprotocol/circular-enterprise-apis
=========================================

Official Circular Enterprise APIs

1.0.2(1y ago)018MITPHP

Since Mar 8Pushed 1y agoCompare

[ Source](https://github.com/circular-protocol/PHP-Enterprise-APIs)[ Packagist](https://packagist.org/packages/circularprotocol/circular-enterprise-apis)[ RSS](/packages/circularprotocol-circular-enterprise-apis/feed)WikiDiscussions main Synced 1mo ago

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

Circular Enterprise PHP APIs for Data Certification
===================================================

[](#circular-enterprise-php-apis-for-data-certification)

This repository provides PHP implementations of the **Circular Enterprise APIs** for data certification and blockchain integration. It includes classes and helper functions to interact with the Circular network, submit certificates, retrieve transactions, and manage accounts.

Features
--------

[](#features)

- **Data Certification**: Submit data to the blockchain for certification.
- **Transaction Retrieval**: Fetch transaction details by ID or block range.
- **Account Management**: Open, update, and close accounts.
- **Secure Signing**: Sign data using elliptic curve cryptography (secp256k1).
- **Network Integration**: Connect to different blockchain networks (mainnet, testnet, devnet).

---

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

[](#installation)

You can install this library using **Composer** or by **cloning the repository**.

### Option 1: Install via Composer (Recommended)

[](#option-1-install-via-composer-recommended)

1. Run the following command in your project directory:

    ```
    composer require circularprotocol/circular-enterprise-apis
    ```
2. Include the Composer autoloader in your PHP script:

    ```
    require_once __DIR__ . '/vendor/autoload.php';
    ```

### Option 2: Clone the Repository

[](#option-2-clone-the-repository)

1. Clone the repository:

    ```
    git clone https://github.com/circular-protocol/circular-php.git
    cd circular-enterprise-apis
    ```
2. Install dependencies using Composer:

    ```
    composer install
    ```
3. Include the autoloader in your PHP script:

    ```
    require_once __DIR__ . '/vendor/autoload.php';
    ```

---

Usage
-----

[](#usage)

### 1. Opening an Account

[](#1-opening-an-account)

To open an account and retrieve account details:

```
use Circularprotocol\Circularenterpriseapis\CEP_Account;

$account = new CEP_Account();
$account->open('a4fc8b11bfc5dc2911ab41871e6de81f500fe60f3961343b202ad78e7e297ea08');

echo "Account opened successfully.\n";
```

### 2. Chosing a network and the blockchain:

[](#2-chosing-a-network-and-the-blockchain)

```
$blockchain = 'blockchain-address';
$account->setNetwork("testnet"); // chose between multiple networks such as testnet, devnet and mainnet
$account->setBlockchain($blockchain);
```

### 3. Retrieve account informations

[](#3-retrieve-account-informations)

Update account informations such as Nonce:

```
if($account->updateAccount()){
 //...
}
```

### 4. Submitting a Certificate

[](#4-submitting-a-certificate)

To submit data for certification:

```
$pdata = 'Your data to certify';
$privateKey = 'your_private_key_here';

try {
    $response = $account->submitCertificate($pdata, $privateKey);
    print_r($response);
} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}
```

### 5. Retrieving a Transaction

[](#5-retrieving-a-transaction)

To fetch transaction details:

```
//...
$resp = $account->getTransactionOutcome($txID, 10);
if ($resp["BlockID"]) {
  $blockID = $resp["BlockID"];
  $status = $account->getTransaction($blockID, $txID);

  if ($status == 200) {
      echo "Transaction Status: " .
          $status["Response"]["Status"] .
          "\n";

      $account->close();
  } else {
      echo "Error on retrieving transaction";
  }
} else {
  echo "Error on retrieving transaction status";
}
//...
```

---

Helper Functions
----------------

[](#helper-functions)

- **`hexFix(string $hex)`**: Removes `0x` from hexadecimal strings.
- **`stringToHex(string $string)`**: Converts a string to its hexadecimal representation.
- **`hexToString(string $hex)`**: Converts a hexadecimal string back to a regular string.
- **`getFormattedTimestamp()`**: Returns the current timestamp in `YYYY:MM:DD-HH:MM:SS` format.

---

Example Workflow
----------------

[](#example-workflow)

1. Open an account.
2. Set network and blockchain info
3. Submit data for certification.
4. Retrieve the transaction ID from the response.
5. Fetch transaction details using the TxID and the BlockID.

```

```

---

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

[](#contributing)

Contributions are welcome! If you'd like to contribute, please follow these steps:

1. Fork the repository.
2. Create a new branch for your feature or bugfix.
3. Submit a pull request with a detailed description of your changes.

---

License
-------

[](#license)

This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.

---

Support
-------

[](#support)

For questions or issues, please open an issue on the [GitHub repository](https://github.com/circular-protocol/circular-php/issues).

---

This version of the `README.md` includes installation via Composer, making it easier for users to integrate the library into their projects. It also provides clear examples and a structured workflow for using the API. Let me know if you need further adjustments!

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance47

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% 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 ~0 days

Total

2

Last Release

426d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a90f55ce27d9a57066d4ad2d1f18e257dd6a541efdf6849064b77603c7d230f2?d=identicon)[circular-protocol](/maintainers/circular-protocol)

---

Top Contributors

[![dannydenovi](https://avatars.githubusercontent.com/u/70696078?v=4)](https://github.com/dannydenovi "dannydenovi (6 commits)")[![CircularProtocol](https://avatars.githubusercontent.com/u/160263966?v=4)](https://github.com/CircularProtocol "CircularProtocol (3 commits)")

### Embed Badge

![Health badge](/badges/circularprotocol-circular-enterprise-apis/health.svg)

```
[![Health](https://phpackages.com/badges/circularprotocol-circular-enterprise-apis/health.svg)](https://phpackages.com/packages/circularprotocol-circular-enterprise-apis)
```

###  Alternatives

[iexbase/tron-api

A PHP API for interacting with Tron (Trx)

437136.9k8](/packages/iexbase-tron-api)[drlecks/simple-web3-php

Web3 library in PHP

7641.6k2](/packages/drlecks-simple-web3-php)[hardcastle/xrpl_php

PHP SDK / Client for the XRP Ledger

129.7k5](/packages/hardcastle-xrpl-php)[fenguoz/tron-api

A PHP API for interacting with Tron (Trx)

1146.8k3](/packages/fenguoz-tron-api)[takpesar/tron

A PHP library to create Tron wallet addresses and manage wallets using the Tron API

183.2k](/packages/takpesar-tron)

PHPackages © 2026

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