PHPackages                             hub/hedera-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. hub/hedera-sdk-php

ActiveLibrary[API Development](/categories/api)

hub/hedera-sdk-php
==================

Hedera Hashgraph SDK for PHP - A comprehensive PHP library for interacting with the Hedera network

v1.2(6mo ago)09MITPHPPHP &gt;=7.2CI failing

Since Oct 30Pushed 6mo agoCompare

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

READMEChangelogDependencies (8)Versions (2)Used By (0)

Hedera SDK PHP
==============

[](#hedera-sdk-php)

[![Tests](https://github.com/hub/hedera-sdk-php/actions/workflows/test.yml/badge.svg)](https://github.com/hub/hedera-sdk-php/actions/workflows/test.yml)

Rationale
=========

[](#rationale)

GRPC php bindings for hedera API. Compatible with php7.2+ (until 8.1 at least).

Process
=======

[](#process)

1. Install or build protocol buffers compiler (`protoc`) with php plugins. Instructions from

```
git clone --recurse-submodules -b v1.75.1 --depth 1 --shallow-submodules https://github.com/grpc/grpc
bazel build @com_google_protobuf//:protoc //src/compiler:all v1.75.1
# bazel does not work with 1.40
#git clone --recurse-submodules -b v1.40.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc
#bazel build @com_google_protobuf//:protoc //src/compiler:all v1.40.0
```

2. Clone protocol buffers specs from official hedera repo.

```
git clone https://github.com/hashgraph/hedera-protobufs/releases/tag/v0.62.4
```

3. Generate php stubs for desired protocol buffers packages.

```
protoc --descriptor_set_out=out.protoset --include_imports --proto_path=./services --proto_path=./platform services/*.proto
../grpc/bazel-bin/external/com_google_protobuf/protoc --descriptor_set_out=out.protoset --include_imports --proto_path=../grpc/third_party/protobuf/src/ --proto_path=./services --proto_path=./mirror --proto_path=./platform --php_out=../hedera-php/Generatedmirror2 --grpc_out=../hedera-php/Generatedmirror2 --plugin=protoc-gen-grpc=../grpc/bazel-bin/src/compiler/grpc_php_plugin_binary mirror/*.proto
../grpc/bazel-bin/external/com_google_protobuf/protoc --descriptor_set_out=out.protoset --include_imports --proto_path=../grpc/third_party/protobuf/src/ --proto_path=./services --proto_path=./platform --proto_path=./platform/event --proto_path=./platform/state --php_out=../hedera-php/Generated --grpc_out=../hedera-php/Generated --plugin=protoc-gen-grpc=../grpc/bazel-bin/src/compiler/grpc_php_plugin_binary services/*.proto
../grpc/bazel-bin/external/com_google_protobuf/protoc --descriptor_set_out=out.protoset --include_imports --proto_path=../grpc/third_party/protobuf/src/ --proto_path=./services --proto_path=./platform --proto_path=./platform/event --proto_path=./platform/state --php_out=../hedera-php/Generatedplatformevent --grpc_out=../hedera-php/Generatedplatformevent --plugin=protoc-gen-grpc=../grpc/bazel-bin/src/compiler/grpc_php_plugin_binary platform/event/*.proto
../grpc/bazel-bin/external/com_google_protobuf/protoc --descriptor_set_out=out.protoset --include_imports --proto_path=../grpc/third_party/protobuf/src/ --proto_path=./services --proto_path=./platform --proto_path=./platform/event --proto_path=./platform/state --php_out=../hedera-php/Generatedauxiliaryhints --grpc_out=../hedera-php/Generatedauxiliaryhints --plugin=protoc-gen-grpc=../grpc/bazel-bin/src/compiler/grpc_php_plugin_binary services/auxiliary/hints/*.proto
../grpc/bazel-bin/external/com_google_protobuf/protoc --descriptor_set_out=out.protoset --include_imports --proto_path=../grpc/third_party/protobuf/src/ --proto_path=./services --proto_path=./platform --proto_path=./platform/event --proto_path=./platform/state --php_out=../hedera-php/Generatedstatehints --grpc_out=../hedera-php/Generatedstatehints --plugin=protoc-gen-grpc=../grpc/bazel-bin/src/compiler/grpc_php_plugin_binary services/state/hints/*.proto
../grpc/bazel-bin/external/com_google_protobuf/protoc --descriptor_set_out=out.protoset --include_imports --proto_path=../grpc/third_party/protobuf/src/ --proto_path=./services --proto_path=./platform --proto_path=./platform/event --proto_path=./platform/state --php_out=../hedera-php/Generatedauxiliaryhistory --grpc_out=../hedera-php/Generatedauxiliaryhistory --plugin=protoc-gen-grpc=../grpc/bazel-bin/src/compiler/grpc_php_plugin_binary services/auxiliary/history/*.proto
../grpc/bazel-bin/external/com_google_protobuf/protoc --descriptor_set_out=out.protoset --include_imports --proto_path=../grpc/third_party/protobuf/src/ --proto_path=./services --proto_path=./platform --proto_path=./platform/state --php_out=../hedera-php/Generatedstatehistory --grpc_out=../hedera-php/Generatedstatehistory --plugin=protoc-gen-grpc=../grpc/bazel-bin/src/compiler/grpc_php_plugin_binary services/state/history/*.proto
```

4. Build higher-level wrappers around the raw clients.
5. Build required grpc extensions.

```
# PECL setup for debian-based systems
apt install php-dev php-pear composer
pecl install grpc-1.76.0
# Config for php v 8.1
echo -e "; configuration for php grpc module\n; priority=20\nextension=grpc.so\n" > /etc/php/8.1/mods-available/grpc.ini
ln -s /etc/php/8.1/mods-available/grpc.ini /etc/php/8.1/cli/conf.d/20-grpc.ini
```

Improvements
============

[](#improvements)

- increase tests coverage.
- exhaustive features integrations (basically, only HCS is integrated now).
- separate mirror client from main client and avoid namespace clash between "ConsensusService".
- Transform precheck codes enums to more user friendly messages.
- More flexible interface to customize any internal parameter, inspired from other non-PHP SDKs like .
- Expose internal types/messages or build a more friendly wrapper around them (eg: handle topicId like strings and parse internally into realm, shard and num).
- Include hbar to tinybar utilities and arbitrary precision operations.
- Autodetect node number from node host or viceversa by using AddressBooks.
- Autodetect account number from public key or viceversa.
- Allow to perform EVM compatible operations.
- Improve fee handling and trx payment.
- Support EVM compatible layer (ECDSA encryption would be needed then).
- Integrate with mirror JSON-RPC interfaces for old transactions.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance66

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

200d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/185e3ac9d41993e06b1cc769e81f3145e87071c90da1bcc3f548167b193917d5?d=identicon)[hubculture](/maintainers/hubculture)

---

Top Contributors

[![gtorterolo-zircon](https://avatars.githubusercontent.com/u/69865250?v=4)](https://github.com/gtorterolo-zircon "gtorterolo-zircon (4 commits)")

---

Tags

phpsdkgRPCprotobufcryptocurrencyblockchainhederahashgraph

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[americanexpress/hyperledger-fabric-sdk-php

Hyperledger Fabric client SDK in PHP

491.3k](/packages/americanexpress-hyperledger-fabric-sdk-php)[passkit/passkit-php-grpc-sdk

PHP gRPC SDK for Apple Wallet and Google Pay Membership / Loyalty / Access Cards, Coupons, Flights &amp; Event-Tickets.

132.0k](/packages/passkit-passkit-php-grpc-sdk)[manamine/php-eos-rpc-sdk

PHP SDK for the EOS RPC API

187.5k](/packages/manamine-php-eos-rpc-sdk)[hardcastle/xrpl_php

PHP SDK / Client for the XRP Ledger

129.7k5](/packages/hardcastle-xrpl-php)

PHPackages © 2026

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