@nodana/phoenixd-ts 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,7 @@
1
+ # License
2
+
3
+ Copyright (c) 2024, Nodana, Inc.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,224 @@
1
+ **Supports phoenixd 0.8.0**
2
+
3
+ # Phoenixd TypeScript Client
4
+
5
+ TypeScript client for phoenixd nodes with generated declaration files. Works in different JavaScript runtimes including Node.js and React Native.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @nodana/phoenixd-ts
11
+ ```
12
+
13
+ ## Getting Started
14
+
15
+ ```ts
16
+ import { Phoenixd } from "@nodana/phoenixd-ts";
17
+ import type { NodeInfo } from "@nodana/phoenixd-ts";
18
+
19
+ const pxd = new Phoenixd(connectionUrl, password);
20
+
21
+ // async
22
+ const info: NodeInfo = await pxd.getInfo();
23
+ ```
24
+
25
+ ## Types
26
+
27
+ This package ships generated TypeScript declarations from the source.
28
+
29
+ ```ts
30
+ import { Phoenixd } from "@nodana/phoenixd-ts";
31
+ import type {
32
+ Balance,
33
+ BumpFeeParams,
34
+ CloseChannelParams,
35
+ CreateInvoiceParams,
36
+ PhoenixdClient,
37
+ CreateInvoiceResponse,
38
+ CreateOfferParams,
39
+ EstimateLiquidityFeesParams,
40
+ ExportPaymentsParams,
41
+ IncomingPayment,
42
+ ListChannelsResponse,
43
+ ListIncomingPaymentsParams,
44
+ ListOutgoingPaymentsParams,
45
+ LnUrlWithdrawal,
46
+ NodeInfo,
47
+ OutgoingPayment,
48
+ Payment,
49
+ PayInvoiceParams,
50
+ PayLnAddressParams,
51
+ PayOfferParams,
52
+ SendToAddressParams,
53
+ WebsocketPayment,
54
+ } from "@nodana/phoenixd-ts";
55
+ ```
56
+
57
+ Request and response types are exported from the package root. `WebsocketPayment`
58
+ is included as a type only; websocket connection management is left to consuming
59
+ applications.
60
+
61
+ ## Methods
62
+
63
+ ### Create Invoice
64
+
65
+ ```ts
66
+ createInvoice({
67
+ description,
68
+ descriptionHash,
69
+ amountSat,
70
+ expirySeconds,
71
+ externalId,
72
+ webhookUrl,
73
+ });
74
+ ```
75
+
76
+ ### Pay Invoice
77
+
78
+ ```ts
79
+ payInvoice({ invoice, amountSat, sendAll });
80
+ ```
81
+
82
+ ### Create Offer
83
+
84
+ ```ts
85
+ createOffer({ description, amountSat });
86
+ ```
87
+
88
+ ### Pay Offer
89
+
90
+ ```ts
91
+ payOffer({ offer, amountSat, sendAll, message });
92
+ ```
93
+
94
+ ### Pay Lightning Address
95
+
96
+ ```ts
97
+ payLnAddress({ address, amountSat, sendAll, message });
98
+ ```
99
+
100
+ ### Send To Address
101
+
102
+ ```ts
103
+ sendToAddress({ amountSat, address, feerateSatByte });
104
+ ```
105
+
106
+ ### Bump Fee
107
+
108
+ ```ts
109
+ bumpFee({ feerateSatByte });
110
+ ```
111
+
112
+ ### List Incoming Payments
113
+
114
+ ```ts
115
+ listIncomingPayments({ from, to, limit, offset, all, externalId });
116
+ ```
117
+
118
+ ### Get Incoming Payment
119
+
120
+ ```ts
121
+ getIncomingPayment(paymentHash);
122
+ ```
123
+
124
+ ### List Outgoing Payments
125
+
126
+ ```ts
127
+ listOutgoingPayments({ from, to, limit, offset, all });
128
+ ```
129
+
130
+ ### Get Outgoing Payment
131
+
132
+ ```ts
133
+ getOutgoingPayment(paymentId);
134
+ ```
135
+
136
+ ### Get Outgoing Payment By Hash
137
+
138
+ ```ts
139
+ getOutgoingPaymentByHash(paymentHash);
140
+ ```
141
+
142
+ ### Export Payments
143
+
144
+ ```ts
145
+ exportPayments({ from, to });
146
+ ```
147
+
148
+ ### Get Client Info
149
+
150
+ ```ts
151
+ getInfo();
152
+ ```
153
+
154
+ ### Get Balance
155
+
156
+ ```ts
157
+ getBalance();
158
+ ```
159
+
160
+ ### Get Lightning Address
161
+
162
+ ```ts
163
+ getLightningAddress();
164
+ ```
165
+
166
+ ### List Channels
167
+
168
+ ```ts
169
+ listChannels();
170
+ ```
171
+
172
+ ### Close Channel
173
+
174
+ ```ts
175
+ closeChannel({ channelId, address, feerateSatByte });
176
+ ```
177
+
178
+ ### Decode Invoice
179
+
180
+ ```ts
181
+ decodeInvoice({ invoice });
182
+ ```
183
+
184
+ ### Decode Offer
185
+
186
+ ```ts
187
+ decodeOffer({ offer });
188
+ ```
189
+
190
+ ### Estimate Liquidity Fees
191
+
192
+ ```ts
193
+ estimateLiquidityFees({ amountSat });
194
+ ```
195
+
196
+ ### LN-URL Pay
197
+
198
+ ```ts
199
+ lnUrlPay({ lnurl, amountSat, sendAll, message });
200
+ ```
201
+
202
+ ### LN-URL Withdraw
203
+
204
+ ```ts
205
+ lnUrlWithdraw({ lnurl });
206
+ ```
207
+
208
+ ### LN-URL Auth
209
+
210
+ ```ts
211
+ lnUrlAuth({ lnurl });
212
+ ```
213
+
214
+ See https://phoenix.acinq.co/server/api for full API details.
215
+
216
+ ## Contributing
217
+
218
+ Contributions to this project are welcomed:
219
+
220
+ 1. Fork repo
221
+ 2. Create feature branch
222
+ 3. Create PR
223
+
224
+ I will review as soon as possible.
@@ -0,0 +1,20 @@
1
+ export declare class HttpClientError extends Error {
2
+ status: number;
3
+ statusText: string;
4
+ body: string;
5
+ constructor(status: number, statusText: string, body: string);
6
+ }
7
+ export interface IHttpClient {
8
+ get(path: string): Promise<any>;
9
+ post(path: string, data: any): Promise<any>;
10
+ }
11
+ export declare class HttpClient implements IHttpClient {
12
+ private url;
13
+ private password;
14
+ private headers;
15
+ constructor(url: string, password: string);
16
+ private _setHeaders;
17
+ private _call;
18
+ get(path: string): Promise<any>;
19
+ post(path: string, data: any): Promise<any>;
20
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpClient = exports.HttpClientError = void 0;
4
+ const utils_1 = require("./utils");
5
+ class HttpClientError extends Error {
6
+ constructor(status, statusText, body) {
7
+ super(`Request failed with status ${status}: ${body || statusText}`);
8
+ this.name = "HttpClientError";
9
+ this.status = status;
10
+ this.statusText = statusText;
11
+ this.body = body;
12
+ }
13
+ }
14
+ exports.HttpClientError = HttpClientError;
15
+ class HttpClient {
16
+ constructor(url, password) {
17
+ this.url = url;
18
+ this.password = password;
19
+ this.headers = {};
20
+ this._setHeaders();
21
+ }
22
+ _setHeaders() {
23
+ this.headers = {
24
+ Authorization: "Basic " + (0, utils_1.base64Encode)(":" + this.password),
25
+ "Content-Type": "application/x-www-form-urlencoded",
26
+ };
27
+ }
28
+ async _call(path, method, data) {
29
+ try {
30
+ const options = {
31
+ method,
32
+ headers: this.headers,
33
+ };
34
+ if (data) {
35
+ options.body = Object.keys(data)
36
+ .filter((key) => data[key] !== undefined && data[key] !== null)
37
+ .map((key) => {
38
+ const value = data[key] instanceof Date ? data[key].getTime() : data[key];
39
+ return (encodeURIComponent(key) + "=" + encodeURIComponent(value));
40
+ })
41
+ .join("&");
42
+ }
43
+ const response = await fetch(`${this.url}${path}`, options);
44
+ const responseText = await response.text();
45
+ if (!response.ok) {
46
+ throw new HttpClientError(response.status, response.statusText, responseText);
47
+ }
48
+ try {
49
+ return JSON.parse(responseText);
50
+ }
51
+ catch (_a) {
52
+ return responseText;
53
+ }
54
+ }
55
+ catch (e) {
56
+ throw e;
57
+ }
58
+ }
59
+ get(path) {
60
+ return this._call(path, "GET");
61
+ }
62
+ post(path, data) {
63
+ return this._call(path, "POST", data);
64
+ }
65
+ }
66
+ exports.HttpClient = HttpClient;
67
+ //# sourceMappingURL=HttpClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpClient.js","sourceRoot":"","sources":["../../src/HttpClient.ts"],"names":[],"mappings":";;;AAAA,mCAAuC;AAEvC,MAAa,eAAgB,SAAQ,KAAK;IAKxC,YAAY,MAAc,EAAE,UAAkB,EAAE,IAAY;QAC1D,KAAK,CAAC,8BAA8B,MAAM,KAAK,IAAI,IAAI,UAAU,EAAE,CAAC,CAAC;QACrE,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAZD,0CAYC;AAOD,MAAa,UAAU;IAOrB,YAAY,GAAW,EAAE,QAAgB;QACvC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAElB,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAEO,WAAW;QACjB,IAAI,CAAC,OAAO,GAAG;YACb,aAAa,EAAE,QAAQ,GAAG,IAAA,oBAAY,EAAC,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC3D,cAAc,EAAE,mCAAmC;SACpD,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,KAAK,CAAC,IAAY,EAAE,MAAc,EAAE,IAAU;QAC1D,IAAI,CAAC;YACH,MAAM,OAAO,GAAQ;gBACnB,MAAM;gBACN,OAAO,EAAE,IA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AAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACjC,CAAC;IAEM,IAAI,CAAC,IAAY,EAAE,IAAS;QACjC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACxC,CAAC;CACF;AAtED,gCAsEC"}
@@ -0,0 +1,32 @@
1
+ import type { PhoenixdClient, CreateInvoiceParams, CreateOfferParams, PayInvoiceParams, PayOfferParams, CloseChannelParams, BumpFeeParams, ExportPaymentsParams, EstimateLiquidityFeesParams, PayLnAddressParams, SendToAddressParams, ListIncomingPaymentsParams, ListOutgoingPaymentsParams, DecodeInvoiceParams, DecodeOfferParams, lnUrlPayParams, lnUrlWithdrawParams, lnUrlAuthParams } from "./types";
2
+ export declare class Phoenixd implements PhoenixdClient {
3
+ url: string;
4
+ password: string;
5
+ private _httpClient;
6
+ constructor(url: string, password: string);
7
+ createInvoice(params: CreateInvoiceParams): Promise<any>;
8
+ payInvoice(params: PayInvoiceParams): Promise<any>;
9
+ createOffer(params?: CreateOfferParams): Promise<any>;
10
+ payOffer(params: PayOfferParams): Promise<any>;
11
+ payLnAddress(params: PayLnAddressParams): Promise<any>;
12
+ sendToAddress(params: SendToAddressParams): Promise<any>;
13
+ bumpFee(params: BumpFeeParams): Promise<any>;
14
+ listIncomingPayments(params?: ListIncomingPaymentsParams): Promise<any>;
15
+ getIncomingPayment(paymentHash: string): Promise<any>;
16
+ listOutgoingPayments(params?: ListOutgoingPaymentsParams): Promise<any>;
17
+ getOutgoingPayment(paymentId: string): Promise<any>;
18
+ getOutgoingPaymentByHash(paymentHash: string): Promise<any>;
19
+ exportPayments(params?: ExportPaymentsParams): Promise<any>;
20
+ getInfo(): Promise<any>;
21
+ getBalance(): Promise<any>;
22
+ getLightningAddress(): Promise<any>;
23
+ listChannels(): Promise<any>;
24
+ closeChannel(params: CloseChannelParams): Promise<any>;
25
+ decodeInvoice(params: DecodeInvoiceParams): Promise<any>;
26
+ decodeOffer(params: DecodeOfferParams): Promise<any>;
27
+ estimateLiquidityFees(params: EstimateLiquidityFeesParams): Promise<any>;
28
+ lnUrlPay(params: lnUrlPayParams): Promise<any>;
29
+ lnUrlWithdraw(params: lnUrlWithdrawParams): Promise<any>;
30
+ lnUrlAuth(params: lnUrlAuthParams): Promise<any>;
31
+ private _toQueryString;
32
+ }
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Phoenixd = void 0;
4
+ const HttpClient_1 = require("./HttpClient");
5
+ class Phoenixd {
6
+ constructor(url, password) {
7
+ this.url = url;
8
+ this.password = password;
9
+ this._httpClient = new HttpClient_1.HttpClient(url, password);
10
+ }
11
+ async createInvoice(params) {
12
+ if (!params.description && !params.descriptionHash) {
13
+ console.info("Either 'description' or 'descriptionHash' must be provided");
14
+ return;
15
+ }
16
+ return this._httpClient.post("/createinvoice", params);
17
+ }
18
+ async payInvoice(params) {
19
+ return this._httpClient.post("/payinvoice", params);
20
+ }
21
+ async createOffer(params) {
22
+ return this._httpClient.post("/createoffer", params !== null && params !== void 0 ? params : {});
23
+ }
24
+ async payOffer(params) {
25
+ return this._httpClient.post("/payoffer", params);
26
+ }
27
+ async payLnAddress(params) {
28
+ return this._httpClient.post("/paylnaddress", params);
29
+ }
30
+ async sendToAddress(params) {
31
+ return this._httpClient.post("/sendtoaddress", params);
32
+ }
33
+ async bumpFee(params) {
34
+ return this._httpClient.post("/bumpfee", params);
35
+ }
36
+ async listIncomingPayments(params) {
37
+ let path = "/payments/incoming";
38
+ if (params) {
39
+ const qs = this._toQueryString(params);
40
+ path += `?${qs}`;
41
+ }
42
+ return this._httpClient.get(path);
43
+ }
44
+ async getIncomingPayment(paymentHash) {
45
+ return this._httpClient.get(`/payments/incoming/${paymentHash}`);
46
+ }
47
+ async listOutgoingPayments(params) {
48
+ let path = "/payments/outgoing";
49
+ if (params) {
50
+ const qs = this._toQueryString(params);
51
+ path += `?${qs}`;
52
+ }
53
+ return this._httpClient.get(path);
54
+ }
55
+ async getOutgoingPayment(paymentId) {
56
+ return this._httpClient.get(`/payments/outgoing/${paymentId}`);
57
+ }
58
+ async getOutgoingPaymentByHash(paymentHash) {
59
+ return this._httpClient.get(`/payments/outgoingbyhash/${paymentHash}`);
60
+ }
61
+ async exportPayments(params) {
62
+ return this._httpClient.post("/export", params !== null && params !== void 0 ? params : {});
63
+ }
64
+ async getInfo() {
65
+ return this._httpClient.get("/getinfo");
66
+ }
67
+ async getBalance() {
68
+ return this._httpClient.get("/getbalance");
69
+ }
70
+ async getLightningAddress() {
71
+ return this._httpClient.get("/getlnaddress");
72
+ }
73
+ async listChannels() {
74
+ return this._httpClient.get("/listchannels");
75
+ }
76
+ async closeChannel(params) {
77
+ return this._httpClient.post("/closechannel", params);
78
+ }
79
+ async decodeInvoice(params) {
80
+ return this._httpClient.post("/decodeinvoice", params);
81
+ }
82
+ async decodeOffer(params) {
83
+ return this._httpClient.post("/decodeoffer", params);
84
+ }
85
+ async estimateLiquidityFees(params) {
86
+ const qs = this._toQueryString(params);
87
+ return this._httpClient.get(`/estimateliquidityfees?${qs}`);
88
+ }
89
+ async lnUrlPay(params) {
90
+ return this._httpClient.post("/lnurlpay", params);
91
+ }
92
+ async lnUrlWithdraw(params) {
93
+ return this._httpClient.post("/lnurlwithdraw", params);
94
+ }
95
+ async lnUrlAuth(params) {
96
+ return this._httpClient.post("/lnurlauth", params);
97
+ }
98
+ _toQueryString(params) {
99
+ const searchParams = new URLSearchParams();
100
+ Object.entries(params).forEach(([key, value]) => {
101
+ if (value === undefined || value === null) {
102
+ return;
103
+ }
104
+ searchParams.append(key, value instanceof Date ? value.getTime().toString() : String(value));
105
+ });
106
+ return searchParams.toString();
107
+ }
108
+ }
109
+ exports.Phoenixd = Phoenixd;
110
+ //# sourceMappingURL=Phoenixd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Phoenixd.js","sourceRoot":"","sources":["../../src/Phoenixd.ts"],"names":[],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AAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,MAAuB;QAC5C,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IACrD,CAAC;IAEO,cAAc,CAAC,MAA2B;QAChD,MAAM,YAAY,GAAG,IAAI,eAAe,EAAE,CAAC;QAE3C,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC9C,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBAC1C,OAAO;YACT,CAAC;YAED,YAAY,CAAC,MAAM,CACjB,GAAG,EACH,KAAK,YAAY,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACnE,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,YAAY,CAAC,QAAQ,EAAE,CAAC;IACjC,CAAC;CACF;AAjJD,4BAiJC"}
@@ -0,0 +1,2 @@
1
+ export { Phoenixd } from "./Phoenixd";
2
+ export * from "./types";
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Phoenixd = void 0;
18
+ // Export Pxd client
19
+ var Phoenixd_1 = require("./Phoenixd");
20
+ Object.defineProperty(exports, "Phoenixd", { enumerable: true, get: function () { return Phoenixd_1.Phoenixd; } });
21
+ // Export types
22
+ __exportStar(require("./types"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oBAAoB;AACpB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AAEjB,eAAe;AACf,0CAAwB"}