utxo-one/lnd-php
最新稳定版本:v0.1.3
Composer 安装命令:
composer require utxo-one/lnd-php
包简介
An opinionated SDK for lncli commands via PHP
README 文档
README
A PHP SDK for the LND implementation of the Lightning Network
Installation
composer require utxo-one/lnd-php
Usage
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
// 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();
统计信息
- 总下载量: 879
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 4
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-11