PHPackages                             agostinhobarbosa/stellar-api - 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. agostinhobarbosa/stellar-api

ActiveLibrary[API Development](/categories/api)

agostinhobarbosa/stellar-api
============================

API client for the Stellar network

010PHP

Since Nov 25Pushed 3y agoCompare

[ Source](https://github.com/AgostinhoBarbosa/stellar-api)[ Packagist](https://packagist.org/packages/agostinhobarbosa/stellar-api)[ RSS](/packages/agostinhobarbosa-stellar-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Description
-----------

[](#description)

PHP Library for interacting with the Stellar network.

- Communicate with Horizon server
- Build and sign transactions

⚠️ Danger Zone ⚠️
-----------------

[](#warning-danger-zone-warning)

**Development Status**

This library is under active development and should be considered beta quality. Please ensure that you've tested extensively on a test network and have added sanity checks in other places in your code.

⚠️ [See the release notes for breaking changes](CHANGELOG.md)

**Large Integer Support**

The largest PHP integer is 64-bits when on a 64-bit platform. This is especially important to pay attention to when working with large balance transfers. The native representation of a single XLM (1 XLM) is 10000000 stroops.

Therefore, if you try to use a `MAX_INT` number of XLM (or a custom asset) it is possible to overflow PHP's integer type when the value is converted to stroops and sent to the network.

This library attempts to add checks for this scenario and also uses a `BigInteger`class to work around this problem.

If your application uses large amounts of XLM or a custom asset please do extensive testing with large values and use the `StellarAmount` helper class or the `BigInteger`class if possible.

**Floating point issues**

Although not specific to Stellar or PHP, it's important to be aware of problems when doing comparisons between floating point numbers.

For example:

```
$oldBalance = 1.605;
$newBalance = 1.61;

var_dump($oldBalance + 0.005);
var_dump($newBalance);
if ($oldBalance + 0.005 === $newBalance) {
    print "Equal\n";
}
else {
    print "Not Equal\n";
}
```

The above code considers the two values not to be equal even though the same value is printed out:

Output:

```
float(1.61)
float(1.61)
Not Equal

```

To work around this issue, always work with and store amounts as an integer representing stroops. Only convert back to a decimal number when you need to display a balance to the user.

The static `StellarAmount::STROOP_SCALE` property can be used to help with this conversion.

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

[](#installation)

To install the latest release for usage in your project:

```
cd your_project/
composer require zulucrypto/stellar-api

```

If you want to work with the most recent development version you can use this repository:

```
git clone https://github.com/zulucrypto/stellar-api.git
cd stellar-api/
composer install

```

Getting Started
---------------

[](#getting-started)

See the [getting-started](getting-started/) directory for examples of how to use this library.

These examples are modeled after the ones in Stellar's getting started guide:

Additional examples are available in the [examples](examples/) directory

Donations
---------

[](#donations)

Stellar: GCUVDZRQ6CX347AMUUWZDYSNDFAWDN6FUYM5DVYYVO574NHTAUCQAK53

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/81da35d9a4a0b0c44d0d39b1042e0608b8c5c1778ecdbd7d8e997a1a00aa385f?d=identicon)[AgostinhoBarbosa](/maintainers/AgostinhoBarbosa)

---

Top Contributors

[![zulucrypto](https://avatars.githubusercontent.com/u/29358017?v=4)](https://github.com/zulucrypto "zulucrypto (235 commits)")[![AgostinhoBarbosa](https://avatars.githubusercontent.com/u/37216325?v=4)](https://github.com/AgostinhoBarbosa "AgostinhoBarbosa (11 commits)")[![omarfurrer](https://avatars.githubusercontent.com/u/24496297?v=4)](https://github.com/omarfurrer "omarfurrer (3 commits)")[![cballou](https://avatars.githubusercontent.com/u/166784?v=4)](https://github.com/cballou "cballou (1 commits)")[![cmichi](https://avatars.githubusercontent.com/u/241530?v=4)](https://github.com/cmichi "cmichi (1 commits)")[![tholder](https://avatars.githubusercontent.com/u/41235?v=4)](https://github.com/tholder "tholder (1 commits)")

### Embed Badge

![Health badge](/badges/agostinhobarbosa-stellar-api/health.svg)

```
[![Health](https://phpackages.com/badges/agostinhobarbosa-stellar-api/health.svg)](https://phpackages.com/packages/agostinhobarbosa-stellar-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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