Skip to content

Commit

Permalink
Merge pull request #63 from lightninglabs/main
Browse files Browse the repository at this point in the history
[Releases] v0.1.12-alpha
  • Loading branch information
kaloudis authored Sep 22, 2022
2 parents 53ca96d + 55a1670 commit 1ad5a5e
Show file tree
Hide file tree
Showing 33 changed files with 3,034 additions and 1,004 deletions.
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.github/**
demos/**
dist/**
lib/types/**
lib/wasm_exec.js
package-lock.json
package.json
Expand Down
2 changes: 1 addition & 1 deletion lib/lnc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { snakeKeysToCamel } from './util/objects';

/** The default values for the LncConfig options */
const DEFAULT_CONFIG = {
wasmClientCode: 'https://lightning.engineering/lnc-v0.1.11-alpha.wasm',
wasmClientCode: 'https://lightning.engineering/lnc-v0.1.12-alpha.wasm',
namespace: 'default',
serverHost: 'mailbox.terminal.lightning.today:443'
} as Required<LncConfig>;
Expand Down
21 changes: 19 additions & 2 deletions lib/types/proto/faraday/faraday.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ export enum FiatBackend {
* https://api.coindesk.com/v1/bpi/historical/close.json
*/
COINDESK = 'COINDESK',
/** CUSTOM - Use custom price data provided in a CSV file for fiat price information. */
CUSTOM = 'CUSTOM',
/**
* COINGECKO - Use the CoinGecko API for fiat price information.
* This API is reached through the following URL:
* https://api.coingecko.com/api/v3/coins/bitcoin/market_chart
*/
COINGECKO = 'COINGECKO',
UNRECOGNIZED = 'UNRECOGNIZED'
}

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

export interface ExchangeRateResponse {
Expand All @@ -310,6 +320,8 @@ export interface BitcoinPrice {
price: string;
/** The timestamp for this price price provided. */
priceTimestamp: string;
/** The currency that the price is denoted in. */
currency: string;
}

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

export interface CustomCategory {
Expand Down Expand Up @@ -397,13 +411,16 @@ export interface ReportEntry {
customCategory: string;
/** The transaction id of the entry. */
txid: string;
/** The fiat amount of the entry's amount in USD. */
/**
* The fiat amount of the entry's amount in the currency specified in the
* btc_price field.
*/
fiat: string;
/** A unique identifier for the entry, if available. */
reference: string;
/** An additional note for the entry, providing additional context. */
note: string;
/** The bitcoin price and timestamp used to calcualte our fiat value. */
/** The bitcoin price and timestamp used to calculate our fiat value. */
btcPrice: BitcoinPrice | undefined;
}

Expand Down
14 changes: 10 additions & 4 deletions lib/types/proto/lnd/chainrpc/chainnotifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ export interface SpendRequest {
/**
* The outpoint for which we should request a spend notification for. If set to
* a zero outpoint, then the spend notification will be requested for the
* script instead.
* script instead. A zero or nil outpoint is not supported for Taproot spends
* because the output script cannot reliably be computed from the witness alone
* and the spent output script is not always available in the rescan context.
* So an outpoint must _always_ be specified when registering a spend
* notification for a Taproot output.
*/
outpoint: Outpoint | undefined;
/**
Expand Down Expand Up @@ -128,9 +132,11 @@ export interface ChainNotifier {
* registers an intent for a client to be notified once a confirmation request
* has reached its required number of confirmations on-chain.
*
* A client can specify whether the confirmation request should be for a
* particular transaction by its hash or for an output script by specifying a
* zero hash.
* A confirmation request must have a valid output script. It is also possible
* to give a transaction ID. If the transaction ID is not set, a notification
* is sent once the output script confirms. If the transaction ID is also set,
* a notification is sent once the output script confirms in the given
* transaction.
*/
registerConfirmationsNtfn(
request?: DeepPartial<ConfRequest>,
Expand Down
11 changes: 9 additions & 2 deletions lib/types/proto/lnd/invoicesrpc/invoices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ export enum LookupModifier {
}

export interface CancelInvoiceMsg {
/** Hash corresponding to the (hold) invoice to cancel. */
/**
* Hash corresponding to the (hold) invoice to cancel. When using
* REST, this field must be encoded as base64.
*/
paymentHash: Uint8Array | string;
}

Expand Down Expand Up @@ -102,11 +105,15 @@ export interface SettleInvoiceMsg {
export interface SettleInvoiceResp {}

export interface SubscribeSingleInvoiceRequest {
/** Hash corresponding to the (hold) invoice to subscribe to. */
/**
* Hash corresponding to the (hold) invoice to subscribe to. When using
* REST, this field must be encoded as base64url.
*/
rHash: Uint8Array | string;
}

export interface LookupInvoiceMsg {
/** When using REST, this field must be encoded as base64. */
paymentHash: Uint8Array | string | undefined;
paymentAddr: Uint8Array | string | undefined;
setId: Uint8Array | string | undefined;
Expand Down
Loading

0 comments on commit 1ad5a5e

Please sign in to comment.