PHPackages                             soneso/stellar-php-sdk - 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. soneso/stellar-php-sdk

ActiveLibrary[API Development](/categories/api)

soneso/stellar-php-sdk
======================

Stellar PHP SDK for the Stellar Network

1.10.0(2w ago)4154.3k↓33.1%204Apache-2.0PHPPHP &gt;=8.0CI passing

Since Dec 29Pushed 2w ago12 watchersCompare

[ Source](https://github.com/Soneso/stellar-php-sdk)[ Packagist](https://packagist.org/packages/soneso/stellar-php-sdk)[ RSS](/packages/soneso-stellar-php-sdk/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (34)Versions (102)Used By (4)

[Stellar SDK for PHP](https://github.com/Soneso/stellar-php-sdk)
================================================================

[](#stellar-sdk-for-php)

[![Latest Stable Version](https://camo.githubusercontent.com/7854a5e62f66e7a42fc193c0920066dcbf9842135ea3b62eb30ced9226a907e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f6e65736f2f7374656c6c61722d7068702d73646b2e737667)](https://packagist.org/packages/soneso/stellar-php-sdk)[![Total Downloads](https://camo.githubusercontent.com/93258adc4c6255346a1da2f2908e4044e75fc6b91762f041d95b158f13bf8762/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f6e65736f2f7374656c6c61722d7068702d73646b2e737667)](https://packagist.org/packages/soneso/stellar-php-sdk)[![codecov](https://camo.githubusercontent.com/6c6a605440575e17ce1aaedb56d96f8983e8cca61b30c4f3798541af799eb8e3/68747470733a2f2f636f6465636f762e696f2f67682f536f6e65736f2f7374656c6c61722d7068702d73646b2f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/Soneso/stellar-php-sdk)[![Ask DeepWiki](https://camo.githubusercontent.com/0f5ae213ac378635adeb5d7f13cef055ad2f7d9a47b36de7b1c67dbe09f609ca/68747470733a2f2f6465657077696b692e636f6d2f62616467652e737667)](https://deepwiki.com/Soneso/stellar-php-sdk)

Build and sign Stellar transactions, query [Horizon](https://developers.stellar.org/docs/data/apis/horizon), and interact with [Soroban](https://developers.stellar.org/docs/build/smart-contracts/overview) smart contracts via RPC. Communicate with anchors and external services using built-in support for 19 SEPs.

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

[](#installation)

```
composer require soneso/stellar-php-sdk
```

Requires PHP 8.0+.

Quick examples
--------------

[](#quick-examples)

### Send a payment

[](#send-a-payment)

Transfer XLM between accounts:

```
$payment = (new PaymentOperationBuilder($receiverId, Asset::native(), '100'))->build();
$tx = (new TransactionBuilder($account))->addOperation($payment)->build();
$tx->sign($senderKeyPair, Network::testnet());
$sdk->submitTransaction($tx);
```

### Trust an asset

[](#trust-an-asset)

Enable your account to receive a token (like USDC):

```
$asset = Asset::createNonNativeAsset('USDC', $issuerAccountId);
$trustOp = (new ChangeTrustOperationBuilder($asset))->build();
$tx = (new TransactionBuilder($account))->addOperation($trustOp)->build();
$tx->sign($accountKeyPair, Network::testnet());
$sdk->submitTransaction($tx);
```

### Call a smart contract

[](#call-a-smart-contract)

Invoke a Soroban contract method:

```
$client = SorobanClient::forClientOptions(new ClientOptions(
    sourceAccountKeyPair: $keyPair,
    contractId: 'CABC...',
    network: Network::testnet(),
    rpcUrl: 'https://soroban-testnet.stellar.org'
));
$result = $client->invokeMethod('hello', [XdrSCVal::forSymbol('World')]);
```

For complete walkthroughs, see the [documentation](docs/).

Agent Skill
-----------

[](#agent-skill)

This repository includes an [Agent Skill](https://agentskills.io) that teaches AI coding agents how to use this SDK. See [skills/](skills/) for installation instructions.

Documentation
-------------

[](#documentation)

GuideDescription[Quick start](docs/quick-start.md)Your first transaction in 15 minutes[Getting started](docs/getting-started.md)Keys, accounts, and fundamentals[SDK usage](docs/sdk-usage.md)Transactions, operations, Horizon queries, streaming[Soroban](docs/soroban.md)Smart contract deployment and interaction[SEPs](docs/sep/)Anchor integration, authentication, KYC, etc.[API reference](https://soneso.github.io/stellar-php-sdk/)

Compatibility
-------------

[](#compatibility)

- [Horizon API compatibility matrix](compatibility/horizon/COMPATIBILITY_MATRIX.md)
- [RPC API compatibility matrix](compatibility/rpc/RPC_COMPATIBILITY_MATRIX.md)
- [SEP support matrices](compatibility/sep/)

Feedback
--------

[](#feedback)

If you're using this SDK, feedback helps improve it:

- [Report a bug](https://github.com/Soneso/stellar-php-sdk/issues/new?template=bug_report.yml)
- [Request a feature](https://github.com/Soneso/stellar-php-sdk/issues/new?template=feature_request.yml)
- [Start a discussion](https://github.com/Soneso/stellar-php-sdk/discussions)

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

[](#contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

License
-------

[](#license)

Apache 2.0. See [LICENSE](LICENSE).

###  Health Score

63

—

FairBetter than 99% of packages

Maintenance97

Actively maintained with recent releases

Popularity44

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 95.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 ~19 days

Recently: every ~24 days

Total

84

Last Release

14d ago

Major Versions

0.7.4 → 1.0.02022-09-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/6dac768de39d0e0fdba6ec8882d60e900e3fa17a2d839ffc599c08119a2f3d61?d=identicon)[soneso](/maintainers/soneso)

---

Top Contributors

[![christian-rogobete](https://avatars.githubusercontent.com/u/35729606?v=4)](https://github.com/christian-rogobete "christian-rogobete (486 commits)")[![ngybnc](https://avatars.githubusercontent.com/u/44839908?v=4)](https://github.com/ngybnc "ngybnc (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![Jmunapo](https://avatars.githubusercontent.com/u/28527609?v=4)](https://github.com/Jmunapo "Jmunapo (2 commits)")[![sozidatel](https://avatars.githubusercontent.com/u/1482409?v=4)](https://github.com/sozidatel "sozidatel (1 commits)")[![joemunapo](https://avatars.githubusercontent.com/u/63977646?v=4)](https://github.com/joemunapo "joemunapo (1 commits)")[![redconan](https://avatars.githubusercontent.com/u/10426208?v=4)](https://github.com/redconan "redconan (1 commits)")[![Big-Shark](https://avatars.githubusercontent.com/u/646054?v=4)](https://github.com/Big-Shark "Big-Shark (1 commits)")

---

Tags

blockchainstellar

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[civicrm/civicrm-core

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

751291.4k43](/packages/civicrm-civicrm-core)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)

PHPackages © 2026

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