PHPackages                             laravel-ch/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. laravel-ch/solana-php-sdk

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

laravel-ch/solana-php-sdk
=========================

Solana PHP SDK

v1.0.0(4y ago)1111PHPPHP ^7.4

Since May 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Karynageek/solana-php-sdk)[ Packagist](https://packagist.org/packages/laravel-ch/solana-php-sdk)[ RSS](/packages/laravel-ch-solana-php-sdk/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (10)Versions (3)Used By (0)

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

[](#solana-php-sdk)

---

Simple PHP SDK for Solana.

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

[](#installation)

You can install the package via composer:

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 Tighten\SolanaPhpSdk\Connection;
use Tighten\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 Tighten\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
```

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

Unknown

Total

1

Last Release

1464d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d2db8a7b5e6d751393ecb0ca903bf3b54c341391a98aa2dde653c69c082e8da7?d=identicon)[9eveloper](/maintainers/9eveloper)

---

Top Contributors

[![Karynageek](https://avatars.githubusercontent.com/u/57843248?v=4)](https://github.com/Karynageek "Karynageek (8 commits)")

---

Tags

phpsdkblockchainsolsolana-php-sdksolanalaravel-ch

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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