PHP code example of inpay / lnd-client
1. Go to this page and download the library: Download inpay/lnd-client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
inpay / lnd-client example snippets
use LightningSale\LndClient\ClientFactory;
use Psr\Log\NullLogger;
= '127.0.0.1';
$rpcPort = '8080';
$tlsCert = '/root/.lnd/tls.cert';
$macaroon = '/root/.lnd/admin.macaroon';
$client = ClientFactory::createRestClient($rpcHost, $rpcPort, $tlsCert, $macaroon, new NullLogger());
var_dump($client->getInfo());