PHPackages                             howrareis/solana-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. howrareis/solana-php-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

howrareis/solana-php-sdk
========================

Solana PHP SDK

v0.5.0(3y ago)18MITPHPPHP ^7.4 || ~8.0

Since Sep 15Pushed 3y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (10)Versions (2)Used By (0)

Solana PHP SDK
==============

[](#solana-php-sdk)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a68a585f30f7b73e60769dcfb2219627fa756ba8847571ca0688b4ce8322247d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f777261726569732f736f6c616e612d7068702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/howrareis/solana-php-sdk)

---

⚠️**This is one of the forks of the original solana-php-sdk and is in no way maintained by the [original author](https://github.com/tighten) or the [new maintainers](https://github.com/verze-app/solana-php-sdk) of the original package. Project was moved to new namespace to avoid any clashes with the original package. This fork will deviate from the original project and feature parity will not be maintained. It will not be possible to use both projects as a drop-in replacements.**

---

Simple PHP SDK for Solana.

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

[](#installation)

You can install the package via composer:

```
composer require howrareis/solana-php-sdk
```

Usage
-----

[](#usage)

### Using the Solana simple client

[](#using-the-solana-simple-client)

You can use the `Connection` class for convenient access to API methods. Some are defined in the code:

```
use HowRareIs\SolanaPhpSdk\Connection;
use HowRareIs\SolanaPhpSdk\SolanaRpcClient;

// Using a defined method
$sdk = new Connection(new SolanaRpcClient(SolanaRpcClient::MAINNET_ENDPOINT));
$accountInfo = $sdk->getAccountInfo('4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA');
var_dump($accountInfo);
```

For all the possible methods, see the [API documentation](https://docs.solana.com/developing/clients/jsonrpc-api).

### Directly using the RPC client

[](#directly-using-the-rpc-client)

The `Connection` class is just a light convenience layer on top of the RPC client. You can, if you want, use the client directly, which allows you to work with the full `Response` object:

```
use HowRareIs\SolanaPhpSdk\SolanaRpcClient;

$client = new SolanaRpcClient(SolanaRpcClient::MAINNET_ENDPOINT);
$accountInfoResponse = $client->call('getAccountInfo', ['4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA']);
$accountInfoBody = $accountInfoResponse->json();
$accountInfoStatusCode = $accountInfoResponse->getStatusCode();
```

### Transactions

[](#transactions)

Here is working example of sending a transfer instruction to the Solana blockchain:

```
$client = new SolanaRpcClient(SolanaRpcClient::DEVNET_ENDPOINT);
$connection = new Connection($client);
$fromPublicKey = KeyPair::fromSecretKey([...]);
$toPublicKey = new PublicKey('J3dxNj7nDRRqRRXuEMynDG57DkZK4jYRuv3Garmb1i99');
$instruction = SystemProgram::transfer(
    $fromPublicKey->getPublicKey(),
    $toPublicKey,
    6
);

$transaction = new Transaction(null, null, $fromPublicKey->getPublicKey());
$transaction->add($instruction);

$txHash = $connection->sendTransaction($transaction, $fromPublicKey);
```

Note: This project is in alpha, the code to generate instructions is still being worked on `$instruction = SystemProgram::abc()`

Roadmap
-------

[](#roadmap)

1. Borsh serialize and deserialize.
2. Improved documentation.
3. Build out more of the Connection, SystemProgram, TokenProgram, MetaplexProgram classes.
4. Improve abstractions around working with binary data.
5. Optimizations:
    1. Leverage PHP more.
    2. Better cache `$recentBlockhash` when sending transactions.
6. Suggestions? Open an issue or PR :D

Testing
-------

[](#testing)

```
composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Matt Stauffer](https://github.com/mattstauffer) (Original creator)
- [Zach Vander Velden](https://github.com/exzachlyvv) (Metadata wizard)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

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

1340d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/840442bd4530881bdecd49d5d8e6f8ca5d4ebf6d9026a8f26bf995da65110784?d=identicon)[SadMouse](/maintainers/SadMouse)

---

Top Contributors

[![exzachlyvv](https://avatars.githubusercontent.com/u/46034847?v=4)](https://github.com/exzachlyvv "exzachlyvv (41 commits)")[![mattstauffer](https://avatars.githubusercontent.com/u/151829?v=4)](https://github.com/mattstauffer "mattstauffer (22 commits)")[![neverything](https://avatars.githubusercontent.com/u/368120?v=4)](https://github.com/neverything "neverything (9 commits)")[![gabrielkoerich](https://avatars.githubusercontent.com/u/1981726?v=4)](https://github.com/gabrielkoerich "gabrielkoerich (4 commits)")[![ComradePashka](https://avatars.githubusercontent.com/u/15798005?v=4)](https://github.com/ComradePashka "ComradePashka (3 commits)")[![hnassr](https://avatars.githubusercontent.com/u/9513214?v=4)](https://github.com/hnassr "hnassr (1 commits)")[![miguilimzero](https://avatars.githubusercontent.com/u/35383529?v=4)](https://github.com/miguilimzero "miguilimzero (1 commits)")

---

Tags

phpsdkblockchainsolsolana-php-sdksolanahowrareis

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[ankurk91/laravel-ses-webhooks

Handle AWS SES webhooks in Laravel php framework

2534.2k](/packages/ankurk91-laravel-ses-webhooks)

PHPackages © 2026

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