Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/utxo-one/lnd-php
PHP SDK for LND
https://github.com/utxo-one/lnd-php
bitcoin lightning lightning-network lnd php8 rest rest-api sdk sdk-php
Last synced: 2 months ago
JSON representation
PHP SDK for LND
- Host: GitHub
- URL: https://github.com/utxo-one/lnd-php
- Owner: utxo-one
- Created: 2022-11-05T16:52:27.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-18T19:04:18.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T20:37:23.701Z (3 months ago)
- Topics: bitcoin, lightning, lightning-network, lnd, php8, rest, rest-api, sdk, sdk-php
- Language: PHP
- Homepage:
- Size: 108 KB
- Stars: 13
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## PHP-LND (ALPHA RELEASE)
A PHP SDK for the LND implementation of the Lightning Network
### Installation
```
composer require utxo-one/lnd-php
```### Usage
```php
use UtxoOne\LndPhp\Services\LightningService;// Initialize an LND Instance.
$lightningService = new LightningService(
host: $this->host,
port: $this->port,
macaroonHex: $this->macaroonHex,
tlsCertificat: $this->tlsCertificate,
);// Execute a command. ie getinfo
$nodeInfo = $lightningService->getInfo();// Get the results
$nodeInfo->getVersion();
$nodeInfo->getCommitHash();
$nodeInfo->getIdentityPubkey();
$nodeInfo->getAlias();
$nodeInfo->getNumPendingChannels();
$nodeInfo->getNumActiveChannels();
$nodeInfo->getNumPeers();
$nodeInfo->getBlockHash();
$nodeInfo->getBlockHeight();
$nodeInfo->getUris();
$nodeInfo->getBestHeaderTimestamp();
$nodeInfo->isSyncedToChain();
$nodeInfo->isTestnet();
$nodeInfo->requiresHtlcInterceptor();
```### Available Methods
```php
// Lightning Service
$lightningService->getInfo();
$lightningService->abandonChannel();
$lightningService->addInvoice();
$lightningService->bakeMacaroon();
$lightningService->batchOpenChannel();
$lightningService->channelAcceptor();
$lightningService->channelBalance();
$lightningService->checkMacaroonPermissions();
$lightningService->closeChannel();
$lightningService->closedChannels();
$lightningService->lookupInvoice();
$lightningService->sendCoins();
$lightningService->sendMany();
$lightningService->getInfo();// WalletKit Service
$walletKitService->nextAddr();
$walletKitService->listAddresses();
$walletKitService->listUnspent();
```