Download the PHP package sandermuller/laravel-solana-sdk without Composer

On this page you can find all versions of the php package sandermuller/laravel-solana-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-solana-sdk

Laravel Solana SDK

Latest Version on Packagist Tests PHPStan Total Downloads

Laravel wrapper around sandermuller/solana-php-sdk — service provider, facades, env-driven config, and artisan commands so you can call Solana RPC from a Laravel app without wiring containers yourself.

Contents

Requirements

Install

The service provider auto-discovers. Publish the config if you want to customise defaults:

Configuration

config/solana-sdk.php exposes four knobs:

SOLANA_NETWORK accepts mainnet, mainnet-beta, testnet, devnet (also main, test, dev). The RPC endpoint is derived from the Network enum in the core SDK.

Facades

Solana proxies the typed Connection API (~60 RPC methods covering ~80 % of the Solana JSON-RPC spec — accounts, blocks, slots, signatures, tokens, supply, stake, vote, inflation). SolanaRpc proxies the raw SolanaRpcClient for calls the typed facade does not yet cover.

Both bindings are also reachable via plain DI:

Programs, builders, signers

The core SDK ships first-class program builders (SystemProgram, SplTokenProgram, Token2022Program, MemoProgram, StakeProgram, VoteProgram, AddressLookupTableProgram, ComputeBudgetProgram, MetaplexProgram, AnchorIdl, …), a sanitize-safe TransactionBuilder, a Util\PriorityFee helper, and a Contracts\MessageSigner interface (with Signing\InMemoryMessageSigner as the local adapter). Use them directly — no wrapping required:

Multi-endpoint transport

Set SOLANA_RPC_URL (and optionally SOLANA_RPC_URL_FALLBACK) to route through your own RPC provider with automatic retry + fallback. Leave both unset to keep the public-endpoint default.

For more elaborate setups (custom auth headers, multiple fallbacks) publish the config and edit transport directly — the wrapper hands the array straight to SanderMuller\SolanaPhpSdk\Rpc\TransportFactory.

Confirming transactions on the queue

This wrapper ships SanderMuller\LaravelSolanaSdk\Queue\ConfirmTransactionJob out of the box. Dispatch it after sendTransaction so the long-tail confirmation phase becomes a background job that fires TransactionConfirmed / TransactionExpired events (the event classes live in the SDK):

Listen for SanderMuller\SolanaPhpSdk\Events\TransactionConfirmed and SanderMuller\SolanaPhpSdk\Events\TransactionExpired in EventServiceProvider (events are SDK-side; only the Job moved to this wrapper).

PubSub / WebSocket

SolanaPubSubClient is bound transient against the configured network, so you can typehint it directly:

Artisan commands

Command Purpose
solana:balance {address} Print SOL balance + lamports
solana:airdrop {address} {sol=1} Request devnet/testnet airdrop
solana:account {address} Dump raw account info JSON
solana:tx {signature} Look up a transaction by signature
solana:health RPC health + version
solana:tokens {owner} List SPL token accounts owned by an address
solana:fees {addresses?*} Recent prioritization fee samples

Disable all bundled commands with SOLANA_COMMANDS_ENABLED=false (they hit live RPC; production may want them off).

Testing

Stubbing RPC in tests

Call Solana::fake() to swap the bound SolanaRpcClient for the core SDK's InMemoryRpcStub so the SDK never hits the network:

Wire the core Pest expectations (toBeConfirmed, toHaveCustomCode, toBeInstructionError) once from tests/Pest.php:

The wrapper's own test suite runs against Orchestra Testbench with the package provider auto-registered. Network-dependent tests are not shipped — facade unit tests just verify resolution + container shape.

Upgrading

See UPGRADING.md.

Changelog

See CHANGELOG.md. Updated automatically on release publish.

Contributing

PRs welcome. Run the local gauntlet before opening one:

The package is intentionally a thin wrapper — net-new RPC methods, program builders, and DTOs belong in sandermuller/solana-php-sdk. The wrapper only adds Laravel glue (@method lines on the Solana facade, env-driven config keys, container bindings, solana:* commands). See CLAUDE.md for the full scope rules.

Security

See SECURITY.md.

Credits

License

The MIT License (MIT). See LICENSE.


All versions of laravel-solana-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
sandermuller/solana-php-sdk Version ^0.2.0
illuminate/console Version ^11.0||^12.0||^13.0
illuminate/contracts Version ^11.0||^12.0||^13.0
illuminate/support Version ^11.0||^12.0||^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sandermuller/laravel-solana-sdk contains the following files

Loading the files please wait ...