Works with phoenixd 0.3.1
Javascript client for phoenixd nodes written using Typescript with full type support. Works in different Javascript runtimes including NodeJS and React Native.
npm install @nodana/phoenixd-js
import { Phoenixd, NodeInfo } from "@nodana/phoenixd-js";
const pxd = new Phoenixd(connectionUrl, password);
// async
const info: NodeInfo = await pxd.getInfo();
createInvoice({
description,
descriptionHash,
amountSat,
externalId,
});
payInvoice({ amountSat, invoice });
createOffer();
payOffer({ amountSat, offer, message });
payLnAddress({ amountSat, address, message });
sendToAddress({ amountSat, address, feeRateSatByte });
listIncomingPayments({ from, to, limit, offset, all, externalId });
getIncomingPayment(paymentHash);
listOutgoingPayments({ from, to, limit, offset, all });
getOutgoingPayment(paymentId);
getInfo();
getBalance();
listChannels();
closeChannel({ channelId, address, feeRateSatByte });
decodeInvoice({ invoice });
decodeOffer({ offer });
lnUrlPay({ amountSat, lnurl, message });
lnUrlWithdraw({ lnurl });
lnUrlAuth({ lnurl });
See https://phoenix.acinq.co/server/api for full API details.
Contributions to this project are welcomed:
- Fork repo
- Create feature branch
- Create PR
I will review as soon as possible.