@nodana/phoenixd-js
v0.4.3
Published
A NodeJS client for Phoenixd Lightning nodes
Downloads
25
Readme
Works with phoenixd 0.3.1
Phoenxid NodeJS Client
Javascript client for phoenixd nodes written using Typescript with full type support. Works in different Javascript runtimes including NodeJS and React Native.
Installation
npm install @nodana/phoenixd-js
Getting Started
import { Phoenixd, NodeInfo } from "@nodana/phoenixd-js";
const pxd = new Phoenixd(connectionUrl, password);
// async
const info: NodeInfo = await pxd.getInfo();
Methods
Create Invoice
createInvoice({
description,
descriptionHash,
amountSat,
externalId,
});
Pay Invoice
payInvoice({ amountSat, invoice });
Create Offer
createOffer();
Pay Offer
payOffer({ amountSat, offer, message });
Pay Lightning Address
payLnAddress({ amountSat, address, message });
Send To Address
sendToAddress({ amountSat, address, feeRateSatByte });
List Incoming Payments
listIncomingPayments({ from, to, limit, offset, all, externalId });
Get Incoming Payment
getIncomingPayment(paymentHash);
List Outgoing Payments
listOutgoingPayments({ from, to, limit, offset, all });
Get Outgoing Payment
getOutgoingPayment(paymentId);
Get Client Info
getInfo();
Get Balance
getBalance();
List Channels
listChannels();
Close Channel
closeChannel({ channelId, address, feeRateSatByte });
Decode Invoice
decodeInvoice({ invoice });
Decode Offer
decodeOffer({ offer });
LN-URL Pay
lnUrlPay({ amountSat, lnurl, message });
LN-URL Withdraw
lnUrlWithdraw({ lnurl });
LN-URL Auth
lnUrlAuth({ lnurl });
See https://phoenix.acinq.co/server/api for full API details.
Contributing
Contributions to this project are welcomed:
- Fork repo
- Create feature branch
- Create PR
I will review as soon as possible.