josephopanel / solana-php-sdk
A PHP SDK for interacting with the Solana blockchain via JSON RPC and WebSocket methods.
Installs: 447
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 1
Forks: 3
Open Issues: 1
pkg:composer/josephopanel/solana-php-sdk
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.9
- ratchet/pawl: ^0.4.1
- stephenhill/base58: ^1.1
Requires (Dev)
- phpunit/phpunit: ^11.4
README
A powerful and easy-to-use PHP SDK for interacting with the Solana blockchain. This library allows developers to interact with Solana's JSON RPC and WebSocket APIs using PHP, enabling seamless integration for blockchain applications.
🚀 Features
- Lightweight and fully PSR-4 compliant
- Supports JSON RPC methods
- Built-in extensibility for future methods
- Clean and intuitive API design
- Open source and community-friendly
- PHP 8.2+ Required
📚 Installation
Install the library via Composer:
composer require josephopanel/solana-php-sdk
📖 Documentation
For detailed information about all available methods, visit the API Documentation.
🚀 API Methods
Account Methods
getAccountInfogetBalancegetTokenAccountBalancegetTokenAccountsByDelegategetTokenAccountsByOwnergetTokenLargestAccountsgetTokenSupplygetLargestAccountsgetMultipleAccountsgetProgramAccounts
Block Methods
getBlockgetBlockCommitmentgetBlockHeightgetBlockProductiongetBlockTimegetBlocksgetBlocksWithLimitgetFirstAvailableBlockisBlockhashValidminimumLedgerSlot
Cluster Methods
getClusterNodesgetEpochInfogetEpochSchedulegetLeaderSchedulegetSlotgetSlotLeadergetSlotLeadersgetSupply
Governance and Identity
getIdentitygetInflationGovernorgetInflationRategetInflationRewardgetStakeMinimumDelegationgetVoteAccounts
System and Performance
getFeeForMessagegetHealthgetHighestSnapshotSlotgetRecentPerformanceSamplesgetRecentPrioritizationFees
Transactions
getLatestBlockhashgetSignatureStatusesgetSignaturesForAddressgetTransactiongetTransactionCountsimulateTransactionsendTransaction
Utilities
Web Socket Methods
accountSubscribeaccountUnsubscribeblockSubscribeblockUnsubscribelogsSubscribelogsUnsubscribeprogramSubscribeprogramUnsubscriberootSubscriberootUnsubscribesignatureSubscribesignatureUnsubscribeslotSubscribeslotUnsubscribeslotsUpdatesSubscribeslotsUpdatesUnsubscribevoteSubscribevoteUnsubscribe
💻 Contributing
Contributions are welcome! If you'd like to improve the SDK or add new features, feel free to fork the repository and submit a pull request.
- Fork the repository
- Create a new feature branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -m "Add new feature" - Push to the branch:
git push origin feature/my-feature - Open a pull request
💰 Donations
This project is open source and developed with passion. If you’d like to support ongoing development, consider donating:
- Solana Wallet Address:
4izNYzN7uQac8jBDcD7NmuCpS8PqvYiHVSLXF5bY9Zrg
Every little bit helps keep this project maintained and up-to-date. Thank you for your support! ❤️
📜 License
This project is licensed under the MIT License.
📞 Contact
For any questions, feedback, or collaboration inquiries, feel free to reach out:
- Author: Joseph Opanel
- Email: opanelj@gmail.com