A Stellite library written in PHP fork from Monero Integrations team.
Using composer
composer require stellitecoin/stellitephp
Include composer autoload
require_once __DIR__ . '/vendor/autoload.php';
This library has 3 main parts. All libraries now uses PSR-4 namespacing.
-
A Stellite daemon JSON RPC API wrapper, (
\Stellite\Rpc\Daemon) -
A Stellite wallet (
stellite-wallet-rpc) JSON RPC API wrapper, (\Stellite\Rpc\Wallet) -
A Monero/Cryptonote toolbox,
cryptonote.php, with both lower level functions used in Stellite related cryptography and higher level methods for things like generating Stellite private/public keys. (not yet refactored)
In addition to these features, there are other lower-level libraries included for portability, eg. an ed25519 library, a SHA3 library, etc.
Documentation can be found in the /docs folder.
- Stellite daemon (
stellited) - Webserver with PHP, for example XMPP, Apache, or NGINX
- cURL PHP extension for JSON RPC API(s)
- GMP PHP extension for about 100x faster calculations (as opposed to BCMath)
Debian (or Ubuntu) are recommended.
- Start the Stellite daemon (
stellited) on testnet.
stellited --testnet --detach- Start the Stellite wallet RPC interface (
stellite-wallet-rpc) on testnet.
stellite-wallet-rpc --testnet --rpc-bind-port 28083 --disable-rpc-login --wallet-dir /path/to/wallet/directory-
Edit
example.phpwith your the IP address ofstellitedandstellite-wallet-rpc(use127.0.0.1:28081and127.0.0.1:28083, respectively, for testnet.) -
Serve
example.phpwith your webserver (eg. XMPP, Apache/Apache2, NGINX, etc.) and navigate to it. If everything has been set up correctly, information from your Stellite daemon and wallet will be displayed.
