stellitecoin/stellitephp

A Stellite library written in PHP.

0.2 2018-10-22 13:57 UTC

This package is not auto-updated.

Last update: 2024-05-15 01:47:51 UTC


README

A Stellite library written in PHP fork from Monero Integrations team.

How To Use

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.

  1. A Stellite daemon JSON RPC API wrapper, ( \Stellite\Rpc\Daemon )

  2. A Stellite wallet (stellite-wallet-rpc) JSON RPC API wrapper, ( \Stellite\Rpc\Wallet )

  3. 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.

Preview

Preview

Documentation

Documentation can be found in the /docs folder.

Configuration

Requirements

  • 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.

Getting Started

  1. Start the Stellite daemon (stellited) on testnet.
stellited --testnet --detach
  1. 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
  1. Edit example.php with your the IP address of stellited and stellite-wallet-rpc (use 127.0.0.1:28081 and 127.0.0.1:28083, respectively, for testnet.)

  2. Serve example.php with 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.