Skip to content

Commit 1ad5a5e

Browse files
authored
Merge pull request #63 from lightninglabs/main
[Releases] v0.1.12-alpha
2 parents 53ca96d + 55a1670 commit 1ad5a5e

File tree

33 files changed

+3034
-1004
lines changed

33 files changed

+3034
-1004
lines changed

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.github/**
22
demos/**
33
dist/**
4-
lib/types/**
54
lib/wasm_exec.js
65
package-lock.json
76
package.json

lib/lnc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { snakeKeysToCamel } from './util/objects';
66

77
/** The default values for the LncConfig options */
88
const DEFAULT_CONFIG = {
9-
wasmClientCode: 'https://lightning.engineering/lnc-v0.1.11-alpha.wasm',
9+
wasmClientCode: 'https://lightning.engineering/lnc-v0.1.12-alpha.wasm',
1010
namespace: 'default',
1111
serverHost: 'mailbox.terminal.lightning.today:443'
1212
} as Required<LncConfig>;

lib/types/proto/faraday/faraday.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ export enum FiatBackend {
3232
* https://api.coindesk.com/v1/bpi/historical/close.json
3333
*/
3434
COINDESK = 'COINDESK',
35+
/** CUSTOM - Use custom price data provided in a CSV file for fiat price information. */
36+
CUSTOM = 'CUSTOM',
37+
/**
38+
* COINGECKO - Use the CoinGecko API for fiat price information.
39+
* This API is reached through the following URL:
40+
* https://api.coingecko.com/api/v3/coins/bitcoin/market_chart
41+
*/
42+
COINGECKO = 'COINGECKO',
3543
UNRECOGNIZED = 'UNRECOGNIZED'
3644
}
3745

@@ -298,6 +306,8 @@ export interface ExchangeRateRequest {
298306
granularity: Granularity;
299307
/** The api to be used for fiat related queries. */
300308
fiatBackend: FiatBackend;
309+
/** Custom price points to use if the CUSTOM FiatBackend option is set. */
310+
customPrices: BitcoinPrice[];
301311
}
302312

303313
export interface ExchangeRateResponse {
@@ -310,6 +320,8 @@ export interface BitcoinPrice {
310320
price: string;
311321
/** The timestamp for this price price provided. */
312322
priceTimestamp: string;
323+
/** The currency that the price is denoted in. */
324+
currency: string;
313325
}
314326

315327
export interface ExchangeRate {
@@ -344,6 +356,8 @@ export interface NodeAuditRequest {
344356
customCategories: CustomCategory[];
345357
/** The api to be used for fiat related queries. */
346358
fiatBackend: FiatBackend;
359+
/** Custom price points to use if the CUSTOM FiatBackend option is set. */
360+
customPrices: BitcoinPrice[];
347361
}
348362

349363
export interface CustomCategory {
@@ -397,13 +411,16 @@ export interface ReportEntry {
397411
customCategory: string;
398412
/** The transaction id of the entry. */
399413
txid: string;
400-
/** The fiat amount of the entry's amount in USD. */
414+
/**
415+
* The fiat amount of the entry's amount in the currency specified in the
416+
* btc_price field.
417+
*/
401418
fiat: string;
402419
/** A unique identifier for the entry, if available. */
403420
reference: string;
404421
/** An additional note for the entry, providing additional context. */
405422
note: string;
406-
/** The bitcoin price and timestamp used to calcualte our fiat value. */
423+
/** The bitcoin price and timestamp used to calculate our fiat value. */
407424
btcPrice: BitcoinPrice | undefined;
408425
}
409426

lib/types/proto/lnd/chainrpc/chainnotifier.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ export interface SpendRequest {
6868
/**
6969
* The outpoint for which we should request a spend notification for. If set to
7070
* a zero outpoint, then the spend notification will be requested for the
71-
* script instead.
71+
* script instead. A zero or nil outpoint is not supported for Taproot spends
72+
* because the output script cannot reliably be computed from the witness alone
73+
* and the spent output script is not always available in the rescan context.
74+
* So an outpoint must _always_ be specified when registering a spend
75+
* notification for a Taproot output.
7276
*/
7377
outpoint: Outpoint | undefined;
7478
/**
@@ -128,9 +132,11 @@ export interface ChainNotifier {
128132
* registers an intent for a client to be notified once a confirmation request
129133
* has reached its required number of confirmations on-chain.
130134
*
131-
* A client can specify whether the confirmation request should be for a
132-
* particular transaction by its hash or for an output script by specifying a
133-
* zero hash.
135+
* A confirmation request must have a valid output script. It is also possible
136+
* to give a transaction ID. If the transaction ID is not set, a notification
137+
* is sent once the output script confirms. If the transaction ID is also set,
138+
* a notification is sent once the output script confirms in the given
139+
* transaction.
134140
*/
135141
registerConfirmationsNtfn(
136142
request?: DeepPartial<ConfRequest>,

lib/types/proto/lnd/invoicesrpc/invoices.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ export enum LookupModifier {
2020
}
2121

2222
export interface CancelInvoiceMsg {
23-
/** Hash corresponding to the (hold) invoice to cancel. */
23+
/**
24+
* Hash corresponding to the (hold) invoice to cancel. When using
25+
* REST, this field must be encoded as base64.
26+
*/
2427
paymentHash: Uint8Array | string;
2528
}
2629

@@ -102,11 +105,15 @@ export interface SettleInvoiceMsg {
102105
export interface SettleInvoiceResp {}
103106

104107
export interface SubscribeSingleInvoiceRequest {
105-
/** Hash corresponding to the (hold) invoice to subscribe to. */
108+
/**
109+
* Hash corresponding to the (hold) invoice to subscribe to. When using
110+
* REST, this field must be encoded as base64url.
111+
*/
106112
rHash: Uint8Array | string;
107113
}
108114

109115
export interface LookupInvoiceMsg {
116+
/** When using REST, this field must be encoded as base64. */
110117
paymentHash: Uint8Array | string | undefined;
111118
paymentAddr: Uint8Array | string | undefined;
112119
setId: Uint8Array | string | undefined;

0 commit comments

Comments
 (0)