thorie7912/lightning-php
Composer 安装命令:
composer require thorie7912/lightning-php
包简介
PHP interface for the elements/c-lightning RPC API
README 文档
README
PHP interface for the elements/c-lightning RPC API
Installation
composer require thorie7912/lightning-php:^1.0
Usage
$lightningApi = new \Lightning\LightningApi(); $lightningApi->setRpcFile("/home/user/.lightning/lightning-rpc"); // Get info $json = $lightningApi->getInfo(); echo json_encode($json, JSON_PRETTY_PRINT); // Pay invoice $invoice = "ln123xyz..."; $json = $lightningApi->pay($invoice); echo json_encode($json, JSON_PRETTY_PRINT); // Create invoice $msatoshi = 50000; $label = "Some label"; $description = "Some description"; $json = $lightningApi->createinvoice($msatoshi, $label, $description); echo json_encode($json, JSON_PRETTY_PRINT);
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-26