|
|
77e5772afd
|
feat(extensions): add extension loader infrastructure (#3)
Docker Compose Actions Workflow / test (push) Waiting to run
## Summary
- Adds a modular extension system for Lightning.Pub enabling third-party plugins
- Provides isolated SQLite databases per extension for data safety
- Implements ExtensionContext API for accessing Lightning.Pub services (payments, Nostr, storage)
- Supports RPC method registration with automatic namespacing
- Includes HTTP route handling for protocols like LNURL
- Event routing for payment receipts and Nostr events
- Comprehensive documentation with architecture overview and working examples
## Key Components
- `src/extensions/types.ts` - Core extension interfaces
- `src/extensions/loader.ts` - Extension discovery, loading, and lifecycle management
- `src/extensions/context.ts` - Bridge between extensions and Lightning.Pub services
- `src/extensions/database.ts` - SQLite isolation with WAL mode
- `src/extensions/README.md` - Full documentation with examples
## ExtensionContext API
| Method | Description |
|--------|-------------|
| `getApplication()` | Get application info |
| `createInvoice()` | Create Lightning invoice |
| `payInvoice()` | Pay Lightning invoice |
| `getLnurlPayInfo()` | Get LNURL-pay info for a user (enables Lightning Address/zaps) |
| `sendEncryptedDM()` | Send Nostr DM (NIP-44) |
| `publishNostrEvent()` | Publish Nostr event |
| `registerMethod()` | Register RPC method |
| `onPaymentReceived()` | Subscribe to payment callbacks |
| `onNostrEvent()` | Subscribe to Nostr events |
## Test plan
- [x] Review extension loader code for correctness
- [x] Verify TypeScript compilation succeeds
- [x] Test extension discovery from `src/extensions/` directory
- [x] Test RPC method registration and routing
- [x] Test database isolation between extensions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: boufni95 <boufni95@gmail.com>
Co-authored-by: Patrick Mulligan <patjmulligan@protonmail.com>
Reviewed-on: #3
|
2026-04-02 18:47:55 +00:00 |
|
boufni95
|
169284021f
|
bump fee api
|
2026-03-04 17:19:42 +00:00 |
|
Justin (shocknet)
|
f0418fb389
|
Merge pull request #891 from shocknet/assets_liabilities
assets and liabilities
|
2026-02-27 00:42:29 -05:00 |
|
boufni95
|
ef14ec9ddf
|
assets and liabilities
|
2026-02-26 21:54:28 +00:00 |
|
boufni95
|
f8fe946b40
|
tx swaps polish
|
2026-02-24 18:36:03 +00:00 |
|
Mothana
|
c146d46c59
|
notification types and topic id
|
2026-02-20 17:08:38 +04:00 |
|
boufni95
|
edbbbd4aec
|
add time info to swaps
|
2026-02-17 18:12:33 +00:00 |
|
boufni95
|
f5eb1f3253
|
amount input
|
2026-02-02 21:15:42 +00:00 |
|
boufni95
|
3255730ae2
|
swap refunds
|
2026-01-30 20:37:44 +00:00 |
|
boufni95
|
d120ad7f99
|
admin swaps
|
2026-01-27 16:08:52 +00:00 |
|
boufni95
|
b356d804a2
|
fix typo and early return
|
2026-01-14 20:17:49 +00:00 |
|
boufni95
|
f6e425aed5
|
N swap services support
|
2026-01-14 19:39:27 +00:00 |
|
boufni95
|
9d082ea0a0
|
fix names
|
2026-01-12 17:08:35 +00:00 |
|
boufni95
|
008d11d047
|
list admin swaps + payment state fixes
|
2026-01-10 14:21:54 +00:00 |
|
boufni95
|
0a385188ae
|
admin swaps
|
2026-01-09 17:04:51 +00:00 |
|
boufni95
|
824e98f007
|
fixes and cleanup
|
2025-12-18 20:45:47 +00:00 |
|
boufni95
|
e2dec7d9b3
|
fixies
|
2025-12-15 17:13:50 +00:00 |
|
boufni95
|
5dd03063ff
|
list swaps
|
2025-12-03 17:05:42 +00:00 |
|
boufni95
|
7dc49e3f50
|
Merge branch 'provider-fixes' into swaps-test
|
2025-11-28 16:24:00 +00:00 |
|
boufni95
|
9e3086df0d
|
expected fees
|
2025-11-26 18:57:55 +00:00 |
|
boufni95
|
31751d83c3
|
service fee only
|
2025-11-26 16:26:30 +00:00 |
|
boufni95
|
f7c26ee38a
|
fix payment stream
|
2025-11-24 18:41:19 +00:00 |
|
boufni95
|
8e4a8b2a2a
|
provider: wire beacon + return balance + use cached balance
|
2025-11-21 16:45:29 +00:00 |
|
boufni95
|
c8ede119d6
|
payment stream + unreachable provider + fess calc fix
|
2025-11-19 15:46:35 +00:00 |
|
boufni95
|
9b5d5e4105
|
add pub fee to quote
|
2025-11-11 20:05:06 +00:00 |
|
boufni95
|
f20d40e44f
|
swaps wired
|
2025-11-11 19:51:07 +00:00 |
|
boufni95
|
a93aafc8ee
|
optional blind
|
2025-10-06 17:56:13 +00:00 |
|
shocknet-justin
|
7fc314e002
|
draft blinded paths
|
2025-10-04 10:07:23 -04:00 |
|
boufni95
|
c85ea7ff57
|
fix initial invoice ack
|
2025-09-23 18:43:48 +00:00 |
|
boufni95
|
8b0e56f215
|
clink exp and desc
|
2025-09-16 18:16:35 +00:00 |
|
Mothana
|
c04442a008
|
Merge remote-tracking branch 'origin/master' into notifications
|
2025-07-25 19:31:19 +04:00 |
|
boufni95
|
c18f71c548
|
store and use notifications token
|
2025-07-23 15:45:42 +00:00 |
|
Mothana
|
44870aa667
|
user_receiving_invoice multi column index, and timestamp + serial_id cursor
|
2025-07-22 17:58:31 +04:00 |
|
Mothana
|
8005b2a3ff
|
rfc 6570 callback templates and callback bearer tokens
|
2025-07-13 21:17:21 +04:00 |
|
boufni95
|
7a0013527b
|
grant reset
|
2025-07-09 15:37:13 +00:00 |
|
boufni95
|
acfe5099e6
|
nmanage in user info
|
2025-07-08 17:26:06 +00:00 |
|
boufni95
|
df088bf0fe
|
manage authorization
|
2025-07-08 15:41:41 +00:00 |
|
boufni95
|
67896c81ec
|
last seen inactive chan
|
2025-06-24 15:05:57 +00:00 |
|
boufni95
|
a5be3a97e8
|
get fw events
|
2025-06-17 14:17:50 +00:00 |
|
boufni95
|
ed6036ce1e
|
add alerter endpoints
|
2025-05-14 18:59:00 +00:00 |
|
boufni95
|
cf9a10ded4
|
fix path
|
2025-04-10 17:16:48 +00:00 |
|
boufni95
|
b18eab9d20
|
fix auth type
|
2025-04-10 17:04:58 +00:00 |
|
boufni95
|
67c1260748
|
reset metrics b4 stress test and export after
|
2025-04-10 16:47:26 +00:00 |
|
boufni95
|
c0f137d996
|
single bundle metrics
|
2025-02-06 16:15:17 +00:00 |
|
boufni95
|
531947a497
|
bundle metrics
|
2025-02-04 20:13:41 +00:00 |
|
boufni95
|
21d6ed1966
|
req id
|
2025-01-29 16:03:07 +00:00 |
|
boufni95
|
e7aef1e3ab
|
wrtc test
|
2025-01-27 21:16:53 +00:00 |
|
boufni95
|
eadc956c4c
|
paged single metrics
|
2025-01-17 18:43:27 +00:00 |
|
boufni95
|
db3c27c7f2
|
fetch single metric
|
2025-01-17 17:54:50 +00:00 |
|
boufni95
|
16d4198364
|
error rates
|
2025-01-09 17:42:54 +00:00 |
|