Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>, onMessage?: (msg: ConfEvent) => void, onError?: (err: Error) => void): void;
/**
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