Overview
Since kaleido-sdk 0.1.9, the SDK ships a Nostr Wallet Connect (NIP-47) client on thekaleido-sdk/nwc subpath. It lets a client app drive a remote wallet service — for example the
KaleidoSwap desktop hub running an RGB Lightning Node — over a Nostr relay, without a direct HTTP
connection to the node.
On top of the standard NIP-47 wallet methods, the client adds rln* RGB Lightning extension
methods so you can read balances, manage RGB assets, and open invoices on the remote node through
the same encrypted NWC transport.
Transport is end-to-end encrypted with NIP-44, falling back to NIP-04 when the wallet
service does not advertise NIP-44 support.
Connecting
You need an NWC connection URI (nostr+walletconnect://...) issued by the wallet service.
parseNwcUri(uri) is exported if you need to inspect a URI (relay, wallet pubkey, secret) before
connecting, and NwcError is thrown on protocol/timeout failures.
Standard wallet methods (NIP-47)
RGB Lightning Node extension methods
These map RLN operations over the same NWC connection:Running the full RLN client over NWC
If you already use theRlnClient against an HTTP nodeUrl, you can swap the
transport for NWC instead — same client surface, routed over Nostr:
NwcRlnNodeClient is the underlying transport if you need to construct it directly.
When to use NWC vs HTTP
HTTP (nodeUrl) | NWC | |
|---|---|---|
| Connectivity | Direct reachability to the node’s REST API | Works through a Nostr relay — no inbound port / public node URL needed |
| Auth | API key / Authorization header | NWC connection secret, encrypted (NIP-44/04) |
| Best for | Server-side and same-network integrations | Remote control of a user’s node (e.g. the desktop hub) over the open internet |