Skip to content

electronero-project/electronero-network-php-sdk

Repository files navigation

Electronero Network PHP Library (lite)

A Electronero library written in PHP by the Monero Integrations team.

Forked by Interchained for Electronero Network](https://github.com/electronero/electronero)
Thank you Monero Intergrations
This is compatible with all of Electronero Network coins: ETNX, ETNXP, LTNX, GLDX, and CRFI.
Each coin has their own PHP wrapper

Telegram: https://t.me/electronero
Twitter: https://twitter.com/_electronero

Daemon Docs > https://github.com/electronero/electronero-php-sdk/blob/master/electronerophp/docs/daemonRPC.md
Wallet Docs > https://github.com/electronero/electronero-php-sdk/blob/master/electronerophp/docs/walletRPC.md </br


How It Works

This library has 4 main parts, for each native electronero coin we need the appropriate daemonRPC, and walletRPC PHP files and a single jsonRPCClient.php & cryptonote.php:

  1. A Electronero daemon JSON RPC API wrapper, daemonRPC.php
  2. A Electronero wallet (electronero-wallet-rpc) JSON RPC API wrapper, walletRPC.php
  3. A Electronero/Cryptonote toolbox, cryptonote.php, with both lower level functions used in Electronero related cryptography and higher level methods for things like generating Monero private/public keys.
  4. jsonRPCClient.php Written using the JSON RPC specification.

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

  • Electronero daemon (electronerod, pulsed, litenerod, goldnerod, crystaleumd)
  • 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

example with electronerod, repeat the process for each native electronero network coin with their matching DaemonRPC and WalletRPC.

  1. Start the Electronero daemon (electronerod) on testnet.
electronerod --testnet --detach
  1. Start the Monero wallet RPC interface (monero-wallet-rpc) on testnet.
electronero-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 electronerod and monero-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 Electronero daemon and wallet will be displayed.