@nodana/phoenixd-js
TypeScript icon, indicating that this package has built-in type declarations

0.4.3 • Public • Published

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:

  1. Fork repo
  2. Create feature branch
  3. Create PR

I will review as soon as possible.

Readme

Keywords

none

Package Sidebar

Install

npm i @nodana/phoenixd-js

Weekly Downloads

1

Version

0.4.3

License

ISC

Unpacked Size

47.4 kB

Total Files

39

Last publish

Collaborators

  • nodana-dev