PHPackages                             multiplechain/solana-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. multiplechain/solana-sdk

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

multiplechain/solana-sdk
========================

Solana PHP SDK

0.1.2(1y ago)4731[1 PRs](https://github.com/MultipleChain-PHP/solana-sdk/pulls)1MITPHPPHP ^8.1

Since Jun 7Pushed 1y agoCompare

[ Source](https://github.com/MultipleChain-PHP/solana-sdk)[ Packagist](https://packagist.org/packages/multiplechain/solana-sdk)[ Docs](https://github.com/MultipleChain-PHP/solana-sdk)[ RSS](/packages/multiplechain-solana-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (13)Versions (5)Used By (1)

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

[](#solana-php-sdk)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1fe50019bcada7fa4eb4a9a7ed960974feff7ec534b132b010c019001f411f0e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d756c7469706c65636861696e2f736f6c616e612d73646b2e7376673f7374796c653d737175617265)](https://packagist.org/packages/multiplechain/solana-sdk)[![GitHub Tests Action Status](https://github.com/MultipleChain-PHP/solana-sdk/actions/workflows/test-and-code-check.yaml/badge.svg?branch=alpha)](https://github.com/MultipleChain-PHP/solana-sdk/actions/workflows/test-and-code-check.yaml?query=workflow%3Atest-and-code-check)

---

NOTE: This package has been forked to be developed at MultipleChain to provide infrastructure for Solana. We are not adding it internally to MultipleChain because MultipleChain is an interface that covers all Blockchain networks. But for those who just want to do something for Solana, we aim to make something that covers everything in Solana/Web3.js.

Forked from: [Sellix/solana-php-sdk](https://github.com/Sellix/solana-php-sdk)

---

Simple PHP SDK for Solana.

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

[](#installation)

You can install the package via composer:

```
composer require multiplechain/solana-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 MultipleChain\SolanaSDK\Connection;
use MultipleChain\SolanaSDK\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 MultipleChain\SolanaSDK\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 create an issue in this repository.

Credits
-------

[](#credits)

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

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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

Every ~14 days

Total

3

Last Release

674d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b951e4bb4ee9ba166bc685b7efddd6f66d288e960007795dbe654fce33ded85?d=identicon)[0xbeycan](/maintainers/0xbeycan)

---

Top Contributors

[![0xBeycan](https://avatars.githubusercontent.com/u/50718965?v=4)](https://github.com/0xBeycan "0xBeycan (31 commits)")

---

Tags

phpsdkblockchainsolsolana-php-sdksolana

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/multiplechain-solana-sdk/health.svg)](https://phpackages.com/packages/multiplechain-solana-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)[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)
