PHPackages                             thorie7912/lightning-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. thorie7912/lightning-php

ActiveLibrary[API Development](/categories/api)

thorie7912/lightning-php
========================

PHP interface for the elements/c-lightning RPC API

v1.0.3(7y ago)4201MITPHPPHP &gt;=5.3

Since Oct 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/thorie7912/lightning-php)[ Packagist](https://packagist.org/packages/thorie7912/lightning-php)[ Docs](https://github.com/thorie7912/lightning-php)[ RSS](/packages/thorie7912-lightning-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

lightning-php
=============

[](#lightning-php)

PHP interface for the elements/c-lightning RPC API

Installation
------------

[](#installation)

`composer require thorie7912/lightning-php:^1.0`

Usage
-----

[](#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);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

2758d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bdf905a9ea38ad80789afd03441913e779d5a5b319568acfb1db37c06763f1a4?d=identicon)[thorie7912](/maintainers/thorie7912)

---

Top Contributors

[![microlancer](https://avatars.githubusercontent.com/u/869094?v=4)](https://github.com/microlancer "microlancer (7 commits)")

---

Tags

bitcoinc-lightninglightning-networkapirpcbitcoinLightningc-lightning

### Embed Badge

![Health badge](/badges/thorie7912-lightning-php/health.svg)

```
[![Health](https://phpackages.com/badges/thorie7912-lightning-php/health.svg)](https://phpackages.com/packages/thorie7912-lightning-php)
```

###  Alternatives

[sajya/server

Easy implementation of the JSON-RPC 2.0 server for the Laravel framework.

2391.9M4](/packages/sajya-server)[sajya/client

HTTP client and server for JSON-RPC 2.0

21996.6k](/packages/sajya-client)[tbondois/odoo-ripcord

Ripoo : a PHP8 XML-RPC client handler for Odoo External API

16124.3k1](/packages/tbondois-odoo-ripcord)[ufo-tech/rpc-exceptions

Exception package RPC server error codes

164.2k4](/packages/ufo-tech-rpc-exceptions)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
