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

ActiveLibrary[API Development](/categories/api)

cregis/cregis-sdk-php
=====================

Cregis API SDK for PHP 7.x/8.x

2.0(9mo ago)12041MITPHPPHP ^7.0 || ^8.0

Since Nov 22Pushed 9mo agoCompare

[ Source](https://github.com/0xcregis/cregis-sdk-php)[ Packagist](https://packagist.org/packages/cregis/cregis-sdk-php)[ RSS](/packages/cregis-cregis-sdk-php/feed)WikiDiscussions main Synced 1mo ago

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

PHP Cregis SDK User Guide
=========================

[](#php-cregis-sdk-user-guide)

I. Prerequisites
----------------

[](#i-prerequisites)

- PHP version ≥ 7.0
- [Composer](https://getcomposer.org/) installed (dependency management tool)
- Project `.env` file configured

---

II. SDK Installation
--------------------

[](#ii-sdk-installation)

Install the SDK to your project via Composer:

```
composer require cregis/cregis-sdk-php:^2.0
```

After installation, Composer will automatically handle dependencies and generate `vendor/autoload.php`, and the framework will automatically load the SDK libraries.

---

III. Framework Integration Guide
--------------------------------

[](#iii-framework-integration-guide)

#### Add the following content to the .env file in the root directory

[](#add-the-following-content-to-the-env-file-in-the-root-directory)

```
## production or development environment
ENVIRONMENT=production
# API base URL (default value can be modified as needed)
API_BASE_URI=https://t-xxxxxxx.cregis.io
# API key
API_KEY=16d4xxxxxxxxxxxxxxxxxxbd7895f4d
# Project ID
PID=1418xxxxxxxxxxx89664
```

#### Add references where needed

[](#add-references-where-needed)

```
use Cregis\Services\PayoutService;
use Cregis\Services\DepositService;
use Cregis\Services\CallbackService;
```

#### Example of creating an address, other examples can be found in demo.php in the SDK

[](#example-of-creating-an-address-other-examples-can-be-found-in-demophp-in-the-sdk)

```
    public function createAddress()
    {
            $depositService = new DepositService();
            try {
                $result = $depositService->createAddress([
                    "callback_url"=> "http://xxxx.com/deposit/callback",
                    "chain_id"=> "60",
                    "alias"=> "cc",
                ]);
                echo "createAddress: " . json_encode($result, JSON_UNESCAPED_UNICODE) . "\n";
            } catch (\Exception $e) {
                echo "createAddress-error：" . $e->getMessage() . "\n";
            }
        return 'hello,' ;
    }
```

---

IV. Notes
---------

[](#iv-notes)

- Ensure that the framework's `vendor/autoload.php` is correctly loaded (already handled by mainstream frameworks by default).
- For production environments, set `ENVIRONMENT` to `production` in the `.env` file to avoid using test environment interfaces.
- If the framework does not automatically load the `.env` file (e.g., ThinkPHP), you need to manually call `Dotenv\Dotenv::createImmutable(__DIR__)->load();` to load the configuration.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance56

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.9% 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 ~302 days

Total

3

Last Release

296d ago

Major Versions

1.0 → 2.02025-07-18

PHP version history (2 changes)1.0PHP &gt;=7.0

2.0PHP ^7.0 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1552ed960ff37a858f3d2d6bf3c09cfc803137ada00f6d802d4e5b6bdbb5ae21?d=identicon)[lehoel1](/maintainers/lehoel1)

---

Top Contributors

[![alexexxman](https://avatars.githubusercontent.com/u/126240164?v=4)](https://github.com/alexexxman "alexexxman (13 commits)")[![lehoel1](https://avatars.githubusercontent.com/u/109498100?v=4)](https://github.com/lehoel1 "lehoel1 (8 commits)")

### Embed Badge

![Health badge](/badges/cregis-cregis-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/cregis-cregis-sdk-php/health.svg)](https://phpackages.com/packages/cregis-cregis-sdk-php)
```

###  Alternatives

[netflie/whatsapp-cloud-api

The first PHP SDK to send and receive messages using a cloud-hosted version of the WhatsApp Business Platform

640431.7k4](/packages/netflie-whatsapp-cloud-api)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[jasara/php-amzn-selling-partner-api

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

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[hardcastle/xrpl_php

PHP SDK / Client for the XRP Ledger

129.7k5](/packages/hardcastle-xrpl-php)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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