diff --git a/README.md b/README.md index 44c1303..585c37c 100644 --- a/README.md +++ b/README.md @@ -106,31 +106,6 @@ lnd.lightning.subscribeChannelEvents( ); ``` -## Updating protos - -First, update the service version under the `config` block in `package.json`. - -eg. - -``` -"config": { - "lnd_release_tag": "v0.14.2-beta", - "loop_release_tag": "v0.17.0-beta", - "pool_release_tag": "v0.5.5-alpha", - "faraday_release_tag": "v0.2.5-alpha", - "protoc_version": "3.15.8" -}, -``` - -Then run the following commands: - -``` -# download schemas -npm run update-protos -# format schemas -npm run generate -``` - ## Further documentation - https://docs.lightning.engineering/lightning-network-tools/lightning-terminal/lnc-npm diff --git a/lib/api/createRpc.ts b/lib/api/createRpc.ts index cdb7628..3e5e77e 100644 --- a/lib/api/createRpc.ts +++ b/lib/api/createRpc.ts @@ -1,5 +1,5 @@ import LNC from '../lnc'; -import { subscriptionMethods } from '../types/proto/schema'; +import { subscriptionMethods } from '@lightninglabs/lnc-core'; // capitalize the first letter in the string const capitalize = (s: string) => s && s[0].toUpperCase() + s.slice(1); diff --git a/lib/api/faraday.ts b/lib/api/faraday.ts deleted file mode 100644 index 0a67cbd..0000000 --- a/lib/api/faraday.ts +++ /dev/null @@ -1,17 +0,0 @@ -import LNC from '../lnc'; -import { FaradayServer } from '../types/proto/faraday/faraday'; -import { serviceNames as sn } from '../types/proto/schema'; -import { createRpc } from './createRpc'; - -/** - * An API wrapper to communicate with the Faraday node via GRPC - */ -class FaradayApi { - faradayServer: FaradayServer; - - constructor(lnc: LNC) { - this.faradayServer = createRpc(sn.frdrpc.FaradayServer, lnc); - } -} - -export default FaradayApi; diff --git a/lib/api/index.ts b/lib/api/index.ts deleted file mode 100644 index 67baf93..0000000 --- a/lib/api/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { default as LndApi } from './lnd'; -export { default as LoopApi } from './loop'; -export { default as PoolApi } from './pool'; -export { default as FaradayApi } from './faraday'; diff --git a/lib/api/lnd.ts b/lib/api/lnd.ts deleted file mode 100644 index a9b8d7f..0000000 --- a/lib/api/lnd.ts +++ /dev/null @@ -1,44 +0,0 @@ -import LNC from '../lnc'; -import { Autopilot } from '../types/proto/lnd/autopilotrpc/autopilot'; -import { ChainNotifier } from '../types/proto/lnd/chainrpc/chainnotifier'; -import { Invoices } from '../types/proto/lnd/invoicesrpc/invoices'; -import { Lightning } from '../types/proto/lnd/lightning'; -import { Router } from '../types/proto/lnd/routerrpc/router'; -import { Signer } from '../types/proto/lnd/signrpc/signer'; -import { WalletKit } from '../types/proto/lnd/walletrpc/walletkit'; -import { WalletUnlocker } from '../types/proto/lnd/walletunlocker'; -import { Watchtower } from '../types/proto/lnd/watchtowerrpc/watchtower'; -import { WatchtowerClient } from '../types/proto/lnd/wtclientrpc/wtclient'; -import { serviceNames as sn } from '../types/proto/schema'; -import { createRpc } from './createRpc'; - -/** - * An API wrapper to communicate with the LND node via GRPC - */ -class LndApi { - autopilot: Autopilot; - chainNotifier: ChainNotifier; - invoices: Invoices; - lightning: Lightning; - router: Router; - signer: Signer; - walletKit: WalletKit; - walletUnlocker: WalletUnlocker; - watchtower: Watchtower; - watchtowerClient: WatchtowerClient; - - constructor(lnc: LNC) { - this.autopilot = createRpc(sn.autopilotrpc.Autopilot, lnc); - this.chainNotifier = createRpc(sn.chainrpc.ChainNotifier, lnc); - this.invoices = createRpc(sn.invoicesrpc.Invoices, lnc); - this.lightning = createRpc(sn.lnrpc.Lightning, lnc); - this.router = createRpc(sn.routerrpc.Router, lnc); - this.signer = createRpc(sn.signrpc.Signer, lnc); - this.walletKit = createRpc(sn.walletrpc.WalletKit, lnc); - this.walletUnlocker = createRpc(sn.lnrpc.WalletUnlocker, lnc); - this.watchtower = createRpc(sn.watchtowerrpc.Watchtower, lnc); - this.watchtowerClient = createRpc(sn.wtclientrpc.WatchtowerClient, lnc); - } -} - -export default LndApi; diff --git a/lib/api/loop.ts b/lib/api/loop.ts deleted file mode 100644 index dfe12f6..0000000 --- a/lib/api/loop.ts +++ /dev/null @@ -1,20 +0,0 @@ -import LNC from '../lnc'; -import { SwapClient } from '../types/proto/loop/client'; -import { Debug } from '../types/proto/loop/debug'; -import { serviceNames as sn } from '../types/proto/schema'; -import { createRpc } from './createRpc'; - -/** - * An API wrapper to communicate with the Loop node via GRPC - */ -class LoopApi { - swapClient: SwapClient; - debug: Debug; - - constructor(lnc: LNC) { - this.swapClient = createRpc(sn.looprpc.SwapClient, lnc); - this.debug = createRpc(sn.looprpc.Debug, lnc); - } -} - -export default LoopApi; diff --git a/lib/api/pool.ts b/lib/api/pool.ts deleted file mode 100644 index 5f584a4..0000000 --- a/lib/api/pool.ts +++ /dev/null @@ -1,23 +0,0 @@ -import LNC from '../lnc'; -import { ChannelAuctioneer } from '../types/proto/pool/auctioneerrpc/auctioneer'; -import { HashMail } from '../types/proto/pool/auctioneerrpc/hashmail'; -import { Trader } from '../types/proto/pool/trader'; -import { serviceNames as sn } from '../types/proto/schema'; -import { createRpc } from './createRpc'; - -/** - * An API wrapper to communicate with the Pool node via GRPC - */ -class PoolApi { - trader: Trader; - channelAuctioneer: ChannelAuctioneer; - hashmail: HashMail; - - constructor(lnc: LNC) { - this.trader = createRpc(sn.poolrpc.Trader, lnc); - this.channelAuctioneer = createRpc(sn.poolrpc.ChannelAuctioneer, lnc); - this.hashmail = createRpc(sn.poolrpc.HashMail, lnc); - } -} - -export default PoolApi; diff --git a/lib/index.ts b/lib/index.ts index 4b4b83b..e69bacf 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -12,6 +12,5 @@ if (!WebAssembly.instantiateStreaming) { } export type { LncConfig, CredentialStore } from './types/lnc'; -export * from './types/proto'; export default LNC; diff --git a/lib/lnc.ts b/lib/lnc.ts index 302e87f..5d23999 100644 --- a/lib/lnc.ts +++ b/lib/lnc.ts @@ -1,12 +1,18 @@ -import { FaradayApi, LndApi, LoopApi, PoolApi } from './api'; +import { + FaradayApi, + LndApi, + LoopApi, + PoolApi, + snakeKeysToCamel +} from '@lightninglabs/lnc-core'; +import { createRpc } from './api/createRpc'; import { CredentialStore, LncConfig, WasmGlobal } from './types/lnc'; import LncCredentialStore from './util/credentialStore'; import { wasmLog as log } from './util/log'; -import { snakeKeysToCamel } from './util/objects'; /** The default values for the LncConfig options */ const DEFAULT_CONFIG = { - wasmClientCode: 'https://lightning.engineering/lnc-v0.1.12-alpha.wasm', + wasmClientCode: 'https://lightning.engineering/lnc-v0.2.0-alpha.wasm', namespace: 'default', serverHost: 'mailbox.terminal.lightning.today:443' } as Required; @@ -52,10 +58,10 @@ export default class LNC { const g = global || window || self; this.go = new g.Go(); - this.lnd = new LndApi(this); - this.loop = new LoopApi(this); - this.pool = new PoolApi(this); - this.faraday = new FaradayApi(this); + this.lnd = new LndApi(createRpc, this); + this.loop = new LoopApi(createRpc, this); + this.pool = new PoolApi(createRpc, this); + this.faraday = new FaradayApi(createRpc, this); } private get wasm() { diff --git a/lib/types/proto/autopilotrpc.ts b/lib/types/proto/autopilotrpc.ts deleted file mode 100644 index f1b086d..0000000 --- a/lib/types/proto/autopilotrpc.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './lnd/autopilotrpc/autopilot'; diff --git a/lib/types/proto/chainrpc.ts b/lib/types/proto/chainrpc.ts deleted file mode 100644 index fe61ab8..0000000 --- a/lib/types/proto/chainrpc.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './lnd/chainrpc/chainnotifier'; diff --git a/lib/types/proto/faraday/faraday.ts b/lib/types/proto/faraday/faraday.ts deleted file mode 100644 index 502677d..0000000 --- a/lib/types/proto/faraday/faraday.ts +++ /dev/null @@ -1,551 +0,0 @@ -/* eslint-disable */ -/** - * Granularity describes the aggregation level at which the Bitcoin price should - * be queried. Note that setting lower levels of granularity may require more - * queries to the fiat backend. - */ -export enum Granularity { - UNKNOWN_GRANULARITY = 'UNKNOWN_GRANULARITY', - MINUTE = 'MINUTE', - FIVE_MINUTES = 'FIVE_MINUTES', - FIFTEEN_MINUTES = 'FIFTEEN_MINUTES', - THIRTY_MINUTES = 'THIRTY_MINUTES', - HOUR = 'HOUR', - SIX_HOURS = 'SIX_HOURS', - TWELVE_HOURS = 'TWELVE_HOURS', - DAY = 'DAY', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -/** FiatBackend is the API endpoint to be used for any fiat related queries. */ -export enum FiatBackend { - UNKNOWN_FIATBACKEND = 'UNKNOWN_FIATBACKEND', - /** - * COINCAP - Use the CoinCap API for fiat price information. - * This API is reached through the following URL: - * https://api.coincap.io/v2/assets/bitcoin/history - */ - COINCAP = 'COINCAP', - /** - * COINDESK - Use the CoinDesk API for fiat price information. - * This API is reached through the following URL: - * 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' -} - -export enum EntryType { - UNKNOWN = 'UNKNOWN', - /** LOCAL_CHANNEL_OPEN - A channel opening transaction for a channel opened by our node. */ - LOCAL_CHANNEL_OPEN = 'LOCAL_CHANNEL_OPEN', - /** REMOTE_CHANNEL_OPEN - A channel opening transaction for a channel opened by a remote node. */ - REMOTE_CHANNEL_OPEN = 'REMOTE_CHANNEL_OPEN', - /** CHANNEL_OPEN_FEE - The on chain fee paid to open a channel. */ - CHANNEL_OPEN_FEE = 'CHANNEL_OPEN_FEE', - /** CHANNEL_CLOSE - A channel closing transaction. */ - CHANNEL_CLOSE = 'CHANNEL_CLOSE', - /** - * RECEIPT - Receipt of funds. On chain this reflects receives, off chain settlement - * of invoices. - */ - RECEIPT = 'RECEIPT', - /** - * PAYMENT - Payment of funds. On chain this reflects sends, off chain settlement - * of our payments. - */ - PAYMENT = 'PAYMENT', - /** FEE - Payment of fees. */ - FEE = 'FEE', - /** CIRCULAR_RECEIPT - Receipt of a payment to ourselves. */ - CIRCULAR_RECEIPT = 'CIRCULAR_RECEIPT', - /** FORWARD - A forward through our node. */ - FORWARD = 'FORWARD', - /** FORWARD_FEE - Fees earned from forwarding. */ - FORWARD_FEE = 'FORWARD_FEE', - /** CIRCULAR_PAYMENT - Sending of a payment to ourselves. */ - CIRCULAR_PAYMENT = 'CIRCULAR_PAYMENT', - /** CIRCULAR_FEE - The fees paid to send an off chain payment to ourselves. */ - CIRCULAR_FEE = 'CIRCULAR_FEE', - /** SWEEP - A transaction that sweeps funds back into our wallet's control. */ - SWEEP = 'SWEEP', - /** SWEEP_FEE - The amount of fees paid for a sweep transaction. */ - SWEEP_FEE = 'SWEEP_FEE', - /** CHANNEL_CLOSE_FEE - The fees paid to close a channel. */ - CHANNEL_CLOSE_FEE = 'CHANNEL_CLOSE_FEE', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface CloseRecommendationRequest { - /** - * The minimum amount of time in seconds that a channel should have been - * monitored by lnd to be eligible for close. This value is in place to - * protect against closing of newer channels. - */ - minimumMonitored: string; - /** - * The data point base close recommendations on. Available options are: - * Uptime: ratio of channel peer's uptime to the period they have been - * monitored to. - * Revenue: the revenue that the channel has produced per block that its - * funding transaction has been confirmed for. - */ - metric: CloseRecommendationRequest_Metric; -} - -export enum CloseRecommendationRequest_Metric { - UNKNOWN = 'UNKNOWN', - UPTIME = 'UPTIME', - REVENUE = 'REVENUE', - INCOMING_VOLUME = 'INCOMING_VOLUME', - OUTGOING_VOLUME = 'OUTGOING_VOLUME', - TOTAL_VOLUME = 'TOTAL_VOLUME', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface OutlierRecommendationsRequest { - /** The parameters that are common to all close recommendations. */ - recRequest: CloseRecommendationRequest | undefined; - /** - * The number of inter-quartile ranges a value needs to be beneath the lower - * quartile/ above the upper quartile to be considered a lower/upper outlier. - * Lower values will be more aggressive in recommending channel closes, and - * upper values will be more conservative. Recommended values are 1.5 for - * aggressive recommendations and 3 for conservative recommendations. - */ - outlierMultiplier: number; -} - -export interface ThresholdRecommendationsRequest { - /** The parameters that are common to all close recommendations. */ - recRequest: CloseRecommendationRequest | undefined; - /** - * The threshold that recommendations will be calculated based on. - * For uptime: ratio of uptime to observed lifetime beneath which channels - * will be recommended for closure. - * - * For revenue: revenue per block that capital has been committed to the - * channel beneath which channels will be recommended for closure. This - * value is provided per block so that channels that have been open for - * different periods of time can be compared. - * - * For incoming volume: The incoming volume per block that capital has - * been committed to the channel beneath which channels will be recommended - * for closure. This value is provided per block so that channels that have - * been open for different periods of time can be compared. - * - * For outgoing volume: The outgoing volume per block that capital has been - * committed to the channel beneath which channels will be recommended for - * closure. This value is provided per block so that channels that have been - * open for different periods of time can be compared. - * - * For total volume: The total volume per block that capital has been - * committed to the channel beneath which channels will be recommended for - * closure. This value is provided per block so that channels that have been - * open for different periods of time can be compared. - */ - thresholdValue: number; -} - -export interface CloseRecommendationsResponse { - /** - * The total number of channels, before filtering out channels that are - * not eligible for close recommendations. - */ - totalChannels: number; - /** The number of channels that were considered for close recommendations. */ - consideredChannels: number; - /** - * A set of channel close recommendations. The absence of a channel in this - * set implies that it was not considered for close because it did not meet - * the criteria for close recommendations (it is private, or has not been - * monitored for long enough). - */ - recommendations: Recommendation[]; -} - -export interface Recommendation { - /** - * The channel point [funding txid: outpoint] of the channel being considered - * for close. - */ - chanPoint: string; - /** The value of the metric that close recommendations were based on. */ - value: number; - /** A boolean indicating whether we recommend closing the channel. */ - recommendClose: boolean; -} - -export interface RevenueReportRequest { - /** - * The funding transaction outpoints for the channels to generate a revenue - * report for. If this is empty, it will be generated for all open and closed - * channels. Channel funding points should be expressed with the format - * fundingTxID:outpoint. - */ - chanPoints: string[]; - /** - * Start time is beginning of the range over which the report will be - * generated, expressed as unix epoch offset in seconds. - */ - startTime: string; - /** - * End time is end of the range over which the report will be - * generated, expressed as unix epoch offset in seconds. - */ - endTime: string; -} - -export interface RevenueReportResponse { - /** - * Reports is a set of pairwise revenue report generated for the channel(s) - * over the period specified. - */ - reports: RevenueReport[]; -} - -export interface RevenueReport { - /** - * Target channel is the channel that the report is generated for; incoming - * fields in the report mean that this channel was the incoming channel, - * and the pair as the outgoing, outgoing fields mean that this channel was - * the outgoing channel and the peer was the incoming channel. - */ - targetChannel: string; - /** - * Pair reports maps the channel point of a peer that we generated revenue - * with to a report detailing the revenue. - */ - pairReports: { [key: string]: PairReport }; -} - -export interface RevenueReport_PairReportsEntry { - key: string; - value: PairReport | undefined; -} - -export interface PairReport { - /** - * Amount outgoing msat is the amount in millisatoshis that arrived - * on the pair channel to be forwarded onwards by our channel. - */ - amountOutgoingMsat: string; - /** - * Fees outgoing is the amount of fees in millisatoshis that we - * attribute to the channel for its role as the outgoing channel in - * forwards. - */ - feesOutgoingMsat: string; - /** - * Amount incoming msat is the amount in millisatoshis that arrived - * on our channel to be forwarded onwards by the pair channel. - */ - amountIncomingMsat: string; - /** - * Fees incoming is the amount of fees in millisatoshis that we - * attribute to the channel for its role as the incoming channel in - * forwards. - */ - feesIncomingMsat: string; -} - -export interface ChannelInsightsRequest {} - -export interface ChannelInsightsResponse { - /** Insights for the set of currently open channels. */ - channelInsights: ChannelInsight[]; -} - -export interface ChannelInsight { - /** The outpoint of the channel's funding transaction. */ - chanPoint: string; - /** - * The amount of time in seconds that we have monitored the channel peer's - * uptime for. - */ - monitoredSeconds: string; - /** - * The amount of time in seconds that the channel peer has been online over - * the period it has been monitored for. - */ - uptimeSeconds: string; - /** - * The volume, in millisatoshis, that has been forwarded with this channel as - * the incoming channel. - */ - volumeIncomingMsat: string; - /** - * The volume, in millisatoshis, that has been forwarded with this channel as - * the outgoing channel. - */ - volumeOutgoingMsat: string; - /** - * The total fees earned by this channel for its participation in forwards, - * expressed in millisatoshis. Note that we attribute fees evenly across - * incoming and outgoing channels. - */ - feesEarnedMsat: string; - /** The number of confirmations the funding transaction has. */ - confirmations: number; - /** True if the channel is private. */ - private: boolean; -} - -export interface ExchangeRateRequest { - /** A set of timestamps for which we want the bitcoin price. */ - timestamps: string[]; - /** The level of granularity at which we want the bitcoin price to be quoted. */ - 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 { - /** Rates contains a set of exchange rates for the set of timestamps */ - rates: ExchangeRate[]; -} - -export interface BitcoinPrice { - /** The price of 1 BTC, expressed in USD. */ - price: string; - /** The timestamp for this price price provided. */ - priceTimestamp: string; - /** The currency that the price is denoted in. */ - currency: string; -} - -export interface ExchangeRate { - /** timestamp is the timestamp of the original request made. */ - timestamp: string; - /** - * Price is the bitcoin price approximation for the timestamp queried. Note - * that this value has its own timestamp because we are not guaranteed to get - * price points for the exact timestamp that was queried. - */ - btcPrice: BitcoinPrice | undefined; -} - -export interface NodeAuditRequest { - /** The unix time from which to produce the report, inclusive. */ - startTime: string; - /** The unix time until which to produce the report, exclusive. */ - endTime: string; - /** - * Set to generate a report without conversion to fiat. If set, fiat values - * will display as 0. - */ - disableFiat: boolean; - /** The level of granularity at which we wish to produce fiat prices. */ - granularity: Granularity; - /** - * An optional set of custom categories which can be used to identify bespoke - * categories in the report. Each category must have a unique name, and may not - * have common identifier regexes. Transactions that are matched to these - * categories report the category name in the CustomCategory field. - */ - 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 { - /** - * The name for the custom category which will contain all transactions that - * are labelled with a string matching one of the regexes provided in - * label identifiers. - */ - name: string; - /** - * Set to true to apply this category to on chain transactions. Can be set in - * conjunction with off_chain to apply the category to all transactions. - */ - onChain: boolean; - /** - * Set to true to apply this category to off chain transactions. Can be set in - * conjunction with on_chain to apply the category to all transactions. - */ - offChain: boolean; - /** - * A set of regular expressions which identify transactions by their label as - * belonging in this custom category. If a label matches any single regex in - * the set, it is considered to be in the category. These expressions will be - * matched against various labels that are present in lnd: on chain - * transactions will be matched against their label field, off chain receipts - * will be matched against their memo. At present, there is no way to match - * forwards or off chain payments. These expressions must be unique across - * custom categories, otherwise faraday will not be able to identify which - * custom category a transaction belongs in. - */ - labelPatterns: string[]; -} - -export interface ReportEntry { - /** The unix timestamp of the event. */ - timestamp: string; - /** Whether the entry occurred on chain or off chain. */ - onChain: boolean; - /** The amount of the entry, expressed in millisatoshis. */ - amount: string; - /** Whether the entry is a credit or a debit. */ - credit: boolean; - /** The asset affected by the entry. */ - asset: string; - /** The kind of activity that this entry represents. */ - type: EntryType; - /** - * This field will be populated for entry type custom, and represents the name - * of a custom category that the report was produced with. - */ - customCategory: string; - /** The transaction id of the entry. */ - txid: string; - /** - * 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 calculate our fiat value. */ - btcPrice: BitcoinPrice | undefined; -} - -export interface NodeAuditResponse { - /** On chain reports for the period queried. */ - reports: ReportEntry[]; -} - -export interface CloseReportRequest { - /** - * The funding outpoint of the channel the report should be created for, - * formatted txid:outpoint. - */ - channelPoint: string; -} - -export interface CloseReportResponse { - /** The funding outpoint of the channel. */ - channelPoint: string; - /** True if we opened the channel, false if the remote peer did. */ - channelInitiator: boolean; - /** The type of close that resolved this channel. */ - closeType: string; - /** The transaction id of the close transaction that confirmed on chain. */ - closeTxid: string; - /** - * The fee we paid on chain to open this channel in satoshis, note that this - * field will be zero if the remote party paid. - */ - openFee: string; - /** - * The fee we paid on chain for the close transaction in staoshis, note that - * this field will be zero if the remote party paid. - */ - closeFee: string; -} - -export interface FaradayServer { - /** - * frcli: `outliers` - * Get close recommendations for currently open channels based on whether it is - * an outlier. - * - * Example request: - * http://localhost:8466/v1/faraday/outliers/REVENUE?rec_request.minimum_monitored=123 - */ - outlierRecommendations( - request?: DeepPartial - ): Promise; - /** - * frcli: `threshold` - * Get close recommendations for currently open channels based whether they are - * below a set threshold. - * - * Example request: - * http://localhost:8466/v1/faraday/threshold/UPTIME?rec_request.minimum_monitored=123 - */ - thresholdRecommendations( - request?: DeepPartial - ): Promise; - /** - * frcli: `revenue` - * Get a pairwise revenue report for a channel. - * - * Example request: - * http://localhost:8466/v1/faraday/revenue - */ - revenueReport( - request?: DeepPartial - ): Promise; - /** - * frcli: `insights` - * List currently open channel with routing and uptime information. - * - * Example request: - * http://localhost:8466/v1/faraday/insights - */ - channelInsights( - request?: DeepPartial - ): Promise; - /** - * frcli: - * Get fiat prices for btc. - * - * Example request: - * http://localhost:8466/v1/faraday/exchangerate - */ - exchangeRate( - request?: DeepPartial - ): Promise; - /** - * Get a report of your node's activity over a period. - * - * Example request: - * http://localhost:8466/v1/faraday/nodeaudit - */ - nodeAudit( - request?: DeepPartial - ): Promise; - /** - * Get a channel close report for a specific channel. - * - * Example request: - * http://localhost:8466/v1/faraday/closereport - */ - closeReport( - request?: DeepPartial - ): Promise; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/frdrpc.ts b/lib/types/proto/frdrpc.ts deleted file mode 100644 index 122d07b..0000000 --- a/lib/types/proto/frdrpc.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './faraday/faraday'; diff --git a/lib/types/proto/index.ts b/lib/types/proto/index.ts deleted file mode 100644 index 4d1923b..0000000 --- a/lib/types/proto/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -import * as frdrpc from './frdrpc'; -import * as autopilotrpc from './autopilotrpc'; -import * as chainrpc from './chainrpc'; -import * as invoicesrpc from './invoicesrpc'; -import * as lnrpc from './lnrpc'; -import * as routerrpc from './routerrpc'; -import * as signrpc from './signrpc'; -import * as walletrpc from './walletrpc'; -import * as watchtowerrpc from './watchtowerrpc'; -import * as wtclientrpc from './wtclientrpc'; -import * as looprpc from './looprpc'; -import * as poolrpc from './poolrpc'; -export { - frdrpc, - autopilotrpc, - chainrpc, - invoicesrpc, - lnrpc, - routerrpc, - signrpc, - walletrpc, - watchtowerrpc, - wtclientrpc, - looprpc, - poolrpc -}; diff --git a/lib/types/proto/invoicesrpc.ts b/lib/types/proto/invoicesrpc.ts deleted file mode 100644 index 176766d..0000000 --- a/lib/types/proto/invoicesrpc.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './lnd/invoicesrpc/invoices'; diff --git a/lib/types/proto/lnd/autopilotrpc/autopilot.ts b/lib/types/proto/lnd/autopilotrpc/autopilot.ts deleted file mode 100644 index fd9d89c..0000000 --- a/lib/types/proto/lnd/autopilotrpc/autopilot.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* eslint-disable */ -export interface StatusRequest {} - -export interface StatusResponse { - /** Indicates whether the autopilot is active or not. */ - active: boolean; -} - -export interface ModifyStatusRequest { - /** Whether the autopilot agent should be enabled or not. */ - enable: boolean; -} - -export interface ModifyStatusResponse {} - -export interface QueryScoresRequest { - pubkeys: string[]; - /** If set, we will ignore the local channel state when calculating scores. */ - ignoreLocalState: boolean; -} - -export interface QueryScoresResponse { - results: QueryScoresResponse_HeuristicResult[]; -} - -export interface QueryScoresResponse_HeuristicResult { - heuristic: string; - scores: { [key: string]: number }; -} - -export interface QueryScoresResponse_HeuristicResult_ScoresEntry { - key: string; - value: number; -} - -export interface SetScoresRequest { - /** The name of the heuristic to provide scores to. */ - heuristic: string; - /** - * A map from hex-encoded public keys to scores. Scores must be in the range - * [0.0, 1.0]. - */ - scores: { [key: string]: number }; -} - -export interface SetScoresRequest_ScoresEntry { - key: string; - value: number; -} - -export interface SetScoresResponse {} - -/** - * Autopilot is a service that can be used to get information about the current - * state of the daemon's autopilot agent, and also supply it with information - * that can be used when deciding where to open channels. - */ -export interface Autopilot { - /** Status returns whether the daemon's autopilot agent is active. */ - status(request?: DeepPartial): Promise; - /** - * ModifyStatus is used to modify the status of the autopilot agent, like - * enabling or disabling it. - */ - modifyStatus( - request?: DeepPartial - ): Promise; - /** - * QueryScores queries all available autopilot heuristics, in addition to any - * active combination of these heruristics, for the scores they would give to - * the given nodes. - */ - queryScores( - request?: DeepPartial - ): Promise; - /** - * SetScores attempts to set the scores used by the running autopilot agent, - * if the external scoring heuristic is enabled. - */ - setScores( - request?: DeepPartial - ): Promise; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/lnd/chainrpc/chainnotifier.ts b/lib/types/proto/lnd/chainrpc/chainnotifier.ts deleted file mode 100644 index 1f14f08..0000000 --- a/lib/types/proto/lnd/chainrpc/chainnotifier.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* eslint-disable */ - -export interface ConfRequest { - /** - * The transaction hash for which we should request a confirmation notification - * for. If set to a hash of all zeros, then the confirmation notification will - * be requested for the script instead. - */ - txid: Uint8Array | string; - /** - * An output script within a transaction with the hash above which will be used - * by light clients to match block filters. If the transaction hash is set to a - * hash of all zeros, then a confirmation notification will be requested for - * this script instead. - */ - script: Uint8Array | string; - /** - * The number of desired confirmations the transaction/output script should - * reach before dispatching a confirmation notification. - */ - numConfs: number; - /** - * The earliest height in the chain for which the transaction/output script - * could have been included in a block. This should in most cases be set to the - * broadcast height of the transaction/output script. - */ - heightHint: number; -} - -export interface ConfDetails { - /** The raw bytes of the confirmed transaction. */ - rawTx: Uint8Array | string; - /** The hash of the block in which the confirmed transaction was included in. */ - blockHash: Uint8Array | string; - /** - * The height of the block in which the confirmed transaction was included - * in. - */ - blockHeight: number; - /** The index of the confirmed transaction within the transaction. */ - txIndex: number; -} - -/** TODO(wilmer): need to know how the client will use this first. */ -export interface Reorg {} - -export interface ConfEvent { - /** - * An event that includes the confirmation details of the request - * (txid/ouput script). - */ - conf: ConfDetails | undefined; - /** - * An event send when the transaction of the request is reorged out of the - * chain. - */ - reorg: Reorg | undefined; -} - -export interface Outpoint { - /** The hash of the transaction. */ - hash: Uint8Array | string; - /** The index of the output within the transaction. */ - index: number; -} - -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. 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; - /** - * The output script for the outpoint above. This will be used by light clients - * to match block filters. If the outpoint is set to a zero outpoint, then a - * spend notification will be requested for this script instead. - */ - script: Uint8Array | string; - /** - * The earliest height in the chain for which the outpoint/output script could - * have been spent. This should in most cases be set to the broadcast height of - * the outpoint/output script. - */ - heightHint: number; -} - -export interface SpendDetails { - /** The outpoint was that spent. */ - spendingOutpoint: Outpoint | undefined; - /** The raw bytes of the spending transaction. */ - rawSpendingTx: Uint8Array | string; - /** The hash of the spending transaction. */ - spendingTxHash: Uint8Array | string; - /** The input of the spending transaction that fulfilled the spend request. */ - spendingInputIndex: number; - /** The height at which the spending transaction was included in a block. */ - spendingHeight: number; -} - -export interface SpendEvent { - /** - * An event that includes the details of the spending transaction of the - * request (outpoint/output script). - */ - spend: SpendDetails | undefined; - /** - * An event sent when the spending transaction of the request was - * reorged out of the chain. - */ - reorg: Reorg | undefined; -} - -export interface BlockEpoch { - /** The hash of the block. */ - hash: Uint8Array | string; - /** The height of the block. */ - height: number; -} - -/** - * ChainNotifier is a service that can be used to get information about the - * chain backend by registering notifiers for chain events. - */ -export interface ChainNotifier { - /** - * RegisterConfirmationsNtfn is a synchronous response-streaming RPC that - * registers an intent for a client to be notified once a confirmation request - * has reached its required number of confirmations on-chain. - * - * 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, - onMessage?: (msg: ConfEvent) => void, - onError?: (err: Error) => void - ): void; - /** - * RegisterSpendNtfn is a synchronous response-streaming RPC that registers an - * intent for a client to be notification once a spend request has been spent - * by a transaction that has confirmed on-chain. - * - * A client can specify whether the spend request should be for a particular - * outpoint or for an output script by specifying a zero outpoint. - */ - registerSpendNtfn( - request?: DeepPartial, - onMessage?: (msg: SpendEvent) => void, - onError?: (err: Error) => void - ): void; - /** - * RegisterBlockEpochNtfn is a synchronous response-streaming RPC that - * registers an intent for a client to be notified of blocks in the chain. The - * stream will return a hash and height tuple of a block for each new/stale - * block in the chain. It is the client's responsibility to determine whether - * the tuple returned is for a new or stale block in the chain. - * - * A client can also request a historical backlog of blocks from a particular - * point. This allows clients to be idempotent by ensuring that they do not - * missing processing a single block within the chain. - */ - registerBlockEpochNtfn( - request?: DeepPartial, - onMessage?: (msg: BlockEpoch) => void, - onError?: (err: Error) => void - ): void; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/lnd/invoicesrpc/invoices.ts b/lib/types/proto/lnd/invoicesrpc/invoices.ts deleted file mode 100644 index 5967be9..0000000 --- a/lib/types/proto/lnd/invoicesrpc/invoices.ts +++ /dev/null @@ -1,184 +0,0 @@ -/* eslint-disable */ -import type { RouteHint, Invoice } from '../lightning'; - -export enum LookupModifier { - /** DEFAULT - The default look up modifier, no look up behavior is changed. */ - DEFAULT = 'DEFAULT', - /** - * HTLC_SET_ONLY - Indicates that when a look up is done based on a set_id, then only that set - * of HTLCs related to that set ID should be returned. - */ - HTLC_SET_ONLY = 'HTLC_SET_ONLY', - /** - * HTLC_SET_BLANK - Indicates that when a look up is done using a payment_addr, then no HTLCs - * related to the payment_addr should be returned. This is useful when one - * wants to be able to obtain the set of associated setIDs with a given - * invoice, then look up the sub-invoices "projected" by that set ID. - */ - HTLC_SET_BLANK = 'HTLC_SET_BLANK', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface CancelInvoiceMsg { - /** - * Hash corresponding to the (hold) invoice to cancel. When using - * REST, this field must be encoded as base64. - */ - paymentHash: Uint8Array | string; -} - -export interface CancelInvoiceResp {} - -export interface AddHoldInvoiceRequest { - /** - * An optional memo to attach along with the invoice. Used for record keeping - * purposes for the invoice's creator, and will also be set in the description - * field of the encoded payment request if the description_hash field is not - * being used. - */ - memo: string; - /** The hash of the preimage */ - hash: Uint8Array | string; - /** - * The value of this invoice in satoshis - * - * The fields value and value_msat are mutually exclusive. - */ - value: string; - /** - * The value of this invoice in millisatoshis - * - * The fields value and value_msat are mutually exclusive. - */ - valueMsat: string; - /** - * Hash (SHA-256) of a description of the payment. Used if the description of - * payment (memo) is too long to naturally fit within the description field - * of an encoded payment request. - */ - descriptionHash: Uint8Array | string; - /** Payment request expiry time in seconds. Default is 3600 (1 hour). */ - expiry: string; - /** Fallback on-chain address. */ - fallbackAddr: string; - /** Delta to use for the time-lock of the CLTV extended to the final hop. */ - cltvExpiry: string; - /** - * Route hints that can each be individually used to assist in reaching the - * invoice's destination. - */ - routeHints: RouteHint[]; - /** Whether this invoice should include routing hints for private channels. */ - private: boolean; -} - -export interface AddHoldInvoiceResp { - /** - * A bare-bones invoice for a payment within the Lightning Network. With the - * details of the invoice, the sender has all the data necessary to send a - * payment to the recipient. - */ - paymentRequest: string; - /** - * The "add" index of this invoice. Each newly created invoice will increment - * this index making it monotonically increasing. Callers to the - * SubscribeInvoices call can use this to instantly get notified of all added - * invoices with an add_index greater than this one. - */ - addIndex: string; - /** - * The payment address of the generated invoice. This value should be used - * in all payments for this invoice as we require it for end to end - * security. - */ - paymentAddr: Uint8Array | string; -} - -export interface SettleInvoiceMsg { - /** - * Externally discovered pre-image that should be used to settle the hold - * invoice. - */ - preimage: Uint8Array | string; -} - -export interface SettleInvoiceResp {} - -export interface SubscribeSingleInvoiceRequest { - /** - * 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; - lookupModifier: LookupModifier; -} - -/** - * Invoices is a service that can be used to create, accept, settle and cancel - * invoices. - */ -export interface Invoices { - /** - * SubscribeSingleInvoice returns a uni-directional stream (server -> client) - * to notify the client of state transitions of the specified invoice. - * Initially the current invoice state is always sent out. - */ - subscribeSingleInvoice( - request?: DeepPartial, - onMessage?: (msg: Invoice) => void, - onError?: (err: Error) => void - ): void; - /** - * CancelInvoice cancels a currently open invoice. If the invoice is already - * canceled, this call will succeed. If the invoice is already settled, it will - * fail. - */ - cancelInvoice( - request?: DeepPartial - ): Promise; - /** - * AddHoldInvoice creates a hold invoice. It ties the invoice to the hash - * supplied in the request. - */ - addHoldInvoice( - request?: DeepPartial - ): Promise; - /** - * SettleInvoice settles an accepted invoice. If the invoice is already - * settled, this call will succeed. - */ - settleInvoice( - request?: DeepPartial - ): Promise; - /** - * LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced - * using either its payment hash, payment address, or set ID. - */ - lookupInvoiceV2(request?: DeepPartial): Promise; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/lnd/lightning.ts b/lib/types/proto/lnd/lightning.ts deleted file mode 100644 index d00c562..0000000 --- a/lib/types/proto/lnd/lightning.ts +++ /dev/null @@ -1,4331 +0,0 @@ -/* eslint-disable */ - -export enum OutputScriptType { - SCRIPT_TYPE_PUBKEY_HASH = 'SCRIPT_TYPE_PUBKEY_HASH', - SCRIPT_TYPE_SCRIPT_HASH = 'SCRIPT_TYPE_SCRIPT_HASH', - SCRIPT_TYPE_WITNESS_V0_PUBKEY_HASH = 'SCRIPT_TYPE_WITNESS_V0_PUBKEY_HASH', - SCRIPT_TYPE_WITNESS_V0_SCRIPT_HASH = 'SCRIPT_TYPE_WITNESS_V0_SCRIPT_HASH', - SCRIPT_TYPE_PUBKEY = 'SCRIPT_TYPE_PUBKEY', - SCRIPT_TYPE_MULTISIG = 'SCRIPT_TYPE_MULTISIG', - SCRIPT_TYPE_NULLDATA = 'SCRIPT_TYPE_NULLDATA', - SCRIPT_TYPE_NON_STANDARD = 'SCRIPT_TYPE_NON_STANDARD', - SCRIPT_TYPE_WITNESS_UNKNOWN = 'SCRIPT_TYPE_WITNESS_UNKNOWN', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -/** - * `AddressType` has to be one of: - * - * - `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0) - * - `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1) - * - `p2tr`: Pay to taproot pubkey (`TAPROOT_PUBKEY` = 4) - */ -export enum AddressType { - WITNESS_PUBKEY_HASH = 'WITNESS_PUBKEY_HASH', - NESTED_PUBKEY_HASH = 'NESTED_PUBKEY_HASH', - UNUSED_WITNESS_PUBKEY_HASH = 'UNUSED_WITNESS_PUBKEY_HASH', - UNUSED_NESTED_PUBKEY_HASH = 'UNUSED_NESTED_PUBKEY_HASH', - TAPROOT_PUBKEY = 'TAPROOT_PUBKEY', - UNUSED_TAPROOT_PUBKEY = 'UNUSED_TAPROOT_PUBKEY', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum CommitmentType { - /** UNKNOWN_COMMITMENT_TYPE - Returned when the commitment type isn't known or unavailable. */ - UNKNOWN_COMMITMENT_TYPE = 'UNKNOWN_COMMITMENT_TYPE', - /** - * LEGACY - A channel using the legacy commitment format having tweaked to_remote - * keys. - */ - LEGACY = 'LEGACY', - /** - * STATIC_REMOTE_KEY - A channel that uses the modern commitment format where the key in the - * output of the remote party does not change each state. This makes back - * up and recovery easier as when the channel is closed, the funds go - * directly to that key. - */ - STATIC_REMOTE_KEY = 'STATIC_REMOTE_KEY', - /** - * ANCHORS - A channel that uses a commitment format that has anchor outputs on the - * commitments, allowing fee bumping after a force close transaction has - * been broadcast. - */ - ANCHORS = 'ANCHORS', - /** - * SCRIPT_ENFORCED_LEASE - A channel that uses a commitment type that builds upon the anchors - * commitment format, but in addition requires a CLTV clause to spend outputs - * paying to the channel initiator. This is intended for use on leased channels - * to guarantee that the channel initiator has no incentives to close a leased - * channel before its maturity date. - */ - SCRIPT_ENFORCED_LEASE = 'SCRIPT_ENFORCED_LEASE', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum Initiator { - INITIATOR_UNKNOWN = 'INITIATOR_UNKNOWN', - INITIATOR_LOCAL = 'INITIATOR_LOCAL', - INITIATOR_REMOTE = 'INITIATOR_REMOTE', - INITIATOR_BOTH = 'INITIATOR_BOTH', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum ResolutionType { - TYPE_UNKNOWN = 'TYPE_UNKNOWN', - /** ANCHOR - We resolved an anchor output. */ - ANCHOR = 'ANCHOR', - /** - * INCOMING_HTLC - We are resolving an incoming htlc on chain. This if this htlc is - * claimed, we swept the incoming htlc with the preimage. If it is timed - * out, our peer swept the timeout path. - */ - INCOMING_HTLC = 'INCOMING_HTLC', - /** - * OUTGOING_HTLC - We are resolving an outgoing htlc on chain. If this htlc is claimed, - * the remote party swept the htlc with the preimage. If it is timed out, - * we swept it with the timeout path. - */ - OUTGOING_HTLC = 'OUTGOING_HTLC', - /** COMMIT - We force closed and need to sweep our time locked commitment output. */ - COMMIT = 'COMMIT', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum ResolutionOutcome { - /** OUTCOME_UNKNOWN - Outcome unknown. */ - OUTCOME_UNKNOWN = 'OUTCOME_UNKNOWN', - /** CLAIMED - An output was claimed on chain. */ - CLAIMED = 'CLAIMED', - /** UNCLAIMED - An output was left unclaimed on chain. */ - UNCLAIMED = 'UNCLAIMED', - /** - * ABANDONED - ResolverOutcomeAbandoned indicates that an output that we did not - * claim on chain, for example an anchor that we did not sweep and a - * third party claimed on chain, or a htlc that we could not decode - * so left unclaimed. - */ - ABANDONED = 'ABANDONED', - /** - * FIRST_STAGE - If we force closed our channel, our htlcs need to be claimed in two - * stages. This outcome represents the broadcast of a timeout or success - * transaction for this two stage htlc claim. - */ - FIRST_STAGE = 'FIRST_STAGE', - /** TIMEOUT - A htlc was timed out on chain. */ - TIMEOUT = 'TIMEOUT', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum NodeMetricType { - UNKNOWN = 'UNKNOWN', - BETWEENNESS_CENTRALITY = 'BETWEENNESS_CENTRALITY', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum InvoiceHTLCState { - ACCEPTED = 'ACCEPTED', - SETTLED = 'SETTLED', - CANCELED = 'CANCELED', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum PaymentFailureReason { - /** FAILURE_REASON_NONE - Payment isn't failed (yet). */ - FAILURE_REASON_NONE = 'FAILURE_REASON_NONE', - /** FAILURE_REASON_TIMEOUT - There are more routes to try, but the payment timeout was exceeded. */ - FAILURE_REASON_TIMEOUT = 'FAILURE_REASON_TIMEOUT', - /** - * FAILURE_REASON_NO_ROUTE - All possible routes were tried and failed permanently. Or were no - * routes to the destination at all. - */ - FAILURE_REASON_NO_ROUTE = 'FAILURE_REASON_NO_ROUTE', - /** FAILURE_REASON_ERROR - A non-recoverable error has occured. */ - FAILURE_REASON_ERROR = 'FAILURE_REASON_ERROR', - /** - * FAILURE_REASON_INCORRECT_PAYMENT_DETAILS - Payment details incorrect (unknown hash, invalid amt or - * invalid final cltv delta) - */ - FAILURE_REASON_INCORRECT_PAYMENT_DETAILS = 'FAILURE_REASON_INCORRECT_PAYMENT_DETAILS', - /** FAILURE_REASON_INSUFFICIENT_BALANCE - Insufficient local balance. */ - FAILURE_REASON_INSUFFICIENT_BALANCE = 'FAILURE_REASON_INSUFFICIENT_BALANCE', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum FeatureBit { - DATALOSS_PROTECT_REQ = 'DATALOSS_PROTECT_REQ', - DATALOSS_PROTECT_OPT = 'DATALOSS_PROTECT_OPT', - INITIAL_ROUING_SYNC = 'INITIAL_ROUING_SYNC', - UPFRONT_SHUTDOWN_SCRIPT_REQ = 'UPFRONT_SHUTDOWN_SCRIPT_REQ', - UPFRONT_SHUTDOWN_SCRIPT_OPT = 'UPFRONT_SHUTDOWN_SCRIPT_OPT', - GOSSIP_QUERIES_REQ = 'GOSSIP_QUERIES_REQ', - GOSSIP_QUERIES_OPT = 'GOSSIP_QUERIES_OPT', - TLV_ONION_REQ = 'TLV_ONION_REQ', - TLV_ONION_OPT = 'TLV_ONION_OPT', - EXT_GOSSIP_QUERIES_REQ = 'EXT_GOSSIP_QUERIES_REQ', - EXT_GOSSIP_QUERIES_OPT = 'EXT_GOSSIP_QUERIES_OPT', - STATIC_REMOTE_KEY_REQ = 'STATIC_REMOTE_KEY_REQ', - STATIC_REMOTE_KEY_OPT = 'STATIC_REMOTE_KEY_OPT', - PAYMENT_ADDR_REQ = 'PAYMENT_ADDR_REQ', - PAYMENT_ADDR_OPT = 'PAYMENT_ADDR_OPT', - MPP_REQ = 'MPP_REQ', - MPP_OPT = 'MPP_OPT', - WUMBO_CHANNELS_REQ = 'WUMBO_CHANNELS_REQ', - WUMBO_CHANNELS_OPT = 'WUMBO_CHANNELS_OPT', - ANCHORS_REQ = 'ANCHORS_REQ', - ANCHORS_OPT = 'ANCHORS_OPT', - ANCHORS_ZERO_FEE_HTLC_REQ = 'ANCHORS_ZERO_FEE_HTLC_REQ', - ANCHORS_ZERO_FEE_HTLC_OPT = 'ANCHORS_ZERO_FEE_HTLC_OPT', - AMP_REQ = 'AMP_REQ', - AMP_OPT = 'AMP_OPT', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum UpdateFailure { - UPDATE_FAILURE_UNKNOWN = 'UPDATE_FAILURE_UNKNOWN', - UPDATE_FAILURE_PENDING = 'UPDATE_FAILURE_PENDING', - UPDATE_FAILURE_NOT_FOUND = 'UPDATE_FAILURE_NOT_FOUND', - UPDATE_FAILURE_INTERNAL_ERR = 'UPDATE_FAILURE_INTERNAL_ERR', - UPDATE_FAILURE_INVALID_PARAMETER = 'UPDATE_FAILURE_INVALID_PARAMETER', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface SubscribeCustomMessagesRequest {} - -export interface CustomMessage { - /** Peer from which the message originates */ - peer: Uint8Array | string; - /** Message type. This value will be in the custom range (>= 32768). */ - type: number; - /** Raw message data */ - data: Uint8Array | string; -} - -export interface SendCustomMessageRequest { - /** Peer to send the message to */ - peer: Uint8Array | string; - /** Message type. This value needs to be in the custom range (>= 32768). */ - type: number; - /** Raw message data. */ - data: Uint8Array | string; -} - -export interface SendCustomMessageResponse {} - -export interface Utxo { - /** The type of address */ - addressType: AddressType; - /** The address */ - address: string; - /** The value of the unspent coin in satoshis */ - amountSat: string; - /** The pkscript in hex */ - pkScript: string; - /** The outpoint in format txid:n */ - outpoint: OutPoint | undefined; - /** The number of confirmations for the Utxo */ - confirmations: string; -} - -export interface OutputDetail { - /** The type of the output */ - outputType: OutputScriptType; - /** The address */ - address: string; - /** The pkscript in hex */ - pkScript: string; - /** The output index used in the raw transaction */ - outputIndex: string; - /** The value of the output coin in satoshis */ - amount: string; - /** Denotes if the output is controlled by the internal wallet */ - isOurAddress: boolean; -} - -export interface Transaction { - /** The transaction hash */ - txHash: string; - /** The transaction amount, denominated in satoshis */ - amount: string; - /** The number of confirmations */ - numConfirmations: number; - /** The hash of the block this transaction was included in */ - blockHash: string; - /** The height of the block this transaction was included in */ - blockHeight: number; - /** Timestamp of this transaction */ - timeStamp: string; - /** Fees paid for this transaction */ - totalFees: string; - /** - * Addresses that received funds for this transaction. Deprecated as it is - * now incorporated in the output_details field. - * - * @deprecated - */ - destAddresses: string[]; - /** Outputs that received funds for this transaction */ - outputDetails: OutputDetail[]; - /** The raw transaction hex. */ - rawTxHex: string; - /** A label that was optionally set on transaction broadcast. */ - label: string; - /** PreviousOutpoints/Inputs of this transaction. */ - previousOutpoints: PreviousOutPoint[]; -} - -export interface GetTransactionsRequest { - /** - * The height from which to list transactions, inclusive. If this value is - * greater than end_height, transactions will be read in reverse. - */ - startHeight: number; - /** - * The height until which to list transactions, inclusive. To include - * unconfirmed transactions, this value should be set to -1, which will - * return transactions from start_height until the current chain tip and - * unconfirmed transactions. If no end_height is provided, the call will - * default to this option. - */ - endHeight: number; - /** An optional filter to only include transactions relevant to an account. */ - account: string; -} - -export interface TransactionDetails { - /** The list of transactions relevant to the wallet. */ - transactions: Transaction[]; -} - -export interface FeeLimit { - /** - * The fee limit expressed as a fixed amount of satoshis. - * - * The fields fixed and fixed_msat are mutually exclusive. - */ - fixed: string | undefined; - /** - * The fee limit expressed as a fixed amount of millisatoshis. - * - * The fields fixed and fixed_msat are mutually exclusive. - */ - fixedMsat: string | undefined; - /** The fee limit expressed as a percentage of the payment amount. */ - percent: string | undefined; -} - -export interface SendRequest { - /** - * The identity pubkey of the payment recipient. When using REST, this field - * must be encoded as base64. - */ - dest: Uint8Array | string; - /** - * The hex-encoded identity pubkey of the payment recipient. Deprecated now - * that the REST gateway supports base64 encoding of bytes fields. - * - * @deprecated - */ - destString: string; - /** - * The amount to send expressed in satoshis. - * - * The fields amt and amt_msat are mutually exclusive. - */ - amt: string; - /** - * The amount to send expressed in millisatoshis. - * - * The fields amt and amt_msat are mutually exclusive. - */ - amtMsat: string; - /** - * The hash to use within the payment's HTLC. When using REST, this field - * must be encoded as base64. - */ - paymentHash: Uint8Array | string; - /** - * The hex-encoded hash to use within the payment's HTLC. Deprecated now - * that the REST gateway supports base64 encoding of bytes fields. - * - * @deprecated - */ - paymentHashString: string; - /** - * A bare-bones invoice for a payment within the Lightning Network. With the - * details of the invoice, the sender has all the data necessary to send a - * payment to the recipient. - */ - paymentRequest: string; - /** - * The CLTV delta from the current height that should be used to set the - * timelock for the final hop. - */ - finalCltvDelta: number; - /** - * The maximum number of satoshis that will be paid as a fee of the payment. - * This value can be represented either as a percentage of the amount being - * sent, or as a fixed amount of the maximum fee the user is willing the pay to - * send the payment. If not specified, lnd will use a default value of 100% - * fees for small amounts (<=1k sat) or 5% fees for larger amounts. - */ - feeLimit: FeeLimit | undefined; - /** - * The channel id of the channel that must be taken to the first hop. If zero, - * any channel may be used. - */ - outgoingChanId: string; - /** The pubkey of the last hop of the route. If empty, any hop may be used. */ - lastHopPubkey: Uint8Array | string; - /** - * An optional maximum total time lock for the route. This should not exceed - * lnd's `--max-cltv-expiry` setting. If zero, then the value of - * `--max-cltv-expiry` is enforced. - */ - cltvLimit: number; - /** - * An optional field that can be used to pass an arbitrary set of TLV records - * to a peer which understands the new records. This can be used to pass - * application specific data during the payment attempt. Record types are - * required to be in the custom range >= 65536. When using REST, the values - * must be encoded as base64. - */ - destCustomRecords: { [key: string]: Uint8Array | string }; - /** If set, circular payments to self are permitted. */ - allowSelfPayment: boolean; - /** - * Features assumed to be supported by the final node. All transitive feature - * dependencies must also be set properly. For a given feature bit pair, either - * optional or remote may be set, but not both. If this field is nil or empty, - * the router will try to load destination features from the graph as a - * fallback. - */ - destFeatures: FeatureBit[]; - /** The payment address of the generated invoice. */ - paymentAddr: Uint8Array | string; -} - -export interface SendRequest_DestCustomRecordsEntry { - key: string; - value: Uint8Array | string; -} - -export interface SendResponse { - paymentError: string; - paymentPreimage: Uint8Array | string; - paymentRoute: Route | undefined; - paymentHash: Uint8Array | string; -} - -export interface SendToRouteRequest { - /** - * The payment hash to use for the HTLC. When using REST, this field must be - * encoded as base64. - */ - paymentHash: Uint8Array | string; - /** - * An optional hex-encoded payment hash to be used for the HTLC. Deprecated now - * that the REST gateway supports base64 encoding of bytes fields. - * - * @deprecated - */ - paymentHashString: string; - /** Route that should be used to attempt to complete the payment. */ - route: Route | undefined; -} - -export interface ChannelAcceptRequest { - /** The pubkey of the node that wishes to open an inbound channel. */ - nodePubkey: Uint8Array | string; - /** The hash of the genesis block that the proposed channel resides in. */ - chainHash: Uint8Array | string; - /** The pending channel id. */ - pendingChanId: Uint8Array | string; - /** - * The funding amount in satoshis that initiator wishes to use in the - * channel. - */ - fundingAmt: string; - /** The push amount of the proposed channel in millisatoshis. */ - pushAmt: string; - /** The dust limit of the initiator's commitment tx. */ - dustLimit: string; - /** - * The maximum amount of coins in millisatoshis that can be pending in this - * channel. - */ - maxValueInFlight: string; - /** - * The minimum amount of satoshis the initiator requires us to have at all - * times. - */ - channelReserve: string; - /** The smallest HTLC in millisatoshis that the initiator will accept. */ - minHtlc: string; - /** - * The initial fee rate that the initiator suggests for both commitment - * transactions. - */ - feePerKw: string; - /** - * The number of blocks to use for the relative time lock in the pay-to-self - * output of both commitment transactions. - */ - csvDelay: number; - /** The total number of incoming HTLC's that the initiator will accept. */ - maxAcceptedHtlcs: number; - /** - * A bit-field which the initiator uses to specify proposed channel - * behavior. - */ - channelFlags: number; - /** The commitment type the initiator wishes to use for the proposed channel. */ - commitmentType: CommitmentType; - /** - * Whether the initiator wants to open a zero-conf channel via the channel - * type. - */ - wantsZeroConf: boolean; - /** - * Whether the initiator wants to use the scid-alias channel type. This is - * separate from the feature bit. - */ - wantsScidAlias: boolean; -} - -export interface ChannelAcceptResponse { - /** Whether or not the client accepts the channel. */ - accept: boolean; - /** The pending channel id to which this response applies. */ - pendingChanId: Uint8Array | string; - /** - * An optional error to send the initiating party to indicate why the channel - * was rejected. This field *should not* contain sensitive information, it will - * be sent to the initiating party. This field should only be set if accept is - * false, the channel will be rejected if an error is set with accept=true - * because the meaning of this response is ambiguous. Limited to 500 - * characters. - */ - error: string; - /** - * The upfront shutdown address to use if the initiating peer supports option - * upfront shutdown script (see ListPeers for the features supported). Note - * that the channel open will fail if this value is set for a peer that does - * not support this feature bit. - */ - upfrontShutdown: string; - /** The csv delay (in blocks) that we require for the remote party. */ - csvDelay: number; - /** - * The reserve amount in satoshis that we require the remote peer to adhere to. - * We require that the remote peer always have some reserve amount allocated to - * them so that there is always a disincentive to broadcast old state (if they - * hold 0 sats on their side of the channel, there is nothing to lose). - */ - reserveSat: string; - /** - * The maximum amount of funds in millisatoshis that we allow the remote peer - * to have in outstanding htlcs. - */ - inFlightMaxMsat: string; - /** The maximum number of htlcs that the remote peer can offer us. */ - maxHtlcCount: number; - /** The minimum value in millisatoshis for incoming htlcs on the channel. */ - minHtlcIn: string; - /** The number of confirmations we require before we consider the channel open. */ - minAcceptDepth: number; - /** - * Whether the responder wants this to be a zero-conf channel. This will fail - * if either side does not have the scid-alias feature bit set. The minimum - * depth field must be zero if this is true. - */ - zeroConf: boolean; -} - -export interface ChannelPoint { - /** - * Txid of the funding transaction. When using REST, this field must be - * encoded as base64. - */ - fundingTxidBytes: Uint8Array | string | undefined; - /** - * Hex-encoded string representing the byte-reversed hash of the funding - * transaction. - */ - fundingTxidStr: string | undefined; - /** The index of the output of the funding transaction */ - outputIndex: number; -} - -export interface OutPoint { - /** Raw bytes representing the transaction id. */ - txidBytes: Uint8Array | string; - /** Reversed, hex-encoded string representing the transaction id. */ - txidStr: string; - /** The index of the output on the transaction. */ - outputIndex: number; -} - -export interface PreviousOutPoint { - /** The outpoint in format txid:n. */ - outpoint: string; - /** - * Denotes if the outpoint is controlled by the internal wallet. - * The flag will only detect p2wkh, np2wkh and p2tr inputs as its own. - */ - isOurOutput: boolean; -} - -export interface LightningAddress { - /** The identity pubkey of the Lightning node. */ - pubkey: string; - /** - * The network location of the lightning node, e.g. `69.69.69.69:1337` or - * `localhost:10011`. - */ - host: string; -} - -export interface EstimateFeeRequest { - /** The map from addresses to amounts for the transaction. */ - AddrToAmount: { [key: string]: string }; - /** - * The target number of blocks that this transaction should be confirmed - * by. - */ - targetConf: number; - /** - * The minimum number of confirmations each one of your outputs used for - * the transaction must satisfy. - */ - minConfs: number; - /** Whether unconfirmed outputs should be used as inputs for the transaction. */ - spendUnconfirmed: boolean; -} - -export interface EstimateFeeRequest_AddrToAmountEntry { - key: string; - value: string; -} - -export interface EstimateFeeResponse { - /** The total fee in satoshis. */ - feeSat: string; - /** - * Deprecated, use sat_per_vbyte. - * The fee rate in satoshi/vbyte. - * - * @deprecated - */ - feerateSatPerByte: string; - /** The fee rate in satoshi/vbyte. */ - satPerVbyte: string; -} - -export interface SendManyRequest { - /** The map from addresses to amounts */ - AddrToAmount: { [key: string]: string }; - /** - * The target number of blocks that this transaction should be confirmed - * by. - */ - targetConf: number; - /** - * A manual fee rate set in sat/vbyte that should be used when crafting the - * transaction. - */ - satPerVbyte: string; - /** - * Deprecated, use sat_per_vbyte. - * A manual fee rate set in sat/vbyte that should be used when crafting the - * transaction. - * - * @deprecated - */ - satPerByte: string; - /** An optional label for the transaction, limited to 500 characters. */ - label: string; - /** - * The minimum number of confirmations each one of your outputs used for - * the transaction must satisfy. - */ - minConfs: number; - /** Whether unconfirmed outputs should be used as inputs for the transaction. */ - spendUnconfirmed: boolean; -} - -export interface SendManyRequest_AddrToAmountEntry { - key: string; - value: string; -} - -export interface SendManyResponse { - /** The id of the transaction */ - txid: string; -} - -export interface SendCoinsRequest { - /** The address to send coins to */ - addr: string; - /** The amount in satoshis to send */ - amount: string; - /** - * The target number of blocks that this transaction should be confirmed - * by. - */ - targetConf: number; - /** - * A manual fee rate set in sat/vbyte that should be used when crafting the - * transaction. - */ - satPerVbyte: string; - /** - * Deprecated, use sat_per_vbyte. - * A manual fee rate set in sat/vbyte that should be used when crafting the - * transaction. - * - * @deprecated - */ - satPerByte: string; - /** - * If set, then the amount field will be ignored, and lnd will attempt to - * send all the coins under control of the internal wallet to the specified - * address. - */ - sendAll: boolean; - /** An optional label for the transaction, limited to 500 characters. */ - label: string; - /** - * The minimum number of confirmations each one of your outputs used for - * the transaction must satisfy. - */ - minConfs: number; - /** Whether unconfirmed outputs should be used as inputs for the transaction. */ - spendUnconfirmed: boolean; -} - -export interface SendCoinsResponse { - /** The transaction ID of the transaction */ - txid: string; -} - -export interface ListUnspentRequest { - /** The minimum number of confirmations to be included. */ - minConfs: number; - /** The maximum number of confirmations to be included. */ - maxConfs: number; - /** An optional filter to only include outputs belonging to an account. */ - account: string; -} - -export interface ListUnspentResponse { - /** A list of utxos */ - utxos: Utxo[]; -} - -export interface NewAddressRequest { - /** The type of address to generate. */ - type: AddressType; - /** - * The name of the account to generate a new address for. If empty, the - * default wallet account is used. - */ - account: string; -} - -export interface NewAddressResponse { - /** The newly generated wallet address */ - address: string; -} - -export interface SignMessageRequest { - /** - * The message to be signed. When using REST, this field must be encoded as - * base64. - */ - msg: Uint8Array | string; - /** - * Instead of the default double-SHA256 hashing of the message before signing, - * only use one round of hashing instead. - */ - singleHash: boolean; -} - -export interface SignMessageResponse { - /** The signature for the given message */ - signature: string; -} - -export interface VerifyMessageRequest { - /** - * The message over which the signature is to be verified. When using REST, - * this field must be encoded as base64. - */ - msg: Uint8Array | string; - /** The signature to be verified over the given message */ - signature: string; -} - -export interface VerifyMessageResponse { - /** Whether the signature was valid over the given message */ - valid: boolean; - /** The pubkey recovered from the signature */ - pubkey: string; -} - -export interface ConnectPeerRequest { - /** Lightning address of the peer to connect to. */ - addr: LightningAddress | undefined; - /** - * If set, the daemon will attempt to persistently connect to the target - * peer. Otherwise, the call will be synchronous. - */ - perm: boolean; - /** - * The connection timeout value (in seconds) for this request. It won't affect - * other requests. - */ - timeout: string; -} - -export interface ConnectPeerResponse {} - -export interface DisconnectPeerRequest { - /** The pubkey of the node to disconnect from */ - pubKey: string; -} - -export interface DisconnectPeerResponse {} - -export interface HTLC { - incoming: boolean; - amount: string; - hashLock: Uint8Array | string; - expirationHeight: number; - /** Index identifying the htlc on the channel. */ - htlcIndex: string; - /** - * If this HTLC is involved in a forwarding operation, this field indicates - * the forwarding channel. For an outgoing htlc, it is the incoming channel. - * For an incoming htlc, it is the outgoing channel. When the htlc - * originates from this node or this node is the final destination, - * forwarding_channel will be zero. The forwarding channel will also be zero - * for htlcs that need to be forwarded but don't have a forwarding decision - * persisted yet. - */ - forwardingChannel: string; - /** Index identifying the htlc on the forwarding channel. */ - forwardingHtlcIndex: string; -} - -export interface ChannelConstraints { - /** - * The CSV delay expressed in relative blocks. If the channel is force closed, - * we will need to wait for this many blocks before we can regain our funds. - */ - csvDelay: number; - /** The minimum satoshis this node is required to reserve in its balance. */ - chanReserveSat: string; - /** The dust limit (in satoshis) of the initiator's commitment tx. */ - dustLimitSat: string; - /** - * The maximum amount of coins in millisatoshis that can be pending in this - * channel. - */ - maxPendingAmtMsat: string; - /** The smallest HTLC in millisatoshis that the initiator will accept. */ - minHtlcMsat: string; - /** The total number of incoming HTLC's that the initiator will accept. */ - maxAcceptedHtlcs: number; -} - -export interface Channel { - /** Whether this channel is active or not */ - active: boolean; - /** The identity pubkey of the remote node */ - remotePubkey: string; - /** - * The outpoint (txid:index) of the funding transaction. With this value, Bob - * will be able to generate a signature for Alice's version of the commitment - * transaction. - */ - channelPoint: string; - /** - * The unique channel ID for the channel. The first 3 bytes are the block - * height, the next 3 the index within the block, and the last 2 bytes are the - * output index for the channel. - */ - chanId: string; - /** The total amount of funds held in this channel */ - capacity: string; - /** This node's current balance in this channel */ - localBalance: string; - /** The counterparty's current balance in this channel */ - remoteBalance: string; - /** - * The amount calculated to be paid in fees for the current set of commitment - * transactions. The fee amount is persisted with the channel in order to - * allow the fee amount to be removed and recalculated with each channel state - * update, including updates that happen after a system restart. - */ - commitFee: string; - /** The weight of the commitment transaction */ - commitWeight: string; - /** - * The required number of satoshis per kilo-weight that the requester will pay - * at all times, for both the funding transaction and commitment transaction. - * This value can later be updated once the channel is open. - */ - feePerKw: string; - /** The unsettled balance in this channel */ - unsettledBalance: string; - /** The total number of satoshis we've sent within this channel. */ - totalSatoshisSent: string; - /** The total number of satoshis we've received within this channel. */ - totalSatoshisReceived: string; - /** The total number of updates conducted within this channel. */ - numUpdates: string; - /** The list of active, uncleared HTLCs currently pending within the channel. */ - pendingHtlcs: HTLC[]; - /** - * Deprecated. The CSV delay expressed in relative blocks. If the channel is - * force closed, we will need to wait for this many blocks before we can regain - * our funds. - * - * @deprecated - */ - csvDelay: number; - /** Whether this channel is advertised to the network or not. */ - private: boolean; - /** True if we were the ones that created the channel. */ - initiator: boolean; - /** A set of flags showing the current state of the channel. */ - chanStatusFlags: string; - /** - * Deprecated. The minimum satoshis this node is required to reserve in its - * balance. - * - * @deprecated - */ - localChanReserveSat: string; - /** - * Deprecated. The minimum satoshis the other node is required to reserve in - * its balance. - * - * @deprecated - */ - remoteChanReserveSat: string; - /** - * Deprecated. Use commitment_type. - * - * @deprecated - */ - staticRemoteKey: boolean; - /** The commitment type used by this channel. */ - commitmentType: CommitmentType; - /** - * The number of seconds that the channel has been monitored by the channel - * scoring system. Scores are currently not persisted, so this value may be - * less than the lifetime of the channel [EXPERIMENTAL]. - */ - lifetime: string; - /** - * The number of seconds that the remote peer has been observed as being online - * by the channel scoring system over the lifetime of the channel - * [EXPERIMENTAL]. - */ - uptime: string; - /** - * Close address is the address that we will enforce payout to on cooperative - * close if the channel was opened utilizing option upfront shutdown. This - * value can be set on channel open by setting close_address in an open channel - * request. If this value is not set, you can still choose a payout address by - * cooperatively closing with the delivery_address field set. - */ - closeAddress: string; - /** - * The amount that the initiator of the channel optionally pushed to the remote - * party on channel open. This amount will be zero if the channel initiator did - * not push any funds to the remote peer. If the initiator field is true, we - * pushed this amount to our peer, if it is false, the remote peer pushed this - * amount to us. - */ - pushAmountSat: string; - /** - * This uint32 indicates if this channel is to be considered 'frozen'. A - * frozen channel doest not allow a cooperative channel close by the - * initiator. The thaw_height is the height that this restriction stops - * applying to the channel. This field is optional, not setting it or using a - * value of zero will mean the channel has no additional restrictions. The - * height can be interpreted in two ways: as a relative height if the value is - * less than 500,000, or as an absolute height otherwise. - */ - thawHeight: number; - /** List constraints for the local node. */ - localConstraints: ChannelConstraints | undefined; - /** List constraints for the remote node. */ - remoteConstraints: ChannelConstraints | undefined; - /** - * This lists out the set of alias short channel ids that exist for a channel. - * This may be empty. - */ - aliasScids: string[]; - /** Whether or not this is a zero-conf channel. */ - zeroConf: boolean; - /** This is the confirmed / on-chain zero-conf SCID. */ - zeroConfConfirmedScid: string; -} - -export interface ListChannelsRequest { - activeOnly: boolean; - inactiveOnly: boolean; - publicOnly: boolean; - privateOnly: boolean; - /** - * Filters the response for channels with a target peer's pubkey. If peer is - * empty, all channels will be returned. - */ - peer: Uint8Array | string; -} - -export interface ListChannelsResponse { - /** The list of active channels */ - channels: Channel[]; -} - -export interface AliasMap { - /** - * For non-zero-conf channels, this is the confirmed SCID. Otherwise, this is - * the first assigned "base" alias. - */ - baseScid: string; - /** The set of all aliases stored for the base SCID. */ - aliases: string[]; -} - -export interface ListAliasesRequest {} - -export interface ListAliasesResponse { - aliasMaps: AliasMap[]; -} - -export interface ChannelCloseSummary { - /** The outpoint (txid:index) of the funding transaction. */ - channelPoint: string; - /** The unique channel ID for the channel. */ - chanId: string; - /** The hash of the genesis block that this channel resides within. */ - chainHash: string; - /** The txid of the transaction which ultimately closed this channel. */ - closingTxHash: string; - /** Public key of the remote peer that we formerly had a channel with. */ - remotePubkey: string; - /** Total capacity of the channel. */ - capacity: string; - /** Height at which the funding transaction was spent. */ - closeHeight: number; - /** Settled balance at the time of channel closure */ - settledBalance: string; - /** The sum of all the time-locked outputs at the time of channel closure */ - timeLockedBalance: string; - /** Details on how the channel was closed. */ - closeType: ChannelCloseSummary_ClosureType; - /** - * Open initiator is the party that initiated opening the channel. Note that - * this value may be unknown if the channel was closed before we migrated to - * store open channel information after close. - */ - openInitiator: Initiator; - /** - * Close initiator indicates which party initiated the close. This value will - * be unknown for channels that were cooperatively closed before we started - * tracking cooperative close initiators. Note that this indicates which party - * initiated a close, and it is possible for both to initiate cooperative or - * force closes, although only one party's close will be confirmed on chain. - */ - closeInitiator: Initiator; - resolutions: Resolution[]; - /** - * This lists out the set of alias short channel ids that existed for the - * closed channel. This may be empty. - */ - aliasScids: string[]; - /** The confirmed SCID for a zero-conf channel. */ - zeroConfConfirmedScid: string; -} - -export enum ChannelCloseSummary_ClosureType { - COOPERATIVE_CLOSE = 'COOPERATIVE_CLOSE', - LOCAL_FORCE_CLOSE = 'LOCAL_FORCE_CLOSE', - REMOTE_FORCE_CLOSE = 'REMOTE_FORCE_CLOSE', - BREACH_CLOSE = 'BREACH_CLOSE', - FUNDING_CANCELED = 'FUNDING_CANCELED', - ABANDONED = 'ABANDONED', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface Resolution { - /** The type of output we are resolving. */ - resolutionType: ResolutionType; - /** The outcome of our on chain action that resolved the outpoint. */ - outcome: ResolutionOutcome; - /** The outpoint that was spent by the resolution. */ - outpoint: OutPoint | undefined; - /** The amount that was claimed by the resolution. */ - amountSat: string; - /** - * The hex-encoded transaction ID of the sweep transaction that spent the - * output. - */ - sweepTxid: string; -} - -export interface ClosedChannelsRequest { - cooperative: boolean; - localForce: boolean; - remoteForce: boolean; - breach: boolean; - fundingCanceled: boolean; - abandoned: boolean; -} - -export interface ClosedChannelsResponse { - channels: ChannelCloseSummary[]; -} - -export interface Peer { - /** The identity pubkey of the peer */ - pubKey: string; - /** Network address of the peer; eg `127.0.0.1:10011` */ - address: string; - /** Bytes of data transmitted to this peer */ - bytesSent: string; - /** Bytes of data transmitted from this peer */ - bytesRecv: string; - /** Satoshis sent to this peer */ - satSent: string; - /** Satoshis received from this peer */ - satRecv: string; - /** A channel is inbound if the counterparty initiated the channel */ - inbound: boolean; - /** Ping time to this peer */ - pingTime: string; - /** The type of sync we are currently performing with this peer. */ - syncType: Peer_SyncType; - /** Features advertised by the remote peer in their init message. */ - features: { [key: number]: Feature }; - /** - * The latest errors received from our peer with timestamps, limited to the 10 - * most recent errors. These errors are tracked across peer connections, but - * are not persisted across lnd restarts. Note that these errors are only - * stored for peers that we have channels open with, to prevent peers from - * spamming us with errors at no cost. - */ - errors: TimestampedError[]; - /** - * The number of times we have recorded this peer going offline or coming - * online, recorded across restarts. Note that this value is decreased over - * time if the peer has not recently flapped, so that we can forgive peers - * with historically high flap counts. - */ - flapCount: number; - /** - * The timestamp of the last flap we observed for this peer. If this value is - * zero, we have not observed any flaps for this peer. - */ - lastFlapNs: string; - /** The last ping payload the peer has sent to us. */ - lastPingPayload: Uint8Array | string; -} - -export enum Peer_SyncType { - /** UNKNOWN_SYNC - Denotes that we cannot determine the peer's current sync type. */ - UNKNOWN_SYNC = 'UNKNOWN_SYNC', - /** ACTIVE_SYNC - Denotes that we are actively receiving new graph updates from the peer. */ - ACTIVE_SYNC = 'ACTIVE_SYNC', - /** PASSIVE_SYNC - Denotes that we are not receiving new graph updates from the peer. */ - PASSIVE_SYNC = 'PASSIVE_SYNC', - /** PINNED_SYNC - Denotes that this peer is pinned into an active sync. */ - PINNED_SYNC = 'PINNED_SYNC', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface Peer_FeaturesEntry { - key: number; - value: Feature | undefined; -} - -export interface TimestampedError { - /** The unix timestamp in seconds when the error occurred. */ - timestamp: string; - /** The string representation of the error sent by our peer. */ - error: string; -} - -export interface ListPeersRequest { - /** - * If true, only the last error that our peer sent us will be returned with - * the peer's information, rather than the full set of historic errors we have - * stored. - */ - latestError: boolean; -} - -export interface ListPeersResponse { - /** The list of currently connected peers */ - peers: Peer[]; -} - -export interface PeerEventSubscription {} - -export interface PeerEvent { - /** The identity pubkey of the peer. */ - pubKey: string; - type: PeerEvent_EventType; -} - -export enum PeerEvent_EventType { - PEER_ONLINE = 'PEER_ONLINE', - PEER_OFFLINE = 'PEER_OFFLINE', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface GetInfoRequest {} - -export interface GetInfoResponse { - /** The version of the LND software that the node is running. */ - version: string; - /** The SHA1 commit hash that the daemon is compiled with. */ - commitHash: string; - /** The identity pubkey of the current node. */ - identityPubkey: string; - /** If applicable, the alias of the current node, e.g. "bob" */ - alias: string; - /** The color of the current node in hex code format */ - color: string; - /** Number of pending channels */ - numPendingChannels: number; - /** Number of active channels */ - numActiveChannels: number; - /** Number of inactive channels */ - numInactiveChannels: number; - /** Number of peers */ - numPeers: number; - /** The node's current view of the height of the best block */ - blockHeight: number; - /** The node's current view of the hash of the best block */ - blockHash: string; - /** Timestamp of the block best known to the wallet */ - bestHeaderTimestamp: string; - /** Whether the wallet's view is synced to the main chain */ - syncedToChain: boolean; - /** Whether we consider ourselves synced with the public channel graph. */ - syncedToGraph: boolean; - /** - * Whether the current node is connected to testnet. This field is - * deprecated and the network field should be used instead - * - * @deprecated - */ - testnet: boolean; - /** A list of active chains the node is connected to */ - chains: Chain[]; - /** The URIs of the current node. */ - uris: string[]; - /** - * Features that our node has advertised in our init message, node - * announcements and invoices. - */ - features: { [key: number]: Feature }; - /** Indicates whether the HTLC interceptor API is in always-on mode. */ - requireHtlcInterceptor: boolean; -} - -export interface GetInfoResponse_FeaturesEntry { - key: number; - value: Feature | undefined; -} - -export interface GetRecoveryInfoRequest {} - -export interface GetRecoveryInfoResponse { - /** Whether the wallet is in recovery mode */ - recoveryMode: boolean; - /** Whether the wallet recovery progress is finished */ - recoveryFinished: boolean; - /** The recovery progress, ranging from 0 to 1. */ - progress: number; -} - -export interface Chain { - /** The blockchain the node is on (eg bitcoin, litecoin) */ - chain: string; - /** The network the node is on (eg regtest, testnet, mainnet) */ - network: string; -} - -export interface ConfirmationUpdate { - blockSha: Uint8Array | string; - blockHeight: number; - numConfsLeft: number; -} - -export interface ChannelOpenUpdate { - channelPoint: ChannelPoint | undefined; -} - -export interface ChannelCloseUpdate { - closingTxid: Uint8Array | string; - success: boolean; -} - -export interface CloseChannelRequest { - /** - * The outpoint (txid:index) of the funding transaction. With this value, Bob - * will be able to generate a signature for Alice's version of the commitment - * transaction. - */ - channelPoint: ChannelPoint | undefined; - /** - * If true, then the channel will be closed forcibly. This means the - * current commitment transaction will be signed and broadcast. - */ - force: boolean; - /** - * The target number of blocks that the closure transaction should be - * confirmed by. - */ - targetConf: number; - /** - * Deprecated, use sat_per_vbyte. - * A manual fee rate set in sat/vbyte that should be used when crafting the - * closure transaction. - * - * @deprecated - */ - satPerByte: string; - /** - * An optional address to send funds to in the case of a cooperative close. - * If the channel was opened with an upfront shutdown script and this field - * is set, the request to close will fail because the channel must pay out - * to the upfront shutdown addresss. - */ - deliveryAddress: string; - /** - * A manual fee rate set in sat/vbyte that should be used when crafting the - * closure transaction. - */ - satPerVbyte: string; - /** - * The maximum fee rate the closer is willing to pay. - * - * NOTE: This field is only respected if we're the initiator of the channel. - */ - maxFeePerVbyte: string; -} - -export interface CloseStatusUpdate { - closePending: PendingUpdate | undefined; - chanClose: ChannelCloseUpdate | undefined; -} - -export interface PendingUpdate { - txid: Uint8Array | string; - outputIndex: number; -} - -export interface ReadyForPsbtFunding { - /** - * The P2WSH address of the channel funding multisig address that the below - * specified amount in satoshis needs to be sent to. - */ - fundingAddress: string; - /** - * The exact amount in satoshis that needs to be sent to the above address to - * fund the pending channel. - */ - fundingAmount: string; - /** - * A raw PSBT that contains the pending channel output. If a base PSBT was - * provided in the PsbtShim, this is the base PSBT with one additional output. - * If no base PSBT was specified, this is an otherwise empty PSBT with exactly - * one output. - */ - psbt: Uint8Array | string; -} - -export interface BatchOpenChannelRequest { - /** The list of channels to open. */ - channels: BatchOpenChannel[]; - /** - * The target number of blocks that the funding transaction should be - * confirmed by. - */ - targetConf: number; - /** - * A manual fee rate set in sat/vByte that should be used when crafting the - * funding transaction. - */ - satPerVbyte: string; - /** - * The minimum number of confirmations each one of your outputs used for - * the funding transaction must satisfy. - */ - minConfs: number; - /** - * Whether unconfirmed outputs should be used as inputs for the funding - * transaction. - */ - spendUnconfirmed: boolean; - /** An optional label for the batch transaction, limited to 500 characters. */ - label: string; -} - -export interface BatchOpenChannel { - /** - * The pubkey of the node to open a channel with. When using REST, this - * field must be encoded as base64. - */ - nodePubkey: Uint8Array | string; - /** The number of satoshis the wallet should commit to the channel. */ - localFundingAmount: string; - /** - * The number of satoshis to push to the remote side as part of the initial - * commitment state. - */ - pushSat: string; - /** - * Whether this channel should be private, not announced to the greater - * network. - */ - private: boolean; - /** - * The minimum value in millisatoshi we will require for incoming HTLCs on - * the channel. - */ - minHtlcMsat: string; - /** - * The delay we require on the remote's commitment transaction. If this is - * not set, it will be scaled automatically with the channel size. - */ - remoteCsvDelay: number; - /** - * Close address is an optional address which specifies the address to which - * funds should be paid out to upon cooperative close. This field may only be - * set if the peer supports the option upfront feature bit (call listpeers - * to check). The remote peer will only accept cooperative closes to this - * address if it is set. - * - * Note: If this value is set on channel creation, you will *not* be able to - * cooperatively close out to a different address. - */ - closeAddress: string; - /** - * An optional, unique identifier of 32 random bytes that will be used as the - * pending channel ID to identify the channel while it is in the pre-pending - * state. - */ - pendingChanId: Uint8Array | string; - /** - * The explicit commitment type to use. Note this field will only be used if - * the remote peer supports explicit channel negotiation. - */ - commitmentType: CommitmentType; -} - -export interface BatchOpenChannelResponse { - pendingChannels: PendingUpdate[]; -} - -export interface OpenChannelRequest { - /** - * A manual fee rate set in sat/vbyte that should be used when crafting the - * funding transaction. - */ - satPerVbyte: string; - /** - * The pubkey of the node to open a channel with. When using REST, this field - * must be encoded as base64. - */ - nodePubkey: Uint8Array | string; - /** - * The hex encoded pubkey of the node to open a channel with. Deprecated now - * that the REST gateway supports base64 encoding of bytes fields. - * - * @deprecated - */ - nodePubkeyString: string; - /** The number of satoshis the wallet should commit to the channel */ - localFundingAmount: string; - /** - * The number of satoshis to push to the remote side as part of the initial - * commitment state - */ - pushSat: string; - /** - * The target number of blocks that the funding transaction should be - * confirmed by. - */ - targetConf: number; - /** - * Deprecated, use sat_per_vbyte. - * A manual fee rate set in sat/vbyte that should be used when crafting the - * funding transaction. - * - * @deprecated - */ - satPerByte: string; - /** - * Whether this channel should be private, not announced to the greater - * network. - */ - private: boolean; - /** - * The minimum value in millisatoshi we will require for incoming HTLCs on - * the channel. - */ - minHtlcMsat: string; - /** - * The delay we require on the remote's commitment transaction. If this is - * not set, it will be scaled automatically with the channel size. - */ - remoteCsvDelay: number; - /** - * The minimum number of confirmations each one of your outputs used for - * the funding transaction must satisfy. - */ - minConfs: number; - /** - * Whether unconfirmed outputs should be used as inputs for the funding - * transaction. - */ - spendUnconfirmed: boolean; - /** - * Close address is an optional address which specifies the address to which - * funds should be paid out to upon cooperative close. This field may only be - * set if the peer supports the option upfront feature bit (call listpeers - * to check). The remote peer will only accept cooperative closes to this - * address if it is set. - * - * Note: If this value is set on channel creation, you will *not* be able to - * cooperatively close out to a different address. - */ - closeAddress: string; - /** - * Funding shims are an optional argument that allow the caller to intercept - * certain funding functionality. For example, a shim can be provided to use a - * particular key for the commitment key (ideally cold) rather than use one - * that is generated by the wallet as normal, or signal that signing will be - * carried out in an interactive manner (PSBT based). - */ - fundingShim: FundingShim | undefined; - /** - * The maximum amount of coins in millisatoshi that can be pending within - * the channel. It only applies to the remote party. - */ - remoteMaxValueInFlightMsat: string; - /** - * The maximum number of concurrent HTLCs we will allow the remote party to add - * to the commitment transaction. - */ - remoteMaxHtlcs: number; - /** - * Max local csv is the maximum csv delay we will allow for our own commitment - * transaction. - */ - maxLocalCsv: number; - /** - * The explicit commitment type to use. Note this field will only be used if - * the remote peer supports explicit channel negotiation. - */ - commitmentType: CommitmentType; - /** If this is true, then a zero-conf channel open will be attempted. */ - zeroConf: boolean; - /** - * If this is true, then an option-scid-alias channel-type open will be - * attempted. - */ - scidAlias: boolean; -} - -export interface OpenStatusUpdate { - /** - * Signals that the channel is now fully negotiated and the funding - * transaction published. - */ - chanPending: PendingUpdate | undefined; - /** - * Signals that the channel's funding transaction has now reached the - * required number of confirmations on chain and can be used. - */ - chanOpen: ChannelOpenUpdate | undefined; - /** - * Signals that the funding process has been suspended and the construction - * of a PSBT that funds the channel PK script is now required. - */ - psbtFund: ReadyForPsbtFunding | undefined; - /** - * The pending channel ID of the created channel. This value may be used to - * further the funding flow manually via the FundingStateStep method. - */ - pendingChanId: Uint8Array | string; -} - -export interface KeyLocator { - /** The family of key being identified. */ - keyFamily: number; - /** The precise index of the key being identified. */ - keyIndex: number; -} - -export interface KeyDescriptor { - /** The raw bytes of the key being identified. */ - rawKeyBytes: Uint8Array | string; - /** The key locator that identifies which key to use for signing. */ - keyLoc: KeyLocator | undefined; -} - -export interface ChanPointShim { - /** - * The size of the pre-crafted output to be used as the channel point for this - * channel funding. - */ - amt: string; - /** The target channel point to refrence in created commitment transactions. */ - chanPoint: ChannelPoint | undefined; - /** Our local key to use when creating the multi-sig output. */ - localKey: KeyDescriptor | undefined; - /** The key of the remote party to use when creating the multi-sig output. */ - remoteKey: Uint8Array | string; - /** - * If non-zero, then this will be used as the pending channel ID on the wire - * protocol to initate the funding request. This is an optional field, and - * should only be set if the responder is already expecting a specific pending - * channel ID. - */ - pendingChanId: Uint8Array | string; - /** - * This uint32 indicates if this channel is to be considered 'frozen'. A frozen - * channel does not allow a cooperative channel close by the initiator. The - * thaw_height is the height that this restriction stops applying to the - * channel. The height can be interpreted in two ways: as a relative height if - * the value is less than 500,000, or as an absolute height otherwise. - */ - thawHeight: number; -} - -export interface PsbtShim { - /** - * A unique identifier of 32 random bytes that will be used as the pending - * channel ID to identify the PSBT state machine when interacting with it and - * on the wire protocol to initiate the funding request. - */ - pendingChanId: Uint8Array | string; - /** - * An optional base PSBT the new channel output will be added to. If this is - * non-empty, it must be a binary serialized PSBT. - */ - basePsbt: Uint8Array | string; - /** - * If a channel should be part of a batch (multiple channel openings in one - * transaction), it can be dangerous if the whole batch transaction is - * published too early before all channel opening negotiations are completed. - * This flag prevents this particular channel from broadcasting the transaction - * after the negotiation with the remote peer. In a batch of channel openings - * this flag should be set to true for every channel but the very last. - */ - noPublish: boolean; -} - -export interface FundingShim { - /** - * A channel shim where the channel point was fully constructed outside - * of lnd's wallet and the transaction might already be published. - */ - chanPointShim: ChanPointShim | undefined; - /** - * A channel shim that uses a PSBT to fund and sign the channel funding - * transaction. - */ - psbtShim: PsbtShim | undefined; -} - -export interface FundingShimCancel { - /** The pending channel ID of the channel to cancel the funding shim for. */ - pendingChanId: Uint8Array | string; -} - -export interface FundingPsbtVerify { - /** - * The funded but not yet signed PSBT that sends the exact channel capacity - * amount to the PK script returned in the open channel message in a previous - * step. - */ - fundedPsbt: Uint8Array | string; - /** The pending channel ID of the channel to get the PSBT for. */ - pendingChanId: Uint8Array | string; - /** - * Can only be used if the no_publish flag was set to true in the OpenChannel - * call meaning that the caller is solely responsible for publishing the final - * funding transaction. If skip_finalize is set to true then lnd will not wait - * for a FundingPsbtFinalize state step and instead assumes that a transaction - * with the same TXID as the passed in PSBT will eventually confirm. - * IT IS ABSOLUTELY IMPERATIVE that the TXID of the transaction that is - * eventually published does have the _same TXID_ as the verified PSBT. That - * means no inputs or outputs can change, only signatures can be added. If the - * TXID changes between this call and the publish step then the channel will - * never be created and the funds will be in limbo. - */ - skipFinalize: boolean; -} - -export interface FundingPsbtFinalize { - /** - * The funded PSBT that contains all witness data to send the exact channel - * capacity amount to the PK script returned in the open channel message in a - * previous step. Cannot be set at the same time as final_raw_tx. - */ - signedPsbt: Uint8Array | string; - /** The pending channel ID of the channel to get the PSBT for. */ - pendingChanId: Uint8Array | string; - /** - * As an alternative to the signed PSBT with all witness data, the final raw - * wire format transaction can also be specified directly. Cannot be set at the - * same time as signed_psbt. - */ - finalRawTx: Uint8Array | string; -} - -export interface FundingTransitionMsg { - /** - * The funding shim to register. This should be used before any - * channel funding has began by the remote party, as it is intended as a - * preparatory step for the full channel funding. - */ - shimRegister: FundingShim | undefined; - /** Used to cancel an existing registered funding shim. */ - shimCancel: FundingShimCancel | undefined; - /** - * Used to continue a funding flow that was initiated to be executed - * through a PSBT. This step verifies that the PSBT contains the correct - * outputs to fund the channel. - */ - psbtVerify: FundingPsbtVerify | undefined; - /** - * Used to continue a funding flow that was initiated to be executed - * through a PSBT. This step finalizes the funded and signed PSBT, finishes - * negotiation with the peer and finally publishes the resulting funding - * transaction. - */ - psbtFinalize: FundingPsbtFinalize | undefined; -} - -export interface FundingStateStepResp {} - -export interface PendingHTLC { - /** The direction within the channel that the htlc was sent */ - incoming: boolean; - /** The total value of the htlc */ - amount: string; - /** The final output to be swept back to the user's wallet */ - outpoint: string; - /** The next block height at which we can spend the current stage */ - maturityHeight: number; - /** - * The number of blocks remaining until the current stage can be swept. - * Negative values indicate how many blocks have passed since becoming - * mature. - */ - blocksTilMaturity: number; - /** Indicates whether the htlc is in its first or second stage of recovery */ - stage: number; -} - -export interface PendingChannelsRequest {} - -export interface PendingChannelsResponse { - /** The balance in satoshis encumbered in pending channels */ - totalLimboBalance: string; - /** Channels pending opening */ - pendingOpenChannels: PendingChannelsResponse_PendingOpenChannel[]; - /** - * Deprecated: Channels pending closing previously contained cooperatively - * closed channels with a single confirmation. These channels are now - * considered closed from the time we see them on chain. - * - * @deprecated - */ - pendingClosingChannels: PendingChannelsResponse_ClosedChannel[]; - /** Channels pending force closing */ - pendingForceClosingChannels: PendingChannelsResponse_ForceClosedChannel[]; - /** Channels waiting for closing tx to confirm */ - waitingCloseChannels: PendingChannelsResponse_WaitingCloseChannel[]; -} - -export interface PendingChannelsResponse_PendingChannel { - remoteNodePub: string; - channelPoint: string; - capacity: string; - localBalance: string; - remoteBalance: string; - /** - * The minimum satoshis this node is required to reserve in its - * balance. - */ - localChanReserveSat: string; - /** - * The minimum satoshis the other node is required to reserve in its - * balance. - */ - remoteChanReserveSat: string; - /** The party that initiated opening the channel. */ - initiator: Initiator; - /** The commitment type used by this channel. */ - commitmentType: CommitmentType; - /** Total number of forwarding packages created in this channel. */ - numForwardingPackages: string; - /** A set of flags showing the current state of the channel. */ - chanStatusFlags: string; - /** Whether this channel is advertised to the network or not. */ - private: boolean; -} - -export interface PendingChannelsResponse_PendingOpenChannel { - /** The pending channel */ - channel: PendingChannelsResponse_PendingChannel | undefined; - /** - * The amount calculated to be paid in fees for the current set of - * commitment transactions. The fee amount is persisted with the channel - * in order to allow the fee amount to be removed and recalculated with - * each channel state update, including updates that happen after a system - * restart. - */ - commitFee: string; - /** The weight of the commitment transaction */ - commitWeight: string; - /** - * The required number of satoshis per kilo-weight that the requester will - * pay at all times, for both the funding transaction and commitment - * transaction. This value can later be updated once the channel is open. - */ - feePerKw: string; -} - -export interface PendingChannelsResponse_WaitingCloseChannel { - /** The pending channel waiting for closing tx to confirm */ - channel: PendingChannelsResponse_PendingChannel | undefined; - /** The balance in satoshis encumbered in this channel */ - limboBalance: string; - /** - * A list of valid commitment transactions. Any of these can confirm at - * this point. - */ - commitments: PendingChannelsResponse_Commitments | undefined; - /** The transaction id of the closing transaction */ - closingTxid: string; -} - -export interface PendingChannelsResponse_Commitments { - /** Hash of the local version of the commitment tx. */ - localTxid: string; - /** Hash of the remote version of the commitment tx. */ - remoteTxid: string; - /** Hash of the remote pending version of the commitment tx. */ - remotePendingTxid: string; - /** - * The amount in satoshis calculated to be paid in fees for the local - * commitment. - */ - localCommitFeeSat: string; - /** - * The amount in satoshis calculated to be paid in fees for the remote - * commitment. - */ - remoteCommitFeeSat: string; - /** - * The amount in satoshis calculated to be paid in fees for the remote - * pending commitment. - */ - remotePendingCommitFeeSat: string; -} - -export interface PendingChannelsResponse_ClosedChannel { - /** The pending channel to be closed */ - channel: PendingChannelsResponse_PendingChannel | undefined; - /** The transaction id of the closing transaction */ - closingTxid: string; -} - -export interface PendingChannelsResponse_ForceClosedChannel { - /** The pending channel to be force closed */ - channel: PendingChannelsResponse_PendingChannel | undefined; - /** The transaction id of the closing transaction */ - closingTxid: string; - /** The balance in satoshis encumbered in this pending channel */ - limboBalance: string; - /** The height at which funds can be swept into the wallet */ - maturityHeight: number; - /** - * Remaining # of blocks until the commitment output can be swept. - * Negative values indicate how many blocks have passed since becoming - * mature. - */ - blocksTilMaturity: number; - /** The total value of funds successfully recovered from this channel */ - recoveredBalance: string; - pendingHtlcs: PendingHTLC[]; - anchor: PendingChannelsResponse_ForceClosedChannel_AnchorState; -} - -export enum PendingChannelsResponse_ForceClosedChannel_AnchorState { - LIMBO = 'LIMBO', - RECOVERED = 'RECOVERED', - LOST = 'LOST', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface ChannelEventSubscription {} - -export interface ChannelEventUpdate { - openChannel: Channel | undefined; - closedChannel: ChannelCloseSummary | undefined; - activeChannel: ChannelPoint | undefined; - inactiveChannel: ChannelPoint | undefined; - pendingOpenChannel: PendingUpdate | undefined; - fullyResolvedChannel: ChannelPoint | undefined; - type: ChannelEventUpdate_UpdateType; -} - -export enum ChannelEventUpdate_UpdateType { - OPEN_CHANNEL = 'OPEN_CHANNEL', - CLOSED_CHANNEL = 'CLOSED_CHANNEL', - ACTIVE_CHANNEL = 'ACTIVE_CHANNEL', - INACTIVE_CHANNEL = 'INACTIVE_CHANNEL', - PENDING_OPEN_CHANNEL = 'PENDING_OPEN_CHANNEL', - FULLY_RESOLVED_CHANNEL = 'FULLY_RESOLVED_CHANNEL', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface WalletAccountBalance { - /** The confirmed balance of the account (with >= 1 confirmations). */ - confirmedBalance: string; - /** The unconfirmed balance of the account (with 0 confirmations). */ - unconfirmedBalance: string; -} - -export interface WalletBalanceRequest {} - -export interface WalletBalanceResponse { - /** The balance of the wallet */ - totalBalance: string; - /** The confirmed balance of a wallet(with >= 1 confirmations) */ - confirmedBalance: string; - /** The unconfirmed balance of a wallet(with 0 confirmations) */ - unconfirmedBalance: string; - /** - * The total amount of wallet UTXOs held in outputs that are locked for - * other usage. - */ - lockedBalance: string; - /** The amount of reserve required. */ - reservedBalanceAnchorChan: string; - /** A mapping of each wallet account's name to its balance. */ - accountBalance: { [key: string]: WalletAccountBalance }; -} - -export interface WalletBalanceResponse_AccountBalanceEntry { - key: string; - value: WalletAccountBalance | undefined; -} - -export interface Amount { - /** Value denominated in satoshis. */ - sat: string; - /** Value denominated in milli-satoshis. */ - msat: string; -} - -export interface ChannelBalanceRequest {} - -export interface ChannelBalanceResponse { - /** - * Deprecated. Sum of channels balances denominated in satoshis - * - * @deprecated - */ - balance: string; - /** - * Deprecated. Sum of channels pending balances denominated in satoshis - * - * @deprecated - */ - pendingOpenBalance: string; - /** Sum of channels local balances. */ - localBalance: Amount | undefined; - /** Sum of channels remote balances. */ - remoteBalance: Amount | undefined; - /** Sum of channels local unsettled balances. */ - unsettledLocalBalance: Amount | undefined; - /** Sum of channels remote unsettled balances. */ - unsettledRemoteBalance: Amount | undefined; - /** Sum of channels pending local balances. */ - pendingOpenLocalBalance: Amount | undefined; - /** Sum of channels pending remote balances. */ - pendingOpenRemoteBalance: Amount | undefined; -} - -export interface QueryRoutesRequest { - /** The 33-byte hex-encoded public key for the payment destination */ - pubKey: string; - /** - * The amount to send expressed in satoshis. - * - * The fields amt and amt_msat are mutually exclusive. - */ - amt: string; - /** - * The amount to send expressed in millisatoshis. - * - * The fields amt and amt_msat are mutually exclusive. - */ - amtMsat: string; - /** - * An optional CLTV delta from the current height that should be used for the - * timelock of the final hop. Note that unlike SendPayment, QueryRoutes does - * not add any additional block padding on top of final_ctlv_delta. This - * padding of a few blocks needs to be added manually or otherwise failures may - * happen when a block comes in while the payment is in flight. - */ - finalCltvDelta: number; - /** - * The maximum number of satoshis that will be paid as a fee of the payment. - * This value can be represented either as a percentage of the amount being - * sent, or as a fixed amount of the maximum fee the user is willing the pay to - * send the payment. If not specified, lnd will use a default value of 100% - * fees for small amounts (<=1k sat) or 5% fees for larger amounts. - */ - feeLimit: FeeLimit | undefined; - /** - * A list of nodes to ignore during path finding. When using REST, these fields - * must be encoded as base64. - */ - ignoredNodes: Uint8Array | string[]; - /** - * Deprecated. A list of edges to ignore during path finding. - * - * @deprecated - */ - ignoredEdges: EdgeLocator[]; - /** - * The source node where the request route should originated from. If empty, - * self is assumed. - */ - sourcePubKey: string; - /** - * If set to true, edge probabilities from mission control will be used to get - * the optimal route. - */ - useMissionControl: boolean; - /** A list of directed node pairs that will be ignored during path finding. */ - ignoredPairs: NodePair[]; - /** - * An optional maximum total time lock for the route. If the source is empty or - * ourselves, this should not exceed lnd's `--max-cltv-expiry` setting. If - * zero, then the value of `--max-cltv-expiry` is used as the limit. - */ - cltvLimit: number; - /** - * An optional field that can be used to pass an arbitrary set of TLV records - * to a peer which understands the new records. This can be used to pass - * application specific data during the payment attempt. If the destination - * does not support the specified records, an error will be returned. - * Record types are required to be in the custom range >= 65536. When using - * REST, the values must be encoded as base64. - */ - destCustomRecords: { [key: string]: Uint8Array | string }; - /** - * The channel id of the channel that must be taken to the first hop. If zero, - * any channel may be used. - */ - outgoingChanId: string; - /** The pubkey of the last hop of the route. If empty, any hop may be used. */ - lastHopPubkey: Uint8Array | string; - /** Optional route hints to reach the destination through private channels. */ - routeHints: RouteHint[]; - /** - * Features assumed to be supported by the final node. All transitive feature - * dependencies must also be set properly. For a given feature bit pair, either - * optional or remote may be set, but not both. If this field is nil or empty, - * the router will try to load destination features from the graph as a - * fallback. - */ - destFeatures: FeatureBit[]; - /** - * The time preference for this payment. Set to -1 to optimize for fees - * only, to 1 to optimize for reliability only or a value inbetween for a mix. - */ - timePref: number; -} - -export interface QueryRoutesRequest_DestCustomRecordsEntry { - key: string; - value: Uint8Array | string; -} - -export interface NodePair { - /** - * The sending node of the pair. When using REST, this field must be encoded as - * base64. - */ - from: Uint8Array | string; - /** - * The receiving node of the pair. When using REST, this field must be encoded - * as base64. - */ - to: Uint8Array | string; -} - -export interface EdgeLocator { - /** The short channel id of this edge. */ - channelId: string; - /** - * The direction of this edge. If direction_reverse is false, the direction - * of this edge is from the channel endpoint with the lexicographically smaller - * pub key to the endpoint with the larger pub key. If direction_reverse is - * is true, the edge goes the other way. - */ - directionReverse: boolean; -} - -export interface QueryRoutesResponse { - /** - * The route that results from the path finding operation. This is still a - * repeated field to retain backwards compatibility. - */ - routes: Route[]; - /** - * The success probability of the returned route based on the current mission - * control state. [EXPERIMENTAL] - */ - successProb: number; -} - -export interface Hop { - /** - * The unique channel ID for the channel. The first 3 bytes are the block - * height, the next 3 the index within the block, and the last 2 bytes are the - * output index for the channel. - */ - chanId: string; - /** @deprecated */ - chanCapacity: string; - /** @deprecated */ - amtToForward: string; - /** @deprecated */ - fee: string; - expiry: number; - amtToForwardMsat: string; - feeMsat: string; - /** - * An optional public key of the hop. If the public key is given, the payment - * can be executed without relying on a copy of the channel graph. - */ - pubKey: string; - /** - * If set to true, then this hop will be encoded using the new variable length - * TLV format. Note that if any custom tlv_records below are specified, then - * this field MUST be set to true for them to be encoded properly. - * - * @deprecated - */ - tlvPayload: boolean; - /** - * An optional TLV record that signals the use of an MPP payment. If present, - * the receiver will enforce that the same mpp_record is included in the final - * hop payload of all non-zero payments in the HTLC set. If empty, a regular - * single-shot payment is or was attempted. - */ - mppRecord: MPPRecord | undefined; - /** - * An optional TLV record that signals the use of an AMP payment. If present, - * the receiver will treat all received payments including the same - * (payment_addr, set_id) pair as being part of one logical payment. The - * payment will be settled by XORing the root_share's together and deriving the - * child hashes and preimages according to BOLT XX. Must be used in conjunction - * with mpp_record. - */ - ampRecord: AMPRecord | undefined; - /** - * An optional set of key-value TLV records. This is useful within the context - * of the SendToRoute call as it allows callers to specify arbitrary K-V pairs - * to drop off at each hop within the onion. - */ - customRecords: { [key: string]: Uint8Array | string }; - /** The payment metadata to send along with the payment to the payee. */ - metadata: Uint8Array | string; -} - -export interface Hop_CustomRecordsEntry { - key: string; - value: Uint8Array | string; -} - -export interface MPPRecord { - /** - * A unique, random identifier used to authenticate the sender as the intended - * payer of a multi-path payment. The payment_addr must be the same for all - * subpayments, and match the payment_addr provided in the receiver's invoice. - * The same payment_addr must be used on all subpayments. - */ - paymentAddr: Uint8Array | string; - /** - * The total amount in milli-satoshis being sent as part of a larger multi-path - * payment. The caller is responsible for ensuring subpayments to the same node - * and payment_hash sum exactly to total_amt_msat. The same - * total_amt_msat must be used on all subpayments. - */ - totalAmtMsat: string; -} - -export interface AMPRecord { - rootShare: Uint8Array | string; - setId: Uint8Array | string; - childIndex: number; -} - -/** - * A path through the channel graph which runs over one or more channels in - * succession. This struct carries all the information required to craft the - * Sphinx onion packet, and send the payment along the first hop in the path. A - * route is only selected as valid if all the channels have sufficient capacity to - * carry the initial payment amount after fees are accounted for. - */ -export interface Route { - /** - * The cumulative (final) time lock across the entire route. This is the CLTV - * value that should be extended to the first hop in the route. All other hops - * will decrement the time-lock as advertised, leaving enough time for all - * hops to wait for or present the payment preimage to complete the payment. - */ - totalTimeLock: number; - /** - * The sum of the fees paid at each hop within the final route. In the case - * of a one-hop payment, this value will be zero as we don't need to pay a fee - * to ourselves. - * - * @deprecated - */ - totalFees: string; - /** - * The total amount of funds required to complete a payment over this route. - * This value includes the cumulative fees at each hop. As a result, the HTLC - * extended to the first-hop in the route will need to have at least this many - * satoshis, otherwise the route will fail at an intermediate node due to an - * insufficient amount of fees. - * - * @deprecated - */ - totalAmt: string; - /** Contains details concerning the specific forwarding details at each hop. */ - hops: Hop[]; - /** The total fees in millisatoshis. */ - totalFeesMsat: string; - /** The total amount in millisatoshis. */ - totalAmtMsat: string; -} - -export interface NodeInfoRequest { - /** The 33-byte hex-encoded compressed public of the target node */ - pubKey: string; - /** If true, will include all known channels associated with the node. */ - includeChannels: boolean; -} - -export interface NodeInfo { - /** - * An individual vertex/node within the channel graph. A node is - * connected to other nodes by one or more channel edges emanating from it. As - * the graph is directed, a node will also have an incoming edge attached to - * it for each outgoing edge. - */ - node: LightningNode | undefined; - /** The total number of channels for the node. */ - numChannels: number; - /** The sum of all channels capacity for the node, denominated in satoshis. */ - totalCapacity: string; - /** A list of all public channels for the node. */ - channels: ChannelEdge[]; -} - -/** - * An individual vertex/node within the channel graph. A node is - * connected to other nodes by one or more channel edges emanating from it. As the - * graph is directed, a node will also have an incoming edge attached to it for - * each outgoing edge. - */ -export interface LightningNode { - lastUpdate: number; - pubKey: string; - alias: string; - addresses: NodeAddress[]; - color: string; - features: { [key: number]: Feature }; -} - -export interface LightningNode_FeaturesEntry { - key: number; - value: Feature | undefined; -} - -export interface NodeAddress { - network: string; - addr: string; -} - -export interface RoutingPolicy { - timeLockDelta: number; - minHtlc: string; - feeBaseMsat: string; - feeRateMilliMsat: string; - disabled: boolean; - maxHtlcMsat: string; - lastUpdate: number; -} - -/** - * A fully authenticated channel along with all its unique attributes. - * Once an authenticated channel announcement has been processed on the network, - * then an instance of ChannelEdgeInfo encapsulating the channels attributes is - * stored. The other portions relevant to routing policy of a channel are stored - * within a ChannelEdgePolicy for each direction of the channel. - */ -export interface ChannelEdge { - /** - * The unique channel ID for the channel. The first 3 bytes are the block - * height, the next 3 the index within the block, and the last 2 bytes are the - * output index for the channel. - */ - channelId: string; - chanPoint: string; - /** @deprecated */ - lastUpdate: number; - node1Pub: string; - node2Pub: string; - capacity: string; - node1Policy: RoutingPolicy | undefined; - node2Policy: RoutingPolicy | undefined; -} - -export interface ChannelGraphRequest { - /** - * Whether unannounced channels are included in the response or not. If set, - * unannounced channels are included. Unannounced channels are both private - * channels, and public channels that are not yet announced to the network. - */ - includeUnannounced: boolean; -} - -/** Returns a new instance of the directed channel graph. */ -export interface ChannelGraph { - /** The list of `LightningNode`s in this channel graph */ - nodes: LightningNode[]; - /** The list of `ChannelEdge`s in this channel graph */ - edges: ChannelEdge[]; -} - -export interface NodeMetricsRequest { - /** The requested node metrics. */ - types: NodeMetricType[]; -} - -export interface NodeMetricsResponse { - /** - * Betweenness centrality is the sum of the ratio of shortest paths that pass - * through the node for each pair of nodes in the graph (not counting paths - * starting or ending at this node). - * Map of node pubkey to betweenness centrality of the node. Normalized - * values are in the [0,1] closed interval. - */ - betweennessCentrality: { [key: string]: FloatMetric }; -} - -export interface NodeMetricsResponse_BetweennessCentralityEntry { - key: string; - value: FloatMetric | undefined; -} - -export interface FloatMetric { - /** Arbitrary float value. */ - value: number; - /** The value normalized to [0,1] or [-1,1]. */ - normalizedValue: number; -} - -export interface ChanInfoRequest { - /** - * The unique channel ID for the channel. The first 3 bytes are the block - * height, the next 3 the index within the block, and the last 2 bytes are the - * output index for the channel. - */ - chanId: string; -} - -export interface NetworkInfoRequest {} - -export interface NetworkInfo { - graphDiameter: number; - avgOutDegree: number; - maxOutDegree: number; - numNodes: number; - numChannels: number; - totalNetworkCapacity: string; - avgChannelSize: number; - minChannelSize: string; - maxChannelSize: string; - medianChannelSizeSat: string; - /** The number of edges marked as zombies. */ - numZombieChans: string; -} - -export interface StopRequest {} - -export interface StopResponse {} - -export interface GraphTopologySubscription {} - -export interface GraphTopologyUpdate { - nodeUpdates: NodeUpdate[]; - channelUpdates: ChannelEdgeUpdate[]; - closedChans: ClosedChannelUpdate[]; -} - -export interface NodeUpdate { - /** - * Deprecated, use node_addresses. - * - * @deprecated - */ - addresses: string[]; - identityKey: string; - /** - * Deprecated, use features. - * - * @deprecated - */ - globalFeatures: Uint8Array | string; - alias: string; - color: string; - nodeAddresses: NodeAddress[]; - /** - * Features that the node has advertised in the init message, node - * announcements and invoices. - */ - features: { [key: number]: Feature }; -} - -export interface NodeUpdate_FeaturesEntry { - key: number; - value: Feature | undefined; -} - -export interface ChannelEdgeUpdate { - /** - * The unique channel ID for the channel. The first 3 bytes are the block - * height, the next 3 the index within the block, and the last 2 bytes are the - * output index for the channel. - */ - chanId: string; - chanPoint: ChannelPoint | undefined; - capacity: string; - routingPolicy: RoutingPolicy | undefined; - advertisingNode: string; - connectingNode: string; -} - -export interface ClosedChannelUpdate { - /** - * The unique channel ID for the channel. The first 3 bytes are the block - * height, the next 3 the index within the block, and the last 2 bytes are the - * output index for the channel. - */ - chanId: string; - capacity: string; - closedHeight: number; - chanPoint: ChannelPoint | undefined; -} - -export interface HopHint { - /** The public key of the node at the start of the channel. */ - nodeId: string; - /** The unique identifier of the channel. */ - chanId: string; - /** The base fee of the channel denominated in millisatoshis. */ - feeBaseMsat: number; - /** - * The fee rate of the channel for sending one satoshi across it denominated in - * millionths of a satoshi. - */ - feeProportionalMillionths: number; - /** The time-lock delta of the channel. */ - cltvExpiryDelta: number; -} - -export interface SetID { - setId: Uint8Array | string; -} - -export interface RouteHint { - /** - * A list of hop hints that when chained together can assist in reaching a - * specific destination. - */ - hopHints: HopHint[]; -} - -export interface AMPInvoiceState { - /** The state the HTLCs associated with this setID are in. */ - state: InvoiceHTLCState; - /** The settle index of this HTLC set, if the invoice state is settled. */ - settleIndex: string; - /** The time this HTLC set was settled expressed in unix epoch. */ - settleTime: string; - /** The total amount paid for the sub-invoice expressed in milli satoshis. */ - amtPaidMsat: string; -} - -export interface Invoice { - /** - * An optional memo to attach along with the invoice. Used for record keeping - * purposes for the invoice's creator, and will also be set in the description - * field of the encoded payment request if the description_hash field is not - * being used. - */ - memo: string; - /** - * The hex-encoded preimage (32 byte) which will allow settling an incoming - * HTLC payable to this preimage. When using REST, this field must be encoded - * as base64. - */ - rPreimage: Uint8Array | string; - /** - * The hash of the preimage. When using REST, this field must be encoded as - * base64. - * Note: Output only, don't specify for creating an invoice. - */ - rHash: Uint8Array | string; - /** - * The value of this invoice in satoshis - * - * The fields value and value_msat are mutually exclusive. - */ - value: string; - /** - * The value of this invoice in millisatoshis - * - * The fields value and value_msat are mutually exclusive. - */ - valueMsat: string; - /** - * Whether this invoice has been fulfilled - * - * The field is deprecated. Use the state field instead (compare to SETTLED). - * - * @deprecated - */ - settled: boolean; - /** - * When this invoice was created. - * Note: Output only, don't specify for creating an invoice. - */ - creationDate: string; - /** - * When this invoice was settled. - * Note: Output only, don't specify for creating an invoice. - */ - settleDate: string; - /** - * A bare-bones invoice for a payment within the Lightning Network. With the - * details of the invoice, the sender has all the data necessary to send a - * payment to the recipient. - * Note: Output only, don't specify for creating an invoice. - */ - paymentRequest: string; - /** - * Hash (SHA-256) of a description of the payment. Used if the description of - * payment (memo) is too long to naturally fit within the description field - * of an encoded payment request. When using REST, this field must be encoded - * as base64. - */ - descriptionHash: Uint8Array | string; - /** Payment request expiry time in seconds. Default is 3600 (1 hour). */ - expiry: string; - /** Fallback on-chain address. */ - fallbackAddr: string; - /** Delta to use for the time-lock of the CLTV extended to the final hop. */ - cltvExpiry: string; - /** - * Route hints that can each be individually used to assist in reaching the - * invoice's destination. - */ - routeHints: RouteHint[]; - /** Whether this invoice should include routing hints for private channels. */ - private: boolean; - /** - * The "add" index of this invoice. Each newly created invoice will increment - * this index making it monotonically increasing. Callers to the - * SubscribeInvoices call can use this to instantly get notified of all added - * invoices with an add_index greater than this one. - * Note: Output only, don't specify for creating an invoice. - */ - addIndex: string; - /** - * The "settle" index of this invoice. Each newly settled invoice will - * increment this index making it monotonically increasing. Callers to the - * SubscribeInvoices call can use this to instantly get notified of all - * settled invoices with an settle_index greater than this one. - * Note: Output only, don't specify for creating an invoice. - */ - settleIndex: string; - /** - * Deprecated, use amt_paid_sat or amt_paid_msat. - * - * @deprecated - */ - amtPaid: string; - /** - * The amount that was accepted for this invoice, in satoshis. This will ONLY - * be set if this invoice has been settled. We provide this field as if the - * invoice was created with a zero value, then we need to record what amount - * was ultimately accepted. Additionally, it's possible that the sender paid - * MORE that was specified in the original invoice. So we'll record that here - * as well. - * Note: Output only, don't specify for creating an invoice. - */ - amtPaidSat: string; - /** - * The amount that was accepted for this invoice, in millisatoshis. This will - * ONLY be set if this invoice has been settled. We provide this field as if - * the invoice was created with a zero value, then we need to record what - * amount was ultimately accepted. Additionally, it's possible that the sender - * paid MORE that was specified in the original invoice. So we'll record that - * here as well. - * Note: Output only, don't specify for creating an invoice. - */ - amtPaidMsat: string; - /** - * The state the invoice is in. - * Note: Output only, don't specify for creating an invoice. - */ - state: Invoice_InvoiceState; - /** - * List of HTLCs paying to this invoice [EXPERIMENTAL]. - * Note: Output only, don't specify for creating an invoice. - */ - htlcs: InvoiceHTLC[]; - /** - * List of features advertised on the invoice. - * Note: Output only, don't specify for creating an invoice. - */ - features: { [key: number]: Feature }; - /** - * Indicates if this invoice was a spontaneous payment that arrived via keysend - * [EXPERIMENTAL]. - * Note: Output only, don't specify for creating an invoice. - */ - isKeysend: boolean; - /** - * The payment address of this invoice. This value will be used in MPP - * payments, and also for newer invoices that always require the MPP payload - * for added end-to-end security. - * Note: Output only, don't specify for creating an invoice. - */ - paymentAddr: Uint8Array | string; - /** Signals whether or not this is an AMP invoice. */ - isAmp: boolean; - /** - * [EXPERIMENTAL]: - * - * Maps a 32-byte hex-encoded set ID to the sub-invoice AMP state for the - * given set ID. This field is always populated for AMP invoices, and can be - * used along side LookupInvoice to obtain the HTLC information related to a - * given sub-invoice. - * Note: Output only, don't specify for creating an invoice. - */ - ampInvoiceState: { [key: string]: AMPInvoiceState }; -} - -export enum Invoice_InvoiceState { - OPEN = 'OPEN', - SETTLED = 'SETTLED', - CANCELED = 'CANCELED', - ACCEPTED = 'ACCEPTED', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface Invoice_FeaturesEntry { - key: number; - value: Feature | undefined; -} - -export interface Invoice_AmpInvoiceStateEntry { - key: string; - value: AMPInvoiceState | undefined; -} - -/** Details of an HTLC that paid to an invoice */ -export interface InvoiceHTLC { - /** Short channel id over which the htlc was received. */ - chanId: string; - /** Index identifying the htlc on the channel. */ - htlcIndex: string; - /** The amount of the htlc in msat. */ - amtMsat: string; - /** Block height at which this htlc was accepted. */ - acceptHeight: number; - /** Time at which this htlc was accepted. */ - acceptTime: string; - /** Time at which this htlc was settled or canceled. */ - resolveTime: string; - /** Block height at which this htlc expires. */ - expiryHeight: number; - /** Current state the htlc is in. */ - state: InvoiceHTLCState; - /** Custom tlv records. */ - customRecords: { [key: string]: Uint8Array | string }; - /** The total amount of the mpp payment in msat. */ - mppTotalAmtMsat: string; - /** Details relevant to AMP HTLCs, only populated if this is an AMP HTLC. */ - amp: AMP | undefined; -} - -export interface InvoiceHTLC_CustomRecordsEntry { - key: string; - value: Uint8Array | string; -} - -/** Details specific to AMP HTLCs. */ -export interface AMP { - /** - * An n-of-n secret share of the root seed from which child payment hashes - * and preimages are derived. - */ - rootShare: Uint8Array | string; - /** An identifier for the HTLC set that this HTLC belongs to. */ - setId: Uint8Array | string; - /** - * A nonce used to randomize the child preimage and child hash from a given - * root_share. - */ - childIndex: number; - /** The payment hash of the AMP HTLC. */ - hash: Uint8Array | string; - /** - * The preimage used to settle this AMP htlc. This field will only be - * populated if the invoice is in InvoiceState_ACCEPTED or - * InvoiceState_SETTLED. - */ - preimage: Uint8Array | string; -} - -export interface AddInvoiceResponse { - rHash: Uint8Array | string; - /** - * A bare-bones invoice for a payment within the Lightning Network. With the - * details of the invoice, the sender has all the data necessary to send a - * payment to the recipient. - */ - paymentRequest: string; - /** - * The "add" index of this invoice. Each newly created invoice will increment - * this index making it monotonically increasing. Callers to the - * SubscribeInvoices call can use this to instantly get notified of all added - * invoices with an add_index greater than this one. - */ - addIndex: string; - /** - * The payment address of the generated invoice. This value should be used - * in all payments for this invoice as we require it for end to end - * security. - */ - paymentAddr: Uint8Array | string; -} - -export interface PaymentHash { - /** - * The hex-encoded payment hash of the invoice to be looked up. The passed - * payment hash must be exactly 32 bytes, otherwise an error is returned. - * Deprecated now that the REST gateway supports base64 encoding of bytes - * fields. - * - * @deprecated - */ - rHashStr: string; - /** - * The payment hash of the invoice to be looked up. When using REST, this field - * must be encoded as base64. - */ - rHash: Uint8Array | string; -} - -export interface ListInvoiceRequest { - /** - * If set, only invoices that are not settled and not canceled will be returned - * in the response. - */ - pendingOnly: boolean; - /** - * The index of an invoice that will be used as either the start or end of a - * query to determine which invoices should be returned in the response. - */ - indexOffset: string; - /** The max number of invoices to return in the response to this query. */ - numMaxInvoices: string; - /** - * If set, the invoices returned will result from seeking backwards from the - * specified index offset. This can be used to paginate backwards. - */ - reversed: boolean; -} - -export interface ListInvoiceResponse { - /** - * A list of invoices from the time slice of the time series specified in the - * request. - */ - invoices: Invoice[]; - /** - * The index of the last item in the set of returned invoices. This can be used - * to seek further, pagination style. - */ - lastIndexOffset: string; - /** - * The index of the last item in the set of returned invoices. This can be used - * to seek backwards, pagination style. - */ - firstIndexOffset: string; -} - -export interface InvoiceSubscription { - /** - * If specified (non-zero), then we'll first start by sending out - * notifications for all added indexes with an add_index greater than this - * value. This allows callers to catch up on any events they missed while they - * weren't connected to the streaming RPC. - */ - addIndex: string; - /** - * If specified (non-zero), then we'll first start by sending out - * notifications for all settled indexes with an settle_index greater than - * this value. This allows callers to catch up on any events they missed while - * they weren't connected to the streaming RPC. - */ - settleIndex: string; -} - -export interface Payment { - /** The payment hash */ - paymentHash: string; - /** - * Deprecated, use value_sat or value_msat. - * - * @deprecated - */ - value: string; - /** - * Deprecated, use creation_time_ns - * - * @deprecated - */ - creationDate: string; - /** - * Deprecated, use fee_sat or fee_msat. - * - * @deprecated - */ - fee: string; - /** The payment preimage */ - paymentPreimage: string; - /** The value of the payment in satoshis */ - valueSat: string; - /** The value of the payment in milli-satoshis */ - valueMsat: string; - /** The optional payment request being fulfilled. */ - paymentRequest: string; - /** The status of the payment. */ - status: Payment_PaymentStatus; - /** The fee paid for this payment in satoshis */ - feeSat: string; - /** The fee paid for this payment in milli-satoshis */ - feeMsat: string; - /** The time in UNIX nanoseconds at which the payment was created. */ - creationTimeNs: string; - /** The HTLCs made in attempt to settle the payment. */ - htlcs: HTLCAttempt[]; - /** - * The creation index of this payment. Each payment can be uniquely identified - * by this index, which may not strictly increment by 1 for payments made in - * older versions of lnd. - */ - paymentIndex: string; - failureReason: PaymentFailureReason; -} - -export enum Payment_PaymentStatus { - UNKNOWN = 'UNKNOWN', - IN_FLIGHT = 'IN_FLIGHT', - SUCCEEDED = 'SUCCEEDED', - FAILED = 'FAILED', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface HTLCAttempt { - /** The unique ID that is used for this attempt. */ - attemptId: string; - /** The status of the HTLC. */ - status: HTLCAttempt_HTLCStatus; - /** The route taken by this HTLC. */ - route: Route | undefined; - /** The time in UNIX nanoseconds at which this HTLC was sent. */ - attemptTimeNs: string; - /** - * The time in UNIX nanoseconds at which this HTLC was settled or failed. - * This value will not be set if the HTLC is still IN_FLIGHT. - */ - resolveTimeNs: string; - /** Detailed htlc failure info. */ - failure: Failure | undefined; - /** The preimage that was used to settle the HTLC. */ - preimage: Uint8Array | string; -} - -export enum HTLCAttempt_HTLCStatus { - IN_FLIGHT = 'IN_FLIGHT', - SUCCEEDED = 'SUCCEEDED', - FAILED = 'FAILED', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface ListPaymentsRequest { - /** - * If true, then return payments that have not yet fully completed. This means - * that pending payments, as well as failed payments will show up if this - * field is set to true. This flag doesn't change the meaning of the indices, - * which are tied to individual payments. - */ - includeIncomplete: boolean; - /** - * The index of a payment that will be used as either the start or end of a - * query to determine which payments should be returned in the response. The - * index_offset is exclusive. In the case of a zero index_offset, the query - * will start with the oldest payment when paginating forwards, or will end - * with the most recent payment when paginating backwards. - */ - indexOffset: string; - /** The maximal number of payments returned in the response to this query. */ - maxPayments: string; - /** - * If set, the payments returned will result from seeking backwards from the - * specified index offset. This can be used to paginate backwards. The order - * of the returned payments is always oldest first (ascending index order). - */ - reversed: boolean; - /** - * If set, all payments (complete and incomplete, independent of the - * max_payments parameter) will be counted. Note that setting this to true will - * increase the run time of the call significantly on systems that have a lot - * of payments, as all of them have to be iterated through to be counted. - */ - countTotalPayments: boolean; -} - -export interface ListPaymentsResponse { - /** The list of payments */ - payments: Payment[]; - /** - * The index of the first item in the set of returned payments. This can be - * used as the index_offset to continue seeking backwards in the next request. - */ - firstIndexOffset: string; - /** - * The index of the last item in the set of returned payments. This can be used - * as the index_offset to continue seeking forwards in the next request. - */ - lastIndexOffset: string; - /** - * Will only be set if count_total_payments in the request was set. Represents - * the total number of payments (complete and incomplete, independent of the - * number of payments requested in the query) currently present in the payments - * database. - */ - totalNumPayments: string; -} - -export interface DeletePaymentRequest { - /** Payment hash to delete. */ - paymentHash: Uint8Array | string; - /** Only delete failed HTLCs from the payment, not the payment itself. */ - failedHtlcsOnly: boolean; -} - -export interface DeleteAllPaymentsRequest { - /** Only delete failed payments. */ - failedPaymentsOnly: boolean; - /** Only delete failed HTLCs from payments, not the payment itself. */ - failedHtlcsOnly: boolean; -} - -export interface DeletePaymentResponse {} - -export interface DeleteAllPaymentsResponse {} - -export interface AbandonChannelRequest { - channelPoint: ChannelPoint | undefined; - pendingFundingShimOnly: boolean; - /** - * Override the requirement for being in dev mode by setting this to true and - * confirming the user knows what they are doing and this is a potential foot - * gun to lose funds if used on active channels. - */ - iKnowWhatIAmDoing: boolean; -} - -export interface AbandonChannelResponse {} - -export interface DebugLevelRequest { - show: boolean; - levelSpec: string; -} - -export interface DebugLevelResponse { - subSystems: string; -} - -export interface PayReqString { - /** The payment request string to be decoded */ - payReq: string; -} - -export interface PayReq { - destination: string; - paymentHash: string; - numSatoshis: string; - timestamp: string; - expiry: string; - description: string; - descriptionHash: string; - fallbackAddr: string; - cltvExpiry: string; - routeHints: RouteHint[]; - paymentAddr: Uint8Array | string; - numMsat: string; - features: { [key: number]: Feature }; -} - -export interface PayReq_FeaturesEntry { - key: number; - value: Feature | undefined; -} - -export interface Feature { - name: string; - isRequired: boolean; - isKnown: boolean; -} - -export interface FeeReportRequest {} - -export interface ChannelFeeReport { - /** The short channel id that this fee report belongs to. */ - chanId: string; - /** The channel that this fee report belongs to. */ - channelPoint: string; - /** The base fee charged regardless of the number of milli-satoshis sent. */ - baseFeeMsat: string; - /** - * The amount charged per milli-satoshis transferred expressed in - * millionths of a satoshi. - */ - feePerMil: string; - /** - * The effective fee rate in milli-satoshis. Computed by dividing the - * fee_per_mil value by 1 million. - */ - feeRate: number; -} - -export interface FeeReportResponse { - /** - * An array of channel fee reports which describes the current fee schedule - * for each channel. - */ - channelFees: ChannelFeeReport[]; - /** - * The total amount of fee revenue (in satoshis) the switch has collected - * over the past 24 hrs. - */ - dayFeeSum: string; - /** - * The total amount of fee revenue (in satoshis) the switch has collected - * over the past 1 week. - */ - weekFeeSum: string; - /** - * The total amount of fee revenue (in satoshis) the switch has collected - * over the past 1 month. - */ - monthFeeSum: string; -} - -export interface PolicyUpdateRequest { - /** If set, then this update applies to all currently active channels. */ - global: boolean | undefined; - /** If set, this update will target a specific channel. */ - chanPoint: ChannelPoint | undefined; - /** The base fee charged regardless of the number of milli-satoshis sent. */ - baseFeeMsat: string; - /** - * The effective fee rate in milli-satoshis. The precision of this value - * goes up to 6 decimal places, so 1e-6. - */ - feeRate: number; - /** The effective fee rate in micro-satoshis (parts per million). */ - feeRatePpm: number; - /** The required timelock delta for HTLCs forwarded over the channel. */ - timeLockDelta: number; - /** - * If set, the maximum HTLC size in milli-satoshis. If unset, the maximum - * HTLC will be unchanged. - */ - maxHtlcMsat: string; - /** - * The minimum HTLC size in milli-satoshis. Only applied if - * min_htlc_msat_specified is true. - */ - minHtlcMsat: string; - /** If true, min_htlc_msat is applied. */ - minHtlcMsatSpecified: boolean; -} - -export interface FailedUpdate { - /** The outpoint in format txid:n */ - outpoint: OutPoint | undefined; - /** Reason for the policy update failure. */ - reason: UpdateFailure; - /** A string representation of the policy update error. */ - updateError: string; -} - -export interface PolicyUpdateResponse { - /** List of failed policy updates. */ - failedUpdates: FailedUpdate[]; -} - -export interface ForwardingHistoryRequest { - /** - * Start time is the starting point of the forwarding history request. All - * records beyond this point will be included, respecting the end time, and - * the index offset. - */ - startTime: string; - /** - * End time is the end point of the forwarding history request. The - * response will carry at most 50k records between the start time and the - * end time. The index offset can be used to implement pagination. - */ - endTime: string; - /** - * Index offset is the offset in the time series to start at. As each - * response can only contain 50k records, callers can use this to skip - * around within a packed time series. - */ - indexOffset: number; - /** The max number of events to return in the response to this query. */ - numMaxEvents: number; -} - -export interface ForwardingEvent { - /** - * Timestamp is the time (unix epoch offset) that this circuit was - * completed. Deprecated by timestamp_ns. - * - * @deprecated - */ - timestamp: string; - /** The incoming channel ID that carried the HTLC that created the circuit. */ - chanIdIn: string; - /** - * The outgoing channel ID that carried the preimage that completed the - * circuit. - */ - chanIdOut: string; - /** - * The total amount (in satoshis) of the incoming HTLC that created half - * the circuit. - */ - amtIn: string; - /** - * The total amount (in satoshis) of the outgoing HTLC that created the - * second half of the circuit. - */ - amtOut: string; - /** The total fee (in satoshis) that this payment circuit carried. */ - fee: string; - /** The total fee (in milli-satoshis) that this payment circuit carried. */ - feeMsat: string; - /** - * The total amount (in milli-satoshis) of the incoming HTLC that created - * half the circuit. - */ - amtInMsat: string; - /** - * The total amount (in milli-satoshis) of the outgoing HTLC that created - * the second half of the circuit. - */ - amtOutMsat: string; - /** - * The number of nanoseconds elapsed since January 1, 1970 UTC when this - * circuit was completed. - */ - timestampNs: string; -} - -export interface ForwardingHistoryResponse { - /** - * A list of forwarding events from the time slice of the time series - * specified in the request. - */ - forwardingEvents: ForwardingEvent[]; - /** - * The index of the last time in the set of returned forwarding events. Can - * be used to seek further, pagination style. - */ - lastOffsetIndex: number; -} - -export interface ExportChannelBackupRequest { - /** The target channel point to obtain a back up for. */ - chanPoint: ChannelPoint | undefined; -} - -export interface ChannelBackup { - /** Identifies the channel that this backup belongs to. */ - chanPoint: ChannelPoint | undefined; - /** - * Is an encrypted single-chan backup. this can be passed to - * RestoreChannelBackups, or the WalletUnlocker Init and Unlock methods in - * order to trigger the recovery protocol. When using REST, this field must be - * encoded as base64. - */ - chanBackup: Uint8Array | string; -} - -export interface MultiChanBackup { - /** Is the set of all channels that are included in this multi-channel backup. */ - chanPoints: ChannelPoint[]; - /** - * A single encrypted blob containing all the static channel backups of the - * channel listed above. This can be stored as a single file or blob, and - * safely be replaced with any prior/future versions. When using REST, this - * field must be encoded as base64. - */ - multiChanBackup: Uint8Array | string; -} - -export interface ChanBackupExportRequest {} - -export interface ChanBackupSnapshot { - /** - * The set of new channels that have been added since the last channel backup - * snapshot was requested. - */ - singleChanBackups: ChannelBackups | undefined; - /** - * A multi-channel backup that covers all open channels currently known to - * lnd. - */ - multiChanBackup: MultiChanBackup | undefined; -} - -export interface ChannelBackups { - /** A set of single-chan static channel backups. */ - chanBackups: ChannelBackup[]; -} - -export interface RestoreChanBackupRequest { - /** The channels to restore as a list of channel/backup pairs. */ - chanBackups: ChannelBackups | undefined; - /** - * The channels to restore in the packed multi backup format. When using - * REST, this field must be encoded as base64. - */ - multiChanBackup: Uint8Array | string | undefined; -} - -export interface RestoreBackupResponse {} - -export interface ChannelBackupSubscription {} - -export interface VerifyChanBackupResponse {} - -export interface MacaroonPermission { - /** The entity a permission grants access to. */ - entity: string; - /** The action that is granted. */ - action: string; -} - -export interface BakeMacaroonRequest { - /** The list of permissions the new macaroon should grant. */ - permissions: MacaroonPermission[]; - /** The root key ID used to create the macaroon, must be a positive integer. */ - rootKeyId: string; - /** - * Informs the RPC on whether to allow external permissions that LND is not - * aware of. - */ - allowExternalPermissions: boolean; -} - -export interface BakeMacaroonResponse { - /** The hex encoded macaroon, serialized in binary format. */ - macaroon: string; -} - -export interface ListMacaroonIDsRequest {} - -export interface ListMacaroonIDsResponse { - /** The list of root key IDs that are in use. */ - rootKeyIds: string[]; -} - -export interface DeleteMacaroonIDRequest { - /** The root key ID to be removed. */ - rootKeyId: string; -} - -export interface DeleteMacaroonIDResponse { - /** A boolean indicates that the deletion is successful. */ - deleted: boolean; -} - -export interface MacaroonPermissionList { - /** A list of macaroon permissions. */ - permissions: MacaroonPermission[]; -} - -export interface ListPermissionsRequest {} - -export interface ListPermissionsResponse { - /** - * A map between all RPC method URIs and their required macaroon permissions to - * access them. - */ - methodPermissions: { [key: string]: MacaroonPermissionList }; -} - -export interface ListPermissionsResponse_MethodPermissionsEntry { - key: string; - value: MacaroonPermissionList | undefined; -} - -export interface Failure { - /** Failure code as defined in the Lightning spec */ - code: Failure_FailureCode; - /** An optional channel update message. */ - channelUpdate: ChannelUpdate | undefined; - /** A failure type-dependent htlc value. */ - htlcMsat: string; - /** The sha256 sum of the onion payload. */ - onionSha256: Uint8Array | string; - /** A failure type-dependent cltv expiry value. */ - cltvExpiry: number; - /** A failure type-dependent flags value. */ - flags: number; - /** - * The position in the path of the intermediate or final node that generated - * the failure message. Position zero is the sender node. - */ - failureSourceIndex: number; - /** A failure type-dependent block height. */ - height: number; -} - -export enum Failure_FailureCode { - /** - * RESERVED - The numbers assigned in this enumeration match the failure codes as - * defined in BOLT #4. Because protobuf 3 requires enums to start with 0, - * a RESERVED value is added. - */ - RESERVED = 'RESERVED', - INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS = 'INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS', - INCORRECT_PAYMENT_AMOUNT = 'INCORRECT_PAYMENT_AMOUNT', - FINAL_INCORRECT_CLTV_EXPIRY = 'FINAL_INCORRECT_CLTV_EXPIRY', - FINAL_INCORRECT_HTLC_AMOUNT = 'FINAL_INCORRECT_HTLC_AMOUNT', - FINAL_EXPIRY_TOO_SOON = 'FINAL_EXPIRY_TOO_SOON', - INVALID_REALM = 'INVALID_REALM', - EXPIRY_TOO_SOON = 'EXPIRY_TOO_SOON', - INVALID_ONION_VERSION = 'INVALID_ONION_VERSION', - INVALID_ONION_HMAC = 'INVALID_ONION_HMAC', - INVALID_ONION_KEY = 'INVALID_ONION_KEY', - AMOUNT_BELOW_MINIMUM = 'AMOUNT_BELOW_MINIMUM', - FEE_INSUFFICIENT = 'FEE_INSUFFICIENT', - INCORRECT_CLTV_EXPIRY = 'INCORRECT_CLTV_EXPIRY', - CHANNEL_DISABLED = 'CHANNEL_DISABLED', - TEMPORARY_CHANNEL_FAILURE = 'TEMPORARY_CHANNEL_FAILURE', - REQUIRED_NODE_FEATURE_MISSING = 'REQUIRED_NODE_FEATURE_MISSING', - REQUIRED_CHANNEL_FEATURE_MISSING = 'REQUIRED_CHANNEL_FEATURE_MISSING', - UNKNOWN_NEXT_PEER = 'UNKNOWN_NEXT_PEER', - TEMPORARY_NODE_FAILURE = 'TEMPORARY_NODE_FAILURE', - PERMANENT_NODE_FAILURE = 'PERMANENT_NODE_FAILURE', - PERMANENT_CHANNEL_FAILURE = 'PERMANENT_CHANNEL_FAILURE', - EXPIRY_TOO_FAR = 'EXPIRY_TOO_FAR', - MPP_TIMEOUT = 'MPP_TIMEOUT', - INVALID_ONION_PAYLOAD = 'INVALID_ONION_PAYLOAD', - /** INTERNAL_FAILURE - An internal error occurred. */ - INTERNAL_FAILURE = 'INTERNAL_FAILURE', - /** UNKNOWN_FAILURE - The error source is known, but the failure itself couldn't be decoded. */ - UNKNOWN_FAILURE = 'UNKNOWN_FAILURE', - /** - * UNREADABLE_FAILURE - An unreadable failure result is returned if the received failure message - * cannot be decrypted. In that case the error source is unknown. - */ - UNREADABLE_FAILURE = 'UNREADABLE_FAILURE', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface ChannelUpdate { - /** - * The signature that validates the announced data and proves the ownership - * of node id. - */ - signature: Uint8Array | string; - /** - * The target chain that this channel was opened within. This value - * should be the genesis hash of the target chain. Along with the short - * channel ID, this uniquely identifies the channel globally in a - * blockchain. - */ - chainHash: Uint8Array | string; - /** The unique description of the funding transaction. */ - chanId: string; - /** - * A timestamp that allows ordering in the case of multiple announcements. - * We should ignore the message if timestamp is not greater than the - * last-received. - */ - timestamp: number; - /** - * The bitfield that describes whether optional fields are present in this - * update. Currently, the least-significant bit must be set to 1 if the - * optional field MaxHtlc is present. - */ - messageFlags: number; - /** - * The bitfield that describes additional meta-data concerning how the - * update is to be interpreted. Currently, the least-significant bit must be - * set to 0 if the creating node corresponds to the first node in the - * previously sent channel announcement and 1 otherwise. If the second bit - * is set, then the channel is set to be disabled. - */ - channelFlags: number; - /** - * The minimum number of blocks this node requires to be added to the expiry - * of HTLCs. This is a security parameter determined by the node operator. - * This value represents the required gap between the time locks of the - * incoming and outgoing HTLC's set to this node. - */ - timeLockDelta: number; - /** The minimum HTLC value which will be accepted. */ - htlcMinimumMsat: string; - /** - * The base fee that must be used for incoming HTLC's to this particular - * channel. This value will be tacked onto the required for a payment - * independent of the size of the payment. - */ - baseFee: number; - /** The fee rate that will be charged per millionth of a satoshi. */ - feeRate: number; - /** The maximum HTLC value which will be accepted. */ - htlcMaximumMsat: string; - /** - * The set of data that was appended to this message, some of which we may - * not actually know how to iterate or parse. By holding onto this data, we - * ensure that we're able to properly validate the set of signatures that - * cover these new fields, and ensure we're able to make upgrades to the - * network in a forwards compatible manner. - */ - extraOpaqueData: Uint8Array | string; -} - -export interface MacaroonId { - nonce: Uint8Array | string; - storageId: Uint8Array | string; - ops: Op[]; -} - -export interface Op { - entity: string; - actions: string[]; -} - -export interface CheckMacPermRequest { - macaroon: Uint8Array | string; - permissions: MacaroonPermission[]; - fullMethod: string; -} - -export interface CheckMacPermResponse { - valid: boolean; -} - -export interface RPCMiddlewareRequest { - /** - * The unique ID of the intercepted original gRPC request. Useful for mapping - * request to response when implementing full duplex message interception. For - * streaming requests, this will be the same ID for all incoming and outgoing - * middleware intercept messages of the _same_ stream. - */ - requestId: string; - /** - * The raw bytes of the complete macaroon as sent by the gRPC client in the - * original request. This might be empty for a request that doesn't require - * macaroons such as the wallet unlocker RPCs. - */ - rawMacaroon: Uint8Array | string; - /** - * The parsed condition of the macaroon's custom caveat for convenient access. - * This field only contains the value of the custom caveat that the handling - * middleware has registered itself for. The condition _must_ be validated for - * messages of intercept_type stream_auth and request! - */ - customCaveatCondition: string; - /** - * Intercept stream authentication: each new streaming RPC call that is - * initiated against lnd and contains the middleware's custom macaroon - * caveat can be approved or denied based upon the macaroon in the stream - * header. This message will only be sent for streaming RPCs, unary RPCs - * must handle the macaroon authentication in the request interception to - * avoid an additional message round trip between lnd and the middleware. - */ - streamAuth: StreamAuth | undefined; - /** - * Intercept incoming gRPC client request message: all incoming messages, - * both on streaming and unary RPCs, are forwarded to the middleware for - * inspection. For unary RPC messages the middleware is also expected to - * validate the custom macaroon caveat of the request. - */ - request: RPCMessage | undefined; - /** - * Intercept outgoing gRPC response message: all outgoing messages, both on - * streaming and unary RPCs, are forwarded to the middleware for inspection - * and amendment. The response in this message is the original response as - * it was generated by the main RPC server. It can either be accepted - * (=forwarded to the client), replaced/overwritten with a new message of - * the same type, or replaced by an error message. - */ - response: RPCMessage | undefined; - /** - * This is used to indicate to the client that the server has successfully - * registered the interceptor. This is only used in the very first message - * that the server sends to the client after the client sends the server - * the middleware registration message. - */ - regComplete: boolean | undefined; - /** - * The unique message ID of this middleware intercept message. There can be - * multiple middleware intercept messages per single gRPC request (one for the - * incoming request and one for the outgoing response) or gRPC stream (one for - * each incoming message and one for each outgoing response). This message ID - * must be referenced when responding (accepting/rejecting/modifying) to an - * intercept message. - */ - msgId: string; -} - -export interface StreamAuth { - /** - * The full URI (in the format /./MethodName, for - * example /lnrpc.Lightning/GetInfo) of the streaming RPC method that was just - * established. - */ - methodFullUri: string; -} - -export interface RPCMessage { - /** - * The full URI (in the format /./MethodName, for - * example /lnrpc.Lightning/GetInfo) of the RPC method the message was sent - * to/from. - */ - methodFullUri: string; - /** Indicates whether the message was sent over a streaming RPC method or not. */ - streamRpc: boolean; - /** - * The full canonical gRPC name of the message type (in the format - * .TypeName, for example lnrpc.GetInfoRequest). In case of an - * error being returned from lnd, this simply contains the string "error". - */ - typeName: string; - /** - * The full content of the gRPC message, serialized in the binary protobuf - * format. - */ - serialized: Uint8Array | string; - /** - * Indicates that the response from lnd was an error, not a gRPC response. If - * this is set to true then the type_name contains the string "error" and - * serialized contains the error string. - */ - isError: boolean; -} - -export interface RPCMiddlewareResponse { - /** - * The request message ID this response refers to. Must always be set when - * giving feedback to an intercept but is ignored for the initial registration - * message. - */ - refMsgId: string; - /** - * The registration message identifies the middleware that's being - * registered in lnd. The registration message must be sent immediately - * after initiating the RegisterRpcMiddleware stream, otherwise lnd will - * time out the attempt and terminate the request. NOTE: The middleware - * will only receive interception messages for requests that contain a - * macaroon with the custom caveat that the middleware declares it is - * responsible for handling in the registration message! As a security - * measure, _no_ middleware can intercept requests made with _unencumbered_ - * macaroons! - */ - register: MiddlewareRegistration | undefined; - /** - * The middleware received an interception request and gives feedback to - * it. The request_id indicates what message the feedback refers to. - */ - feedback: InterceptFeedback | undefined; -} - -export interface MiddlewareRegistration { - /** - * The name of the middleware to register. The name should be as informative - * as possible and is logged on registration. - */ - middlewareName: string; - /** - * The name of the custom macaroon caveat that this middleware is responsible - * for. Only requests/responses that contain a macaroon with the registered - * custom caveat are forwarded for interception to the middleware. The - * exception being the read-only mode: All requests/responses are forwarded to - * a middleware that requests read-only access but such a middleware won't be - * allowed to _alter_ responses. As a security measure, _no_ middleware can - * change responses to requests made with _unencumbered_ macaroons! - * NOTE: Cannot be used at the same time as read_only_mode. - */ - customMacaroonCaveatName: string; - /** - * Instead of defining a custom macaroon caveat name a middleware can register - * itself for read-only access only. In that mode all requests/responses are - * forwarded to the middleware but the middleware isn't allowed to alter any of - * the responses. - * NOTE: Cannot be used at the same time as custom_macaroon_caveat_name. - */ - readOnlyMode: boolean; -} - -export interface InterceptFeedback { - /** - * The error to return to the user. If this is non-empty, the incoming gRPC - * stream/request is aborted and the error is returned to the gRPC client. If - * this value is empty, it means the middleware accepts the stream/request/ - * response and the processing of it can continue. - */ - error: string; - /** - * A boolean indicating that the gRPC message should be replaced/overwritten. - * This boolean is needed because in protobuf an empty message is serialized as - * a 0-length or nil byte slice and we wouldn't be able to distinguish between - * an empty replacement message and the "don't replace anything" case. - */ - replaceResponse: boolean; - /** - * If the replace_response field is set to true, this field must contain the - * binary serialized gRPC message in the protobuf format. - */ - replacementSerialized: Uint8Array | string; -} - -/** Lightning is the main RPC server of the daemon. */ -export interface Lightning { - /** - * lncli: `walletbalance` - * WalletBalance returns total unspent outputs(confirmed and unconfirmed), all - * confirmed unspent outputs and all unconfirmed unspent outputs under control - * of the wallet. - */ - walletBalance( - request?: DeepPartial - ): Promise; - /** - * lncli: `channelbalance` - * ChannelBalance returns a report on the total funds across all open channels, - * categorized in local/remote, pending local/remote and unsettled local/remote - * balances. - */ - channelBalance( - request?: DeepPartial - ): Promise; - /** - * lncli: `listchaintxns` - * GetTransactions returns a list describing all the known transactions - * relevant to the wallet. - */ - getTransactions( - request?: DeepPartial - ): Promise; - /** - * lncli: `estimatefee` - * EstimateFee asks the chain backend to estimate the fee rate and total fees - * for a transaction that pays to multiple specified outputs. - * - * When using REST, the `AddrToAmount` map type can be set by appending - * `&AddrToAmount[
]=` to the URL. Unfortunately this - * map type doesn't appear in the REST API documentation because of a bug in - * the grpc-gateway library. - */ - estimateFee( - request?: DeepPartial - ): Promise; - /** - * lncli: `sendcoins` - * SendCoins executes a request to send coins to a particular address. Unlike - * SendMany, this RPC call only allows creating a single output at a time. If - * neither target_conf, or sat_per_vbyte are set, then the internal wallet will - * consult its fee model to determine a fee for the default confirmation - * target. - */ - sendCoins( - request?: DeepPartial - ): Promise; - /** - * lncli: `listunspent` - * Deprecated, use walletrpc.ListUnspent instead. - * - * ListUnspent returns a list of all utxos spendable by the wallet with a - * number of confirmations between the specified minimum and maximum. - */ - listUnspent( - request?: DeepPartial - ): Promise; - /** - * SubscribeTransactions creates a uni-directional stream from the server to - * the client in which any newly discovered transactions relevant to the - * wallet are sent over. - */ - subscribeTransactions( - request?: DeepPartial, - onMessage?: (msg: Transaction) => void, - onError?: (err: Error) => void - ): void; - /** - * lncli: `sendmany` - * SendMany handles a request for a transaction that creates multiple specified - * outputs in parallel. If neither target_conf, or sat_per_vbyte are set, then - * the internal wallet will consult its fee model to determine a fee for the - * default confirmation target. - */ - sendMany(request?: DeepPartial): Promise; - /** - * lncli: `newaddress` - * NewAddress creates a new address under control of the local wallet. - */ - newAddress( - request?: DeepPartial - ): Promise; - /** - * lncli: `signmessage` - * SignMessage signs a message with this node's private key. The returned - * signature string is `zbase32` encoded and pubkey recoverable, meaning that - * only the message digest and signature are needed for verification. - */ - signMessage( - request?: DeepPartial - ): Promise; - /** - * lncli: `verifymessage` - * VerifyMessage verifies a signature over a msg. The signature must be - * zbase32 encoded and signed by an active node in the resident node's - * channel database. In addition to returning the validity of the signature, - * VerifyMessage also returns the recovered pubkey from the signature. - */ - verifyMessage( - request?: DeepPartial - ): Promise; - /** - * lncli: `connect` - * ConnectPeer attempts to establish a connection to a remote peer. This is at - * the networking level, and is used for communication between nodes. This is - * distinct from establishing a channel with a peer. - */ - connectPeer( - request?: DeepPartial - ): Promise; - /** - * lncli: `disconnect` - * DisconnectPeer attempts to disconnect one peer from another identified by a - * given pubKey. In the case that we currently have a pending or active channel - * with the target peer, then this action will be not be allowed. - */ - disconnectPeer( - request?: DeepPartial - ): Promise; - /** - * lncli: `listpeers` - * ListPeers returns a verbose listing of all currently active peers. - */ - listPeers( - request?: DeepPartial - ): Promise; - /** - * SubscribePeerEvents creates a uni-directional stream from the server to - * the client in which any events relevant to the state of peers are sent - * over. Events include peers going online and offline. - */ - subscribePeerEvents( - request?: DeepPartial, - onMessage?: (msg: PeerEvent) => void, - onError?: (err: Error) => void - ): void; - /** - * lncli: `getinfo` - * GetInfo returns general information concerning the lightning node including - * it's identity pubkey, alias, the chains it is connected to, and information - * concerning the number of open+pending channels. - */ - getInfo(request?: DeepPartial): Promise; - /** - * lncli: `getrecoveryinfo` - * GetRecoveryInfo returns information concerning the recovery mode including - * whether it's in a recovery mode, whether the recovery is finished, and the - * progress made so far. - */ - getRecoveryInfo( - request?: DeepPartial - ): Promise; - /** - * lncli: `pendingchannels` - * PendingChannels returns a list of all the channels that are currently - * considered "pending". A channel is pending if it has finished the funding - * workflow and is waiting for confirmations for the funding txn, or is in the - * process of closure, either initiated cooperatively or non-cooperatively. - */ - pendingChannels( - request?: DeepPartial - ): Promise; - /** - * lncli: `listchannels` - * ListChannels returns a description of all the open channels that this node - * is a participant in. - */ - listChannels( - request?: DeepPartial - ): Promise; - /** - * SubscribeChannelEvents creates a uni-directional stream from the server to - * the client in which any updates relevant to the state of the channels are - * sent over. Events include new active channels, inactive channels, and closed - * channels. - */ - subscribeChannelEvents( - request?: DeepPartial, - onMessage?: (msg: ChannelEventUpdate) => void, - onError?: (err: Error) => void - ): void; - /** - * lncli: `closedchannels` - * ClosedChannels returns a description of all the closed channels that - * this node was a participant in. - */ - closedChannels( - request?: DeepPartial - ): Promise; - /** - * OpenChannelSync is a synchronous version of the OpenChannel RPC call. This - * call is meant to be consumed by clients to the REST proxy. As with all - * other sync calls, all byte slices are intended to be populated as hex - * encoded strings. - */ - openChannelSync( - request?: DeepPartial - ): Promise; - /** - * lncli: `openchannel` - * OpenChannel attempts to open a singly funded channel specified in the - * request to a remote peer. Users are able to specify a target number of - * blocks that the funding transaction should be confirmed in, or a manual fee - * rate to us for the funding transaction. If neither are specified, then a - * lax block confirmation target is used. Each OpenStatusUpdate will return - * the pending channel ID of the in-progress channel. Depending on the - * arguments specified in the OpenChannelRequest, this pending channel ID can - * then be used to manually progress the channel funding flow. - */ - openChannel( - request?: DeepPartial, - onMessage?: (msg: OpenStatusUpdate) => void, - onError?: (err: Error) => void - ): void; - /** - * lncli: `batchopenchannel` - * BatchOpenChannel attempts to open multiple single-funded channels in a - * single transaction in an atomic way. This means either all channel open - * requests succeed at once or all attempts are aborted if any of them fail. - * This is the safer variant of using PSBTs to manually fund a batch of - * channels through the OpenChannel RPC. - */ - batchOpenChannel( - request?: DeepPartial - ): Promise; - /** - * FundingStateStep is an advanced funding related call that allows the caller - * to either execute some preparatory steps for a funding workflow, or - * manually progress a funding workflow. The primary way a funding flow is - * identified is via its pending channel ID. As an example, this method can be - * used to specify that we're expecting a funding flow for a particular - * pending channel ID, for which we need to use specific parameters. - * Alternatively, this can be used to interactively drive PSBT signing for - * funding for partially complete funding transactions. - */ - fundingStateStep( - request?: DeepPartial - ): Promise; - /** - * ChannelAcceptor dispatches a bi-directional streaming RPC in which - * OpenChannel requests are sent to the client and the client responds with - * a boolean that tells LND whether or not to accept the channel. This allows - * node operators to specify their own criteria for accepting inbound channels - * through a single persistent connection. - */ - channelAcceptor( - request?: DeepPartial, - onMessage?: (msg: ChannelAcceptRequest) => void, - onError?: (err: Error) => void - ): void; - /** - * lncli: `closechannel` - * CloseChannel attempts to close an active channel identified by its channel - * outpoint (ChannelPoint). The actions of this method can additionally be - * augmented to attempt a force close after a timeout period in the case of an - * inactive peer. If a non-force close (cooperative closure) is requested, - * then the user can specify either a target number of blocks until the - * closure transaction is confirmed, or a manual fee rate. If neither are - * specified, then a default lax, block confirmation target is used. - */ - closeChannel( - request?: DeepPartial, - onMessage?: (msg: CloseStatusUpdate) => void, - onError?: (err: Error) => void - ): void; - /** - * lncli: `abandonchannel` - * AbandonChannel removes all channel state from the database except for a - * close summary. This method can be used to get rid of permanently unusable - * channels due to bugs fixed in newer versions of lnd. This method can also be - * used to remove externally funded channels where the funding transaction was - * never broadcast. Only available for non-externally funded channels in dev - * build. - */ - abandonChannel( - request?: DeepPartial - ): Promise; - /** - * lncli: `sendpayment` - * Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a - * bi-directional streaming RPC for sending payments through the Lightning - * Network. A single RPC invocation creates a persistent bi-directional - * stream allowing clients to rapidly send payments through the Lightning - * Network with a single persistent connection. - * - * @deprecated - */ - sendPayment( - request?: DeepPartial, - onMessage?: (msg: SendResponse) => void, - onError?: (err: Error) => void - ): void; - /** - * SendPaymentSync is the synchronous non-streaming version of SendPayment. - * This RPC is intended to be consumed by clients of the REST proxy. - * Additionally, this RPC expects the destination's public key and the payment - * hash (if any) to be encoded as hex strings. - */ - sendPaymentSync(request?: DeepPartial): Promise; - /** - * lncli: `sendtoroute` - * Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional - * streaming RPC for sending payment through the Lightning Network. This - * method differs from SendPayment in that it allows users to specify a full - * route manually. This can be used for things like rebalancing, and atomic - * swaps. - * - * @deprecated - */ - sendToRoute( - request?: DeepPartial, - onMessage?: (msg: SendResponse) => void, - onError?: (err: Error) => void - ): void; - /** - * SendToRouteSync is a synchronous version of SendToRoute. It Will block - * until the payment either fails or succeeds. - */ - sendToRouteSync( - request?: DeepPartial - ): Promise; - /** - * lncli: `addinvoice` - * AddInvoice attempts to add a new invoice to the invoice database. Any - * duplicated invoices are rejected, therefore all invoices *must* have a - * unique payment preimage. - */ - addInvoice(request?: DeepPartial): Promise; - /** - * lncli: `listinvoices` - * ListInvoices returns a list of all the invoices currently stored within the - * database. Any active debug invoices are ignored. It has full support for - * paginated responses, allowing users to query for specific invoices through - * their add_index. This can be done by using either the first_index_offset or - * last_index_offset fields included in the response as the index_offset of the - * next request. By default, the first 100 invoices created will be returned. - * Backwards pagination is also supported through the Reversed flag. - */ - listInvoices( - request?: DeepPartial - ): Promise; - /** - * lncli: `lookupinvoice` - * LookupInvoice attempts to look up an invoice according to its payment hash. - * The passed payment hash *must* be exactly 32 bytes, if not, an error is - * returned. - */ - lookupInvoice(request?: DeepPartial): Promise; - /** - * SubscribeInvoices returns a uni-directional stream (server -> client) for - * notifying the client of newly added/settled invoices. The caller can - * optionally specify the add_index and/or the settle_index. If the add_index - * is specified, then we'll first start by sending add invoice events for all - * invoices with an add_index greater than the specified value. If the - * settle_index is specified, the next, we'll send out all settle events for - * invoices with a settle_index greater than the specified value. One or both - * of these fields can be set. If no fields are set, then we'll only send out - * the latest add/settle events. - */ - subscribeInvoices( - request?: DeepPartial, - onMessage?: (msg: Invoice) => void, - onError?: (err: Error) => void - ): void; - /** - * lncli: `decodepayreq` - * DecodePayReq takes an encoded payment request string and attempts to decode - * it, returning a full description of the conditions encoded within the - * payment request. - */ - decodePayReq(request?: DeepPartial): Promise; - /** - * lncli: `listpayments` - * ListPayments returns a list of all outgoing payments. - */ - listPayments( - request?: DeepPartial - ): Promise; - /** - * DeletePayment deletes an outgoing payment from DB. Note that it will not - * attempt to delete an In-Flight payment, since that would be unsafe. - */ - deletePayment( - request?: DeepPartial - ): Promise; - /** - * DeleteAllPayments deletes all outgoing payments from DB. Note that it will - * not attempt to delete In-Flight payments, since that would be unsafe. - */ - deleteAllPayments( - request?: DeepPartial - ): Promise; - /** - * lncli: `describegraph` - * DescribeGraph returns a description of the latest graph state from the - * point of view of the node. The graph information is partitioned into two - * components: all the nodes/vertexes, and all the edges that connect the - * vertexes themselves. As this is a directed graph, the edges also contain - * the node directional specific routing policy which includes: the time lock - * delta, fee information, etc. - */ - describeGraph( - request?: DeepPartial - ): Promise; - /** - * lncli: `getnodemetrics` - * GetNodeMetrics returns node metrics calculated from the graph. Currently - * the only supported metric is betweenness centrality of individual nodes. - */ - getNodeMetrics( - request?: DeepPartial - ): Promise; - /** - * lncli: `getchaninfo` - * GetChanInfo returns the latest authenticated network announcement for the - * given channel identified by its channel ID: an 8-byte integer which - * uniquely identifies the location of transaction's funding output within the - * blockchain. - */ - getChanInfo(request?: DeepPartial): Promise; - /** - * lncli: `getnodeinfo` - * GetNodeInfo returns the latest advertised, aggregated, and authenticated - * channel information for the specified node identified by its public key. - */ - getNodeInfo(request?: DeepPartial): Promise; - /** - * lncli: `queryroutes` - * QueryRoutes attempts to query the daemon's Channel Router for a possible - * route to a target destination capable of carrying a specific amount of - * satoshis. The returned route contains the full details required to craft and - * send an HTLC, also including the necessary information that should be - * present within the Sphinx packet encapsulated within the HTLC. - * - * When using REST, the `dest_custom_records` map type can be set by appending - * `&dest_custom_records[]=` - * to the URL. Unfortunately this map type doesn't appear in the REST API - * documentation because of a bug in the grpc-gateway library. - */ - queryRoutes( - request?: DeepPartial - ): Promise; - /** - * lncli: `getnetworkinfo` - * GetNetworkInfo returns some basic stats about the known channel graph from - * the point of view of the node. - */ - getNetworkInfo( - request?: DeepPartial - ): Promise; - /** - * lncli: `stop` - * StopDaemon will send a shutdown request to the interrupt handler, triggering - * a graceful shutdown of the daemon. - */ - stopDaemon(request?: DeepPartial): Promise; - /** - * SubscribeChannelGraph launches a streaming RPC that allows the caller to - * receive notifications upon any changes to the channel graph topology from - * the point of view of the responding node. Events notified include: new - * nodes coming online, nodes updating their authenticated attributes, new - * channels being advertised, updates in the routing policy for a directional - * channel edge, and when channels are closed on-chain. - */ - subscribeChannelGraph( - request?: DeepPartial, - onMessage?: (msg: GraphTopologyUpdate) => void, - onError?: (err: Error) => void - ): void; - /** - * lncli: `debuglevel` - * DebugLevel allows a caller to programmatically set the logging verbosity of - * lnd. The logging can be targeted according to a coarse daemon-wide logging - * level, or in a granular fashion to specify the logging for a target - * sub-system. - */ - debugLevel( - request?: DeepPartial - ): Promise; - /** - * lncli: `feereport` - * FeeReport allows the caller to obtain a report detailing the current fee - * schedule enforced by the node globally for each channel. - */ - feeReport( - request?: DeepPartial - ): Promise; - /** - * lncli: `updatechanpolicy` - * UpdateChannelPolicy allows the caller to update the fee schedule and - * channel policies for all channels globally, or a particular channel. - */ - updateChannelPolicy( - request?: DeepPartial - ): Promise; - /** - * lncli: `fwdinghistory` - * ForwardingHistory allows the caller to query the htlcswitch for a record of - * all HTLCs forwarded within the target time range, and integer offset - * within that time range, for a maximum number of events. If no maximum number - * of events is specified, up to 100 events will be returned. If no time-range - * is specified, then events will be returned in the order that they occured. - * - * A list of forwarding events are returned. The size of each forwarding event - * is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB. - * As a result each message can only contain 50k entries. Each response has - * the index offset of the last entry. The index offset can be provided to the - * request to allow the caller to skip a series of records. - */ - forwardingHistory( - request?: DeepPartial - ): Promise; - /** - * lncli: `exportchanbackup` - * ExportChannelBackup attempts to return an encrypted static channel backup - * for the target channel identified by it channel point. The backup is - * encrypted with a key generated from the aezeed seed of the user. The - * returned backup can either be restored using the RestoreChannelBackup - * method once lnd is running, or via the InitWallet and UnlockWallet methods - * from the WalletUnlocker service. - */ - exportChannelBackup( - request?: DeepPartial - ): Promise; - /** - * ExportAllChannelBackups returns static channel backups for all existing - * channels known to lnd. A set of regular singular static channel backups for - * each channel are returned. Additionally, a multi-channel backup is returned - * as well, which contains a single encrypted blob containing the backups of - * each channel. - */ - exportAllChannelBackups( - request?: DeepPartial - ): Promise; - /** - * VerifyChanBackup allows a caller to verify the integrity of a channel backup - * snapshot. This method will accept either a packed Single or a packed Multi. - * Specifying both will result in an error. - */ - verifyChanBackup( - request?: DeepPartial - ): Promise; - /** - * lncli: `restorechanbackup` - * RestoreChannelBackups accepts a set of singular channel backups, or a - * single encrypted multi-chan backup and attempts to recover any funds - * remaining within the channel. If we are able to unpack the backup, then the - * new channel will be shown under listchannels, as well as pending channels. - */ - restoreChannelBackups( - request?: DeepPartial - ): Promise; - /** - * SubscribeChannelBackups allows a client to sub-subscribe to the most up to - * date information concerning the state of all channel backups. Each time a - * new channel is added, we return the new set of channels, along with a - * multi-chan backup containing the backup info for all channels. Each time a - * channel is closed, we send a new update, which contains new new chan back - * ups, but the updated set of encrypted multi-chan backups with the closed - * channel(s) removed. - */ - subscribeChannelBackups( - request?: DeepPartial, - onMessage?: (msg: ChanBackupSnapshot) => void, - onError?: (err: Error) => void - ): void; - /** - * lncli: `bakemacaroon` - * BakeMacaroon allows the creation of a new macaroon with custom read and - * write permissions. No first-party caveats are added since this can be done - * offline. - */ - bakeMacaroon( - request?: DeepPartial - ): Promise; - /** - * lncli: `listmacaroonids` - * ListMacaroonIDs returns all root key IDs that are in use. - */ - listMacaroonIDs( - request?: DeepPartial - ): Promise; - /** - * lncli: `deletemacaroonid` - * DeleteMacaroonID deletes the specified macaroon ID and invalidates all - * macaroons derived from that ID. - */ - deleteMacaroonID( - request?: DeepPartial - ): Promise; - /** - * lncli: `listpermissions` - * ListPermissions lists all RPC method URIs and their required macaroon - * permissions to access them. - */ - listPermissions( - request?: DeepPartial - ): Promise; - /** - * CheckMacaroonPermissions checks whether a request follows the constraints - * imposed on the macaroon and that the macaroon is authorized to follow the - * provided permissions. - */ - checkMacaroonPermissions( - request?: DeepPartial - ): Promise; - /** - * RegisterRPCMiddleware adds a new gRPC middleware to the interceptor chain. A - * gRPC middleware is software component external to lnd that aims to add - * additional business logic to lnd by observing/intercepting/validating - * incoming gRPC client requests and (if needed) replacing/overwriting outgoing - * messages before they're sent to the client. When registering the middleware - * must identify itself and indicate what custom macaroon caveats it wants to - * be responsible for. Only requests that contain a macaroon with that specific - * custom caveat are then sent to the middleware for inspection. The other - * option is to register for the read-only mode in which all requests/responses - * are forwarded for interception to the middleware but the middleware is not - * allowed to modify any responses. As a security measure, _no_ middleware can - * modify responses for requests made with _unencumbered_ macaroons! - */ - registerRPCMiddleware( - request?: DeepPartial, - onMessage?: (msg: RPCMiddlewareRequest) => void, - onError?: (err: Error) => void - ): void; - /** - * lncli: `sendcustom` - * SendCustomMessage sends a custom peer message. - */ - sendCustomMessage( - request?: DeepPartial - ): Promise; - /** - * lncli: `subscribecustom` - * SubscribeCustomMessages subscribes to a stream of incoming custom peer - * messages. - */ - subscribeCustomMessages( - request?: DeepPartial, - onMessage?: (msg: CustomMessage) => void, - onError?: (err: Error) => void - ): void; - /** - * lncli: `listaliases` - * ListAliases returns the set of all aliases that have ever existed with - * their confirmed SCID (if it exists) and/or the base SCID (in the case of - * zero conf). - */ - listAliases( - request?: DeepPartial - ): Promise; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/lnd/routerrpc/router.ts b/lib/types/proto/lnd/routerrpc/router.ts deleted file mode 100644 index 2d2deff..0000000 --- a/lib/types/proto/lnd/routerrpc/router.ts +++ /dev/null @@ -1,771 +0,0 @@ -/* eslint-disable */ -import type { - Failure_FailureCode, - RouteHint, - FeatureBit, - Route, - Failure, - HTLCAttempt, - ChannelPoint, - Payment -} from '../lightning'; - -export enum FailureDetail { - UNKNOWN = 'UNKNOWN', - NO_DETAIL = 'NO_DETAIL', - ONION_DECODE = 'ONION_DECODE', - LINK_NOT_ELIGIBLE = 'LINK_NOT_ELIGIBLE', - ON_CHAIN_TIMEOUT = 'ON_CHAIN_TIMEOUT', - HTLC_EXCEEDS_MAX = 'HTLC_EXCEEDS_MAX', - INSUFFICIENT_BALANCE = 'INSUFFICIENT_BALANCE', - INCOMPLETE_FORWARD = 'INCOMPLETE_FORWARD', - HTLC_ADD_FAILED = 'HTLC_ADD_FAILED', - FORWARDS_DISABLED = 'FORWARDS_DISABLED', - INVOICE_CANCELED = 'INVOICE_CANCELED', - INVOICE_UNDERPAID = 'INVOICE_UNDERPAID', - INVOICE_EXPIRY_TOO_SOON = 'INVOICE_EXPIRY_TOO_SOON', - INVOICE_NOT_OPEN = 'INVOICE_NOT_OPEN', - MPP_INVOICE_TIMEOUT = 'MPP_INVOICE_TIMEOUT', - ADDRESS_MISMATCH = 'ADDRESS_MISMATCH', - SET_TOTAL_MISMATCH = 'SET_TOTAL_MISMATCH', - SET_TOTAL_TOO_LOW = 'SET_TOTAL_TOO_LOW', - SET_OVERPAID = 'SET_OVERPAID', - UNKNOWN_INVOICE = 'UNKNOWN_INVOICE', - INVALID_KEYSEND = 'INVALID_KEYSEND', - MPP_IN_PROGRESS = 'MPP_IN_PROGRESS', - CIRCULAR_ROUTE = 'CIRCULAR_ROUTE', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum PaymentState { - /** IN_FLIGHT - Payment is still in flight. */ - IN_FLIGHT = 'IN_FLIGHT', - /** SUCCEEDED - Payment completed successfully. */ - SUCCEEDED = 'SUCCEEDED', - /** FAILED_TIMEOUT - There are more routes to try, but the payment timeout was exceeded. */ - FAILED_TIMEOUT = 'FAILED_TIMEOUT', - /** - * FAILED_NO_ROUTE - All possible routes were tried and failed permanently. Or were no - * routes to the destination at all. - */ - FAILED_NO_ROUTE = 'FAILED_NO_ROUTE', - /** FAILED_ERROR - A non-recoverable error has occurred. */ - FAILED_ERROR = 'FAILED_ERROR', - /** - * FAILED_INCORRECT_PAYMENT_DETAILS - Payment details incorrect (unknown hash, invalid amt or - * invalid final cltv delta) - */ - FAILED_INCORRECT_PAYMENT_DETAILS = 'FAILED_INCORRECT_PAYMENT_DETAILS', - /** FAILED_INSUFFICIENT_BALANCE - Insufficient local balance. */ - FAILED_INSUFFICIENT_BALANCE = 'FAILED_INSUFFICIENT_BALANCE', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum ResolveHoldForwardAction { - SETTLE = 'SETTLE', - FAIL = 'FAIL', - RESUME = 'RESUME', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum ChanStatusAction { - ENABLE = 'ENABLE', - DISABLE = 'DISABLE', - AUTO = 'AUTO', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface SendPaymentRequest { - /** The identity pubkey of the payment recipient */ - dest: Uint8Array | string; - /** - * Number of satoshis to send. - * - * The fields amt and amt_msat are mutually exclusive. - */ - amt: string; - /** - * Number of millisatoshis to send. - * - * The fields amt and amt_msat are mutually exclusive. - */ - amtMsat: string; - /** The hash to use within the payment's HTLC */ - paymentHash: Uint8Array | string; - /** - * The CLTV delta from the current height that should be used to set the - * timelock for the final hop. - */ - finalCltvDelta: number; - /** An optional payment addr to be included within the last hop of the route. */ - paymentAddr: Uint8Array | string; - /** - * A bare-bones invoice for a payment within the Lightning Network. With the - * details of the invoice, the sender has all the data necessary to send a - * payment to the recipient. The amount in the payment request may be zero. In - * that case it is required to set the amt field as well. If no payment request - * is specified, the following fields are required: dest, amt and payment_hash. - */ - paymentRequest: string; - /** - * An upper limit on the amount of time we should spend when attempting to - * fulfill the payment. This is expressed in seconds. If we cannot make a - * successful payment within this time frame, an error will be returned. - * This field must be non-zero. - */ - timeoutSeconds: number; - /** - * The maximum number of satoshis that will be paid as a fee of the payment. - * If this field is left to the default value of 0, only zero-fee routes will - * be considered. This usually means single hop routes connecting directly to - * the destination. To send the payment without a fee limit, use max int here. - * - * The fields fee_limit_sat and fee_limit_msat are mutually exclusive. - */ - feeLimitSat: string; - /** - * The maximum number of millisatoshis that will be paid as a fee of the - * payment. If this field is left to the default value of 0, only zero-fee - * routes will be considered. This usually means single hop routes connecting - * directly to the destination. To send the payment without a fee limit, use - * max int here. - * - * The fields fee_limit_sat and fee_limit_msat are mutually exclusive. - */ - feeLimitMsat: string; - /** - * Deprecated, use outgoing_chan_ids. The channel id of the channel that must - * be taken to the first hop. If zero, any channel may be used (unless - * outgoing_chan_ids are set). - * - * @deprecated - */ - outgoingChanId: string; - /** - * The channel ids of the channels are allowed for the first hop. If empty, - * any channel may be used. - */ - outgoingChanIds: string[]; - /** The pubkey of the last hop of the route. If empty, any hop may be used. */ - lastHopPubkey: Uint8Array | string; - /** - * An optional maximum total time lock for the route. This should not exceed - * lnd's `--max-cltv-expiry` setting. If zero, then the value of - * `--max-cltv-expiry` is enforced. - */ - cltvLimit: number; - /** Optional route hints to reach the destination through private channels. */ - routeHints: RouteHint[]; - /** - * An optional field that can be used to pass an arbitrary set of TLV records - * to a peer which understands the new records. This can be used to pass - * application specific data during the payment attempt. Record types are - * required to be in the custom range >= 65536. When using REST, the values - * must be encoded as base64. - */ - destCustomRecords: { [key: string]: Uint8Array | string }; - /** If set, circular payments to self are permitted. */ - allowSelfPayment: boolean; - /** - * Features assumed to be supported by the final node. All transitive feature - * dependencies must also be set properly. For a given feature bit pair, either - * optional or remote may be set, but not both. If this field is nil or empty, - * the router will try to load destination features from the graph as a - * fallback. - */ - destFeatures: FeatureBit[]; - /** - * The maximum number of partial payments that may be use to complete the full - * amount. - */ - maxParts: number; - /** - * If set, only the final payment update is streamed back. Intermediate updates - * that show which htlcs are still in flight are suppressed. - */ - noInflightUpdates: boolean; - /** - * The largest payment split that should be attempted when making a payment if - * splitting is necessary. Setting this value will effectively cause lnd to - * split more aggressively, vs only when it thinks it needs to. Note that this - * value is in milli-satoshis. - */ - maxShardSizeMsat: string; - /** If set, an AMP-payment will be attempted. */ - amp: boolean; - /** - * The time preference for this payment. Set to -1 to optimize for fees - * only, to 1 to optimize for reliability only or a value inbetween for a mix. - */ - timePref: number; -} - -export interface SendPaymentRequest_DestCustomRecordsEntry { - key: string; - value: Uint8Array | string; -} - -export interface TrackPaymentRequest { - /** The hash of the payment to look up. */ - paymentHash: Uint8Array | string; - /** - * If set, only the final payment update is streamed back. Intermediate updates - * that show which htlcs are still in flight are suppressed. - */ - noInflightUpdates: boolean; -} - -export interface RouteFeeRequest { - /** The destination once wishes to obtain a routing fee quote to. */ - dest: Uint8Array | string; - /** The amount one wishes to send to the target destination. */ - amtSat: string; -} - -export interface RouteFeeResponse { - /** - * A lower bound of the estimated fee to the target destination within the - * network, expressed in milli-satoshis. - */ - routingFeeMsat: string; - /** - * An estimate of the worst case time delay that can occur. Note that callers - * will still need to factor in the final CLTV delta of the last hop into this - * value. - */ - timeLockDelay: string; -} - -export interface SendToRouteRequest { - /** The payment hash to use for the HTLC. */ - paymentHash: Uint8Array | string; - /** Route that should be used to attempt to complete the payment. */ - route: Route | undefined; - /** - * Whether the payment should be marked as failed when a temporary error is - * returned from the given route. Set it to true so the payment won't be - * failed unless a terminal error is occurred, such as payment timeout, no - * routes, incorrect payment details, or insufficient funds. - */ - skipTempErr: boolean; -} - -export interface SendToRouteResponse { - /** The preimage obtained by making the payment. */ - preimage: Uint8Array | string; - /** The failure message in case the payment failed. */ - failure: Failure | undefined; -} - -export interface ResetMissionControlRequest {} - -export interface ResetMissionControlResponse {} - -export interface QueryMissionControlRequest {} - -/** QueryMissionControlResponse contains mission control state. */ -export interface QueryMissionControlResponse { - /** Node pair-level mission control state. */ - pairs: PairHistory[]; -} - -export interface XImportMissionControlRequest { - /** Node pair-level mission control state to be imported. */ - pairs: PairHistory[]; - /** - * Whether to force override MC pair history. Note that even with force - * override the failure pair is imported before the success pair and both - * still clamp existing failure/success amounts. - */ - force: boolean; -} - -export interface XImportMissionControlResponse {} - -/** PairHistory contains the mission control state for a particular node pair. */ -export interface PairHistory { - /** The source node pubkey of the pair. */ - nodeFrom: Uint8Array | string; - /** The destination node pubkey of the pair. */ - nodeTo: Uint8Array | string; - history: PairData | undefined; -} - -export interface PairData { - /** Time of last failure. */ - failTime: string; - /** - * Lowest amount that failed to forward rounded to whole sats. This may be - * set to zero if the failure is independent of amount. - */ - failAmtSat: string; - /** - * Lowest amount that failed to forward in millisats. This may be - * set to zero if the failure is independent of amount. - */ - failAmtMsat: string; - /** Time of last success. */ - successTime: string; - /** Highest amount that we could successfully forward rounded to whole sats. */ - successAmtSat: string; - /** Highest amount that we could successfully forward in millisats. */ - successAmtMsat: string; -} - -export interface GetMissionControlConfigRequest {} - -export interface GetMissionControlConfigResponse { - /** Mission control's currently active config. */ - config: MissionControlConfig | undefined; -} - -export interface SetMissionControlConfigRequest { - /** - * The config to set for mission control. Note that all values *must* be set, - * because the full config will be applied. - */ - config: MissionControlConfig | undefined; -} - -export interface SetMissionControlConfigResponse {} - -export interface MissionControlConfig { - /** - * The amount of time mission control will take to restore a penalized node - * or channel back to 50% success probability, expressed in seconds. Setting - * this value to a higher value will penalize failures for longer, making - * mission control less likely to route through nodes and channels that we - * have previously recorded failures for. - */ - halfLifeSeconds: string; - /** - * The probability of success mission control should assign to hop in a route - * where it has no other information available. Higher values will make mission - * control more willing to try hops that we have no information about, lower - * values will discourage trying these hops. - */ - hopProbability: number; - /** - * The importance that mission control should place on historical results, - * expressed as a value in [0;1]. Setting this value to 1 will ignore all - * historical payments and just use the hop probability to assess the - * probability of success for each hop. A zero value ignores hop probability - * completely and relies entirely on historical results, unless none are - * available. - */ - weight: number; - /** The maximum number of payment results that mission control will store. */ - maximumPaymentResults: number; - /** - * The minimum time that must have passed since the previously recorded failure - * before we raise the failure amount. - */ - minimumFailureRelaxInterval: string; -} - -export interface QueryProbabilityRequest { - /** The source node pubkey of the pair. */ - fromNode: Uint8Array | string; - /** The destination node pubkey of the pair. */ - toNode: Uint8Array | string; - /** The amount for which to calculate a probability. */ - amtMsat: string; -} - -export interface QueryProbabilityResponse { - /** The success probability for the requested pair. */ - probability: number; - /** The historical data for the requested pair. */ - history: PairData | undefined; -} - -export interface BuildRouteRequest { - /** - * The amount to send expressed in msat. If set to zero, the minimum routable - * amount is used. - */ - amtMsat: string; - /** - * CLTV delta from the current height that should be used for the timelock - * of the final hop - */ - finalCltvDelta: number; - /** - * The channel id of the channel that must be taken to the first hop. If zero, - * any channel may be used. - */ - outgoingChanId: string; - /** - * A list of hops that defines the route. This does not include the source hop - * pubkey. - */ - hopPubkeys: Uint8Array | string[]; - /** An optional payment addr to be included within the last hop of the route. */ - paymentAddr: Uint8Array | string; -} - -export interface BuildRouteResponse { - /** Fully specified route that can be used to execute the payment. */ - route: Route | undefined; -} - -export interface SubscribeHtlcEventsRequest {} - -/** - * HtlcEvent contains the htlc event that was processed. These are served on a - * best-effort basis; events are not persisted, delivery is not guaranteed - * (in the event of a crash in the switch, forward events may be lost) and - * some events may be replayed upon restart. Events consumed from this package - * should be de-duplicated by the htlc's unique combination of incoming and - * outgoing channel id and htlc id. [EXPERIMENTAL] - */ -export interface HtlcEvent { - /** - * The short channel id that the incoming htlc arrived at our node on. This - * value is zero for sends. - */ - incomingChannelId: string; - /** - * The short channel id that the outgoing htlc left our node on. This value - * is zero for receives. - */ - outgoingChannelId: string; - /** - * Incoming id is the index of the incoming htlc in the incoming channel. - * This value is zero for sends. - */ - incomingHtlcId: string; - /** - * Outgoing id is the index of the outgoing htlc in the outgoing channel. - * This value is zero for receives. - */ - outgoingHtlcId: string; - /** The time in unix nanoseconds that the event occurred. */ - timestampNs: string; - /** - * The event type indicates whether the htlc was part of a send, receive or - * forward. - */ - eventType: HtlcEvent_EventType; - forwardEvent: ForwardEvent | undefined; - forwardFailEvent: ForwardFailEvent | undefined; - settleEvent: SettleEvent | undefined; - linkFailEvent: LinkFailEvent | undefined; -} - -export enum HtlcEvent_EventType { - UNKNOWN = 'UNKNOWN', - SEND = 'SEND', - RECEIVE = 'RECEIVE', - FORWARD = 'FORWARD', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface HtlcInfo { - /** The timelock on the incoming htlc. */ - incomingTimelock: number; - /** The timelock on the outgoing htlc. */ - outgoingTimelock: number; - /** The amount of the incoming htlc. */ - incomingAmtMsat: string; - /** The amount of the outgoing htlc. */ - outgoingAmtMsat: string; -} - -export interface ForwardEvent { - /** Info contains details about the htlc that was forwarded. */ - info: HtlcInfo | undefined; -} - -export interface ForwardFailEvent {} - -export interface SettleEvent { - /** The revealed preimage. */ - preimage: Uint8Array | string; -} - -export interface LinkFailEvent { - /** Info contains details about the htlc that we failed. */ - info: HtlcInfo | undefined; - /** FailureCode is the BOLT error code for the failure. */ - wireFailure: Failure_FailureCode; - /** - * FailureDetail provides additional information about the reason for the - * failure. This detail enriches the information provided by the wire message - * and may be 'no detail' if the wire message requires no additional metadata. - */ - failureDetail: FailureDetail; - /** A string representation of the link failure. */ - failureString: string; -} - -export interface PaymentStatus { - /** Current state the payment is in. */ - state: PaymentState; - /** The pre-image of the payment when state is SUCCEEDED. */ - preimage: Uint8Array | string; - /** The HTLCs made in attempt to settle the payment [EXPERIMENTAL]. */ - htlcs: HTLCAttempt[]; -} - -export interface CircuitKey { - /** / The id of the channel that the is part of this circuit. */ - chanId: string; - /** / The index of the incoming htlc in the incoming channel. */ - htlcId: string; -} - -export interface ForwardHtlcInterceptRequest { - /** - * The key of this forwarded htlc. It defines the incoming channel id and - * the index in this channel. - */ - incomingCircuitKey: CircuitKey | undefined; - /** The incoming htlc amount. */ - incomingAmountMsat: string; - /** The incoming htlc expiry. */ - incomingExpiry: number; - /** - * The htlc payment hash. This value is not guaranteed to be unique per - * request. - */ - paymentHash: Uint8Array | string; - /** - * The requested outgoing channel id for this forwarded htlc. Because of - * non-strict forwarding, this isn't necessarily the channel over which the - * packet will be forwarded eventually. A different channel to the same peer - * may be selected as well. - */ - outgoingRequestedChanId: string; - /** The outgoing htlc amount. */ - outgoingAmountMsat: string; - /** The outgoing htlc expiry. */ - outgoingExpiry: number; - /** Any custom records that were present in the payload. */ - customRecords: { [key: string]: Uint8Array | string }; - /** The onion blob for the next hop */ - onionBlob: Uint8Array | string; -} - -export interface ForwardHtlcInterceptRequest_CustomRecordsEntry { - key: string; - value: Uint8Array | string; -} - -/** - * ForwardHtlcInterceptResponse enables the caller to resolve a previously hold - * forward. The caller can choose either to: - * - `Resume`: Execute the default behavior (usually forward). - * - `Reject`: Fail the htlc backwards. - * - `Settle`: Settle this htlc with a given preimage. - */ -export interface ForwardHtlcInterceptResponse { - /** - * The key of this forwarded htlc. It defines the incoming channel id and - * the index in this channel. - */ - incomingCircuitKey: CircuitKey | undefined; - /** The resolve action for this intercepted htlc. */ - action: ResolveHoldForwardAction; - /** The preimage in case the resolve action is Settle. */ - preimage: Uint8Array | string; - /** - * Encrypted failure message in case the resolve action is Fail. - * - * If failure_message is specified, the failure_code field must be set - * to zero. - */ - failureMessage: Uint8Array | string; - /** - * Return the specified failure code in case the resolve action is Fail. The - * message data fields are populated automatically. - * - * If a non-zero failure_code is specified, failure_message must not be set. - * - * For backwards-compatibility reasons, TEMPORARY_CHANNEL_FAILURE is the - * default value for this field. - */ - failureCode: Failure_FailureCode; -} - -export interface UpdateChanStatusRequest { - chanPoint: ChannelPoint | undefined; - action: ChanStatusAction; -} - -export interface UpdateChanStatusResponse {} - -/** - * Router is a service that offers advanced interaction with the router - * subsystem of the daemon. - */ -export interface Router { - /** - * SendPaymentV2 attempts to route a payment described by the passed - * PaymentRequest to the final destination. The call returns a stream of - * payment updates. - */ - sendPaymentV2( - request?: DeepPartial, - onMessage?: (msg: Payment) => void, - onError?: (err: Error) => void - ): void; - /** - * TrackPaymentV2 returns an update stream for the payment identified by the - * payment hash. - */ - trackPaymentV2( - request?: DeepPartial, - onMessage?: (msg: Payment) => void, - onError?: (err: Error) => void - ): void; - /** - * EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it - * may cost to send an HTLC to the target end destination. - */ - estimateRouteFee( - request?: DeepPartial - ): Promise; - /** - * Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via - * the specified route. This method differs from SendPayment in that it - * allows users to specify a full route manually. This can be used for - * things like rebalancing, and atomic swaps. It differs from the newer - * SendToRouteV2 in that it doesn't return the full HTLC information. - * - * @deprecated - */ - sendToRoute( - request?: DeepPartial - ): Promise; - /** - * SendToRouteV2 attempts to make a payment via the specified route. This - * method differs from SendPayment in that it allows users to specify a full - * route manually. This can be used for things like rebalancing, and atomic - * swaps. - */ - sendToRouteV2( - request?: DeepPartial - ): Promise; - /** - * ResetMissionControl clears all mission control state and starts with a clean - * slate. - */ - resetMissionControl( - request?: DeepPartial - ): Promise; - /** - * QueryMissionControl exposes the internal mission control state to callers. - * It is a development feature. - */ - queryMissionControl( - request?: DeepPartial - ): Promise; - /** - * XImportMissionControl is an experimental API that imports the state provided - * to the internal mission control's state, using all results which are more - * recent than our existing values. These values will only be imported - * in-memory, and will not be persisted across restarts. - */ - xImportMissionControl( - request?: DeepPartial - ): Promise; - /** GetMissionControlConfig returns mission control's current config. */ - getMissionControlConfig( - request?: DeepPartial - ): Promise; - /** - * SetMissionControlConfig will set mission control's config, if the config - * provided is valid. - */ - setMissionControlConfig( - request?: DeepPartial - ): Promise; - /** - * QueryProbability returns the current success probability estimate for a - * given node pair and amount. - */ - queryProbability( - request?: DeepPartial - ): Promise; - /** - * BuildRoute builds a fully specified route based on a list of hop public - * keys. It retrieves the relevant channel policies from the graph in order to - * calculate the correct fees and time locks. - */ - buildRoute( - request?: DeepPartial - ): Promise; - /** - * SubscribeHtlcEvents creates a uni-directional stream from the server to - * the client which delivers a stream of htlc events. - */ - subscribeHtlcEvents( - request?: DeepPartial, - onMessage?: (msg: HtlcEvent) => void, - onError?: (err: Error) => void - ): void; - /** - * Deprecated, use SendPaymentV2. SendPayment attempts to route a payment - * described by the passed PaymentRequest to the final destination. The call - * returns a stream of payment status updates. - * - * @deprecated - */ - sendPayment( - request?: DeepPartial, - onMessage?: (msg: PaymentStatus) => void, - onError?: (err: Error) => void - ): void; - /** - * Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for - * the payment identified by the payment hash. - * - * @deprecated - */ - trackPayment( - request?: DeepPartial, - onMessage?: (msg: PaymentStatus) => void, - onError?: (err: Error) => void - ): void; - /** - * HtlcInterceptor dispatches a bi-directional streaming RPC in which - * Forwarded HTLC requests are sent to the client and the client responds with - * a boolean that tells LND if this htlc should be intercepted. - * In case of interception, the htlc can be either settled, cancelled or - * resumed later by using the ResolveHoldForward endpoint. - */ - htlcInterceptor( - request?: DeepPartial, - onMessage?: (msg: ForwardHtlcInterceptRequest) => void, - onError?: (err: Error) => void - ): void; - /** - * UpdateChanStatus attempts to manually set the state of a channel - * (enabled, disabled, or auto). A manual "disable" request will cause the - * channel to stay disabled until a subsequent manual request of either - * "enable" or "auto". - */ - updateChanStatus( - request?: DeepPartial - ): Promise; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/lnd/signrpc/signer.ts b/lib/types/proto/lnd/signrpc/signer.ts deleted file mode 100644 index 74b24b2..0000000 --- a/lib/types/proto/lnd/signrpc/signer.ts +++ /dev/null @@ -1,596 +0,0 @@ -/* eslint-disable */ -export enum SignMethod { - /** - * SIGN_METHOD_WITNESS_V0 - Specifies that a SegWit v0 (p2wkh, np2wkh, p2wsh) input script should be - * signed. - */ - SIGN_METHOD_WITNESS_V0 = 'SIGN_METHOD_WITNESS_V0', - /** - * SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086 - Specifies that a SegWit v1 (p2tr) input should be signed by using the - * BIP0086 method (commit to internal key only). - */ - SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086 = 'SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086', - /** - * SIGN_METHOD_TAPROOT_KEY_SPEND - Specifies that a SegWit v1 (p2tr) input should be signed by using a given - * taproot hash to commit to in addition to the internal key. - */ - SIGN_METHOD_TAPROOT_KEY_SPEND = 'SIGN_METHOD_TAPROOT_KEY_SPEND', - /** - * SIGN_METHOD_TAPROOT_SCRIPT_SPEND - Specifies that a SegWit v1 (p2tr) input should be spent using the script - * path and that a specific leaf script should be signed for. - */ - SIGN_METHOD_TAPROOT_SCRIPT_SPEND = 'SIGN_METHOD_TAPROOT_SCRIPT_SPEND', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface KeyLocator { - /** The family of key being identified. */ - keyFamily: number; - /** The precise index of the key being identified. */ - keyIndex: number; -} - -export interface KeyDescriptor { - /** - * The raw bytes of the public key in the key pair being identified. Either - * this or the KeyLocator must be specified. - */ - rawKeyBytes: Uint8Array | string; - /** - * The key locator that identifies which private key to use for signing. - * Either this or the raw bytes of the target public key must be specified. - */ - keyLoc: KeyLocator | undefined; -} - -export interface TxOut { - /** The value of the output being spent. */ - value: string; - /** The script of the output being spent. */ - pkScript: Uint8Array | string; -} - -export interface SignDescriptor { - /** - * A descriptor that precisely describes *which* key to use for signing. This - * may provide the raw public key directly, or require the Signer to re-derive - * the key according to the populated derivation path. - * - * Note that if the key descriptor was obtained through walletrpc.DeriveKey, - * then the key locator MUST always be provided, since the derived keys are not - * persisted unlike with DeriveNextKey. - */ - keyDesc: KeyDescriptor | undefined; - /** - * A scalar value that will be added to the private key corresponding to the - * above public key to obtain the private key to be used to sign this input. - * This value is typically derived via the following computation: - * - * derivedKey = privkey + sha256(perCommitmentPoint || pubKey) mod N - */ - singleTweak: Uint8Array | string; - /** - * A private key that will be used in combination with its corresponding - * private key to derive the private key that is to be used to sign the target - * input. Within the Lightning protocol, this value is typically the - * commitment secret from a previously revoked commitment transaction. This - * value is in combination with two hash values, and the original private key - * to derive the private key to be used when signing. - * - * k = (privKey*sha256(pubKey || tweakPub) + - * tweakPriv*sha256(tweakPub || pubKey)) mod N - */ - doubleTweak: Uint8Array | string; - /** - * The 32 byte input to the taproot tweak derivation that is used to derive - * the output key from an internal key: outputKey = internalKey + - * tagged_hash("tapTweak", internalKey || tapTweak). - * - * When doing a BIP 86 spend, this field can be an empty byte slice. - * - * When doing a normal key path spend, with the output key committing to an - * actual script root, then this field should be: the tapscript root hash. - */ - tapTweak: Uint8Array | string; - /** - * The full script required to properly redeem the output. This field will - * only be populated if a p2tr, p2wsh or a p2sh output is being signed. If a - * taproot script path spend is being attempted, then this should be the raw - * leaf script. - */ - witnessScript: Uint8Array | string; - /** - * A description of the output being spent. The value and script MUST be - * provided. - */ - output: TxOut | undefined; - /** - * The target sighash type that should be used when generating the final - * sighash, and signature. - */ - sighash: number; - /** The target input within the transaction that should be signed. */ - inputIndex: number; - /** - * The sign method specifies how the input should be signed. Depending on the - * method, either the tap_tweak, witness_script or both need to be specified. - * Defaults to SegWit v0 signing to be backward compatible with older RPC - * clients. - */ - signMethod: SignMethod; -} - -export interface SignReq { - /** The raw bytes of the transaction to be signed. */ - rawTxBytes: Uint8Array | string; - /** A set of sign descriptors, for each input to be signed. */ - signDescs: SignDescriptor[]; - /** - * The full list of UTXO information for each of the inputs being spent. This - * is required when spending one or more taproot (SegWit v1) outputs. - */ - prevOutputs: TxOut[]; -} - -export interface SignResp { - /** - * A set of signatures realized in a fixed 64-byte format ordered in ascending - * input order. - */ - rawSigs: Uint8Array | string[]; -} - -export interface InputScript { - /** The serializes witness stack for the specified input. */ - witness: Uint8Array | string[]; - /** - * The optional sig script for the specified witness that will only be set if - * the input specified is a nested p2sh witness program. - */ - sigScript: Uint8Array | string; -} - -export interface InputScriptResp { - /** The set of fully valid input scripts requested. */ - inputScripts: InputScript[]; -} - -export interface SignMessageReq { - /** - * The message to be signed. When using REST, this field must be encoded as - * base64. - */ - msg: Uint8Array | string; - /** The key locator that identifies which key to use for signing. */ - keyLoc: KeyLocator | undefined; - /** Double-SHA256 hash instead of just the default single round. */ - doubleHash: boolean; - /** - * Use the compact (pubkey recoverable) format instead of the raw lnwire - * format. This option cannot be used with Schnorr signatures. - */ - compactSig: boolean; - /** Use Schnorr signature. This option cannot be used with compact format. */ - schnorrSig: boolean; - /** - * The optional Taproot tweak bytes to apply to the private key before creating - * a Schnorr signature. The private key is tweaked as described in BIP-341: - * privKey + h_tapTweak(internalKey || tapTweak) - */ - schnorrSigTapTweak: Uint8Array | string; -} - -export interface SignMessageResp { - /** The signature for the given message in the fixed-size LN wire format. */ - signature: Uint8Array | string; -} - -export interface VerifyMessageReq { - /** - * The message over which the signature is to be verified. When using - * REST, this field must be encoded as base64. - */ - msg: Uint8Array | string; - /** - * The fixed-size LN wire encoded signature to be verified over the given - * message. When using REST, this field must be encoded as base64. - */ - signature: Uint8Array | string; - /** - * The public key the signature has to be valid for. When using REST, this - * field must be encoded as base64. If the is_schnorr_sig option is true, then - * the public key is expected to be in the 32-byte x-only serialization - * according to BIP-340. - */ - pubkey: Uint8Array | string; - /** Specifies if the signature is a Schnorr signature. */ - isSchnorrSig: boolean; -} - -export interface VerifyMessageResp { - /** Whether the signature was valid over the given message. */ - valid: boolean; -} - -export interface SharedKeyRequest { - /** The ephemeral public key to use for the DH key derivation. */ - ephemeralPubkey: Uint8Array | string; - /** - * Deprecated. The optional key locator of the local key that should be used. - * If this parameter is not set then the node's identity private key will be - * used. - * - * @deprecated - */ - keyLoc: KeyLocator | undefined; - /** - * A key descriptor describes the key used for performing ECDH. Either a key - * locator or a raw public key is expected, if neither is supplied, defaults to - * the node's identity private key. - */ - keyDesc: KeyDescriptor | undefined; -} - -export interface SharedKeyResponse { - /** The shared public key, hashed with sha256. */ - sharedKey: Uint8Array | string; -} - -export interface TweakDesc { - /** Tweak is the 32-byte value that will modify the public key. */ - tweak: Uint8Array | string; - /** - * Specifies if the target key should be converted to an x-only public key - * before tweaking. If true, then the public key will be mapped to an x-only - * key before the tweaking operation is applied. - */ - isXOnly: boolean; -} - -export interface TaprootTweakDesc { - /** - * The root hash of the tapscript tree if a script path is committed to. If - * the MuSig2 key put on chain doesn't also commit to a script path (BIP-0086 - * key spend only), then this needs to be empty and the key_spend_only field - * below must be set to true. This is required because gRPC cannot - * differentiate between a zero-size byte slice and a nil byte slice (both - * would be serialized the same way). So the extra boolean is required. - */ - scriptRoot: Uint8Array | string; - /** - * Indicates that the above script_root is expected to be empty because this - * is a BIP-0086 key spend only commitment where only the internal key is - * committed to instead of also including a script root hash. - */ - keySpendOnly: boolean; -} - -export interface MuSig2CombineKeysRequest { - /** - * A list of all public keys (serialized in 32-byte x-only format!) - * participating in the signing session. The list will always be sorted - * lexicographically internally. This must include the local key which is - * described by the above key_loc. - */ - allSignerPubkeys: Uint8Array | string[]; - /** - * A series of optional generic tweaks to be applied to the the aggregated - * public key. - */ - tweaks: TweakDesc[]; - /** - * An optional taproot specific tweak that must be specified if the MuSig2 - * combined key will be used as the main taproot key of a taproot output - * on-chain. - */ - taprootTweak: TaprootTweakDesc | undefined; -} - -export interface MuSig2CombineKeysResponse { - /** - * The combined public key (in the 32-byte x-only format) with all tweaks - * applied to it. If a taproot tweak is specified, this corresponds to the - * taproot key that can be put into the on-chain output. - */ - combinedKey: Uint8Array | string; - /** - * The raw combined public key (in the 32-byte x-only format) before any tweaks - * are applied to it. If a taproot tweak is specified, this corresponds to the - * internal key that needs to be put into the witness if the script spend path - * is used. - */ - taprootInternalKey: Uint8Array | string; -} - -export interface MuSig2SessionRequest { - /** The key locator that identifies which key to use for signing. */ - keyLoc: KeyLocator | undefined; - /** - * A list of all public keys (serialized in 32-byte x-only format!) - * participating in the signing session. The list will always be sorted - * lexicographically internally. This must include the local key which is - * described by the above key_loc. - */ - allSignerPubkeys: Uint8Array | string[]; - /** - * An optional list of all public nonces of other signing participants that - * might already be known. - */ - otherSignerPublicNonces: Uint8Array | string[]; - /** - * A series of optional generic tweaks to be applied to the the aggregated - * public key. - */ - tweaks: TweakDesc[]; - /** - * An optional taproot specific tweak that must be specified if the MuSig2 - * combined key will be used as the main taproot key of a taproot output - * on-chain. - */ - taprootTweak: TaprootTweakDesc | undefined; -} - -export interface MuSig2SessionResponse { - /** - * The unique ID that represents this signing session. A session can be used - * for producing a signature a single time. If the signing fails for any - * reason, a new session with the same participants needs to be created. - */ - sessionId: Uint8Array | string; - /** - * The combined public key (in the 32-byte x-only format) with all tweaks - * applied to it. If a taproot tweak is specified, this corresponds to the - * taproot key that can be put into the on-chain output. - */ - combinedKey: Uint8Array | string; - /** - * The raw combined public key (in the 32-byte x-only format) before any tweaks - * are applied to it. If a taproot tweak is specified, this corresponds to the - * internal key that needs to be put into the witness if the script spend path - * is used. - */ - taprootInternalKey: Uint8Array | string; - /** - * The two public nonces the local signer uses, combined into a single value - * of 66 bytes. Can be split into the two 33-byte points to get the individual - * nonces. - */ - localPublicNonces: Uint8Array | string; - /** - * Indicates whether all nonces required to start the signing process are known - * now. - */ - haveAllNonces: boolean; -} - -export interface MuSig2RegisterNoncesRequest { - /** The unique ID of the signing session those nonces should be registered with. */ - sessionId: Uint8Array | string; - /** - * A list of all public nonces of other signing participants that should be - * registered. - */ - otherSignerPublicNonces: Uint8Array | string[]; -} - -export interface MuSig2RegisterNoncesResponse { - /** - * Indicates whether all nonces required to start the signing process are known - * now. - */ - haveAllNonces: boolean; -} - -export interface MuSig2SignRequest { - /** The unique ID of the signing session to use for signing. */ - sessionId: Uint8Array | string; - /** The 32-byte SHA256 digest of the message to sign. */ - messageDigest: Uint8Array | string; - /** - * Cleanup indicates that after signing, the session state can be cleaned up, - * since another participant is going to be responsible for combining the - * partial signatures. - */ - cleanup: boolean; -} - -export interface MuSig2SignResponse { - /** The partial signature created by the local signer. */ - localPartialSignature: Uint8Array | string; -} - -export interface MuSig2CombineSigRequest { - /** The unique ID of the signing session to combine the signatures for. */ - sessionId: Uint8Array | string; - /** - * The list of all other participants' partial signatures to add to the current - * session. - */ - otherPartialSignatures: Uint8Array | string[]; -} - -export interface MuSig2CombineSigResponse { - /** - * Indicates whether all partial signatures required to create a final, full - * signature are known yet. If this is true, then the final_signature field is - * set, otherwise it is empty. - */ - haveAllSignatures: boolean; - /** The final, full signature that is valid for the combined public key. */ - finalSignature: Uint8Array | string; -} - -export interface MuSig2CleanupRequest { - /** The unique ID of the signing session that should be removed/cleaned up. */ - sessionId: Uint8Array | string; -} - -export interface MuSig2CleanupResponse {} - -/** - * Signer is a service that gives access to the signing functionality of the - * daemon's wallet. - */ -export interface Signer { - /** - * SignOutputRaw is a method that can be used to generated a signature for a - * set of inputs/outputs to a transaction. Each request specifies details - * concerning how the outputs should be signed, which keys they should be - * signed with, and also any optional tweaks. The return value is a fixed - * 64-byte signature (the same format as we use on the wire in Lightning). - * - * If we are unable to sign using the specified keys, then an error will be - * returned. - */ - signOutputRaw(request?: DeepPartial): Promise; - /** - * ComputeInputScript generates a complete InputIndex for the passed - * transaction with the signature as defined within the passed SignDescriptor. - * This method should be capable of generating the proper input script for both - * regular p2wkh/p2tr outputs and p2wkh outputs nested within a regular p2sh - * output. - * - * Note that when using this method to sign inputs belonging to the wallet, - * the only items of the SignDescriptor that need to be populated are pkScript - * in the TxOut field, the value in that same field, and finally the input - * index. - */ - computeInputScript( - request?: DeepPartial - ): Promise; - /** - * SignMessage signs a message with the key specified in the key locator. The - * returned signature is fixed-size LN wire format encoded. - * - * The main difference to SignMessage in the main RPC is that a specific key is - * used to sign the message instead of the node identity private key. - */ - signMessage( - request?: DeepPartial - ): Promise; - /** - * VerifyMessage verifies a signature over a message using the public key - * provided. The signature must be fixed-size LN wire format encoded. - * - * The main difference to VerifyMessage in the main RPC is that the public key - * used to sign the message does not have to be a node known to the network. - */ - verifyMessage( - request?: DeepPartial - ): Promise; - /** - * DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key - * derivation between the ephemeral public key in the request and the node's - * key specified in the key_desc parameter. Either a key locator or a raw - * public key is expected in the key_desc, if neither is supplied, defaults to - * the node's identity private key: - * P_shared = privKeyNode * ephemeralPubkey - * The resulting shared public key is serialized in the compressed format and - * hashed with sha256, resulting in the final key length of 256bit. - */ - deriveSharedKey( - request?: DeepPartial - ): Promise; - /** - * MuSig2CombineKeys (experimental!) is a stateless helper RPC that can be used - * to calculate the combined MuSig2 public key from a list of all participating - * signers' public keys. This RPC is completely stateless and deterministic and - * does not create any signing session. It can be used to determine the Taproot - * public key that should be put in an on-chain output once all public keys are - * known. A signing session is only needed later when that output should be - * _spent_ again. - * - * NOTE: The MuSig2 BIP is not final yet and therefore this API must be - * considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming - * releases. Backward compatibility is not guaranteed! - */ - muSig2CombineKeys( - request?: DeepPartial - ): Promise; - /** - * MuSig2CreateSession (experimental!) creates a new MuSig2 signing session - * using the local key identified by the key locator. The complete list of all - * public keys of all signing parties must be provided, including the public - * key of the local signing key. If nonces of other parties are already known, - * they can be submitted as well to reduce the number of RPC calls necessary - * later on. - * - * NOTE: The MuSig2 BIP is not final yet and therefore this API must be - * considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming - * releases. Backward compatibility is not guaranteed! - */ - muSig2CreateSession( - request?: DeepPartial - ): Promise; - /** - * MuSig2RegisterNonces (experimental!) registers one or more public nonces of - * other signing participants for a session identified by its ID. This RPC can - * be called multiple times until all nonces are registered. - * - * NOTE: The MuSig2 BIP is not final yet and therefore this API must be - * considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming - * releases. Backward compatibility is not guaranteed! - */ - muSig2RegisterNonces( - request?: DeepPartial - ): Promise; - /** - * MuSig2Sign (experimental!) creates a partial signature using the local - * signing key that was specified when the session was created. This can only - * be called when all public nonces of all participants are known and have been - * registered with the session. If this node isn't responsible for combining - * all the partial signatures, then the cleanup flag should be set, indicating - * that the session can be removed from memory once the signature was produced. - * - * NOTE: The MuSig2 BIP is not final yet and therefore this API must be - * considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming - * releases. Backward compatibility is not guaranteed! - */ - muSig2Sign( - request?: DeepPartial - ): Promise; - /** - * MuSig2CombineSig (experimental!) combines the given partial signature(s) - * with the local one, if it already exists. Once a partial signature of all - * participants is registered, the final signature will be combined and - * returned. - * - * NOTE: The MuSig2 BIP is not final yet and therefore this API must be - * considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming - * releases. Backward compatibility is not guaranteed! - */ - muSig2CombineSig( - request?: DeepPartial - ): Promise; - /** - * MuSig2Cleanup (experimental!) allows a caller to clean up a session early in - * cases where it's obvious that the signing session won't succeed and the - * resources can be released. - * - * NOTE: The MuSig2 BIP is not final yet and therefore this API must be - * considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming - * releases. Backward compatibility is not guaranteed! - */ - muSig2Cleanup( - request?: DeepPartial - ): Promise; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/lnd/walletrpc/walletkit.ts b/lib/types/proto/lnd/walletrpc/walletkit.ts deleted file mode 100644 index 020a1b1..0000000 --- a/lib/types/proto/lnd/walletrpc/walletkit.ts +++ /dev/null @@ -1,846 +0,0 @@ -/* eslint-disable */ -import type { Utxo, OutPoint, TransactionDetails } from '../lightning'; -import type { TxOut, KeyDescriptor, KeyLocator } from '../signrpc/signer'; - -export enum AddressType { - UNKNOWN = 'UNKNOWN', - WITNESS_PUBKEY_HASH = 'WITNESS_PUBKEY_HASH', - NESTED_WITNESS_PUBKEY_HASH = 'NESTED_WITNESS_PUBKEY_HASH', - HYBRID_NESTED_WITNESS_PUBKEY_HASH = 'HYBRID_NESTED_WITNESS_PUBKEY_HASH', - TAPROOT_PUBKEY = 'TAPROOT_PUBKEY', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum WitnessType { - UNKNOWN_WITNESS = 'UNKNOWN_WITNESS', - /** - * COMMITMENT_TIME_LOCK - A witness that allows us to spend the output of a commitment transaction - * after a relative lock-time lockout. - */ - COMMITMENT_TIME_LOCK = 'COMMITMENT_TIME_LOCK', - /** - * COMMITMENT_NO_DELAY - A witness that allows us to spend a settled no-delay output immediately on a - * counterparty's commitment transaction. - */ - COMMITMENT_NO_DELAY = 'COMMITMENT_NO_DELAY', - /** - * COMMITMENT_REVOKE - A witness that allows us to sweep the settled output of a malicious - * counterparty's who broadcasts a revoked commitment transaction. - */ - COMMITMENT_REVOKE = 'COMMITMENT_REVOKE', - /** - * HTLC_OFFERED_REVOKE - A witness that allows us to sweep an HTLC which we offered to the remote - * party in the case that they broadcast a revoked commitment state. - */ - HTLC_OFFERED_REVOKE = 'HTLC_OFFERED_REVOKE', - /** - * HTLC_ACCEPTED_REVOKE - A witness that allows us to sweep an HTLC output sent to us in the case that - * the remote party broadcasts a revoked commitment state. - */ - HTLC_ACCEPTED_REVOKE = 'HTLC_ACCEPTED_REVOKE', - /** - * HTLC_OFFERED_TIMEOUT_SECOND_LEVEL - A witness that allows us to sweep an HTLC output that we extended to a - * party, but was never fulfilled. This HTLC output isn't directly on the - * commitment transaction, but is the result of a confirmed second-level HTLC - * transaction. As a result, we can only spend this after a CSV delay. - */ - HTLC_OFFERED_TIMEOUT_SECOND_LEVEL = 'HTLC_OFFERED_TIMEOUT_SECOND_LEVEL', - /** - * HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL - A witness that allows us to sweep an HTLC output that was offered to us, and - * for which we have a payment preimage. This HTLC output isn't directly on our - * commitment transaction, but is the result of confirmed second-level HTLC - * transaction. As a result, we can only spend this after a CSV delay. - */ - HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL = 'HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL', - /** - * HTLC_OFFERED_REMOTE_TIMEOUT - A witness that allows us to sweep an HTLC that we offered to the remote - * party which lies in the commitment transaction of the remote party. We can - * spend this output after the absolute CLTV timeout of the HTLC as passed. - */ - HTLC_OFFERED_REMOTE_TIMEOUT = 'HTLC_OFFERED_REMOTE_TIMEOUT', - /** - * HTLC_ACCEPTED_REMOTE_SUCCESS - A witness that allows us to sweep an HTLC that was offered to us by the - * remote party. We use this witness in the case that the remote party goes to - * chain, and we know the pre-image to the HTLC. We can sweep this without any - * additional timeout. - */ - HTLC_ACCEPTED_REMOTE_SUCCESS = 'HTLC_ACCEPTED_REMOTE_SUCCESS', - /** - * HTLC_SECOND_LEVEL_REVOKE - A witness that allows us to sweep an HTLC from the remote party's commitment - * transaction in the case that the broadcast a revoked commitment, but then - * also immediately attempt to go to the second level to claim the HTLC. - */ - HTLC_SECOND_LEVEL_REVOKE = 'HTLC_SECOND_LEVEL_REVOKE', - /** - * WITNESS_KEY_HASH - A witness type that allows us to spend a regular p2wkh output that's sent to - * an output which is under complete control of the backing wallet. - */ - WITNESS_KEY_HASH = 'WITNESS_KEY_HASH', - /** - * NESTED_WITNESS_KEY_HASH - A witness type that allows us to sweep an output that sends to a nested P2SH - * script that pays to a key solely under our control. - */ - NESTED_WITNESS_KEY_HASH = 'NESTED_WITNESS_KEY_HASH', - /** - * COMMITMENT_ANCHOR - A witness type that allows us to spend our anchor on the commitment - * transaction. - */ - COMMITMENT_ANCHOR = 'COMMITMENT_ANCHOR', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface ListUnspentRequest { - /** The minimum number of confirmations to be included. */ - minConfs: number; - /** The maximum number of confirmations to be included. */ - maxConfs: number; - /** An optional filter to only include outputs belonging to an account. */ - account: string; - /** - * When min_confs and max_confs are zero, setting false implicitly - * overrides max_confs to be MaxInt32, otherwise max_confs remains - * zero. An error is returned if the value is true and both min_confs - * and max_confs are non-zero. (default: false) - */ - unconfirmedOnly: boolean; -} - -export interface ListUnspentResponse { - /** A list of utxos satisfying the specified number of confirmations. */ - utxos: Utxo[]; -} - -export interface LeaseOutputRequest { - /** - * An ID of 32 random bytes that must be unique for each distinct application - * using this RPC which will be used to bound the output lease to. - */ - id: Uint8Array | string; - /** The identifying outpoint of the output being leased. */ - outpoint: OutPoint | undefined; - /** - * The time in seconds before the lock expires. If set to zero, the default - * lock duration is used. - */ - expirationSeconds: string; -} - -export interface LeaseOutputResponse { - /** The absolute expiration of the output lease represented as a unix timestamp. */ - expiration: string; -} - -export interface ReleaseOutputRequest { - /** The unique ID that was used to lock the output. */ - id: Uint8Array | string; - /** The identifying outpoint of the output being released. */ - outpoint: OutPoint | undefined; -} - -export interface ReleaseOutputResponse {} - -export interface KeyReq { - /** - * Is the key finger print of the root pubkey that this request is targeting. - * This allows the WalletKit to possibly serve out keys for multiple HD chains - * via public derivation. - */ - keyFingerPrint: number; - /** - * The target key family to derive a key from. In other contexts, this is - * known as the "account". - */ - keyFamily: number; -} - -export interface AddrRequest { - /** - * The name of the account to retrieve the next address of. If empty, the - * default wallet account is used. - */ - account: string; - /** The type of address to derive. */ - type: AddressType; - /** Whether a change address should be derived. */ - change: boolean; -} - -export interface AddrResponse { - /** The address encoded using a bech32 format. */ - addr: string; -} - -export interface Account { - /** The name used to identify the account. */ - name: string; - /** - * The type of addresses the account supports. - * AddressType | External Branch | Internal Branch - * --------------------------------------------------------------------- - * WITNESS_PUBKEY_HASH | P2WPKH | P2WPKH - * NESTED_WITNESS_PUBKEY_HASH | NP2WPKH | NP2WPKH - * HYBRID_NESTED_WITNESS_PUBKEY_HASH | NP2WPKH | P2WPKH - */ - addressType: AddressType; - /** - * The public key backing the account that all keys are derived from - * represented as an extended key. This will always be empty for the default - * imported account in which single public keys are imported into. - */ - extendedPublicKey: string; - /** - * The fingerprint of the root key from which the account public key was - * derived from. This will always be zero for the default imported account in - * which single public keys are imported into. The bytes are in big-endian - * order. - */ - masterKeyFingerprint: Uint8Array | string; - /** - * The derivation path corresponding to the account public key. This will - * always be empty for the default imported account in which single public keys - * are imported into. - */ - derivationPath: string; - /** - * The number of keys derived from the external branch of the account public - * key. This will always be zero for the default imported account in which - * single public keys are imported into. - */ - externalKeyCount: number; - /** - * The number of keys derived from the internal branch of the account public - * key. This will always be zero for the default imported account in which - * single public keys are imported into. - */ - internalKeyCount: number; - /** Whether the wallet stores private keys for the account. */ - watchOnly: boolean; -} - -export interface ListAccountsRequest { - /** An optional filter to only return accounts matching this name. */ - name: string; - /** An optional filter to only return accounts matching this address type. */ - addressType: AddressType; -} - -export interface ListAccountsResponse { - accounts: Account[]; -} - -export interface RequiredReserveRequest { - /** The number of additional channels the user would like to open. */ - additionalPublicChannels: number; -} - -export interface RequiredReserveResponse { - /** The amount of reserve required. */ - requiredReserve: string; -} - -export interface ImportAccountRequest { - /** A name to identify the account with. */ - name: string; - /** - * A public key that corresponds to a wallet account represented as an extended - * key. It must conform to a derivation path of the form - * m/purpose'/coin_type'/account'. - */ - extendedPublicKey: string; - /** - * The fingerprint of the root key (also known as the key with derivation path - * m/) from which the account public key was derived from. This may be required - * by some hardware wallets for proper identification and signing. The bytes - * must be in big-endian order. - */ - masterKeyFingerprint: Uint8Array | string; - /** - * An address type is only required when the extended account public key has a - * legacy version (xpub, tpub, etc.), such that the wallet cannot detect what - * address scheme it belongs to. - */ - addressType: AddressType; - /** - * Whether a dry run should be attempted when importing the account. This - * serves as a way to confirm whether the account is being imported correctly - * by returning the first N addresses for the external and internal branches of - * the account. If these addresses match as expected, then it should be safe to - * import the account as is. - */ - dryRun: boolean; -} - -export interface ImportAccountResponse { - /** The details of the imported account. */ - account: Account | undefined; - /** - * The first N addresses that belong to the external branch of the account. - * The external branch is typically used for external non-change addresses. - * These are only returned if a dry run was specified within the request. - */ - dryRunExternalAddrs: string[]; - /** - * The first N addresses that belong to the internal branch of the account. - * The internal branch is typically used for change addresses. These are only - * returned if a dry run was specified within the request. - */ - dryRunInternalAddrs: string[]; -} - -export interface ImportPublicKeyRequest { - /** A compressed public key represented as raw bytes. */ - publicKey: Uint8Array | string; - /** The type of address that will be generated from the public key. */ - addressType: AddressType; -} - -export interface ImportPublicKeyResponse {} - -export interface Transaction { - /** The raw serialized transaction. */ - txHex: Uint8Array | string; - /** An optional label to save with the transaction. Limited to 500 characters. */ - label: string; -} - -export interface PublishResponse { - /** - * If blank, then no error occurred and the transaction was successfully - * published. If not the empty string, then a string representation of the - * broadcast error. - * - * TODO(roasbeef): map to a proper enum type - */ - publishError: string; -} - -export interface SendOutputsRequest { - /** - * The number of satoshis per kilo weight that should be used when crafting - * this transaction. - */ - satPerKw: string; - /** A slice of the outputs that should be created in the transaction produced. */ - outputs: TxOut[]; - /** An optional label for the transaction, limited to 500 characters. */ - label: string; - /** - * The minimum number of confirmations each one of your outputs used for - * the transaction must satisfy. - */ - minConfs: number; - /** Whether unconfirmed outputs should be used as inputs for the transaction. */ - spendUnconfirmed: boolean; -} - -export interface SendOutputsResponse { - /** The serialized transaction sent out on the network. */ - rawTx: Uint8Array | string; -} - -export interface EstimateFeeRequest { - /** The number of confirmations to shoot for when estimating the fee. */ - confTarget: number; -} - -export interface EstimateFeeResponse { - /** - * The amount of satoshis per kw that should be used in order to reach the - * confirmation target in the request. - */ - satPerKw: string; -} - -export interface PendingSweep { - /** The outpoint of the output we're attempting to sweep. */ - outpoint: OutPoint | undefined; - /** The witness type of the output we're attempting to sweep. */ - witnessType: WitnessType; - /** The value of the output we're attempting to sweep. */ - amountSat: number; - /** - * Deprecated, use sat_per_vbyte. - * The fee rate we'll use to sweep the output, expressed in sat/vbyte. The fee - * rate is only determined once a sweeping transaction for the output is - * created, so it's possible for this to be 0 before this. - * - * @deprecated - */ - satPerByte: number; - /** The number of broadcast attempts we've made to sweep the output. */ - broadcastAttempts: number; - /** - * The next height of the chain at which we'll attempt to broadcast the - * sweep transaction of the output. - */ - nextBroadcastHeight: number; - /** The requested confirmation target for this output. */ - requestedConfTarget: number; - /** - * Deprecated, use requested_sat_per_vbyte. - * The requested fee rate, expressed in sat/vbyte, for this output. - * - * @deprecated - */ - requestedSatPerByte: number; - /** - * The fee rate we'll use to sweep the output, expressed in sat/vbyte. The fee - * rate is only determined once a sweeping transaction for the output is - * created, so it's possible for this to be 0 before this. - */ - satPerVbyte: string; - /** The requested fee rate, expressed in sat/vbyte, for this output. */ - requestedSatPerVbyte: string; - /** - * Whether this input must be force-swept. This means that it is swept even - * if it has a negative yield. - */ - force: boolean; -} - -export interface PendingSweepsRequest {} - -export interface PendingSweepsResponse { - /** The set of outputs currently being swept by lnd's central batching engine. */ - pendingSweeps: PendingSweep[]; -} - -export interface BumpFeeRequest { - /** The input we're attempting to bump the fee of. */ - outpoint: OutPoint | undefined; - /** The target number of blocks that the input should be spent within. */ - targetConf: number; - /** - * Deprecated, use sat_per_vbyte. - * The fee rate, expressed in sat/vbyte, that should be used to spend the input - * with. - * - * @deprecated - */ - satPerByte: number; - /** - * Whether this input must be force-swept. This means that it is swept even - * if it has a negative yield. - */ - force: boolean; - /** - * The fee rate, expressed in sat/vbyte, that should be used to spend the input - * with. - */ - satPerVbyte: string; -} - -export interface BumpFeeResponse {} - -export interface ListSweepsRequest { - /** - * Retrieve the full sweep transaction details. If false, only the sweep txids - * will be returned. Note that some sweeps that LND publishes will have been - * replaced-by-fee, so will not be included in this output. - */ - verbose: boolean; -} - -export interface ListSweepsResponse { - transactionDetails: TransactionDetails | undefined; - transactionIds: ListSweepsResponse_TransactionIDs | undefined; -} - -export interface ListSweepsResponse_TransactionIDs { - /** - * Reversed, hex-encoded string representing the transaction ids of the - * sweeps that our node has broadcast. Note that these transactions may - * not have confirmed yet, we record sweeps on broadcast, not confirmation. - */ - transactionIds: string[]; -} - -export interface LabelTransactionRequest { - /** The txid of the transaction to label. */ - txid: Uint8Array | string; - /** The label to add to the transaction, limited to 500 characters. */ - label: string; - /** Whether to overwrite the existing label, if it is present. */ - overwrite: boolean; -} - -export interface LabelTransactionResponse {} - -export interface FundPsbtRequest { - /** - * Use an existing PSBT packet as the template for the funded PSBT. - * - * The packet must contain at least one non-dust output. If one or more - * inputs are specified, no coin selection is performed. In that case every - * input must be an UTXO known to the wallet that has not been locked - * before. The sum of all inputs must be sufficiently greater than the sum - * of all outputs to pay a miner fee with the specified fee rate. A change - * output is added to the PSBT if necessary. - */ - psbt: Uint8Array | string | undefined; - /** Use the outputs and optional inputs from this raw template. */ - raw: TxTemplate | undefined; - /** The target number of blocks that the transaction should be confirmed in. */ - targetConf: number | undefined; - /** - * The fee rate, expressed in sat/vbyte, that should be used to spend the - * input with. - */ - satPerVbyte: string | undefined; - /** - * The name of the account to fund the PSBT with. If empty, the default wallet - * account is used. - */ - account: string; - /** - * The minimum number of confirmations each one of your outputs used for - * the transaction must satisfy. - */ - minConfs: number; - /** Whether unconfirmed outputs should be used as inputs for the transaction. */ - spendUnconfirmed: boolean; -} - -export interface FundPsbtResponse { - /** The funded but not yet signed PSBT packet. */ - fundedPsbt: Uint8Array | string; - /** The index of the added change output or -1 if no change was left over. */ - changeOutputIndex: number; - /** - * The list of lock leases that were acquired for the inputs in the funded PSBT - * packet. - */ - lockedUtxos: UtxoLease[]; -} - -export interface TxTemplate { - /** - * An optional list of inputs to use. Every input must be an UTXO known to the - * wallet that has not been locked before. The sum of all inputs must be - * sufficiently greater than the sum of all outputs to pay a miner fee with the - * fee rate specified in the parent message. - * - * If no inputs are specified, coin selection will be performed instead and - * inputs of sufficient value will be added to the resulting PSBT. - */ - inputs: OutPoint[]; - /** A map of all addresses and the amounts to send to in the funded PSBT. */ - outputs: { [key: string]: string }; -} - -export interface TxTemplate_OutputsEntry { - key: string; - value: string; -} - -export interface UtxoLease { - /** A 32 byte random ID that identifies the lease. */ - id: Uint8Array | string; - /** The identifying outpoint of the output being leased. */ - outpoint: OutPoint | undefined; - /** The absolute expiration of the output lease represented as a unix timestamp. */ - expiration: string; - /** The public key script of the leased output. */ - pkScript: Uint8Array | string; - /** The value of the leased output in satoshis. */ - value: string; -} - -export interface SignPsbtRequest { - /** - * The PSBT that should be signed. The PSBT must contain all required inputs, - * outputs, UTXO data and custom fields required to identify the signing key. - */ - fundedPsbt: Uint8Array | string; -} - -export interface SignPsbtResponse { - /** The signed transaction in PSBT format. */ - signedPsbt: Uint8Array | string; -} - -export interface FinalizePsbtRequest { - /** - * A PSBT that should be signed and finalized. The PSBT must contain all - * required inputs, outputs, UTXO data and partial signatures of all other - * signers. - */ - fundedPsbt: Uint8Array | string; - /** - * The name of the account to finalize the PSBT with. If empty, the default - * wallet account is used. - */ - account: string; -} - -export interface FinalizePsbtResponse { - /** The fully signed and finalized transaction in PSBT format. */ - signedPsbt: Uint8Array | string; - /** The fully signed and finalized transaction in the raw wire format. */ - rawFinalTx: Uint8Array | string; -} - -export interface ListLeasesRequest {} - -export interface ListLeasesResponse { - /** The list of currently leased utxos. */ - lockedUtxos: UtxoLease[]; -} - -/** - * WalletKit is a service that gives access to the core functionalities of the - * daemon's wallet. - */ -export interface WalletKit { - /** - * ListUnspent returns a list of all utxos spendable by the wallet with a - * number of confirmations between the specified minimum and maximum. By - * default, all utxos are listed. To list only the unconfirmed utxos, set - * the unconfirmed_only to true. - */ - listUnspent( - request?: DeepPartial - ): Promise; - /** - * LeaseOutput locks an output to the given ID, preventing it from being - * available for any future coin selection attempts. The absolute time of the - * lock's expiration is returned. The expiration of the lock can be extended by - * successive invocations of this RPC. Outputs can be unlocked before their - * expiration through `ReleaseOutput`. - */ - leaseOutput( - request?: DeepPartial - ): Promise; - /** - * ReleaseOutput unlocks an output, allowing it to be available for coin - * selection if it remains unspent. The ID should match the one used to - * originally lock the output. - */ - releaseOutput( - request?: DeepPartial - ): Promise; - /** ListLeases lists all currently locked utxos. */ - listLeases( - request?: DeepPartial - ): Promise; - /** - * DeriveNextKey attempts to derive the *next* key within the key family - * (account in BIP43) specified. This method should return the next external - * child within this branch. - */ - deriveNextKey(request?: DeepPartial): Promise; - /** - * DeriveKey attempts to derive an arbitrary key specified by the passed - * KeyLocator. - */ - deriveKey(request?: DeepPartial): Promise; - /** NextAddr returns the next unused address within the wallet. */ - nextAddr(request?: DeepPartial): Promise; - /** - * ListAccounts retrieves all accounts belonging to the wallet by default. A - * name and key scope filter can be provided to filter through all of the - * wallet accounts and return only those matching. - */ - listAccounts( - request?: DeepPartial - ): Promise; - /** - * RequiredReserve returns the minimum amount of satoshis that should be kept - * in the wallet in order to fee bump anchor channels if necessary. The value - * scales with the number of public anchor channels but is capped at a maximum. - */ - requiredReserve( - request?: DeepPartial - ): Promise; - /** - * ImportAccount imports an account backed by an account extended public key. - * The master key fingerprint denotes the fingerprint of the root key - * corresponding to the account public key (also known as the key with - * derivation path m/). This may be required by some hardware wallets for - * proper identification and signing. - * - * The address type can usually be inferred from the key's version, but may be - * required for certain keys to map them into the proper scope. - * - * For BIP-0044 keys, an address type must be specified as we intend to not - * support importing BIP-0044 keys into the wallet using the legacy - * pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force - * the standard BIP-0049 derivation scheme, while a witness address type will - * force the standard BIP-0084 derivation scheme. - * - * For BIP-0049 keys, an address type must also be specified to make a - * distinction between the standard BIP-0049 address schema (nested witness - * pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys - * externally, witness pubkeys internally). - * - * NOTE: Events (deposits/spends) for keys derived from an account will only be - * detected by lnd if they happen after the import. Rescans to detect past - * events will be supported later on. - */ - importAccount( - request?: DeepPartial - ): Promise; - /** - * ImportPublicKey imports a public key as watch-only into the wallet. - * - * NOTE: Events (deposits/spends) for a key will only be detected by lnd if - * they happen after the import. Rescans to detect past events will be - * supported later on. - */ - importPublicKey( - request?: DeepPartial - ): Promise; - /** - * PublishTransaction attempts to publish the passed transaction to the - * network. Once this returns without an error, the wallet will continually - * attempt to re-broadcast the transaction on start up, until it enters the - * chain. - */ - publishTransaction( - request?: DeepPartial - ): Promise; - /** - * SendOutputs is similar to the existing sendmany call in Bitcoind, and - * allows the caller to create a transaction that sends to several outputs at - * once. This is ideal when wanting to batch create a set of transactions. - */ - sendOutputs( - request?: DeepPartial - ): Promise; - /** - * EstimateFee attempts to query the internal fee estimator of the wallet to - * determine the fee (in sat/kw) to attach to a transaction in order to - * achieve the confirmation target. - */ - estimateFee( - request?: DeepPartial - ): Promise; - /** - * PendingSweeps returns lists of on-chain outputs that lnd is currently - * attempting to sweep within its central batching engine. Outputs with similar - * fee rates are batched together in order to sweep them within a single - * transaction. - * - * NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to - * remain supported. This is an advanced API that depends on the internals of - * the UtxoSweeper, so things may change. - */ - pendingSweeps( - request?: DeepPartial - ): Promise; - /** - * BumpFee bumps the fee of an arbitrary input within a transaction. This RPC - * takes a different approach than bitcoind's bumpfee command. lnd has a - * central batching engine in which inputs with similar fee rates are batched - * together to save on transaction fees. Due to this, we cannot rely on - * bumping the fee on a specific transaction, since transactions can change at - * any point with the addition of new inputs. The list of inputs that - * currently exist within lnd's central batching engine can be retrieved - * through the PendingSweeps RPC. - * - * When bumping the fee of an input that currently exists within lnd's central - * batching engine, a higher fee transaction will be created that replaces the - * lower fee transaction through the Replace-By-Fee (RBF) policy. If it - * - * This RPC also serves useful when wanting to perform a Child-Pays-For-Parent - * (CPFP), where the child transaction pays for its parent's fee. This can be - * done by specifying an outpoint within the low fee transaction that is under - * the control of the wallet. - * - * The fee preference can be expressed either as a specific fee rate or a delta - * of blocks in which the output should be swept on-chain within. If a fee - * preference is not explicitly specified, then an error is returned. - * - * Note that this RPC currently doesn't perform any validation checks on the - * fee preference being provided. For now, the responsibility of ensuring that - * the new fee preference is sufficient is delegated to the user. - */ - bumpFee(request?: DeepPartial): Promise; - /** - * ListSweeps returns a list of the sweep transactions our node has produced. - * Note that these sweeps may not be confirmed yet, as we record sweeps on - * broadcast, not confirmation. - */ - listSweeps( - request?: DeepPartial - ): Promise; - /** - * LabelTransaction adds a label to a transaction. If the transaction already - * has a label the call will fail unless the overwrite bool is set. This will - * overwrite the exiting transaction label. Labels must not be empty, and - * cannot exceed 500 characters. - */ - labelTransaction( - request?: DeepPartial - ): Promise; - /** - * FundPsbt creates a fully populated PSBT that contains enough inputs to fund - * the outputs specified in the template. There are two ways of specifying a - * template: Either by passing in a PSBT with at least one output declared or - * by passing in a raw TxTemplate message. - * - * If there are no inputs specified in the template, coin selection is - * performed automatically. If the template does contain any inputs, it is - * assumed that full coin selection happened externally and no additional - * inputs are added. If the specified inputs aren't enough to fund the outputs - * with the given fee rate, an error is returned. - * - * After either selecting or verifying the inputs, all input UTXOs are locked - * with an internal app ID. - * - * NOTE: If this method returns without an error, it is the caller's - * responsibility to either spend the locked UTXOs (by finalizing and then - * publishing the transaction) or to unlock/release the locked UTXOs in case of - * an error on the caller's side. - */ - fundPsbt(request?: DeepPartial): Promise; - /** - * SignPsbt expects a partial transaction with all inputs and outputs fully - * declared and tries to sign all unsigned inputs that have all required fields - * (UTXO information, BIP32 derivation information, witness or sig scripts) - * set. - * If no error is returned, the PSBT is ready to be given to the next signer or - * to be finalized if lnd was the last signer. - * - * NOTE: This RPC only signs inputs (and only those it can sign), it does not - * perform any other tasks (such as coin selection, UTXO locking or - * input/output/fee value validation, PSBT finalization). Any input that is - * incomplete will be skipped. - */ - signPsbt(request?: DeepPartial): Promise; - /** - * FinalizePsbt expects a partial transaction with all inputs and outputs fully - * declared and tries to sign all inputs that belong to the wallet. Lnd must be - * the last signer of the transaction. That means, if there are any unsigned - * non-witness inputs or inputs without UTXO information attached or inputs - * without witness data that do not belong to lnd's wallet, this method will - * fail. If no error is returned, the PSBT is ready to be extracted and the - * final TX within to be broadcast. - * - * NOTE: This method does NOT publish the transaction once finalized. It is the - * caller's responsibility to either publish the transaction on success or - * unlock/release any locked UTXOs in case of an error in this method. - */ - finalizePsbt( - request?: DeepPartial - ): Promise; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/lnd/walletunlocker.ts b/lib/types/proto/lnd/walletunlocker.ts deleted file mode 100644 index 5a21661..0000000 --- a/lib/types/proto/lnd/walletunlocker.ts +++ /dev/null @@ -1,314 +0,0 @@ -/* eslint-disable */ -import type { ChanBackupSnapshot } from './lightning'; - -export interface GenSeedRequest { - /** - * aezeed_passphrase is an optional user provided passphrase that will be used - * to encrypt the generated aezeed cipher seed. When using REST, this field - * must be encoded as base64. - */ - aezeedPassphrase: Uint8Array | string; - /** - * seed_entropy is an optional 16-bytes generated via CSPRNG. If not - * specified, then a fresh set of randomness will be used to create the seed. - * When using REST, this field must be encoded as base64. - */ - seedEntropy: Uint8Array | string; -} - -export interface GenSeedResponse { - /** - * cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed - * cipher seed obtained by the user. This field is optional, as if not - * provided, then the daemon will generate a new cipher seed for the user. - * Otherwise, then the daemon will attempt to recover the wallet state linked - * to this cipher seed. - */ - cipherSeedMnemonic: string[]; - /** - * enciphered_seed are the raw aezeed cipher seed bytes. This is the raw - * cipher text before run through our mnemonic encoding scheme. - */ - encipheredSeed: Uint8Array | string; -} - -export interface InitWalletRequest { - /** - * wallet_password is the passphrase that should be used to encrypt the - * wallet. This MUST be at least 8 chars in length. After creation, this - * password is required to unlock the daemon. When using REST, this field - * must be encoded as base64. - */ - walletPassword: Uint8Array | string; - /** - * cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed - * cipher seed obtained by the user. This may have been generated by the - * GenSeed method, or be an existing seed. - */ - cipherSeedMnemonic: string[]; - /** - * aezeed_passphrase is an optional user provided passphrase that will be used - * to encrypt the generated aezeed cipher seed. When using REST, this field - * must be encoded as base64. - */ - aezeedPassphrase: Uint8Array | string; - /** - * recovery_window is an optional argument specifying the address lookahead - * when restoring a wallet seed. The recovery window applies to each - * individual branch of the BIP44 derivation paths. Supplying a recovery - * window of zero indicates that no addresses should be recovered, such after - * the first initialization of the wallet. - */ - recoveryWindow: number; - /** - * channel_backups is an optional argument that allows clients to recover the - * settled funds within a set of channels. This should be populated if the - * user was unable to close out all channels and sweep funds before partial or - * total data loss occurred. If specified, then after on-chain recovery of - * funds, lnd begin to carry out the data loss recovery protocol in order to - * recover the funds in each channel from a remote force closed transaction. - */ - channelBackups: ChanBackupSnapshot | undefined; - /** - * stateless_init is an optional argument instructing the daemon NOT to create - * any *.macaroon files in its filesystem. If this parameter is set, then the - * admin macaroon returned in the response MUST be stored by the caller of the - * RPC as otherwise all access to the daemon will be lost! - */ - statelessInit: boolean; - /** - * extended_master_key is an alternative to specifying cipher_seed_mnemonic and - * aezeed_passphrase. Instead of deriving the master root key from the entropy - * of an aezeed cipher seed, the given extended master root key is used - * directly as the wallet's master key. This allows users to import/use a - * master key from another wallet. When doing so, lnd still uses its default - * SegWit only (BIP49/84) derivation paths and funds from custom/non-default - * derivation paths will not automatically appear in the on-chain wallet. Using - * an 'xprv' instead of an aezeed also has the disadvantage that the wallet's - * birthday is not known as that is an information that's only encoded in the - * aezeed, not the xprv. Therefore a birthday needs to be specified in - * extended_master_key_birthday_timestamp or a "safe" default value will be - * used. - */ - extendedMasterKey: string; - /** - * extended_master_key_birthday_timestamp is the optional unix timestamp in - * seconds to use as the wallet's birthday when using an extended master key - * to restore the wallet. lnd will only start scanning for funds in blocks that - * are after the birthday which can speed up the process significantly. If the - * birthday is not known, this should be left at its default value of 0 in - * which case lnd will start scanning from the first SegWit block (481824 on - * mainnet). - */ - extendedMasterKeyBirthdayTimestamp: string; - /** - * watch_only is the third option of initializing a wallet: by importing - * account xpubs only and therefore creating a watch-only wallet that does not - * contain any private keys. That means the wallet won't be able to sign for - * any of the keys and _needs_ to be run with a remote signer that has the - * corresponding private keys and can serve signing RPC requests. - */ - watchOnly: WatchOnly | undefined; -} - -export interface InitWalletResponse { - /** - * The binary serialized admin macaroon that can be used to access the daemon - * after creating the wallet. If the stateless_init parameter was set to true, - * this is the ONLY copy of the macaroon and MUST be stored safely by the - * caller. Otherwise a copy of this macaroon is also persisted on disk by the - * daemon, together with other macaroon files. - */ - adminMacaroon: Uint8Array | string; -} - -export interface WatchOnly { - /** - * The unix timestamp in seconds of when the master key was created. lnd will - * only start scanning for funds in blocks that are after the birthday which - * can speed up the process significantly. If the birthday is not known, this - * should be left at its default value of 0 in which case lnd will start - * scanning from the first SegWit block (481824 on mainnet). - */ - masterKeyBirthdayTimestamp: string; - /** - * The fingerprint of the root key (also known as the key with derivation path - * m/) from which the account public keys were derived from. This may be - * required by some hardware wallets for proper identification and signing. The - * bytes must be in big-endian order. - */ - masterKeyFingerprint: Uint8Array | string; - /** - * The list of accounts to import. There _must_ be an account for all of lnd's - * main key scopes: BIP49/BIP84 (m/49'/0'/0', m/84'/0'/0', note that the - * coin type is always 0, even for testnet/regtest) and lnd's internal key - * scope (m/1017'/'/'), where account is the key family as - * defined in `keychain/derivation.go` (currently indices 0 to 9). - */ - accounts: WatchOnlyAccount[]; -} - -export interface WatchOnlyAccount { - /** - * Purpose is the first number in the derivation path, must be either 49, 84 - * or 1017. - */ - purpose: number; - /** - * Coin type is the second number in the derivation path, this is _always_ 0 - * for purposes 49 and 84. It only needs to be set to 1 for purpose 1017 on - * testnet or regtest. - */ - coinType: number; - /** - * Account is the third number in the derivation path. For purposes 49 and 84 - * at least the default account (index 0) needs to be created but optional - * additional accounts are allowed. For purpose 1017 there needs to be exactly - * one account for each of the key families defined in `keychain/derivation.go` - * (currently indices 0 to 9) - */ - account: number; - /** The extended public key at depth 3 for the given account. */ - xpub: string; -} - -export interface UnlockWalletRequest { - /** - * wallet_password should be the current valid passphrase for the daemon. This - * will be required to decrypt on-disk material that the daemon requires to - * function properly. When using REST, this field must be encoded as base64. - */ - walletPassword: Uint8Array | string; - /** - * recovery_window is an optional argument specifying the address lookahead - * when restoring a wallet seed. The recovery window applies to each - * individual branch of the BIP44 derivation paths. Supplying a recovery - * window of zero indicates that no addresses should be recovered, such after - * the first initialization of the wallet. - */ - recoveryWindow: number; - /** - * channel_backups is an optional argument that allows clients to recover the - * settled funds within a set of channels. This should be populated if the - * user was unable to close out all channels and sweep funds before partial or - * total data loss occurred. If specified, then after on-chain recovery of - * funds, lnd begin to carry out the data loss recovery protocol in order to - * recover the funds in each channel from a remote force closed transaction. - */ - channelBackups: ChanBackupSnapshot | undefined; - /** - * stateless_init is an optional argument instructing the daemon NOT to create - * any *.macaroon files in its file system. - */ - statelessInit: boolean; -} - -export interface UnlockWalletResponse {} - -export interface ChangePasswordRequest { - /** - * current_password should be the current valid passphrase used to unlock the - * daemon. When using REST, this field must be encoded as base64. - */ - currentPassword: Uint8Array | string; - /** - * new_password should be the new passphrase that will be needed to unlock the - * daemon. When using REST, this field must be encoded as base64. - */ - newPassword: Uint8Array | string; - /** - * stateless_init is an optional argument instructing the daemon NOT to create - * any *.macaroon files in its filesystem. If this parameter is set, then the - * admin macaroon returned in the response MUST be stored by the caller of the - * RPC as otherwise all access to the daemon will be lost! - */ - statelessInit: boolean; - /** - * new_macaroon_root_key is an optional argument instructing the daemon to - * rotate the macaroon root key when set to true. This will invalidate all - * previously generated macaroons. - */ - newMacaroonRootKey: boolean; -} - -export interface ChangePasswordResponse { - /** - * The binary serialized admin macaroon that can be used to access the daemon - * after rotating the macaroon root key. If both the stateless_init and - * new_macaroon_root_key parameter were set to true, this is the ONLY copy of - * the macaroon that was created from the new root key and MUST be stored - * safely by the caller. Otherwise a copy of this macaroon is also persisted on - * disk by the daemon, together with other macaroon files. - */ - adminMacaroon: Uint8Array | string; -} - -/** - * WalletUnlocker is a service that is used to set up a wallet password for - * lnd at first startup, and unlock a previously set up wallet. - */ -export interface WalletUnlocker { - /** - * GenSeed is the first method that should be used to instantiate a new lnd - * instance. This method allows a caller to generate a new aezeed cipher seed - * given an optional passphrase. If provided, the passphrase will be necessary - * to decrypt the cipherseed to expose the internal wallet seed. - * - * Once the cipherseed is obtained and verified by the user, the InitWallet - * method should be used to commit the newly generated seed, and create the - * wallet. - */ - genSeed(request?: DeepPartial): Promise; - /** - * InitWallet is used when lnd is starting up for the first time to fully - * initialize the daemon and its internal wallet. At the very least a wallet - * password must be provided. This will be used to encrypt sensitive material - * on disk. - * - * In the case of a recovery scenario, the user can also specify their aezeed - * mnemonic and passphrase. If set, then the daemon will use this prior state - * to initialize its internal wallet. - * - * Alternatively, this can be used along with the GenSeed RPC to obtain a - * seed, then present it to the user. Once it has been verified by the user, - * the seed can be fed into this RPC in order to commit the new wallet. - */ - initWallet( - request?: DeepPartial - ): Promise; - /** - * lncli: `unlock` - * UnlockWallet is used at startup of lnd to provide a password to unlock - * the wallet database. - */ - unlockWallet( - request?: DeepPartial - ): Promise; - /** - * lncli: `changepassword` - * ChangePassword changes the password of the encrypted wallet. This will - * automatically unlock the wallet database if successful. - */ - changePassword( - request?: DeepPartial - ): Promise; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/lnd/watchtowerrpc/watchtower.ts b/lib/types/proto/lnd/watchtowerrpc/watchtower.ts deleted file mode 100644 index c076d93..0000000 --- a/lib/types/proto/lnd/watchtowerrpc/watchtower.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* eslint-disable */ -export interface GetInfoRequest {} - -export interface GetInfoResponse { - /** The public key of the watchtower. */ - pubkey: Uint8Array | string; - /** The listening addresses of the watchtower. */ - listeners: string[]; - /** The URIs of the watchtower. */ - uris: string[]; -} - -/** - * Watchtower is a service that grants access to the watchtower server - * functionality of the daemon. - */ -export interface Watchtower { - /** - * lncli: tower info - * GetInfo returns general information concerning the companion watchtower - * including its public key and URIs where the server is currently - * listening for clients. - */ - getInfo(request?: DeepPartial): Promise; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/lnd/wtclientrpc/wtclient.ts b/lib/types/proto/lnd/wtclientrpc/wtclient.ts deleted file mode 100644 index d72443d..0000000 --- a/lib/types/proto/lnd/wtclientrpc/wtclient.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* eslint-disable */ -export enum PolicyType { - /** LEGACY - Selects the policy from the legacy tower client. */ - LEGACY = 'LEGACY', - /** ANCHOR - Selects the policy from the anchor tower client. */ - ANCHOR = 'ANCHOR', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface AddTowerRequest { - /** The identifying public key of the watchtower to add. */ - pubkey: Uint8Array | string; - /** A network address the watchtower is reachable over. */ - address: string; -} - -export interface AddTowerResponse {} - -export interface RemoveTowerRequest { - /** The identifying public key of the watchtower to remove. */ - pubkey: Uint8Array | string; - /** - * If set, then the record for this address will be removed, indicating that is - * is stale. Otherwise, the watchtower will no longer be used for future - * session negotiations and backups. - */ - address: string; -} - -export interface RemoveTowerResponse {} - -export interface GetTowerInfoRequest { - /** The identifying public key of the watchtower to retrieve information for. */ - pubkey: Uint8Array | string; - /** Whether we should include sessions with the watchtower in the response. */ - includeSessions: boolean; -} - -export interface TowerSession { - /** - * The total number of successful backups that have been made to the - * watchtower session. - */ - numBackups: number; - /** - * The total number of backups in the session that are currently pending to be - * acknowledged by the watchtower. - */ - numPendingBackups: number; - /** The maximum number of backups allowed by the watchtower session. */ - maxBackups: number; - /** - * Deprecated, use sweep_sat_per_vbyte. - * The fee rate, in satoshis per vbyte, that will be used by the watchtower for - * the justice transaction in the event of a channel breach. - * - * @deprecated - */ - sweepSatPerByte: number; - /** - * The fee rate, in satoshis per vbyte, that will be used by the watchtower for - * the justice transaction in the event of a channel breach. - */ - sweepSatPerVbyte: number; -} - -export interface Tower { - /** The identifying public key of the watchtower. */ - pubkey: Uint8Array | string; - /** The list of addresses the watchtower is reachable over. */ - addresses: string[]; - /** Whether the watchtower is currently a candidate for new sessions. */ - activeSessionCandidate: boolean; - /** The number of sessions that have been negotiated with the watchtower. */ - numSessions: number; - /** The list of sessions that have been negotiated with the watchtower. */ - sessions: TowerSession[]; -} - -export interface ListTowersRequest { - /** Whether we should include sessions with the watchtower in the response. */ - includeSessions: boolean; -} - -export interface ListTowersResponse { - /** The list of watchtowers available for new backups. */ - towers: Tower[]; -} - -export interface StatsRequest {} - -export interface StatsResponse { - /** - * The total number of backups made to all active and exhausted watchtower - * sessions. - */ - numBackups: number; - /** - * The total number of backups that are pending to be acknowledged by all - * active and exhausted watchtower sessions. - */ - numPendingBackups: number; - /** - * The total number of backups that all active and exhausted watchtower - * sessions have failed to acknowledge. - */ - numFailedBackups: number; - /** The total number of new sessions made to watchtowers. */ - numSessionsAcquired: number; - /** The total number of watchtower sessions that have been exhausted. */ - numSessionsExhausted: number; -} - -export interface PolicyRequest { - /** The client type from which to retrieve the active offering policy. */ - policyType: PolicyType; -} - -export interface PolicyResponse { - /** - * The maximum number of updates each session we negotiate with watchtowers - * should allow. - */ - maxUpdates: number; - /** - * Deprecated, use sweep_sat_per_vbyte. - * The fee rate, in satoshis per vbyte, that will be used by watchtowers for - * justice transactions in response to channel breaches. - * - * @deprecated - */ - sweepSatPerByte: number; - /** - * The fee rate, in satoshis per vbyte, that will be used by watchtowers for - * justice transactions in response to channel breaches. - */ - sweepSatPerVbyte: number; -} - -/** - * WatchtowerClient is a service that grants access to the watchtower client - * functionality of the daemon. - */ -export interface WatchtowerClient { - /** - * AddTower adds a new watchtower reachable at the given address and - * considers it for new sessions. If the watchtower already exists, then - * any new addresses included will be considered when dialing it for - * session negotiations and backups. - */ - addTower(request?: DeepPartial): Promise; - /** - * RemoveTower removes a watchtower from being considered for future session - * negotiations and from being used for any subsequent backups until it's added - * again. If an address is provided, then this RPC only serves as a way of - * removing the address from the watchtower instead. - */ - removeTower( - request?: DeepPartial - ): Promise; - /** ListTowers returns the list of watchtowers registered with the client. */ - listTowers( - request?: DeepPartial - ): Promise; - /** GetTowerInfo retrieves information for a registered watchtower. */ - getTowerInfo(request?: DeepPartial): Promise; - /** Stats returns the in-memory statistics of the client since startup. */ - stats(request?: DeepPartial): Promise; - /** Policy returns the active watchtower client policy configuration. */ - policy(request?: DeepPartial): Promise; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/lnrpc.ts b/lib/types/proto/lnrpc.ts deleted file mode 100644 index 730b051..0000000 --- a/lib/types/proto/lnrpc.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './lnd/lightning'; -export * from './lnd/walletunlocker'; diff --git a/lib/types/proto/loop/client.ts b/lib/types/proto/loop/client.ts deleted file mode 100644 index ef9de1f..0000000 --- a/lib/types/proto/loop/client.ts +++ /dev/null @@ -1,865 +0,0 @@ -/* eslint-disable */ -import type { RouteHint } from './swapserverrpc/common'; - -export enum SwapType { - /** LOOP_OUT - LOOP_OUT indicates an loop out swap (off-chain to on-chain) */ - LOOP_OUT = 'LOOP_OUT', - /** LOOP_IN - LOOP_IN indicates a loop in swap (on-chain to off-chain) */ - LOOP_IN = 'LOOP_IN', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum SwapState { - /** - * INITIATED - INITIATED is the initial state of a swap. At that point, the initiation - * call to the server has been made and the payment process has been started - * for the swap and prepayment invoices. - */ - INITIATED = 'INITIATED', - /** - * PREIMAGE_REVEALED - PREIMAGE_REVEALED is reached when the sweep tx publication is first - * attempted. From that point on, we should consider the preimage to no - * longer be secret and we need to do all we can to get the sweep confirmed. - * This state will mostly coalesce with StateHtlcConfirmed, except in the - * case where we wait for fees to come down before we sweep. - */ - PREIMAGE_REVEALED = 'PREIMAGE_REVEALED', - /** - * HTLC_PUBLISHED - HTLC_PUBLISHED is reached when the htlc tx has been published in a loop in - * swap. - */ - HTLC_PUBLISHED = 'HTLC_PUBLISHED', - /** - * SUCCESS - SUCCESS is the final swap state that is reached when the sweep tx has - * the required confirmation depth. - */ - SUCCESS = 'SUCCESS', - /** - * FAILED - FAILED is the final swap state for a failed swap with or without loss of - * the swap amount. - */ - FAILED = 'FAILED', - /** - * INVOICE_SETTLED - INVOICE_SETTLED is reached when the swap invoice in a loop in swap has been - * paid, but we are still waiting for the htlc spend to confirm. - */ - INVOICE_SETTLED = 'INVOICE_SETTLED', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum FailureReason { - /** - * FAILURE_REASON_NONE - FAILURE_REASON_NONE is set when the swap did not fail, it is either in - * progress or succeeded. - */ - FAILURE_REASON_NONE = 'FAILURE_REASON_NONE', - /** - * FAILURE_REASON_OFFCHAIN - FAILURE_REASON_OFFCHAIN indicates that a loop out failed because it wasn't - * possible to find a route for one or both off chain payments that met the fee - * and timelock limits required. - */ - FAILURE_REASON_OFFCHAIN = 'FAILURE_REASON_OFFCHAIN', - /** - * FAILURE_REASON_TIMEOUT - FAILURE_REASON_TIMEOUT indicates that the swap failed because on chain htlc - * did not confirm before its expiry, or it confirmed too late for us to reveal - * our preimage and claim. - */ - FAILURE_REASON_TIMEOUT = 'FAILURE_REASON_TIMEOUT', - /** - * FAILURE_REASON_SWEEP_TIMEOUT - FAILURE_REASON_SWEEP_TIMEOUT indicates that a loop out permanently failed - * because the on chain htlc wasn't swept before the server revoked the - * htlc. - */ - FAILURE_REASON_SWEEP_TIMEOUT = 'FAILURE_REASON_SWEEP_TIMEOUT', - /** - * FAILURE_REASON_INSUFFICIENT_VALUE - FAILURE_REASON_INSUFFICIENT_VALUE indicates that a loop out has failed - * because the on chain htlc had a lower value than requested. - */ - FAILURE_REASON_INSUFFICIENT_VALUE = 'FAILURE_REASON_INSUFFICIENT_VALUE', - /** - * FAILURE_REASON_TEMPORARY - FAILURE_REASON_TEMPORARY indicates that a swap cannot continue due to an - * internal error. Manual intervention such as a restart is required. - */ - FAILURE_REASON_TEMPORARY = 'FAILURE_REASON_TEMPORARY', - /** - * FAILURE_REASON_INCORRECT_AMOUNT - FAILURE_REASON_INCORRECT_AMOUNT indicates that a loop in permanently failed - * because the amount extended by an external loop in htlc is insufficient. - */ - FAILURE_REASON_INCORRECT_AMOUNT = 'FAILURE_REASON_INCORRECT_AMOUNT', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum LiquidityRuleType { - UNKNOWN = 'UNKNOWN', - THRESHOLD = 'THRESHOLD', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum AutoReason { - AUTO_REASON_UNKNOWN = 'AUTO_REASON_UNKNOWN', - /** - * AUTO_REASON_BUDGET_NOT_STARTED - Budget not started indicates that we do not recommend any swaps because - * the start time for our budget has not arrived yet. - */ - AUTO_REASON_BUDGET_NOT_STARTED = 'AUTO_REASON_BUDGET_NOT_STARTED', - /** - * AUTO_REASON_SWEEP_FEES - Sweep fees indicates that the estimated fees to sweep swaps are too high - * right now. - */ - AUTO_REASON_SWEEP_FEES = 'AUTO_REASON_SWEEP_FEES', - /** - * AUTO_REASON_BUDGET_ELAPSED - Budget elapsed indicates that the autoloop budget for the period has been - * elapsed. - */ - AUTO_REASON_BUDGET_ELAPSED = 'AUTO_REASON_BUDGET_ELAPSED', - /** - * AUTO_REASON_IN_FLIGHT - In flight indicates that the limit on in-flight automatically dispatched - * swaps has already been reached. - */ - AUTO_REASON_IN_FLIGHT = 'AUTO_REASON_IN_FLIGHT', - /** AUTO_REASON_SWAP_FEE - Swap fee indicates that the server fee for a specific swap is too high. */ - AUTO_REASON_SWAP_FEE = 'AUTO_REASON_SWAP_FEE', - /** AUTO_REASON_MINER_FEE - Miner fee indicates that the miner fee for a specific swap is to high. */ - AUTO_REASON_MINER_FEE = 'AUTO_REASON_MINER_FEE', - /** AUTO_REASON_PREPAY - Prepay indicates that the prepay fee for a specific swap is too high. */ - AUTO_REASON_PREPAY = 'AUTO_REASON_PREPAY', - /** - * AUTO_REASON_FAILURE_BACKOFF - Failure backoff indicates that a swap has recently failed for this target, - * and the backoff period has not yet passed. - */ - AUTO_REASON_FAILURE_BACKOFF = 'AUTO_REASON_FAILURE_BACKOFF', - /** - * AUTO_REASON_LOOP_OUT - Loop out indicates that a loop out swap is currently utilizing the channel, - * so it is not eligible. - */ - AUTO_REASON_LOOP_OUT = 'AUTO_REASON_LOOP_OUT', - /** - * AUTO_REASON_LOOP_IN - Loop In indicates that a loop in swap is currently in flight for the peer, - * so it is not eligible. - */ - AUTO_REASON_LOOP_IN = 'AUTO_REASON_LOOP_IN', - /** - * AUTO_REASON_LIQUIDITY_OK - Liquidity ok indicates that a target meets the liquidity balance expressed - * in its rule, so no swap is needed. - */ - AUTO_REASON_LIQUIDITY_OK = 'AUTO_REASON_LIQUIDITY_OK', - /** - * AUTO_REASON_BUDGET_INSUFFICIENT - Budget insufficient indicates that we cannot perform a swap because we do - * not have enough pending budget available. This differs from budget elapsed, - * because we still have some budget available, but we have allocated it to - * other swaps. - */ - AUTO_REASON_BUDGET_INSUFFICIENT = 'AUTO_REASON_BUDGET_INSUFFICIENT', - /** - * AUTO_REASON_FEE_INSUFFICIENT - Fee insufficient indicates that the fee estimate for a swap is higher than - * the portion of total swap amount that we allow fees to consume. - */ - AUTO_REASON_FEE_INSUFFICIENT = 'AUTO_REASON_FEE_INSUFFICIENT', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface LoopOutRequest { - /** Requested swap amount in sat. This does not include the swap and miner fee. */ - amt: string; - /** Base58 encoded destination address for the swap. */ - dest: string; - /** - * Maximum off-chain fee in sat that may be paid for swap payment to the - * server. This limit is applied during path finding. Typically this value is - * taken from the response of the GetQuote call. - */ - maxSwapRoutingFee: string; - /** - * Maximum off-chain fee in sat that may be paid for the prepay to the server. - * This limit is applied during path finding. Typically this value is taken - * from the response of the GetQuote call. - */ - maxPrepayRoutingFee: string; - /** - * Maximum we are willing to pay the server for the swap. This value is not - * disclosed in the swap initiation call, but if the server asks for a - * higher fee, we abort the swap. Typically this value is taken from the - * response of the GetQuote call. It includes the prepay amount. - */ - maxSwapFee: string; - /** Maximum amount of the swap fee that may be charged as a prepayment. */ - maxPrepayAmt: string; - /** - * Maximum in on-chain fees that we are willing to spend. If we want to - * sweep the on-chain htlc and the fee estimate turns out higher than this - * value, we cancel the swap. If the fee estimate is lower, we publish the - * sweep tx. - * - * If the sweep tx is not confirmed, we are forced to ratchet up fees until it - * is swept. Possibly even exceeding max_miner_fee if we get close to the htlc - * timeout. Because the initial publication revealed the preimage, we have no - * other choice. The server may already have pulled the off-chain htlc. Only - * when the fee becomes higher than the swap amount, we can only wait for fees - * to come down and hope - if we are past the timeout - that the server is not - * publishing the revocation. - * - * max_miner_fee is typically taken from the response of the GetQuote call. - */ - maxMinerFee: string; - /** - * Deprecated, use outgoing_chan_set. The channel to loop out, the channel - * to loop out is selected based on the lowest routing fee for the swap - * payment to the server. - * - * @deprecated - */ - loopOutChannel: string; - /** - * A restriction on the channel set that may be used to loop out. The actual - * channel(s) that will be used are selected based on the lowest routing fee - * for the swap payment to the server. - */ - outgoingChanSet: string[]; - /** - * The number of blocks from the on-chain HTLC's confirmation height that it - * should be swept within. - */ - sweepConfTarget: number; - /** - * The number of confirmations that we require for the on chain htlc that will - * be published by the server before we reveal the preimage. - */ - htlcConfirmations: number; - /** - * The latest time (in unix seconds) we allow the server to wait before - * publishing the HTLC on chain. Setting this to a larger value will give the - * server the opportunity to batch multiple swaps together, and wait for - * low-fee periods before publishing the HTLC, potentially resulting in a - * lower total swap fee. - */ - swapPublicationDeadline: string; - /** - * An optional label for this swap. This field is limited to 500 characters - * and may not start with the prefix [reserved], which is used to tag labels - * produced by the daemon. - */ - label: string; - /** - * An optional identification string that will be appended to the user agent - * string sent to the server to give information about the usage of loop. This - * initiator part is meant for user interfaces to add their name to give the - * full picture of the binary used (loopd, LiT) and the method used for - * triggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI). - */ - initiator: string; -} - -export interface LoopInRequest { - /** - * Requested swap amount in sat. This does not include the swap and miner - * fee. - */ - amt: string; - /** - * Maximum we are willing to pay the server for the swap. This value is not - * disclosed in the swap initiation call, but if the server asks for a - * higher fee, we abort the swap. Typically this value is taken from the - * response of the GetQuote call. - */ - maxSwapFee: string; - /** - * Maximum in on-chain fees that we are willing to spend. If we want to - * publish the on-chain htlc and the fee estimate turns out higher than this - * value, we cancel the swap. - * - * max_miner_fee is typically taken from the response of the GetQuote call. - */ - maxMinerFee: string; - /** - * The last hop to use for the loop in swap. If empty, the last hop is selected - * based on the lowest routing fee for the swap payment from the server. - */ - lastHop: Uint8Array | string; - /** - * If external_htlc is true, we expect the htlc to be published by an external - * actor. - */ - externalHtlc: boolean; - /** The number of blocks that the on chain htlc should confirm within. */ - htlcConfTarget: number; - /** - * An optional label for this swap. This field is limited to 500 characters - * and may not be one of the reserved values in loop/labels Reserved list. - */ - label: string; - /** - * An optional identification string that will be appended to the user agent - * string sent to the server to give information about the usage of loop. This - * initiator part is meant for user interfaces to add their name to give the - * full picture of the binary used (loopd, LiT) and the method used for - * triggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI). - */ - initiator: string; - /** Optional route hints to reach the destination through private channels. */ - routeHints: RouteHint[]; - /** - * Private indicates whether the destination node should be considered - * private. In which case, loop will generate hophints to assist with - * probing and payment. - */ - private: boolean; -} - -export interface SwapResponse { - /** - * Swap identifier to track status in the update stream that is returned from - * the Start() call. Currently this is the hash that locks the htlcs. - * DEPRECATED: To make the API more consistent, this field is deprecated in - * favor of id_bytes and will be removed in a future release. - * - * @deprecated - */ - id: string; - /** - * Swap identifier to track status in the update stream that is returned from - * the Start() call. Currently this is the hash that locks the htlcs. - */ - idBytes: Uint8Array | string; - /** - * DEPRECATED. This field stores the address of the onchain htlc, but - * depending on the request, the semantics are different. - * - For internal loop-in htlc_address contains the address of the - * native segwit (P2WSH) htlc. - * - For external loop-in htlc_address contains the address of the - * nested segwit (NP2WSH) htlc. - * - For loop-out htlc_address always contains the native segwit (P2WSH) - * htlc address. - * - * @deprecated - */ - htlcAddress: string; - /** - * The nested segwit address of the on-chain htlc. - * This field remains empty for loop-out. - */ - htlcAddressNp2wsh: string; - /** - * The native segwit address of the on-chain htlc. - * Used for both loop-in and loop-out. - */ - htlcAddressP2wsh: string; - /** The address of the v3 (taproot) htlc. Used for both loop-in and loop-out. */ - htlcAddressP2tr: string; - /** A human-readable message received from the loop server. */ - serverMessage: string; -} - -export interface MonitorRequest {} - -export interface SwapStatus { - /** - * Requested swap amount in sat. This does not include the swap and miner - * fee. - */ - amt: string; - /** - * Swap identifier to track status in the update stream that is returned from - * the Start() call. Currently this is the hash that locks the htlcs. - * DEPRECATED: To make the API more consistent, this field is deprecated in - * favor of id_bytes and will be removed in a future release. - * - * @deprecated - */ - id: string; - /** - * Swap identifier to track status in the update stream that is returned from - * the Start() call. Currently this is the hash that locks the htlcs. - */ - idBytes: Uint8Array | string; - /** The type of the swap. */ - type: SwapType; - /** State the swap is currently in, see State enum. */ - state: SwapState; - /** A failure reason for the swap, only set if the swap has failed. */ - failureReason: FailureReason; - /** Initiation time of the swap. */ - initiationTime: string; - /** Initiation time of the swap. */ - lastUpdateTime: string; - /** - * DEPRECATED: This field stores the address of the onchain htlc. - * - For internal loop-in htlc_address contains the address of the - * native segwit (P2WSH) htlc. - * - For external loop-in htlc_address contains the nested segwit (NP2WSH) - * address. - * - For loop-out htlc_address always contains the native segwit (P2WSH) - * htlc address. - * - * @deprecated - */ - htlcAddress: string; - /** HTLC address (native segwit), used in loop-in and loop-out swaps. */ - htlcAddressP2wsh: string; - /** HTLC address (nested segwit), used in loop-in swaps only. */ - htlcAddressNp2wsh: string; - /** The address of the v3 (taproot) htlc. Used for both loop-in and loop-out. */ - htlcAddressP2tr: string; - /** Swap server cost */ - costServer: string; - /** On-chain transaction cost */ - costOnchain: string; - /** Off-chain routing fees */ - costOffchain: string; - /** Optional last hop if provided in the loop in request. */ - lastHop: Uint8Array | string; - /** Optional outgoing channel set if provided in the loop out request. */ - outgoingChanSet: string[]; - /** An optional label given to the swap on creation. */ - label: string; -} - -export interface ListSwapsRequest {} - -export interface ListSwapsResponse { - /** The list of all currently known swaps and their status. */ - swaps: SwapStatus[]; -} - -export interface SwapInfoRequest { - /** - * The swap identifier which currently is the hash that locks the HTLCs. When - * using REST, this field must be encoded as URL safe base64. - */ - id: Uint8Array | string; -} - -export interface TermsRequest {} - -export interface InTermsResponse { - /** Minimum swap amount (sat) */ - minSwapAmount: string; - /** Maximum swap amount (sat) */ - maxSwapAmount: string; -} - -export interface OutTermsResponse { - /** Minimum swap amount (sat) */ - minSwapAmount: string; - /** Maximum swap amount (sat) */ - maxSwapAmount: string; - /** The minimally accepted cltv delta of the on-chain htlc. */ - minCltvDelta: number; - /** The maximally accepted cltv delta of the on-chain htlc. */ - maxCltvDelta: number; -} - -export interface QuoteRequest { - /** The amount to swap in satoshis. */ - amt: string; - /** - * The confirmation target that should be used either for the sweep of the - * on-chain HTLC broadcast by the swap server in the case of a Loop Out, or for - * the confirmation of the on-chain HTLC broadcast by the swap client in the - * case of a Loop In. - */ - confTarget: number; - /** - * If external_htlc is true, we expect the htlc to be published by an external - * actor. - */ - externalHtlc: boolean; - /** - * The latest time (in unix seconds) we allow the server to wait before - * publishing the HTLC on chain. Setting this to a larger value will give the - * server the opportunity to batch multiple swaps together, and wait for - * low-fee periods before publishing the HTLC, potentially resulting in a - * lower total swap fee. This only has an effect on loop out quotes. - */ - swapPublicationDeadline: string; - /** - * Optionally the client can specify the last hop pubkey when requesting a - * loop-in quote. This is useful to get better off-chain routing fee from the - * server. - */ - loopInLastHop: Uint8Array | string; - /** Optional route hints to reach the destination through private channels. */ - loopInRouteHints: RouteHint[]; - /** - * Private indicates whether the destination node should be considered - * private. In which case, loop will generate hophints to assist with - * probing and payment. - */ - private: boolean; -} - -export interface InQuoteResponse { - /** The fee that the swap server is charging for the swap. */ - swapFeeSat: string; - /** - * An estimate of the on-chain fee that needs to be paid to publish the HTLC - * If a miner fee of 0 is returned, it means the external_htlc flag was set for - * a loop in and the fee estimation was skipped. If a miner fee of -1 is - * returned, it means lnd's wallet tried to estimate the fee but was unable to - * create a sample estimation transaction because not enough funds are - * available. An information message should be shown to the user in this case. - */ - htlcPublishFeeSat: string; - /** On-chain cltv expiry delta */ - cltvDelta: number; - /** The confirmation target to be used to publish the on-chain HTLC. */ - confTarget: number; -} - -export interface OutQuoteResponse { - /** The fee that the swap server is charging for the swap. */ - swapFeeSat: string; - /** The part of the swap fee that is requested as a prepayment. */ - prepayAmtSat: string; - /** - * An estimate of the on-chain fee that needs to be paid to sweep the HTLC for - * a loop out. - */ - htlcSweepFeeSat: string; - /** - * The node pubkey where the swap payment needs to be paid - * to. This can be used to test connectivity before initiating the swap. - */ - swapPaymentDest: Uint8Array | string; - /** On-chain cltv expiry delta */ - cltvDelta: number; - /** The confirmation target to be used for the sweep of the on-chain HTLC. */ - confTarget: number; -} - -export interface ProbeRequest { - /** The amount to probe. */ - amt: string; - /** Optional last hop of the route to probe. */ - lastHop: Uint8Array | string; - /** Optional route hints to reach the destination through private channels. */ - routeHints: RouteHint[]; -} - -export interface ProbeResponse {} - -export interface TokensRequest {} - -export interface TokensResponse { - /** List of all tokens the daemon knows of, including old/expired tokens. */ - tokens: LsatToken[]; -} - -export interface LsatToken { - /** The base macaroon that was baked by the auth server. */ - baseMacaroon: Uint8Array | string; - /** The payment hash of the payment that was paid to obtain the token. */ - paymentHash: Uint8Array | string; - /** - * The preimage of the payment hash, knowledge of this is proof that the - * payment has been paid. If the preimage is set to all zeros, this means the - * payment is still pending and the token is not yet fully valid. - */ - paymentPreimage: Uint8Array | string; - /** The amount of millisatoshis that was paid to get the token. */ - amountPaidMsat: string; - /** The amount of millisatoshis paid in routing fee to pay for the token. */ - routingFeePaidMsat: string; - /** The creation time of the token as UNIX timestamp in seconds. */ - timeCreated: string; - /** Indicates whether the token is expired or still valid. */ - expired: boolean; - /** - * Identifying attribute of this token in the store. Currently represents the - * file name of the token where it's stored on the file system. - */ - storageName: string; -} - -export interface GetLiquidityParamsRequest {} - -export interface LiquidityParameters { - /** A set of liquidity rules that describe the desired liquidity balance. */ - rules: LiquidityRule[]; - /** - * The parts per million of swap amount that is allowed to be allocated to swap - * fees. This value is applied across swap categories and may not be set in - * conjunction with sweep fee rate, swap fee ppm, routing fee ppm, prepay - * routing, max prepay and max miner fee. - */ - feePpm: string; - /** - * The limit we place on our estimated sweep cost for a swap in sat/vByte. If - * the estimated fee for our sweep transaction within the specified - * confirmation target is above this value, we will not suggest any swaps. - */ - sweepFeeRateSatPerVbyte: string; - /** - * The maximum fee paid to the server for facilitating the swap, expressed - * as parts per million of the swap volume. - */ - maxSwapFeePpm: string; - /** - * The maximum fee paid to route the swap invoice off chain, expressed as - * parts per million of the volume being routed. - */ - maxRoutingFeePpm: string; - /** - * The maximum fee paid to route the prepay invoice off chain, expressed as - * parts per million of the volume being routed. - */ - maxPrepayRoutingFeePpm: string; - /** The maximum no-show penalty in satoshis paid for a swap. */ - maxPrepaySat: string; - /** - * The maximum miner fee we will pay to sweep the swap on chain. Note that we - * will not suggest a swap if the estimate is above the sweep limit set by - * these parameters, and we use the current fee estimate to sweep on chain so - * this value is only a cap placed on the amount we spend on fees in the case - * where the swap needs to be claimed on chain, but fees have suddenly spiked. - */ - maxMinerFeeSat: string; - /** - * The number of blocks from the on-chain HTLC's confirmation height that it - * should be swept within. - */ - sweepConfTarget: number; - /** - * The amount of time we require pass since a channel was part of a failed - * swap due to off chain payment failure until it will be considered for swap - * suggestions again, expressed in seconds. - */ - failureBackoffSec: string; - /** - * Set to true to enable automatic dispatch of swaps. All swaps will be limited - * to the fee categories set by these parameters, and total expenditure will - * be limited to the autoloop budget. - */ - autoloop: boolean; - /** - * The total budget for automatically dispatched swaps since the budget start - * time, expressed in satoshis. - */ - autoloopBudgetSat: string; - /** - * The start time for autoloop budget, expressed as a unix timestamp in - * seconds. If this value is 0, the budget will be applied for all - * automatically dispatched swaps. Swaps that were completed before this date - * will not be included in budget calculations. - */ - autoloopBudgetStartSec: string; - /** - * The maximum number of automatically dispatched swaps that we allow to be in - * flight at any point in time. - */ - autoMaxInFlight: string; - /** - * The minimum amount, expressed in satoshis, that the autoloop client will - * dispatch a swap for. This value is subject to the server-side limits - * specified by the LoopOutTerms endpoint. - */ - minSwapAmount: string; - /** - * The maximum amount, expressed in satoshis, that the autoloop client will - * dispatch a swap for. This value is subject to the server-side limits - * specified by the LoopOutTerms endpoint. - */ - maxSwapAmount: string; - /** The confirmation target for loop in on-chain htlcs. */ - htlcConfTarget: number; -} - -export interface LiquidityRule { - /** - * The short channel ID of the channel that this rule should be applied to. - * This field may not be set when the pubkey field is set. - */ - channelId: string; - /** The type of swap that will be dispatched for this rule. */ - swapType: SwapType; - /** - * The public key of the peer that this rule should be applied to. This field - * may not be set when the channel id field is set. - */ - pubkey: Uint8Array | string; - /** - * Type indicates the type of rule that this message rule represents. Setting - * this value will determine which fields are used in the message. The comments - * on each field in this message will be prefixed with the LiquidityRuleType - * they belong to. - */ - type: LiquidityRuleType; - /** - * THRESHOLD: The percentage of total capacity that incoming capacity should - * not drop beneath. - */ - incomingThreshold: number; - /** - * THRESHOLD: The percentage of total capacity that outgoing capacity should - * not drop beneath. - */ - outgoingThreshold: number; -} - -export interface SetLiquidityParamsRequest { - /** - * Parameters is the desired new set of parameters for the liquidity management - * subsystem. Note that the current set of parameters will be completely - * overwritten by the parameters provided (if they are valid), so the full set - * of parameters should be provided for each call. - */ - parameters: LiquidityParameters | undefined; -} - -export interface SetLiquidityParamsResponse {} - -export interface SuggestSwapsRequest {} - -export interface Disqualified { - /** The short channel ID of the channel that was excluded from our suggestions. */ - channelId: string; - /** The public key of the peer that was excluded from our suggestions. */ - pubkey: Uint8Array | string; - /** The reason that we excluded the channel from the our suggestions. */ - reason: AutoReason; -} - -export interface SuggestSwapsResponse { - /** The set of recommended loop outs. */ - loopOut: LoopOutRequest[]; - /** The set of recommended loop in swaps */ - loopIn: LoopInRequest[]; - /** - * Disqualified contains the set of channels that swaps are not recommended - * for. - */ - disqualified: Disqualified[]; -} - -/** - * SwapClient is a service that handles the client side process of onchain/offchain - * swaps. The service is designed for a single client. - */ -export interface SwapClient { - /** - * loop: `out` - * LoopOut initiates an loop out swap with the given parameters. The call - * returns after the swap has been set up with the swap server. From that - * point onwards, progress can be tracked via the SwapStatus stream that is - * returned from Monitor(). - */ - loopOut(request?: DeepPartial): Promise; - /** - * loop: `in` - * LoopIn initiates a loop in swap with the given parameters. The call - * returns after the swap has been set up with the swap server. From that - * point onwards, progress can be tracked via the SwapStatus stream - * that is returned from Monitor(). - */ - loopIn(request?: DeepPartial): Promise; - /** - * loop: `monitor` - * Monitor will return a stream of swap updates for currently active swaps. - */ - monitor( - request?: DeepPartial, - onMessage?: (msg: SwapStatus) => void, - onError?: (err: Error) => void - ): void; - /** - * loop: `listswaps` - * ListSwaps returns a list of all currently known swaps and their current - * status. - */ - listSwaps( - request?: DeepPartial - ): Promise; - /** - * loop: `swapinfo` - * SwapInfo returns all known details about a single swap. - */ - swapInfo(request?: DeepPartial): Promise; - /** - * loop: `terms` - * LoopOutTerms returns the terms that the server enforces for a loop out swap. - */ - loopOutTerms( - request?: DeepPartial - ): Promise; - /** - * loop: `quote` - * LoopOutQuote returns a quote for a loop out swap with the provided - * parameters. - */ - loopOutQuote( - request?: DeepPartial - ): Promise; - /** - * loop: `terms` - * GetTerms returns the terms that the server enforces for swaps. - */ - getLoopInTerms( - request?: DeepPartial - ): Promise; - /** - * loop: `quote` - * GetQuote returns a quote for a swap with the provided parameters. - */ - getLoopInQuote( - request?: DeepPartial - ): Promise; - /** - * Probe asks he sever to probe the route to us to have a better upfront - * estimate about routing fees when loopin-in. - */ - probe(request?: DeepPartial): Promise; - /** - * loop: `listauth` - * GetLsatTokens returns all LSAT tokens the daemon ever paid for. - */ - getLsatTokens( - request?: DeepPartial - ): Promise; - /** - * loop: `getparams` - * GetLiquidityParams gets the parameters that the daemon's liquidity manager - * is currently configured with. This may be nil if nothing is configured. - * [EXPERIMENTAL]: endpoint is subject to change. - */ - getLiquidityParams( - request?: DeepPartial - ): Promise; - /** - * loop: `setparams` - * SetLiquidityParams sets a new set of parameters for the daemon's liquidity - * manager. Note that the full set of parameters must be provided, because - * this call fully overwrites our existing parameters. - * [EXPERIMENTAL]: endpoint is subject to change. - */ - setLiquidityParams( - request?: DeepPartial - ): Promise; - /** - * loop: `suggestswaps` - * SuggestSwaps returns a list of recommended swaps based on the current - * state of your node's channels and it's liquidity manager parameters. - * Note that only loop out suggestions are currently supported. - * [EXPERIMENTAL]: endpoint is subject to change. - */ - suggestSwaps( - request?: DeepPartial - ): Promise; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/loop/debug.ts b/lib/types/proto/loop/debug.ts deleted file mode 100644 index b113616..0000000 --- a/lib/types/proto/loop/debug.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* eslint-disable */ -export interface ForceAutoLoopRequest {} - -export interface ForceAutoLoopResponse {} - -/** - * Debug is a service that exposes endpoints intended for testing purposes. These - * endpoints should not operate on mainnet, and should only be included if loop is - * built with the dev build tag. - */ -export interface Debug { - /** - * ForceAutoLoop is intended for *testing purposes only* and will not work on - * mainnet. This endpoint ticks our autoloop timer, triggering automated - * dispatch of a swap if one is suggested. - */ - forceAutoLoop( - request?: DeepPartial - ): Promise; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/loop/swapserverrpc/common.ts b/lib/types/proto/loop/swapserverrpc/common.ts deleted file mode 100644 index f88ae7e..0000000 --- a/lib/types/proto/loop/swapserverrpc/common.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* eslint-disable */ -export interface HopHint { - /** The public key of the node at the start of the channel. */ - nodeId: string; - /** The unique identifier of the channel. */ - chanId: string; - /** The base fee of the channel denominated in millisatoshis. */ - feeBaseMsat: number; - /** - * The fee rate of the channel for sending one satoshi across it denominated in - * millionths of a satoshi. - */ - feeProportionalMillionths: number; - /** The time-lock delta of the channel. */ - cltvExpiryDelta: number; -} - -export interface RouteHint { - /** - * A list of hop hints that when chained together can assist in reaching a - * specific destination. - */ - hopHints: HopHint[]; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/looprpc.ts b/lib/types/proto/looprpc.ts deleted file mode 100644 index 531d541..0000000 --- a/lib/types/proto/looprpc.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './loop/client'; -export * from './loop/debug'; diff --git a/lib/types/proto/pool/auctioneerrpc/auctioneer.ts b/lib/types/proto/pool/auctioneerrpc/auctioneer.ts deleted file mode 100644 index dba54e4..0000000 --- a/lib/types/proto/pool/auctioneerrpc/auctioneer.ts +++ /dev/null @@ -1,1235 +0,0 @@ -/* eslint-disable */ - -export enum ChannelType { - /** TWEAKLESS - The channel supports static to_remote keys. */ - TWEAKLESS = 'TWEAKLESS', - /** ANCHORS - The channel uses an anchor-based commitment. */ - ANCHORS = 'ANCHORS', - /** - * SCRIPT_ENFORCED_LEASE - The channel build upon the anchor-based commitment and requires an - * additional CLTV of the channel lease maturity on any commitment and HTLC - * outputs that pay directly to the channel initiator (the seller). - */ - SCRIPT_ENFORCED_LEASE = 'SCRIPT_ENFORCED_LEASE', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum AuctionAccountState { - /** STATE_PENDING_OPEN - The account's funding transaction is not yet confirmed on-chain. */ - STATE_PENDING_OPEN = 'STATE_PENDING_OPEN', - /** STATE_OPEN - The account is fully open and confirmed on-chain. */ - STATE_OPEN = 'STATE_OPEN', - /** - * STATE_EXPIRED - The account is still open but the CLTV expiry has passed and the trader can - * close it without the auctioneer's key. Orders for accounts in this state - * won't be accepted. - */ - STATE_EXPIRED = 'STATE_EXPIRED', - /** - * STATE_PENDING_UPDATE - The account was modified by a deposit or withdrawal and is currently waiting - * for the modifying transaction to confirm. - */ - STATE_PENDING_UPDATE = 'STATE_PENDING_UPDATE', - /** - * STATE_CLOSED - The account is closed. The auctioneer doesn't track whether the closing - * transaction is already confirmed on-chain or not. - */ - STATE_CLOSED = 'STATE_CLOSED', - /** STATE_PENDING_BATCH - The account has recently participated in a batch and is not yet confirmed. */ - STATE_PENDING_BATCH = 'STATE_PENDING_BATCH', - /** - * STATE_EXPIRED_PENDING_UPDATE - The account has reached the expiration height while it had a pending update - * that hasn't yet confirmed. This allows accounts to be renewed once - * confirmed and expired. - */ - STATE_EXPIRED_PENDING_UPDATE = 'STATE_EXPIRED_PENDING_UPDATE', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum OrderChannelType { - /** ORDER_CHANNEL_TYPE_UNKNOWN - Used to set defaults when a trader doesn't specify a channel type. */ - ORDER_CHANNEL_TYPE_UNKNOWN = 'ORDER_CHANNEL_TYPE_UNKNOWN', - /** - * ORDER_CHANNEL_TYPE_PEER_DEPENDENT - The channel type will vary per matched channel based on the features shared - * between its participants. - */ - ORDER_CHANNEL_TYPE_PEER_DEPENDENT = 'ORDER_CHANNEL_TYPE_PEER_DEPENDENT', - /** - * ORDER_CHANNEL_TYPE_SCRIPT_ENFORCED - A channel type that builds upon the anchors commitment format to enforce - * channel lease maturities in the commitment and HTLC outputs that pay to the - * channel initiator/seller. - */ - ORDER_CHANNEL_TYPE_SCRIPT_ENFORCED = 'ORDER_CHANNEL_TYPE_SCRIPT_ENFORCED', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum NodeTier { - /** - * TIER_DEFAULT - The default node tier. This value will be determined at run-time by the - * current order version. - */ - TIER_DEFAULT = 'TIER_DEFAULT', - /** - * TIER_0 - Tier 0, bid with this tier are opting out of the smaller "higher - * quality" pool of nodes to match their bids. Nodes in this tier are - * considered to have "no rating". - */ - TIER_0 = 'TIER_0', - /** - * TIER_1 - Tier 1, the "base" node tier. Nodes in this tier are shown to have a - * higher degree of up time and route-ability compared to the rest of the - * nodes in the network. This is the current default node tier when - * submitting bid orders. - */ - TIER_1 = 'TIER_1', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum OrderState { - ORDER_SUBMITTED = 'ORDER_SUBMITTED', - ORDER_CLEARED = 'ORDER_CLEARED', - ORDER_PARTIALLY_FILLED = 'ORDER_PARTIALLY_FILLED', - ORDER_EXECUTED = 'ORDER_EXECUTED', - ORDER_CANCELED = 'ORDER_CANCELED', - ORDER_EXPIRED = 'ORDER_EXPIRED', - ORDER_FAILED = 'ORDER_FAILED', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum DurationBucketState { - /** - * NO_MARKET - NO_MARKET indicates that this bucket doesn't actually exist, in that no - * market is present for this market. - */ - NO_MARKET = 'NO_MARKET', - /** - * MARKET_CLOSED - MARKET_CLOSED indicates that this market exists, but that it isn't currently - * running. - */ - MARKET_CLOSED = 'MARKET_CLOSED', - /** - * ACCEPTING_ORDERS - ACCEPTING_ORDERS indicates that we're accepting orders for this bucket, but - * not yet clearing for this duration. - */ - ACCEPTING_ORDERS = 'ACCEPTING_ORDERS', - /** - * MARKET_OPEN - MARKET_OPEN indicates that we're accepting orders, and fully clearing the - * market for this duration. - */ - MARKET_OPEN = 'MARKET_OPEN', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface ReserveAccountRequest { - /** The desired value of the account in satoshis. */ - accountValue: string; - /** The block height at which the account should expire. */ - accountExpiry: number; - /** The trader's account key. */ - traderKey: Uint8Array | string; -} - -export interface ReserveAccountResponse { - /** - * The base key of the auctioneer. This key should be tweaked with the trader's - * per-batch tweaked key to obtain the corresponding per-batch tweaked - * auctioneer key. - */ - auctioneerKey: Uint8Array | string; - /** - * The initial per-batch key to be used for the account. For every cleared - * batch that the account participates in, this key will be incremented by the - * base point of its curve, resulting in a new key for both the trader and - * auctioneer in every batch. - */ - initialBatchKey: Uint8Array | string; -} - -export interface ServerInitAccountRequest { - /** - * Transaction output of the account. Has to be unspent and be a P2WSH of - * the account script below. The amount must also exactly correspond to the - * account value below. - */ - accountPoint: OutPoint | undefined; - /** The script used to create the account point. */ - accountScript: Uint8Array | string; - /** - * The value of the account in satoshis. Must match the amount of the - * account_point output. - */ - accountValue: string; - /** The block height at which the account should expire. */ - accountExpiry: number; - /** The trader's account key. */ - traderKey: Uint8Array | string; - /** - * The user agent string that identifies the software running on the user's - * side. This can be changed in the user's client software but it _SHOULD_ - * conform to the following pattern and use less than 256 characters: - * Agent-Name/semver-version(/additional-info) - * Examples: - * poold/v0.4.2-beta/commit=3b635821,initiator=pool-cli - * litd/v0.4.0-alpha/commit=326d754,initiator=lit-ui - */ - userAgent: string; -} - -export interface ServerInitAccountResponse {} - -export interface ServerSubmitOrderRequest { - /** Submit an ask order. */ - ask: ServerAsk | undefined; - /** Submit a bid order. */ - bid: ServerBid | undefined; - /** - * The user agent string that identifies the software running on the user's - * side. This can be changed in the user's client software but it _SHOULD_ - * conform to the following pattern and use less than 256 characters: - * Agent-Name/semver-version(/additional-info) - * Examples: - * poold/v0.4.2-beta/commit=3b635821,initiator=pool-cli - * litd/v0.4.0-alpha/commit=326d754,initiator=lit-ui - */ - userAgent: string; -} - -export interface ServerSubmitOrderResponse { - /** Order failed with the given reason. */ - invalidOrder: InvalidOrder | undefined; - /** Order was accepted. */ - accepted: boolean | undefined; -} - -export interface ServerCancelOrderRequest { - /** The preimage to the order's unique nonce. */ - orderNoncePreimage: Uint8Array | string; -} - -export interface ServerCancelOrderResponse {} - -export interface ClientAuctionMessage { - /** - * Signal the intent to receive updates about a certain account and start - * by sending the commitment part of the authentication handshake. This is - * step 1 of the 3-way handshake. - */ - commit: AccountCommitment | undefined; - /** - * Subscribe to update and interactive order execution events for account - * given and all its orders. Contains the final signature and is step 3 of - * the 3-way authentication handshake. - */ - subscribe: AccountSubscription | undefined; - /** Accept the orders to be matched. */ - accept: OrderMatchAccept | undefined; - /** Reject a whole batch. */ - reject: OrderMatchReject | undefined; - /** - * The channel funding negotiations with the matched peer were successful - * and the inputs to spend from the accounts are now signed. - */ - sign: OrderMatchSign | undefined; - /** - * The trader has lost its database and is trying to recover their - * accounts. This message can be sent after the successful completion of - * the 3-way authentication handshake where it will be established if the - * account exists on the auctioneer's side. This message must only be sent - * if the auctioneer knows of the account, otherwise it will regard it as a - * critical error and terminate the connection. - */ - recover: AccountRecovery | undefined; -} - -export interface AccountCommitment { - /** - * The SHA256 hash of the trader's account key and a 32 byte random nonce. - * commit_hash = SHA256(accountPubKey || nonce) - */ - commitHash: Uint8Array | string; - /** - * The batch verification protocol version the client is using. Clients that - * don't use the latest version will be declined to connect and participate in - * an auction. The user should then be informed that a software update is - * required. - */ - batchVersion: number; -} - -export interface AccountSubscription { - /** The trader's account key of the account to subscribe to. */ - traderKey: Uint8Array | string; - /** The random 32 byte nonce the trader used to create the commitment hash. */ - commitNonce: Uint8Array | string; - /** - * The signature over the auth_hash which is the hash of the commitment and - * challenge. The signature is created with the trader's account key they - * committed to. - * auth_hash = SHA256(SHA256(accountPubKey || nonce) || challenge) - */ - authSig: Uint8Array | string; -} - -export interface OrderMatchAccept { - /** - * The batch ID this acceptance message refers to. Must be set to avoid out-of- - * order responses from disrupting the batching process. - */ - batchId: Uint8Array | string; -} - -export interface OrderMatchReject { - /** The ID of the batch to reject. */ - batchId: Uint8Array | string; - /** The reason/error string for the rejection. */ - reason: string; - /** The reason as a code. */ - reasonCode: OrderMatchReject_RejectReason; - /** - * The map of order nonces the trader was matched with but doesn't accept. The - * map contains the _other_ trader's order nonces and the reason for rejecting - * them. This can be a subset of the whole list of orders presented as matches - * if the trader only wants to reject some of them. This map is only - * considered by the auctioneer if the main reason_code is set to - * PARTIAL_REJECT. Otherwise it is assumed that the whole batch was faulty for - * some reason and that the trader rejects all orders contained. The auctioneer - * will only accept a certain number of these partial rejects before a trader's - * account is removed completely from the current batch. Abusing this - * functionality can also lead to a ban of the trader. - * - * The order nonces are hex encoded strings because the protobuf map doesn't - * allow raw bytes to be the map key type. - */ - rejectedOrders: { [key: string]: OrderReject }; -} - -export enum OrderMatchReject_RejectReason { - /** UNKNOWN - The reason cannot be mapped to a specific code. */ - UNKNOWN = 'UNKNOWN', - /** - * SERVER_MISBEHAVIOR - The client didn't come up with the same result as the server and is - * rejecting the batch because of that. - */ - SERVER_MISBEHAVIOR = 'SERVER_MISBEHAVIOR', - /** - * BATCH_VERSION_MISMATCH - The client doesn't support the current batch verification version the - * server is using. - */ - BATCH_VERSION_MISMATCH = 'BATCH_VERSION_MISMATCH', - /** - * PARTIAL_REJECT - The client rejects some of the orders, not the full batch. When this - * code is set, the rejected_orders map must be set. - */ - PARTIAL_REJECT = 'PARTIAL_REJECT', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface OrderMatchReject_RejectedOrdersEntry { - key: string; - value: OrderReject | undefined; -} - -export interface OrderReject { - /** The reason/error string for the rejection. */ - reason: string; - /** The reason as a code. */ - reasonCode: OrderReject_OrderRejectReason; -} - -export enum OrderReject_OrderRejectReason { - /** - * DUPLICATE_PEER - The trader's client has a preference to only match orders with peers it - * doesn't already have channels with. The order that is rejected with this - * reason type comes from a peer that the trader already has channels with. - */ - DUPLICATE_PEER = 'DUPLICATE_PEER', - /** - * CHANNEL_FUNDING_FAILED - The trader's client couldn't connect to the remote node of the matched - * order or the channel funding could not be initialized for another - * reason. This could also be the rejecting node's fault if their - * connection is not stable. Using this code can have a negative impact on - * the reputation score of both nodes, depending on the number of errors - * recorded. - */ - CHANNEL_FUNDING_FAILED = 'CHANNEL_FUNDING_FAILED', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface ChannelInfo { - /** The identifying type of the channel. */ - type: ChannelType; - /** The node's identifying public key. */ - localNodeKey: Uint8Array | string; - /** The remote node's identifying public key. */ - remoteNodeKey: Uint8Array | string; - /** - * The node's base public key used within the non-delayed pay-to-self output on - * the commitment transaction. - */ - localPaymentBasePoint: Uint8Array | string; - /** - * RemotePaymentBasePoint is the remote node's base public key used within the - * non-delayed pay-to-self output on the commitment transaction. - */ - remotePaymentBasePoint: Uint8Array | string; -} - -export interface OrderMatchSign { - /** The ID of the batch that the signatures are meant for. */ - batchId: Uint8Array | string; - /** - * A map with the signatures to spend the accounts being spent in a batch - * transaction. The map key corresponds to the trader's account key of the - * account in the batch transaction. The account key/ID has to be hex encoded - * into a string because protobuf doesn't allow bytes as a map key data type. - */ - accountSigs: { [key: string]: Uint8Array | string }; - /** - * The information for each channel created as part of a batch that's submitted - * to the auctioneer to ensure they can properly enforce a channel's service - * lifetime. Entries are indexed by the string representation of a channel's - * outpoint. - */ - channelInfos: { [key: string]: ChannelInfo }; -} - -export interface OrderMatchSign_AccountSigsEntry { - key: string; - value: Uint8Array | string; -} - -export interface OrderMatchSign_ChannelInfosEntry { - key: string; - value: ChannelInfo | undefined; -} - -export interface AccountRecovery { - /** The trader's account key of the account to recover. */ - traderKey: Uint8Array | string; -} - -export interface ServerAuctionMessage { - /** - * Step 2 of the 3-way authentication handshake. Contains the - * authentication challenge. Subscriptions sent by the trader must sign - * the message SHA256(SHA256(accountPubKey || nonce) || challenge) - * with their account key to prove ownership of said key. - */ - challenge: ServerChallenge | undefined; - /** - * The trader has subscribed to account updates successfully, the 3-way - * authentication handshake completed normally. - */ - success: SubscribeSuccess | undefined; - /** - * An error occurred during any part of the communication. The trader - * should inspect the error code and act accordingly. - */ - error: SubscribeError | undefined; - /** - * The auctioneer has matched a set of orders into a batch and now - * instructs the traders to validate the batch and prepare for order - * execution. Because traders have the possibility of backing out of a - * batch, multiple of these messages with the SAME batch_id can be sent. - */ - prepare: OrderMatchPrepare | undefined; - /** - * This message is sent after all traders send back an OrderMatchAccept - * method. It signals that the traders should execute their local funding - * protocol, then send signatures for their account inputs. - */ - sign: OrderMatchSignBegin | undefined; - /** - * All traders have accepted and signed the batch and the final transaction - * was broadcast. - */ - finalize: OrderMatchFinalize | undefined; - /** - * The answer to a trader's request for account recovery. This message - * contains all information that is needed to restore the account to - * working order on the trader side. - */ - account: AuctionAccount | undefined; -} - -export interface ServerChallenge { - /** - * The unique challenge for each stream that has to be signed with the trader's - * account key for each account subscription. - */ - challenge: Uint8Array | string; - /** The commit hash the challenge was created for. */ - commitHash: Uint8Array | string; -} - -export interface SubscribeSuccess { - /** The trader's account key this message is referring to. */ - traderKey: Uint8Array | string; -} - -export interface MatchedMarket { - /** - * Maps a user's own order_nonce to the opposite order type they were matched - * with. The order_nonce is a 32 byte hex encoded string because bytes is not - * allowed as a map key data type in protobuf. - */ - matchedOrders: { [key: string]: MatchedOrder }; - /** - * The uniform clearing price rate in parts per billion that was used for this - * batch. - */ - clearingPriceRate: number; -} - -export interface MatchedMarket_MatchedOrdersEntry { - key: string; - value: MatchedOrder | undefined; -} - -export interface OrderMatchPrepare { - /** - * Deprecated, use matched_markets. - * - * @deprecated - */ - matchedOrders: { [key: string]: MatchedOrder }; - /** - * Deprecated, use matched_markets. - * - * @deprecated - */ - clearingPriceRate: number; - /** - * A list of the user's own accounts that are being spent by the matched - * orders. The list contains the differences that would be applied by the - * server when executing the orders. - */ - chargedAccounts: AccountDiff[]; - /** The fee parameters used to calculate the execution fees. */ - executionFee: ExecutionFee | undefined; - /** The batch transaction with all non-witness data. */ - batchTransaction: Uint8Array | string; - /** - * Fee rate of the batch transaction, expressed in satoshis per 1000 weight - * units (sat/kW). - */ - feeRateSatPerKw: string; - /** - * Fee rebate in satoshis, offered if another batch participant wants to pay - * more fees for a faster confirmation. - */ - feeRebateSat: string; - /** The 32 byte unique identifier of this batch. */ - batchId: Uint8Array | string; - /** - * The batch verification protocol version the server is using. Clients that - * don't support this version MUST return an `OrderMatchAccept` message with - * an empty list of orders so the batch can continue. The user should then be - * informed that a software update is required. - */ - batchVersion: number; - /** - * Maps the distinct lease duration markets to the orders that were matched - * within and the discovered market clearing price. - */ - matchedMarkets: { [key: number]: MatchedMarket }; - /** - * The earliest absolute height in the chain in which the batch transaction can - * be found within. This will be used by traders to base off their absolute - * channel lease maturity height. - */ - batchHeightHint: number; -} - -export interface OrderMatchPrepare_MatchedOrdersEntry { - key: string; - value: MatchedOrder | undefined; -} - -export interface OrderMatchPrepare_MatchedMarketsEntry { - key: number; - value: MatchedMarket | undefined; -} - -export interface OrderMatchSignBegin { - /** The 32 byte unique identifier of this batch. */ - batchId: Uint8Array | string; -} - -export interface OrderMatchFinalize { - /** The unique identifier of the finalized batch. */ - batchId: Uint8Array | string; - /** The final transaction ID of the published batch transaction. */ - batchTxid: Uint8Array | string; -} - -export interface SubscribeError { - /** The string representation of the subscription error. */ - error: string; - /** The error code of the subscription error. */ - errorCode: SubscribeError_Error; - /** - * The trader's account key this error is referring to. This is not set if - * the error code is SERVER_SHUTDOWN as that error is only sent once per - * connection and not per individual subscription. - */ - traderKey: Uint8Array | string; - /** - * The auctioneer's partial account information as it was stored when creating - * the reservation. This is only set if the error code is - * INCOMPLETE_ACCOUNT_RESERVATION. Only the fields value, expiry, trader_key, - * auctioneer_key, batch_key and height_hint will be set in that - * case. - */ - accountReservation: AuctionAccount | undefined; -} - -export enum SubscribeError_Error { - /** UNKNOWN - The error cannot be mapped to a specific code. */ - UNKNOWN = 'UNKNOWN', - /** - * SERVER_SHUTDOWN - The server is shutting down for maintenance. Traders should close the - * long-lived stream/connection and try to connect again after some time. - */ - SERVER_SHUTDOWN = 'SERVER_SHUTDOWN', - /** - * ACCOUNT_DOES_NOT_EXIST - The account the trader tried to subscribe to does not exist in the - * auctioneer's database. - */ - ACCOUNT_DOES_NOT_EXIST = 'ACCOUNT_DOES_NOT_EXIST', - /** - * INCOMPLETE_ACCOUNT_RESERVATION - The account the trader tried to subscribe to was never completed and a - * reservation for it is still pending. - */ - INCOMPLETE_ACCOUNT_RESERVATION = 'INCOMPLETE_ACCOUNT_RESERVATION', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface AuctionAccount { - /** - * The value of the account in satoshis. Must match the amount of the - * account_point output. - */ - value: string; - /** The block height at which the account should expire. */ - expiry: number; - /** The trader's account key. */ - traderKey: Uint8Array | string; - /** The long term auctioneer's account key. */ - auctioneerKey: Uint8Array | string; - /** The current batch key used to create the account output. */ - batchKey: Uint8Array | string; - /** The current state of the account as the auctioneer sees it. */ - state: AuctionAccountState; - /** - * The block height of the last change to the account's output. Can be used to - * scan the chain for the output's spend state more efficiently. - */ - heightHint: number; - /** - * Transaction output of the account. Depending on the state of the account, - * this output might have been spent. - */ - outpoint: OutPoint | undefined; - /** - * The latest transaction of an account. This is only known by the auctioneer - * after the account has met its initial funding confirmation. - */ - latestTx: Uint8Array | string; -} - -export interface MatchedOrder { - /** - * The bids the trader's own order was matched against. This list is empty if - * the trader's order was a bid order itself. - */ - matchedBids: MatchedBid[]; - /** - * The asks the trader's own order was matched against. This list is empty if - * the trader's order was an ask order itself. - */ - matchedAsks: MatchedAsk[]; -} - -export interface MatchedAsk { - /** The ask order that was matched against. */ - ask: ServerAsk | undefined; - /** The number of units that were filled from/by this matched order. */ - unitsFilled: number; -} - -export interface MatchedBid { - /** The ask order that was matched against. */ - bid: ServerBid | undefined; - /** The number of units that were filled from/by this matched order. */ - unitsFilled: number; -} - -export interface AccountDiff { - /** The final balance of the account after the executed batch. */ - endingBalance: string; - /** - * Depending on the amount of the final balance of the account, the remainder - * is either sent to a new on-chain output, extended off-chain or fully - * consumed by the batch and its fees. - */ - endingState: AccountDiff_AccountState; - /** - * If the account was re-created on-chain then the new account's index in the - * transaction is set here. If the account was fully spent or the remainder was - * extended off-chain then no new account outpoint is created and -1 is - * returned here. - */ - outpointIndex: number; - /** The trader's account key this diff is referring to. */ - traderKey: Uint8Array | string; - /** - * The new account expiry height used to verify the batch. If the batch is - * successfully executed the account must update its expiry height to this - * value. - */ - newExpiry: number; -} - -export enum AccountDiff_AccountState { - OUTPUT_RECREATED = 'OUTPUT_RECREATED', - OUTPUT_DUST_EXTENDED_OFFCHAIN = 'OUTPUT_DUST_EXTENDED_OFFCHAIN', - OUTPUT_DUST_ADDED_TO_FEES = 'OUTPUT_DUST_ADDED_TO_FEES', - OUTPUT_FULLY_SPENT = 'OUTPUT_FULLY_SPENT', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface ServerOrder { - /** The trader's account key of the account to use for the order. */ - traderKey: Uint8Array | string; - /** Fixed order rate in parts per billion. */ - rateFixed: number; - /** Order amount in satoshis. */ - amt: string; - minChanAmt: string; - /** Order nonce of 32 byte length, acts as unique order identifier. */ - orderNonce: Uint8Array | string; - /** - * Signature of the order's digest, signed with the user's account key. The - * signature must be fixed-size LN wire format encoded. Version 0 includes the - * fields version, rate_fixed, amt, max_batch_fee_rate_sat_per_kw and - * lease_duration_blocks in the order digest. - */ - orderSig: Uint8Array | string; - /** - * The multi signature key of the node creating the order, will be used for the - * target channel's funding TX 2-of-2 multi signature output. - */ - multiSigKey: Uint8Array | string; - /** The pubkey of the node creating the order. */ - nodePub: Uint8Array | string; - /** The network addresses of the node creating the order. */ - nodeAddr: NodeAddress[]; - /** The type of the channel that should be opened. */ - channelType: OrderChannelType; - /** - * Maximum fee rate the trader is willing to pay for the batch transaction, - * expressed in satoshis per 1000 weight units (sat/kW). - */ - maxBatchFeeRateSatPerKw: string; - /** - * List of nodes that will be allowed to match with our order. Incompatible - * with the `not_allowed_node_ids` field. - */ - allowedNodeIds: Uint8Array | string[]; - /** - * List of nodes that won't be allowed to match with our order. Incompatible - * with the `allowed_node_ids` field. - */ - notAllowedNodeIds: Uint8Array | string[]; -} - -export interface ServerBid { - /** The common fields shared between both ask and bid order types. */ - details: ServerOrder | undefined; - /** - * Required number of blocks that a channel opened as a result of this bid - * should be kept open. - */ - leaseDurationBlocks: number; - /** - * The version of the order format that is used. Will be increased once new - * features are added. - */ - version: number; - /** - * The minimum node tier this order should be matched with. Only asks backed by - * a node this tier or higher will be eligible for matching with this bid. - */ - minNodeTier: NodeTier; - /** - * Give the incoming channel that results from this bid being matched an - * initial outbound balance by adding additional funds from the taker's account - * into the channel. As a simplification for the execution protocol and the - * channel reserve calculations, the self_chan_balance can be at most the same - * as the order amount and the min_chan_amt must be set to the full order - * amount. - */ - selfChanBalance: string; - /** - * If this bid order is meant to lease a channel for another node (which is - * dubbed a "sidecar channel") then this boolean needs to be set to true. The - * multi_sig_key, node_pub and node_addr fields of the order details must then - * correspond to the recipient node's details. - */ - isSidecarChannel: boolean; -} - -export interface ServerAsk { - /** The common fields shared between both ask and bid order types. */ - details: ServerOrder | undefined; - /** - * The number of blocks the liquidity provider is willing to provide the - * channel funds for. - */ - leaseDurationBlocks: number; - /** - * The version of the order format that is used. Will be increased once new - * features are added. - */ - version: number; -} - -export interface CancelOrder { - orderNonce: Uint8Array | string; -} - -export interface InvalidOrder { - orderNonce: Uint8Array | string; - failReason: InvalidOrder_FailReason; - failString: string; -} - -export enum InvalidOrder_FailReason { - INVALID_AMT = 'INVALID_AMT', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface ServerInput { - /** The outpoint that the input corresponds to. */ - outpoint: OutPoint | undefined; - /** - * The signature script required by the input. This only applies to NP2WKH - * inputs. - */ - sigScript: Uint8Array | string; -} - -export interface ServerOutput { - /** The value, in satoshis, of the output. */ - value: string; - /** The script of the output to send the value to. */ - script: Uint8Array | string; -} - -export interface ServerModifyAccountRequest { - /** The trader's account key of the account to be modified. */ - traderKey: Uint8Array | string; - /** - * An additional set of inputs that can be included in the spending transaction - * of an account. These can be used to deposit more funds into an account. - * These must be under control of the backing lnd node's wallet. - */ - newInputs: ServerInput[]; - /** - * An additional set of outputs that can be included in the spending - * transaction of an account. These can be used to withdraw funds from an - * account. - */ - newOutputs: ServerOutput[]; - /** The new parameters to apply for the account. */ - newParams: ServerModifyAccountRequest_NewAccountParameters | undefined; -} - -export interface ServerModifyAccountRequest_NewAccountParameters { - /** The new value of the account. */ - value: string; - /** The new expiry of the account as an absolute height. */ - expiry: number; -} - -export interface ServerModifyAccountResponse { - /** - * The auctioneer's signature that allows a trader to broadcast a transaction - * spending from an account output. - */ - accountSig: Uint8Array | string; -} - -export interface ServerOrderStateRequest { - orderNonce: Uint8Array | string; -} - -export interface ServerOrderStateResponse { - /** The state the order currently is in. */ - state: OrderState; - /** - * The number of currently unfilled units of this order. This will be equal to - * the total amount of units until the order has reached the state PARTIAL_FILL - * or EXECUTED. - */ - unitsUnfulfilled: number; -} - -export interface TermsRequest {} - -export interface TermsResponse { - /** The maximum account size in satoshis currently allowed by the auctioneer. */ - maxAccountValue: string; - /** - * Deprecated, use explicit order duration from lease_duration_buckets. - * - * @deprecated - */ - maxOrderDurationBlocks: number; - /** The execution fee charged per matched order. */ - executionFee: ExecutionFee | undefined; - /** - * Deprecated, use lease_duration_buckets. - * - * @deprecated - */ - leaseDurations: { [key: number]: boolean }; - /** The confirmation target to use for fee estimation of the next batch. */ - nextBatchConfTarget: number; - /** - * The fee rate, in satoshis per kiloweight, estimated to use for the next - * batch. - */ - nextBatchFeeRateSatPerKw: string; - /** - * The absolute unix timestamp at which the auctioneer will attempt to clear - * the next batch. - */ - nextBatchClearTimestamp: string; - /** - * The set of lease durations the market is currently accepting and the state - * the duration buckets currently are in. - */ - leaseDurationBuckets: { [key: number]: DurationBucketState }; - /** - * The value used by the auctioneer to determine if an account expiry height - * needs to be extended after participating in a batch and for how long. - */ - autoRenewExtensionBlocks: number; -} - -export interface TermsResponse_LeaseDurationsEntry { - key: number; - value: boolean; -} - -export interface TermsResponse_LeaseDurationBucketsEntry { - key: number; - value: DurationBucketState; -} - -export interface RelevantBatchRequest { - /** The unique identifier of the batch. */ - id: Uint8Array | string; - /** - * The set of accounts the trader is interested in retrieving information - * for within the batch. Each account is identified by its trader key. - */ - accounts: Uint8Array | string[]; -} - -export interface RelevantBatch { - /** The version of the batch. */ - version: number; - /** The unique identifier of the batch. */ - id: Uint8Array | string; - /** - * The set of modifications that should be applied to the requested accounts as - * a result of this batch. - */ - chargedAccounts: AccountDiff[]; - /** - * Deprecated, use matched_markets. - * - * @deprecated - */ - matchedOrders: { [key: string]: MatchedOrder }; - /** - * Deprecated, use matched_markets. - * - * @deprecated - */ - clearingPriceRate: number; - /** The fee parameters used to calculate the execution fees. */ - executionFee: ExecutionFee | undefined; - /** The batch transaction including all witness data. */ - transaction: Uint8Array | string; - /** - * Fee rate of the batch transaction, expressed in satoshis per 1000 weight - * units (sat/kW). - */ - feeRateSatPerKw: string; - /** The unix timestamp in nanoseconds the batch was made. */ - creationTimestampNs: string; - /** - * Maps the distinct lease duration markets to the orders that were matched - * within and the discovered market clearing price. - */ - matchedMarkets: { [key: number]: MatchedMarket }; -} - -export interface RelevantBatch_MatchedOrdersEntry { - key: string; - value: MatchedOrder | undefined; -} - -export interface RelevantBatch_MatchedMarketsEntry { - key: number; - value: MatchedMarket | undefined; -} - -export interface ExecutionFee { - /** The base fee in satoshis charged per order, regardless of the matched size. */ - baseFee: string; - /** The fee rate in parts per million. */ - feeRate: string; -} - -export interface NodeAddress { - network: string; - addr: string; -} - -export interface OutPoint { - /** Raw bytes representing the transaction id. */ - txid: Uint8Array | string; - /** The index of the output on the transaction. */ - outputIndex: number; -} - -export interface AskSnapshot { - /** The version of the order. */ - version: number; - /** The period of time the channel will survive for. */ - leaseDurationBlocks: number; - /** The true bid price of the order in parts per billion. */ - rateFixed: number; - /** The channel type to be created. */ - chanType: OrderChannelType; -} - -export interface BidSnapshot { - /** The version of the order. */ - version: number; - /** The period of time the matched channel should be allocated for. */ - leaseDurationBlocks: number; - /** The true bid price of the order in parts per billion. */ - rateFixed: number; - /** The channel type to be created. */ - chanType: OrderChannelType; -} - -export interface MatchedOrderSnapshot { - /** The full ask order that was matched. */ - ask: AskSnapshot | undefined; - /** The full bid order that was matched. */ - bid: BidSnapshot | undefined; - /** The fixed rate premium that was matched, expressed in parts-ber-billion. */ - matchingRate: number; - /** The total number of satoshis that were bought. */ - totalSatsCleared: string; - /** The total number of units that were matched. */ - unitsMatched: number; -} - -export interface BatchSnapshotRequest { - /** The unique identifier of the batch encoded as a compressed pubkey. */ - batchId: Uint8Array | string; -} - -export interface MatchedMarketSnapshot { - /** The set of all orders matched in the batch. */ - matchedOrders: MatchedOrderSnapshot[]; - /** - * The uniform clearing price rate in parts per billion that was used for this - * batch. - */ - clearingPriceRate: number; -} - -export interface BatchSnapshotResponse { - /** The version of the batch. */ - version: number; - /** The unique identifier of the batch. */ - batchId: Uint8Array | string; - /** The unique identifier of the prior batch. */ - prevBatchId: Uint8Array | string; - /** - * Deprecated, use matched_markets. - * - * @deprecated - */ - clearingPriceRate: number; - /** - * Deprecated, use matched_markets. - * - * @deprecated - */ - matchedOrders: MatchedOrderSnapshot[]; - /** The txid of the batch transaction. */ - batchTxId: string; - /** The batch transaction including all witness data. */ - batchTx: Uint8Array | string; - /** The fee rate, in satoshis per kiloweight, of the batch transaction. */ - batchTxFeeRateSatPerKw: string; - /** The unix timestamp in nanoseconds the batch was made. */ - creationTimestampNs: string; - /** - * Maps the distinct lease duration markets to the orders that were matched - * within and the discovered market clearing price. - */ - matchedMarkets: { [key: number]: MatchedMarketSnapshot }; -} - -export interface BatchSnapshotResponse_MatchedMarketsEntry { - key: number; - value: MatchedMarketSnapshot | undefined; -} - -export interface ServerNodeRatingRequest { - /** The target node to obtain ratings information for. */ - nodePubkeys: Uint8Array | string[]; -} - -export interface NodeRating { - /** The pubkey for the node these ratings belong to. */ - nodePubkey: Uint8Array | string; - /** The tier of the target node. */ - nodeTier: NodeTier; -} - -export interface ServerNodeRatingResponse { - /** A series of node ratings for each of the queried nodes. */ - nodeRatings: NodeRating[]; -} - -export interface BatchSnapshotsRequest { - /** - * The unique identifier of the first batch to return, encoded as a compressed - * pubkey. This represents the newest/most current batch to fetch. If this is - * empty or a zero batch ID, the most recent finalized batch is used as the - * starting point to go back from. - */ - startBatchId: Uint8Array | string; - /** The number of batches to return at most, including the start batch. */ - numBatchesBack: number; -} - -export interface BatchSnapshotsResponse { - /** The list of batches requested. */ - batches: BatchSnapshotResponse[]; -} - -export interface MarketInfoRequest {} - -export interface MarketInfo { - /** The number of open/pending ask orders per node tier. */ - numAsks: MarketInfo_TierValue[]; - /** The number of open/pending bid orders per node tier. */ - numBids: MarketInfo_TierValue[]; - /** - * The total number of open/unmatched units in open/pending ask orders per node - * tier. - */ - askOpenInterestUnits: MarketInfo_TierValue[]; - /** - * The total number of open/unmatched units in open/pending bid orders per node - * tier. - */ - bidOpenInterestUnits: MarketInfo_TierValue[]; -} - -export interface MarketInfo_TierValue { - tier: NodeTier; - value: number; -} - -export interface MarketInfoResponse { - /** - * A map of all markets identified by their lease duration and the current - * set of statistics. - */ - markets: { [key: number]: MarketInfo }; -} - -export interface MarketInfoResponse_MarketsEntry { - key: number; - value: MarketInfo | undefined; -} - -export interface ChannelAuctioneer { - reserveAccount( - request?: DeepPartial - ): Promise; - initAccount( - request?: DeepPartial - ): Promise; - modifyAccount( - request?: DeepPartial - ): Promise; - submitOrder( - request?: DeepPartial - ): Promise; - cancelOrder( - request?: DeepPartial - ): Promise; - orderState( - request?: DeepPartial - ): Promise; - subscribeBatchAuction( - request?: DeepPartial, - onMessage?: (msg: ServerAuctionMessage) => void, - onError?: (err: Error) => void - ): void; - subscribeSidecar( - request?: DeepPartial, - onMessage?: (msg: ServerAuctionMessage) => void, - onError?: (err: Error) => void - ): void; - terms(request?: DeepPartial): Promise; - relevantBatchSnapshot( - request?: DeepPartial - ): Promise; - batchSnapshot( - request?: DeepPartial - ): Promise; - nodeRating( - request?: DeepPartial - ): Promise; - batchSnapshots( - request?: DeepPartial - ): Promise; - marketInfo( - request?: DeepPartial - ): Promise; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/pool/auctioneerrpc/hashmail.ts b/lib/types/proto/pool/auctioneerrpc/hashmail.ts deleted file mode 100644 index b7764fa..0000000 --- a/lib/types/proto/pool/auctioneerrpc/hashmail.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* eslint-disable */ - -export interface PoolAccountAuth { - /** The account key being used to authenticate. */ - acctKey: Uint8Array | string; - /** A valid signature over the stream ID being used. */ - streamSig: Uint8Array | string; -} - -export interface SidecarAuth { - /** - * A valid sidecar ticket that has been signed (offered) by a Pool account in - * the active state. - */ - ticket: string; -} - -export interface CipherBoxAuth { - /** A description of the stream one is attempting to initialize. */ - desc: CipherBoxDesc | undefined; - acctAuth: PoolAccountAuth | undefined; - sidecarAuth: SidecarAuth | undefined; -} - -export interface DelCipherBoxResp {} - -/** TODO(roasbeef): payment request, node key, etc, etc */ -export interface CipherChallenge {} - -export interface CipherError {} - -export interface CipherSuccess { - desc: CipherBoxDesc | undefined; -} - -export interface CipherInitResp { - /** - * CipherSuccess is returned if the initialization of the cipher box was - * successful. - */ - success: CipherSuccess | undefined; - /** - * CipherChallenge is returned if the authentication mechanism was revoked - * or needs to be refreshed. - */ - challenge: CipherChallenge | undefined; - /** - * CipherError is returned if the authentication mechanism failed to - * validate. - */ - error: CipherError | undefined; -} - -export interface CipherBoxDesc { - streamId: Uint8Array | string; -} - -export interface CipherBox { - desc: CipherBoxDesc | undefined; - msg: Uint8Array | string; -} - -/** - * HashMail exposes a simple synchronous network stream that can be used for - * various types of synchronization and coordination. The service allows - * authenticated users to create a simplex stream call a cipher box. Once the - * stream is created, any user that knows of the stream ID can read/write from - * the stream, but only a single user can be on either side at a time. - */ -export interface HashMail { - /** - * NewCipherBox creates a new cipher box pipe/stream given a valid - * authentication mechanism. If the authentication mechanism has been revoked, - * or needs to be changed, then a CipherChallenge message is returned. - * Otherwise the method will either be accepted or rejected. - */ - newCipherBox(request?: DeepPartial): Promise; - /** - * DelCipherBox attempts to tear down an existing cipher box pipe. The same - * authentication mechanism used to initially create the stream MUST be - * specified. - */ - delCipherBox( - request?: DeepPartial - ): Promise; - /** - * SendStream opens up the write side of the passed CipherBox pipe. Writes - * will be non-blocking up to the buffer size of the pipe. Beyond that writes - * will block until completed. - */ - sendStream(request?: DeepPartial): Promise; - /** - * RecvStream opens up the read side of the passed CipherBox pipe. This method - * will block until a full message has been read as this is a message based - * pipe/stream abstraction. - */ - recvStream( - request?: DeepPartial, - onMessage?: (msg: CipherBox) => void, - onError?: (err: Error) => void - ): void; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/pool/trader.ts b/lib/types/proto/pool/trader.ts deleted file mode 100644 index 0ac8923..0000000 --- a/lib/types/proto/pool/trader.ts +++ /dev/null @@ -1,1223 +0,0 @@ -/* eslint-disable */ -import type { - OrderState, - OrderChannelType, - NodeTier, - DurationBucketState, - OutPoint, - InvalidOrder, - ExecutionFee, - NodeRating, - MarketInfo, - BatchSnapshotResponse, - BatchSnapshotsResponse, - BatchSnapshotRequest, - BatchSnapshotsRequest -} from './auctioneerrpc/auctioneer'; - -export enum AccountState { - /** PENDING_OPEN - The state of an account when it is pending its confirmation on-chain. */ - PENDING_OPEN = 'PENDING_OPEN', - /** - * PENDING_UPDATE - The state of an account when it has undergone an update on-chain either as - * part of a matched order or a trader modification and it is pending its - * confirmation on-chain. - */ - PENDING_UPDATE = 'PENDING_UPDATE', - /** OPEN - The state of an account once it has confirmed on-chain. */ - OPEN = 'OPEN', - /** - * EXPIRED - The state of an account once its expiration has been reached and its closing - * transaction has confirmed. - */ - EXPIRED = 'EXPIRED', - /** - * PENDING_CLOSED - The state of an account when we're waiting for the closing transaction of - * an account to confirm that required cooperation with the auctioneer. - */ - PENDING_CLOSED = 'PENDING_CLOSED', - /** CLOSED - The state of an account once its closing transaction has confirmed. */ - CLOSED = 'CLOSED', - /** - * RECOVERY_FAILED - The state of an account that indicates that the account was attempted to be - * recovered but failed because the opening transaction wasn't found by lnd. - * This could be because it was never published or it never confirmed. Then the - * funds are SAFU and the account can be considered to never have been opened - * in the first place. - */ - RECOVERY_FAILED = 'RECOVERY_FAILED', - /** PENDING_BATCH - The account has recently participated in a batch and is not yet confirmed. */ - PENDING_BATCH = 'PENDING_BATCH', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum MatchState { - /** PREPARE - The OrderMatchPrepare message from the auctioneer was received initially. */ - PREPARE = 'PREPARE', - /** - * ACCEPTED - The OrderMatchPrepare message from the auctioneer was processed successfully - * and the batch was accepted. - */ - ACCEPTED = 'ACCEPTED', - /** - * REJECTED - The order was rejected by the trader daemon, either as an answer to a - * OrderMatchSignBegin or OrderMatchFinalize message from the auctioneer. - */ - REJECTED = 'REJECTED', - /** - * SIGNED - The OrderMatchSignBegin message from the auctioneer was processed - * successfully. - */ - SIGNED = 'SIGNED', - /** - * FINALIZED - The OrderMatchFinalize message from the auctioneer was processed - * successfully. - */ - FINALIZED = 'FINALIZED', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export enum MatchRejectReason { - /** NONE - No reject occurred, this is the default value. */ - NONE = 'NONE', - /** - * SERVER_MISBEHAVIOR - The client didn't come up with the same result as the server and is - * rejecting the batch because of that. - */ - SERVER_MISBEHAVIOR = 'SERVER_MISBEHAVIOR', - /** - * BATCH_VERSION_MISMATCH - The client doesn't support the current batch verification version the - * server is using. - */ - BATCH_VERSION_MISMATCH = 'BATCH_VERSION_MISMATCH', - /** - * PARTIAL_REJECT_COLLATERAL - The client rejects some of the orders, not the full batch. This reason is - * set on matches for orders that were in the same batch as partial reject ones - * but were not themselves rejected. - */ - PARTIAL_REJECT_COLLATERAL = 'PARTIAL_REJECT_COLLATERAL', - /** - * PARTIAL_REJECT_DUPLICATE_PEER - The trader's client has a preference to only match orders with peers it - * doesn't already have channels with. The order that is rejected with this - * reason type comes from a peer that the trader already has channels with. - */ - PARTIAL_REJECT_DUPLICATE_PEER = 'PARTIAL_REJECT_DUPLICATE_PEER', - /** - * PARTIAL_REJECT_CHANNEL_FUNDING_FAILED - The trader's client couldn't connect to the remote node of the matched - * order or the channel funding could not be initialized for another - * reason. This could also be the rejecting node's fault if their - * connection is not stable. Using this code can have a negative impact on - * the reputation score of both nodes, depending on the number of errors - * recorded. - */ - PARTIAL_REJECT_CHANNEL_FUNDING_FAILED = 'PARTIAL_REJECT_CHANNEL_FUNDING_FAILED', - UNRECOGNIZED = 'UNRECOGNIZED' -} - -export interface InitAccountRequest { - accountValue: string; - absoluteHeight: number | undefined; - relativeHeight: number | undefined; - /** The target number of blocks that the transaction should be confirmed in. */ - confTarget: number | undefined; - /** - * The fee rate, in satoshis per kw, to use for the initial funding - * transaction. - */ - feeRateSatPerKw: string | undefined; - /** - * An optional identification string that will be appended to the user agent - * string sent to the server to give information about the usage of pool. This - * initiator part is meant for user interfaces to add their name to give the - * full picture of the binary used (poold, LiT) and the method used for opening - * the account (pool CLI, LiT UI, other 3rd party UI). - */ - initiator: string; -} - -export interface QuoteAccountRequest { - accountValue: string; - /** The target number of blocks that the transaction should be confirmed in. */ - confTarget: number | undefined; -} - -export interface QuoteAccountResponse { - minerFeeRateSatPerKw: string; - minerFeeTotal: string; -} - -export interface ListAccountsRequest { - /** Only list accounts that are still active. */ - activeOnly: boolean; -} - -export interface ListAccountsResponse { - accounts: Account[]; -} - -export interface Output { - /** The value, in satoshis, of the output. */ - valueSat: string; - /** The address corresponding to the output. */ - address: string; -} - -export interface OutputWithFee { - /** The address corresponding to the output. */ - address: string; - /** The target number of blocks that the transaction should be confirmed in. */ - confTarget: number | undefined; - /** The fee rate, in satoshis per kw, to use for the withdrawal transaction. */ - feeRateSatPerKw: string | undefined; -} - -export interface OutputsWithImplicitFee { - outputs: Output[]; -} - -export interface CloseAccountRequest { - /** The trader key associated with the account that will be closed. */ - traderKey: Uint8Array | string; - /** - * A single output/address to which the remaining funds of the account will - * be sent to at the specified fee. If an address is not specified, then - * the funds are sent to an address the backing lnd node controls. - */ - outputWithFee: OutputWithFee | undefined; - /** - * The outputs to which the remaining funds of the account will be sent to. - * This should only be used when wanting to create two or more outputs, - * otherwise OutputWithFee should be used instead. The fee of the account's - * closing transaction is implicitly defined by the combined value of all - * outputs. - */ - outputs: OutputsWithImplicitFee | undefined; -} - -export interface CloseAccountResponse { - /** The hash of the closing transaction. */ - closeTxid: Uint8Array | string; -} - -export interface WithdrawAccountRequest { - /** - * The trader key associated with the account that funds will be withdrawed - * from. - */ - traderKey: Uint8Array | string; - /** The outputs we'll withdraw funds from the account into. */ - outputs: Output[]; - /** The fee rate, in satoshis per kw, to use for the withdrawal transaction. */ - feeRateSatPerKw: string; - /** The new absolute expiration height of the account. */ - absoluteExpiry: number | undefined; - /** The new relative expiration height of the account. */ - relativeExpiry: number | undefined; -} - -export interface WithdrawAccountResponse { - /** The state of the account after processing the withdrawal. */ - account: Account | undefined; - /** The transaction used to withdraw funds from the account. */ - withdrawTxid: Uint8Array | string; -} - -export interface DepositAccountRequest { - /** - * The trader key associated with the account that funds will be deposited - * into. - */ - traderKey: Uint8Array | string; - /** The amount in satoshis to deposit into the account. */ - amountSat: string; - /** The fee rate, in satoshis per kw, to use for the deposit transaction. */ - feeRateSatPerKw: string; - /** The new absolute expiration height of the account. */ - absoluteExpiry: number | undefined; - /** The new relative expiration height of the account. */ - relativeExpiry: number | undefined; -} - -export interface DepositAccountResponse { - /** The state of the account after processing the deposit. */ - account: Account | undefined; - /** The transaction used to deposit funds into the account. */ - depositTxid: Uint8Array | string; -} - -export interface RenewAccountRequest { - /** The key associated with the account to renew. */ - accountKey: Uint8Array | string; - /** The new absolute expiration height of the account. */ - absoluteExpiry: number | undefined; - /** The new relative expiration height of the account. */ - relativeExpiry: number | undefined; - /** The fee rate, in satoshis per kw, to use for the renewal transaction. */ - feeRateSatPerKw: string; -} - -export interface RenewAccountResponse { - /** The state of the account after processing the renewal. */ - account: Account | undefined; - /** The transaction used to renew the expiration of the account. */ - renewalTxid: Uint8Array | string; -} - -export interface BumpAccountFeeRequest { - /** The trader key associated with the account that will have its fee bumped. */ - traderKey: Uint8Array | string; - /** - * The new fee rate, in satoshis per kw, to use for the child of the account - * transaction. - */ - feeRateSatPerKw: string; -} - -export interface BumpAccountFeeResponse {} - -export interface Account { - /** - * The identifying component of an account. This is the key used for the trader - * in the 2-of-2 multi-sig construction of an account with an auctioneer. - */ - traderKey: Uint8Array | string; - /** - * The current outpoint associated with the account. This will change every - * time the account has been updated. - */ - outpoint: OutPoint | undefined; - /** The current total amount of satoshis in the account. */ - value: string; - /** - * The amount of satoshis in the account that is available, meaning not - * allocated to any oustanding orders. - */ - availableBalance: string; - /** The height at which the account will expire. */ - expirationHeight: number; - /** The current state of the account. */ - state: AccountState; - /** The hash of the account's latest transaction. */ - latestTxid: Uint8Array | string; -} - -export interface SubmitOrderRequest { - ask: Ask | undefined; - bid: Bid | undefined; - /** - * An optional identification string that will be appended to the user agent - * string sent to the server to give information about the usage of pool. This - * initiator part is meant for user interfaces to add their name to give the - * full picture of the binary used (poold, LiT) and the method used for - * submitting the order (pool CLI, LiT UI, other 3rd party UI). - */ - initiator: string; -} - -export interface SubmitOrderResponse { - /** Order failed with the given reason. */ - invalidOrder: InvalidOrder | undefined; - /** The order nonce of the accepted order. */ - acceptedOrderNonce: Uint8Array | string | undefined; - /** - * In case a bid order was submitted for a sidecar ticket, that ticket is - * updated with the new state and bid order nonce. - */ - updatedSidecarTicket: string; -} - -export interface ListOrdersRequest { - /** - * Can be set to true to list the orders including all events, which can be - * very verbose. - */ - verbose: boolean; - /** Only list orders that are still active. */ - activeOnly: boolean; -} - -export interface ListOrdersResponse { - asks: Ask[]; - bids: Bid[]; -} - -export interface CancelOrderRequest { - orderNonce: Uint8Array | string; -} - -export interface CancelOrderResponse {} - -export interface Order { - /** The trader's account key of the account that is used for the order. */ - traderKey: Uint8Array | string; - /** Fixed order rate in parts per billion. */ - rateFixed: number; - /** Order amount in satoshis. */ - amt: string; - /** - * Maximum fee rate the trader is willing to pay for the batch transaction, - * expressed in satoshis per 1000 weight units (sat/KW). - */ - maxBatchFeeRateSatPerKw: string; - /** Order nonce, acts as unique order identifier. */ - orderNonce: Uint8Array | string; - /** The state the order currently is in. */ - state: OrderState; - /** The number of order units the amount corresponds to. */ - units: number; - /** - * The number of currently unfilled units of this order. This will be equal to - * the total amount of units until the order has reached the state PARTIAL_FILL - * or EXECUTED. - */ - unitsUnfulfilled: number; - /** - * The value reserved from the account by this order to ensure the account - * can pay execution and chain fees in case it gets matched. - */ - reservedValueSat: string; - /** The unix timestamp in nanoseconds the order was first created/submitted. */ - creationTimestampNs: string; - /** - * A list of events that were emitted for this order. This field is only set - * when the verbose flag is set to true in the request. - */ - events: OrderEvent[]; - /** The minimum number of order units that must be matched per order pair. */ - minUnitsMatch: number; - /** The channel type to use for the resulting matched channels. */ - channelType: OrderChannelType; - /** - * List of nodes that will be allowed to match with our order. Incompatible - * with the `not_allowed_node_ids` field. - */ - allowedNodeIds: Uint8Array | string[]; - /** - * List of nodes that won't be allowed to match with our order. Incompatible - * with the `allowed_node_ids` field. - */ - notAllowedNodeIds: Uint8Array | string[]; -} - -export interface Bid { - /** The common fields shared between both ask and bid order types. */ - details: Order | undefined; - /** - * Required number of blocks that a channel opened as a result of this bid - * should be kept open. - */ - leaseDurationBlocks: number; - /** - * The version of the order format that is used. Will be increased once new - * features are added. - */ - version: number; - /** - * The minimum node tier this order should be matched with. Only asks backed by - * a node this tier or higher will be eligible for matching with this bid. - */ - minNodeTier: NodeTier; - /** - * Give the incoming channel that results from this bid being matched an - * initial outbound balance by adding additional funds from the taker's account - * into the channel. As a simplification for the execution protocol and the - * channel reserve calculations, the self_chan_balance can be at most the same - * as the order amount and the min_chan_amt must be set to the full order - * amount. - */ - selfChanBalance: string; - /** - * If this bid order is meant to lease a channel for another node (which is - * dubbed a "sidecar channel") then this ticket contains all information - * required for setting up that sidecar channel. The ticket is expected to be - * the base58 encoded ticket, including the prefix and the checksum. - */ - sidecarTicket: string; -} - -export interface Ask { - /** The common fields shared between both ask and bid order types. */ - details: Order | undefined; - /** - * The number of blocks the liquidity provider is willing to provide the - * channel funds for. - */ - leaseDurationBlocks: number; - /** - * The version of the order format that is used. Will be increased once new - * features are added. - */ - version: number; -} - -export interface QuoteOrderRequest { - /** Order amount in satoshis. */ - amt: string; - /** Fixed order rate in parts per billion. */ - rateFixed: number; - /** - * Required number of blocks that a channel opened as a result of this bid - * should be kept open. - */ - leaseDurationBlocks: number; - /** - * Maximum fee rate the trader is willing to pay for the batch transaction, - * expressed in satoshis per 1000 weight units (sat/KW). - */ - maxBatchFeeRateSatPerKw: string; - /** The minimum number of order units that must be matched per order pair. */ - minUnitsMatch: number; -} - -export interface QuoteOrderResponse { - /** - * The total order premium in satoshis for filling the entire order. This - * represents the interest amount paid to the maker by the taker excluding any - * execution or chain fees. - */ - totalPremiumSat: string; - /** The fixed order rate expressed as a fraction instead of parts per billion. */ - ratePerBlock: number; - /** The fixed order rate expressed as a percentage instead of parts per billion. */ - ratePercent: number; - /** - * The total execution fee in satoshis that needs to be paid to the auctioneer - * for executing the entire order. - */ - totalExecutionFeeSat: string; - /** - * The worst case chain fees that need to be paid if fee rates spike up to the - * max_batch_fee_rate_sat_per_kw value specified in the request. This value is - * highly dependent on the min_units_match parameter as well since the - * calculation assumes chain fees for the chain footprint of opening - * amt/min_units_match channels (hence worst case calculation). - */ - worstCaseChainFeeSat: string; -} - -export interface OrderEvent { - /** - * The unix timestamp in nanoseconds the event was emitted at. This is the - * primary key of the event and is unique across the database. - */ - timestampNs: string; - /** The human readable representation of the event. */ - eventStr: string; - /** The order was updated in the database. */ - stateChange: UpdatedEvent | undefined; - /** The order was involved in a match making attempt. */ - matched: MatchEvent | undefined; -} - -export interface UpdatedEvent { - /** - * The state of the order previous to the change. This is what the state - * changed from. - */ - previousState: OrderState; - /** - * The new state of the order after the change. This is what the state changed - * to. - */ - newState: OrderState; - /** The units that were filled at the time of the event. */ - unitsFilled: number; -} - -export interface MatchEvent { - /** The state of the match making process the order went through. */ - matchState: MatchState; - /** The number of units that would be (or were) filled with this match. */ - unitsFilled: number; - /** The nonce of the order we were matched to. */ - matchedOrder: Uint8Array | string; - /** - * The reason why the trader daemon rejected the order. Is only set if - * match_state is set to REJECTED. - */ - rejectReason: MatchRejectReason; -} - -export interface RecoverAccountsRequest { - /** - * Recover the latest account states without interacting with the - * Lightning Labs server. - */ - fullClient: boolean; - /** - * Number of accounts that we are trying to recover. Used during the - * full_client recovery process. - */ - accountTarget: number; - /** - * Auctioneer's public key. Used during the full_client recovery process. - * This field should be left empty for testnet/mainnet, its value is already - * hardcoded in our codebase. - */ - auctioneerKey: string; - /** - * Initial block height. We won't try to look for any account with an expiry - * height smaller than this value. Used during the full_client recovery - * process. - */ - heightHint: number; - /** - * bitcoind/btcd instance address. Used during the full_client recovery - * process. - */ - bitcoinHost: string; - /** - * bitcoind/btcd user name. Used during the full_client recovery - * process. - */ - bitcoinUser: string; - /** - * bitcoind/btcd password. Used during the full_client recovery - * process. - */ - bitcoinPassword: string; - /** - * Use HTTP POST mode? bitcoind only supports this mode. Used during the - * full_client recovery process. - */ - bitcoinHttppostmode: boolean; - /** - * Use TLS to connect? bitcoind only supports non-TLS connections. Used - * during the full_client recovery process. - */ - bitcoinUsetls: boolean; - /** - * Path to btcd's TLS certificate, if TLS is enabled. Used during the - * full_client recovery process. - */ - bitcoinTlspath: string; -} - -export interface RecoverAccountsResponse { - /** The number of accounts that were recovered. */ - numRecoveredAccounts: number; -} - -export interface AuctionFeeRequest {} - -export interface AuctionFeeResponse { - /** The execution fee charged per matched order. */ - executionFee: ExecutionFee | undefined; -} - -export interface Lease { - /** The outpoint of the channel created. */ - channelPoint: OutPoint | undefined; - /** The amount, in satoshis, of the channel created. */ - channelAmtSat: string; - /** The intended duration, in blocks, of the channel created. */ - channelDurationBlocks: number; - /** The absolute height that this channel lease expires. */ - channelLeaseExpiry: number; - /** The premium, in satoshis, either paid or received for the offered liquidity. */ - premiumSat: string; - /** - * The execution fee, in satoshis, charged by the auctioneer for the channel - * created. - */ - executionFeeSat: string; - /** - * The fee, in satoshis, charged by the auctioneer for the batch execution - * transaction that created this lease. - */ - chainFeeSat: string; - /** - * The actual fixed rate expressed in parts per billionth this lease was - * bought/sold at. - */ - clearingRatePrice: string; - /** - * The actual fixed rate of the bid/ask, this should always be 'better' than - * the clearing_rate_price. - */ - orderFixedRate: string; - /** The order executed that resulted in the channel created. */ - orderNonce: Uint8Array | string; - /** - * The unique identifier for the order that was matched with that resulted - * in the channel created. - */ - matchedOrderNonce: Uint8Array | string; - /** Whether this channel was purchased from another trader or not. */ - purchased: boolean; - /** The pubkey of the node that this channel was bought/sold from. */ - channelRemoteNodeKey: Uint8Array | string; - /** The tier of the node that this channel was bought/sold from. */ - channelNodeTier: NodeTier; - /** The self channel balance that was pushed to the recipient. */ - selfChanBalance: string; - /** Whether the channel was leased as a sidecar channel (bid orders only). */ - sidecarChannel: boolean; -} - -export interface LeasesRequest { - /** - * An optional list of batches to retrieve the leases of. If empty, leases - * throughout all batches are returned. - */ - batchIds: Uint8Array | string[]; - /** - * An optional list of accounts to retrieve the leases of. If empty, leases - * for all accounts are returned. - */ - accounts: Uint8Array | string[]; -} - -export interface LeasesResponse { - /** The relevant list of leases purchased or sold within the auction. */ - leases: Lease[]; - /** The total amount of satoshis earned from the leases returned. */ - totalAmtEarnedSat: string; - /** The total amount of satoshis paid for the leases returned. */ - totalAmtPaidSat: string; -} - -export interface TokensRequest {} - -export interface TokensResponse { - /** List of all tokens the daemon knows of, including old/expired tokens. */ - tokens: LsatToken[]; -} - -export interface LsatToken { - /** The base macaroon that was baked by the auth server. */ - baseMacaroon: Uint8Array | string; - /** The payment hash of the payment that was paid to obtain the token. */ - paymentHash: Uint8Array | string; - /** - * The preimage of the payment hash, knowledge of this is proof that the - * payment has been paid. If the preimage is set to all zeros, this means the - * payment is still pending and the token is not yet fully valid. - */ - paymentPreimage: Uint8Array | string; - /** The amount of millisatoshis that was paid to get the token. */ - amountPaidMsat: string; - /** The amount of millisatoshis paid in routing fee to pay for the token. */ - routingFeePaidMsat: string; - /** The creation time of the token as UNIX timestamp in seconds. */ - timeCreated: string; - /** Indicates whether the token is expired or still valid. */ - expired: boolean; - /** - * Identifying attribute of this token in the store. Currently represents the - * file name of the token where it's stored on the file system. - */ - storageName: string; -} - -export interface LeaseDurationRequest {} - -export interface LeaseDurationResponse { - /** - * Deprecated, use lease_duration_buckets. - * - * @deprecated - */ - leaseDurations: { [key: number]: boolean }; - /** - * The set of lease durations the market is currently accepting and the state - * the duration buckets currently are in. - */ - leaseDurationBuckets: { [key: number]: DurationBucketState }; -} - -export interface LeaseDurationResponse_LeaseDurationsEntry { - key: number; - value: boolean; -} - -export interface LeaseDurationResponse_LeaseDurationBucketsEntry { - key: number; - value: DurationBucketState; -} - -export interface NextBatchInfoRequest {} - -export interface NextBatchInfoResponse { - /** - * The confirmation target the auctioneer will use for fee estimation of the - * next batch. - */ - confTarget: number; - /** - * The fee rate, in satoshis per kiloweight, estimated by the auctioneer to use - * for the next batch. - */ - feeRateSatPerKw: string; - /** - * The absolute unix timestamp in seconds at which the auctioneer will attempt - * to clear the next batch. - */ - clearTimestamp: string; - /** - * The value used by the auctioneer to determine if an account expiry height - * needs to be extended after participating in a batch and for how long. - */ - autoRenewExtensionBlocks: number; -} - -export interface NodeRatingRequest { - /** The target node to obtain ratings information for. */ - nodePubkeys: Uint8Array | string[]; -} - -export interface NodeRatingResponse { - /** A series of node ratings for each of the queried nodes. */ - nodeRatings: NodeRating[]; -} - -export interface GetInfoRequest {} - -export interface GetInfoResponse { - /** The version of the Pool daemon that is running. */ - version: string; - /** The total number of accounts in the local database. */ - accountsTotal: number; - /** - * The total number of accounts that are in an active, non-archived state, - * including expired accounts. - */ - accountsActive: number; - /** The total number of accounts that are active but have expired. */ - accountsActiveExpired: number; - /** The total number of accounts that are in an archived/closed state. */ - accountsArchived: number; - /** The total number of orders in the local database. */ - ordersTotal: number; - /** - * The total number of active/pending orders that are still waiting for - * execution. - */ - ordersActive: number; - /** The total number of orders that have been archived. */ - ordersArchived: number; - /** The current block height as seen by the connected lnd node. */ - currentBlockHeight: number; - /** The number of batches an account of this node was ever involved in. */ - batchesInvolved: number; - /** Our lnd node's rating as judged by the auctioneer server. */ - nodeRating: NodeRating | undefined; - /** The number of available LSAT tokens. */ - lsatTokens: number; - /** - * Indicates whether there is an active subscription connection to the - * auctioneer. This will never be true if there is no active account. If there - * are active accounts, this value represents the network connection status to - * the auctioneer server. - */ - subscribedToAuctioneer: boolean; - /** - * Indicates whether the global `--newnodesonly` command line flag or - * `newnodesonly=true` configuration parameter was set on the Pool trader - * daemon. - */ - newNodesOnly: boolean; - /** - * A map of all markets identified by their lease duration and the current - * set of statistics such as number of open orders and total units of open - * interest. - */ - marketInfo: { [key: number]: MarketInfo }; -} - -export interface GetInfoResponse_MarketInfoEntry { - key: number; - value: MarketInfo | undefined; -} - -export interface StopDaemonRequest {} - -export interface StopDaemonResponse {} - -export interface OfferSidecarRequest { - /** - * If false, then only the trader_key, unit, self_chan_balance, and - * lease_duration_blocks need to be set in the bid below. Otherwise, the - * fields as they're set when submitting a bid need to be filled in. - */ - autoNegotiate: boolean; - /** - * The bid template that will be used to populate the initial sidecar ticket - * as well as auto negotiate the remainig steps of the sidecar channel if - * needed. - */ - bid: Bid | undefined; -} - -export interface SidecarTicket { - /** - * The complete sidecar ticket in its string encoded form which is base58 - * encoded, has a human readable prefix ('sidecar...') and a checksum built in. - * The string encoded version will only be used on the trader side of the API. - * All requests to the auctioneer expect the ticket to be in its raw, tlv - * encoded byte form. - */ - ticket: string; -} - -export interface DecodedSidecarTicket { - /** The unique, pseudorandom identifier of the ticket. */ - id: Uint8Array | string; - /** The version of the ticket encoding format. */ - version: number; - /** The state of the ticket. */ - state: string; - /** The offered channel capacity in satoshis. */ - offerCapacity: string; - /** The offered push amount in satoshis. */ - offerPushAmount: string; - /** The offered lease duration in blocks. */ - offerLeaseDurationBlocks: number; - /** The public key the offer was signed with. */ - offerSignPubkey: Uint8Array | string; - /** The signature over the offer's digest. */ - offerSignature: Uint8Array | string; - /** Whether the offer was created with the automatic order creation flag. */ - offerAuto: boolean; - /** The recipient node's public identity key. */ - recipientNodePubkey: Uint8Array | string; - /** - * The recipient node's channel multisig public key to be used for the sidecar - * channel. - */ - recipientMultisigPubkey: Uint8Array | string; - /** The index used when deriving the above multisig pubkey. */ - recipientMultisigPubkeyIndex: number; - /** The nonce of the bid order created for this sidecar ticket. */ - orderBidNonce: Uint8Array | string; - /** - * The signature over the order's digest, signed with the private key that - * corresponds to the offer_sign_pubkey. - */ - orderSignature: Uint8Array | string; - /** The pending channel ID of the sidecar channel during the execution phase. */ - executionPendingChannelId: Uint8Array | string; - /** The original, base58 encoded ticket. */ - encodedTicket: string; -} - -export interface RegisterSidecarRequest { - /** - * The sidecar ticket to register and add the node and channel funding - * information to. The ticket must be in the state "offered". - */ - ticket: string; - /** - * If this value is True, then the daemon will attempt to finish negotiating - * the details of the sidecar channel automatically in the background. The - * progress of the ticket can be monitored using the SidecarState RPC. In - * addition, if this flag is set, then this method will _block_ until the - * sidecar negotiation either finishes or breaks down. - */ - autoNegotiate: boolean; -} - -export interface ExpectSidecarChannelRequest { - /** - * The sidecar ticket to expect an incoming channel for. The ticket must be in - * the state "ordered". - */ - ticket: string; -} - -export interface ExpectSidecarChannelResponse {} - -export interface ListSidecarsRequest { - /** - * The optional sidecar ID to filter for. If set, the result should either be - * a single ticket or no ticket in most cases. But because the ID is just 8 - * bytes and is randomly generated, there could be collisions, especially since - * tickets can also be crafted by a malicious party and given to any node. - * That's why the offer's public key is also used as an identifying element - * since that cannot easily be forged without also producing a valid signature. - * So an attacker cannot overwrite a ticket a node offered by themselves - * offering a ticket with the same ID and tricking the victim into registering - * that. Long story sort, there could be multiple tickets with the same ID but - * different offer public keys, which is why those keys should be checked as - * well. - */ - sidecarId: Uint8Array | string; -} - -export interface ListSidecarsResponse { - tickets: DecodedSidecarTicket[]; -} - -export interface CancelSidecarRequest { - sidecarId: Uint8Array | string; -} - -export interface CancelSidecarResponse {} - -export interface Trader { - /** - * pool: `getinfo` - * GetInfo returns general information about the state of the Pool trader - * daemon. - */ - getInfo(request?: DeepPartial): Promise; - /** - * pool: `stop` - * Stop gracefully shuts down the Pool trader daemon. - */ - stopDaemon( - request?: DeepPartial - ): Promise; - /** - * QuoteAccount gets a fee quote to fund an account of the given size with the - * given confirmation target. If the connected lnd wallet doesn't have enough - * balance to fund an account of the requested size, an error is returned. - */ - quoteAccount( - request?: DeepPartial - ): Promise; - /** - * pool: `accounts new` - * InitAccount creates a new account with the requested size and expiration, - * funding it from the wallet of the connected lnd node. - */ - initAccount(request?: DeepPartial): Promise; - /** - * pool: `accounts list` - * ListAccounts returns a list of all accounts known to the trader daemon and - * their current state. - */ - listAccounts( - request?: DeepPartial - ): Promise; - /** - * pool: `accounts close` - * CloseAccount closes an account and returns the funds locked in that account - * to the connected lnd node's wallet. - */ - closeAccount( - request?: DeepPartial - ): Promise; - /** - * pool: `accounts withdraw` - * WithdrawAccount splits off parts of the account balance into the specified - * outputs while recreating the account with a reduced balance. - */ - withdrawAccount( - request?: DeepPartial - ): Promise; - /** - * pool: `accounts deposit` - * DepositAccount adds more funds from the connected lnd node's wallet to an - * account. - */ - depositAccount( - request?: DeepPartial - ): Promise; - /** - * pool: `accounts renew` - * RenewAccount renews the expiration of an account. - */ - renewAccount( - request?: DeepPartial - ): Promise; - /** - * pool: `accounts bumpfee` - * BumpAccountFee attempts to bump the fee of an account's transaction through - * child-pays-for-parent (CPFP). Since the CPFP is performed through the - * backing lnd node, the account transaction must contain an output under its - * control for a successful bump. If a CPFP has already been performed for an - * account, and this RPC is invoked again, then a replacing transaction (RBF) - * of the child will be broadcast. - */ - bumpAccountFee( - request?: DeepPartial - ): Promise; - /** - * pool: `accounts recover` - * RecoverAccounts queries the auction server for this trader daemon's accounts - * in case we lost our local account database. - */ - recoverAccounts( - request?: DeepPartial - ): Promise; - /** - * pool: `orders submit` - * SubmitOrder creates a new ask or bid order and submits for the given account - * and submits it to the auction server for matching. - */ - submitOrder( - request?: DeepPartial - ): Promise; - /** - * pool: `orders list` - * ListOrders returns a list of all active and archived orders that are - * currently known to the trader daemon. - */ - listOrders( - request?: DeepPartial - ): Promise; - /** - * pool: `orders cancel` - * CancelOrder cancels an active order with the auction server to remove it - * from future matching. - */ - cancelOrder( - request?: DeepPartial - ): Promise; - /** - * QuoteOrder calculates the premium, execution fees and max batch fee rate for - * an order based on the given order parameters. - */ - quoteOrder( - request?: DeepPartial - ): Promise; - /** - * pool: `auction fee` - * AuctionFee returns the current auction order execution fee specified by the - * auction server. - */ - auctionFee( - request?: DeepPartial - ): Promise; - /** - * pool: `auction leasedurations` - * LeaseDurations returns the current set of valid lease duration in the - * market as is, and also information w.r.t if the market is currently active. - */ - leaseDurations( - request?: DeepPartial - ): Promise; - /** - * pool: `auction nextbatchinfo` - * NextBatchInfo returns information about the next batch the auctioneer will - * perform. - */ - nextBatchInfo( - request?: DeepPartial - ): Promise; - /** - * pool: `auction snapshot` - * BatchSnapshot returns the snapshot of a past batch identified by its ID. - * If no ID is provided, the snapshot of the last finalized batch is returned. - * Deprecated, use BatchSnapshots instead. - */ - batchSnapshot( - request?: DeepPartial - ): Promise; - /** - * pool: `listauth` - * GetLsatTokens returns all LSAT tokens the daemon ever paid for. - */ - getLsatTokens( - request?: DeepPartial - ): Promise; - /** - * pool: `auction leases` - * Leases returns the list of channels that were either purchased or sold by - * the trader within the auction. - */ - leases(request?: DeepPartial): Promise; - /** - * pool: `auction ratings` - * Returns the Node Tier information for this target Lightning node, and other - * related ranking information. - */ - nodeRatings( - request?: DeepPartial - ): Promise; - /** - * pool: `auction snapshot` - * BatchSnapshots returns a list of batch snapshots starting at the start batch - * ID and going back through the history of batches, returning at most the - * number of specified batches. A maximum of 100 snapshots can be queried in - * one call. If no start batch ID is provided, the most recent finalized batch - * is used as the starting point to go back from. - */ - batchSnapshots( - request?: DeepPartial - ): Promise; - /** - * pool: `sidecar offer` - * OfferSidecar is step 1/4 of the sidecar negotiation between the provider - * (the trader submitting the bid order) and the recipient (the trader - * receiving the sidecar channel). - * This step must be run by the provider. The result is a sidecar ticket with - * an offer to lease a sidecar channel for the recipient. The offer will be - * signed with the provider's lnd node public key. The ticket returned by this - * call will have the state "offered". - */ - offerSidecar( - request?: DeepPartial - ): Promise; - /** - * pool: `sidecar register` - * RegisterSidecarRequest is step 2/4 of the sidecar negotiation between the - * provider (the trader submitting the bid order) and the recipient (the trader - * receiving the sidecar channel). - * This step must be run by the recipient. The result is a sidecar ticket with - * the recipient's node information and channel funding multisig pubkey filled - * in. The ticket returned by this call will have the state "registered". - */ - registerSidecar( - request?: DeepPartial - ): Promise; - /** - * pool: `sidecar expectchannel` - * ExpectSidecarChannel is step 4/4 of the sidecar negotiation between the - * provider (the trader submitting the bid order) and the recipient (the trader - * receiving the sidecar channel). - * This step must be run by the recipient once the provider has submitted the - * bid order for the sidecar channel. From this point onwards the Pool trader - * daemon of both the provider as well as the recipient need to be online to - * receive and react to match making events from the server. - */ - expectSidecarChannel( - request?: DeepPartial - ): Promise; - /** - * pool: `sidecar printticket` - * Decodes the base58 encoded sidecar ticket into its individual data fields - * for a more human-readable representation. - */ - decodeSidecarTicket( - request?: DeepPartial - ): Promise; - /** - * pool: `sidecar list` - * ListSidecars lists all sidecar tickets currently in the local database. This - * includes tickets offered by our node as well as tickets that our node is the - * recipient of. Optionally a ticket ID can be provided to filter the tickets. - */ - listSidecars( - request?: DeepPartial - ): Promise; - /** - * pool: `sidecar cancel` - * CancelSidecar cancels the execution of a specific sidecar ticket. Depending - * on the state of the sidecar ticket its associated bid order might be - * canceled as well (if this ticket was offered by our node). - */ - cancelSidecar( - request?: DeepPartial - ): Promise; -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/lib/types/proto/poolrpc.ts b/lib/types/proto/poolrpc.ts deleted file mode 100644 index 6f39027..0000000 --- a/lib/types/proto/poolrpc.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './pool/auctioneerrpc/auctioneer'; -export * from './pool/auctioneerrpc/hashmail'; -export * from './pool/trader'; diff --git a/lib/types/proto/routerrpc.ts b/lib/types/proto/routerrpc.ts deleted file mode 100644 index 678129a..0000000 --- a/lib/types/proto/routerrpc.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './lnd/routerrpc/router'; diff --git a/lib/types/proto/schema.ts b/lib/types/proto/schema.ts deleted file mode 100644 index 10eef8c..0000000 --- a/lib/types/proto/schema.ts +++ /dev/null @@ -1,62 +0,0 @@ -// This file is auto-generated by the 'process_types.ts' script - -// Collection of service names to avoid having to use magic strings for -// the RPC services. If anything gets renamed in the protos, it'll -// produce a compiler error -export const serviceNames = { - frdrpc: { FaradayServer: 'frdrpc.FaradayServer' }, - autopilotrpc: { Autopilot: 'autopilotrpc.Autopilot' }, - chainrpc: { ChainNotifier: 'chainrpc.ChainNotifier' }, - invoicesrpc: { Invoices: 'invoicesrpc.Invoices' }, - lnrpc: { - Lightning: 'lnrpc.Lightning', - WalletUnlocker: 'lnrpc.WalletUnlocker' - }, - routerrpc: { Router: 'routerrpc.Router' }, - signrpc: { Signer: 'signrpc.Signer' }, - walletrpc: { WalletKit: 'walletrpc.WalletKit' }, - watchtowerrpc: { Watchtower: 'watchtowerrpc.Watchtower' }, - wtclientrpc: { WatchtowerClient: 'wtclientrpc.WatchtowerClient' }, - looprpc: { SwapClient: 'looprpc.SwapClient', Debug: 'looprpc.Debug' }, - poolrpc: { - ChannelAuctioneer: 'poolrpc.ChannelAuctioneer', - HashMail: 'poolrpc.HashMail', - Trader: 'poolrpc.Trader' - } -}; - -// This array contains the list of methods that are server streaming. It is -// used to determine if the Proxy should call 'request' or 'subscribe'. The -// only other solution would be to either hard-code the subscription methods, -// which increases the maintenance burden on updates, or to have protoc generate JS code -// which increases the bundle size. This build-time approach which only -// includes a small additional file appears to be worthy trade-off -export const subscriptionMethods = [ - 'chainrpc.ChainNotifier.RegisterConfirmationsNtfn', - 'chainrpc.ChainNotifier.RegisterSpendNtfn', - 'chainrpc.ChainNotifier.RegisterBlockEpochNtfn', - 'invoicesrpc.Invoices.SubscribeSingleInvoice', - 'lnrpc.Lightning.SubscribeTransactions', - 'lnrpc.Lightning.SubscribePeerEvents', - 'lnrpc.Lightning.SubscribeChannelEvents', - 'lnrpc.Lightning.OpenChannel', - 'lnrpc.Lightning.ChannelAcceptor', - 'lnrpc.Lightning.CloseChannel', - 'lnrpc.Lightning.SendPayment', - 'lnrpc.Lightning.SendToRoute', - 'lnrpc.Lightning.SubscribeInvoices', - 'lnrpc.Lightning.SubscribeChannelGraph', - 'lnrpc.Lightning.SubscribeChannelBackups', - 'lnrpc.Lightning.RegisterRPCMiddleware', - 'lnrpc.Lightning.SubscribeCustomMessages', - 'routerrpc.Router.SendPaymentV2', - 'routerrpc.Router.TrackPaymentV2', - 'routerrpc.Router.SubscribeHtlcEvents', - 'routerrpc.Router.SendPayment', - 'routerrpc.Router.TrackPayment', - 'routerrpc.Router.HtlcInterceptor', - 'looprpc.SwapClient.Monitor', - 'poolrpc.ChannelAuctioneer.SubscribeBatchAuction', - 'poolrpc.ChannelAuctioneer.SubscribeSidecar', - 'poolrpc.HashMail.RecvStream' -]; diff --git a/lib/types/proto/signrpc.ts b/lib/types/proto/signrpc.ts deleted file mode 100644 index 5de001a..0000000 --- a/lib/types/proto/signrpc.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './lnd/signrpc/signer'; diff --git a/lib/types/proto/walletrpc.ts b/lib/types/proto/walletrpc.ts deleted file mode 100644 index e4e989b..0000000 --- a/lib/types/proto/walletrpc.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './lnd/walletrpc/walletkit'; diff --git a/lib/types/proto/watchtowerrpc.ts b/lib/types/proto/watchtowerrpc.ts deleted file mode 100644 index 557bd3d..0000000 --- a/lib/types/proto/watchtowerrpc.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './lnd/watchtowerrpc/watchtower'; diff --git a/lib/types/proto/wtclientrpc.ts b/lib/types/proto/wtclientrpc.ts deleted file mode 100644 index 8942f72..0000000 --- a/lib/types/proto/wtclientrpc.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './lnd/wtclientrpc/wtclient'; diff --git a/lib/util/objects.ts b/lib/util/objects.ts deleted file mode 100644 index 1ce8f57..0000000 --- a/lib/util/objects.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Converts a string from snake-case to camel-case - */ -const toCamel = (text: string) => { - return text.replace(/([-_][a-z])/gi, (match) => { - return match.toUpperCase().replace('-', '').replace('_', ''); - }); -}; - -/** - * Converts a string from camel-case to snake-case - */ -const toSnake = (str: string) => - str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`); - -/** - * Returns true if the value provided is an array - */ -const isArray = (o: any) => { - return Array.isArray(o); -}; - -/** - * Returns true if the value provided is a Javascript object but not a function or - * an array - */ -export const isObject = (o: any) => { - return o === Object(o) && !isArray(o) && typeof o !== 'function'; -}; - -/** - * Recursively converts the keys of a Javascript object from snake-case to camel-case - * Ex: { some-key: 'foo' } becomes { someKey: 'foo' } - * @param o any Javascript object - */ -export const snakeKeysToCamel = (o: any): T => { - if (isObject(o)) { - const n: Record = {}; - - Object.keys(o).forEach((k) => { - n[toCamel(k)] = snakeKeysToCamel(o[k]); - }); - - return n as T; - } else if (isArray(o)) { - return o.map((i: any) => { - return snakeKeysToCamel(i); - }); - } - - return o; -}; - -/** - * Recursively converts the keys of a Javascript object from camel-case to snake-case - * Ex: { someKey: 'foo' } becomes { some-key: 'foo' } - * @param o any Javascript object - */ -export const camelKeysToSnake = (o: any): T => { - if (isObject(o)) { - const n: Record = {}; - - Object.keys(o).forEach((k) => { - n[toSnake(k)] = camelKeysToSnake(o[k]); - }); - - return n as T; - } else if (isArray(o)) { - return o.map((i: any) => { - return camelKeysToSnake(i); - }); - } - - return o; -}; diff --git a/lib/util/reservedWords.ts b/lib/util/reservedWords.ts deleted file mode 100644 index 9fc0327..0000000 --- a/lib/util/reservedWords.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * The list of JS reserved words that are prefixed with "pb_" by the protobuf compiler - * Source: https://github.com/protocolbuffers/protobuf/blob/4.0.x/src/google/protobuf/compiler/js/js_generator.cc#L60 - */ -export const JS_RESERVED_WORDS: string[] = [ - 'abstract', - 'boolean', - 'break', - 'byte', - 'case', - 'catch', - 'char', - 'class', - 'const', - 'continue', - 'debugger', - 'default', - 'delete', - 'do', - 'double', - 'else', - 'enum', - 'export', - 'extends', - 'false', - 'final', - 'finally', - 'float', - 'for', - 'function', - 'goto', - 'if', - 'implements', - 'import', - 'in', - 'instanceof', - 'int', - 'interface', - 'long', - 'native', - 'new', - 'null', - 'package', - 'private', - 'protected', - 'public', - 'return', - 'short', - 'static', - 'super', - 'switch', - 'synchronized', - 'this', - 'throw', - 'throws', - 'transient', - 'try', - 'typeof', - 'var', - 'void', - 'volatile', - 'while', - 'with' -]; diff --git a/package-lock.json b/package-lock.json index dfcbbdc..7c09d34 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,15 @@ { "name": "@lightninglabs/lnc-web", - "version": "0.1.12-alpha", + "version": "0.2.0-alpha", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lightninglabs/lnc-web", - "version": "0.1.12-alpha", + "version": "0.2.0-alpha", "license": "MIT", "dependencies": { + "@lightninglabs/lnc-core": "0.2.0-alpha", "crypto-js": "4.1.1" }, "devDependencies": { @@ -17,7 +18,7 @@ "@types/node": "17.0.16", "chai": "4.3.6", "clean-webpack-plugin": "4.0.0", - "mocha": "9.2.0", + "mocha": "9.2.2", "node-polyfill-webpack-plugin": "1.1.4", "prettier": "2.6.0", "ts-loader": "9.2.6", @@ -170,7 +171,6 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -184,7 +184,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -193,7 +192,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -202,7 +200,6 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", - "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -211,19 +208,25 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.15", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", - "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@lightninglabs/lnc-core": { + "version": "0.2.0-alpha", + "resolved": "https://registry.npmjs.org/@lightninglabs/lnc-core/-/lnc-core-0.2.0-alpha.tgz", + "integrity": "sha512-tX9ndYGJ9+8VL5GvMDveBhIuRLBlbRr9kuZXxEPwFDm5UaAzc9syF7119+6e0Ctx0cDCSGG+Y7YirNaTD1xCuA==", + "dependencies": { + "node-polyfill-webpack-plugin": "1.1.4" + } + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -331,7 +334,6 @@ "version": "8.4.5", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.5.tgz", "integrity": "sha512-dhsC09y1gpJWnK+Ff4SGvCuSnk9DaU0BJZSzOwa6GVSg65XtTugLBITDAAzRU5duGBoXBHpdR/9jHGxJjNflJQ==", - "dev": true, "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -341,7 +343,6 @@ "version": "3.7.4", "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", - "dev": true, "dependencies": { "@types/eslint": "*", "@types/estree": "*" @@ -350,8 +351,7 @@ "node_modules/@types/estree": { "version": "0.0.51", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", - "dev": true + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==" }, "node_modules/@types/glob": { "version": "7.2.0", @@ -366,8 +366,7 @@ "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" }, "node_modules/@types/long": { "version": "4.0.2", @@ -390,8 +389,7 @@ "node_modules/@types/node": { "version": "17.0.16", "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.16.tgz", - "integrity": "sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA==", - "dev": true + "integrity": "sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA==" }, "node_modules/@types/object-hash": { "version": "1.3.4", @@ -409,7 +407,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", - "dev": true, "dependencies": { "@webassemblyjs/helper-numbers": "1.11.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.1" @@ -418,26 +415,22 @@ "node_modules/@webassemblyjs/floating-point-hex-parser": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", - "dev": true + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==" }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", - "dev": true + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==" }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", - "dev": true + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==" }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", - "dev": true, "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.11.1", "@webassemblyjs/helper-api-error": "1.11.1", @@ -447,14 +440,12 @@ "node_modules/@webassemblyjs/helper-wasm-bytecode": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", - "dev": true + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==" }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", - "dev": true, "dependencies": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-buffer": "1.11.1", @@ -466,7 +457,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", - "dev": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } @@ -475,7 +465,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", - "dev": true, "dependencies": { "@xtuc/long": "4.2.2" } @@ -483,14 +472,12 @@ "node_modules/@webassemblyjs/utf8": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", - "dev": true + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==" }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", - "dev": true, "dependencies": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-buffer": "1.11.1", @@ -506,7 +493,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", - "dev": true, "dependencies": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.1", @@ -519,7 +505,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", - "dev": true, "dependencies": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-buffer": "1.11.1", @@ -531,7 +516,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", - "dev": true, "dependencies": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-api-error": "1.11.1", @@ -545,7 +529,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", - "dev": true, "dependencies": { "@webassemblyjs/ast": "1.11.1", "@xtuc/long": "4.2.2" @@ -590,20 +573,17 @@ "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" }, "node_modules/@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, "node_modules/acorn": { "version": "8.8.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -615,7 +595,6 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", - "dev": true, "peerDependencies": { "acorn": "^8" } @@ -633,7 +612,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -649,7 +627,6 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, "peerDependencies": { "ajv": "^6.9.1" } @@ -737,7 +714,6 @@ "version": "5.4.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", - "dev": true, "dependencies": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -748,14 +724,12 @@ "node_modules/asn1.js/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/assert": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", - "dev": true, "dependencies": { "es6-object-assign": "^1.1.0", "is-nan": "^1.2.1", @@ -776,7 +750,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -794,7 +767,6 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, "funding": [ { "type": "github", @@ -822,8 +794,7 @@ "node_modules/bn.js": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" }, "node_modules/brace-expansion": { "version": "1.1.11", @@ -850,8 +821,7 @@ "node_modules/brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" }, "node_modules/browser-stdout": { "version": "1.3.1", @@ -863,7 +833,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, "dependencies": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -877,7 +846,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, "dependencies": { "browserify-aes": "^1.0.4", "browserify-des": "^1.0.0", @@ -888,7 +856,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, "dependencies": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", @@ -900,7 +867,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", - "dev": true, "dependencies": { "bn.js": "^5.0.0", "randombytes": "^2.0.1" @@ -910,7 +876,6 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", - "dev": true, "dependencies": { "bn.js": "^5.1.1", "browserify-rsa": "^4.0.1", @@ -927,7 +892,6 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, "dependencies": { "pako": "~1.0.5" } @@ -936,7 +900,6 @@ "version": "4.21.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", - "dev": true, "funding": [ { "type": "opencollective", @@ -964,7 +927,6 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, "funding": [ { "type": "github", @@ -987,14 +949,12 @@ "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, "node_modules/buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" }, "node_modules/builtin-modules": { "version": "1.1.1", @@ -1008,14 +968,12 @@ "node_modules/builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==", - "dev": true + "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==" }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, "dependencies": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" @@ -1040,7 +998,6 @@ "version": "1.0.30001375", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001375.tgz", "integrity": "sha512-kWIMkNzLYxSvnjy0hL8w1NOaWNr2rn39RTAVyIwcw8juu60bZDWiF1/loOYANzjtJmy6qPgNmn38ro5Pygagdw==", - "dev": true, "funding": [ { "type": "opencollective", @@ -1138,7 +1095,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true, "engines": { "node": ">=6.0" } @@ -1147,7 +1103,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -1220,8 +1175,7 @@ "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, "node_modules/concat-map": { "version": "0.0.1", @@ -1232,20 +1186,17 @@ "node_modules/console-browserify": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", - "dev": true + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" }, "node_modules/constants-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==", - "dev": true + "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==" }, "node_modules/create-ecdh": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, "dependencies": { "bn.js": "^4.1.0", "elliptic": "^6.5.3" @@ -1254,14 +1205,12 @@ "node_modules/create-ecdh/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/create-hash": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, "dependencies": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -1274,7 +1223,6 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, "dependencies": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -1308,7 +1256,6 @@ "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, "dependencies": { "browserify-cipher": "^1.0.0", "browserify-sign": "^4.0.0", @@ -1388,7 +1335,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "dev": true, "dependencies": { "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" @@ -1422,7 +1368,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "dev": true, "dependencies": { "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" @@ -1441,7 +1386,6 @@ "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, "dependencies": { "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", @@ -1451,14 +1395,12 @@ "node_modules/diffie-hellman/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/domain-browser": { "version": "4.22.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.22.0.tgz", "integrity": "sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw==", - "dev": true, "engines": { "node": ">=10" }, @@ -1469,14 +1411,12 @@ "node_modules/electron-to-chromium": { "version": "1.4.218", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.218.tgz", - "integrity": "sha512-INDylKH//YIf2w67D+IjkfVnGVrZ/D94DAU/FPPm6T4jEPbEDQvo9r2wTj0ncFdtJH8+V8BggZTaN8Rzk5wkgw==", - "dev": true + "integrity": "sha512-INDylKH//YIf2w67D+IjkfVnGVrZ/D94DAU/FPPm6T4jEPbEDQvo9r2wTj0ncFdtJH8+V8BggZTaN8Rzk5wkgw==" }, "node_modules/elliptic": { "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", @@ -1490,8 +1430,7 @@ "node_modules/elliptic/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -1503,7 +1442,6 @@ "version": "5.10.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", - "dev": true, "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -1528,7 +1466,6 @@ "version": "1.20.1", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", @@ -1564,14 +1501,12 @@ "node_modules/es-module-lexer": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", - "dev": true + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==" }, "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -1587,14 +1522,12 @@ "node_modules/es6-object-assign": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", - "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==", - "dev": true + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==" }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, "engines": { "node": ">=6" } @@ -1615,7 +1548,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -1641,7 +1573,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -1653,7 +1584,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, "engines": { "node": ">=4.0" } @@ -1662,7 +1592,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, "engines": { "node": ">=4.0" } @@ -1671,7 +1600,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, "engines": { "node": ">=0.8.x" } @@ -1680,7 +1608,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, "dependencies": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -1712,14 +1639,12 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "node_modules/fastest-levenshtein": { "version": "1.0.16", @@ -1746,7 +1671,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-2.0.2.tgz", "integrity": "sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg==", - "dev": true, "engines": { "node": ">=8" } @@ -1780,7 +1704,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, "dependencies": { "is-callable": "^1.1.3" } @@ -1808,14 +1731,12 @@ "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "node_modules/function.prototype.name": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", @@ -1833,7 +1754,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -1860,7 +1780,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", - "dev": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -1886,7 +1805,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.1" @@ -1933,8 +1851,7 @@ "node_modules/glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" }, "node_modules/globby": { "version": "6.1.0", @@ -1964,8 +1881,7 @@ "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, "node_modules/growl": { "version": "1.10.5", @@ -1980,7 +1896,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, "dependencies": { "function-bind": "^1.1.1" }, @@ -1992,7 +1907,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2001,7 +1915,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, "engines": { "node": ">=8" } @@ -2010,7 +1923,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.1" }, @@ -2022,7 +1934,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -2034,7 +1945,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, "dependencies": { "has-symbols": "^1.0.2" }, @@ -2049,7 +1959,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "dev": true, "dependencies": { "inherits": "^2.0.4", "readable-stream": "^3.6.0", @@ -2063,7 +1972,6 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, "dependencies": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -2082,7 +1990,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "dev": true, "dependencies": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", @@ -2092,8 +1999,7 @@ "node_modules/https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", - "dev": true + "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==" }, "node_modules/human-signals": { "version": "2.1.0", @@ -2108,7 +2014,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, "funding": [ { "type": "github", @@ -2156,14 +2061,12 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/internal-slot": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.0", "has": "^1.0.3", @@ -2186,7 +2089,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -2202,7 +2104,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, "dependencies": { "has-bigints": "^1.0.1" }, @@ -2226,7 +2127,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -2242,7 +2142,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -2266,7 +2165,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -2299,7 +2197,6 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -2326,7 +2223,6 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", - "dev": true, "dependencies": { "call-bind": "^1.0.0", "define-properties": "^1.1.3" @@ -2342,7 +2238,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -2363,7 +2258,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -2432,7 +2326,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -2448,7 +2341,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2" }, @@ -2472,7 +2364,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -2487,7 +2378,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, "dependencies": { "has-symbols": "^1.0.2" }, @@ -2502,7 +2392,6 @@ "version": "1.1.9", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.9.tgz", "integrity": "sha512-kfrlnTTn8pZkfpJMUgYD7YZ3qzeJgWUn8XfVYBARc4wnmNOmLbmuuaAs3q5fvB0UJOn6yHAKaGTPM7d6ezoD/A==", - "dev": true, "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -2533,7 +2422,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, "dependencies": { "call-bind": "^1.0.2" }, @@ -2560,7 +2448,6 @@ "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -2591,14 +2478,12 @@ "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/kind-of": { "version": "6.0.3", @@ -2613,7 +2498,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, "engines": { "node": ">=6.11.5" } @@ -2692,7 +2576,6 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -2702,8 +2585,7 @@ "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, "node_modules/micromatch": { "version": "4.0.5", @@ -2722,7 +2604,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, "dependencies": { "bn.js": "^4.0.0", "brorand": "^1.0.1" @@ -2734,14 +2615,12 @@ "node_modules/miller-rabin/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -2750,7 +2629,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "dependencies": { "mime-db": "1.52.0" }, @@ -2770,14 +2648,12 @@ "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, "node_modules/minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" }, "node_modules/minimatch": { "version": "3.1.2", @@ -2810,9 +2686,9 @@ } }, "node_modules/mocha": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.0.tgz", - "integrity": "sha512-kNn7E8g2SzVcq0a77dkphPsDSN7P+iYkqE0ZsGCYWRsoiKjOt+NvXfaagik8vuDa6W5Zw3qxe8Jfpt5qKf+6/Q==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", + "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", "dev": true, "dependencies": { "@ungap/promise-all-settled": "1.1.2", @@ -2828,9 +2704,9 @@ "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", - "minimatch": "3.0.4", + "minimatch": "4.2.1", "ms": "2.1.3", - "nanoid": "3.2.0", + "nanoid": "3.3.1", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", @@ -2872,10 +2748,10 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/mocha/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "node_modules/mocha/node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -2884,6 +2760,18 @@ "node": "*" } }, + "node_modules/mocha/node_modules/minimatch": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", + "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -2891,9 +2779,9 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", - "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", "dev": true, "bin": { "nanoid": "bin/nanoid.cjs" @@ -2905,14 +2793,12 @@ "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "node_modules/node-polyfill-webpack-plugin": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/node-polyfill-webpack-plugin/-/node-polyfill-webpack-plugin-1.1.4.tgz", "integrity": "sha512-Z0XTKj1wRWO8o/Vjobsw5iOJCN+Sua3EZEUc2Ziy9CyVvmHKu6o+t4gUH9GOE0czyPR94LI6ZCV/PpcM8b5yow==", - "dev": true, "dependencies": { "assert": "^2.0.0", "browserify-zlib": "^0.2.0", @@ -2949,8 +2835,7 @@ "node_modules/node-releases": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", - "dev": true + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" }, "node_modules/normalize-path": { "version": "3.0.0", @@ -2995,7 +2880,6 @@ "version": "1.12.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3004,7 +2888,6 @@ "version": "1.1.5", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" @@ -3020,7 +2903,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -3029,7 +2911,6 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.3.tgz", "integrity": "sha512-ZFJnX3zltyjcYJL0RoCJuzb+11zWGyaDbjgxZbdV7rFEcHQuYxrZqhow67aA7xpes6LhojyFDaBKAFfogQrikA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -3070,8 +2951,7 @@ "node_modules/os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", - "dev": true + "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==" }, "node_modules/p-limit": { "version": "3.1.0", @@ -3124,14 +3004,12 @@ "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" }, "node_modules/parse-asn1": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", - "dev": true, "dependencies": { "asn1.js": "^5.2.0", "browserify-aes": "^1.0.0", @@ -3143,8 +3021,7 @@ "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dev": true + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" }, "node_modules/path-exists": { "version": "4.0.0", @@ -3198,7 +3075,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, "dependencies": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -3213,8 +3089,7 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -3341,7 +3216,6 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true, "engines": { "node": ">= 0.6.0" } @@ -3376,7 +3250,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, "dependencies": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", @@ -3389,14 +3262,12 @@ "node_modules/public-encrypt/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, "engines": { "node": ">=6" } @@ -3406,7 +3277,6 @@ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "dev": true, "engines": { "node": ">=0.4.x" } @@ -3415,7 +3285,6 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", - "dev": true, "engines": { "node": ">=0.4.x" } @@ -3424,7 +3293,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, "dependencies": { "safe-buffer": "^5.1.0" } @@ -3433,7 +3301,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, "dependencies": { "randombytes": "^2.0.5", "safe-buffer": "^5.1.0" @@ -3443,7 +3310,6 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -3481,7 +3347,6 @@ "version": "1.4.3", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", @@ -3557,7 +3422,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -3567,7 +3431,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -3586,14 +3449,12 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/schema-utils": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dev": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -3626,7 +3487,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, "dependencies": { "randombytes": "^2.1.0" } @@ -3634,14 +3494,12 @@ "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" }, "node_modules/sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -3687,7 +3545,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, "dependencies": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", @@ -3707,7 +3564,6 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -3716,7 +3572,6 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -3732,7 +3587,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", - "dev": true, "dependencies": { "inherits": "~2.0.4", "readable-stream": "^3.5.0" @@ -3742,7 +3596,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", - "dev": true, "dependencies": { "builtin-status-codes": "^3.0.0", "inherits": "^2.0.4", @@ -3754,7 +3607,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -3777,7 +3629,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -3791,7 +3642,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -3838,7 +3688,6 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -3865,7 +3714,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, "engines": { "node": ">=6" } @@ -3874,7 +3722,6 @@ "version": "5.14.2", "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", - "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.2", "acorn": "^8.5.0", @@ -3892,7 +3739,6 @@ "version": "5.3.4", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.4.tgz", "integrity": "sha512-SmnkUhBxLDcBfTIeaq+ZqJXLVEyXxSaNcCeSezECdKjfkMrTTnPvapBILylYwyEvHFZAn2cJ8dtiXel5XnfOfQ==", - "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.14", "jest-worker": "^27.4.5", @@ -3926,7 +3772,6 @@ "version": "2.0.12", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", - "dev": true, "dependencies": { "setimmediate": "^1.0.4" }, @@ -4229,8 +4074,7 @@ "node_modules/tty-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==" }, "node_modules/type-detect": { "version": "4.0.8", @@ -4258,7 +4102,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", @@ -4273,7 +4116,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz", "integrity": "sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==", - "dev": true, "funding": [ { "type": "opencollective", @@ -4299,7 +4141,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -4308,7 +4149,6 @@ "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", - "dev": true, "dependencies": { "punycode": "1.3.2", "querystring": "0.2.0" @@ -4317,14 +4157,12 @@ "node_modules/url/node_modules/punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", - "dev": true + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" }, "node_modules/util": { "version": "0.12.4", "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", - "dev": true, "dependencies": { "inherits": "^2.0.3", "is-arguments": "^1.0.4", @@ -4337,8 +4175,7 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", @@ -4349,14 +4186,12 @@ "node_modules/vm-browserify": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "dev": true + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" }, "node_modules/watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", - "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -4369,7 +4204,6 @@ "version": "5.69.1", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.69.1.tgz", "integrity": "sha512-+VyvOSJXZMT2V5vLzOnDuMz5GxEqLk7hKWQ56YxPW/PQRUuKimPqmEIJOx8jHYeyo65pKbapbW464mvsKbaj4A==", - "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^0.0.51", @@ -4481,7 +4315,6 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, "engines": { "node": ">=10.13.0" } @@ -4505,7 +4338,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -4521,7 +4353,6 @@ "version": "1.1.8", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.8.tgz", "integrity": "sha512-Jn4e5PItbcAHyLoRDwvPj1ypu27DJbtdYXUa5zsinrUx77Uvfb0cXwwnGMTn7cjUfhhqgVQnVJCwF+7cgU7tpw==", - "dev": true, "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -4576,7 +4407,6 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, "engines": { "node": ">=0.4" } @@ -4770,7 +4600,6 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, "requires": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -4780,20 +4609,17 @@ "@jridgewell/resolve-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" }, "@jridgewell/set-array": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" }, "@jridgewell/source-map": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", - "dev": true, "requires": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -4802,19 +4628,25 @@ "@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" }, "@jridgewell/trace-mapping": { "version": "0.3.15", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", - "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@lightninglabs/lnc-core": { + "version": "0.2.0-alpha", + "resolved": "https://registry.npmjs.org/@lightninglabs/lnc-core/-/lnc-core-0.2.0-alpha.tgz", + "integrity": "sha512-tX9ndYGJ9+8VL5GvMDveBhIuRLBlbRr9kuZXxEPwFDm5UaAzc9syF7119+6e0Ctx0cDCSGG+Y7YirNaTD1xCuA==", + "requires": { + "node-polyfill-webpack-plugin": "1.1.4" + } + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -4922,7 +4754,6 @@ "version": "8.4.5", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.5.tgz", "integrity": "sha512-dhsC09y1gpJWnK+Ff4SGvCuSnk9DaU0BJZSzOwa6GVSg65XtTugLBITDAAzRU5duGBoXBHpdR/9jHGxJjNflJQ==", - "dev": true, "requires": { "@types/estree": "*", "@types/json-schema": "*" @@ -4932,7 +4763,6 @@ "version": "3.7.4", "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", - "dev": true, "requires": { "@types/eslint": "*", "@types/estree": "*" @@ -4941,8 +4771,7 @@ "@types/estree": { "version": "0.0.51", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", - "dev": true + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==" }, "@types/glob": { "version": "7.2.0", @@ -4957,8 +4786,7 @@ "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" }, "@types/long": { "version": "4.0.2", @@ -4981,8 +4809,7 @@ "@types/node": { "version": "17.0.16", "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.16.tgz", - "integrity": "sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA==", - "dev": true + "integrity": "sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA==" }, "@types/object-hash": { "version": "1.3.4", @@ -5000,7 +4827,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", - "dev": true, "requires": { "@webassemblyjs/helper-numbers": "1.11.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.1" @@ -5009,26 +4835,22 @@ "@webassemblyjs/floating-point-hex-parser": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", - "dev": true + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==" }, "@webassemblyjs/helper-api-error": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", - "dev": true + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==" }, "@webassemblyjs/helper-buffer": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", - "dev": true + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==" }, "@webassemblyjs/helper-numbers": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", - "dev": true, "requires": { "@webassemblyjs/floating-point-hex-parser": "1.11.1", "@webassemblyjs/helper-api-error": "1.11.1", @@ -5038,14 +4860,12 @@ "@webassemblyjs/helper-wasm-bytecode": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", - "dev": true + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==" }, "@webassemblyjs/helper-wasm-section": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", - "dev": true, "requires": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-buffer": "1.11.1", @@ -5057,7 +4877,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", - "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } @@ -5066,7 +4885,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", - "dev": true, "requires": { "@xtuc/long": "4.2.2" } @@ -5074,14 +4892,12 @@ "@webassemblyjs/utf8": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", - "dev": true + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==" }, "@webassemblyjs/wasm-edit": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", - "dev": true, "requires": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-buffer": "1.11.1", @@ -5097,7 +4913,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", - "dev": true, "requires": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.1", @@ -5110,7 +4925,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", - "dev": true, "requires": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-buffer": "1.11.1", @@ -5122,7 +4936,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", - "dev": true, "requires": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-api-error": "1.11.1", @@ -5136,7 +4949,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", - "dev": true, "requires": { "@webassemblyjs/ast": "1.11.1", "@xtuc/long": "4.2.2" @@ -5168,26 +4980,22 @@ "@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" }, "@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, "acorn": { "version": "8.8.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==" }, "acorn-import-assertions": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", - "dev": true, "requires": {} }, "acorn-walk": { @@ -5200,7 +5008,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -5212,7 +5019,6 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, "requires": {} }, "ansi-colors": { @@ -5277,7 +5083,6 @@ "version": "5.4.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", - "dev": true, "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -5288,8 +5093,7 @@ "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" } } }, @@ -5297,7 +5101,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", - "dev": true, "requires": { "es6-object-assign": "^1.1.0", "is-nan": "^1.2.1", @@ -5314,8 +5117,7 @@ "available-typed-arrays": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" }, "balanced-match": { "version": "1.0.2", @@ -5326,8 +5128,7 @@ "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "binary-extensions": { "version": "2.2.0", @@ -5338,8 +5139,7 @@ "bn.js": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" }, "brace-expansion": { "version": "1.1.11", @@ -5363,8 +5163,7 @@ "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" }, "browser-stdout": { "version": "1.3.1", @@ -5376,7 +5175,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, "requires": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -5390,7 +5188,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, "requires": { "browserify-aes": "^1.0.4", "browserify-des": "^1.0.0", @@ -5401,7 +5198,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, "requires": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", @@ -5413,7 +5209,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", - "dev": true, "requires": { "bn.js": "^5.0.0", "randombytes": "^2.0.1" @@ -5423,7 +5218,6 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", - "dev": true, "requires": { "bn.js": "^5.1.1", "browserify-rsa": "^4.0.1", @@ -5440,7 +5234,6 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, "requires": { "pako": "~1.0.5" } @@ -5449,7 +5242,6 @@ "version": "4.21.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", - "dev": true, "requires": { "caniuse-lite": "^1.0.30001370", "electron-to-chromium": "^1.4.202", @@ -5461,7 +5253,6 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, "requires": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" @@ -5470,14 +5261,12 @@ "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" }, "builtin-modules": { "version": "1.1.1", @@ -5488,14 +5277,12 @@ "builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==", - "dev": true + "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==" }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, "requires": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" @@ -5510,8 +5297,7 @@ "caniuse-lite": { "version": "1.0.30001375", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001375.tgz", - "integrity": "sha512-kWIMkNzLYxSvnjy0hL8w1NOaWNr2rn39RTAVyIwcw8juu60bZDWiF1/loOYANzjtJmy6qPgNmn38ro5Pygagdw==", - "dev": true + "integrity": "sha512-kWIMkNzLYxSvnjy0hL8w1NOaWNr2rn39RTAVyIwcw8juu60bZDWiF1/loOYANzjtJmy6qPgNmn38ro5Pygagdw==" }, "chai": { "version": "4.3.6", @@ -5574,14 +5360,12 @@ "chrome-trace-event": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==" }, "cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -5642,8 +5426,7 @@ "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, "concat-map": { "version": "0.0.1", @@ -5654,20 +5437,17 @@ "console-browserify": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", - "dev": true + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" }, "constants-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==", - "dev": true + "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==" }, "create-ecdh": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, "requires": { "bn.js": "^4.1.0", "elliptic": "^6.5.3" @@ -5676,8 +5456,7 @@ "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" } } }, @@ -5685,7 +5464,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, "requires": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -5698,7 +5476,6 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, "requires": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -5729,7 +5506,6 @@ "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, "requires": { "browserify-cipher": "^1.0.0", "browserify-sign": "^4.0.0", @@ -5791,7 +5567,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "dev": true, "requires": { "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" @@ -5816,7 +5591,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "dev": true, "requires": { "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" @@ -5832,7 +5606,6 @@ "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, "requires": { "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", @@ -5842,28 +5615,24 @@ "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" } } }, "domain-browser": { "version": "4.22.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.22.0.tgz", - "integrity": "sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw==", - "dev": true + "integrity": "sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw==" }, "electron-to-chromium": { "version": "1.4.218", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.218.tgz", - "integrity": "sha512-INDylKH//YIf2w67D+IjkfVnGVrZ/D94DAU/FPPm6T4jEPbEDQvo9r2wTj0ncFdtJH8+V8BggZTaN8Rzk5wkgw==", - "dev": true + "integrity": "sha512-INDylKH//YIf2w67D+IjkfVnGVrZ/D94DAU/FPPm6T4jEPbEDQvo9r2wTj0ncFdtJH8+V8BggZTaN8Rzk5wkgw==" }, "elliptic": { "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, "requires": { "bn.js": "^4.11.9", "brorand": "^1.1.0", @@ -5877,8 +5646,7 @@ "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" } } }, @@ -5892,7 +5660,6 @@ "version": "5.10.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", - "dev": true, "requires": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -5908,7 +5675,6 @@ "version": "1.20.1", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", - "dev": true, "requires": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", @@ -5938,14 +5704,12 @@ "es-module-lexer": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", - "dev": true + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==" }, "es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, "requires": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -5955,14 +5719,12 @@ "es6-object-assign": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", - "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==", - "dev": true + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==" }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" }, "escape-string-regexp": { "version": "4.0.0", @@ -5974,7 +5736,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -5990,7 +5751,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, "requires": { "estraverse": "^5.2.0" }, @@ -5998,28 +5758,24 @@ "estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" } } }, "estraverse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" }, "events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" }, "evp_bytestokey": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, "requires": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -6045,14 +5801,12 @@ "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "fastest-levenshtein": { "version": "1.0.16", @@ -6072,8 +5826,7 @@ "filter-obj": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-2.0.2.tgz", - "integrity": "sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg==", - "dev": true + "integrity": "sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg==" }, "find-up": { "version": "5.0.0", @@ -6095,7 +5848,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, "requires": { "is-callable": "^1.1.3" } @@ -6116,14 +5868,12 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "function.prototype.name": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", @@ -6134,8 +5884,7 @@ "functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" }, "get-caller-file": { "version": "2.0.5", @@ -6153,7 +5902,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", - "dev": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -6170,7 +5918,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, "requires": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.1" @@ -6202,8 +5949,7 @@ "glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" }, "globby": { "version": "6.1.0", @@ -6229,8 +5975,7 @@ "graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, "growl": { "version": "1.10.5", @@ -6242,7 +5987,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, "requires": { "function-bind": "^1.1.1" } @@ -6250,20 +5994,17 @@ "has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==" }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, "has-property-descriptors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, "requires": { "get-intrinsic": "^1.1.1" } @@ -6271,14 +6012,12 @@ "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" }, "has-tostringtag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, "requires": { "has-symbols": "^1.0.2" } @@ -6287,7 +6026,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "dev": true, "requires": { "inherits": "^2.0.4", "readable-stream": "^3.6.0", @@ -6298,7 +6036,6 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, "requires": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -6314,7 +6051,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "dev": true, "requires": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", @@ -6324,8 +6060,7 @@ "https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", - "dev": true + "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==" }, "human-signals": { "version": "2.1.0", @@ -6336,8 +6071,7 @@ "ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "import-local": { "version": "3.1.0", @@ -6362,14 +6096,12 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "internal-slot": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, "requires": { "get-intrinsic": "^1.1.0", "has": "^1.0.3", @@ -6386,7 +6118,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, "requires": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -6396,7 +6127,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, "requires": { "has-bigints": "^1.0.1" } @@ -6414,7 +6144,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, "requires": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -6423,8 +6152,7 @@ "is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", - "dev": true + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" }, "is-core-module": { "version": "2.10.0", @@ -6439,7 +6167,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, "requires": { "has-tostringtag": "^1.0.0" } @@ -6460,7 +6187,6 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, "requires": { "has-tostringtag": "^1.0.0" } @@ -6478,7 +6204,6 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", - "dev": true, "requires": { "call-bind": "^1.0.0", "define-properties": "^1.1.3" @@ -6487,8 +6212,7 @@ "is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==" }, "is-number": { "version": "7.0.0", @@ -6500,7 +6224,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, "requires": { "has-tostringtag": "^1.0.0" } @@ -6548,7 +6271,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, "requires": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -6558,7 +6280,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, "requires": { "call-bind": "^1.0.2" } @@ -6573,7 +6294,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, "requires": { "has-tostringtag": "^1.0.0" } @@ -6582,7 +6302,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, "requires": { "has-symbols": "^1.0.2" } @@ -6591,7 +6310,6 @@ "version": "1.1.9", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.9.tgz", "integrity": "sha512-kfrlnTTn8pZkfpJMUgYD7YZ3qzeJgWUn8XfVYBARc4wnmNOmLbmuuaAs3q5fvB0UJOn6yHAKaGTPM7d6ezoD/A==", - "dev": true, "requires": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -6610,7 +6328,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, "requires": { "call-bind": "^1.0.2" } @@ -6631,7 +6348,6 @@ "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -6656,14 +6372,12 @@ "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "kind-of": { "version": "6.0.3", @@ -6674,8 +6388,7 @@ "loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==" }, "locate-path": { "version": "6.0.0", @@ -6736,7 +6449,6 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -6746,8 +6458,7 @@ "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, "micromatch": { "version": "4.0.5", @@ -6763,7 +6474,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, "requires": { "bn.js": "^4.0.0", "brorand": "^1.0.1" @@ -6772,22 +6482,19 @@ "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" } } }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" }, "mime-types": { "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "requires": { "mime-db": "1.52.0" } @@ -6801,14 +6508,12 @@ "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, "minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" }, "minimatch": { "version": "3.1.2", @@ -6835,9 +6540,9 @@ } }, "mocha": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.0.tgz", - "integrity": "sha512-kNn7E8g2SzVcq0a77dkphPsDSN7P+iYkqE0ZsGCYWRsoiKjOt+NvXfaagik8vuDa6W5Zw3qxe8Jfpt5qKf+6/Q==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", + "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", "dev": true, "requires": { "@ungap/promise-all-settled": "1.1.2", @@ -6853,9 +6558,9 @@ "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", - "minimatch": "3.0.4", + "minimatch": "4.2.1", "ms": "2.1.3", - "nanoid": "3.2.0", + "nanoid": "3.3.1", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", @@ -6878,12 +6583,23 @@ "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", + "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -6898,22 +6614,20 @@ "dev": true }, "nanoid": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", - "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", "dev": true }, "neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "node-polyfill-webpack-plugin": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/node-polyfill-webpack-plugin/-/node-polyfill-webpack-plugin-1.1.4.tgz", "integrity": "sha512-Z0XTKj1wRWO8o/Vjobsw5iOJCN+Sua3EZEUc2Ziy9CyVvmHKu6o+t4gUH9GOE0czyPR94LI6ZCV/PpcM8b5yow==", - "dev": true, "requires": { "assert": "^2.0.0", "browserify-zlib": "^0.2.0", @@ -6944,8 +6658,7 @@ "node-releases": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", - "dev": true + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" }, "normalize-path": { "version": "3.0.0", @@ -6977,14 +6690,12 @@ "object-inspect": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", - "dev": true + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" }, "object-is": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" @@ -6993,14 +6704,12 @@ "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, "object.assign": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.3.tgz", "integrity": "sha512-ZFJnX3zltyjcYJL0RoCJuzb+11zWGyaDbjgxZbdV7rFEcHQuYxrZqhow67aA7xpes6LhojyFDaBKAFfogQrikA==", - "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -7029,8 +6738,7 @@ "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", - "dev": true + "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==" }, "p-limit": { "version": "3.1.0", @@ -7065,14 +6773,12 @@ "pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" }, "parse-asn1": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", - "dev": true, "requires": { "asn1.js": "^5.2.0", "browserify-aes": "^1.0.0", @@ -7084,8 +6790,7 @@ "path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dev": true + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" }, "path-exists": { "version": "4.0.0", @@ -7127,7 +6832,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -7139,8 +6843,7 @@ "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "picomatch": { "version": "2.3.1", @@ -7226,8 +6929,7 @@ "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" }, "protobufjs": { "version": "6.11.3", @@ -7254,7 +6956,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", @@ -7267,34 +6968,29 @@ "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" } } }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", - "dev": true + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==" }, "querystring-es3": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", - "dev": true + "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==" }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, "requires": { "safe-buffer": "^5.1.0" } @@ -7303,7 +6999,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, "requires": { "randombytes": "^2.0.5", "safe-buffer": "^5.1.0" @@ -7313,7 +7008,6 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -7342,7 +7036,6 @@ "version": "1.4.3", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", - "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", @@ -7394,7 +7087,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -7403,20 +7095,17 @@ "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "schema-utils": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dev": true, "requires": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -7436,7 +7125,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, "requires": { "randombytes": "^2.1.0" } @@ -7444,14 +7132,12 @@ "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" }, "sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -7485,7 +7171,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, "requires": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", @@ -7501,14 +7186,12 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -7524,7 +7207,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", - "dev": true, "requires": { "inherits": "~2.0.4", "readable-stream": "^3.5.0" @@ -7534,7 +7216,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", - "dev": true, "requires": { "builtin-status-codes": "^3.0.0", "inherits": "^2.0.4", @@ -7546,7 +7227,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, "requires": { "safe-buffer": "~5.2.0" } @@ -7566,7 +7246,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", - "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -7577,7 +7256,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", - "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -7609,7 +7287,6 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -7623,14 +7300,12 @@ "tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==" }, "terser": { "version": "5.14.2", "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", - "dev": true, "requires": { "@jridgewell/source-map": "^0.3.2", "acorn": "^8.5.0", @@ -7642,7 +7317,6 @@ "version": "5.3.4", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.4.tgz", "integrity": "sha512-SmnkUhBxLDcBfTIeaq+ZqJXLVEyXxSaNcCeSezECdKjfkMrTTnPvapBILylYwyEvHFZAn2cJ8dtiXel5XnfOfQ==", - "dev": true, "requires": { "@jridgewell/trace-mapping": "^0.3.14", "jest-worker": "^27.4.5", @@ -7655,7 +7329,6 @@ "version": "2.0.12", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", - "dev": true, "requires": { "setimmediate": "^1.0.4" } @@ -7878,8 +7551,7 @@ "tty-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==" }, "type-detect": { "version": "4.0.8", @@ -7897,7 +7569,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, "requires": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", @@ -7909,7 +7580,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz", "integrity": "sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==", - "dev": true, "requires": { "escalade": "^3.1.1", "picocolors": "^1.0.0" @@ -7919,7 +7589,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "requires": { "punycode": "^2.1.0" } @@ -7928,7 +7597,6 @@ "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", - "dev": true, "requires": { "punycode": "1.3.2", "querystring": "0.2.0" @@ -7937,8 +7605,7 @@ "punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", - "dev": true + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" } } }, @@ -7946,7 +7613,6 @@ "version": "0.12.4", "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", - "dev": true, "requires": { "inherits": "^2.0.3", "is-arguments": "^1.0.4", @@ -7959,8 +7625,7 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "v8-compile-cache-lib": { "version": "3.0.1", @@ -7971,14 +7636,12 @@ "vm-browserify": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "dev": true + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" }, "watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", - "dev": true, "requires": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -7988,7 +7651,6 @@ "version": "5.69.1", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.69.1.tgz", "integrity": "sha512-+VyvOSJXZMT2V5vLzOnDuMz5GxEqLk7hKWQ56YxPW/PQRUuKimPqmEIJOx8jHYeyo65pKbapbW464mvsKbaj4A==", - "dev": true, "requires": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^0.0.51", @@ -8057,8 +7719,7 @@ "webpack-sources": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==" }, "which": { "version": "2.0.2", @@ -8073,7 +7734,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, "requires": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -8086,7 +7746,6 @@ "version": "1.1.8", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.8.tgz", "integrity": "sha512-Jn4e5PItbcAHyLoRDwvPj1ypu27DJbtdYXUa5zsinrUx77Uvfb0cXwwnGMTn7cjUfhhqgVQnVJCwF+7cgU7tpw==", - "dev": true, "requires": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -8128,8 +7787,7 @@ "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, "y18n": { "version": "5.0.8", diff --git a/package.json b/package.json index e03cb1d..7ceb177 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,13 @@ { "name": "@lightninglabs/lnc-web", - "version": "0.1.12-alpha", + "version": "0.2.0-alpha", "description": "Lightning Node Connect npm module for web", "main": "./dist/index.js", "types": "./dist/index.d.ts", - "config": { - "lnd_release_tag": "v0.15.1-beta", - "loop_release_tag": "v0.20.1-beta", - "pool_release_tag": "v0.5.8-alpha", - "faraday_release_tag": "v0.2.8-alpha", - "protoc_version": "3.15.8" - }, "scripts": { "build": "NODE_ENV=production webpack", "dev": "webpack --watch --stats-error-details", "test": "mocha --reporter spec", - "update-protos": "sh scripts/update_protos.sh ${npm_package_config_lnd_release_tag} ${npm_package_config_loop_release_tag} ${npm_package_config_pool_release_tag} ${npm_package_config_faraday_release_tag}", - "generate": "sh scripts/generate_types.sh ${npm_package_config_lnd_release_tag} ${npm_package_config_loop_release_tag} ${npm_package_config_pool_release_tag} ${npm_package_config_faraday_release_tag} ${npm_package_config_protoc_version}", "prettier": "prettier --check '**/*.ts*'", "prettier-write": "prettier --check --write '**/*.ts*'", "lint": "tslint -p tsconfig.json", @@ -47,7 +38,8 @@ "@types/node": "17.0.16", "chai": "4.3.6", "clean-webpack-plugin": "4.0.0", - "mocha": "9.2.0", + "mocha": "9.2.2", + "node-polyfill-webpack-plugin": "1.1.4", "prettier": "2.6.0", "ts-loader": "9.2.6", "ts-node": "10.7.0", @@ -56,10 +48,10 @@ "tslint-config-prettier": "1.18.0", "typescript": "4.5.5", "webpack": "5.69.1", - "webpack-cli": "4.9.2", - "node-polyfill-webpack-plugin": "1.1.4" + "webpack-cli": "4.9.2" }, "dependencies": { + "@lightninglabs/lnc-core": "0.2.0-alpha", "crypto-js": "4.1.1" }, "browser": { diff --git a/protos/faraday/v0.2.8-alpha/faraday.proto b/protos/faraday/v0.2.8-alpha/faraday.proto deleted file mode 100644 index 4cf9ef3..0000000 --- a/protos/faraday/v0.2.8-alpha/faraday.proto +++ /dev/null @@ -1,593 +0,0 @@ -syntax = "proto3"; - -package frdrpc; - -option go_package = "github.com/lightninglabs/faraday/frdrpc"; - -service FaradayServer { - /** frcli: `outliers` - Get close recommendations for currently open channels based on whether it is - an outlier. - - Example request: - http://localhost:8466/v1/faraday/outliers/REVENUE?rec_request.minimum_monitored=123 - */ - rpc OutlierRecommendations (OutlierRecommendationsRequest) - returns (CloseRecommendationsResponse); - - /** frcli: `threshold` - Get close recommendations for currently open channels based whether they are - below a set threshold. - - Example request: - http://localhost:8466/v1/faraday/threshold/UPTIME?rec_request.minimum_monitored=123 - */ - rpc ThresholdRecommendations (ThresholdRecommendationsRequest) - returns (CloseRecommendationsResponse); - - /** frcli: `revenue` - Get a pairwise revenue report for a channel. - - Example request: - http://localhost:8466/v1/faraday/revenue - */ - rpc RevenueReport (RevenueReportRequest) returns (RevenueReportResponse); - - /** frcli: `insights` - List currently open channel with routing and uptime information. - - Example request: - http://localhost:8466/v1/faraday/insights - */ - rpc ChannelInsights (ChannelInsightsRequest) - returns (ChannelInsightsResponse); - - /** frcli: - Get fiat prices for btc. - - Example request: - http://localhost:8466/v1/faraday/exchangerate - */ - rpc ExchangeRate (ExchangeRateRequest) returns (ExchangeRateResponse); - - /** - Get a report of your node's activity over a period. - - Example request: - http://localhost:8466/v1/faraday/nodeaudit - */ - rpc NodeAudit (NodeAuditRequest) returns (NodeAuditResponse); - - /** - Get a channel close report for a specific channel. - - Example request: - http://localhost:8466/v1/faraday/closereport - */ - rpc CloseReport (CloseReportRequest) returns (CloseReportResponse); -} - -message CloseRecommendationRequest { - /* - The minimum amount of time in seconds that a channel should have been - monitored by lnd to be eligible for close. This value is in place to - protect against closing of newer channels. - */ - int64 minimum_monitored = 1; - - enum Metric { - UNKNOWN = 0; - UPTIME = 1; - REVENUE = 2; - INCOMING_VOLUME = 3; - OUTGOING_VOLUME = 4; - TOTAL_VOLUME = 5; - } - - /* - The data point base close recommendations on. Available options are: - Uptime: ratio of channel peer's uptime to the period they have been - monitored to. - Revenue: the revenue that the channel has produced per block that its - funding transaction has been confirmed for. - */ - Metric metric = 2; -} - -message OutlierRecommendationsRequest { - /* - The parameters that are common to all close recommendations. - */ - CloseRecommendationRequest rec_request = 1; - - /* - The number of inter-quartile ranges a value needs to be beneath the lower - quartile/ above the upper quartile to be considered a lower/upper outlier. - Lower values will be more aggressive in recommending channel closes, and - upper values will be more conservative. Recommended values are 1.5 for - aggressive recommendations and 3 for conservative recommendations. - */ - float outlier_multiplier = 2; -} - -message ThresholdRecommendationsRequest { - /* - The parameters that are common to all close recommendations. - */ - CloseRecommendationRequest rec_request = 1; - - /* - The threshold that recommendations will be calculated based on. - For uptime: ratio of uptime to observed lifetime beneath which channels - will be recommended for closure. - - For revenue: revenue per block that capital has been committed to the - channel beneath which channels will be recommended for closure. This - value is provided per block so that channels that have been open for - different periods of time can be compared. - - For incoming volume: The incoming volume per block that capital has - been committed to the channel beneath which channels will be recommended - for closure. This value is provided per block so that channels that have - been open for different periods of time can be compared. - - For outgoing volume: The outgoing volume per block that capital has been - committed to the channel beneath which channels will be recommended for - closure. This value is provided per block so that channels that have been - open for different periods of time can be compared. - - For total volume: The total volume per block that capital has been - committed to the channel beneath which channels will be recommended for - closure. This value is provided per block so that channels that have been - open for different periods of time can be compared. - */ - float threshold_value = 2; -} - -message CloseRecommendationsResponse { - /* - The total number of channels, before filtering out channels that are - not eligible for close recommendations. - */ - int32 total_channels = 1; - - /* - The number of channels that were considered for close recommendations. - */ - int32 considered_channels = 2; - - /* - A set of channel close recommendations. The absence of a channel in this - set implies that it was not considered for close because it did not meet - the criteria for close recommendations (it is private, or has not been - monitored for long enough). - */ - repeated Recommendation recommendations = 3; -} - -message Recommendation { - /* - The channel point [funding txid: outpoint] of the channel being considered - for close. - */ - string chan_point = 1; - - // The value of the metric that close recommendations were based on. - float value = 2; - - // A boolean indicating whether we recommend closing the channel. - bool recommend_close = 3; -} - -message RevenueReportRequest { - /* - The funding transaction outpoints for the channels to generate a revenue - report for. If this is empty, it will be generated for all open and closed - channels. Channel funding points should be expressed with the format - fundingTxID:outpoint. - */ - repeated string chan_points = 1; - - /* - Start time is beginning of the range over which the report will be - generated, expressed as unix epoch offset in seconds. - */ - uint64 start_time = 2; - - /* - End time is end of the range over which the report will be - generated, expressed as unix epoch offset in seconds. - */ - uint64 end_time = 3; -} - -message RevenueReportResponse { - /* - Reports is a set of pairwise revenue report generated for the channel(s) - over the period specified. - */ - repeated RevenueReport reports = 1; -} - -message RevenueReport { - /* - Target channel is the channel that the report is generated for; incoming - fields in the report mean that this channel was the incoming channel, - and the pair as the outgoing, outgoing fields mean that this channel was - the outgoing channel and the peer was the incoming channel. - */ - string target_channel = 1; - - /* - Pair reports maps the channel point of a peer that we generated revenue - with to a report detailing the revenue. - */ - map pair_reports = 2; -} - -message PairReport { - /* - Amount outgoing msat is the amount in millisatoshis that arrived - on the pair channel to be forwarded onwards by our channel. - */ - int64 amount_outgoing_msat = 1; - - /* - Fees outgoing is the amount of fees in millisatoshis that we - attribute to the channel for its role as the outgoing channel in - forwards. - */ - int64 fees_outgoing_msat = 2; - - /* - Amount incoming msat is the amount in millisatoshis that arrived - on our channel to be forwarded onwards by the pair channel. - */ - int64 amount_incoming_msat = 3; - - /* - Fees incoming is the amount of fees in millisatoshis that we - attribute to the channel for its role as the incoming channel in - forwards. - */ - int64 fees_incoming_msat = 4; -} - -message ChannelInsightsRequest { -} - -message ChannelInsightsResponse { - // Insights for the set of currently open channels. - repeated ChannelInsight channel_insights = 1; -} - -message ChannelInsight { - // The outpoint of the channel's funding transaction. - string chan_point = 1; - - /* - The amount of time in seconds that we have monitored the channel peer's - uptime for. - */ - uint64 monitored_seconds = 2; - - /* - The amount of time in seconds that the channel peer has been online over - the period it has been monitored for. - */ - uint64 uptime_seconds = 3; - - /* - The volume, in millisatoshis, that has been forwarded with this channel as - the incoming channel. - */ - int64 volume_incoming_msat = 4; - - /* - The volume, in millisatoshis, that has been forwarded with this channel as - the outgoing channel. - */ - int64 volume_outgoing_msat = 5; - - /* - The total fees earned by this channel for its participation in forwards, - expressed in millisatoshis. Note that we attribute fees evenly across - incoming and outgoing channels. - */ - int64 fees_earned_msat = 6; - - // The number of confirmations the funding transaction has. - uint32 confirmations = 7; - - // True if the channel is private. - bool private = 8; -} - -/* -Granularity describes the aggregation level at which the Bitcoin price should -be queried. Note that setting lower levels of granularity may require more -queries to the fiat backend. -*/ -enum Granularity { - UNKNOWN_GRANULARITY = 0; - MINUTE = 1; - FIVE_MINUTES = 2; - FIFTEEN_MINUTES = 3; - THIRTY_MINUTES = 4; - HOUR = 5; - SIX_HOURS = 6; - TWELVE_HOURS = 7; - DAY = 8; -} - -/* -FiatBackend is the API endpoint to be used for any fiat related queries. -*/ -enum FiatBackend { - UNKNOWN_FIATBACKEND = 0; - - // Use the CoinCap API for fiat price information. - // This API is reached through the following URL: - // https://api.coincap.io/v2/assets/bitcoin/history - COINCAP = 1; - - // Use the CoinDesk API for fiat price information. - // This API is reached through the following URL: - // https://api.coindesk.com/v1/bpi/historical/close.json - COINDESK = 2; - - // Use custom price data provided in a CSV file for fiat price information. - CUSTOM = 3; - - // 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 = 4; -} - -message ExchangeRateRequest { - reserved 1; - - reserved 2; - - // A set of timestamps for which we want the bitcoin price. - repeated uint64 timestamps = 3; - - // The level of granularity at which we want the bitcoin price to be quoted. - Granularity granularity = 4; - - // The api to be used for fiat related queries. - FiatBackend fiat_backend = 5; - - // Custom price points to use if the CUSTOM FiatBackend option is set. - repeated BitcoinPrice custom_prices = 8; -} - -message ExchangeRateResponse { - reserved 1; - - // Rates contains a set of exchange rates for the set of timestamps - repeated ExchangeRate rates = 2; -} - -message BitcoinPrice { - // The price of 1 BTC, expressed in USD. - string price = 1; - - // The timestamp for this price price provided. - uint64 price_timestamp = 2; - - // The currency that the price is denoted in. - string currency = 3; -} - -message ExchangeRate { - // timestamp is the timestamp of the original request made. - uint64 timestamp = 1; - - /* - Price is the bitcoin price approximation for the timestamp queried. Note - that this value has its own timestamp because we are not guaranteed to get - price points for the exact timestamp that was queried. - */ - BitcoinPrice btc_price = 2; -} - -message NodeAuditRequest { - // The unix time from which to produce the report, inclusive. - uint64 start_time = 1; - - // The unix time until which to produce the report, exclusive. - uint64 end_time = 2; - - reserved 3; - - /* - Set to generate a report without conversion to fiat. If set, fiat values - will display as 0. - */ - bool disable_fiat = 4; - - // The level of granularity at which we wish to produce fiat prices. - Granularity granularity = 5; - - /* - An optional set of custom categories which can be used to identify bespoke - categories in the report. Each category must have a unique name, and may not - have common identifier regexes. Transactions that are matched to these - categories report the category name in the CustomCategory field. - */ - repeated CustomCategory custom_categories = 6; - - // The api to be used for fiat related queries. - FiatBackend fiat_backend = 7; - - // Custom price points to use if the CUSTOM FiatBackend option is set. - repeated BitcoinPrice custom_prices = 8; -} - -message CustomCategory { - /* - The name for the custom category which will contain all transactions that - are labelled with a string matching one of the regexes provided in - label identifiers. - */ - string name = 1; - - /* - Set to true to apply this category to on chain transactions. Can be set in - conjunction with off_chain to apply the category to all transactions. - */ - bool on_chain = 2; - - /* - Set to true to apply this category to off chain transactions. Can be set in - conjunction with on_chain to apply the category to all transactions. - */ - bool off_chain = 3; - - /* - A set of regular expressions which identify transactions by their label as - belonging in this custom category. If a label matches any single regex in - the set, it is considered to be in the category. These expressions will be - matched against various labels that are present in lnd: on chain - transactions will be matched against their label field, off chain receipts - will be matched against their memo. At present, there is no way to match - forwards or off chain payments. These expressions must be unique across - custom categories, otherwise faraday will not be able to identify which - custom category a transaction belongs in. - */ - repeated string label_patterns = 5; -} - -enum EntryType { - UNKNOWN = 0; - - // A channel opening transaction for a channel opened by our node. - LOCAL_CHANNEL_OPEN = 1; - - // A channel opening transaction for a channel opened by a remote node. - REMOTE_CHANNEL_OPEN = 2; - - // The on chain fee paid to open a channel. - CHANNEL_OPEN_FEE = 3; - - // A channel closing transaction. - CHANNEL_CLOSE = 4; - - // Receipt of funds. On chain this reflects receives, off chain settlement - // of invoices. - RECEIPT = 5; - - // Payment of funds. On chain this reflects sends, off chain settlement - // of our payments. - PAYMENT = 6; - - // Payment of fees. - FEE = 7; - - // Receipt of a payment to ourselves. - CIRCULAR_RECEIPT = 8; - - // A forward through our node. - FORWARD = 9; - - // Fees earned from forwarding. - FORWARD_FEE = 10; - - // Sending of a payment to ourselves. - CIRCULAR_PAYMENT = 11; - - // The fees paid to send an off chain payment to ourselves. - CIRCULAR_FEE = 12; - - // A transaction that sweeps funds back into our wallet's control. - SWEEP = 13; - - // The amount of fees paid for a sweep transaction. - SWEEP_FEE = 14; - - // The fees paid to close a channel. - CHANNEL_CLOSE_FEE = 15; -} - -message ReportEntry { - // The unix timestamp of the event. - uint64 timestamp = 1; - - // Whether the entry occurred on chain or off chain. - bool on_chain = 2; - - // The amount of the entry, expressed in millisatoshis. - uint64 amount = 3; - - // Whether the entry is a credit or a debit. - bool credit = 4; - - // The asset affected by the entry. - string asset = 5; - - // The kind of activity that this entry represents. - EntryType type = 6; - - /* - This field will be populated for entry type custom, and represents the name - of a custom category that the report was produced with. - */ - string custom_category = 12; - - // The transaction id of the entry. - string txid = 7; - - // The fiat amount of the entry's amount in the currency specified in the - // btc_price field. - string fiat = 8; - - // A unique identifier for the entry, if available. - string reference = 9; - - // An additional note for the entry, providing additional context. - string note = 10; - - // The bitcoin price and timestamp used to calculate our fiat value. - BitcoinPrice btc_price = 11; -} - -message NodeAuditResponse { - // On chain reports for the period queried. - repeated ReportEntry reports = 1; -} - -message CloseReportRequest { - /* - The funding outpoint of the channel the report should be created for, - formatted txid:outpoint. - */ - string channel_point = 1; -} - -message CloseReportResponse { - // The funding outpoint of the channel. - string channel_point = 1; - - // True if we opened the channel, false if the remote peer did. - bool channel_initiator = 2; - - // The type of close that resolved this channel. - string close_type = 3; - - // The transaction id of the close transaction that confirmed on chain. - string close_txid = 4; - - /* - The fee we paid on chain to open this channel in satoshis, note that this - field will be zero if the remote party paid. - */ - string open_fee = 5; - - /* - The fee we paid on chain for the close transaction in staoshis, note that - this field will be zero if the remote party paid. - */ - string close_fee = 6; -} diff --git a/protos/lnd/v0.15.1-beta/autopilotrpc/autopilot.proto b/protos/lnd/v0.15.1-beta/autopilotrpc/autopilot.proto deleted file mode 100644 index 67d0f9e..0000000 --- a/protos/lnd/v0.15.1-beta/autopilotrpc/autopilot.proto +++ /dev/null @@ -1,80 +0,0 @@ -syntax = "proto3"; - -package autopilotrpc; - -option go_package = "github.com/lightningnetwork/lnd/lnrpc/autopilotrpc"; - -// Autopilot is a service that can be used to get information about the current -// state of the daemon's autopilot agent, and also supply it with information -// that can be used when deciding where to open channels. -service Autopilot { - /* - Status returns whether the daemon's autopilot agent is active. - */ - rpc Status (StatusRequest) returns (StatusResponse); - - /* - ModifyStatus is used to modify the status of the autopilot agent, like - enabling or disabling it. - */ - rpc ModifyStatus (ModifyStatusRequest) returns (ModifyStatusResponse); - - /* - QueryScores queries all available autopilot heuristics, in addition to any - active combination of these heruristics, for the scores they would give to - the given nodes. - */ - rpc QueryScores (QueryScoresRequest) returns (QueryScoresResponse); - - /* - SetScores attempts to set the scores used by the running autopilot agent, - if the external scoring heuristic is enabled. - */ - rpc SetScores (SetScoresRequest) returns (SetScoresResponse); -} - -message StatusRequest { -} - -message StatusResponse { - // Indicates whether the autopilot is active or not. - bool active = 1; -} - -message ModifyStatusRequest { - // Whether the autopilot agent should be enabled or not. - bool enable = 1; -} - -message ModifyStatusResponse { -} - -message QueryScoresRequest { - repeated string pubkeys = 1; - - // If set, we will ignore the local channel state when calculating scores. - bool ignore_local_state = 2; -} - -message QueryScoresResponse { - message HeuristicResult { - string heuristic = 1; - map scores = 2; - } - - repeated HeuristicResult results = 1; -} - -message SetScoresRequest { - // The name of the heuristic to provide scores to. - string heuristic = 1; - - /* - A map from hex-encoded public keys to scores. Scores must be in the range - [0.0, 1.0]. - */ - map scores = 2; -} - -message SetScoresResponse { -} diff --git a/protos/lnd/v0.15.1-beta/chainrpc/chainnotifier.proto b/protos/lnd/v0.15.1-beta/chainrpc/chainnotifier.proto deleted file mode 100644 index 4045d81..0000000 --- a/protos/lnd/v0.15.1-beta/chainrpc/chainnotifier.proto +++ /dev/null @@ -1,188 +0,0 @@ -syntax = "proto3"; - -package chainrpc; - -option go_package = "github.com/lightningnetwork/lnd/lnrpc/chainrpc"; - -// ChainNotifier is a service that can be used to get information about the -// chain backend by registering notifiers for chain events. -service ChainNotifier { - /* - RegisterConfirmationsNtfn is a synchronous response-streaming RPC that - registers an intent for a client to be notified once a confirmation request - has reached its required number of confirmations on-chain. - - 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. - */ - rpc RegisterConfirmationsNtfn (ConfRequest) returns (stream ConfEvent); - - /* - RegisterSpendNtfn is a synchronous response-streaming RPC that registers an - intent for a client to be notification once a spend request has been spent - by a transaction that has confirmed on-chain. - - A client can specify whether the spend request should be for a particular - outpoint or for an output script by specifying a zero outpoint. - */ - rpc RegisterSpendNtfn (SpendRequest) returns (stream SpendEvent); - - /* - RegisterBlockEpochNtfn is a synchronous response-streaming RPC that - registers an intent for a client to be notified of blocks in the chain. The - stream will return a hash and height tuple of a block for each new/stale - block in the chain. It is the client's responsibility to determine whether - the tuple returned is for a new or stale block in the chain. - - A client can also request a historical backlog of blocks from a particular - point. This allows clients to be idempotent by ensuring that they do not - missing processing a single block within the chain. - */ - rpc RegisterBlockEpochNtfn (BlockEpoch) returns (stream BlockEpoch); -} - -message ConfRequest { - /* - The transaction hash for which we should request a confirmation notification - for. If set to a hash of all zeros, then the confirmation notification will - be requested for the script instead. - */ - bytes txid = 1; - - /* - An output script within a transaction with the hash above which will be used - by light clients to match block filters. If the transaction hash is set to a - hash of all zeros, then a confirmation notification will be requested for - this script instead. - */ - bytes script = 2; - - /* - The number of desired confirmations the transaction/output script should - reach before dispatching a confirmation notification. - */ - uint32 num_confs = 3; - - /* - The earliest height in the chain for which the transaction/output script - could have been included in a block. This should in most cases be set to the - broadcast height of the transaction/output script. - */ - uint32 height_hint = 4; -} - -message ConfDetails { - // The raw bytes of the confirmed transaction. - bytes raw_tx = 1; - - // The hash of the block in which the confirmed transaction was included in. - bytes block_hash = 2; - - // The height of the block in which the confirmed transaction was included - // in. - uint32 block_height = 3; - - // The index of the confirmed transaction within the transaction. - uint32 tx_index = 4; -} - -message Reorg { - // TODO(wilmer): need to know how the client will use this first. -} - -message ConfEvent { - oneof event { - /* - An event that includes the confirmation details of the request - (txid/ouput script). - */ - ConfDetails conf = 1; - - /* - An event send when the transaction of the request is reorged out of the - chain. - */ - Reorg reorg = 2; - } -} - -message Outpoint { - // The hash of the transaction. - bytes hash = 1; - - // The index of the output within the transaction. - uint32 index = 2; -} - -message 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. 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 = 1; - - /* - The output script for the outpoint above. This will be used by light clients - to match block filters. If the outpoint is set to a zero outpoint, then a - spend notification will be requested for this script instead. - */ - bytes script = 2; - - /* - The earliest height in the chain for which the outpoint/output script could - have been spent. This should in most cases be set to the broadcast height of - the outpoint/output script. - */ - uint32 height_hint = 3; - - // TODO(wilmer): extend to support num confs on spending tx. -} - -message SpendDetails { - // The outpoint was that spent. - Outpoint spending_outpoint = 1; - - // The raw bytes of the spending transaction. - bytes raw_spending_tx = 2; - - // The hash of the spending transaction. - bytes spending_tx_hash = 3; - - // The input of the spending transaction that fulfilled the spend request. - uint32 spending_input_index = 4; - - // The height at which the spending transaction was included in a block. - uint32 spending_height = 5; -} - -message SpendEvent { - oneof event { - /* - An event that includes the details of the spending transaction of the - request (outpoint/output script). - */ - SpendDetails spend = 1; - - /* - An event sent when the spending transaction of the request was - reorged out of the chain. - */ - Reorg reorg = 2; - } -} - -message BlockEpoch { - // The hash of the block. - bytes hash = 1; - - // The height of the block. - uint32 height = 2; -} diff --git a/protos/lnd/v0.15.1-beta/invoicesrpc/invoices.proto b/protos/lnd/v0.15.1-beta/invoicesrpc/invoices.proto deleted file mode 100644 index f98c64a..0000000 --- a/protos/lnd/v0.15.1-beta/invoicesrpc/invoices.proto +++ /dev/null @@ -1,175 +0,0 @@ -syntax = "proto3"; - -import "lightning.proto"; - -package invoicesrpc; - -option go_package = "github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"; - -// Invoices is a service that can be used to create, accept, settle and cancel -// invoices. -service Invoices { - /* - SubscribeSingleInvoice returns a uni-directional stream (server -> client) - to notify the client of state transitions of the specified invoice. - Initially the current invoice state is always sent out. - */ - rpc SubscribeSingleInvoice (SubscribeSingleInvoiceRequest) - returns (stream lnrpc.Invoice); - - /* - CancelInvoice cancels a currently open invoice. If the invoice is already - canceled, this call will succeed. If the invoice is already settled, it will - fail. - */ - rpc CancelInvoice (CancelInvoiceMsg) returns (CancelInvoiceResp); - - /* - AddHoldInvoice creates a hold invoice. It ties the invoice to the hash - supplied in the request. - */ - rpc AddHoldInvoice (AddHoldInvoiceRequest) returns (AddHoldInvoiceResp); - - /* - SettleInvoice settles an accepted invoice. If the invoice is already - settled, this call will succeed. - */ - rpc SettleInvoice (SettleInvoiceMsg) returns (SettleInvoiceResp); - - /* - LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced - using either its payment hash, payment address, or set ID. - */ - rpc LookupInvoiceV2 (LookupInvoiceMsg) returns (lnrpc.Invoice); -} - -message CancelInvoiceMsg { - // Hash corresponding to the (hold) invoice to cancel. When using - // REST, this field must be encoded as base64. - bytes payment_hash = 1; -} -message CancelInvoiceResp { -} - -message AddHoldInvoiceRequest { - /* - An optional memo to attach along with the invoice. Used for record keeping - purposes for the invoice's creator, and will also be set in the description - field of the encoded payment request if the description_hash field is not - being used. - */ - string memo = 1; - - // The hash of the preimage - bytes hash = 2; - - /* - The value of this invoice in satoshis - - The fields value and value_msat are mutually exclusive. - */ - int64 value = 3; - - /* - The value of this invoice in millisatoshis - - The fields value and value_msat are mutually exclusive. - */ - int64 value_msat = 10; - - /* - Hash (SHA-256) of a description of the payment. Used if the description of - payment (memo) is too long to naturally fit within the description field - of an encoded payment request. - */ - bytes description_hash = 4; - - // Payment request expiry time in seconds. Default is 3600 (1 hour). - int64 expiry = 5; - - // Fallback on-chain address. - string fallback_addr = 6; - - // Delta to use for the time-lock of the CLTV extended to the final hop. - uint64 cltv_expiry = 7; - - /* - Route hints that can each be individually used to assist in reaching the - invoice's destination. - */ - repeated lnrpc.RouteHint route_hints = 8; - - // Whether this invoice should include routing hints for private channels. - bool private = 9; -} - -message AddHoldInvoiceResp { - /* - A bare-bones invoice for a payment within the Lightning Network. With the - details of the invoice, the sender has all the data necessary to send a - payment to the recipient. - */ - string payment_request = 1; - - /* - The "add" index of this invoice. Each newly created invoice will increment - this index making it monotonically increasing. Callers to the - SubscribeInvoices call can use this to instantly get notified of all added - invoices with an add_index greater than this one. - */ - uint64 add_index = 2; - - /* - The payment address of the generated invoice. This value should be used - in all payments for this invoice as we require it for end to end - security. - */ - bytes payment_addr = 3; -} - -message SettleInvoiceMsg { - // Externally discovered pre-image that should be used to settle the hold - // invoice. - bytes preimage = 1; -} - -message SettleInvoiceResp { -} - -message SubscribeSingleInvoiceRequest { - reserved 1; - - // Hash corresponding to the (hold) invoice to subscribe to. When using - // REST, this field must be encoded as base64url. - bytes r_hash = 2; -} - -enum LookupModifier { - // The default look up modifier, no look up behavior is changed. - DEFAULT = 0; - - /* - Indicates that when a look up is done based on a set_id, then only that set - of HTLCs related to that set ID should be returned. - */ - HTLC_SET_ONLY = 1; - - /* - Indicates that when a look up is done using a payment_addr, then no HTLCs - related to the payment_addr should be returned. This is useful when one - wants to be able to obtain the set of associated setIDs with a given - invoice, then look up the sub-invoices "projected" by that set ID. - */ - HTLC_SET_BLANK = 2; -} - -message LookupInvoiceMsg { - oneof invoice_ref { - // When using REST, this field must be encoded as base64. - bytes payment_hash = 1; - bytes payment_addr = 2; - bytes set_id = 3; - } - - LookupModifier lookup_modifier = 4; -} diff --git a/protos/lnd/v0.15.1-beta/lightning.proto b/protos/lnd/v0.15.1-beta/lightning.proto deleted file mode 100644 index b1716e3..0000000 --- a/protos/lnd/v0.15.1-beta/lightning.proto +++ /dev/null @@ -1,4593 +0,0 @@ -syntax = "proto3"; - -package lnrpc; - -option go_package = "github.com/lightningnetwork/lnd/lnrpc"; - -/* - * Comments in this file will be directly parsed into the API - * Documentation as descriptions of the associated method, message, or field. - * These descriptions should go right above the definition of the object, and - * can be in either block or // comment format. - * - * An RPC method can be matched to an lncli command by placing a line in the - * beginning of the description in exactly the following format: - * lncli: `methodname` - * - * Failure to specify the exact name of the command will cause documentation - * generation to fail. - * - * More information on how exactly the gRPC documentation is generated from - * this proto file can be found here: - * https://github.com/lightninglabs/lightning-api - */ - -// Lightning is the main RPC server of the daemon. -service Lightning { - /* lncli: `walletbalance` - WalletBalance returns total unspent outputs(confirmed and unconfirmed), all - confirmed unspent outputs and all unconfirmed unspent outputs under control - of the wallet. - */ - rpc WalletBalance (WalletBalanceRequest) returns (WalletBalanceResponse); - - /* lncli: `channelbalance` - ChannelBalance returns a report on the total funds across all open channels, - categorized in local/remote, pending local/remote and unsettled local/remote - balances. - */ - rpc ChannelBalance (ChannelBalanceRequest) returns (ChannelBalanceResponse); - - /* lncli: `listchaintxns` - GetTransactions returns a list describing all the known transactions - relevant to the wallet. - */ - rpc GetTransactions (GetTransactionsRequest) returns (TransactionDetails); - - /* lncli: `estimatefee` - EstimateFee asks the chain backend to estimate the fee rate and total fees - for a transaction that pays to multiple specified outputs. - - When using REST, the `AddrToAmount` map type can be set by appending - `&AddrToAmount[
]=` to the URL. Unfortunately this - map type doesn't appear in the REST API documentation because of a bug in - the grpc-gateway library. - */ - rpc EstimateFee (EstimateFeeRequest) returns (EstimateFeeResponse); - - /* lncli: `sendcoins` - SendCoins executes a request to send coins to a particular address. Unlike - SendMany, this RPC call only allows creating a single output at a time. If - neither target_conf, or sat_per_vbyte are set, then the internal wallet will - consult its fee model to determine a fee for the default confirmation - target. - */ - rpc SendCoins (SendCoinsRequest) returns (SendCoinsResponse); - - /* lncli: `listunspent` - Deprecated, use walletrpc.ListUnspent instead. - - ListUnspent returns a list of all utxos spendable by the wallet with a - number of confirmations between the specified minimum and maximum. - */ - rpc ListUnspent (ListUnspentRequest) returns (ListUnspentResponse); - - /* - SubscribeTransactions creates a uni-directional stream from the server to - the client in which any newly discovered transactions relevant to the - wallet are sent over. - */ - rpc SubscribeTransactions (GetTransactionsRequest) - returns (stream Transaction); - - /* lncli: `sendmany` - SendMany handles a request for a transaction that creates multiple specified - outputs in parallel. If neither target_conf, or sat_per_vbyte are set, then - the internal wallet will consult its fee model to determine a fee for the - default confirmation target. - */ - rpc SendMany (SendManyRequest) returns (SendManyResponse); - - /* lncli: `newaddress` - NewAddress creates a new address under control of the local wallet. - */ - rpc NewAddress (NewAddressRequest) returns (NewAddressResponse); - - /* lncli: `signmessage` - SignMessage signs a message with this node's private key. The returned - signature string is `zbase32` encoded and pubkey recoverable, meaning that - only the message digest and signature are needed for verification. - */ - rpc SignMessage (SignMessageRequest) returns (SignMessageResponse); - - /* lncli: `verifymessage` - VerifyMessage verifies a signature over a msg. The signature must be - zbase32 encoded and signed by an active node in the resident node's - channel database. In addition to returning the validity of the signature, - VerifyMessage also returns the recovered pubkey from the signature. - */ - rpc VerifyMessage (VerifyMessageRequest) returns (VerifyMessageResponse); - - /* lncli: `connect` - ConnectPeer attempts to establish a connection to a remote peer. This is at - the networking level, and is used for communication between nodes. This is - distinct from establishing a channel with a peer. - */ - rpc ConnectPeer (ConnectPeerRequest) returns (ConnectPeerResponse); - - /* lncli: `disconnect` - DisconnectPeer attempts to disconnect one peer from another identified by a - given pubKey. In the case that we currently have a pending or active channel - with the target peer, then this action will be not be allowed. - */ - rpc DisconnectPeer (DisconnectPeerRequest) returns (DisconnectPeerResponse); - - /* lncli: `listpeers` - ListPeers returns a verbose listing of all currently active peers. - */ - rpc ListPeers (ListPeersRequest) returns (ListPeersResponse); - - /* - SubscribePeerEvents creates a uni-directional stream from the server to - the client in which any events relevant to the state of peers are sent - over. Events include peers going online and offline. - */ - rpc SubscribePeerEvents (PeerEventSubscription) returns (stream PeerEvent); - - /* lncli: `getinfo` - GetInfo returns general information concerning the lightning node including - it's identity pubkey, alias, the chains it is connected to, and information - concerning the number of open+pending channels. - */ - rpc GetInfo (GetInfoRequest) returns (GetInfoResponse); - - /** lncli: `getrecoveryinfo` - GetRecoveryInfo returns information concerning the recovery mode including - whether it's in a recovery mode, whether the recovery is finished, and the - progress made so far. - */ - rpc GetRecoveryInfo (GetRecoveryInfoRequest) - returns (GetRecoveryInfoResponse); - - // TODO(roasbeef): merge with below with bool? - /* lncli: `pendingchannels` - PendingChannels returns a list of all the channels that are currently - considered "pending". A channel is pending if it has finished the funding - workflow and is waiting for confirmations for the funding txn, or is in the - process of closure, either initiated cooperatively or non-cooperatively. - */ - rpc PendingChannels (PendingChannelsRequest) - returns (PendingChannelsResponse); - - /* lncli: `listchannels` - ListChannels returns a description of all the open channels that this node - is a participant in. - */ - rpc ListChannels (ListChannelsRequest) returns (ListChannelsResponse); - - /* - SubscribeChannelEvents creates a uni-directional stream from the server to - the client in which any updates relevant to the state of the channels are - sent over. Events include new active channels, inactive channels, and closed - channels. - */ - rpc SubscribeChannelEvents (ChannelEventSubscription) - returns (stream ChannelEventUpdate); - - /* lncli: `closedchannels` - ClosedChannels returns a description of all the closed channels that - this node was a participant in. - */ - rpc ClosedChannels (ClosedChannelsRequest) returns (ClosedChannelsResponse); - - /* - OpenChannelSync is a synchronous version of the OpenChannel RPC call. This - call is meant to be consumed by clients to the REST proxy. As with all - other sync calls, all byte slices are intended to be populated as hex - encoded strings. - */ - rpc OpenChannelSync (OpenChannelRequest) returns (ChannelPoint); - - /* lncli: `openchannel` - OpenChannel attempts to open a singly funded channel specified in the - request to a remote peer. Users are able to specify a target number of - blocks that the funding transaction should be confirmed in, or a manual fee - rate to us for the funding transaction. If neither are specified, then a - lax block confirmation target is used. Each OpenStatusUpdate will return - the pending channel ID of the in-progress channel. Depending on the - arguments specified in the OpenChannelRequest, this pending channel ID can - then be used to manually progress the channel funding flow. - */ - rpc OpenChannel (OpenChannelRequest) returns (stream OpenStatusUpdate); - - /* lncli: `batchopenchannel` - BatchOpenChannel attempts to open multiple single-funded channels in a - single transaction in an atomic way. This means either all channel open - requests succeed at once or all attempts are aborted if any of them fail. - This is the safer variant of using PSBTs to manually fund a batch of - channels through the OpenChannel RPC. - */ - rpc BatchOpenChannel (BatchOpenChannelRequest) - returns (BatchOpenChannelResponse); - - /* - FundingStateStep is an advanced funding related call that allows the caller - to either execute some preparatory steps for a funding workflow, or - manually progress a funding workflow. The primary way a funding flow is - identified is via its pending channel ID. As an example, this method can be - used to specify that we're expecting a funding flow for a particular - pending channel ID, for which we need to use specific parameters. - Alternatively, this can be used to interactively drive PSBT signing for - funding for partially complete funding transactions. - */ - rpc FundingStateStep (FundingTransitionMsg) returns (FundingStateStepResp); - - /* - ChannelAcceptor dispatches a bi-directional streaming RPC in which - OpenChannel requests are sent to the client and the client responds with - a boolean that tells LND whether or not to accept the channel. This allows - node operators to specify their own criteria for accepting inbound channels - through a single persistent connection. - */ - rpc ChannelAcceptor (stream ChannelAcceptResponse) - returns (stream ChannelAcceptRequest); - - /* lncli: `closechannel` - CloseChannel attempts to close an active channel identified by its channel - outpoint (ChannelPoint). The actions of this method can additionally be - augmented to attempt a force close after a timeout period in the case of an - inactive peer. If a non-force close (cooperative closure) is requested, - then the user can specify either a target number of blocks until the - closure transaction is confirmed, or a manual fee rate. If neither are - specified, then a default lax, block confirmation target is used. - */ - rpc CloseChannel (CloseChannelRequest) returns (stream CloseStatusUpdate); - - /* lncli: `abandonchannel` - AbandonChannel removes all channel state from the database except for a - close summary. This method can be used to get rid of permanently unusable - channels due to bugs fixed in newer versions of lnd. This method can also be - used to remove externally funded channels where the funding transaction was - never broadcast. Only available for non-externally funded channels in dev - build. - */ - rpc AbandonChannel (AbandonChannelRequest) returns (AbandonChannelResponse); - - /* lncli: `sendpayment` - Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a - bi-directional streaming RPC for sending payments through the Lightning - Network. A single RPC invocation creates a persistent bi-directional - stream allowing clients to rapidly send payments through the Lightning - Network with a single persistent connection. - */ - rpc SendPayment (stream SendRequest) returns (stream SendResponse) { - option deprecated = true; - } - - /* - SendPaymentSync is the synchronous non-streaming version of SendPayment. - This RPC is intended to be consumed by clients of the REST proxy. - Additionally, this RPC expects the destination's public key and the payment - hash (if any) to be encoded as hex strings. - */ - rpc SendPaymentSync (SendRequest) returns (SendResponse); - - /* lncli: `sendtoroute` - Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional - streaming RPC for sending payment through the Lightning Network. This - method differs from SendPayment in that it allows users to specify a full - route manually. This can be used for things like rebalancing, and atomic - swaps. - */ - rpc SendToRoute (stream SendToRouteRequest) returns (stream SendResponse) { - option deprecated = true; - } - - /* - SendToRouteSync is a synchronous version of SendToRoute. It Will block - until the payment either fails or succeeds. - */ - rpc SendToRouteSync (SendToRouteRequest) returns (SendResponse); - - /* lncli: `addinvoice` - AddInvoice attempts to add a new invoice to the invoice database. Any - duplicated invoices are rejected, therefore all invoices *must* have a - unique payment preimage. - */ - rpc AddInvoice (Invoice) returns (AddInvoiceResponse); - - /* lncli: `listinvoices` - ListInvoices returns a list of all the invoices currently stored within the - database. Any active debug invoices are ignored. It has full support for - paginated responses, allowing users to query for specific invoices through - their add_index. This can be done by using either the first_index_offset or - last_index_offset fields included in the response as the index_offset of the - next request. By default, the first 100 invoices created will be returned. - Backwards pagination is also supported through the Reversed flag. - */ - rpc ListInvoices (ListInvoiceRequest) returns (ListInvoiceResponse); - - /* lncli: `lookupinvoice` - LookupInvoice attempts to look up an invoice according to its payment hash. - The passed payment hash *must* be exactly 32 bytes, if not, an error is - returned. - */ - rpc LookupInvoice (PaymentHash) returns (Invoice); - - /* - SubscribeInvoices returns a uni-directional stream (server -> client) for - notifying the client of newly added/settled invoices. The caller can - optionally specify the add_index and/or the settle_index. If the add_index - is specified, then we'll first start by sending add invoice events for all - invoices with an add_index greater than the specified value. If the - settle_index is specified, the next, we'll send out all settle events for - invoices with a settle_index greater than the specified value. One or both - of these fields can be set. If no fields are set, then we'll only send out - the latest add/settle events. - */ - rpc SubscribeInvoices (InvoiceSubscription) returns (stream Invoice); - - /* lncli: `decodepayreq` - DecodePayReq takes an encoded payment request string and attempts to decode - it, returning a full description of the conditions encoded within the - payment request. - */ - rpc DecodePayReq (PayReqString) returns (PayReq); - - /* lncli: `listpayments` - ListPayments returns a list of all outgoing payments. - */ - rpc ListPayments (ListPaymentsRequest) returns (ListPaymentsResponse); - - /* - DeletePayment deletes an outgoing payment from DB. Note that it will not - attempt to delete an In-Flight payment, since that would be unsafe. - */ - rpc DeletePayment (DeletePaymentRequest) returns (DeletePaymentResponse); - - /* - DeleteAllPayments deletes all outgoing payments from DB. Note that it will - not attempt to delete In-Flight payments, since that would be unsafe. - */ - rpc DeleteAllPayments (DeleteAllPaymentsRequest) - returns (DeleteAllPaymentsResponse); - - /* lncli: `describegraph` - DescribeGraph returns a description of the latest graph state from the - point of view of the node. The graph information is partitioned into two - components: all the nodes/vertexes, and all the edges that connect the - vertexes themselves. As this is a directed graph, the edges also contain - the node directional specific routing policy which includes: the time lock - delta, fee information, etc. - */ - rpc DescribeGraph (ChannelGraphRequest) returns (ChannelGraph); - - /* lncli: `getnodemetrics` - GetNodeMetrics returns node metrics calculated from the graph. Currently - the only supported metric is betweenness centrality of individual nodes. - */ - rpc GetNodeMetrics (NodeMetricsRequest) returns (NodeMetricsResponse); - - /* lncli: `getchaninfo` - GetChanInfo returns the latest authenticated network announcement for the - given channel identified by its channel ID: an 8-byte integer which - uniquely identifies the location of transaction's funding output within the - blockchain. - */ - rpc GetChanInfo (ChanInfoRequest) returns (ChannelEdge); - - /* lncli: `getnodeinfo` - GetNodeInfo returns the latest advertised, aggregated, and authenticated - channel information for the specified node identified by its public key. - */ - rpc GetNodeInfo (NodeInfoRequest) returns (NodeInfo); - - /* lncli: `queryroutes` - QueryRoutes attempts to query the daemon's Channel Router for a possible - route to a target destination capable of carrying a specific amount of - satoshis. The returned route contains the full details required to craft and - send an HTLC, also including the necessary information that should be - present within the Sphinx packet encapsulated within the HTLC. - - When using REST, the `dest_custom_records` map type can be set by appending - `&dest_custom_records[]=` - to the URL. Unfortunately this map type doesn't appear in the REST API - documentation because of a bug in the grpc-gateway library. - */ - rpc QueryRoutes (QueryRoutesRequest) returns (QueryRoutesResponse); - - /* lncli: `getnetworkinfo` - GetNetworkInfo returns some basic stats about the known channel graph from - the point of view of the node. - */ - rpc GetNetworkInfo (NetworkInfoRequest) returns (NetworkInfo); - - /* lncli: `stop` - StopDaemon will send a shutdown request to the interrupt handler, triggering - a graceful shutdown of the daemon. - */ - rpc StopDaemon (StopRequest) returns (StopResponse); - - /* - SubscribeChannelGraph launches a streaming RPC that allows the caller to - receive notifications upon any changes to the channel graph topology from - the point of view of the responding node. Events notified include: new - nodes coming online, nodes updating their authenticated attributes, new - channels being advertised, updates in the routing policy for a directional - channel edge, and when channels are closed on-chain. - */ - rpc SubscribeChannelGraph (GraphTopologySubscription) - returns (stream GraphTopologyUpdate); - - /* lncli: `debuglevel` - DebugLevel allows a caller to programmatically set the logging verbosity of - lnd. The logging can be targeted according to a coarse daemon-wide logging - level, or in a granular fashion to specify the logging for a target - sub-system. - */ - rpc DebugLevel (DebugLevelRequest) returns (DebugLevelResponse); - - /* lncli: `feereport` - FeeReport allows the caller to obtain a report detailing the current fee - schedule enforced by the node globally for each channel. - */ - rpc FeeReport (FeeReportRequest) returns (FeeReportResponse); - - /* lncli: `updatechanpolicy` - UpdateChannelPolicy allows the caller to update the fee schedule and - channel policies for all channels globally, or a particular channel. - */ - rpc UpdateChannelPolicy (PolicyUpdateRequest) - returns (PolicyUpdateResponse); - - /* lncli: `fwdinghistory` - ForwardingHistory allows the caller to query the htlcswitch for a record of - all HTLCs forwarded within the target time range, and integer offset - within that time range, for a maximum number of events. If no maximum number - of events is specified, up to 100 events will be returned. If no time-range - is specified, then events will be returned in the order that they occured. - - A list of forwarding events are returned. The size of each forwarding event - is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB. - As a result each message can only contain 50k entries. Each response has - the index offset of the last entry. The index offset can be provided to the - request to allow the caller to skip a series of records. - */ - rpc ForwardingHistory (ForwardingHistoryRequest) - returns (ForwardingHistoryResponse); - - /* lncli: `exportchanbackup` - ExportChannelBackup attempts to return an encrypted static channel backup - for the target channel identified by it channel point. The backup is - encrypted with a key generated from the aezeed seed of the user. The - returned backup can either be restored using the RestoreChannelBackup - method once lnd is running, or via the InitWallet and UnlockWallet methods - from the WalletUnlocker service. - */ - rpc ExportChannelBackup (ExportChannelBackupRequest) - returns (ChannelBackup); - - /* - ExportAllChannelBackups returns static channel backups for all existing - channels known to lnd. A set of regular singular static channel backups for - each channel are returned. Additionally, a multi-channel backup is returned - as well, which contains a single encrypted blob containing the backups of - each channel. - */ - rpc ExportAllChannelBackups (ChanBackupExportRequest) - returns (ChanBackupSnapshot); - - /* - VerifyChanBackup allows a caller to verify the integrity of a channel backup - snapshot. This method will accept either a packed Single or a packed Multi. - Specifying both will result in an error. - */ - rpc VerifyChanBackup (ChanBackupSnapshot) - returns (VerifyChanBackupResponse); - - /* lncli: `restorechanbackup` - RestoreChannelBackups accepts a set of singular channel backups, or a - single encrypted multi-chan backup and attempts to recover any funds - remaining within the channel. If we are able to unpack the backup, then the - new channel will be shown under listchannels, as well as pending channels. - */ - rpc RestoreChannelBackups (RestoreChanBackupRequest) - returns (RestoreBackupResponse); - - /* - SubscribeChannelBackups allows a client to sub-subscribe to the most up to - date information concerning the state of all channel backups. Each time a - new channel is added, we return the new set of channels, along with a - multi-chan backup containing the backup info for all channels. Each time a - channel is closed, we send a new update, which contains new new chan back - ups, but the updated set of encrypted multi-chan backups with the closed - channel(s) removed. - */ - rpc SubscribeChannelBackups (ChannelBackupSubscription) - returns (stream ChanBackupSnapshot); - - /* lncli: `bakemacaroon` - BakeMacaroon allows the creation of a new macaroon with custom read and - write permissions. No first-party caveats are added since this can be done - offline. - */ - rpc BakeMacaroon (BakeMacaroonRequest) returns (BakeMacaroonResponse); - - /* lncli: `listmacaroonids` - ListMacaroonIDs returns all root key IDs that are in use. - */ - rpc ListMacaroonIDs (ListMacaroonIDsRequest) - returns (ListMacaroonIDsResponse); - - /* lncli: `deletemacaroonid` - DeleteMacaroonID deletes the specified macaroon ID and invalidates all - macaroons derived from that ID. - */ - rpc DeleteMacaroonID (DeleteMacaroonIDRequest) - returns (DeleteMacaroonIDResponse); - - /* lncli: `listpermissions` - ListPermissions lists all RPC method URIs and their required macaroon - permissions to access them. - */ - rpc ListPermissions (ListPermissionsRequest) - returns (ListPermissionsResponse); - - /* - CheckMacaroonPermissions checks whether a request follows the constraints - imposed on the macaroon and that the macaroon is authorized to follow the - provided permissions. - */ - rpc CheckMacaroonPermissions (CheckMacPermRequest) - returns (CheckMacPermResponse); - - /* - RegisterRPCMiddleware adds a new gRPC middleware to the interceptor chain. A - gRPC middleware is software component external to lnd that aims to add - additional business logic to lnd by observing/intercepting/validating - incoming gRPC client requests and (if needed) replacing/overwriting outgoing - messages before they're sent to the client. When registering the middleware - must identify itself and indicate what custom macaroon caveats it wants to - be responsible for. Only requests that contain a macaroon with that specific - custom caveat are then sent to the middleware for inspection. The other - option is to register for the read-only mode in which all requests/responses - are forwarded for interception to the middleware but the middleware is not - allowed to modify any responses. As a security measure, _no_ middleware can - modify responses for requests made with _unencumbered_ macaroons! - */ - rpc RegisterRPCMiddleware (stream RPCMiddlewareResponse) - returns (stream RPCMiddlewareRequest); - - /* lncli: `sendcustom` - SendCustomMessage sends a custom peer message. - */ - rpc SendCustomMessage (SendCustomMessageRequest) - returns (SendCustomMessageResponse); - - /* lncli: `subscribecustom` - SubscribeCustomMessages subscribes to a stream of incoming custom peer - messages. - */ - rpc SubscribeCustomMessages (SubscribeCustomMessagesRequest) - returns (stream CustomMessage); - - /* lncli: `listaliases` - ListAliases returns the set of all aliases that have ever existed with - their confirmed SCID (if it exists) and/or the base SCID (in the case of - zero conf). - */ - rpc ListAliases (ListAliasesRequest) returns (ListAliasesResponse); -} - -message SubscribeCustomMessagesRequest { -} - -message CustomMessage { - // Peer from which the message originates - bytes peer = 1; - - // Message type. This value will be in the custom range (>= 32768). - uint32 type = 2; - - // Raw message data - bytes data = 3; -} - -message SendCustomMessageRequest { - // Peer to send the message to - bytes peer = 1; - - // Message type. This value needs to be in the custom range (>= 32768). - uint32 type = 2; - - // Raw message data. - bytes data = 3; -} - -message SendCustomMessageResponse { -} - -message Utxo { - // The type of address - AddressType address_type = 1; - - // The address - string address = 2; - - // The value of the unspent coin in satoshis - int64 amount_sat = 3; - - // The pkscript in hex - string pk_script = 4; - - // The outpoint in format txid:n - OutPoint outpoint = 5; - - // The number of confirmations for the Utxo - int64 confirmations = 6; -} - -enum OutputScriptType { - SCRIPT_TYPE_PUBKEY_HASH = 0; - SCRIPT_TYPE_SCRIPT_HASH = 1; - SCRIPT_TYPE_WITNESS_V0_PUBKEY_HASH = 2; - SCRIPT_TYPE_WITNESS_V0_SCRIPT_HASH = 3; - SCRIPT_TYPE_PUBKEY = 4; - SCRIPT_TYPE_MULTISIG = 5; - SCRIPT_TYPE_NULLDATA = 6; - SCRIPT_TYPE_NON_STANDARD = 7; - SCRIPT_TYPE_WITNESS_UNKNOWN = 8; -} - -message OutputDetail { - // The type of the output - OutputScriptType output_type = 1; - - // The address - string address = 2; - - // The pkscript in hex - string pk_script = 3; - - // The output index used in the raw transaction - int64 output_index = 4; - - // The value of the output coin in satoshis - int64 amount = 5; - - // Denotes if the output is controlled by the internal wallet - bool is_our_address = 6; -} - -message Transaction { - // The transaction hash - string tx_hash = 1; - - // The transaction amount, denominated in satoshis - int64 amount = 2; - - // The number of confirmations - int32 num_confirmations = 3; - - // The hash of the block this transaction was included in - string block_hash = 4; - - // The height of the block this transaction was included in - int32 block_height = 5; - - // Timestamp of this transaction - int64 time_stamp = 6; - - // Fees paid for this transaction - int64 total_fees = 7; - - // Addresses that received funds for this transaction. Deprecated as it is - // now incorporated in the output_details field. - repeated string dest_addresses = 8 [deprecated = true]; - - // Outputs that received funds for this transaction - repeated OutputDetail output_details = 11; - - // The raw transaction hex. - string raw_tx_hex = 9; - - // A label that was optionally set on transaction broadcast. - string label = 10; - - // PreviousOutpoints/Inputs of this transaction. - repeated PreviousOutPoint previous_outpoints = 12; -} - -message GetTransactionsRequest { - /* - The height from which to list transactions, inclusive. If this value is - greater than end_height, transactions will be read in reverse. - */ - int32 start_height = 1; - - /* - The height until which to list transactions, inclusive. To include - unconfirmed transactions, this value should be set to -1, which will - return transactions from start_height until the current chain tip and - unconfirmed transactions. If no end_height is provided, the call will - default to this option. - */ - int32 end_height = 2; - - // An optional filter to only include transactions relevant to an account. - string account = 3; -} - -message TransactionDetails { - // The list of transactions relevant to the wallet. - repeated Transaction transactions = 1; -} - -message FeeLimit { - oneof limit { - /* - The fee limit expressed as a fixed amount of satoshis. - - The fields fixed and fixed_msat are mutually exclusive. - */ - int64 fixed = 1; - - /* - The fee limit expressed as a fixed amount of millisatoshis. - - The fields fixed and fixed_msat are mutually exclusive. - */ - int64 fixed_msat = 3; - - // The fee limit expressed as a percentage of the payment amount. - int64 percent = 2; - } -} - -message SendRequest { - /* - The identity pubkey of the payment recipient. When using REST, this field - must be encoded as base64. - */ - bytes dest = 1; - - /* - The hex-encoded identity pubkey of the payment recipient. Deprecated now - that the REST gateway supports base64 encoding of bytes fields. - */ - string dest_string = 2 [deprecated = true]; - - /* - The amount to send expressed in satoshis. - - The fields amt and amt_msat are mutually exclusive. - */ - int64 amt = 3; - - /* - The amount to send expressed in millisatoshis. - - The fields amt and amt_msat are mutually exclusive. - */ - int64 amt_msat = 12; - - /* - The hash to use within the payment's HTLC. When using REST, this field - must be encoded as base64. - */ - bytes payment_hash = 4; - - /* - The hex-encoded hash to use within the payment's HTLC. Deprecated now - that the REST gateway supports base64 encoding of bytes fields. - */ - string payment_hash_string = 5 [deprecated = true]; - - /* - A bare-bones invoice for a payment within the Lightning Network. With the - details of the invoice, the sender has all the data necessary to send a - payment to the recipient. - */ - string payment_request = 6; - - /* - The CLTV delta from the current height that should be used to set the - timelock for the final hop. - */ - int32 final_cltv_delta = 7; - - /* - The maximum number of satoshis that will be paid as a fee of the payment. - This value can be represented either as a percentage of the amount being - sent, or as a fixed amount of the maximum fee the user is willing the pay to - send the payment. If not specified, lnd will use a default value of 100% - fees for small amounts (<=1k sat) or 5% fees for larger amounts. - */ - FeeLimit fee_limit = 8; - - /* - The channel id of the channel that must be taken to the first hop. If zero, - any channel may be used. - */ - uint64 outgoing_chan_id = 9 [jstype = JS_STRING]; - - /* - The pubkey of the last hop of the route. If empty, any hop may be used. - */ - bytes last_hop_pubkey = 13; - - /* - An optional maximum total time lock for the route. This should not exceed - lnd's `--max-cltv-expiry` setting. If zero, then the value of - `--max-cltv-expiry` is enforced. - */ - uint32 cltv_limit = 10; - - /* - An optional field that can be used to pass an arbitrary set of TLV records - to a peer which understands the new records. This can be used to pass - application specific data during the payment attempt. Record types are - required to be in the custom range >= 65536. When using REST, the values - must be encoded as base64. - */ - map dest_custom_records = 11; - - // If set, circular payments to self are permitted. - bool allow_self_payment = 14; - - /* - Features assumed to be supported by the final node. All transitive feature - dependencies must also be set properly. For a given feature bit pair, either - optional or remote may be set, but not both. If this field is nil or empty, - the router will try to load destination features from the graph as a - fallback. - */ - repeated FeatureBit dest_features = 15; - - /* - The payment address of the generated invoice. - */ - bytes payment_addr = 16; -} - -message SendResponse { - string payment_error = 1; - bytes payment_preimage = 2; - Route payment_route = 3; - bytes payment_hash = 4; -} - -message SendToRouteRequest { - /* - The payment hash to use for the HTLC. When using REST, this field must be - encoded as base64. - */ - bytes payment_hash = 1; - - /* - An optional hex-encoded payment hash to be used for the HTLC. Deprecated now - that the REST gateway supports base64 encoding of bytes fields. - */ - string payment_hash_string = 2 [deprecated = true]; - - reserved 3; - - // Route that should be used to attempt to complete the payment. - Route route = 4; -} - -message ChannelAcceptRequest { - // The pubkey of the node that wishes to open an inbound channel. - bytes node_pubkey = 1; - - // The hash of the genesis block that the proposed channel resides in. - bytes chain_hash = 2; - - // The pending channel id. - bytes pending_chan_id = 3; - - // The funding amount in satoshis that initiator wishes to use in the - // channel. - uint64 funding_amt = 4; - - // The push amount of the proposed channel in millisatoshis. - uint64 push_amt = 5; - - // The dust limit of the initiator's commitment tx. - uint64 dust_limit = 6; - - // The maximum amount of coins in millisatoshis that can be pending in this - // channel. - uint64 max_value_in_flight = 7; - - // The minimum amount of satoshis the initiator requires us to have at all - // times. - uint64 channel_reserve = 8; - - // The smallest HTLC in millisatoshis that the initiator will accept. - uint64 min_htlc = 9; - - // The initial fee rate that the initiator suggests for both commitment - // transactions. - uint64 fee_per_kw = 10; - - /* - The number of blocks to use for the relative time lock in the pay-to-self - output of both commitment transactions. - */ - uint32 csv_delay = 11; - - // The total number of incoming HTLC's that the initiator will accept. - uint32 max_accepted_htlcs = 12; - - // A bit-field which the initiator uses to specify proposed channel - // behavior. - uint32 channel_flags = 13; - - // The commitment type the initiator wishes to use for the proposed channel. - CommitmentType commitment_type = 14; - - // Whether the initiator wants to open a zero-conf channel via the channel - // type. - bool wants_zero_conf = 15; - - // Whether the initiator wants to use the scid-alias channel type. This is - // separate from the feature bit. - bool wants_scid_alias = 16; -} - -message ChannelAcceptResponse { - // Whether or not the client accepts the channel. - bool accept = 1; - - // The pending channel id to which this response applies. - bytes pending_chan_id = 2; - - /* - An optional error to send the initiating party to indicate why the channel - was rejected. This field *should not* contain sensitive information, it will - be sent to the initiating party. This field should only be set if accept is - false, the channel will be rejected if an error is set with accept=true - because the meaning of this response is ambiguous. Limited to 500 - characters. - */ - string error = 3; - - /* - The upfront shutdown address to use if the initiating peer supports option - upfront shutdown script (see ListPeers for the features supported). Note - that the channel open will fail if this value is set for a peer that does - not support this feature bit. - */ - string upfront_shutdown = 4; - - /* - The csv delay (in blocks) that we require for the remote party. - */ - uint32 csv_delay = 5; - - /* - The reserve amount in satoshis that we require the remote peer to adhere to. - We require that the remote peer always have some reserve amount allocated to - them so that there is always a disincentive to broadcast old state (if they - hold 0 sats on their side of the channel, there is nothing to lose). - */ - uint64 reserve_sat = 6; - - /* - The maximum amount of funds in millisatoshis that we allow the remote peer - to have in outstanding htlcs. - */ - uint64 in_flight_max_msat = 7; - - /* - The maximum number of htlcs that the remote peer can offer us. - */ - uint32 max_htlc_count = 8; - - /* - The minimum value in millisatoshis for incoming htlcs on the channel. - */ - uint64 min_htlc_in = 9; - - /* - The number of confirmations we require before we consider the channel open. - */ - uint32 min_accept_depth = 10; - - /* - Whether the responder wants this to be a zero-conf channel. This will fail - if either side does not have the scid-alias feature bit set. The minimum - depth field must be zero if this is true. - */ - bool zero_conf = 11; -} - -message ChannelPoint { - oneof funding_txid { - /* - Txid of the funding transaction. When using REST, this field must be - encoded as base64. - */ - bytes funding_txid_bytes = 1; - - /* - Hex-encoded string representing the byte-reversed hash of the funding - transaction. - */ - string funding_txid_str = 2; - } - - // The index of the output of the funding transaction - uint32 output_index = 3; -} - -message OutPoint { - // Raw bytes representing the transaction id. - bytes txid_bytes = 1; - - // Reversed, hex-encoded string representing the transaction id. - string txid_str = 2; - - // The index of the output on the transaction. - uint32 output_index = 3; -} - -message PreviousOutPoint { - // The outpoint in format txid:n. - string outpoint = 1; - - // Denotes if the outpoint is controlled by the internal wallet. - // The flag will only detect p2wkh, np2wkh and p2tr inputs as its own. - bool is_our_output = 2; -} - -message LightningAddress { - // The identity pubkey of the Lightning node. - string pubkey = 1; - - // The network location of the lightning node, e.g. `69.69.69.69:1337` or - // `localhost:10011`. - string host = 2; -} - -message EstimateFeeRequest { - // The map from addresses to amounts for the transaction. - map AddrToAmount = 1; - - // The target number of blocks that this transaction should be confirmed - // by. - int32 target_conf = 2; - - // The minimum number of confirmations each one of your outputs used for - // the transaction must satisfy. - int32 min_confs = 3; - - // Whether unconfirmed outputs should be used as inputs for the transaction. - bool spend_unconfirmed = 4; -} - -message EstimateFeeResponse { - // The total fee in satoshis. - int64 fee_sat = 1; - - // Deprecated, use sat_per_vbyte. - // The fee rate in satoshi/vbyte. - int64 feerate_sat_per_byte = 2 [deprecated = true]; - - // The fee rate in satoshi/vbyte. - uint64 sat_per_vbyte = 3; -} - -message SendManyRequest { - // The map from addresses to amounts - map AddrToAmount = 1; - - // The target number of blocks that this transaction should be confirmed - // by. - int32 target_conf = 3; - - // A manual fee rate set in sat/vbyte that should be used when crafting the - // transaction. - uint64 sat_per_vbyte = 4; - - // Deprecated, use sat_per_vbyte. - // A manual fee rate set in sat/vbyte that should be used when crafting the - // transaction. - int64 sat_per_byte = 5 [deprecated = true]; - - // An optional label for the transaction, limited to 500 characters. - string label = 6; - - // The minimum number of confirmations each one of your outputs used for - // the transaction must satisfy. - int32 min_confs = 7; - - // Whether unconfirmed outputs should be used as inputs for the transaction. - bool spend_unconfirmed = 8; -} -message SendManyResponse { - // The id of the transaction - string txid = 1; -} - -message SendCoinsRequest { - // The address to send coins to - string addr = 1; - - // The amount in satoshis to send - int64 amount = 2; - - // The target number of blocks that this transaction should be confirmed - // by. - int32 target_conf = 3; - - // A manual fee rate set in sat/vbyte that should be used when crafting the - // transaction. - uint64 sat_per_vbyte = 4; - - // Deprecated, use sat_per_vbyte. - // A manual fee rate set in sat/vbyte that should be used when crafting the - // transaction. - int64 sat_per_byte = 5 [deprecated = true]; - - /* - If set, then the amount field will be ignored, and lnd will attempt to - send all the coins under control of the internal wallet to the specified - address. - */ - bool send_all = 6; - - // An optional label for the transaction, limited to 500 characters. - string label = 7; - - // The minimum number of confirmations each one of your outputs used for - // the transaction must satisfy. - int32 min_confs = 8; - - // Whether unconfirmed outputs should be used as inputs for the transaction. - bool spend_unconfirmed = 9; -} -message SendCoinsResponse { - // The transaction ID of the transaction - string txid = 1; -} - -message ListUnspentRequest { - // The minimum number of confirmations to be included. - int32 min_confs = 1; - - // The maximum number of confirmations to be included. - int32 max_confs = 2; - - // An optional filter to only include outputs belonging to an account. - string account = 3; -} -message ListUnspentResponse { - // A list of utxos - repeated Utxo utxos = 1; -} - -/* -`AddressType` has to be one of: - -- `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0) -- `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1) -- `p2tr`: Pay to taproot pubkey (`TAPROOT_PUBKEY` = 4) -*/ -enum AddressType { - WITNESS_PUBKEY_HASH = 0; - NESTED_PUBKEY_HASH = 1; - UNUSED_WITNESS_PUBKEY_HASH = 2; - UNUSED_NESTED_PUBKEY_HASH = 3; - TAPROOT_PUBKEY = 4; - UNUSED_TAPROOT_PUBKEY = 5; -} - -message NewAddressRequest { - // The type of address to generate. - AddressType type = 1; - - /* - The name of the account to generate a new address for. If empty, the - default wallet account is used. - */ - string account = 2; -} -message NewAddressResponse { - // The newly generated wallet address - string address = 1; -} - -message SignMessageRequest { - /* - The message to be signed. When using REST, this field must be encoded as - base64. - */ - bytes msg = 1; - - /* - Instead of the default double-SHA256 hashing of the message before signing, - only use one round of hashing instead. - */ - bool single_hash = 2; -} -message SignMessageResponse { - // The signature for the given message - string signature = 1; -} - -message VerifyMessageRequest { - /* - The message over which the signature is to be verified. When using REST, - this field must be encoded as base64. - */ - bytes msg = 1; - - // The signature to be verified over the given message - string signature = 2; -} -message VerifyMessageResponse { - // Whether the signature was valid over the given message - bool valid = 1; - - // The pubkey recovered from the signature - string pubkey = 2; -} - -message ConnectPeerRequest { - /* - Lightning address of the peer to connect to. - */ - LightningAddress addr = 1; - - /* - If set, the daemon will attempt to persistently connect to the target - peer. Otherwise, the call will be synchronous. - */ - bool perm = 2; - - /* - The connection timeout value (in seconds) for this request. It won't affect - other requests. - */ - uint64 timeout = 3; -} -message ConnectPeerResponse { -} - -message DisconnectPeerRequest { - // The pubkey of the node to disconnect from - string pub_key = 1; -} -message DisconnectPeerResponse { -} - -message HTLC { - bool incoming = 1; - int64 amount = 2; - bytes hash_lock = 3; - uint32 expiration_height = 4; - - // Index identifying the htlc on the channel. - uint64 htlc_index = 5; - - // If this HTLC is involved in a forwarding operation, this field indicates - // the forwarding channel. For an outgoing htlc, it is the incoming channel. - // For an incoming htlc, it is the outgoing channel. When the htlc - // originates from this node or this node is the final destination, - // forwarding_channel will be zero. The forwarding channel will also be zero - // for htlcs that need to be forwarded but don't have a forwarding decision - // persisted yet. - uint64 forwarding_channel = 6; - - // Index identifying the htlc on the forwarding channel. - uint64 forwarding_htlc_index = 7; -} - -enum CommitmentType { - /* - Returned when the commitment type isn't known or unavailable. - */ - UNKNOWN_COMMITMENT_TYPE = 0; - - /* - A channel using the legacy commitment format having tweaked to_remote - keys. - */ - LEGACY = 1; - - /* - A channel that uses the modern commitment format where the key in the - output of the remote party does not change each state. This makes back - up and recovery easier as when the channel is closed, the funds go - directly to that key. - */ - STATIC_REMOTE_KEY = 2; - - /* - A channel that uses a commitment format that has anchor outputs on the - commitments, allowing fee bumping after a force close transaction has - been broadcast. - */ - ANCHORS = 3; - - /* - A channel that uses a commitment type that builds upon the anchors - commitment format, but in addition requires a CLTV clause to spend outputs - paying to the channel initiator. This is intended for use on leased channels - to guarantee that the channel initiator has no incentives to close a leased - channel before its maturity date. - */ - SCRIPT_ENFORCED_LEASE = 4; -} - -message ChannelConstraints { - /* - The CSV delay expressed in relative blocks. If the channel is force closed, - we will need to wait for this many blocks before we can regain our funds. - */ - uint32 csv_delay = 1; - - // The minimum satoshis this node is required to reserve in its balance. - uint64 chan_reserve_sat = 2; - - // The dust limit (in satoshis) of the initiator's commitment tx. - uint64 dust_limit_sat = 3; - - // The maximum amount of coins in millisatoshis that can be pending in this - // channel. - uint64 max_pending_amt_msat = 4; - - // The smallest HTLC in millisatoshis that the initiator will accept. - uint64 min_htlc_msat = 5; - - // The total number of incoming HTLC's that the initiator will accept. - uint32 max_accepted_htlcs = 6; -} - -message Channel { - // Whether this channel is active or not - bool active = 1; - - // The identity pubkey of the remote node - string remote_pubkey = 2; - - /* - The outpoint (txid:index) of the funding transaction. With this value, Bob - will be able to generate a signature for Alice's version of the commitment - transaction. - */ - string channel_point = 3; - - /* - The unique channel ID for the channel. The first 3 bytes are the block - height, the next 3 the index within the block, and the last 2 bytes are the - output index for the channel. - */ - uint64 chan_id = 4 [jstype = JS_STRING]; - - // The total amount of funds held in this channel - int64 capacity = 5; - - // This node's current balance in this channel - int64 local_balance = 6; - - // The counterparty's current balance in this channel - int64 remote_balance = 7; - - /* - The amount calculated to be paid in fees for the current set of commitment - transactions. The fee amount is persisted with the channel in order to - allow the fee amount to be removed and recalculated with each channel state - update, including updates that happen after a system restart. - */ - int64 commit_fee = 8; - - // The weight of the commitment transaction - int64 commit_weight = 9; - - /* - The required number of satoshis per kilo-weight that the requester will pay - at all times, for both the funding transaction and commitment transaction. - This value can later be updated once the channel is open. - */ - int64 fee_per_kw = 10; - - // The unsettled balance in this channel - int64 unsettled_balance = 11; - - /* - The total number of satoshis we've sent within this channel. - */ - int64 total_satoshis_sent = 12; - - /* - The total number of satoshis we've received within this channel. - */ - int64 total_satoshis_received = 13; - - /* - The total number of updates conducted within this channel. - */ - uint64 num_updates = 14; - - /* - The list of active, uncleared HTLCs currently pending within the channel. - */ - repeated HTLC pending_htlcs = 15; - - /* - Deprecated. The CSV delay expressed in relative blocks. If the channel is - force closed, we will need to wait for this many blocks before we can regain - our funds. - */ - uint32 csv_delay = 16 [deprecated = true]; - - // Whether this channel is advertised to the network or not. - bool private = 17; - - // True if we were the ones that created the channel. - bool initiator = 18; - - // A set of flags showing the current state of the channel. - string chan_status_flags = 19; - - // Deprecated. The minimum satoshis this node is required to reserve in its - // balance. - int64 local_chan_reserve_sat = 20 [deprecated = true]; - - /* - Deprecated. The minimum satoshis the other node is required to reserve in - its balance. - */ - int64 remote_chan_reserve_sat = 21 [deprecated = true]; - - // Deprecated. Use commitment_type. - bool static_remote_key = 22 [deprecated = true]; - - // The commitment type used by this channel. - CommitmentType commitment_type = 26; - - /* - The number of seconds that the channel has been monitored by the channel - scoring system. Scores are currently not persisted, so this value may be - less than the lifetime of the channel [EXPERIMENTAL]. - */ - int64 lifetime = 23; - - /* - The number of seconds that the remote peer has been observed as being online - by the channel scoring system over the lifetime of the channel - [EXPERIMENTAL]. - */ - int64 uptime = 24; - - /* - Close address is the address that we will enforce payout to on cooperative - close if the channel was opened utilizing option upfront shutdown. This - value can be set on channel open by setting close_address in an open channel - request. If this value is not set, you can still choose a payout address by - cooperatively closing with the delivery_address field set. - */ - string close_address = 25; - - /* - The amount that the initiator of the channel optionally pushed to the remote - party on channel open. This amount will be zero if the channel initiator did - not push any funds to the remote peer. If the initiator field is true, we - pushed this amount to our peer, if it is false, the remote peer pushed this - amount to us. - */ - uint64 push_amount_sat = 27; - - /* - This uint32 indicates if this channel is to be considered 'frozen'. A - frozen channel doest not allow a cooperative channel close by the - initiator. The thaw_height is the height that this restriction stops - applying to the channel. This field is optional, not setting it or using a - value of zero will mean the channel has no additional restrictions. The - height can be interpreted in two ways: as a relative height if the value is - less than 500,000, or as an absolute height otherwise. - */ - uint32 thaw_height = 28; - - // List constraints for the local node. - ChannelConstraints local_constraints = 29; - - // List constraints for the remote node. - ChannelConstraints remote_constraints = 30; - - /* - This lists out the set of alias short channel ids that exist for a channel. - This may be empty. - */ - repeated uint64 alias_scids = 31; - - // Whether or not this is a zero-conf channel. - bool zero_conf = 32; - - // This is the confirmed / on-chain zero-conf SCID. - uint64 zero_conf_confirmed_scid = 33; -} - -message ListChannelsRequest { - bool active_only = 1; - bool inactive_only = 2; - bool public_only = 3; - bool private_only = 4; - - /* - Filters the response for channels with a target peer's pubkey. If peer is - empty, all channels will be returned. - */ - bytes peer = 5; -} -message ListChannelsResponse { - // The list of active channels - repeated Channel channels = 11; -} - -message AliasMap { - /* - For non-zero-conf channels, this is the confirmed SCID. Otherwise, this is - the first assigned "base" alias. - */ - uint64 base_scid = 1; - - // The set of all aliases stored for the base SCID. - repeated uint64 aliases = 2; -} -message ListAliasesRequest { -} -message ListAliasesResponse { - repeated AliasMap alias_maps = 1; -} - -enum Initiator { - INITIATOR_UNKNOWN = 0; - INITIATOR_LOCAL = 1; - INITIATOR_REMOTE = 2; - INITIATOR_BOTH = 3; -} - -message ChannelCloseSummary { - // The outpoint (txid:index) of the funding transaction. - string channel_point = 1; - - // The unique channel ID for the channel. - uint64 chan_id = 2 [jstype = JS_STRING]; - - // The hash of the genesis block that this channel resides within. - string chain_hash = 3; - - // The txid of the transaction which ultimately closed this channel. - string closing_tx_hash = 4; - - // Public key of the remote peer that we formerly had a channel with. - string remote_pubkey = 5; - - // Total capacity of the channel. - int64 capacity = 6; - - // Height at which the funding transaction was spent. - uint32 close_height = 7; - - // Settled balance at the time of channel closure - int64 settled_balance = 8; - - // The sum of all the time-locked outputs at the time of channel closure - int64 time_locked_balance = 9; - - enum ClosureType { - COOPERATIVE_CLOSE = 0; - LOCAL_FORCE_CLOSE = 1; - REMOTE_FORCE_CLOSE = 2; - BREACH_CLOSE = 3; - FUNDING_CANCELED = 4; - ABANDONED = 5; - } - - // Details on how the channel was closed. - ClosureType close_type = 10; - - /* - Open initiator is the party that initiated opening the channel. Note that - this value may be unknown if the channel was closed before we migrated to - store open channel information after close. - */ - Initiator open_initiator = 11; - - /* - Close initiator indicates which party initiated the close. This value will - be unknown for channels that were cooperatively closed before we started - tracking cooperative close initiators. Note that this indicates which party - initiated a close, and it is possible for both to initiate cooperative or - force closes, although only one party's close will be confirmed on chain. - */ - Initiator close_initiator = 12; - - repeated Resolution resolutions = 13; - - /* - This lists out the set of alias short channel ids that existed for the - closed channel. This may be empty. - */ - repeated uint64 alias_scids = 14; - - // The confirmed SCID for a zero-conf channel. - uint64 zero_conf_confirmed_scid = 15 [jstype = JS_STRING]; -} - -enum ResolutionType { - TYPE_UNKNOWN = 0; - - // We resolved an anchor output. - ANCHOR = 1; - - /* - We are resolving an incoming htlc on chain. This if this htlc is - claimed, we swept the incoming htlc with the preimage. If it is timed - out, our peer swept the timeout path. - */ - INCOMING_HTLC = 2; - - /* - We are resolving an outgoing htlc on chain. If this htlc is claimed, - the remote party swept the htlc with the preimage. If it is timed out, - we swept it with the timeout path. - */ - OUTGOING_HTLC = 3; - - // We force closed and need to sweep our time locked commitment output. - COMMIT = 4; -} - -enum ResolutionOutcome { - // Outcome unknown. - OUTCOME_UNKNOWN = 0; - - // An output was claimed on chain. - CLAIMED = 1; - - // An output was left unclaimed on chain. - UNCLAIMED = 2; - - /* - ResolverOutcomeAbandoned indicates that an output that we did not - claim on chain, for example an anchor that we did not sweep and a - third party claimed on chain, or a htlc that we could not decode - so left unclaimed. - */ - ABANDONED = 3; - - /* - If we force closed our channel, our htlcs need to be claimed in two - stages. This outcome represents the broadcast of a timeout or success - transaction for this two stage htlc claim. - */ - FIRST_STAGE = 4; - - // A htlc was timed out on chain. - TIMEOUT = 5; -} - -message Resolution { - // The type of output we are resolving. - ResolutionType resolution_type = 1; - - // The outcome of our on chain action that resolved the outpoint. - ResolutionOutcome outcome = 2; - - // The outpoint that was spent by the resolution. - OutPoint outpoint = 3; - - // The amount that was claimed by the resolution. - uint64 amount_sat = 4; - - // The hex-encoded transaction ID of the sweep transaction that spent the - // output. - string sweep_txid = 5; -} - -message ClosedChannelsRequest { - bool cooperative = 1; - bool local_force = 2; - bool remote_force = 3; - bool breach = 4; - bool funding_canceled = 5; - bool abandoned = 6; -} - -message ClosedChannelsResponse { - repeated ChannelCloseSummary channels = 1; -} - -message Peer { - // The identity pubkey of the peer - string pub_key = 1; - - // Network address of the peer; eg `127.0.0.1:10011` - string address = 3; - - // Bytes of data transmitted to this peer - uint64 bytes_sent = 4; - - // Bytes of data transmitted from this peer - uint64 bytes_recv = 5; - - // Satoshis sent to this peer - int64 sat_sent = 6; - - // Satoshis received from this peer - int64 sat_recv = 7; - - // A channel is inbound if the counterparty initiated the channel - bool inbound = 8; - - // Ping time to this peer - int64 ping_time = 9; - - enum SyncType { - /* - Denotes that we cannot determine the peer's current sync type. - */ - UNKNOWN_SYNC = 0; - - /* - Denotes that we are actively receiving new graph updates from the peer. - */ - ACTIVE_SYNC = 1; - - /* - Denotes that we are not receiving new graph updates from the peer. - */ - PASSIVE_SYNC = 2; - - /* - Denotes that this peer is pinned into an active sync. - */ - PINNED_SYNC = 3; - } - - // The type of sync we are currently performing with this peer. - SyncType sync_type = 10; - - // Features advertised by the remote peer in their init message. - map features = 11; - - /* - The latest errors received from our peer with timestamps, limited to the 10 - most recent errors. These errors are tracked across peer connections, but - are not persisted across lnd restarts. Note that these errors are only - stored for peers that we have channels open with, to prevent peers from - spamming us with errors at no cost. - */ - repeated TimestampedError errors = 12; - - /* - The number of times we have recorded this peer going offline or coming - online, recorded across restarts. Note that this value is decreased over - time if the peer has not recently flapped, so that we can forgive peers - with historically high flap counts. - */ - int32 flap_count = 13; - - /* - The timestamp of the last flap we observed for this peer. If this value is - zero, we have not observed any flaps for this peer. - */ - int64 last_flap_ns = 14; - - /* - The last ping payload the peer has sent to us. - */ - bytes last_ping_payload = 15; -} - -message TimestampedError { - // The unix timestamp in seconds when the error occurred. - uint64 timestamp = 1; - - // The string representation of the error sent by our peer. - string error = 2; -} - -message ListPeersRequest { - /* - If true, only the last error that our peer sent us will be returned with - the peer's information, rather than the full set of historic errors we have - stored. - */ - bool latest_error = 1; -} -message ListPeersResponse { - // The list of currently connected peers - repeated Peer peers = 1; -} - -message PeerEventSubscription { -} - -message PeerEvent { - // The identity pubkey of the peer. - string pub_key = 1; - - enum EventType { - PEER_ONLINE = 0; - PEER_OFFLINE = 1; - } - - EventType type = 2; -} - -message GetInfoRequest { -} -message GetInfoResponse { - // The version of the LND software that the node is running. - string version = 14; - - // The SHA1 commit hash that the daemon is compiled with. - string commit_hash = 20; - - // The identity pubkey of the current node. - string identity_pubkey = 1; - - // If applicable, the alias of the current node, e.g. "bob" - string alias = 2; - - // The color of the current node in hex code format - string color = 17; - - // Number of pending channels - uint32 num_pending_channels = 3; - - // Number of active channels - uint32 num_active_channels = 4; - - // Number of inactive channels - uint32 num_inactive_channels = 15; - - // Number of peers - uint32 num_peers = 5; - - // The node's current view of the height of the best block - uint32 block_height = 6; - - // The node's current view of the hash of the best block - string block_hash = 8; - - // Timestamp of the block best known to the wallet - int64 best_header_timestamp = 13; - - // Whether the wallet's view is synced to the main chain - bool synced_to_chain = 9; - - // Whether we consider ourselves synced with the public channel graph. - bool synced_to_graph = 18; - - /* - Whether the current node is connected to testnet. This field is - deprecated and the network field should be used instead - **/ - bool testnet = 10 [deprecated = true]; - - reserved 11; - - // A list of active chains the node is connected to - repeated Chain chains = 16; - - // The URIs of the current node. - repeated string uris = 12; - - /* - Features that our node has advertised in our init message, node - announcements and invoices. - */ - map features = 19; - - /* - Indicates whether the HTLC interceptor API is in always-on mode. - */ - bool require_htlc_interceptor = 21; -} - -message GetRecoveryInfoRequest { -} -message GetRecoveryInfoResponse { - // Whether the wallet is in recovery mode - bool recovery_mode = 1; - - // Whether the wallet recovery progress is finished - bool recovery_finished = 2; - - // The recovery progress, ranging from 0 to 1. - double progress = 3; -} - -message Chain { - // The blockchain the node is on (eg bitcoin, litecoin) - string chain = 1; - - // The network the node is on (eg regtest, testnet, mainnet) - string network = 2; -} - -message ConfirmationUpdate { - bytes block_sha = 1; - int32 block_height = 2; - - uint32 num_confs_left = 3; -} - -message ChannelOpenUpdate { - ChannelPoint channel_point = 1; -} - -message ChannelCloseUpdate { - bytes closing_txid = 1; - - bool success = 2; -} - -message CloseChannelRequest { - /* - The outpoint (txid:index) of the funding transaction. With this value, Bob - will be able to generate a signature for Alice's version of the commitment - transaction. - */ - ChannelPoint channel_point = 1; - - // If true, then the channel will be closed forcibly. This means the - // current commitment transaction will be signed and broadcast. - bool force = 2; - - // The target number of blocks that the closure transaction should be - // confirmed by. - int32 target_conf = 3; - - // Deprecated, use sat_per_vbyte. - // A manual fee rate set in sat/vbyte that should be used when crafting the - // closure transaction. - int64 sat_per_byte = 4 [deprecated = true]; - - /* - An optional address to send funds to in the case of a cooperative close. - If the channel was opened with an upfront shutdown script and this field - is set, the request to close will fail because the channel must pay out - to the upfront shutdown addresss. - */ - string delivery_address = 5; - - // A manual fee rate set in sat/vbyte that should be used when crafting the - // closure transaction. - uint64 sat_per_vbyte = 6; - - // The maximum fee rate the closer is willing to pay. - // - // NOTE: This field is only respected if we're the initiator of the channel. - uint64 max_fee_per_vbyte = 7; -} - -message CloseStatusUpdate { - oneof update { - PendingUpdate close_pending = 1; - ChannelCloseUpdate chan_close = 3; - } -} - -message PendingUpdate { - bytes txid = 1; - uint32 output_index = 2; -} - -message ReadyForPsbtFunding { - /* - The P2WSH address of the channel funding multisig address that the below - specified amount in satoshis needs to be sent to. - */ - string funding_address = 1; - - /* - The exact amount in satoshis that needs to be sent to the above address to - fund the pending channel. - */ - int64 funding_amount = 2; - - /* - A raw PSBT that contains the pending channel output. If a base PSBT was - provided in the PsbtShim, this is the base PSBT with one additional output. - If no base PSBT was specified, this is an otherwise empty PSBT with exactly - one output. - */ - bytes psbt = 3; -} - -message BatchOpenChannelRequest { - // The list of channels to open. - repeated BatchOpenChannel channels = 1; - - // The target number of blocks that the funding transaction should be - // confirmed by. - int32 target_conf = 2; - - // A manual fee rate set in sat/vByte that should be used when crafting the - // funding transaction. - int64 sat_per_vbyte = 3; - - // The minimum number of confirmations each one of your outputs used for - // the funding transaction must satisfy. - int32 min_confs = 4; - - // Whether unconfirmed outputs should be used as inputs for the funding - // transaction. - bool spend_unconfirmed = 5; - - // An optional label for the batch transaction, limited to 500 characters. - string label = 6; -} - -message BatchOpenChannel { - // The pubkey of the node to open a channel with. When using REST, this - // field must be encoded as base64. - bytes node_pubkey = 1; - - // The number of satoshis the wallet should commit to the channel. - int64 local_funding_amount = 2; - - // The number of satoshis to push to the remote side as part of the initial - // commitment state. - int64 push_sat = 3; - - // Whether this channel should be private, not announced to the greater - // network. - bool private = 4; - - // The minimum value in millisatoshi we will require for incoming HTLCs on - // the channel. - int64 min_htlc_msat = 5; - - // The delay we require on the remote's commitment transaction. If this is - // not set, it will be scaled automatically with the channel size. - uint32 remote_csv_delay = 6; - - /* - Close address is an optional address which specifies the address to which - funds should be paid out to upon cooperative close. This field may only be - set if the peer supports the option upfront feature bit (call listpeers - to check). The remote peer will only accept cooperative closes to this - address if it is set. - - Note: If this value is set on channel creation, you will *not* be able to - cooperatively close out to a different address. - */ - string close_address = 7; - - /* - An optional, unique identifier of 32 random bytes that will be used as the - pending channel ID to identify the channel while it is in the pre-pending - state. - */ - bytes pending_chan_id = 8; - - /* - The explicit commitment type to use. Note this field will only be used if - the remote peer supports explicit channel negotiation. - */ - CommitmentType commitment_type = 9; -} - -message BatchOpenChannelResponse { - repeated PendingUpdate pending_channels = 1; -} - -message OpenChannelRequest { - // A manual fee rate set in sat/vbyte that should be used when crafting the - // funding transaction. - uint64 sat_per_vbyte = 1; - - /* - The pubkey of the node to open a channel with. When using REST, this field - must be encoded as base64. - */ - bytes node_pubkey = 2; - - /* - The hex encoded pubkey of the node to open a channel with. Deprecated now - that the REST gateway supports base64 encoding of bytes fields. - */ - string node_pubkey_string = 3 [deprecated = true]; - - // The number of satoshis the wallet should commit to the channel - int64 local_funding_amount = 4; - - // The number of satoshis to push to the remote side as part of the initial - // commitment state - int64 push_sat = 5; - - // The target number of blocks that the funding transaction should be - // confirmed by. - int32 target_conf = 6; - - // Deprecated, use sat_per_vbyte. - // A manual fee rate set in sat/vbyte that should be used when crafting the - // funding transaction. - int64 sat_per_byte = 7 [deprecated = true]; - - // Whether this channel should be private, not announced to the greater - // network. - bool private = 8; - - // The minimum value in millisatoshi we will require for incoming HTLCs on - // the channel. - int64 min_htlc_msat = 9; - - // The delay we require on the remote's commitment transaction. If this is - // not set, it will be scaled automatically with the channel size. - uint32 remote_csv_delay = 10; - - // The minimum number of confirmations each one of your outputs used for - // the funding transaction must satisfy. - int32 min_confs = 11; - - // Whether unconfirmed outputs should be used as inputs for the funding - // transaction. - bool spend_unconfirmed = 12; - - /* - Close address is an optional address which specifies the address to which - funds should be paid out to upon cooperative close. This field may only be - set if the peer supports the option upfront feature bit (call listpeers - to check). The remote peer will only accept cooperative closes to this - address if it is set. - - Note: If this value is set on channel creation, you will *not* be able to - cooperatively close out to a different address. - */ - string close_address = 13; - - /* - Funding shims are an optional argument that allow the caller to intercept - certain funding functionality. For example, a shim can be provided to use a - particular key for the commitment key (ideally cold) rather than use one - that is generated by the wallet as normal, or signal that signing will be - carried out in an interactive manner (PSBT based). - */ - FundingShim funding_shim = 14; - - /* - The maximum amount of coins in millisatoshi that can be pending within - the channel. It only applies to the remote party. - */ - uint64 remote_max_value_in_flight_msat = 15; - - /* - The maximum number of concurrent HTLCs we will allow the remote party to add - to the commitment transaction. - */ - uint32 remote_max_htlcs = 16; - - /* - Max local csv is the maximum csv delay we will allow for our own commitment - transaction. - */ - uint32 max_local_csv = 17; - - /* - The explicit commitment type to use. Note this field will only be used if - the remote peer supports explicit channel negotiation. - */ - CommitmentType commitment_type = 18; - - /* - If this is true, then a zero-conf channel open will be attempted. - */ - bool zero_conf = 19; - - /* - If this is true, then an option-scid-alias channel-type open will be - attempted. - */ - bool scid_alias = 20; -} -message OpenStatusUpdate { - oneof update { - /* - Signals that the channel is now fully negotiated and the funding - transaction published. - */ - PendingUpdate chan_pending = 1; - - /* - Signals that the channel's funding transaction has now reached the - required number of confirmations on chain and can be used. - */ - ChannelOpenUpdate chan_open = 3; - - /* - Signals that the funding process has been suspended and the construction - of a PSBT that funds the channel PK script is now required. - */ - ReadyForPsbtFunding psbt_fund = 5; - } - - /* - The pending channel ID of the created channel. This value may be used to - further the funding flow manually via the FundingStateStep method. - */ - bytes pending_chan_id = 4; -} - -message KeyLocator { - // The family of key being identified. - int32 key_family = 1; - - // The precise index of the key being identified. - int32 key_index = 2; -} - -message KeyDescriptor { - /* - The raw bytes of the key being identified. - */ - bytes raw_key_bytes = 1; - - /* - The key locator that identifies which key to use for signing. - */ - KeyLocator key_loc = 2; -} - -message ChanPointShim { - /* - The size of the pre-crafted output to be used as the channel point for this - channel funding. - */ - int64 amt = 1; - - // The target channel point to refrence in created commitment transactions. - ChannelPoint chan_point = 2; - - // Our local key to use when creating the multi-sig output. - KeyDescriptor local_key = 3; - - // The key of the remote party to use when creating the multi-sig output. - bytes remote_key = 4; - - /* - If non-zero, then this will be used as the pending channel ID on the wire - protocol to initate the funding request. This is an optional field, and - should only be set if the responder is already expecting a specific pending - channel ID. - */ - bytes pending_chan_id = 5; - - /* - This uint32 indicates if this channel is to be considered 'frozen'. A frozen - channel does not allow a cooperative channel close by the initiator. The - thaw_height is the height that this restriction stops applying to the - channel. The height can be interpreted in two ways: as a relative height if - the value is less than 500,000, or as an absolute height otherwise. - */ - uint32 thaw_height = 6; -} - -message PsbtShim { - /* - A unique identifier of 32 random bytes that will be used as the pending - channel ID to identify the PSBT state machine when interacting with it and - on the wire protocol to initiate the funding request. - */ - bytes pending_chan_id = 1; - - /* - An optional base PSBT the new channel output will be added to. If this is - non-empty, it must be a binary serialized PSBT. - */ - bytes base_psbt = 2; - - /* - If a channel should be part of a batch (multiple channel openings in one - transaction), it can be dangerous if the whole batch transaction is - published too early before all channel opening negotiations are completed. - This flag prevents this particular channel from broadcasting the transaction - after the negotiation with the remote peer. In a batch of channel openings - this flag should be set to true for every channel but the very last. - */ - bool no_publish = 3; -} - -message FundingShim { - oneof shim { - /* - A channel shim where the channel point was fully constructed outside - of lnd's wallet and the transaction might already be published. - */ - ChanPointShim chan_point_shim = 1; - - /* - A channel shim that uses a PSBT to fund and sign the channel funding - transaction. - */ - PsbtShim psbt_shim = 2; - } -} - -message FundingShimCancel { - // The pending channel ID of the channel to cancel the funding shim for. - bytes pending_chan_id = 1; -} - -message FundingPsbtVerify { - /* - The funded but not yet signed PSBT that sends the exact channel capacity - amount to the PK script returned in the open channel message in a previous - step. - */ - bytes funded_psbt = 1; - - // The pending channel ID of the channel to get the PSBT for. - bytes pending_chan_id = 2; - - /* - Can only be used if the no_publish flag was set to true in the OpenChannel - call meaning that the caller is solely responsible for publishing the final - funding transaction. If skip_finalize is set to true then lnd will not wait - for a FundingPsbtFinalize state step and instead assumes that a transaction - with the same TXID as the passed in PSBT will eventually confirm. - IT IS ABSOLUTELY IMPERATIVE that the TXID of the transaction that is - eventually published does have the _same TXID_ as the verified PSBT. That - means no inputs or outputs can change, only signatures can be added. If the - TXID changes between this call and the publish step then the channel will - never be created and the funds will be in limbo. - */ - bool skip_finalize = 3; -} - -message FundingPsbtFinalize { - /* - The funded PSBT that contains all witness data to send the exact channel - capacity amount to the PK script returned in the open channel message in a - previous step. Cannot be set at the same time as final_raw_tx. - */ - bytes signed_psbt = 1; - - // The pending channel ID of the channel to get the PSBT for. - bytes pending_chan_id = 2; - - /* - As an alternative to the signed PSBT with all witness data, the final raw - wire format transaction can also be specified directly. Cannot be set at the - same time as signed_psbt. - */ - bytes final_raw_tx = 3; -} - -message FundingTransitionMsg { - oneof trigger { - /* - The funding shim to register. This should be used before any - channel funding has began by the remote party, as it is intended as a - preparatory step for the full channel funding. - */ - FundingShim shim_register = 1; - - // Used to cancel an existing registered funding shim. - FundingShimCancel shim_cancel = 2; - - /* - Used to continue a funding flow that was initiated to be executed - through a PSBT. This step verifies that the PSBT contains the correct - outputs to fund the channel. - */ - FundingPsbtVerify psbt_verify = 3; - - /* - Used to continue a funding flow that was initiated to be executed - through a PSBT. This step finalizes the funded and signed PSBT, finishes - negotiation with the peer and finally publishes the resulting funding - transaction. - */ - FundingPsbtFinalize psbt_finalize = 4; - } -} - -message FundingStateStepResp { -} - -message PendingHTLC { - // The direction within the channel that the htlc was sent - bool incoming = 1; - - // The total value of the htlc - int64 amount = 2; - - // The final output to be swept back to the user's wallet - string outpoint = 3; - - // The next block height at which we can spend the current stage - uint32 maturity_height = 4; - - /* - The number of blocks remaining until the current stage can be swept. - Negative values indicate how many blocks have passed since becoming - mature. - */ - int32 blocks_til_maturity = 5; - - // Indicates whether the htlc is in its first or second stage of recovery - uint32 stage = 6; -} - -message PendingChannelsRequest { -} -message PendingChannelsResponse { - message PendingChannel { - string remote_node_pub = 1; - string channel_point = 2; - - int64 capacity = 3; - - int64 local_balance = 4; - int64 remote_balance = 5; - - // The minimum satoshis this node is required to reserve in its - // balance. - int64 local_chan_reserve_sat = 6; - - /* - The minimum satoshis the other node is required to reserve in its - balance. - */ - int64 remote_chan_reserve_sat = 7; - - // The party that initiated opening the channel. - Initiator initiator = 8; - - // The commitment type used by this channel. - CommitmentType commitment_type = 9; - - // Total number of forwarding packages created in this channel. - int64 num_forwarding_packages = 10; - - // A set of flags showing the current state of the channel. - string chan_status_flags = 11; - - // Whether this channel is advertised to the network or not. - bool private = 12; - } - - message PendingOpenChannel { - // The pending channel - PendingChannel channel = 1; - - /* - The amount calculated to be paid in fees for the current set of - commitment transactions. The fee amount is persisted with the channel - in order to allow the fee amount to be removed and recalculated with - each channel state update, including updates that happen after a system - restart. - */ - int64 commit_fee = 4; - - // The weight of the commitment transaction - int64 commit_weight = 5; - - /* - The required number of satoshis per kilo-weight that the requester will - pay at all times, for both the funding transaction and commitment - transaction. This value can later be updated once the channel is open. - */ - int64 fee_per_kw = 6; - - // Previously used for confirmation_height. Do not reuse. - reserved 2; - } - - message WaitingCloseChannel { - // The pending channel waiting for closing tx to confirm - PendingChannel channel = 1; - - // The balance in satoshis encumbered in this channel - int64 limbo_balance = 2; - - /* - A list of valid commitment transactions. Any of these can confirm at - this point. - */ - Commitments commitments = 3; - - // The transaction id of the closing transaction - string closing_txid = 4; - } - - message Commitments { - // Hash of the local version of the commitment tx. - string local_txid = 1; - - // Hash of the remote version of the commitment tx. - string remote_txid = 2; - - // Hash of the remote pending version of the commitment tx. - string remote_pending_txid = 3; - - /* - The amount in satoshis calculated to be paid in fees for the local - commitment. - */ - uint64 local_commit_fee_sat = 4; - - /* - The amount in satoshis calculated to be paid in fees for the remote - commitment. - */ - uint64 remote_commit_fee_sat = 5; - - /* - The amount in satoshis calculated to be paid in fees for the remote - pending commitment. - */ - uint64 remote_pending_commit_fee_sat = 6; - } - - message ClosedChannel { - // The pending channel to be closed - PendingChannel channel = 1; - - // The transaction id of the closing transaction - string closing_txid = 2; - } - - message ForceClosedChannel { - // The pending channel to be force closed - PendingChannel channel = 1; - - // The transaction id of the closing transaction - string closing_txid = 2; - - // The balance in satoshis encumbered in this pending channel - int64 limbo_balance = 3; - - // The height at which funds can be swept into the wallet - uint32 maturity_height = 4; - - /* - Remaining # of blocks until the commitment output can be swept. - Negative values indicate how many blocks have passed since becoming - mature. - */ - int32 blocks_til_maturity = 5; - - // The total value of funds successfully recovered from this channel - int64 recovered_balance = 6; - - repeated PendingHTLC pending_htlcs = 8; - - enum AnchorState { - LIMBO = 0; - RECOVERED = 1; - LOST = 2; - } - - AnchorState anchor = 9; - } - - // The balance in satoshis encumbered in pending channels - int64 total_limbo_balance = 1; - - // Channels pending opening - repeated PendingOpenChannel pending_open_channels = 2; - - /* - Deprecated: Channels pending closing previously contained cooperatively - closed channels with a single confirmation. These channels are now - considered closed from the time we see them on chain. - */ - repeated ClosedChannel pending_closing_channels = 3 [deprecated = true]; - - // Channels pending force closing - repeated ForceClosedChannel pending_force_closing_channels = 4; - - // Channels waiting for closing tx to confirm - repeated WaitingCloseChannel waiting_close_channels = 5; -} - -message ChannelEventSubscription { -} - -message ChannelEventUpdate { - oneof channel { - Channel open_channel = 1; - ChannelCloseSummary closed_channel = 2; - ChannelPoint active_channel = 3; - ChannelPoint inactive_channel = 4; - PendingUpdate pending_open_channel = 6; - ChannelPoint fully_resolved_channel = 7; - } - - enum UpdateType { - OPEN_CHANNEL = 0; - CLOSED_CHANNEL = 1; - ACTIVE_CHANNEL = 2; - INACTIVE_CHANNEL = 3; - PENDING_OPEN_CHANNEL = 4; - FULLY_RESOLVED_CHANNEL = 5; - } - - UpdateType type = 5; -} - -message WalletAccountBalance { - // The confirmed balance of the account (with >= 1 confirmations). - int64 confirmed_balance = 1; - - // The unconfirmed balance of the account (with 0 confirmations). - int64 unconfirmed_balance = 2; -} - -message WalletBalanceRequest { -} - -message WalletBalanceResponse { - // The balance of the wallet - int64 total_balance = 1; - - // The confirmed balance of a wallet(with >= 1 confirmations) - int64 confirmed_balance = 2; - - // The unconfirmed balance of a wallet(with 0 confirmations) - int64 unconfirmed_balance = 3; - - // The total amount of wallet UTXOs held in outputs that are locked for - // other usage. - int64 locked_balance = 5; - - // The amount of reserve required. - int64 reserved_balance_anchor_chan = 6; - - // A mapping of each wallet account's name to its balance. - map account_balance = 4; -} - -message Amount { - // Value denominated in satoshis. - uint64 sat = 1; - - // Value denominated in milli-satoshis. - uint64 msat = 2; -} - -message ChannelBalanceRequest { -} -message ChannelBalanceResponse { - // Deprecated. Sum of channels balances denominated in satoshis - int64 balance = 1 [deprecated = true]; - - // Deprecated. Sum of channels pending balances denominated in satoshis - int64 pending_open_balance = 2 [deprecated = true]; - - // Sum of channels local balances. - Amount local_balance = 3; - - // Sum of channels remote balances. - Amount remote_balance = 4; - - // Sum of channels local unsettled balances. - Amount unsettled_local_balance = 5; - - // Sum of channels remote unsettled balances. - Amount unsettled_remote_balance = 6; - - // Sum of channels pending local balances. - Amount pending_open_local_balance = 7; - - // Sum of channels pending remote balances. - Amount pending_open_remote_balance = 8; -} - -message QueryRoutesRequest { - // The 33-byte hex-encoded public key for the payment destination - string pub_key = 1; - - /* - The amount to send expressed in satoshis. - - The fields amt and amt_msat are mutually exclusive. - */ - int64 amt = 2; - - /* - The amount to send expressed in millisatoshis. - - The fields amt and amt_msat are mutually exclusive. - */ - int64 amt_msat = 12; - - reserved 3; - - /* - An optional CLTV delta from the current height that should be used for the - timelock of the final hop. Note that unlike SendPayment, QueryRoutes does - not add any additional block padding on top of final_ctlv_delta. This - padding of a few blocks needs to be added manually or otherwise failures may - happen when a block comes in while the payment is in flight. - */ - int32 final_cltv_delta = 4; - - /* - The maximum number of satoshis that will be paid as a fee of the payment. - This value can be represented either as a percentage of the amount being - sent, or as a fixed amount of the maximum fee the user is willing the pay to - send the payment. If not specified, lnd will use a default value of 100% - fees for small amounts (<=1k sat) or 5% fees for larger amounts. - */ - FeeLimit fee_limit = 5; - - /* - A list of nodes to ignore during path finding. When using REST, these fields - must be encoded as base64. - */ - repeated bytes ignored_nodes = 6; - - /* - Deprecated. A list of edges to ignore during path finding. - */ - repeated EdgeLocator ignored_edges = 7 [deprecated = true]; - - /* - The source node where the request route should originated from. If empty, - self is assumed. - */ - string source_pub_key = 8; - - /* - If set to true, edge probabilities from mission control will be used to get - the optimal route. - */ - bool use_mission_control = 9; - - /* - A list of directed node pairs that will be ignored during path finding. - */ - repeated NodePair ignored_pairs = 10; - - /* - An optional maximum total time lock for the route. If the source is empty or - ourselves, this should not exceed lnd's `--max-cltv-expiry` setting. If - zero, then the value of `--max-cltv-expiry` is used as the limit. - */ - uint32 cltv_limit = 11; - - /* - An optional field that can be used to pass an arbitrary set of TLV records - to a peer which understands the new records. This can be used to pass - application specific data during the payment attempt. If the destination - does not support the specified records, an error will be returned. - Record types are required to be in the custom range >= 65536. When using - REST, the values must be encoded as base64. - */ - map dest_custom_records = 13; - - /* - The channel id of the channel that must be taken to the first hop. If zero, - any channel may be used. - */ - uint64 outgoing_chan_id = 14 [jstype = JS_STRING]; - - /* - The pubkey of the last hop of the route. If empty, any hop may be used. - */ - bytes last_hop_pubkey = 15; - - /* - Optional route hints to reach the destination through private channels. - */ - repeated lnrpc.RouteHint route_hints = 16; - - /* - Features assumed to be supported by the final node. All transitive feature - dependencies must also be set properly. For a given feature bit pair, either - optional or remote may be set, but not both. If this field is nil or empty, - the router will try to load destination features from the graph as a - fallback. - */ - repeated lnrpc.FeatureBit dest_features = 17; - - /* - The time preference for this payment. Set to -1 to optimize for fees - only, to 1 to optimize for reliability only or a value inbetween for a mix. - */ - double time_pref = 18; -} - -message NodePair { - /* - The sending node of the pair. When using REST, this field must be encoded as - base64. - */ - bytes from = 1; - - /* - The receiving node of the pair. When using REST, this field must be encoded - as base64. - */ - bytes to = 2; -} - -message EdgeLocator { - // The short channel id of this edge. - uint64 channel_id = 1 [jstype = JS_STRING]; - - /* - The direction of this edge. If direction_reverse is false, the direction - of this edge is from the channel endpoint with the lexicographically smaller - pub key to the endpoint with the larger pub key. If direction_reverse is - is true, the edge goes the other way. - */ - bool direction_reverse = 2; -} - -message QueryRoutesResponse { - /* - The route that results from the path finding operation. This is still a - repeated field to retain backwards compatibility. - */ - repeated Route routes = 1; - - /* - The success probability of the returned route based on the current mission - control state. [EXPERIMENTAL] - */ - double success_prob = 2; -} - -message Hop { - /* - The unique channel ID for the channel. The first 3 bytes are the block - height, the next 3 the index within the block, and the last 2 bytes are the - output index for the channel. - */ - uint64 chan_id = 1 [jstype = JS_STRING]; - int64 chan_capacity = 2 [deprecated = true]; - int64 amt_to_forward = 3 [deprecated = true]; - int64 fee = 4 [deprecated = true]; - uint32 expiry = 5; - int64 amt_to_forward_msat = 6; - int64 fee_msat = 7; - - /* - An optional public key of the hop. If the public key is given, the payment - can be executed without relying on a copy of the channel graph. - */ - string pub_key = 8; - - /* - If set to true, then this hop will be encoded using the new variable length - TLV format. Note that if any custom tlv_records below are specified, then - this field MUST be set to true for them to be encoded properly. - */ - bool tlv_payload = 9 [deprecated = true]; - - /* - An optional TLV record that signals the use of an MPP payment. If present, - the receiver will enforce that the same mpp_record is included in the final - hop payload of all non-zero payments in the HTLC set. If empty, a regular - single-shot payment is or was attempted. - */ - MPPRecord mpp_record = 10; - - /* - An optional TLV record that signals the use of an AMP payment. If present, - the receiver will treat all received payments including the same - (payment_addr, set_id) pair as being part of one logical payment. The - payment will be settled by XORing the root_share's together and deriving the - child hashes and preimages according to BOLT XX. Must be used in conjunction - with mpp_record. - */ - AMPRecord amp_record = 12; - - /* - An optional set of key-value TLV records. This is useful within the context - of the SendToRoute call as it allows callers to specify arbitrary K-V pairs - to drop off at each hop within the onion. - */ - map custom_records = 11; - - // The payment metadata to send along with the payment to the payee. - bytes metadata = 13; -} - -message MPPRecord { - /* - A unique, random identifier used to authenticate the sender as the intended - payer of a multi-path payment. The payment_addr must be the same for all - subpayments, and match the payment_addr provided in the receiver's invoice. - The same payment_addr must be used on all subpayments. - */ - bytes payment_addr = 11; - - /* - The total amount in milli-satoshis being sent as part of a larger multi-path - payment. The caller is responsible for ensuring subpayments to the same node - and payment_hash sum exactly to total_amt_msat. The same - total_amt_msat must be used on all subpayments. - */ - int64 total_amt_msat = 10; -} - -message AMPRecord { - bytes root_share = 1; - - bytes set_id = 2; - - uint32 child_index = 3; -} - -/* -A path through the channel graph which runs over one or more channels in -succession. This struct carries all the information required to craft the -Sphinx onion packet, and send the payment along the first hop in the path. A -route is only selected as valid if all the channels have sufficient capacity to -carry the initial payment amount after fees are accounted for. -*/ -message Route { - /* - The cumulative (final) time lock across the entire route. This is the CLTV - value that should be extended to the first hop in the route. All other hops - will decrement the time-lock as advertised, leaving enough time for all - hops to wait for or present the payment preimage to complete the payment. - */ - uint32 total_time_lock = 1; - - /* - The sum of the fees paid at each hop within the final route. In the case - of a one-hop payment, this value will be zero as we don't need to pay a fee - to ourselves. - */ - int64 total_fees = 2 [deprecated = true]; - - /* - The total amount of funds required to complete a payment over this route. - This value includes the cumulative fees at each hop. As a result, the HTLC - extended to the first-hop in the route will need to have at least this many - satoshis, otherwise the route will fail at an intermediate node due to an - insufficient amount of fees. - */ - int64 total_amt = 3 [deprecated = true]; - - /* - Contains details concerning the specific forwarding details at each hop. - */ - repeated Hop hops = 4; - - /* - The total fees in millisatoshis. - */ - int64 total_fees_msat = 5; - - /* - The total amount in millisatoshis. - */ - int64 total_amt_msat = 6; -} - -message NodeInfoRequest { - // The 33-byte hex-encoded compressed public of the target node - string pub_key = 1; - - // If true, will include all known channels associated with the node. - bool include_channels = 2; -} - -message NodeInfo { - /* - An individual vertex/node within the channel graph. A node is - connected to other nodes by one or more channel edges emanating from it. As - the graph is directed, a node will also have an incoming edge attached to - it for each outgoing edge. - */ - LightningNode node = 1; - - // The total number of channels for the node. - uint32 num_channels = 2; - - // The sum of all channels capacity for the node, denominated in satoshis. - int64 total_capacity = 3; - - // A list of all public channels for the node. - repeated ChannelEdge channels = 4; -} - -/* -An individual vertex/node within the channel graph. A node is -connected to other nodes by one or more channel edges emanating from it. As the -graph is directed, a node will also have an incoming edge attached to it for -each outgoing edge. -*/ -message LightningNode { - uint32 last_update = 1; - string pub_key = 2; - string alias = 3; - repeated NodeAddress addresses = 4; - string color = 5; - map features = 6; -} - -message NodeAddress { - string network = 1; - string addr = 2; -} - -message RoutingPolicy { - uint32 time_lock_delta = 1; - int64 min_htlc = 2; - int64 fee_base_msat = 3; - int64 fee_rate_milli_msat = 4; - bool disabled = 5; - uint64 max_htlc_msat = 6; - uint32 last_update = 7; -} - -/* -A fully authenticated channel along with all its unique attributes. -Once an authenticated channel announcement has been processed on the network, -then an instance of ChannelEdgeInfo encapsulating the channels attributes is -stored. The other portions relevant to routing policy of a channel are stored -within a ChannelEdgePolicy for each direction of the channel. -*/ -message ChannelEdge { - /* - The unique channel ID for the channel. The first 3 bytes are the block - height, the next 3 the index within the block, and the last 2 bytes are the - output index for the channel. - */ - uint64 channel_id = 1 [jstype = JS_STRING]; - string chan_point = 2; - - uint32 last_update = 3 [deprecated = true]; - - string node1_pub = 4; - string node2_pub = 5; - - int64 capacity = 6; - - RoutingPolicy node1_policy = 7; - RoutingPolicy node2_policy = 8; -} - -message ChannelGraphRequest { - /* - Whether unannounced channels are included in the response or not. If set, - unannounced channels are included. Unannounced channels are both private - channels, and public channels that are not yet announced to the network. - */ - bool include_unannounced = 1; -} - -// Returns a new instance of the directed channel graph. -message ChannelGraph { - // The list of `LightningNode`s in this channel graph - repeated LightningNode nodes = 1; - - // The list of `ChannelEdge`s in this channel graph - repeated ChannelEdge edges = 2; -} - -enum NodeMetricType { - UNKNOWN = 0; - BETWEENNESS_CENTRALITY = 1; -} - -message NodeMetricsRequest { - // The requested node metrics. - repeated NodeMetricType types = 1; -} - -message NodeMetricsResponse { - /* - Betweenness centrality is the sum of the ratio of shortest paths that pass - through the node for each pair of nodes in the graph (not counting paths - starting or ending at this node). - Map of node pubkey to betweenness centrality of the node. Normalized - values are in the [0,1] closed interval. - */ - map betweenness_centrality = 1; -} - -message FloatMetric { - // Arbitrary float value. - double value = 1; - - // The value normalized to [0,1] or [-1,1]. - double normalized_value = 2; -} - -message ChanInfoRequest { - /* - The unique channel ID for the channel. The first 3 bytes are the block - height, the next 3 the index within the block, and the last 2 bytes are the - output index for the channel. - */ - uint64 chan_id = 1 [jstype = JS_STRING]; -} - -message NetworkInfoRequest { -} -message NetworkInfo { - uint32 graph_diameter = 1; - double avg_out_degree = 2; - uint32 max_out_degree = 3; - - uint32 num_nodes = 4; - uint32 num_channels = 5; - - int64 total_network_capacity = 6; - - double avg_channel_size = 7; - int64 min_channel_size = 8; - int64 max_channel_size = 9; - int64 median_channel_size_sat = 10; - - // The number of edges marked as zombies. - uint64 num_zombie_chans = 11; - - // TODO(roasbeef): fee rate info, expiry - // * also additional RPC for tracking fee info once in -} - -message StopRequest { -} -message StopResponse { -} - -message GraphTopologySubscription { -} -message GraphTopologyUpdate { - repeated NodeUpdate node_updates = 1; - repeated ChannelEdgeUpdate channel_updates = 2; - repeated ClosedChannelUpdate closed_chans = 3; -} -message NodeUpdate { - /* - Deprecated, use node_addresses. - */ - repeated string addresses = 1 [deprecated = true]; - - string identity_key = 2; - - /* - Deprecated, use features. - */ - bytes global_features = 3 [deprecated = true]; - - string alias = 4; - string color = 5; - repeated NodeAddress node_addresses = 7; - - /* - Features that the node has advertised in the init message, node - announcements and invoices. - */ - map features = 6; -} -message ChannelEdgeUpdate { - /* - The unique channel ID for the channel. The first 3 bytes are the block - height, the next 3 the index within the block, and the last 2 bytes are the - output index for the channel. - */ - uint64 chan_id = 1 [jstype = JS_STRING]; - - ChannelPoint chan_point = 2; - - int64 capacity = 3; - - RoutingPolicy routing_policy = 4; - - string advertising_node = 5; - string connecting_node = 6; -} -message ClosedChannelUpdate { - /* - The unique channel ID for the channel. The first 3 bytes are the block - height, the next 3 the index within the block, and the last 2 bytes are the - output index for the channel. - */ - uint64 chan_id = 1 [jstype = JS_STRING]; - int64 capacity = 2; - uint32 closed_height = 3; - ChannelPoint chan_point = 4; -} - -message HopHint { - // The public key of the node at the start of the channel. - string node_id = 1; - - // The unique identifier of the channel. - uint64 chan_id = 2 [jstype = JS_STRING]; - - // The base fee of the channel denominated in millisatoshis. - uint32 fee_base_msat = 3; - - /* - The fee rate of the channel for sending one satoshi across it denominated in - millionths of a satoshi. - */ - uint32 fee_proportional_millionths = 4; - - // The time-lock delta of the channel. - uint32 cltv_expiry_delta = 5; -} - -message SetID { - bytes set_id = 1; -} - -message RouteHint { - /* - A list of hop hints that when chained together can assist in reaching a - specific destination. - */ - repeated HopHint hop_hints = 1; -} - -message AMPInvoiceState { - // The state the HTLCs associated with this setID are in. - InvoiceHTLCState state = 1; - - // The settle index of this HTLC set, if the invoice state is settled. - uint64 settle_index = 2; - - // The time this HTLC set was settled expressed in unix epoch. - int64 settle_time = 3; - - // The total amount paid for the sub-invoice expressed in milli satoshis. - int64 amt_paid_msat = 5; -} - -message Invoice { - /* - An optional memo to attach along with the invoice. Used for record keeping - purposes for the invoice's creator, and will also be set in the description - field of the encoded payment request if the description_hash field is not - being used. - */ - string memo = 1; - - reserved 2; - - /* - The hex-encoded preimage (32 byte) which will allow settling an incoming - HTLC payable to this preimage. When using REST, this field must be encoded - as base64. - */ - bytes r_preimage = 3; - - /* - The hash of the preimage. When using REST, this field must be encoded as - base64. - Note: Output only, don't specify for creating an invoice. - */ - bytes r_hash = 4; - - /* - The value of this invoice in satoshis - - The fields value and value_msat are mutually exclusive. - */ - int64 value = 5; - - /* - The value of this invoice in millisatoshis - - The fields value and value_msat are mutually exclusive. - */ - int64 value_msat = 23; - - /* - Whether this invoice has been fulfilled - - The field is deprecated. Use the state field instead (compare to SETTLED). - */ - bool settled = 6 [deprecated = true]; - - /* - When this invoice was created. - Note: Output only, don't specify for creating an invoice. - */ - int64 creation_date = 7; - - /* - When this invoice was settled. - Note: Output only, don't specify for creating an invoice. - */ - int64 settle_date = 8; - - /* - A bare-bones invoice for a payment within the Lightning Network. With the - details of the invoice, the sender has all the data necessary to send a - payment to the recipient. - Note: Output only, don't specify for creating an invoice. - */ - string payment_request = 9; - - /* - Hash (SHA-256) of a description of the payment. Used if the description of - payment (memo) is too long to naturally fit within the description field - of an encoded payment request. When using REST, this field must be encoded - as base64. - */ - bytes description_hash = 10; - - // Payment request expiry time in seconds. Default is 3600 (1 hour). - int64 expiry = 11; - - // Fallback on-chain address. - string fallback_addr = 12; - - // Delta to use for the time-lock of the CLTV extended to the final hop. - uint64 cltv_expiry = 13; - - /* - Route hints that can each be individually used to assist in reaching the - invoice's destination. - */ - repeated RouteHint route_hints = 14; - - // Whether this invoice should include routing hints for private channels. - bool private = 15; - - /* - The "add" index of this invoice. Each newly created invoice will increment - this index making it monotonically increasing. Callers to the - SubscribeInvoices call can use this to instantly get notified of all added - invoices with an add_index greater than this one. - Note: Output only, don't specify for creating an invoice. - */ - uint64 add_index = 16; - - /* - The "settle" index of this invoice. Each newly settled invoice will - increment this index making it monotonically increasing. Callers to the - SubscribeInvoices call can use this to instantly get notified of all - settled invoices with an settle_index greater than this one. - Note: Output only, don't specify for creating an invoice. - */ - uint64 settle_index = 17; - - // Deprecated, use amt_paid_sat or amt_paid_msat. - int64 amt_paid = 18 [deprecated = true]; - - /* - The amount that was accepted for this invoice, in satoshis. This will ONLY - be set if this invoice has been settled. We provide this field as if the - invoice was created with a zero value, then we need to record what amount - was ultimately accepted. Additionally, it's possible that the sender paid - MORE that was specified in the original invoice. So we'll record that here - as well. - Note: Output only, don't specify for creating an invoice. - */ - int64 amt_paid_sat = 19; - - /* - The amount that was accepted for this invoice, in millisatoshis. This will - ONLY be set if this invoice has been settled. We provide this field as if - the invoice was created with a zero value, then we need to record what - amount was ultimately accepted. Additionally, it's possible that the sender - paid MORE that was specified in the original invoice. So we'll record that - here as well. - Note: Output only, don't specify for creating an invoice. - */ - int64 amt_paid_msat = 20; - - enum InvoiceState { - OPEN = 0; - SETTLED = 1; - CANCELED = 2; - ACCEPTED = 3; - } - - /* - The state the invoice is in. - Note: Output only, don't specify for creating an invoice. - */ - InvoiceState state = 21; - - /* - List of HTLCs paying to this invoice [EXPERIMENTAL]. - Note: Output only, don't specify for creating an invoice. - */ - repeated InvoiceHTLC htlcs = 22; - - /* - List of features advertised on the invoice. - Note: Output only, don't specify for creating an invoice. - */ - map features = 24; - - /* - Indicates if this invoice was a spontaneous payment that arrived via keysend - [EXPERIMENTAL]. - Note: Output only, don't specify for creating an invoice. - */ - bool is_keysend = 25; - - /* - The payment address of this invoice. This value will be used in MPP - payments, and also for newer invoices that always require the MPP payload - for added end-to-end security. - Note: Output only, don't specify for creating an invoice. - */ - bytes payment_addr = 26; - - /* - Signals whether or not this is an AMP invoice. - */ - bool is_amp = 27; - - /* - [EXPERIMENTAL]: - - Maps a 32-byte hex-encoded set ID to the sub-invoice AMP state for the - given set ID. This field is always populated for AMP invoices, and can be - used along side LookupInvoice to obtain the HTLC information related to a - given sub-invoice. - Note: Output only, don't specify for creating an invoice. - */ - map amp_invoice_state = 28; -} - -enum InvoiceHTLCState { - ACCEPTED = 0; - SETTLED = 1; - CANCELED = 2; -} - -// Details of an HTLC that paid to an invoice -message InvoiceHTLC { - // Short channel id over which the htlc was received. - uint64 chan_id = 1 [jstype = JS_STRING]; - - // Index identifying the htlc on the channel. - uint64 htlc_index = 2; - - // The amount of the htlc in msat. - uint64 amt_msat = 3; - - // Block height at which this htlc was accepted. - int32 accept_height = 4; - - // Time at which this htlc was accepted. - int64 accept_time = 5; - - // Time at which this htlc was settled or canceled. - int64 resolve_time = 6; - - // Block height at which this htlc expires. - int32 expiry_height = 7; - - // Current state the htlc is in. - InvoiceHTLCState state = 8; - - // Custom tlv records. - map custom_records = 9; - - // The total amount of the mpp payment in msat. - uint64 mpp_total_amt_msat = 10; - - // Details relevant to AMP HTLCs, only populated if this is an AMP HTLC. - AMP amp = 11; -} - -// Details specific to AMP HTLCs. -message AMP { - // An n-of-n secret share of the root seed from which child payment hashes - // and preimages are derived. - bytes root_share = 1; - - // An identifier for the HTLC set that this HTLC belongs to. - bytes set_id = 2; - - // A nonce used to randomize the child preimage and child hash from a given - // root_share. - uint32 child_index = 3; - - // The payment hash of the AMP HTLC. - bytes hash = 4; - - // The preimage used to settle this AMP htlc. This field will only be - // populated if the invoice is in InvoiceState_ACCEPTED or - // InvoiceState_SETTLED. - bytes preimage = 5; -} - -message AddInvoiceResponse { - bytes r_hash = 1; - - /* - A bare-bones invoice for a payment within the Lightning Network. With the - details of the invoice, the sender has all the data necessary to send a - payment to the recipient. - */ - string payment_request = 2; - - /* - The "add" index of this invoice. Each newly created invoice will increment - this index making it monotonically increasing. Callers to the - SubscribeInvoices call can use this to instantly get notified of all added - invoices with an add_index greater than this one. - */ - uint64 add_index = 16; - - /* - The payment address of the generated invoice. This value should be used - in all payments for this invoice as we require it for end to end - security. - */ - bytes payment_addr = 17; -} -message PaymentHash { - /* - The hex-encoded payment hash of the invoice to be looked up. The passed - payment hash must be exactly 32 bytes, otherwise an error is returned. - Deprecated now that the REST gateway supports base64 encoding of bytes - fields. - */ - string r_hash_str = 1 [deprecated = true]; - - /* - The payment hash of the invoice to be looked up. When using REST, this field - must be encoded as base64. - */ - bytes r_hash = 2; -} - -message ListInvoiceRequest { - /* - If set, only invoices that are not settled and not canceled will be returned - in the response. - */ - bool pending_only = 1; - - /* - The index of an invoice that will be used as either the start or end of a - query to determine which invoices should be returned in the response. - */ - uint64 index_offset = 4; - - // The max number of invoices to return in the response to this query. - uint64 num_max_invoices = 5; - - /* - If set, the invoices returned will result from seeking backwards from the - specified index offset. This can be used to paginate backwards. - */ - bool reversed = 6; -} -message ListInvoiceResponse { - /* - A list of invoices from the time slice of the time series specified in the - request. - */ - repeated Invoice invoices = 1; - - /* - The index of the last item in the set of returned invoices. This can be used - to seek further, pagination style. - */ - uint64 last_index_offset = 2; - - /* - The index of the last item in the set of returned invoices. This can be used - to seek backwards, pagination style. - */ - uint64 first_index_offset = 3; -} - -message InvoiceSubscription { - /* - If specified (non-zero), then we'll first start by sending out - notifications for all added indexes with an add_index greater than this - value. This allows callers to catch up on any events they missed while they - weren't connected to the streaming RPC. - */ - uint64 add_index = 1; - - /* - If specified (non-zero), then we'll first start by sending out - notifications for all settled indexes with an settle_index greater than - this value. This allows callers to catch up on any events they missed while - they weren't connected to the streaming RPC. - */ - uint64 settle_index = 2; -} - -enum PaymentFailureReason { - /* - Payment isn't failed (yet). - */ - FAILURE_REASON_NONE = 0; - - /* - There are more routes to try, but the payment timeout was exceeded. - */ - FAILURE_REASON_TIMEOUT = 1; - - /* - All possible routes were tried and failed permanently. Or were no - routes to the destination at all. - */ - FAILURE_REASON_NO_ROUTE = 2; - - /* - A non-recoverable error has occured. - */ - FAILURE_REASON_ERROR = 3; - - /* - Payment details incorrect (unknown hash, invalid amt or - invalid final cltv delta) - */ - FAILURE_REASON_INCORRECT_PAYMENT_DETAILS = 4; - - /* - Insufficient local balance. - */ - FAILURE_REASON_INSUFFICIENT_BALANCE = 5; -} - -message Payment { - // The payment hash - string payment_hash = 1; - - // Deprecated, use value_sat or value_msat. - int64 value = 2 [deprecated = true]; - - // Deprecated, use creation_time_ns - int64 creation_date = 3 [deprecated = true]; - - reserved 4; - - // Deprecated, use fee_sat or fee_msat. - int64 fee = 5 [deprecated = true]; - - // The payment preimage - string payment_preimage = 6; - - // The value of the payment in satoshis - int64 value_sat = 7; - - // The value of the payment in milli-satoshis - int64 value_msat = 8; - - // The optional payment request being fulfilled. - string payment_request = 9; - - enum PaymentStatus { - UNKNOWN = 0; - IN_FLIGHT = 1; - SUCCEEDED = 2; - FAILED = 3; - } - - // The status of the payment. - PaymentStatus status = 10; - - // The fee paid for this payment in satoshis - int64 fee_sat = 11; - - // The fee paid for this payment in milli-satoshis - int64 fee_msat = 12; - - // The time in UNIX nanoseconds at which the payment was created. - int64 creation_time_ns = 13; - - // The HTLCs made in attempt to settle the payment. - repeated HTLCAttempt htlcs = 14; - - /* - The creation index of this payment. Each payment can be uniquely identified - by this index, which may not strictly increment by 1 for payments made in - older versions of lnd. - */ - uint64 payment_index = 15; - - PaymentFailureReason failure_reason = 16; -} - -message HTLCAttempt { - // The unique ID that is used for this attempt. - uint64 attempt_id = 7; - - enum HTLCStatus { - IN_FLIGHT = 0; - SUCCEEDED = 1; - FAILED = 2; - } - - // The status of the HTLC. - HTLCStatus status = 1; - - // The route taken by this HTLC. - Route route = 2; - - // The time in UNIX nanoseconds at which this HTLC was sent. - int64 attempt_time_ns = 3; - - /* - The time in UNIX nanoseconds at which this HTLC was settled or failed. - This value will not be set if the HTLC is still IN_FLIGHT. - */ - int64 resolve_time_ns = 4; - - // Detailed htlc failure info. - Failure failure = 5; - - // The preimage that was used to settle the HTLC. - bytes preimage = 6; -} - -message ListPaymentsRequest { - /* - If true, then return payments that have not yet fully completed. This means - that pending payments, as well as failed payments will show up if this - field is set to true. This flag doesn't change the meaning of the indices, - which are tied to individual payments. - */ - bool include_incomplete = 1; - - /* - The index of a payment that will be used as either the start or end of a - query to determine which payments should be returned in the response. The - index_offset is exclusive. In the case of a zero index_offset, the query - will start with the oldest payment when paginating forwards, or will end - with the most recent payment when paginating backwards. - */ - uint64 index_offset = 2; - - // The maximal number of payments returned in the response to this query. - uint64 max_payments = 3; - - /* - If set, the payments returned will result from seeking backwards from the - specified index offset. This can be used to paginate backwards. The order - of the returned payments is always oldest first (ascending index order). - */ - bool reversed = 4; - - /* - If set, all payments (complete and incomplete, independent of the - max_payments parameter) will be counted. Note that setting this to true will - increase the run time of the call significantly on systems that have a lot - of payments, as all of them have to be iterated through to be counted. - */ - bool count_total_payments = 5; -} - -message ListPaymentsResponse { - // The list of payments - repeated Payment payments = 1; - - /* - The index of the first item in the set of returned payments. This can be - used as the index_offset to continue seeking backwards in the next request. - */ - uint64 first_index_offset = 2; - - /* - The index of the last item in the set of returned payments. This can be used - as the index_offset to continue seeking forwards in the next request. - */ - uint64 last_index_offset = 3; - - /* - Will only be set if count_total_payments in the request was set. Represents - the total number of payments (complete and incomplete, independent of the - number of payments requested in the query) currently present in the payments - database. - */ - uint64 total_num_payments = 4; -} - -message DeletePaymentRequest { - // Payment hash to delete. - bytes payment_hash = 1; - - /* - Only delete failed HTLCs from the payment, not the payment itself. - */ - bool failed_htlcs_only = 2; -} - -message DeleteAllPaymentsRequest { - // Only delete failed payments. - bool failed_payments_only = 1; - - /* - Only delete failed HTLCs from payments, not the payment itself. - */ - bool failed_htlcs_only = 2; -} - -message DeletePaymentResponse { -} - -message DeleteAllPaymentsResponse { -} - -message AbandonChannelRequest { - ChannelPoint channel_point = 1; - - bool pending_funding_shim_only = 2; - - /* - Override the requirement for being in dev mode by setting this to true and - confirming the user knows what they are doing and this is a potential foot - gun to lose funds if used on active channels. - */ - bool i_know_what_i_am_doing = 3; -} - -message AbandonChannelResponse { -} - -message DebugLevelRequest { - bool show = 1; - string level_spec = 2; -} -message DebugLevelResponse { - string sub_systems = 1; -} - -message PayReqString { - // The payment request string to be decoded - string pay_req = 1; -} -message PayReq { - string destination = 1; - string payment_hash = 2; - int64 num_satoshis = 3; - int64 timestamp = 4; - int64 expiry = 5; - string description = 6; - string description_hash = 7; - string fallback_addr = 8; - int64 cltv_expiry = 9; - repeated RouteHint route_hints = 10; - bytes payment_addr = 11; - int64 num_msat = 12; - map features = 13; -} - -enum FeatureBit { - DATALOSS_PROTECT_REQ = 0; - DATALOSS_PROTECT_OPT = 1; - INITIAL_ROUING_SYNC = 3; - UPFRONT_SHUTDOWN_SCRIPT_REQ = 4; - UPFRONT_SHUTDOWN_SCRIPT_OPT = 5; - GOSSIP_QUERIES_REQ = 6; - GOSSIP_QUERIES_OPT = 7; - TLV_ONION_REQ = 8; - TLV_ONION_OPT = 9; - EXT_GOSSIP_QUERIES_REQ = 10; - EXT_GOSSIP_QUERIES_OPT = 11; - STATIC_REMOTE_KEY_REQ = 12; - STATIC_REMOTE_KEY_OPT = 13; - PAYMENT_ADDR_REQ = 14; - PAYMENT_ADDR_OPT = 15; - MPP_REQ = 16; - MPP_OPT = 17; - WUMBO_CHANNELS_REQ = 18; - WUMBO_CHANNELS_OPT = 19; - ANCHORS_REQ = 20; - ANCHORS_OPT = 21; - ANCHORS_ZERO_FEE_HTLC_REQ = 22; - ANCHORS_ZERO_FEE_HTLC_OPT = 23; - AMP_REQ = 30; - AMP_OPT = 31; -} - -message Feature { - string name = 2; - bool is_required = 3; - bool is_known = 4; -} - -message FeeReportRequest { -} -message ChannelFeeReport { - // The short channel id that this fee report belongs to. - uint64 chan_id = 5 [jstype = JS_STRING]; - - // The channel that this fee report belongs to. - string channel_point = 1; - - // The base fee charged regardless of the number of milli-satoshis sent. - int64 base_fee_msat = 2; - - // The amount charged per milli-satoshis transferred expressed in - // millionths of a satoshi. - int64 fee_per_mil = 3; - - // The effective fee rate in milli-satoshis. Computed by dividing the - // fee_per_mil value by 1 million. - double fee_rate = 4; -} -message FeeReportResponse { - // An array of channel fee reports which describes the current fee schedule - // for each channel. - repeated ChannelFeeReport channel_fees = 1; - - // The total amount of fee revenue (in satoshis) the switch has collected - // over the past 24 hrs. - uint64 day_fee_sum = 2; - - // The total amount of fee revenue (in satoshis) the switch has collected - // over the past 1 week. - uint64 week_fee_sum = 3; - - // The total amount of fee revenue (in satoshis) the switch has collected - // over the past 1 month. - uint64 month_fee_sum = 4; -} - -message PolicyUpdateRequest { - oneof scope { - // If set, then this update applies to all currently active channels. - bool global = 1; - - // If set, this update will target a specific channel. - ChannelPoint chan_point = 2; - } - - // The base fee charged regardless of the number of milli-satoshis sent. - int64 base_fee_msat = 3; - - // The effective fee rate in milli-satoshis. The precision of this value - // goes up to 6 decimal places, so 1e-6. - double fee_rate = 4; - - // The effective fee rate in micro-satoshis (parts per million). - uint32 fee_rate_ppm = 9; - - // The required timelock delta for HTLCs forwarded over the channel. - uint32 time_lock_delta = 5; - - // If set, the maximum HTLC size in milli-satoshis. If unset, the maximum - // HTLC will be unchanged. - uint64 max_htlc_msat = 6; - - // The minimum HTLC size in milli-satoshis. Only applied if - // min_htlc_msat_specified is true. - uint64 min_htlc_msat = 7; - - // If true, min_htlc_msat is applied. - bool min_htlc_msat_specified = 8; -} -enum UpdateFailure { - UPDATE_FAILURE_UNKNOWN = 0; - UPDATE_FAILURE_PENDING = 1; - UPDATE_FAILURE_NOT_FOUND = 2; - UPDATE_FAILURE_INTERNAL_ERR = 3; - UPDATE_FAILURE_INVALID_PARAMETER = 4; -} - -message FailedUpdate { - // The outpoint in format txid:n - OutPoint outpoint = 1; - - // Reason for the policy update failure. - UpdateFailure reason = 2; - - // A string representation of the policy update error. - string update_error = 3; -} - -message PolicyUpdateResponse { - // List of failed policy updates. - repeated FailedUpdate failed_updates = 1; -} - -message ForwardingHistoryRequest { - // Start time is the starting point of the forwarding history request. All - // records beyond this point will be included, respecting the end time, and - // the index offset. - uint64 start_time = 1; - - // End time is the end point of the forwarding history request. The - // response will carry at most 50k records between the start time and the - // end time. The index offset can be used to implement pagination. - uint64 end_time = 2; - - // Index offset is the offset in the time series to start at. As each - // response can only contain 50k records, callers can use this to skip - // around within a packed time series. - uint32 index_offset = 3; - - // The max number of events to return in the response to this query. - uint32 num_max_events = 4; -} -message ForwardingEvent { - // Timestamp is the time (unix epoch offset) that this circuit was - // completed. Deprecated by timestamp_ns. - uint64 timestamp = 1 [deprecated = true]; - - // The incoming channel ID that carried the HTLC that created the circuit. - uint64 chan_id_in = 2 [jstype = JS_STRING]; - - // The outgoing channel ID that carried the preimage that completed the - // circuit. - uint64 chan_id_out = 4 [jstype = JS_STRING]; - - // The total amount (in satoshis) of the incoming HTLC that created half - // the circuit. - uint64 amt_in = 5; - - // The total amount (in satoshis) of the outgoing HTLC that created the - // second half of the circuit. - uint64 amt_out = 6; - - // The total fee (in satoshis) that this payment circuit carried. - uint64 fee = 7; - - // The total fee (in milli-satoshis) that this payment circuit carried. - uint64 fee_msat = 8; - - // The total amount (in milli-satoshis) of the incoming HTLC that created - // half the circuit. - uint64 amt_in_msat = 9; - - // The total amount (in milli-satoshis) of the outgoing HTLC that created - // the second half of the circuit. - uint64 amt_out_msat = 10; - - // The number of nanoseconds elapsed since January 1, 1970 UTC when this - // circuit was completed. - uint64 timestamp_ns = 11; - - // TODO(roasbeef): add settlement latency? - // * use FPE on the chan id? - // * also list failures? -} -message ForwardingHistoryResponse { - // A list of forwarding events from the time slice of the time series - // specified in the request. - repeated ForwardingEvent forwarding_events = 1; - - // The index of the last time in the set of returned forwarding events. Can - // be used to seek further, pagination style. - uint32 last_offset_index = 2; -} - -message ExportChannelBackupRequest { - // The target channel point to obtain a back up for. - ChannelPoint chan_point = 1; -} - -message ChannelBackup { - /* - Identifies the channel that this backup belongs to. - */ - ChannelPoint chan_point = 1; - - /* - Is an encrypted single-chan backup. this can be passed to - RestoreChannelBackups, or the WalletUnlocker Init and Unlock methods in - order to trigger the recovery protocol. When using REST, this field must be - encoded as base64. - */ - bytes chan_backup = 2; -} - -message MultiChanBackup { - /* - Is the set of all channels that are included in this multi-channel backup. - */ - repeated ChannelPoint chan_points = 1; - - /* - A single encrypted blob containing all the static channel backups of the - channel listed above. This can be stored as a single file or blob, and - safely be replaced with any prior/future versions. When using REST, this - field must be encoded as base64. - */ - bytes multi_chan_backup = 2; -} - -message ChanBackupExportRequest { -} -message ChanBackupSnapshot { - /* - The set of new channels that have been added since the last channel backup - snapshot was requested. - */ - ChannelBackups single_chan_backups = 1; - - /* - A multi-channel backup that covers all open channels currently known to - lnd. - */ - MultiChanBackup multi_chan_backup = 2; -} - -message ChannelBackups { - /* - A set of single-chan static channel backups. - */ - repeated ChannelBackup chan_backups = 1; -} - -message RestoreChanBackupRequest { - oneof backup { - /* - The channels to restore as a list of channel/backup pairs. - */ - ChannelBackups chan_backups = 1; - - /* - The channels to restore in the packed multi backup format. When using - REST, this field must be encoded as base64. - */ - bytes multi_chan_backup = 2; - } -} -message RestoreBackupResponse { -} - -message ChannelBackupSubscription { -} - -message VerifyChanBackupResponse { -} - -message MacaroonPermission { - // The entity a permission grants access to. - string entity = 1; - - // The action that is granted. - string action = 2; -} -message BakeMacaroonRequest { - // The list of permissions the new macaroon should grant. - repeated MacaroonPermission permissions = 1; - - // The root key ID used to create the macaroon, must be a positive integer. - uint64 root_key_id = 2; - - /* - Informs the RPC on whether to allow external permissions that LND is not - aware of. - */ - bool allow_external_permissions = 3; -} -message BakeMacaroonResponse { - // The hex encoded macaroon, serialized in binary format. - string macaroon = 1; -} - -message ListMacaroonIDsRequest { -} -message ListMacaroonIDsResponse { - // The list of root key IDs that are in use. - repeated uint64 root_key_ids = 1; -} - -message DeleteMacaroonIDRequest { - // The root key ID to be removed. - uint64 root_key_id = 1; -} -message DeleteMacaroonIDResponse { - // A boolean indicates that the deletion is successful. - bool deleted = 1; -} - -message MacaroonPermissionList { - // A list of macaroon permissions. - repeated MacaroonPermission permissions = 1; -} - -message ListPermissionsRequest { -} -message ListPermissionsResponse { - /* - A map between all RPC method URIs and their required macaroon permissions to - access them. - */ - map method_permissions = 1; -} - -message Failure { - enum FailureCode { - /* - The numbers assigned in this enumeration match the failure codes as - defined in BOLT #4. Because protobuf 3 requires enums to start with 0, - a RESERVED value is added. - */ - RESERVED = 0; - - INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS = 1; - INCORRECT_PAYMENT_AMOUNT = 2; - FINAL_INCORRECT_CLTV_EXPIRY = 3; - FINAL_INCORRECT_HTLC_AMOUNT = 4; - FINAL_EXPIRY_TOO_SOON = 5; - INVALID_REALM = 6; - EXPIRY_TOO_SOON = 7; - INVALID_ONION_VERSION = 8; - INVALID_ONION_HMAC = 9; - INVALID_ONION_KEY = 10; - AMOUNT_BELOW_MINIMUM = 11; - FEE_INSUFFICIENT = 12; - INCORRECT_CLTV_EXPIRY = 13; - CHANNEL_DISABLED = 14; - TEMPORARY_CHANNEL_FAILURE = 15; - REQUIRED_NODE_FEATURE_MISSING = 16; - REQUIRED_CHANNEL_FEATURE_MISSING = 17; - UNKNOWN_NEXT_PEER = 18; - TEMPORARY_NODE_FAILURE = 19; - PERMANENT_NODE_FAILURE = 20; - PERMANENT_CHANNEL_FAILURE = 21; - EXPIRY_TOO_FAR = 22; - MPP_TIMEOUT = 23; - INVALID_ONION_PAYLOAD = 24; - - /* - An internal error occurred. - */ - INTERNAL_FAILURE = 997; - - /* - The error source is known, but the failure itself couldn't be decoded. - */ - UNKNOWN_FAILURE = 998; - - /* - An unreadable failure result is returned if the received failure message - cannot be decrypted. In that case the error source is unknown. - */ - UNREADABLE_FAILURE = 999; - } - - // Failure code as defined in the Lightning spec - FailureCode code = 1; - - reserved 2; - - // An optional channel update message. - ChannelUpdate channel_update = 3; - - // A failure type-dependent htlc value. - uint64 htlc_msat = 4; - - // The sha256 sum of the onion payload. - bytes onion_sha_256 = 5; - - // A failure type-dependent cltv expiry value. - uint32 cltv_expiry = 6; - - // A failure type-dependent flags value. - uint32 flags = 7; - - /* - The position in the path of the intermediate or final node that generated - the failure message. Position zero is the sender node. - **/ - uint32 failure_source_index = 8; - - // A failure type-dependent block height. - uint32 height = 9; -} - -message ChannelUpdate { - /* - The signature that validates the announced data and proves the ownership - of node id. - */ - bytes signature = 1; - - /* - The target chain that this channel was opened within. This value - should be the genesis hash of the target chain. Along with the short - channel ID, this uniquely identifies the channel globally in a - blockchain. - */ - bytes chain_hash = 2; - - /* - The unique description of the funding transaction. - */ - uint64 chan_id = 3 [jstype = JS_STRING]; - - /* - A timestamp that allows ordering in the case of multiple announcements. - We should ignore the message if timestamp is not greater than the - last-received. - */ - uint32 timestamp = 4; - - /* - The bitfield that describes whether optional fields are present in this - update. Currently, the least-significant bit must be set to 1 if the - optional field MaxHtlc is present. - */ - uint32 message_flags = 10; - - /* - The bitfield that describes additional meta-data concerning how the - update is to be interpreted. Currently, the least-significant bit must be - set to 0 if the creating node corresponds to the first node in the - previously sent channel announcement and 1 otherwise. If the second bit - is set, then the channel is set to be disabled. - */ - uint32 channel_flags = 5; - - /* - The minimum number of blocks this node requires to be added to the expiry - of HTLCs. This is a security parameter determined by the node operator. - This value represents the required gap between the time locks of the - incoming and outgoing HTLC's set to this node. - */ - uint32 time_lock_delta = 6; - - /* - The minimum HTLC value which will be accepted. - */ - uint64 htlc_minimum_msat = 7; - - /* - The base fee that must be used for incoming HTLC's to this particular - channel. This value will be tacked onto the required for a payment - independent of the size of the payment. - */ - uint32 base_fee = 8; - - /* - The fee rate that will be charged per millionth of a satoshi. - */ - uint32 fee_rate = 9; - - /* - The maximum HTLC value which will be accepted. - */ - uint64 htlc_maximum_msat = 11; - - /* - The set of data that was appended to this message, some of which we may - not actually know how to iterate or parse. By holding onto this data, we - ensure that we're able to properly validate the set of signatures that - cover these new fields, and ensure we're able to make upgrades to the - network in a forwards compatible manner. - */ - bytes extra_opaque_data = 12; -} - -message MacaroonId { - bytes nonce = 1; - bytes storageId = 2; - repeated Op ops = 3; -} - -message Op { - string entity = 1; - repeated string actions = 2; -} - -message CheckMacPermRequest { - bytes macaroon = 1; - repeated MacaroonPermission permissions = 2; - string fullMethod = 3; -} - -message CheckMacPermResponse { - bool valid = 1; -} - -message RPCMiddlewareRequest { - /* - The unique ID of the intercepted original gRPC request. Useful for mapping - request to response when implementing full duplex message interception. For - streaming requests, this will be the same ID for all incoming and outgoing - middleware intercept messages of the _same_ stream. - */ - uint64 request_id = 1; - - /* - The raw bytes of the complete macaroon as sent by the gRPC client in the - original request. This might be empty for a request that doesn't require - macaroons such as the wallet unlocker RPCs. - */ - bytes raw_macaroon = 2; - - /* - The parsed condition of the macaroon's custom caveat for convenient access. - This field only contains the value of the custom caveat that the handling - middleware has registered itself for. The condition _must_ be validated for - messages of intercept_type stream_auth and request! - */ - string custom_caveat_condition = 3; - - /* - There are three types of messages that will be sent to the middleware for - inspection and approval: Stream authentication, request and response - interception. The first two can only be accepted (=forward to main RPC - server) or denied (=return error to client). Intercepted responses can also - be replaced/overwritten. - */ - oneof intercept_type { - /* - Intercept stream authentication: each new streaming RPC call that is - initiated against lnd and contains the middleware's custom macaroon - caveat can be approved or denied based upon the macaroon in the stream - header. This message will only be sent for streaming RPCs, unary RPCs - must handle the macaroon authentication in the request interception to - avoid an additional message round trip between lnd and the middleware. - */ - StreamAuth stream_auth = 4; - - /* - Intercept incoming gRPC client request message: all incoming messages, - both on streaming and unary RPCs, are forwarded to the middleware for - inspection. For unary RPC messages the middleware is also expected to - validate the custom macaroon caveat of the request. - */ - RPCMessage request = 5; - - /* - Intercept outgoing gRPC response message: all outgoing messages, both on - streaming and unary RPCs, are forwarded to the middleware for inspection - and amendment. The response in this message is the original response as - it was generated by the main RPC server. It can either be accepted - (=forwarded to the client), replaced/overwritten with a new message of - the same type, or replaced by an error message. - */ - RPCMessage response = 6; - - /* - This is used to indicate to the client that the server has successfully - registered the interceptor. This is only used in the very first message - that the server sends to the client after the client sends the server - the middleware registration message. - */ - bool reg_complete = 8; - } - - /* - The unique message ID of this middleware intercept message. There can be - multiple middleware intercept messages per single gRPC request (one for the - incoming request and one for the outgoing response) or gRPC stream (one for - each incoming message and one for each outgoing response). This message ID - must be referenced when responding (accepting/rejecting/modifying) to an - intercept message. - */ - uint64 msg_id = 7; -} - -message StreamAuth { - /* - The full URI (in the format /./MethodName, for - example /lnrpc.Lightning/GetInfo) of the streaming RPC method that was just - established. - */ - string method_full_uri = 1; -} - -message RPCMessage { - /* - The full URI (in the format /./MethodName, for - example /lnrpc.Lightning/GetInfo) of the RPC method the message was sent - to/from. - */ - string method_full_uri = 1; - - /* - Indicates whether the message was sent over a streaming RPC method or not. - */ - bool stream_rpc = 2; - - /* - The full canonical gRPC name of the message type (in the format - .TypeName, for example lnrpc.GetInfoRequest). In case of an - error being returned from lnd, this simply contains the string "error". - */ - string type_name = 3; - - /* - The full content of the gRPC message, serialized in the binary protobuf - format. - */ - bytes serialized = 4; - - /* - Indicates that the response from lnd was an error, not a gRPC response. If - this is set to true then the type_name contains the string "error" and - serialized contains the error string. - */ - bool is_error = 5; -} - -message RPCMiddlewareResponse { - /* - The request message ID this response refers to. Must always be set when - giving feedback to an intercept but is ignored for the initial registration - message. - */ - uint64 ref_msg_id = 1; - - /* - The middleware can only send two types of messages to lnd: The initial - registration message that identifies the middleware and after that only - feedback messages to requests sent to the middleware. - */ - oneof middleware_message { - /* - The registration message identifies the middleware that's being - registered in lnd. The registration message must be sent immediately - after initiating the RegisterRpcMiddleware stream, otherwise lnd will - time out the attempt and terminate the request. NOTE: The middleware - will only receive interception messages for requests that contain a - macaroon with the custom caveat that the middleware declares it is - responsible for handling in the registration message! As a security - measure, _no_ middleware can intercept requests made with _unencumbered_ - macaroons! - */ - MiddlewareRegistration register = 2; - - /* - The middleware received an interception request and gives feedback to - it. The request_id indicates what message the feedback refers to. - */ - InterceptFeedback feedback = 3; - } -} - -message MiddlewareRegistration { - /* - The name of the middleware to register. The name should be as informative - as possible and is logged on registration. - */ - string middleware_name = 1; - - /* - The name of the custom macaroon caveat that this middleware is responsible - for. Only requests/responses that contain a macaroon with the registered - custom caveat are forwarded for interception to the middleware. The - exception being the read-only mode: All requests/responses are forwarded to - a middleware that requests read-only access but such a middleware won't be - allowed to _alter_ responses. As a security measure, _no_ middleware can - change responses to requests made with _unencumbered_ macaroons! - NOTE: Cannot be used at the same time as read_only_mode. - */ - string custom_macaroon_caveat_name = 2; - - /* - Instead of defining a custom macaroon caveat name a middleware can register - itself for read-only access only. In that mode all requests/responses are - forwarded to the middleware but the middleware isn't allowed to alter any of - the responses. - NOTE: Cannot be used at the same time as custom_macaroon_caveat_name. - */ - bool read_only_mode = 3; -} - -message InterceptFeedback { - /* - The error to return to the user. If this is non-empty, the incoming gRPC - stream/request is aborted and the error is returned to the gRPC client. If - this value is empty, it means the middleware accepts the stream/request/ - response and the processing of it can continue. - */ - string error = 1; - - /* - A boolean indicating that the gRPC message should be replaced/overwritten. - This boolean is needed because in protobuf an empty message is serialized as - a 0-length or nil byte slice and we wouldn't be able to distinguish between - an empty replacement message and the "don't replace anything" case. - */ - bool replace_response = 2; - - /* - If the replace_response field is set to true, this field must contain the - binary serialized gRPC message in the protobuf format. - */ - bytes replacement_serialized = 3; -} diff --git a/protos/lnd/v0.15.1-beta/routerrpc/router.proto b/protos/lnd/v0.15.1-beta/routerrpc/router.proto deleted file mode 100644 index 04812b4..0000000 --- a/protos/lnd/v0.15.1-beta/routerrpc/router.proto +++ /dev/null @@ -1,834 +0,0 @@ -syntax = "proto3"; - -import "lightning.proto"; - -package routerrpc; - -option go_package = "github.com/lightningnetwork/lnd/lnrpc/routerrpc"; - -// Router is a service that offers advanced interaction with the router -// subsystem of the daemon. -service Router { - /* - SendPaymentV2 attempts to route a payment described by the passed - PaymentRequest to the final destination. The call returns a stream of - payment updates. - */ - rpc SendPaymentV2 (SendPaymentRequest) returns (stream lnrpc.Payment); - - /* - TrackPaymentV2 returns an update stream for the payment identified by the - payment hash. - */ - rpc TrackPaymentV2 (TrackPaymentRequest) returns (stream lnrpc.Payment); - - /* - EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it - may cost to send an HTLC to the target end destination. - */ - rpc EstimateRouteFee (RouteFeeRequest) returns (RouteFeeResponse); - - /* - Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via - the specified route. This method differs from SendPayment in that it - allows users to specify a full route manually. This can be used for - things like rebalancing, and atomic swaps. It differs from the newer - SendToRouteV2 in that it doesn't return the full HTLC information. - */ - rpc SendToRoute (SendToRouteRequest) returns (SendToRouteResponse) { - option deprecated = true; - } - - /* - SendToRouteV2 attempts to make a payment via the specified route. This - method differs from SendPayment in that it allows users to specify a full - route manually. This can be used for things like rebalancing, and atomic - swaps. - */ - rpc SendToRouteV2 (SendToRouteRequest) returns (lnrpc.HTLCAttempt); - - /* - ResetMissionControl clears all mission control state and starts with a clean - slate. - */ - rpc ResetMissionControl (ResetMissionControlRequest) - returns (ResetMissionControlResponse); - - /* - QueryMissionControl exposes the internal mission control state to callers. - It is a development feature. - */ - rpc QueryMissionControl (QueryMissionControlRequest) - returns (QueryMissionControlResponse); - - /* - XImportMissionControl is an experimental API that imports the state provided - to the internal mission control's state, using all results which are more - recent than our existing values. These values will only be imported - in-memory, and will not be persisted across restarts. - */ - rpc XImportMissionControl (XImportMissionControlRequest) - returns (XImportMissionControlResponse); - - /* - GetMissionControlConfig returns mission control's current config. - */ - rpc GetMissionControlConfig (GetMissionControlConfigRequest) - returns (GetMissionControlConfigResponse); - - /* - SetMissionControlConfig will set mission control's config, if the config - provided is valid. - */ - rpc SetMissionControlConfig (SetMissionControlConfigRequest) - returns (SetMissionControlConfigResponse); - - /* - QueryProbability returns the current success probability estimate for a - given node pair and amount. - */ - rpc QueryProbability (QueryProbabilityRequest) - returns (QueryProbabilityResponse); - - /* - BuildRoute builds a fully specified route based on a list of hop public - keys. It retrieves the relevant channel policies from the graph in order to - calculate the correct fees and time locks. - */ - rpc BuildRoute (BuildRouteRequest) returns (BuildRouteResponse); - - /* - SubscribeHtlcEvents creates a uni-directional stream from the server to - the client which delivers a stream of htlc events. - */ - rpc SubscribeHtlcEvents (SubscribeHtlcEventsRequest) - returns (stream HtlcEvent); - - /* - Deprecated, use SendPaymentV2. SendPayment attempts to route a payment - described by the passed PaymentRequest to the final destination. The call - returns a stream of payment status updates. - */ - rpc SendPayment (SendPaymentRequest) returns (stream PaymentStatus) { - option deprecated = true; - } - - /* - Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for - the payment identified by the payment hash. - */ - rpc TrackPayment (TrackPaymentRequest) returns (stream PaymentStatus) { - option deprecated = true; - } - - /** - HtlcInterceptor dispatches a bi-directional streaming RPC in which - Forwarded HTLC requests are sent to the client and the client responds with - a boolean that tells LND if this htlc should be intercepted. - In case of interception, the htlc can be either settled, cancelled or - resumed later by using the ResolveHoldForward endpoint. - */ - rpc HtlcInterceptor (stream ForwardHtlcInterceptResponse) - returns (stream ForwardHtlcInterceptRequest); - - /* - UpdateChanStatus attempts to manually set the state of a channel - (enabled, disabled, or auto). A manual "disable" request will cause the - channel to stay disabled until a subsequent manual request of either - "enable" or "auto". - */ - rpc UpdateChanStatus (UpdateChanStatusRequest) - returns (UpdateChanStatusResponse); -} - -message SendPaymentRequest { - // The identity pubkey of the payment recipient - bytes dest = 1; - - /* - Number of satoshis to send. - - The fields amt and amt_msat are mutually exclusive. - */ - int64 amt = 2; - - /* - Number of millisatoshis to send. - - The fields amt and amt_msat are mutually exclusive. - */ - int64 amt_msat = 12; - - // The hash to use within the payment's HTLC - bytes payment_hash = 3; - - /* - The CLTV delta from the current height that should be used to set the - timelock for the final hop. - */ - int32 final_cltv_delta = 4; - - // An optional payment addr to be included within the last hop of the route. - bytes payment_addr = 20; - - /* - A bare-bones invoice for a payment within the Lightning Network. With the - details of the invoice, the sender has all the data necessary to send a - payment to the recipient. The amount in the payment request may be zero. In - that case it is required to set the amt field as well. If no payment request - is specified, the following fields are required: dest, amt and payment_hash. - */ - string payment_request = 5; - - /* - An upper limit on the amount of time we should spend when attempting to - fulfill the payment. This is expressed in seconds. If we cannot make a - successful payment within this time frame, an error will be returned. - This field must be non-zero. - */ - int32 timeout_seconds = 6; - - /* - The maximum number of satoshis that will be paid as a fee of the payment. - If this field is left to the default value of 0, only zero-fee routes will - be considered. This usually means single hop routes connecting directly to - the destination. To send the payment without a fee limit, use max int here. - - The fields fee_limit_sat and fee_limit_msat are mutually exclusive. - */ - int64 fee_limit_sat = 7; - - /* - The maximum number of millisatoshis that will be paid as a fee of the - payment. If this field is left to the default value of 0, only zero-fee - routes will be considered. This usually means single hop routes connecting - directly to the destination. To send the payment without a fee limit, use - max int here. - - The fields fee_limit_sat and fee_limit_msat are mutually exclusive. - */ - int64 fee_limit_msat = 13; - - /* - Deprecated, use outgoing_chan_ids. The channel id of the channel that must - be taken to the first hop. If zero, any channel may be used (unless - outgoing_chan_ids are set). - */ - uint64 outgoing_chan_id = 8 [jstype = JS_STRING, deprecated = true]; - - /* - The channel ids of the channels are allowed for the first hop. If empty, - any channel may be used. - */ - repeated uint64 outgoing_chan_ids = 19; - - /* - The pubkey of the last hop of the route. If empty, any hop may be used. - */ - bytes last_hop_pubkey = 14; - - /* - An optional maximum total time lock for the route. This should not exceed - lnd's `--max-cltv-expiry` setting. If zero, then the value of - `--max-cltv-expiry` is enforced. - */ - int32 cltv_limit = 9; - - /* - Optional route hints to reach the destination through private channels. - */ - repeated lnrpc.RouteHint route_hints = 10; - - /* - An optional field that can be used to pass an arbitrary set of TLV records - to a peer which understands the new records. This can be used to pass - application specific data during the payment attempt. Record types are - required to be in the custom range >= 65536. When using REST, the values - must be encoded as base64. - */ - map dest_custom_records = 11; - - // If set, circular payments to self are permitted. - bool allow_self_payment = 15; - - /* - Features assumed to be supported by the final node. All transitive feature - dependencies must also be set properly. For a given feature bit pair, either - optional or remote may be set, but not both. If this field is nil or empty, - the router will try to load destination features from the graph as a - fallback. - */ - repeated lnrpc.FeatureBit dest_features = 16; - - /* - The maximum number of partial payments that may be use to complete the full - amount. - */ - uint32 max_parts = 17; - - /* - If set, only the final payment update is streamed back. Intermediate updates - that show which htlcs are still in flight are suppressed. - */ - bool no_inflight_updates = 18; - - /* - The largest payment split that should be attempted when making a payment if - splitting is necessary. Setting this value will effectively cause lnd to - split more aggressively, vs only when it thinks it needs to. Note that this - value is in milli-satoshis. - */ - uint64 max_shard_size_msat = 21; - - /* - If set, an AMP-payment will be attempted. - */ - bool amp = 22; - - /* - The time preference for this payment. Set to -1 to optimize for fees - only, to 1 to optimize for reliability only or a value inbetween for a mix. - */ - double time_pref = 23; -} - -message TrackPaymentRequest { - // The hash of the payment to look up. - bytes payment_hash = 1; - - /* - If set, only the final payment update is streamed back. Intermediate updates - that show which htlcs are still in flight are suppressed. - */ - bool no_inflight_updates = 2; -} - -message RouteFeeRequest { - /* - The destination once wishes to obtain a routing fee quote to. - */ - bytes dest = 1; - - /* - The amount one wishes to send to the target destination. - */ - int64 amt_sat = 2; -} - -message RouteFeeResponse { - /* - A lower bound of the estimated fee to the target destination within the - network, expressed in milli-satoshis. - */ - int64 routing_fee_msat = 1; - - /* - An estimate of the worst case time delay that can occur. Note that callers - will still need to factor in the final CLTV delta of the last hop into this - value. - */ - int64 time_lock_delay = 2; -} - -message SendToRouteRequest { - // The payment hash to use for the HTLC. - bytes payment_hash = 1; - - // Route that should be used to attempt to complete the payment. - lnrpc.Route route = 2; - - /* - Whether the payment should be marked as failed when a temporary error is - returned from the given route. Set it to true so the payment won't be - failed unless a terminal error is occurred, such as payment timeout, no - routes, incorrect payment details, or insufficient funds. - */ - bool skip_temp_err = 3; -} - -message SendToRouteResponse { - // The preimage obtained by making the payment. - bytes preimage = 1; - - // The failure message in case the payment failed. - lnrpc.Failure failure = 2; -} - -message ResetMissionControlRequest { -} - -message ResetMissionControlResponse { -} - -message QueryMissionControlRequest { -} - -// QueryMissionControlResponse contains mission control state. -message QueryMissionControlResponse { - reserved 1; - - // Node pair-level mission control state. - repeated PairHistory pairs = 2; -} - -message XImportMissionControlRequest { - // Node pair-level mission control state to be imported. - repeated PairHistory pairs = 1; - - // Whether to force override MC pair history. Note that even with force - // override the failure pair is imported before the success pair and both - // still clamp existing failure/success amounts. - bool force = 2; -} - -message XImportMissionControlResponse { -} - -// PairHistory contains the mission control state for a particular node pair. -message PairHistory { - // The source node pubkey of the pair. - bytes node_from = 1; - - // The destination node pubkey of the pair. - bytes node_to = 2; - - reserved 3, 4, 5, 6; - - PairData history = 7; -} - -message PairData { - // Time of last failure. - int64 fail_time = 1; - - /* - Lowest amount that failed to forward rounded to whole sats. This may be - set to zero if the failure is independent of amount. - */ - int64 fail_amt_sat = 2; - - /* - Lowest amount that failed to forward in millisats. This may be - set to zero if the failure is independent of amount. - */ - int64 fail_amt_msat = 4; - - reserved 3; - - // Time of last success. - int64 success_time = 5; - - // Highest amount that we could successfully forward rounded to whole sats. - int64 success_amt_sat = 6; - - // Highest amount that we could successfully forward in millisats. - int64 success_amt_msat = 7; -} - -message GetMissionControlConfigRequest { -} - -message GetMissionControlConfigResponse { - /* - Mission control's currently active config. - */ - MissionControlConfig config = 1; -} - -message SetMissionControlConfigRequest { - /* - The config to set for mission control. Note that all values *must* be set, - because the full config will be applied. - */ - MissionControlConfig config = 1; -} - -message SetMissionControlConfigResponse { -} - -message MissionControlConfig { - /* - The amount of time mission control will take to restore a penalized node - or channel back to 50% success probability, expressed in seconds. Setting - this value to a higher value will penalize failures for longer, making - mission control less likely to route through nodes and channels that we - have previously recorded failures for. - */ - uint64 half_life_seconds = 1; - - /* - The probability of success mission control should assign to hop in a route - where it has no other information available. Higher values will make mission - control more willing to try hops that we have no information about, lower - values will discourage trying these hops. - */ - float hop_probability = 2; - - /* - The importance that mission control should place on historical results, - expressed as a value in [0;1]. Setting this value to 1 will ignore all - historical payments and just use the hop probability to assess the - probability of success for each hop. A zero value ignores hop probability - completely and relies entirely on historical results, unless none are - available. - */ - float weight = 3; - - /* - The maximum number of payment results that mission control will store. - */ - uint32 maximum_payment_results = 4; - - /* - The minimum time that must have passed since the previously recorded failure - before we raise the failure amount. - */ - uint64 minimum_failure_relax_interval = 5; -} - -message QueryProbabilityRequest { - // The source node pubkey of the pair. - bytes from_node = 1; - - // The destination node pubkey of the pair. - bytes to_node = 2; - - // The amount for which to calculate a probability. - int64 amt_msat = 3; -} - -message QueryProbabilityResponse { - // The success probability for the requested pair. - double probability = 1; - - // The historical data for the requested pair. - PairData history = 2; -} - -message BuildRouteRequest { - /* - The amount to send expressed in msat. If set to zero, the minimum routable - amount is used. - */ - int64 amt_msat = 1; - - /* - CLTV delta from the current height that should be used for the timelock - of the final hop - */ - int32 final_cltv_delta = 2; - - /* - The channel id of the channel that must be taken to the first hop. If zero, - any channel may be used. - */ - uint64 outgoing_chan_id = 3 [jstype = JS_STRING]; - - /* - A list of hops that defines the route. This does not include the source hop - pubkey. - */ - repeated bytes hop_pubkeys = 4; - - // An optional payment addr to be included within the last hop of the route. - bytes payment_addr = 5; -} - -message BuildRouteResponse { - /* - Fully specified route that can be used to execute the payment. - */ - lnrpc.Route route = 1; -} - -message SubscribeHtlcEventsRequest { -} - -/* -HtlcEvent contains the htlc event that was processed. These are served on a -best-effort basis; events are not persisted, delivery is not guaranteed -(in the event of a crash in the switch, forward events may be lost) and -some events may be replayed upon restart. Events consumed from this package -should be de-duplicated by the htlc's unique combination of incoming and -outgoing channel id and htlc id. [EXPERIMENTAL] -*/ -message HtlcEvent { - /* - The short channel id that the incoming htlc arrived at our node on. This - value is zero for sends. - */ - uint64 incoming_channel_id = 1; - - /* - The short channel id that the outgoing htlc left our node on. This value - is zero for receives. - */ - uint64 outgoing_channel_id = 2; - - /* - Incoming id is the index of the incoming htlc in the incoming channel. - This value is zero for sends. - */ - uint64 incoming_htlc_id = 3; - - /* - Outgoing id is the index of the outgoing htlc in the outgoing channel. - This value is zero for receives. - */ - uint64 outgoing_htlc_id = 4; - - /* - The time in unix nanoseconds that the event occurred. - */ - uint64 timestamp_ns = 5; - - enum EventType { - UNKNOWN = 0; - SEND = 1; - RECEIVE = 2; - FORWARD = 3; - } - - /* - The event type indicates whether the htlc was part of a send, receive or - forward. - */ - EventType event_type = 6; - - oneof event { - ForwardEvent forward_event = 7; - ForwardFailEvent forward_fail_event = 8; - SettleEvent settle_event = 9; - LinkFailEvent link_fail_event = 10; - } -} - -message HtlcInfo { - // The timelock on the incoming htlc. - uint32 incoming_timelock = 1; - - // The timelock on the outgoing htlc. - uint32 outgoing_timelock = 2; - - // The amount of the incoming htlc. - uint64 incoming_amt_msat = 3; - - // The amount of the outgoing htlc. - uint64 outgoing_amt_msat = 4; -} - -message ForwardEvent { - // Info contains details about the htlc that was forwarded. - HtlcInfo info = 1; -} - -message ForwardFailEvent { -} - -message SettleEvent { - // The revealed preimage. - bytes preimage = 1; -} - -message LinkFailEvent { - // Info contains details about the htlc that we failed. - HtlcInfo info = 1; - - // FailureCode is the BOLT error code for the failure. - lnrpc.Failure.FailureCode wire_failure = 2; - - /* - FailureDetail provides additional information about the reason for the - failure. This detail enriches the information provided by the wire message - and may be 'no detail' if the wire message requires no additional metadata. - */ - FailureDetail failure_detail = 3; - - // A string representation of the link failure. - string failure_string = 4; -} - -enum FailureDetail { - UNKNOWN = 0; - NO_DETAIL = 1; - ONION_DECODE = 2; - LINK_NOT_ELIGIBLE = 3; - ON_CHAIN_TIMEOUT = 4; - HTLC_EXCEEDS_MAX = 5; - INSUFFICIENT_BALANCE = 6; - INCOMPLETE_FORWARD = 7; - HTLC_ADD_FAILED = 8; - FORWARDS_DISABLED = 9; - INVOICE_CANCELED = 10; - INVOICE_UNDERPAID = 11; - INVOICE_EXPIRY_TOO_SOON = 12; - INVOICE_NOT_OPEN = 13; - MPP_INVOICE_TIMEOUT = 14; - ADDRESS_MISMATCH = 15; - SET_TOTAL_MISMATCH = 16; - SET_TOTAL_TOO_LOW = 17; - SET_OVERPAID = 18; - UNKNOWN_INVOICE = 19; - INVALID_KEYSEND = 20; - MPP_IN_PROGRESS = 21; - CIRCULAR_ROUTE = 22; -} - -enum PaymentState { - /* - Payment is still in flight. - */ - IN_FLIGHT = 0; - - /* - Payment completed successfully. - */ - SUCCEEDED = 1; - - /* - There are more routes to try, but the payment timeout was exceeded. - */ - FAILED_TIMEOUT = 2; - - /* - All possible routes were tried and failed permanently. Or were no - routes to the destination at all. - */ - FAILED_NO_ROUTE = 3; - - /* - A non-recoverable error has occurred. - */ - FAILED_ERROR = 4; - - /* - Payment details incorrect (unknown hash, invalid amt or - invalid final cltv delta) - */ - FAILED_INCORRECT_PAYMENT_DETAILS = 5; - - /* - Insufficient local balance. - */ - FAILED_INSUFFICIENT_BALANCE = 6; -} - -message PaymentStatus { - // Current state the payment is in. - PaymentState state = 1; - - /* - The pre-image of the payment when state is SUCCEEDED. - */ - bytes preimage = 2; - - reserved 3; - - /* - The HTLCs made in attempt to settle the payment [EXPERIMENTAL]. - */ - repeated lnrpc.HTLCAttempt htlcs = 4; -} - -message CircuitKey { - /// The id of the channel that the is part of this circuit. - uint64 chan_id = 1; - - /// The index of the incoming htlc in the incoming channel. - uint64 htlc_id = 2; -} - -message ForwardHtlcInterceptRequest { - /* - The key of this forwarded htlc. It defines the incoming channel id and - the index in this channel. - */ - CircuitKey incoming_circuit_key = 1; - - // The incoming htlc amount. - uint64 incoming_amount_msat = 5; - - // The incoming htlc expiry. - uint32 incoming_expiry = 6; - - /* - The htlc payment hash. This value is not guaranteed to be unique per - request. - */ - bytes payment_hash = 2; - - // The requested outgoing channel id for this forwarded htlc. Because of - // non-strict forwarding, this isn't necessarily the channel over which the - // packet will be forwarded eventually. A different channel to the same peer - // may be selected as well. - uint64 outgoing_requested_chan_id = 7; - - // The outgoing htlc amount. - uint64 outgoing_amount_msat = 3; - - // The outgoing htlc expiry. - uint32 outgoing_expiry = 4; - - // Any custom records that were present in the payload. - map custom_records = 8; - - // The onion blob for the next hop - bytes onion_blob = 9; -} - -/** -ForwardHtlcInterceptResponse enables the caller to resolve a previously hold -forward. The caller can choose either to: -- `Resume`: Execute the default behavior (usually forward). -- `Reject`: Fail the htlc backwards. -- `Settle`: Settle this htlc with a given preimage. -*/ -message ForwardHtlcInterceptResponse { - /** - The key of this forwarded htlc. It defines the incoming channel id and - the index in this channel. - */ - CircuitKey incoming_circuit_key = 1; - - // The resolve action for this intercepted htlc. - ResolveHoldForwardAction action = 2; - - // The preimage in case the resolve action is Settle. - bytes preimage = 3; - - // Encrypted failure message in case the resolve action is Fail. - // - // If failure_message is specified, the failure_code field must be set - // to zero. - bytes failure_message = 4; - - // Return the specified failure code in case the resolve action is Fail. The - // message data fields are populated automatically. - // - // If a non-zero failure_code is specified, failure_message must not be set. - // - // For backwards-compatibility reasons, TEMPORARY_CHANNEL_FAILURE is the - // default value for this field. - lnrpc.Failure.FailureCode failure_code = 5; -} - -enum ResolveHoldForwardAction { - SETTLE = 0; - FAIL = 1; - RESUME = 2; -} - -message UpdateChanStatusRequest { - lnrpc.ChannelPoint chan_point = 1; - - ChanStatusAction action = 2; -} - -enum ChanStatusAction { - ENABLE = 0; - DISABLE = 1; - AUTO = 2; -} - -message UpdateChanStatusResponse { -} diff --git a/protos/lnd/v0.15.1-beta/signrpc/signer.proto b/protos/lnd/v0.15.1-beta/signrpc/signer.proto deleted file mode 100644 index 5ea85dd..0000000 --- a/protos/lnd/v0.15.1-beta/signrpc/signer.proto +++ /dev/null @@ -1,640 +0,0 @@ -syntax = "proto3"; - -package signrpc; - -option go_package = "github.com/lightningnetwork/lnd/lnrpc/signrpc"; - -// Signer is a service that gives access to the signing functionality of the -// daemon's wallet. -service Signer { - /* - SignOutputRaw is a method that can be used to generated a signature for a - set of inputs/outputs to a transaction. Each request specifies details - concerning how the outputs should be signed, which keys they should be - signed with, and also any optional tweaks. The return value is a fixed - 64-byte signature (the same format as we use on the wire in Lightning). - - If we are unable to sign using the specified keys, then an error will be - returned. - */ - rpc SignOutputRaw (SignReq) returns (SignResp); - - /* - ComputeInputScript generates a complete InputIndex for the passed - transaction with the signature as defined within the passed SignDescriptor. - This method should be capable of generating the proper input script for both - regular p2wkh/p2tr outputs and p2wkh outputs nested within a regular p2sh - output. - - Note that when using this method to sign inputs belonging to the wallet, - the only items of the SignDescriptor that need to be populated are pkScript - in the TxOut field, the value in that same field, and finally the input - index. - */ - rpc ComputeInputScript (SignReq) returns (InputScriptResp); - - /* - SignMessage signs a message with the key specified in the key locator. The - returned signature is fixed-size LN wire format encoded. - - The main difference to SignMessage in the main RPC is that a specific key is - used to sign the message instead of the node identity private key. - */ - rpc SignMessage (SignMessageReq) returns (SignMessageResp); - - /* - VerifyMessage verifies a signature over a message using the public key - provided. The signature must be fixed-size LN wire format encoded. - - The main difference to VerifyMessage in the main RPC is that the public key - used to sign the message does not have to be a node known to the network. - */ - rpc VerifyMessage (VerifyMessageReq) returns (VerifyMessageResp); - - /* - DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key - derivation between the ephemeral public key in the request and the node's - key specified in the key_desc parameter. Either a key locator or a raw - public key is expected in the key_desc, if neither is supplied, defaults to - the node's identity private key: - P_shared = privKeyNode * ephemeralPubkey - The resulting shared public key is serialized in the compressed format and - hashed with sha256, resulting in the final key length of 256bit. - */ - rpc DeriveSharedKey (SharedKeyRequest) returns (SharedKeyResponse); - - /* - MuSig2CombineKeys (experimental!) is a stateless helper RPC that can be used - to calculate the combined MuSig2 public key from a list of all participating - signers' public keys. This RPC is completely stateless and deterministic and - does not create any signing session. It can be used to determine the Taproot - public key that should be put in an on-chain output once all public keys are - known. A signing session is only needed later when that output should be - _spent_ again. - - NOTE: The MuSig2 BIP is not final yet and therefore this API must be - considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming - releases. Backward compatibility is not guaranteed! - */ - rpc MuSig2CombineKeys (MuSig2CombineKeysRequest) - returns (MuSig2CombineKeysResponse); - - /* - MuSig2CreateSession (experimental!) creates a new MuSig2 signing session - using the local key identified by the key locator. The complete list of all - public keys of all signing parties must be provided, including the public - key of the local signing key. If nonces of other parties are already known, - they can be submitted as well to reduce the number of RPC calls necessary - later on. - - NOTE: The MuSig2 BIP is not final yet and therefore this API must be - considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming - releases. Backward compatibility is not guaranteed! - */ - rpc MuSig2CreateSession (MuSig2SessionRequest) - returns (MuSig2SessionResponse); - - /* - MuSig2RegisterNonces (experimental!) registers one or more public nonces of - other signing participants for a session identified by its ID. This RPC can - be called multiple times until all nonces are registered. - - NOTE: The MuSig2 BIP is not final yet and therefore this API must be - considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming - releases. Backward compatibility is not guaranteed! - */ - rpc MuSig2RegisterNonces (MuSig2RegisterNoncesRequest) - returns (MuSig2RegisterNoncesResponse); - - /* - MuSig2Sign (experimental!) creates a partial signature using the local - signing key that was specified when the session was created. This can only - be called when all public nonces of all participants are known and have been - registered with the session. If this node isn't responsible for combining - all the partial signatures, then the cleanup flag should be set, indicating - that the session can be removed from memory once the signature was produced. - - NOTE: The MuSig2 BIP is not final yet and therefore this API must be - considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming - releases. Backward compatibility is not guaranteed! - */ - rpc MuSig2Sign (MuSig2SignRequest) returns (MuSig2SignResponse); - - /* - MuSig2CombineSig (experimental!) combines the given partial signature(s) - with the local one, if it already exists. Once a partial signature of all - participants is registered, the final signature will be combined and - returned. - - NOTE: The MuSig2 BIP is not final yet and therefore this API must be - considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming - releases. Backward compatibility is not guaranteed! - */ - rpc MuSig2CombineSig (MuSig2CombineSigRequest) - returns (MuSig2CombineSigResponse); - - /* - MuSig2Cleanup (experimental!) allows a caller to clean up a session early in - cases where it's obvious that the signing session won't succeed and the - resources can be released. - - NOTE: The MuSig2 BIP is not final yet and therefore this API must be - considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming - releases. Backward compatibility is not guaranteed! - */ - rpc MuSig2Cleanup (MuSig2CleanupRequest) returns (MuSig2CleanupResponse); -} - -message KeyLocator { - // The family of key being identified. - int32 key_family = 1; - - // The precise index of the key being identified. - int32 key_index = 2; -} - -message KeyDescriptor { - /* - The raw bytes of the public key in the key pair being identified. Either - this or the KeyLocator must be specified. - */ - bytes raw_key_bytes = 1; - - /* - The key locator that identifies which private key to use for signing. - Either this or the raw bytes of the target public key must be specified. - */ - KeyLocator key_loc = 2; -} - -message TxOut { - // The value of the output being spent. - int64 value = 1; - - // The script of the output being spent. - bytes pk_script = 2; -} - -enum SignMethod { - /* - Specifies that a SegWit v0 (p2wkh, np2wkh, p2wsh) input script should be - signed. - */ - SIGN_METHOD_WITNESS_V0 = 0; - - /* - Specifies that a SegWit v1 (p2tr) input should be signed by using the - BIP0086 method (commit to internal key only). - */ - SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086 = 1; - - /* - Specifies that a SegWit v1 (p2tr) input should be signed by using a given - taproot hash to commit to in addition to the internal key. - */ - SIGN_METHOD_TAPROOT_KEY_SPEND = 2; - - /* - Specifies that a SegWit v1 (p2tr) input should be spent using the script - path and that a specific leaf script should be signed for. - */ - SIGN_METHOD_TAPROOT_SCRIPT_SPEND = 3; -} - -message SignDescriptor { - /* - A descriptor that precisely describes *which* key to use for signing. This - may provide the raw public key directly, or require the Signer to re-derive - the key according to the populated derivation path. - - Note that if the key descriptor was obtained through walletrpc.DeriveKey, - then the key locator MUST always be provided, since the derived keys are not - persisted unlike with DeriveNextKey. - */ - KeyDescriptor key_desc = 1; - - /* - A scalar value that will be added to the private key corresponding to the - above public key to obtain the private key to be used to sign this input. - This value is typically derived via the following computation: - - * derivedKey = privkey + sha256(perCommitmentPoint || pubKey) mod N - */ - bytes single_tweak = 2; - - /* - A private key that will be used in combination with its corresponding - private key to derive the private key that is to be used to sign the target - input. Within the Lightning protocol, this value is typically the - commitment secret from a previously revoked commitment transaction. This - value is in combination with two hash values, and the original private key - to derive the private key to be used when signing. - - * k = (privKey*sha256(pubKey || tweakPub) + - tweakPriv*sha256(tweakPub || pubKey)) mod N - */ - bytes double_tweak = 3; - - /* - The 32 byte input to the taproot tweak derivation that is used to derive - the output key from an internal key: outputKey = internalKey + - tagged_hash("tapTweak", internalKey || tapTweak). - - When doing a BIP 86 spend, this field can be an empty byte slice. - - When doing a normal key path spend, with the output key committing to an - actual script root, then this field should be: the tapscript root hash. - */ - bytes tap_tweak = 10; - - /* - The full script required to properly redeem the output. This field will - only be populated if a p2tr, p2wsh or a p2sh output is being signed. If a - taproot script path spend is being attempted, then this should be the raw - leaf script. - */ - bytes witness_script = 4; - - /* - A description of the output being spent. The value and script MUST be - provided. - */ - TxOut output = 5; - - /* - The target sighash type that should be used when generating the final - sighash, and signature. - */ - uint32 sighash = 7; - - /* - The target input within the transaction that should be signed. - */ - int32 input_index = 8; - - /* - The sign method specifies how the input should be signed. Depending on the - method, either the tap_tweak, witness_script or both need to be specified. - Defaults to SegWit v0 signing to be backward compatible with older RPC - clients. - */ - SignMethod sign_method = 9; -} - -message SignReq { - // The raw bytes of the transaction to be signed. - bytes raw_tx_bytes = 1; - - // A set of sign descriptors, for each input to be signed. - repeated SignDescriptor sign_descs = 2; - - /* - The full list of UTXO information for each of the inputs being spent. This - is required when spending one or more taproot (SegWit v1) outputs. - */ - repeated TxOut prev_outputs = 3; -} - -message SignResp { - /* - A set of signatures realized in a fixed 64-byte format ordered in ascending - input order. - */ - repeated bytes raw_sigs = 1; -} - -message InputScript { - // The serializes witness stack for the specified input. - repeated bytes witness = 1; - - /* - The optional sig script for the specified witness that will only be set if - the input specified is a nested p2sh witness program. - */ - bytes sig_script = 2; -} - -message InputScriptResp { - // The set of fully valid input scripts requested. - repeated InputScript input_scripts = 1; -} - -message SignMessageReq { - /* - The message to be signed. When using REST, this field must be encoded as - base64. - */ - bytes msg = 1; - - // The key locator that identifies which key to use for signing. - KeyLocator key_loc = 2; - - // Double-SHA256 hash instead of just the default single round. - bool double_hash = 3; - - /* - Use the compact (pubkey recoverable) format instead of the raw lnwire - format. This option cannot be used with Schnorr signatures. - */ - bool compact_sig = 4; - - /* - Use Schnorr signature. This option cannot be used with compact format. - */ - bool schnorr_sig = 5; - - /* - The optional Taproot tweak bytes to apply to the private key before creating - a Schnorr signature. The private key is tweaked as described in BIP-341: - privKey + h_tapTweak(internalKey || tapTweak) - */ - bytes schnorr_sig_tap_tweak = 6; -} -message SignMessageResp { - /* - The signature for the given message in the fixed-size LN wire format. - */ - bytes signature = 1; -} - -message VerifyMessageReq { - // The message over which the signature is to be verified. When using - // REST, this field must be encoded as base64. - bytes msg = 1; - - /* - The fixed-size LN wire encoded signature to be verified over the given - message. When using REST, this field must be encoded as base64. - */ - bytes signature = 2; - - /* - The public key the signature has to be valid for. When using REST, this - field must be encoded as base64. If the is_schnorr_sig option is true, then - the public key is expected to be in the 32-byte x-only serialization - according to BIP-340. - */ - bytes pubkey = 3; - - /* - Specifies if the signature is a Schnorr signature. - */ - bool is_schnorr_sig = 4; -} - -message VerifyMessageResp { - // Whether the signature was valid over the given message. - bool valid = 1; -} - -message SharedKeyRequest { - // The ephemeral public key to use for the DH key derivation. - bytes ephemeral_pubkey = 1; - - /* - Deprecated. The optional key locator of the local key that should be used. - If this parameter is not set then the node's identity private key will be - used. - */ - KeyLocator key_loc = 2 [deprecated = true]; - - /* - A key descriptor describes the key used for performing ECDH. Either a key - locator or a raw public key is expected, if neither is supplied, defaults to - the node's identity private key. - */ - KeyDescriptor key_desc = 3; -} - -message SharedKeyResponse { - // The shared public key, hashed with sha256. - bytes shared_key = 1; -} - -message TweakDesc { - /* - Tweak is the 32-byte value that will modify the public key. - */ - bytes tweak = 1; - - /* - Specifies if the target key should be converted to an x-only public key - before tweaking. If true, then the public key will be mapped to an x-only - key before the tweaking operation is applied. - */ - bool is_x_only = 2; -} - -message TaprootTweakDesc { - /* - The root hash of the tapscript tree if a script path is committed to. If - the MuSig2 key put on chain doesn't also commit to a script path (BIP-0086 - key spend only), then this needs to be empty and the key_spend_only field - below must be set to true. This is required because gRPC cannot - differentiate between a zero-size byte slice and a nil byte slice (both - would be serialized the same way). So the extra boolean is required. - */ - bytes script_root = 1; - - /* - Indicates that the above script_root is expected to be empty because this - is a BIP-0086 key spend only commitment where only the internal key is - committed to instead of also including a script root hash. - */ - bool key_spend_only = 2; -} - -message MuSig2CombineKeysRequest { - /* - A list of all public keys (serialized in 32-byte x-only format!) - participating in the signing session. The list will always be sorted - lexicographically internally. This must include the local key which is - described by the above key_loc. - */ - repeated bytes all_signer_pubkeys = 1; - - /* - A series of optional generic tweaks to be applied to the the aggregated - public key. - */ - repeated TweakDesc tweaks = 2; - - /* - An optional taproot specific tweak that must be specified if the MuSig2 - combined key will be used as the main taproot key of a taproot output - on-chain. - */ - TaprootTweakDesc taproot_tweak = 3; -} - -message MuSig2CombineKeysResponse { - /* - The combined public key (in the 32-byte x-only format) with all tweaks - applied to it. If a taproot tweak is specified, this corresponds to the - taproot key that can be put into the on-chain output. - */ - bytes combined_key = 1; - - /* - The raw combined public key (in the 32-byte x-only format) before any tweaks - are applied to it. If a taproot tweak is specified, this corresponds to the - internal key that needs to be put into the witness if the script spend path - is used. - */ - bytes taproot_internal_key = 2; -} - -message MuSig2SessionRequest { - /* - The key locator that identifies which key to use for signing. - */ - KeyLocator key_loc = 1; - - /* - A list of all public keys (serialized in 32-byte x-only format!) - participating in the signing session. The list will always be sorted - lexicographically internally. This must include the local key which is - described by the above key_loc. - */ - repeated bytes all_signer_pubkeys = 2; - - /* - An optional list of all public nonces of other signing participants that - might already be known. - */ - repeated bytes other_signer_public_nonces = 3; - - /* - A series of optional generic tweaks to be applied to the the aggregated - public key. - */ - repeated TweakDesc tweaks = 4; - - /* - An optional taproot specific tweak that must be specified if the MuSig2 - combined key will be used as the main taproot key of a taproot output - on-chain. - */ - TaprootTweakDesc taproot_tweak = 5; -} - -message MuSig2SessionResponse { - /* - The unique ID that represents this signing session. A session can be used - for producing a signature a single time. If the signing fails for any - reason, a new session with the same participants needs to be created. - */ - bytes session_id = 1; - - /* - The combined public key (in the 32-byte x-only format) with all tweaks - applied to it. If a taproot tweak is specified, this corresponds to the - taproot key that can be put into the on-chain output. - */ - bytes combined_key = 2; - - /* - The raw combined public key (in the 32-byte x-only format) before any tweaks - are applied to it. If a taproot tweak is specified, this corresponds to the - internal key that needs to be put into the witness if the script spend path - is used. - */ - bytes taproot_internal_key = 3; - - /* - The two public nonces the local signer uses, combined into a single value - of 66 bytes. Can be split into the two 33-byte points to get the individual - nonces. - */ - bytes local_public_nonces = 4; - - /* - Indicates whether all nonces required to start the signing process are known - now. - */ - bool have_all_nonces = 5; -} - -message MuSig2RegisterNoncesRequest { - /* - The unique ID of the signing session those nonces should be registered with. - */ - bytes session_id = 1; - - /* - A list of all public nonces of other signing participants that should be - registered. - */ - repeated bytes other_signer_public_nonces = 3; -} - -message MuSig2RegisterNoncesResponse { - /* - Indicates whether all nonces required to start the signing process are known - now. - */ - bool have_all_nonces = 1; -} - -message MuSig2SignRequest { - /* - The unique ID of the signing session to use for signing. - */ - bytes session_id = 1; - - /* - The 32-byte SHA256 digest of the message to sign. - */ - bytes message_digest = 2; - - /* - Cleanup indicates that after signing, the session state can be cleaned up, - since another participant is going to be responsible for combining the - partial signatures. - */ - bool cleanup = 3; -} - -message MuSig2SignResponse { - /* - The partial signature created by the local signer. - */ - bytes local_partial_signature = 1; -} - -message MuSig2CombineSigRequest { - /* - The unique ID of the signing session to combine the signatures for. - */ - bytes session_id = 1; - - /* - The list of all other participants' partial signatures to add to the current - session. - */ - repeated bytes other_partial_signatures = 2; -} - -message MuSig2CombineSigResponse { - /* - Indicates whether all partial signatures required to create a final, full - signature are known yet. If this is true, then the final_signature field is - set, otherwise it is empty. - */ - bool have_all_signatures = 1; - - /* - The final, full signature that is valid for the combined public key. - */ - bytes final_signature = 2; -} - -message MuSig2CleanupRequest { - /* - The unique ID of the signing session that should be removed/cleaned up. - */ - bytes session_id = 1; -} - -message MuSig2CleanupResponse { -} \ No newline at end of file diff --git a/protos/lnd/v0.15.1-beta/walletrpc/walletkit.proto b/protos/lnd/v0.15.1-beta/walletrpc/walletkit.proto deleted file mode 100644 index 2e5f453..0000000 --- a/protos/lnd/v0.15.1-beta/walletrpc/walletkit.proto +++ /dev/null @@ -1,918 +0,0 @@ -syntax = "proto3"; - -import "lightning.proto"; -import "signrpc/signer.proto"; - -package walletrpc; - -option go_package = "github.com/lightningnetwork/lnd/lnrpc/walletrpc"; - -// WalletKit is a service that gives access to the core functionalities of the -// daemon's wallet. -service WalletKit { - /* - ListUnspent returns a list of all utxos spendable by the wallet with a - number of confirmations between the specified minimum and maximum. By - default, all utxos are listed. To list only the unconfirmed utxos, set - the unconfirmed_only to true. - */ - rpc ListUnspent (ListUnspentRequest) returns (ListUnspentResponse); - - /* - LeaseOutput locks an output to the given ID, preventing it from being - available for any future coin selection attempts. The absolute time of the - lock's expiration is returned. The expiration of the lock can be extended by - successive invocations of this RPC. Outputs can be unlocked before their - expiration through `ReleaseOutput`. - */ - rpc LeaseOutput (LeaseOutputRequest) returns (LeaseOutputResponse); - - /* - ReleaseOutput unlocks an output, allowing it to be available for coin - selection if it remains unspent. The ID should match the one used to - originally lock the output. - */ - rpc ReleaseOutput (ReleaseOutputRequest) returns (ReleaseOutputResponse); - - /* - ListLeases lists all currently locked utxos. - */ - rpc ListLeases (ListLeasesRequest) returns (ListLeasesResponse); - - /* - DeriveNextKey attempts to derive the *next* key within the key family - (account in BIP43) specified. This method should return the next external - child within this branch. - */ - rpc DeriveNextKey (KeyReq) returns (signrpc.KeyDescriptor); - - /* - DeriveKey attempts to derive an arbitrary key specified by the passed - KeyLocator. - */ - rpc DeriveKey (signrpc.KeyLocator) returns (signrpc.KeyDescriptor); - - /* - NextAddr returns the next unused address within the wallet. - */ - rpc NextAddr (AddrRequest) returns (AddrResponse); - - /* - ListAccounts retrieves all accounts belonging to the wallet by default. A - name and key scope filter can be provided to filter through all of the - wallet accounts and return only those matching. - */ - rpc ListAccounts (ListAccountsRequest) returns (ListAccountsResponse); - - /* - RequiredReserve returns the minimum amount of satoshis that should be kept - in the wallet in order to fee bump anchor channels if necessary. The value - scales with the number of public anchor channels but is capped at a maximum. - */ - rpc RequiredReserve (RequiredReserveRequest) - returns (RequiredReserveResponse); - - /* - ImportAccount imports an account backed by an account extended public key. - The master key fingerprint denotes the fingerprint of the root key - corresponding to the account public key (also known as the key with - derivation path m/). This may be required by some hardware wallets for - proper identification and signing. - - The address type can usually be inferred from the key's version, but may be - required for certain keys to map them into the proper scope. - - For BIP-0044 keys, an address type must be specified as we intend to not - support importing BIP-0044 keys into the wallet using the legacy - pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force - the standard BIP-0049 derivation scheme, while a witness address type will - force the standard BIP-0084 derivation scheme. - - For BIP-0049 keys, an address type must also be specified to make a - distinction between the standard BIP-0049 address schema (nested witness - pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys - externally, witness pubkeys internally). - - NOTE: Events (deposits/spends) for keys derived from an account will only be - detected by lnd if they happen after the import. Rescans to detect past - events will be supported later on. - */ - rpc ImportAccount (ImportAccountRequest) returns (ImportAccountResponse); - - /* - ImportPublicKey imports a public key as watch-only into the wallet. - - NOTE: Events (deposits/spends) for a key will only be detected by lnd if - they happen after the import. Rescans to detect past events will be - supported later on. - */ - rpc ImportPublicKey (ImportPublicKeyRequest) - returns (ImportPublicKeyResponse); - - /* - PublishTransaction attempts to publish the passed transaction to the - network. Once this returns without an error, the wallet will continually - attempt to re-broadcast the transaction on start up, until it enters the - chain. - */ - rpc PublishTransaction (Transaction) returns (PublishResponse); - - /* - SendOutputs is similar to the existing sendmany call in Bitcoind, and - allows the caller to create a transaction that sends to several outputs at - once. This is ideal when wanting to batch create a set of transactions. - */ - rpc SendOutputs (SendOutputsRequest) returns (SendOutputsResponse); - - /* - EstimateFee attempts to query the internal fee estimator of the wallet to - determine the fee (in sat/kw) to attach to a transaction in order to - achieve the confirmation target. - */ - rpc EstimateFee (EstimateFeeRequest) returns (EstimateFeeResponse); - - /* - PendingSweeps returns lists of on-chain outputs that lnd is currently - attempting to sweep within its central batching engine. Outputs with similar - fee rates are batched together in order to sweep them within a single - transaction. - - NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to - remain supported. This is an advanced API that depends on the internals of - the UtxoSweeper, so things may change. - */ - rpc PendingSweeps (PendingSweepsRequest) returns (PendingSweepsResponse); - - /* - BumpFee bumps the fee of an arbitrary input within a transaction. This RPC - takes a different approach than bitcoind's bumpfee command. lnd has a - central batching engine in which inputs with similar fee rates are batched - together to save on transaction fees. Due to this, we cannot rely on - bumping the fee on a specific transaction, since transactions can change at - any point with the addition of new inputs. The list of inputs that - currently exist within lnd's central batching engine can be retrieved - through the PendingSweeps RPC. - - When bumping the fee of an input that currently exists within lnd's central - batching engine, a higher fee transaction will be created that replaces the - lower fee transaction through the Replace-By-Fee (RBF) policy. If it - - This RPC also serves useful when wanting to perform a Child-Pays-For-Parent - (CPFP), where the child transaction pays for its parent's fee. This can be - done by specifying an outpoint within the low fee transaction that is under - the control of the wallet. - - The fee preference can be expressed either as a specific fee rate or a delta - of blocks in which the output should be swept on-chain within. If a fee - preference is not explicitly specified, then an error is returned. - - Note that this RPC currently doesn't perform any validation checks on the - fee preference being provided. For now, the responsibility of ensuring that - the new fee preference is sufficient is delegated to the user. - */ - rpc BumpFee (BumpFeeRequest) returns (BumpFeeResponse); - - /* - ListSweeps returns a list of the sweep transactions our node has produced. - Note that these sweeps may not be confirmed yet, as we record sweeps on - broadcast, not confirmation. - */ - rpc ListSweeps (ListSweepsRequest) returns (ListSweepsResponse); - - /* - LabelTransaction adds a label to a transaction. If the transaction already - has a label the call will fail unless the overwrite bool is set. This will - overwrite the exiting transaction label. Labels must not be empty, and - cannot exceed 500 characters. - */ - rpc LabelTransaction (LabelTransactionRequest) - returns (LabelTransactionResponse); - - /* - FundPsbt creates a fully populated PSBT that contains enough inputs to fund - the outputs specified in the template. There are two ways of specifying a - template: Either by passing in a PSBT with at least one output declared or - by passing in a raw TxTemplate message. - - If there are no inputs specified in the template, coin selection is - performed automatically. If the template does contain any inputs, it is - assumed that full coin selection happened externally and no additional - inputs are added. If the specified inputs aren't enough to fund the outputs - with the given fee rate, an error is returned. - - After either selecting or verifying the inputs, all input UTXOs are locked - with an internal app ID. - - NOTE: If this method returns without an error, it is the caller's - responsibility to either spend the locked UTXOs (by finalizing and then - publishing the transaction) or to unlock/release the locked UTXOs in case of - an error on the caller's side. - */ - rpc FundPsbt (FundPsbtRequest) returns (FundPsbtResponse); - - /* - SignPsbt expects a partial transaction with all inputs and outputs fully - declared and tries to sign all unsigned inputs that have all required fields - (UTXO information, BIP32 derivation information, witness or sig scripts) - set. - If no error is returned, the PSBT is ready to be given to the next signer or - to be finalized if lnd was the last signer. - - NOTE: This RPC only signs inputs (and only those it can sign), it does not - perform any other tasks (such as coin selection, UTXO locking or - input/output/fee value validation, PSBT finalization). Any input that is - incomplete will be skipped. - */ - rpc SignPsbt (SignPsbtRequest) returns (SignPsbtResponse); - - /* - FinalizePsbt expects a partial transaction with all inputs and outputs fully - declared and tries to sign all inputs that belong to the wallet. Lnd must be - the last signer of the transaction. That means, if there are any unsigned - non-witness inputs or inputs without UTXO information attached or inputs - without witness data that do not belong to lnd's wallet, this method will - fail. If no error is returned, the PSBT is ready to be extracted and the - final TX within to be broadcast. - - NOTE: This method does NOT publish the transaction once finalized. It is the - caller's responsibility to either publish the transaction on success or - unlock/release any locked UTXOs in case of an error in this method. - */ - rpc FinalizePsbt (FinalizePsbtRequest) returns (FinalizePsbtResponse); -} - -message ListUnspentRequest { - // The minimum number of confirmations to be included. - int32 min_confs = 1; - - // The maximum number of confirmations to be included. - int32 max_confs = 2; - - // An optional filter to only include outputs belonging to an account. - string account = 3; - - /* - When min_confs and max_confs are zero, setting false implicitly - overrides max_confs to be MaxInt32, otherwise max_confs remains - zero. An error is returned if the value is true and both min_confs - and max_confs are non-zero. (default: false) - */ - bool unconfirmed_only = 4; -} - -message ListUnspentResponse { - // A list of utxos satisfying the specified number of confirmations. - repeated lnrpc.Utxo utxos = 1; -} - -message LeaseOutputRequest { - /* - An ID of 32 random bytes that must be unique for each distinct application - using this RPC which will be used to bound the output lease to. - */ - bytes id = 1; - - // The identifying outpoint of the output being leased. - lnrpc.OutPoint outpoint = 2; - - // The time in seconds before the lock expires. If set to zero, the default - // lock duration is used. - uint64 expiration_seconds = 3; -} - -message LeaseOutputResponse { - /* - The absolute expiration of the output lease represented as a unix timestamp. - */ - uint64 expiration = 1; -} - -message ReleaseOutputRequest { - // The unique ID that was used to lock the output. - bytes id = 1; - - // The identifying outpoint of the output being released. - lnrpc.OutPoint outpoint = 2; -} - -message ReleaseOutputResponse { -} - -message KeyReq { - /* - Is the key finger print of the root pubkey that this request is targeting. - This allows the WalletKit to possibly serve out keys for multiple HD chains - via public derivation. - */ - int32 key_finger_print = 1; - - /* - The target key family to derive a key from. In other contexts, this is - known as the "account". - */ - int32 key_family = 2; -} - -message AddrRequest { - /* - The name of the account to retrieve the next address of. If empty, the - default wallet account is used. - */ - string account = 1; - - /* - The type of address to derive. - */ - AddressType type = 2; - - /* - Whether a change address should be derived. - */ - bool change = 3; -} -message AddrResponse { - /* - The address encoded using a bech32 format. - */ - string addr = 1; -} - -enum AddressType { - UNKNOWN = 0; - WITNESS_PUBKEY_HASH = 1; - NESTED_WITNESS_PUBKEY_HASH = 2; - HYBRID_NESTED_WITNESS_PUBKEY_HASH = 3; - TAPROOT_PUBKEY = 4; -} -message Account { - // The name used to identify the account. - string name = 1; - - /* - The type of addresses the account supports. - AddressType | External Branch | Internal Branch - --------------------------------------------------------------------- - WITNESS_PUBKEY_HASH | P2WPKH | P2WPKH - NESTED_WITNESS_PUBKEY_HASH | NP2WPKH | NP2WPKH - HYBRID_NESTED_WITNESS_PUBKEY_HASH | NP2WPKH | P2WPKH - */ - AddressType address_type = 2; - - /* - The public key backing the account that all keys are derived from - represented as an extended key. This will always be empty for the default - imported account in which single public keys are imported into. - */ - string extended_public_key = 3; - - /* - The fingerprint of the root key from which the account public key was - derived from. This will always be zero for the default imported account in - which single public keys are imported into. The bytes are in big-endian - order. - */ - bytes master_key_fingerprint = 4; - - /* - The derivation path corresponding to the account public key. This will - always be empty for the default imported account in which single public keys - are imported into. - */ - string derivation_path = 5; - - /* - The number of keys derived from the external branch of the account public - key. This will always be zero for the default imported account in which - single public keys are imported into. - */ - uint32 external_key_count = 6; - - /* - The number of keys derived from the internal branch of the account public - key. This will always be zero for the default imported account in which - single public keys are imported into. - */ - uint32 internal_key_count = 7; - - // Whether the wallet stores private keys for the account. - bool watch_only = 8; -} -message ListAccountsRequest { - // An optional filter to only return accounts matching this name. - string name = 1; - - // An optional filter to only return accounts matching this address type. - AddressType address_type = 2; -} -message ListAccountsResponse { - repeated Account accounts = 1; -} - -message RequiredReserveRequest { - // The number of additional channels the user would like to open. - uint32 additional_public_channels = 1; -} - -message RequiredReserveResponse { - // The amount of reserve required. - int64 required_reserve = 1; -} - -message ImportAccountRequest { - // A name to identify the account with. - string name = 1; - - /* - A public key that corresponds to a wallet account represented as an extended - key. It must conform to a derivation path of the form - m/purpose'/coin_type'/account'. - */ - string extended_public_key = 2; - - /* - The fingerprint of the root key (also known as the key with derivation path - m/) from which the account public key was derived from. This may be required - by some hardware wallets for proper identification and signing. The bytes - must be in big-endian order. - */ - bytes master_key_fingerprint = 3; - - /* - An address type is only required when the extended account public key has a - legacy version (xpub, tpub, etc.), such that the wallet cannot detect what - address scheme it belongs to. - */ - AddressType address_type = 4; - - /* - Whether a dry run should be attempted when importing the account. This - serves as a way to confirm whether the account is being imported correctly - by returning the first N addresses for the external and internal branches of - the account. If these addresses match as expected, then it should be safe to - import the account as is. - */ - bool dry_run = 5; -} -message ImportAccountResponse { - // The details of the imported account. - Account account = 1; - - /* - The first N addresses that belong to the external branch of the account. - The external branch is typically used for external non-change addresses. - These are only returned if a dry run was specified within the request. - */ - repeated string dry_run_external_addrs = 2; - - /* - The first N addresses that belong to the internal branch of the account. - The internal branch is typically used for change addresses. These are only - returned if a dry run was specified within the request. - */ - repeated string dry_run_internal_addrs = 3; -} - -message ImportPublicKeyRequest { - // A compressed public key represented as raw bytes. - bytes public_key = 1; - - // The type of address that will be generated from the public key. - AddressType address_type = 2; -} -message ImportPublicKeyResponse { -} - -message Transaction { - /* - The raw serialized transaction. - */ - bytes tx_hex = 1; - - /* - An optional label to save with the transaction. Limited to 500 characters. - */ - string label = 2; -} -message PublishResponse { - /* - If blank, then no error occurred and the transaction was successfully - published. If not the empty string, then a string representation of the - broadcast error. - - TODO(roasbeef): map to a proper enum type - */ - string publish_error = 1; -} - -message SendOutputsRequest { - /* - The number of satoshis per kilo weight that should be used when crafting - this transaction. - */ - int64 sat_per_kw = 1; - - /* - A slice of the outputs that should be created in the transaction produced. - */ - repeated signrpc.TxOut outputs = 2; - - // An optional label for the transaction, limited to 500 characters. - string label = 3; - - // The minimum number of confirmations each one of your outputs used for - // the transaction must satisfy. - int32 min_confs = 4; - - // Whether unconfirmed outputs should be used as inputs for the transaction. - bool spend_unconfirmed = 5; -} -message SendOutputsResponse { - /* - The serialized transaction sent out on the network. - */ - bytes raw_tx = 1; -} - -message EstimateFeeRequest { - /* - The number of confirmations to shoot for when estimating the fee. - */ - int32 conf_target = 1; -} -message EstimateFeeResponse { - /* - The amount of satoshis per kw that should be used in order to reach the - confirmation target in the request. - */ - int64 sat_per_kw = 1; -} - -enum WitnessType { - UNKNOWN_WITNESS = 0; - - /* - A witness that allows us to spend the output of a commitment transaction - after a relative lock-time lockout. - */ - COMMITMENT_TIME_LOCK = 1; - - /* - A witness that allows us to spend a settled no-delay output immediately on a - counterparty's commitment transaction. - */ - COMMITMENT_NO_DELAY = 2; - - /* - A witness that allows us to sweep the settled output of a malicious - counterparty's who broadcasts a revoked commitment transaction. - */ - COMMITMENT_REVOKE = 3; - - /* - A witness that allows us to sweep an HTLC which we offered to the remote - party in the case that they broadcast a revoked commitment state. - */ - HTLC_OFFERED_REVOKE = 4; - - /* - A witness that allows us to sweep an HTLC output sent to us in the case that - the remote party broadcasts a revoked commitment state. - */ - HTLC_ACCEPTED_REVOKE = 5; - - /* - A witness that allows us to sweep an HTLC output that we extended to a - party, but was never fulfilled. This HTLC output isn't directly on the - commitment transaction, but is the result of a confirmed second-level HTLC - transaction. As a result, we can only spend this after a CSV delay. - */ - HTLC_OFFERED_TIMEOUT_SECOND_LEVEL = 6; - - /* - A witness that allows us to sweep an HTLC output that was offered to us, and - for which we have a payment preimage. This HTLC output isn't directly on our - commitment transaction, but is the result of confirmed second-level HTLC - transaction. As a result, we can only spend this after a CSV delay. - */ - HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL = 7; - - /* - A witness that allows us to sweep an HTLC that we offered to the remote - party which lies in the commitment transaction of the remote party. We can - spend this output after the absolute CLTV timeout of the HTLC as passed. - */ - HTLC_OFFERED_REMOTE_TIMEOUT = 8; - - /* - A witness that allows us to sweep an HTLC that was offered to us by the - remote party. We use this witness in the case that the remote party goes to - chain, and we know the pre-image to the HTLC. We can sweep this without any - additional timeout. - */ - HTLC_ACCEPTED_REMOTE_SUCCESS = 9; - - /* - A witness that allows us to sweep an HTLC from the remote party's commitment - transaction in the case that the broadcast a revoked commitment, but then - also immediately attempt to go to the second level to claim the HTLC. - */ - HTLC_SECOND_LEVEL_REVOKE = 10; - - /* - A witness type that allows us to spend a regular p2wkh output that's sent to - an output which is under complete control of the backing wallet. - */ - WITNESS_KEY_HASH = 11; - - /* - A witness type that allows us to sweep an output that sends to a nested P2SH - script that pays to a key solely under our control. - */ - NESTED_WITNESS_KEY_HASH = 12; - - /* - A witness type that allows us to spend our anchor on the commitment - transaction. - */ - COMMITMENT_ANCHOR = 13; -} - -message PendingSweep { - // The outpoint of the output we're attempting to sweep. - lnrpc.OutPoint outpoint = 1; - - // The witness type of the output we're attempting to sweep. - WitnessType witness_type = 2; - - // The value of the output we're attempting to sweep. - uint32 amount_sat = 3; - - /* - Deprecated, use sat_per_vbyte. - The fee rate we'll use to sweep the output, expressed in sat/vbyte. The fee - rate is only determined once a sweeping transaction for the output is - created, so it's possible for this to be 0 before this. - */ - uint32 sat_per_byte = 4 [deprecated = true]; - - // The number of broadcast attempts we've made to sweep the output. - uint32 broadcast_attempts = 5; - - /* - The next height of the chain at which we'll attempt to broadcast the - sweep transaction of the output. - */ - uint32 next_broadcast_height = 6; - - // The requested confirmation target for this output. - uint32 requested_conf_target = 8; - - // Deprecated, use requested_sat_per_vbyte. - // The requested fee rate, expressed in sat/vbyte, for this output. - uint32 requested_sat_per_byte = 9 [deprecated = true]; - - /* - The fee rate we'll use to sweep the output, expressed in sat/vbyte. The fee - rate is only determined once a sweeping transaction for the output is - created, so it's possible for this to be 0 before this. - */ - uint64 sat_per_vbyte = 10; - - // The requested fee rate, expressed in sat/vbyte, for this output. - uint64 requested_sat_per_vbyte = 11; - - /* - Whether this input must be force-swept. This means that it is swept even - if it has a negative yield. - */ - bool force = 7; -} - -message PendingSweepsRequest { -} - -message PendingSweepsResponse { - /* - The set of outputs currently being swept by lnd's central batching engine. - */ - repeated PendingSweep pending_sweeps = 1; -} - -message BumpFeeRequest { - // The input we're attempting to bump the fee of. - lnrpc.OutPoint outpoint = 1; - - // The target number of blocks that the input should be spent within. - uint32 target_conf = 2; - - /* - Deprecated, use sat_per_vbyte. - The fee rate, expressed in sat/vbyte, that should be used to spend the input - with. - */ - uint32 sat_per_byte = 3 [deprecated = true]; - - /* - Whether this input must be force-swept. This means that it is swept even - if it has a negative yield. - */ - bool force = 4; - - /* - The fee rate, expressed in sat/vbyte, that should be used to spend the input - with. - */ - uint64 sat_per_vbyte = 5; -} - -message BumpFeeResponse { -} - -message ListSweepsRequest { - /* - Retrieve the full sweep transaction details. If false, only the sweep txids - will be returned. Note that some sweeps that LND publishes will have been - replaced-by-fee, so will not be included in this output. - */ - bool verbose = 1; -} - -message ListSweepsResponse { - message TransactionIDs { - /* - Reversed, hex-encoded string representing the transaction ids of the - sweeps that our node has broadcast. Note that these transactions may - not have confirmed yet, we record sweeps on broadcast, not confirmation. - */ - repeated string transaction_ids = 1; - } - - oneof sweeps { - lnrpc.TransactionDetails transaction_details = 1; - TransactionIDs transaction_ids = 2; - } -} - -message LabelTransactionRequest { - // The txid of the transaction to label. - bytes txid = 1; - - // The label to add to the transaction, limited to 500 characters. - string label = 2; - - // Whether to overwrite the existing label, if it is present. - bool overwrite = 3; -} - -message LabelTransactionResponse { -} - -message FundPsbtRequest { - oneof template { - /* - Use an existing PSBT packet as the template for the funded PSBT. - - The packet must contain at least one non-dust output. If one or more - inputs are specified, no coin selection is performed. In that case every - input must be an UTXO known to the wallet that has not been locked - before. The sum of all inputs must be sufficiently greater than the sum - of all outputs to pay a miner fee with the specified fee rate. A change - output is added to the PSBT if necessary. - */ - bytes psbt = 1; - - /* - Use the outputs and optional inputs from this raw template. - */ - TxTemplate raw = 2; - } - - oneof fees { - /* - The target number of blocks that the transaction should be confirmed in. - */ - uint32 target_conf = 3; - - /* - The fee rate, expressed in sat/vbyte, that should be used to spend the - input with. - */ - uint64 sat_per_vbyte = 4; - } - - /* - The name of the account to fund the PSBT with. If empty, the default wallet - account is used. - */ - string account = 5; - - // The minimum number of confirmations each one of your outputs used for - // the transaction must satisfy. - int32 min_confs = 6; - - // Whether unconfirmed outputs should be used as inputs for the transaction. - bool spend_unconfirmed = 7; -} -message FundPsbtResponse { - /* - The funded but not yet signed PSBT packet. - */ - bytes funded_psbt = 1; - - /* - The index of the added change output or -1 if no change was left over. - */ - int32 change_output_index = 2; - - /* - The list of lock leases that were acquired for the inputs in the funded PSBT - packet. - */ - repeated UtxoLease locked_utxos = 3; -} - -message TxTemplate { - /* - An optional list of inputs to use. Every input must be an UTXO known to the - wallet that has not been locked before. The sum of all inputs must be - sufficiently greater than the sum of all outputs to pay a miner fee with the - fee rate specified in the parent message. - - If no inputs are specified, coin selection will be performed instead and - inputs of sufficient value will be added to the resulting PSBT. - */ - repeated lnrpc.OutPoint inputs = 1; - - /* - A map of all addresses and the amounts to send to in the funded PSBT. - */ - map outputs = 2; -} - -message UtxoLease { - /* - A 32 byte random ID that identifies the lease. - */ - bytes id = 1; - - // The identifying outpoint of the output being leased. - lnrpc.OutPoint outpoint = 2; - - /* - The absolute expiration of the output lease represented as a unix timestamp. - */ - uint64 expiration = 3; - - /* - The public key script of the leased output. - */ - bytes pk_script = 4; - - /* - The value of the leased output in satoshis. - */ - uint64 value = 5; -} - -message SignPsbtRequest { - /* - The PSBT that should be signed. The PSBT must contain all required inputs, - outputs, UTXO data and custom fields required to identify the signing key. - */ - bytes funded_psbt = 1; -} - -message SignPsbtResponse { - // The signed transaction in PSBT format. - bytes signed_psbt = 1; -} - -message FinalizePsbtRequest { - /* - A PSBT that should be signed and finalized. The PSBT must contain all - required inputs, outputs, UTXO data and partial signatures of all other - signers. - */ - bytes funded_psbt = 1; - - /* - The name of the account to finalize the PSBT with. If empty, the default - wallet account is used. - */ - string account = 5; -} -message FinalizePsbtResponse { - // The fully signed and finalized transaction in PSBT format. - bytes signed_psbt = 1; - - // The fully signed and finalized transaction in the raw wire format. - bytes raw_final_tx = 2; -} - -message ListLeasesRequest { -} - -message ListLeasesResponse { - // The list of currently leased utxos. - repeated UtxoLease locked_utxos = 1; -} diff --git a/protos/lnd/v0.15.1-beta/walletunlocker.proto b/protos/lnd/v0.15.1-beta/walletunlocker.proto deleted file mode 100644 index 55bc31c..0000000 --- a/protos/lnd/v0.15.1-beta/walletunlocker.proto +++ /dev/null @@ -1,331 +0,0 @@ -syntax = "proto3"; - -import "lightning.proto"; - -package lnrpc; - -option go_package = "github.com/lightningnetwork/lnd/lnrpc"; - -/* - * Comments in this file will be directly parsed into the API - * Documentation as descriptions of the associated method, message, or field. - * These descriptions should go right above the definition of the object, and - * can be in either block or // comment format. - * - * An RPC method can be matched to an lncli command by placing a line in the - * beginning of the description in exactly the following format: - * lncli: `methodname` - * - * Failure to specify the exact name of the command will cause documentation - * generation to fail. - * - * More information on how exactly the gRPC documentation is generated from - * this proto file can be found here: - * https://github.com/lightninglabs/lightning-api - */ - -// WalletUnlocker is a service that is used to set up a wallet password for -// lnd at first startup, and unlock a previously set up wallet. -service WalletUnlocker { - /* - GenSeed is the first method that should be used to instantiate a new lnd - instance. This method allows a caller to generate a new aezeed cipher seed - given an optional passphrase. If provided, the passphrase will be necessary - to decrypt the cipherseed to expose the internal wallet seed. - - Once the cipherseed is obtained and verified by the user, the InitWallet - method should be used to commit the newly generated seed, and create the - wallet. - */ - rpc GenSeed (GenSeedRequest) returns (GenSeedResponse); - - /* - InitWallet is used when lnd is starting up for the first time to fully - initialize the daemon and its internal wallet. At the very least a wallet - password must be provided. This will be used to encrypt sensitive material - on disk. - - In the case of a recovery scenario, the user can also specify their aezeed - mnemonic and passphrase. If set, then the daemon will use this prior state - to initialize its internal wallet. - - Alternatively, this can be used along with the GenSeed RPC to obtain a - seed, then present it to the user. Once it has been verified by the user, - the seed can be fed into this RPC in order to commit the new wallet. - */ - rpc InitWallet (InitWalletRequest) returns (InitWalletResponse); - - /* lncli: `unlock` - UnlockWallet is used at startup of lnd to provide a password to unlock - the wallet database. - */ - rpc UnlockWallet (UnlockWalletRequest) returns (UnlockWalletResponse); - - /* lncli: `changepassword` - ChangePassword changes the password of the encrypted wallet. This will - automatically unlock the wallet database if successful. - */ - rpc ChangePassword (ChangePasswordRequest) returns (ChangePasswordResponse); -} - -message GenSeedRequest { - /* - aezeed_passphrase is an optional user provided passphrase that will be used - to encrypt the generated aezeed cipher seed. When using REST, this field - must be encoded as base64. - */ - bytes aezeed_passphrase = 1; - - /* - seed_entropy is an optional 16-bytes generated via CSPRNG. If not - specified, then a fresh set of randomness will be used to create the seed. - When using REST, this field must be encoded as base64. - */ - bytes seed_entropy = 2; -} -message GenSeedResponse { - /* - cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed - cipher seed obtained by the user. This field is optional, as if not - provided, then the daemon will generate a new cipher seed for the user. - Otherwise, then the daemon will attempt to recover the wallet state linked - to this cipher seed. - */ - repeated string cipher_seed_mnemonic = 1; - - /* - enciphered_seed are the raw aezeed cipher seed bytes. This is the raw - cipher text before run through our mnemonic encoding scheme. - */ - bytes enciphered_seed = 2; -} - -message InitWalletRequest { - /* - wallet_password is the passphrase that should be used to encrypt the - wallet. This MUST be at least 8 chars in length. After creation, this - password is required to unlock the daemon. When using REST, this field - must be encoded as base64. - */ - bytes wallet_password = 1; - - /* - cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed - cipher seed obtained by the user. This may have been generated by the - GenSeed method, or be an existing seed. - */ - repeated string cipher_seed_mnemonic = 2; - - /* - aezeed_passphrase is an optional user provided passphrase that will be used - to encrypt the generated aezeed cipher seed. When using REST, this field - must be encoded as base64. - */ - bytes aezeed_passphrase = 3; - - /* - recovery_window is an optional argument specifying the address lookahead - when restoring a wallet seed. The recovery window applies to each - individual branch of the BIP44 derivation paths. Supplying a recovery - window of zero indicates that no addresses should be recovered, such after - the first initialization of the wallet. - */ - int32 recovery_window = 4; - - /* - channel_backups is an optional argument that allows clients to recover the - settled funds within a set of channels. This should be populated if the - user was unable to close out all channels and sweep funds before partial or - total data loss occurred. If specified, then after on-chain recovery of - funds, lnd begin to carry out the data loss recovery protocol in order to - recover the funds in each channel from a remote force closed transaction. - */ - ChanBackupSnapshot channel_backups = 5; - - /* - stateless_init is an optional argument instructing the daemon NOT to create - any *.macaroon files in its filesystem. If this parameter is set, then the - admin macaroon returned in the response MUST be stored by the caller of the - RPC as otherwise all access to the daemon will be lost! - */ - bool stateless_init = 6; - - /* - extended_master_key is an alternative to specifying cipher_seed_mnemonic and - aezeed_passphrase. Instead of deriving the master root key from the entropy - of an aezeed cipher seed, the given extended master root key is used - directly as the wallet's master key. This allows users to import/use a - master key from another wallet. When doing so, lnd still uses its default - SegWit only (BIP49/84) derivation paths and funds from custom/non-default - derivation paths will not automatically appear in the on-chain wallet. Using - an 'xprv' instead of an aezeed also has the disadvantage that the wallet's - birthday is not known as that is an information that's only encoded in the - aezeed, not the xprv. Therefore a birthday needs to be specified in - extended_master_key_birthday_timestamp or a "safe" default value will be - used. - */ - string extended_master_key = 7; - - /* - extended_master_key_birthday_timestamp is the optional unix timestamp in - seconds to use as the wallet's birthday when using an extended master key - to restore the wallet. lnd will only start scanning for funds in blocks that - are after the birthday which can speed up the process significantly. If the - birthday is not known, this should be left at its default value of 0 in - which case lnd will start scanning from the first SegWit block (481824 on - mainnet). - */ - uint64 extended_master_key_birthday_timestamp = 8; - - /* - watch_only is the third option of initializing a wallet: by importing - account xpubs only and therefore creating a watch-only wallet that does not - contain any private keys. That means the wallet won't be able to sign for - any of the keys and _needs_ to be run with a remote signer that has the - corresponding private keys and can serve signing RPC requests. - */ - WatchOnly watch_only = 9; -} -message InitWalletResponse { - /* - The binary serialized admin macaroon that can be used to access the daemon - after creating the wallet. If the stateless_init parameter was set to true, - this is the ONLY copy of the macaroon and MUST be stored safely by the - caller. Otherwise a copy of this macaroon is also persisted on disk by the - daemon, together with other macaroon files. - */ - bytes admin_macaroon = 1; -} - -message WatchOnly { - /* - The unix timestamp in seconds of when the master key was created. lnd will - only start scanning for funds in blocks that are after the birthday which - can speed up the process significantly. If the birthday is not known, this - should be left at its default value of 0 in which case lnd will start - scanning from the first SegWit block (481824 on mainnet). - */ - uint64 master_key_birthday_timestamp = 1; - - /* - The fingerprint of the root key (also known as the key with derivation path - m/) from which the account public keys were derived from. This may be - required by some hardware wallets for proper identification and signing. The - bytes must be in big-endian order. - */ - bytes master_key_fingerprint = 2; - - /* - The list of accounts to import. There _must_ be an account for all of lnd's - main key scopes: BIP49/BIP84 (m/49'/0'/0', m/84'/0'/0', note that the - coin type is always 0, even for testnet/regtest) and lnd's internal key - scope (m/1017'/'/'), where account is the key family as - defined in `keychain/derivation.go` (currently indices 0 to 9). - */ - repeated WatchOnlyAccount accounts = 3; -} - -message WatchOnlyAccount { - /* - Purpose is the first number in the derivation path, must be either 49, 84 - or 1017. - */ - uint32 purpose = 1; - - /* - Coin type is the second number in the derivation path, this is _always_ 0 - for purposes 49 and 84. It only needs to be set to 1 for purpose 1017 on - testnet or regtest. - */ - uint32 coin_type = 2; - - /* - Account is the third number in the derivation path. For purposes 49 and 84 - at least the default account (index 0) needs to be created but optional - additional accounts are allowed. For purpose 1017 there needs to be exactly - one account for each of the key families defined in `keychain/derivation.go` - (currently indices 0 to 9) - */ - uint32 account = 3; - - /* - The extended public key at depth 3 for the given account. - */ - string xpub = 4; -} - -message UnlockWalletRequest { - /* - wallet_password should be the current valid passphrase for the daemon. This - will be required to decrypt on-disk material that the daemon requires to - function properly. When using REST, this field must be encoded as base64. - */ - bytes wallet_password = 1; - - /* - recovery_window is an optional argument specifying the address lookahead - when restoring a wallet seed. The recovery window applies to each - individual branch of the BIP44 derivation paths. Supplying a recovery - window of zero indicates that no addresses should be recovered, such after - the first initialization of the wallet. - */ - int32 recovery_window = 2; - - /* - channel_backups is an optional argument that allows clients to recover the - settled funds within a set of channels. This should be populated if the - user was unable to close out all channels and sweep funds before partial or - total data loss occurred. If specified, then after on-chain recovery of - funds, lnd begin to carry out the data loss recovery protocol in order to - recover the funds in each channel from a remote force closed transaction. - */ - ChanBackupSnapshot channel_backups = 3; - - /* - stateless_init is an optional argument instructing the daemon NOT to create - any *.macaroon files in its file system. - */ - bool stateless_init = 4; -} -message UnlockWalletResponse { -} - -message ChangePasswordRequest { - /* - current_password should be the current valid passphrase used to unlock the - daemon. When using REST, this field must be encoded as base64. - */ - bytes current_password = 1; - - /* - new_password should be the new passphrase that will be needed to unlock the - daemon. When using REST, this field must be encoded as base64. - */ - bytes new_password = 2; - - /* - stateless_init is an optional argument instructing the daemon NOT to create - any *.macaroon files in its filesystem. If this parameter is set, then the - admin macaroon returned in the response MUST be stored by the caller of the - RPC as otherwise all access to the daemon will be lost! - */ - bool stateless_init = 3; - - /* - new_macaroon_root_key is an optional argument instructing the daemon to - rotate the macaroon root key when set to true. This will invalidate all - previously generated macaroons. - */ - bool new_macaroon_root_key = 4; -} -message ChangePasswordResponse { - /* - The binary serialized admin macaroon that can be used to access the daemon - after rotating the macaroon root key. If both the stateless_init and - new_macaroon_root_key parameter were set to true, this is the ONLY copy of - the macaroon that was created from the new root key and MUST be stored - safely by the caller. Otherwise a copy of this macaroon is also persisted on - disk by the daemon, together with other macaroon files. - */ - bytes admin_macaroon = 1; -} diff --git a/protos/lnd/v0.15.1-beta/watchtowerrpc/watchtower.proto b/protos/lnd/v0.15.1-beta/watchtowerrpc/watchtower.proto deleted file mode 100644 index f3be621..0000000 --- a/protos/lnd/v0.15.1-beta/watchtowerrpc/watchtower.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package watchtowerrpc; - -option go_package = "github.com/lightningnetwork/lnd/lnrpc/watchtowerrpc"; - -// Watchtower is a service that grants access to the watchtower server -// functionality of the daemon. -service Watchtower { - /* lncli: tower info - GetInfo returns general information concerning the companion watchtower - including its public key and URIs where the server is currently - listening for clients. - */ - rpc GetInfo (GetInfoRequest) returns (GetInfoResponse); -} - -message GetInfoRequest { -} - -message GetInfoResponse { - // The public key of the watchtower. - bytes pubkey = 1; - - // The listening addresses of the watchtower. - repeated string listeners = 2; - - // The URIs of the watchtower. - repeated string uris = 3; -} diff --git a/protos/lnd/v0.15.1-beta/wtclientrpc/wtclient.proto b/protos/lnd/v0.15.1-beta/wtclientrpc/wtclient.proto deleted file mode 100644 index 736a4bd..0000000 --- a/protos/lnd/v0.15.1-beta/wtclientrpc/wtclient.proto +++ /dev/null @@ -1,193 +0,0 @@ -syntax = "proto3"; - -package wtclientrpc; - -option go_package = "github.com/lightningnetwork/lnd/lnrpc/wtclientrpc"; - -// WatchtowerClient is a service that grants access to the watchtower client -// functionality of the daemon. -service WatchtowerClient { - /* - AddTower adds a new watchtower reachable at the given address and - considers it for new sessions. If the watchtower already exists, then - any new addresses included will be considered when dialing it for - session negotiations and backups. - */ - rpc AddTower (AddTowerRequest) returns (AddTowerResponse); - - /* - RemoveTower removes a watchtower from being considered for future session - negotiations and from being used for any subsequent backups until it's added - again. If an address is provided, then this RPC only serves as a way of - removing the address from the watchtower instead. - */ - rpc RemoveTower (RemoveTowerRequest) returns (RemoveTowerResponse); - - // ListTowers returns the list of watchtowers registered with the client. - rpc ListTowers (ListTowersRequest) returns (ListTowersResponse); - - // GetTowerInfo retrieves information for a registered watchtower. - rpc GetTowerInfo (GetTowerInfoRequest) returns (Tower); - - // Stats returns the in-memory statistics of the client since startup. - rpc Stats (StatsRequest) returns (StatsResponse); - - // Policy returns the active watchtower client policy configuration. - rpc Policy (PolicyRequest) returns (PolicyResponse); -} - -message AddTowerRequest { - // The identifying public key of the watchtower to add. - bytes pubkey = 1; - - // A network address the watchtower is reachable over. - string address = 2; -} - -message AddTowerResponse { -} - -message RemoveTowerRequest { - // The identifying public key of the watchtower to remove. - bytes pubkey = 1; - - /* - If set, then the record for this address will be removed, indicating that is - is stale. Otherwise, the watchtower will no longer be used for future - session negotiations and backups. - */ - string address = 2; -} - -message RemoveTowerResponse { -} - -message GetTowerInfoRequest { - // The identifying public key of the watchtower to retrieve information for. - bytes pubkey = 1; - - // Whether we should include sessions with the watchtower in the response. - bool include_sessions = 2; -} - -message TowerSession { - /* - The total number of successful backups that have been made to the - watchtower session. - */ - uint32 num_backups = 1; - - /* - The total number of backups in the session that are currently pending to be - acknowledged by the watchtower. - */ - uint32 num_pending_backups = 2; - - // The maximum number of backups allowed by the watchtower session. - uint32 max_backups = 3; - - /* - Deprecated, use sweep_sat_per_vbyte. - The fee rate, in satoshis per vbyte, that will be used by the watchtower for - the justice transaction in the event of a channel breach. - */ - uint32 sweep_sat_per_byte = 4 [deprecated = true]; - - /* - The fee rate, in satoshis per vbyte, that will be used by the watchtower for - the justice transaction in the event of a channel breach. - */ - uint32 sweep_sat_per_vbyte = 5; -} - -message Tower { - // The identifying public key of the watchtower. - bytes pubkey = 1; - - // The list of addresses the watchtower is reachable over. - repeated string addresses = 2; - - // Whether the watchtower is currently a candidate for new sessions. - bool active_session_candidate = 3; - - // The number of sessions that have been negotiated with the watchtower. - uint32 num_sessions = 4; - - // The list of sessions that have been negotiated with the watchtower. - repeated TowerSession sessions = 5; -} - -message ListTowersRequest { - // Whether we should include sessions with the watchtower in the response. - bool include_sessions = 1; -} - -message ListTowersResponse { - // The list of watchtowers available for new backups. - repeated Tower towers = 1; -} - -message StatsRequest { -} - -message StatsResponse { - /* - The total number of backups made to all active and exhausted watchtower - sessions. - */ - uint32 num_backups = 1; - - /* - The total number of backups that are pending to be acknowledged by all - active and exhausted watchtower sessions. - */ - uint32 num_pending_backups = 2; - - /* - The total number of backups that all active and exhausted watchtower - sessions have failed to acknowledge. - */ - uint32 num_failed_backups = 3; - - // The total number of new sessions made to watchtowers. - uint32 num_sessions_acquired = 4; - - // The total number of watchtower sessions that have been exhausted. - uint32 num_sessions_exhausted = 5; -} - -enum PolicyType { - // Selects the policy from the legacy tower client. - LEGACY = 0; - - // Selects the policy from the anchor tower client. - ANCHOR = 1; -} - -message PolicyRequest { - /* - The client type from which to retrieve the active offering policy. - */ - PolicyType policy_type = 1; -} - -message PolicyResponse { - /* - The maximum number of updates each session we negotiate with watchtowers - should allow. - */ - uint32 max_updates = 1; - - /* - Deprecated, use sweep_sat_per_vbyte. - The fee rate, in satoshis per vbyte, that will be used by watchtowers for - justice transactions in response to channel breaches. - */ - uint32 sweep_sat_per_byte = 2 [deprecated = true]; - - /* - The fee rate, in satoshis per vbyte, that will be used by watchtowers for - justice transactions in response to channel breaches. - */ - uint32 sweep_sat_per_vbyte = 3; -} diff --git a/protos/loop/v0.20.1-beta/client.proto b/protos/loop/v0.20.1-beta/client.proto deleted file mode 100644 index 26d41a2..0000000 --- a/protos/loop/v0.20.1-beta/client.proto +++ /dev/null @@ -1,1042 +0,0 @@ -syntax = "proto3"; - -import "swapserverrpc/common.proto"; - -package looprpc; - -option go_package = "github.com/lightninglabs/loop/looprpc"; - -/* -SwapClient is a service that handles the client side process of onchain/offchain -swaps. The service is designed for a single client. -*/ -service SwapClient { - /* loop: `out` - LoopOut initiates an loop out swap with the given parameters. The call - returns after the swap has been set up with the swap server. From that - point onwards, progress can be tracked via the SwapStatus stream that is - returned from Monitor(). - */ - rpc LoopOut (LoopOutRequest) returns (SwapResponse); - - /* loop: `in` - LoopIn initiates a loop in swap with the given parameters. The call - returns after the swap has been set up with the swap server. From that - point onwards, progress can be tracked via the SwapStatus stream - that is returned from Monitor(). - */ - rpc LoopIn (LoopInRequest) returns (SwapResponse); - - /* loop: `monitor` - Monitor will return a stream of swap updates for currently active swaps. - */ - rpc Monitor (MonitorRequest) returns (stream SwapStatus); - - /* loop: `listswaps` - ListSwaps returns a list of all currently known swaps and their current - status. - */ - rpc ListSwaps (ListSwapsRequest) returns (ListSwapsResponse); - - /* loop: `swapinfo` - SwapInfo returns all known details about a single swap. - */ - rpc SwapInfo (SwapInfoRequest) returns (SwapStatus); - - /* loop: `terms` - LoopOutTerms returns the terms that the server enforces for a loop out swap. - */ - rpc LoopOutTerms (TermsRequest) returns (OutTermsResponse); - - /* loop: `quote` - LoopOutQuote returns a quote for a loop out swap with the provided - parameters. - */ - rpc LoopOutQuote (QuoteRequest) returns (OutQuoteResponse); - - /* loop: `terms` - GetTerms returns the terms that the server enforces for swaps. - */ - rpc GetLoopInTerms (TermsRequest) returns (InTermsResponse); - - /* loop: `quote` - GetQuote returns a quote for a swap with the provided parameters. - */ - rpc GetLoopInQuote (QuoteRequest) returns (InQuoteResponse); - - /* - Probe asks he sever to probe the route to us to have a better upfront - estimate about routing fees when loopin-in. - */ - rpc Probe (ProbeRequest) returns (ProbeResponse); - - /* loop: `listauth` - GetLsatTokens returns all LSAT tokens the daemon ever paid for. - */ - rpc GetLsatTokens (TokensRequest) returns (TokensResponse); - - /* loop: `getparams` - GetLiquidityParams gets the parameters that the daemon's liquidity manager - is currently configured with. This may be nil if nothing is configured. - [EXPERIMENTAL]: endpoint is subject to change. - */ - rpc GetLiquidityParams (GetLiquidityParamsRequest) - returns (LiquidityParameters); - - /* loop: `setparams` - SetLiquidityParams sets a new set of parameters for the daemon's liquidity - manager. Note that the full set of parameters must be provided, because - this call fully overwrites our existing parameters. - [EXPERIMENTAL]: endpoint is subject to change. - */ - rpc SetLiquidityParams (SetLiquidityParamsRequest) - returns (SetLiquidityParamsResponse); - - /* loop: `suggestswaps` - SuggestSwaps returns a list of recommended swaps based on the current - state of your node's channels and it's liquidity manager parameters. - Note that only loop out suggestions are currently supported. - [EXPERIMENTAL]: endpoint is subject to change. - */ - rpc SuggestSwaps (SuggestSwapsRequest) returns (SuggestSwapsResponse); -} - -message LoopOutRequest { - /* - Requested swap amount in sat. This does not include the swap and miner fee. - */ - int64 amt = 1; - - /* - Base58 encoded destination address for the swap. - */ - string dest = 2; - - /* - Maximum off-chain fee in sat that may be paid for swap payment to the - server. This limit is applied during path finding. Typically this value is - taken from the response of the GetQuote call. - */ - int64 max_swap_routing_fee = 3; - - /* - Maximum off-chain fee in sat that may be paid for the prepay to the server. - This limit is applied during path finding. Typically this value is taken - from the response of the GetQuote call. - */ - int64 max_prepay_routing_fee = 4; - - /* - Maximum we are willing to pay the server for the swap. This value is not - disclosed in the swap initiation call, but if the server asks for a - higher fee, we abort the swap. Typically this value is taken from the - response of the GetQuote call. It includes the prepay amount. - */ - int64 max_swap_fee = 5; - - /* - Maximum amount of the swap fee that may be charged as a prepayment. - */ - int64 max_prepay_amt = 6; - - /* - Maximum in on-chain fees that we are willing to spend. If we want to - sweep the on-chain htlc and the fee estimate turns out higher than this - value, we cancel the swap. If the fee estimate is lower, we publish the - sweep tx. - - If the sweep tx is not confirmed, we are forced to ratchet up fees until it - is swept. Possibly even exceeding max_miner_fee if we get close to the htlc - timeout. Because the initial publication revealed the preimage, we have no - other choice. The server may already have pulled the off-chain htlc. Only - when the fee becomes higher than the swap amount, we can only wait for fees - to come down and hope - if we are past the timeout - that the server is not - publishing the revocation. - - max_miner_fee is typically taken from the response of the GetQuote call. - */ - int64 max_miner_fee = 7; - - /* - Deprecated, use outgoing_chan_set. The channel to loop out, the channel - to loop out is selected based on the lowest routing fee for the swap - payment to the server. - */ - uint64 loop_out_channel = 8 [deprecated = true]; - - /* - A restriction on the channel set that may be used to loop out. The actual - channel(s) that will be used are selected based on the lowest routing fee - for the swap payment to the server. - */ - repeated uint64 outgoing_chan_set = 11; - - /* - The number of blocks from the on-chain HTLC's confirmation height that it - should be swept within. - */ - int32 sweep_conf_target = 9; - - /* - The number of confirmations that we require for the on chain htlc that will - be published by the server before we reveal the preimage. - */ - int32 htlc_confirmations = 13; - - /* - The latest time (in unix seconds) we allow the server to wait before - publishing the HTLC on chain. Setting this to a larger value will give the - server the opportunity to batch multiple swaps together, and wait for - low-fee periods before publishing the HTLC, potentially resulting in a - lower total swap fee. - */ - uint64 swap_publication_deadline = 10; - - /* - An optional label for this swap. This field is limited to 500 characters - and may not start with the prefix [reserved], which is used to tag labels - produced by the daemon. - */ - string label = 12; - - /* - An optional identification string that will be appended to the user agent - string sent to the server to give information about the usage of loop. This - initiator part is meant for user interfaces to add their name to give the - full picture of the binary used (loopd, LiT) and the method used for - triggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI). - */ - string initiator = 14; -} - -message LoopInRequest { - /* - Requested swap amount in sat. This does not include the swap and miner - fee. - */ - int64 amt = 1; - - /* - Maximum we are willing to pay the server for the swap. This value is not - disclosed in the swap initiation call, but if the server asks for a - higher fee, we abort the swap. Typically this value is taken from the - response of the GetQuote call. - */ - int64 max_swap_fee = 2; - - /* - Maximum in on-chain fees that we are willing to spend. If we want to - publish the on-chain htlc and the fee estimate turns out higher than this - value, we cancel the swap. - - max_miner_fee is typically taken from the response of the GetQuote call. - */ - int64 max_miner_fee = 3; - - /* - The last hop to use for the loop in swap. If empty, the last hop is selected - based on the lowest routing fee for the swap payment from the server. - */ - bytes last_hop = 4; - - /* - If external_htlc is true, we expect the htlc to be published by an external - actor. - */ - bool external_htlc = 5; - - /* - The number of blocks that the on chain htlc should confirm within. - */ - int32 htlc_conf_target = 6; - - /* - An optional label for this swap. This field is limited to 500 characters - and may not be one of the reserved values in loop/labels Reserved list. - */ - string label = 7; - - /* - An optional identification string that will be appended to the user agent - string sent to the server to give information about the usage of loop. This - initiator part is meant for user interfaces to add their name to give the - full picture of the binary used (loopd, LiT) and the method used for - triggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI). - */ - string initiator = 8; - - /* - Optional route hints to reach the destination through private channels. - */ - repeated looprpc.RouteHint route_hints = 9; - - /* - Private indicates whether the destination node should be considered - private. In which case, loop will generate hophints to assist with - probing and payment. - */ - bool private = 10; -} - -message SwapResponse { - /* - Swap identifier to track status in the update stream that is returned from - the Start() call. Currently this is the hash that locks the htlcs. - DEPRECATED: To make the API more consistent, this field is deprecated in - favor of id_bytes and will be removed in a future release. - */ - string id = 1 [deprecated = true]; - - /* - Swap identifier to track status in the update stream that is returned from - the Start() call. Currently this is the hash that locks the htlcs. - */ - bytes id_bytes = 3; - - /* - DEPRECATED. This field stores the address of the onchain htlc, but - depending on the request, the semantics are different. - - For internal loop-in htlc_address contains the address of the - native segwit (P2WSH) htlc. - - For external loop-in htlc_address contains the address of the - nested segwit (NP2WSH) htlc. - - For loop-out htlc_address always contains the native segwit (P2WSH) - htlc address. - */ - string htlc_address = 2 [deprecated = true]; - - /* - The nested segwit address of the on-chain htlc. - This field remains empty for loop-out. - */ - string htlc_address_np2wsh = 4; - - /* - The native segwit address of the on-chain htlc. - Used for both loop-in and loop-out. - */ - string htlc_address_p2wsh = 5; - - // The address of the v3 (taproot) htlc. Used for both loop-in and loop-out. - string htlc_address_p2tr = 7; - - // A human-readable message received from the loop server. - string server_message = 6; -} - -message MonitorRequest { -} - -message SwapStatus { - /* - Requested swap amount in sat. This does not include the swap and miner - fee. - */ - int64 amt = 1; - - /* - Swap identifier to track status in the update stream that is returned from - the Start() call. Currently this is the hash that locks the htlcs. - DEPRECATED: To make the API more consistent, this field is deprecated in - favor of id_bytes and will be removed in a future release. - */ - string id = 2 [deprecated = true]; - - /* - Swap identifier to track status in the update stream that is returned from - the Start() call. Currently this is the hash that locks the htlcs. - */ - bytes id_bytes = 11; - - /* - The type of the swap. - */ - SwapType type = 3; - - /* - State the swap is currently in, see State enum. - */ - SwapState state = 4; - - /* - A failure reason for the swap, only set if the swap has failed. - */ - FailureReason failure_reason = 14; - - /* - Initiation time of the swap. - */ - int64 initiation_time = 5; - - /* - Initiation time of the swap. - */ - int64 last_update_time = 6; - - /* - DEPRECATED: This field stores the address of the onchain htlc. - - For internal loop-in htlc_address contains the address of the - native segwit (P2WSH) htlc. - - For external loop-in htlc_address contains the nested segwit (NP2WSH) - address. - - For loop-out htlc_address always contains the native segwit (P2WSH) - htlc address. - */ - string htlc_address = 7 [deprecated = true]; - - // HTLC address (native segwit), used in loop-in and loop-out swaps. - string htlc_address_p2wsh = 12; - - // HTLC address (nested segwit), used in loop-in swaps only. - string htlc_address_np2wsh = 13; - - // The address of the v3 (taproot) htlc. Used for both loop-in and loop-out. - string htlc_address_p2tr = 18; - - // Swap server cost - int64 cost_server = 8; - - // On-chain transaction cost - int64 cost_onchain = 9; - - // Off-chain routing fees - int64 cost_offchain = 10; - - // Optional last hop if provided in the loop in request. - bytes last_hop = 16; - - // Optional outgoing channel set if provided in the loop out request. - repeated uint64 outgoing_chan_set = 17; - - // An optional label given to the swap on creation. - string label = 15; -} - -enum SwapType { - // LOOP_OUT indicates an loop out swap (off-chain to on-chain) - LOOP_OUT = 0; - - // LOOP_IN indicates a loop in swap (on-chain to off-chain) - LOOP_IN = 1; -} - -enum SwapState { - /* - INITIATED is the initial state of a swap. At that point, the initiation - call to the server has been made and the payment process has been started - for the swap and prepayment invoices. - */ - INITIATED = 0; - - /* - PREIMAGE_REVEALED is reached when the sweep tx publication is first - attempted. From that point on, we should consider the preimage to no - longer be secret and we need to do all we can to get the sweep confirmed. - This state will mostly coalesce with StateHtlcConfirmed, except in the - case where we wait for fees to come down before we sweep. - */ - PREIMAGE_REVEALED = 1; - - /* - HTLC_PUBLISHED is reached when the htlc tx has been published in a loop in - swap. - */ - HTLC_PUBLISHED = 2; - - /* - SUCCESS is the final swap state that is reached when the sweep tx has - the required confirmation depth. - */ - SUCCESS = 3; - - /* - FAILED is the final swap state for a failed swap with or without loss of - the swap amount. - */ - FAILED = 4; - - /* - INVOICE_SETTLED is reached when the swap invoice in a loop in swap has been - paid, but we are still waiting for the htlc spend to confirm. - */ - INVOICE_SETTLED = 5; -} - -enum FailureReason { - /* - FAILURE_REASON_NONE is set when the swap did not fail, it is either in - progress or succeeded. - */ - FAILURE_REASON_NONE = 0; - - /* - FAILURE_REASON_OFFCHAIN indicates that a loop out failed because it wasn't - possible to find a route for one or both off chain payments that met the fee - and timelock limits required. - */ - FAILURE_REASON_OFFCHAIN = 1; - - /* - FAILURE_REASON_TIMEOUT indicates that the swap failed because on chain htlc - did not confirm before its expiry, or it confirmed too late for us to reveal - our preimage and claim. - */ - FAILURE_REASON_TIMEOUT = 2; - - /* - FAILURE_REASON_SWEEP_TIMEOUT indicates that a loop out permanently failed - because the on chain htlc wasn't swept before the server revoked the - htlc. - */ - FAILURE_REASON_SWEEP_TIMEOUT = 3; - - /* - FAILURE_REASON_INSUFFICIENT_VALUE indicates that a loop out has failed - because the on chain htlc had a lower value than requested. - */ - FAILURE_REASON_INSUFFICIENT_VALUE = 4; - - /* - FAILURE_REASON_TEMPORARY indicates that a swap cannot continue due to an - internal error. Manual intervention such as a restart is required. - */ - FAILURE_REASON_TEMPORARY = 5; - - /* - FAILURE_REASON_INCORRECT_AMOUNT indicates that a loop in permanently failed - because the amount extended by an external loop in htlc is insufficient. - */ - FAILURE_REASON_INCORRECT_AMOUNT = 6; -} - -message ListSwapsRequest { -} - -message ListSwapsResponse { - /* - The list of all currently known swaps and their status. - */ - repeated SwapStatus swaps = 1; -} - -message SwapInfoRequest { - /* - The swap identifier which currently is the hash that locks the HTLCs. When - using REST, this field must be encoded as URL safe base64. - */ - bytes id = 1; -} - -message TermsRequest { -} - -message InTermsResponse { - reserved 1, 2, 3, 4, 7; - - /* - Minimum swap amount (sat) - */ - int64 min_swap_amount = 5; - - /* - Maximum swap amount (sat) - */ - int64 max_swap_amount = 6; -} - -message OutTermsResponse { - reserved 1, 2, 3, 4, 7; - - /* - Minimum swap amount (sat) - */ - int64 min_swap_amount = 5; - - /* - Maximum swap amount (sat) - */ - int64 max_swap_amount = 6; - - // The minimally accepted cltv delta of the on-chain htlc. - int32 min_cltv_delta = 8; - - // The maximally accepted cltv delta of the on-chain htlc. - int32 max_cltv_delta = 9; -} - -message QuoteRequest { - /* - The amount to swap in satoshis. - */ - int64 amt = 1; - - /* - The confirmation target that should be used either for the sweep of the - on-chain HTLC broadcast by the swap server in the case of a Loop Out, or for - the confirmation of the on-chain HTLC broadcast by the swap client in the - case of a Loop In. - */ - int32 conf_target = 2; - - /* - If external_htlc is true, we expect the htlc to be published by an external - actor. - */ - bool external_htlc = 3; - - /* - The latest time (in unix seconds) we allow the server to wait before - publishing the HTLC on chain. Setting this to a larger value will give the - server the opportunity to batch multiple swaps together, and wait for - low-fee periods before publishing the HTLC, potentially resulting in a - lower total swap fee. This only has an effect on loop out quotes. - */ - uint64 swap_publication_deadline = 4; - - /* - Optionally the client can specify the last hop pubkey when requesting a - loop-in quote. This is useful to get better off-chain routing fee from the - server. - */ - bytes loop_in_last_hop = 5; - - /* - Optional route hints to reach the destination through private channels. - */ - repeated looprpc.RouteHint loop_in_route_hints = 6; - - /* - Private indicates whether the destination node should be considered - private. In which case, loop will generate hophints to assist with - probing and payment. - */ - bool private = 7; -} - -message InQuoteResponse { - reserved 2, 4; - - /* - The fee that the swap server is charging for the swap. - */ - int64 swap_fee_sat = 1; - - /* - An estimate of the on-chain fee that needs to be paid to publish the HTLC - If a miner fee of 0 is returned, it means the external_htlc flag was set for - a loop in and the fee estimation was skipped. If a miner fee of -1 is - returned, it means lnd's wallet tried to estimate the fee but was unable to - create a sample estimation transaction because not enough funds are - available. An information message should be shown to the user in this case. - */ - int64 htlc_publish_fee_sat = 3; - - /* - On-chain cltv expiry delta - */ - int32 cltv_delta = 5; - - /* - The confirmation target to be used to publish the on-chain HTLC. - */ - int32 conf_target = 6; -} - -message OutQuoteResponse { - /* - The fee that the swap server is charging for the swap. - */ - int64 swap_fee_sat = 1; - - /* - The part of the swap fee that is requested as a prepayment. - */ - int64 prepay_amt_sat = 2; - - /* - An estimate of the on-chain fee that needs to be paid to sweep the HTLC for - a loop out. - */ - int64 htlc_sweep_fee_sat = 3; - - /* - The node pubkey where the swap payment needs to be paid - to. This can be used to test connectivity before initiating the swap. - */ - bytes swap_payment_dest = 4; - - /* - On-chain cltv expiry delta - */ - int32 cltv_delta = 5; - - /* - The confirmation target to be used for the sweep of the on-chain HTLC. - */ - int32 conf_target = 6; -} - -message ProbeRequest { - /* - The amount to probe. - */ - int64 amt = 1; - - /* - Optional last hop of the route to probe. - */ - bytes last_hop = 2; - - /* - Optional route hints to reach the destination through private channels. - */ - repeated looprpc.RouteHint route_hints = 3; -} - -message ProbeResponse { -} - -message TokensRequest { -} - -message TokensResponse { - /* - List of all tokens the daemon knows of, including old/expired tokens. - */ - repeated LsatToken tokens = 1; -} - -message LsatToken { - /* - The base macaroon that was baked by the auth server. - */ - bytes base_macaroon = 1; - - /* - The payment hash of the payment that was paid to obtain the token. - */ - bytes payment_hash = 2; - - /* - The preimage of the payment hash, knowledge of this is proof that the - payment has been paid. If the preimage is set to all zeros, this means the - payment is still pending and the token is not yet fully valid. - */ - bytes payment_preimage = 3; - - /* - The amount of millisatoshis that was paid to get the token. - */ - int64 amount_paid_msat = 4; - - /* - The amount of millisatoshis paid in routing fee to pay for the token. - */ - int64 routing_fee_paid_msat = 5; - - /* - The creation time of the token as UNIX timestamp in seconds. - */ - int64 time_created = 6; - - /* - Indicates whether the token is expired or still valid. - */ - bool expired = 7; - - /* - Identifying attribute of this token in the store. Currently represents the - file name of the token where it's stored on the file system. - */ - string storage_name = 8; -} - -message GetLiquidityParamsRequest { -} - -message LiquidityParameters { - /* - A set of liquidity rules that describe the desired liquidity balance. - */ - repeated LiquidityRule rules = 1; - - /* - The parts per million of swap amount that is allowed to be allocated to swap - fees. This value is applied across swap categories and may not be set in - conjunction with sweep fee rate, swap fee ppm, routing fee ppm, prepay - routing, max prepay and max miner fee. - */ - uint64 fee_ppm = 16; - - /* - The limit we place on our estimated sweep cost for a swap in sat/vByte. If - the estimated fee for our sweep transaction within the specified - confirmation target is above this value, we will not suggest any swaps. - */ - uint64 sweep_fee_rate_sat_per_vbyte = 2; - - /* - The maximum fee paid to the server for facilitating the swap, expressed - as parts per million of the swap volume. - */ - uint64 max_swap_fee_ppm = 3; - - /* - The maximum fee paid to route the swap invoice off chain, expressed as - parts per million of the volume being routed. - */ - uint64 max_routing_fee_ppm = 4; - - /* - The maximum fee paid to route the prepay invoice off chain, expressed as - parts per million of the volume being routed. - */ - uint64 max_prepay_routing_fee_ppm = 5; - - /* - The maximum no-show penalty in satoshis paid for a swap. - */ - uint64 max_prepay_sat = 6; - - /* - The maximum miner fee we will pay to sweep the swap on chain. Note that we - will not suggest a swap if the estimate is above the sweep limit set by - these parameters, and we use the current fee estimate to sweep on chain so - this value is only a cap placed on the amount we spend on fees in the case - where the swap needs to be claimed on chain, but fees have suddenly spiked. - */ - uint64 max_miner_fee_sat = 7; - - /* - The number of blocks from the on-chain HTLC's confirmation height that it - should be swept within. - */ - int32 sweep_conf_target = 8; - - /* - The amount of time we require pass since a channel was part of a failed - swap due to off chain payment failure until it will be considered for swap - suggestions again, expressed in seconds. - */ - uint64 failure_backoff_sec = 9; - - /* - Set to true to enable automatic dispatch of swaps. All swaps will be limited - to the fee categories set by these parameters, and total expenditure will - be limited to the autoloop budget. - */ - bool autoloop = 10; - - /* - The total budget for automatically dispatched swaps since the budget start - time, expressed in satoshis. - */ - uint64 autoloop_budget_sat = 11; - - /* - The start time for autoloop budget, expressed as a unix timestamp in - seconds. If this value is 0, the budget will be applied for all - automatically dispatched swaps. Swaps that were completed before this date - will not be included in budget calculations. - */ - uint64 autoloop_budget_start_sec = 12; - - /* - The maximum number of automatically dispatched swaps that we allow to be in - flight at any point in time. - */ - uint64 auto_max_in_flight = 13; - - /* - The minimum amount, expressed in satoshis, that the autoloop client will - dispatch a swap for. This value is subject to the server-side limits - specified by the LoopOutTerms endpoint. - */ - uint64 min_swap_amount = 14; - - /* - The maximum amount, expressed in satoshis, that the autoloop client will - dispatch a swap for. This value is subject to the server-side limits - specified by the LoopOutTerms endpoint. - */ - uint64 max_swap_amount = 15; - - /* - The confirmation target for loop in on-chain htlcs. - */ - int32 htlc_conf_target = 17; -} - -enum LiquidityRuleType { - UNKNOWN = 0; - THRESHOLD = 1; -} - -message LiquidityRule { - /* - The short channel ID of the channel that this rule should be applied to. - This field may not be set when the pubkey field is set. - */ - uint64 channel_id = 1; - - // The type of swap that will be dispatched for this rule. - SwapType swap_type = 6; - - /* - The public key of the peer that this rule should be applied to. This field - may not be set when the channel id field is set. - */ - bytes pubkey = 5; - - /* - Type indicates the type of rule that this message rule represents. Setting - this value will determine which fields are used in the message. The comments - on each field in this message will be prefixed with the LiquidityRuleType - they belong to. - */ - LiquidityRuleType type = 2; - - /* - THRESHOLD: The percentage of total capacity that incoming capacity should - not drop beneath. - */ - uint32 incoming_threshold = 3; - - /* - THRESHOLD: The percentage of total capacity that outgoing capacity should - not drop beneath. - */ - uint32 outgoing_threshold = 4; -} - -message SetLiquidityParamsRequest { - /* - Parameters is the desired new set of parameters for the liquidity management - subsystem. Note that the current set of parameters will be completely - overwritten by the parameters provided (if they are valid), so the full set - of parameters should be provided for each call. - */ - LiquidityParameters parameters = 1; -} - -message SetLiquidityParamsResponse { -} - -message SuggestSwapsRequest { -} - -enum AutoReason { - AUTO_REASON_UNKNOWN = 0; - - /* - Budget not started indicates that we do not recommend any swaps because - the start time for our budget has not arrived yet. - */ - AUTO_REASON_BUDGET_NOT_STARTED = 1; - - /* - Sweep fees indicates that the estimated fees to sweep swaps are too high - right now. - */ - AUTO_REASON_SWEEP_FEES = 2; - - /* - Budget elapsed indicates that the autoloop budget for the period has been - elapsed. - */ - AUTO_REASON_BUDGET_ELAPSED = 3; - - /* - In flight indicates that the limit on in-flight automatically dispatched - swaps has already been reached. - */ - AUTO_REASON_IN_FLIGHT = 4; - - /* - Swap fee indicates that the server fee for a specific swap is too high. - */ - AUTO_REASON_SWAP_FEE = 5; - - /* - Miner fee indicates that the miner fee for a specific swap is to high. - */ - AUTO_REASON_MINER_FEE = 6; - - /* - Prepay indicates that the prepay fee for a specific swap is too high. - */ - AUTO_REASON_PREPAY = 7; - - /* - Failure backoff indicates that a swap has recently failed for this target, - and the backoff period has not yet passed. - */ - AUTO_REASON_FAILURE_BACKOFF = 8; - - /* - Loop out indicates that a loop out swap is currently utilizing the channel, - so it is not eligible. - */ - AUTO_REASON_LOOP_OUT = 9; - - /* - Loop In indicates that a loop in swap is currently in flight for the peer, - so it is not eligible. - */ - AUTO_REASON_LOOP_IN = 10; - - /* - Liquidity ok indicates that a target meets the liquidity balance expressed - in its rule, so no swap is needed. - */ - AUTO_REASON_LIQUIDITY_OK = 11; - - /* - Budget insufficient indicates that we cannot perform a swap because we do - not have enough pending budget available. This differs from budget elapsed, - because we still have some budget available, but we have allocated it to - other swaps. - */ - AUTO_REASON_BUDGET_INSUFFICIENT = 12; - - /* - Fee insufficient indicates that the fee estimate for a swap is higher than - the portion of total swap amount that we allow fees to consume. - */ - AUTO_REASON_FEE_INSUFFICIENT = 13; -} - -message Disqualified { - /* - The short channel ID of the channel that was excluded from our suggestions. - */ - uint64 channel_id = 1; - - /* - The public key of the peer that was excluded from our suggestions. - */ - bytes pubkey = 3; - - /* - The reason that we excluded the channel from the our suggestions. - */ - AutoReason reason = 2; -} - -message SuggestSwapsResponse { - /* - The set of recommended loop outs. - */ - repeated LoopOutRequest loop_out = 1; - - /* - The set of recommended loop in swaps - */ - repeated LoopInRequest loop_in = 3; - - /* - Disqualified contains the set of channels that swaps are not recommended - for. - */ - repeated Disqualified disqualified = 2; -} diff --git a/protos/loop/v0.20.1-beta/debug.proto b/protos/loop/v0.20.1-beta/debug.proto deleted file mode 100644 index 2313449..0000000 --- a/protos/loop/v0.20.1-beta/debug.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package looprpc; - -option go_package = "github.com/lightninglabs/loop/looprpc"; - -/* -Debug is a service that exposes endpoints intended for testing purposes. These -endpoints should not operate on mainnet, and should only be included if loop is -built with the dev build tag. -*/ -service Debug { - /* - ForceAutoLoop is intended for *testing purposes only* and will not work on - mainnet. This endpoint ticks our autoloop timer, triggering automated - dispatch of a swap if one is suggested. - */ - rpc ForceAutoLoop (ForceAutoLoopRequest) returns (ForceAutoLoopResponse); -} - -message ForceAutoLoopRequest { -} - -message ForceAutoLoopResponse { -} diff --git a/protos/loop/v0.20.1-beta/swapserverrpc/common.proto b/protos/loop/v0.20.1-beta/swapserverrpc/common.proto deleted file mode 100644 index 5ea79ec..0000000 --- a/protos/loop/v0.20.1-beta/swapserverrpc/common.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; - -// We can't change this to swapserverrpc, it would be a breaking change because -// the package name is also contained in the HTTP URIs and old clients would -// call the wrong endpoints. Luckily with the go_package option we can have -// different golang and RPC package names to fix protobuf namespace conflicts. -package looprpc; - -option go_package = "github.com/lightninglabs/loop/swapserverrpc"; - -message HopHint { - // The public key of the node at the start of the channel. - string node_id = 1; - - // The unique identifier of the channel. - uint64 chan_id = 2; - - // The base fee of the channel denominated in millisatoshis. - uint32 fee_base_msat = 3; - - /* - The fee rate of the channel for sending one satoshi across it denominated in - millionths of a satoshi. - */ - uint32 fee_proportional_millionths = 4; - - // The time-lock delta of the channel. - uint32 cltv_expiry_delta = 5; -} - -message RouteHint { - /* - A list of hop hints that when chained together can assist in reaching a - specific destination. - */ - repeated HopHint hop_hints = 1; -} diff --git a/protos/loop/v0.20.1-beta/swapserverrpc/server.proto b/protos/loop/v0.20.1-beta/swapserverrpc/server.proto deleted file mode 100644 index 3b5676a..0000000 --- a/protos/loop/v0.20.1-beta/swapserverrpc/server.proto +++ /dev/null @@ -1,557 +0,0 @@ -syntax = "proto3"; - -import "common.proto"; - -// We can't change this to swapserverrpc, it would be a breaking change because -// the package name is also contained in the HTTP URIs and old clients would -// call the wrong endpoints. Luckily with the go_package option we can have -// different golang and RPC package names to fix protobuf namespace conflicts. -package looprpc; - -option go_package = "github.com/lightninglabs/loop/swapserverrpc"; - -service SwapServer { - rpc LoopOutTerms (ServerLoopOutTermsRequest) returns (ServerLoopOutTerms); - - rpc NewLoopOutSwap (ServerLoopOutRequest) returns (ServerLoopOutResponse); - - rpc LoopOutPushPreimage (ServerLoopOutPushPreimageRequest) - returns (ServerLoopOutPushPreimageResponse); - - rpc LoopOutQuote (ServerLoopOutQuoteRequest) returns (ServerLoopOutQuote); - - rpc LoopInTerms (ServerLoopInTermsRequest) returns (ServerLoopInTerms); - - rpc NewLoopInSwap (ServerLoopInRequest) returns (ServerLoopInResponse); - - rpc LoopInQuote (ServerLoopInQuoteRequest) - returns (ServerLoopInQuoteResponse); - - rpc SubscribeLoopOutUpdates (SubscribeUpdatesRequest) - returns (stream SubscribeLoopOutUpdatesResponse); - - rpc SubscribeLoopInUpdates (SubscribeUpdatesRequest) - returns (stream SubscribeLoopInUpdatesResponse); - - rpc CancelLoopOutSwap (CancelLoopOutSwapRequest) - returns (CancelLoopOutSwapResponse); - - rpc Probe (ServerProbeRequest) returns (ServerProbeResponse); - - rpc RecommendRoutingPlugin (RecommendRoutingPluginReq) - returns (RecommendRoutingPluginRes); - - rpc ReportRoutingResult (ReportRoutingResultReq) - returns (ReportRoutingResultRes); - - rpc MuSig2SignSweep (MuSig2SignSweepReq) returns (MuSig2SignSweepRes); -} - -/** -This enum defines the protocol versions that clients may adhere to. Note that -this is not a flagged enum. If a particular protocol version adds a feature, -then in general all the preceding features are also supported. Exception to this -is when features get deprecated. -*/ -enum ProtocolVersion { - /// No protocol version reported at all. - LEGACY = 0; - - /// Client may attempt to send the loop out payment in multiple parts. - MULTI_LOOP_OUT = 1; - - /** - Loop will use native segwit (P2WSH) htlcs by default, while externally - published htlcs may use native (P2WSH) or nested (NP2WSH) segwit as well. - */ - NATIVE_SEGWIT_LOOP_IN = 2; - - /* - Once the on chain loop out htlc is confirmed, the client can push the swap - preimage to the server to speed up claim of their off chain htlc (acquiring - incoming liquidity more quickly than if the server waited for the on chain - claim tx). - */ - PREIMAGE_PUSH_LOOP_OUT = 3; - - // The client will propose a cltv expiry height for loop out. - USER_EXPIRY_LOOP_OUT = 4; - - // The client will use the new v2 HTLC scripts. - HTLC_V2 = 5; - - // The client creates a probe invoice so that the server can perform a - // multi-path probe. - MULTI_LOOP_IN = 6; - - // The client supports loop out swap cancelation. - LOOP_OUT_CANCEL = 7; - - // The client is able to ask the server to probe to test inbound - // liquidity. - PROBE = 8; - - // The client may ask the server to use a custom routing helper plugin in - // order to enhance off-chain payments corresponding to a swap. - ROUTING_PLUGIN = 9; - - // The client will use the new v3 (taproot) HTLC scripts. - HTLC_V3 = 10; -} - -message ServerLoopOutRequest { - bytes receiver_key = 1; - - bytes swap_hash = 2; - - uint64 amt = 3; - - /// The unix time in seconds we want the on-chain swap to be published by. - int64 swap_publication_deadline = 4; - - /// The protocol version that the client adheres to. - ProtocolVersion protocol_version = 5; - - // The requested absolute block height of the on-chain htlc. This is - // subjected to min and max constraints as reported in the LoopOutTerms - // response. - int32 expiry = 6; - - // The user agent string that identifies the software running on the user's - // side. This can be changed in the user's client software but it _SHOULD_ - // conform to the following pattern: - // Agent-Name/semver-version(/additional-info) - // Examples: - // loopd/v0.10.0-beta/commit=3b635821 - // litd/v0.2.0-alpha/commit=326d754 - string user_agent = 7; -} - -message ServerLoopOutResponse { - string swap_invoice = 1; - - string prepay_invoice = 2; - - bytes sender_key = 3; - - // The height at which the on-chain htlc will expire. Deprecated because the - // field is already specified in the request. - int32 expiry = 4 [deprecated = true]; - - // A human-readable message from the loop server. - string server_message = 5; -} - -message ServerLoopOutQuoteRequest { - /// The swap amount. If zero, a quote for a maximum amt swap will be given. - uint64 amt = 1; - - /// The unix time in seconds we want the on-chain swap to be published by. - int64 swap_publication_deadline = 2; - - /// The protocol version that the client adheres to. - ProtocolVersion protocol_version = 3; - - // The requested absolute block height of the on-chain htlc. This is - // subjected to min and max constraints as reported in the LoopOutTerms - // response. - int32 expiry = 4; -} - -message ServerLoopOutQuote { - string swap_payment_dest = 1; - - /// The total estimated swap fee given the quote amt. - int64 swap_fee = 2; - - /// Deprecated, total swap fee given quote amt is calculated in swap_fee. - int64 swap_fee_rate = 3 [deprecated = true]; - - uint64 prepay_amt = 4; - - uint64 min_swap_amount = 5 [deprecated = true]; - - uint64 max_swap_amount = 6 [deprecated = true]; - - // The server-proposed cltv delta of the on-chain htlc. Deprecated because - // the field is already specified in the request. - int32 cltv_delta = 7 [deprecated = true]; -} - -message ServerLoopOutTermsRequest { - /// The protocol version that the client adheres to. - ProtocolVersion protocol_version = 1; -} - -message ServerLoopOutTerms { - uint64 min_swap_amount = 1; - uint64 max_swap_amount = 2; - - // The minimally accepted cltv delta of the on-chain htlc. - int32 min_cltv_delta = 3; - - // The maximally accepted cltv delta of the on-chain htlc. - int32 max_cltv_delta = 4; -} - -message ServerLoopInRequest { - bytes sender_key = 1; - bytes swap_hash = 2; - uint64 amt = 3; - string swap_invoice = 4; - bytes last_hop = 5; - - /// The protocol version that the client adheres to. - ProtocolVersion protocol_version = 6; - - string probe_invoice = 7; - - // The user agent string that identifies the software running on the user's - // side. This can be changed in the user's client software but it _SHOULD_ - // conform to the following pattern: - // Agent-Name/semver-version(/additional-info) - // Examples: - // loopd/v0.10.0-beta/commit=3b635821 - // litd/v0.2.0-alpha/commit=326d754 - string user_agent = 8; -} - -message ServerLoopInResponse { - bytes receiver_key = 1; - int32 expiry = 2; - - // A human-readable message from the loop server. - string server_message = 3; -} - -message ServerLoopInQuoteRequest { - /// The swap amount. If zero, a quote for a maximum amt swap will be given. - uint64 amt = 1; - - // The destination pubkey. Will be used to retrieve cached probed routing - // fee. - bytes pubkey = 3; - - // The last hop to use. Will be used to retrieve cached probed routing fee. - bytes last_hop = 4; - - // Optional route hints to reach the destination through private channels. - repeated RouteHint route_hints = 5; - - /// The protocol version that the client adheres to. - ProtocolVersion protocol_version = 2; -} - -message ServerLoopInQuoteResponse { - int64 swap_fee = 1; - int64 swap_fee_rate = 2 [deprecated = true]; - uint64 min_swap_amount = 4 [deprecated = true]; - uint64 max_swap_amount = 5 [deprecated = true]; - int32 cltv_delta = 6; -} - -message ServerLoopInTermsRequest { - /// The protocol version that the client adheres to. - ProtocolVersion protocol_version = 1; -} - -message ServerLoopInTerms { - uint64 min_swap_amount = 1; - uint64 max_swap_amount = 2; -} - -// ServerLoopOutPushPreimageRequest pushes a preimage to the server. Note that -// this call returns with no error after the server acknowledges the preimage -// and does not block until the invoice is settled. -message ServerLoopOutPushPreimageRequest { - // The protocol version that the client adheres to. - ProtocolVersion protocol_version = 1; - - /* - Preimage is the preimage of the loop out swap that we wish to push to the - server to speed up off-chain claim once the on-chain htlc has confirmed. - */ - bytes preimage = 2; -} - -message ServerLoopOutPushPreimageResponse { -} - -message SubscribeUpdatesRequest { - // The protocol version that the client adheres to. - ProtocolVersion protocol_version = 1; - - // Swap hash is the hash of the swap to subscribe to updates for. - bytes swap_hash = 2; -} - -// ServerSwapState is an enum which represents all the states a swap may have -// from the server's perspective. -enum ServerSwapState { - // The server has created the swap. - SERVER_INITIATED = 0; - - // The server has published the loop out on chain htlc. - SERVER_HTLC_PUBLISHED = 1; - - // The swap completed successfully. - SERVER_SUCCESS = 2; - - /* - The swap failed for a reason that is unknown to the server, this is only - set for older swaps. - */ - SERVER_FAILED_UNKNOWN = 3; - - // No htlc was confirmed in time for the loop in swap to complete. - SERVER_FAILED_NO_HTLC = 4; - - // A loop in htlc confirmed on chain, but it did not have the correct value. - SERVER_FAILED_INVALID_HTLC_AMOUNT = 5; - - /* - We did not succeed in completing the loop in off chain payment before the - timeout. - */ - SERVER_FAILED_OFF_CHAIN_TIMEOUT = 6; - - // The on chain timeout was claimed. - SERVER_FAILED_TIMEOUT = 7; - - /* - The server could not publish the loop out on chain htlc before the deadline - provided. - */ - SERVER_FAILED_SWAP_DEADLINE = 8; - - // The server could not publish the loop out on chain htlc. - SERVER_FAILED_HTLC_PUBLICATION = 9; - - // The server has published the loop out on chain timeout tx. - SERVER_TIMEOUT_PUBLISHED = 10; - - // The swap has failed for unknown reasons, it will not be completed. - SERVER_UNEXPECTED_FAILURE = 11; - - // The swap htlc has confirmed on chain. - SERVER_HTLC_CONFIRMED = 12; - - // The client canceled the swap because they could not route the prepay. - SERVER_CLIENT_PREPAY_CANCEL = 13; - - // The client canceled the swap because they could not route the swap - // payment. - SERVER_CLIENT_INVOICE_CANCEL = 14; - - /* - A loop in swap was rejected because it contained multiple outputs for a - single swap. - */ - SERVER_FAILED_MULTIPLE_SWAP_SCRIPTS = 15; - - /* - The swap failed during creation. - */ - SERVER_FAILED_INITIALIZATION = 16; -} - -message SubscribeLoopOutUpdatesResponse { - // The unix timestamp in nanoseconds when the swap was updated. - int64 timestamp_ns = 1; - - // The swap's current state. - ServerSwapState state = 2; -} - -message SubscribeLoopInUpdatesResponse { - // The unix timestamp in nanoseconds when the swap was updated. - int64 timestamp_ns = 1; - - // The swap's current state. - ServerSwapState state = 2; -} - -enum RoutePaymentType { - // No reason, used to distinguish from the default value. - ROUTE_UNKNOWN = 0; - - // Prepay route indicates that the swap was canceled because the client - // could not find a route to the server for the prepay. - PREPAY_ROUTE = 1; - - // Invoice route indicates that the swap was canceled because the client - // could not find a route to the server for the swap invoice. - INVOICE_ROUTE = 2; -} - -// PaymentFailureReason describes the reason that a payment failed. These -// values are copied directly from lnd. -enum PaymentFailureReason { - /* - Payment isn't failed (yet). - */ - LND_FAILURE_REASON_NONE = 0; - - /* - There are more routes to try, but the payment timeout was exceeded. - */ - LND_FAILURE_REASON_TIMEOUT = 1; - - /* - All possible routes were tried and failed permanently. Or were no - routes to the destination at all. - */ - LND_FAILURE_REASON_NO_ROUTE = 2; - - /* - A non-recoverable error has occured. - */ - LND_FAILURE_REASON_ERROR = 3; - - /* - Payment details incorrect (unknown hash, invalid amt or - invalid final cltv delta) - */ - LND_FAILURE_REASON_INCORRECT_PAYMENT_DETAILS = 4; - - /* - Insufficient local balance. - */ - LND_FAILURE_REASON_INSUFFICIENT_BALANCE = 5; -} - -message RouteCancel { - // The type of the payment that failed. - RoutePaymentType route_type = 1; - - // The htlcs that the client tried to pay the server with, if any. - repeated HtlcAttempt attempts = 2; - - // The reason that the payment failed. - PaymentFailureReason failure = 3; -} - -message HtlcAttempt { - // The number of hops from the htlc's failure hop that it needed to take - // to reach the server's node. - uint32 remaining_hops = 1; -} - -message CancelLoopOutSwapRequest { - // The protocol version that the client adheres to. - ProtocolVersion protocol_version = 1; - - // The swap hash. - bytes swap_hash = 2; - - // The payment address for the swap invoice, used to ensure that only the - // swap owner can cancel the payment. - bytes payment_address = 3; - - // Additional information about the swap cancelation. - oneof cancel_info { - RouteCancel route_cancel = 5; - } -} - -message CancelLoopOutSwapResponse { -} - -message ServerProbeRequest { - /// The protocol version that the client adheres to. - ProtocolVersion protocol_version = 1; - - // The probe amount. - uint64 amt = 2; - - // The target node for the probe. - bytes target = 3; - - // Optional last hop to use when probing the client. - bytes last_hop = 4; - - /* - Optional route hints to reach the destination through private channels. - */ - repeated RouteHint route_hints = 5; -} - -message ServerProbeResponse { -} - -message RecommendRoutingPluginReq { - ProtocolVersion protocol_version = 1; - - // The hash of the swap requesting a routing plugin. - bytes swap_hash = 2; - - // The payment address for the swap invoice, used to ensure that only the - // swap owner can request routing plugin recommendation. - bytes payment_address = 3; -} - -enum RoutingPlugin { - // Client won't use any plugins to help with payment routing. - NONE = 0; - - // Client will try more expensive routes for off-chain payments. - LOW_HIGH = 1; -} - -message RecommendRoutingPluginRes { - // The routing plugin to use for off-chain payments. - RoutingPlugin plugin = 1; -} - -message ReportRoutingResultReq { - ProtocolVersion protocol_version = 1; - - // The swap hash. - bytes swap_hash = 2; - - // The payment address for the swap invoice, used to ensure that only the - // swap owner can report routing result. - bytes payment_address = 3; - - // The routing plugin that was used. - RoutingPlugin plugin = 4; - - // Whether this payment succeeded. - bool success = 5; - - // The number of payment attempts using the plugin. - int32 attempts = 6; - - // Total time used in milliseconds. - int64 total_time = 7; -} - -message ReportRoutingResultRes { -} - -message MuSig2SignSweepReq { - reserved 5; - - ProtocolVersion protocol_version = 1; - - // The swap hash. - bytes swap_hash = 2; - - // The payment address for the swap invoice, used to ensure that only the - // swap owner can obtain the partial signature. - bytes payment_address = 3; - - // The local public nonce. - bytes nonce = 4; - - // The psbt of the sweep txn. - bytes sweep_tx_psbt = 6; -} - -message MuSig2SignSweepRes { - // The server side public nonce. - bytes nonce = 1; - - // The partial signature of the server for the requested sighash. - bytes partial_signature = 2; -} diff --git a/protos/pool/v0.5.8-alpha/auctioneerrpc/auctioneer.proto b/protos/pool/v0.5.8-alpha/auctioneerrpc/auctioneer.proto deleted file mode 100644 index cd3b9a9..0000000 --- a/protos/pool/v0.5.8-alpha/auctioneerrpc/auctioneer.proto +++ /dev/null @@ -1,1421 +0,0 @@ -syntax = "proto3"; - -// We can't rename this to auctioneerrpc, otherwise it would be a breaking -// change since the package name is also contained in the HTTP URIs and old -// clients would call the wrong endpoints. Luckily with the go_package option we -// can have different golang and RPC package names. -package poolrpc; - -option go_package = "github.com/lightninglabs/pool/auctioneerrpc"; - -service ChannelAuctioneer { - rpc ReserveAccount (ReserveAccountRequest) returns (ReserveAccountResponse); - - rpc InitAccount (ServerInitAccountRequest) - returns (ServerInitAccountResponse); - - rpc ModifyAccount (ServerModifyAccountRequest) - returns (ServerModifyAccountResponse); - - rpc SubmitOrder (ServerSubmitOrderRequest) - returns (ServerSubmitOrderResponse); - - rpc CancelOrder (ServerCancelOrderRequest) - returns (ServerCancelOrderResponse); - - rpc OrderState (ServerOrderStateRequest) returns (ServerOrderStateResponse); - - rpc SubscribeBatchAuction (stream ClientAuctionMessage) - returns (stream ServerAuctionMessage); - - rpc SubscribeSidecar (stream ClientAuctionMessage) - returns (stream ServerAuctionMessage); - - rpc Terms (TermsRequest) returns (TermsResponse); - - rpc RelevantBatchSnapshot (RelevantBatchRequest) returns (RelevantBatch); - - rpc BatchSnapshot (BatchSnapshotRequest) returns (BatchSnapshotResponse); - - rpc NodeRating (ServerNodeRatingRequest) returns (ServerNodeRatingResponse); - - rpc BatchSnapshots (BatchSnapshotsRequest) returns (BatchSnapshotsResponse); - - rpc MarketInfo (MarketInfoRequest) returns (MarketInfoResponse); -} - -message ReserveAccountRequest { - /* - The desired value of the account in satoshis. - */ - uint64 account_value = 1; - - /* - The block height at which the account should expire. - */ - uint32 account_expiry = 2; - - /* - The trader's account key. - */ - bytes trader_key = 3; -} -message ReserveAccountResponse { - /* - The base key of the auctioneer. This key should be tweaked with the trader's - per-batch tweaked key to obtain the corresponding per-batch tweaked - auctioneer key. - */ - bytes auctioneer_key = 1; - - /* - The initial per-batch key to be used for the account. For every cleared - batch that the account participates in, this key will be incremented by the - base point of its curve, resulting in a new key for both the trader and - auctioneer in every batch. - */ - bytes initial_batch_key = 2; -} - -message ServerInitAccountRequest { - /* - Transaction output of the account. Has to be unspent and be a P2WSH of - the account script below. The amount must also exactly correspond to the - account value below. - */ - OutPoint account_point = 1; - - /* - The script used to create the account point. - */ - bytes account_script = 2; - - /* - The value of the account in satoshis. Must match the amount of the - account_point output. - */ - uint64 account_value = 3; - - /* - The block height at which the account should expire. - */ - uint32 account_expiry = 4; - - /* - The trader's account key. - */ - bytes trader_key = 5; - - // The user agent string that identifies the software running on the user's - // side. This can be changed in the user's client software but it _SHOULD_ - // conform to the following pattern and use less than 256 characters: - // Agent-Name/semver-version(/additional-info) - // Examples: - // poold/v0.4.2-beta/commit=3b635821,initiator=pool-cli - // litd/v0.4.0-alpha/commit=326d754,initiator=lit-ui - string user_agent = 6; -} -message ServerInitAccountResponse { -} - -message ServerSubmitOrderRequest { - oneof details { - /* - Submit an ask order. - */ - ServerAsk ask = 1; - - /* - Submit a bid order. - */ - ServerBid bid = 2; - } - - // The user agent string that identifies the software running on the user's - // side. This can be changed in the user's client software but it _SHOULD_ - // conform to the following pattern and use less than 256 characters: - // Agent-Name/semver-version(/additional-info) - // Examples: - // poold/v0.4.2-beta/commit=3b635821,initiator=pool-cli - // litd/v0.4.0-alpha/commit=326d754,initiator=lit-ui - string user_agent = 3; -} -message ServerSubmitOrderResponse { - oneof details { - /* - Order failed with the given reason. - */ - InvalidOrder invalid_order = 1; - - /* - Order was accepted. - */ - bool accepted = 2; - } -} - -message ServerCancelOrderRequest { - /* - The preimage to the order's unique nonce. - */ - bytes order_nonce_preimage = 1; -} -message ServerCancelOrderResponse { -} - -message ClientAuctionMessage { - oneof msg { - /* - Signal the intent to receive updates about a certain account and start - by sending the commitment part of the authentication handshake. This is - step 1 of the 3-way handshake. - */ - AccountCommitment commit = 1; - - /* - Subscribe to update and interactive order execution events for account - given and all its orders. Contains the final signature and is step 3 of - the 3-way authentication handshake. - */ - AccountSubscription subscribe = 2; - - /* - Accept the orders to be matched. - */ - OrderMatchAccept accept = 3; - - /* - Reject a whole batch. - */ - OrderMatchReject reject = 4; - - /* - The channel funding negotiations with the matched peer were successful - and the inputs to spend from the accounts are now signed. - */ - OrderMatchSign sign = 5; - - /* - The trader has lost its database and is trying to recover their - accounts. This message can be sent after the successful completion of - the 3-way authentication handshake where it will be established if the - account exists on the auctioneer's side. This message must only be sent - if the auctioneer knows of the account, otherwise it will regard it as a - critical error and terminate the connection. - */ - AccountRecovery recover = 6; - } -} - -message AccountCommitment { - /* - The SHA256 hash of the trader's account key and a 32 byte random nonce. - commit_hash = SHA256(accountPubKey || nonce) - */ - bytes commit_hash = 1; - - /* - The batch verification protocol version the client is using. Clients that - don't use the latest version will be declined to connect and participate in - an auction. The user should then be informed that a software update is - required. - */ - uint32 batch_version = 2; -} - -message AccountSubscription { - /* - The trader's account key of the account to subscribe to. - */ - bytes trader_key = 1; - - /* - The random 32 byte nonce the trader used to create the commitment hash. - */ - bytes commit_nonce = 2; - - /* - The signature over the auth_hash which is the hash of the commitment and - challenge. The signature is created with the trader's account key they - committed to. - auth_hash = SHA256(SHA256(accountPubKey || nonce) || challenge) - */ - bytes auth_sig = 3; -} - -message OrderMatchAccept { - /* - The batch ID this acceptance message refers to. Must be set to avoid out-of- - order responses from disrupting the batching process. - */ - bytes batch_id = 1; -} - -message OrderMatchReject { - enum RejectReason { - // The reason cannot be mapped to a specific code. - UNKNOWN = 0; - - /* - The client didn't come up with the same result as the server and is - rejecting the batch because of that. - */ - SERVER_MISBEHAVIOR = 1; - - /* - The client doesn't support the current batch verification version the - server is using. - */ - BATCH_VERSION_MISMATCH = 2; - - /* - The client rejects some of the orders, not the full batch. When this - code is set, the rejected_orders map must be set. - */ - PARTIAL_REJECT = 3; - } - - /* - The ID of the batch to reject. - */ - bytes batch_id = 1; - - /* - The reason/error string for the rejection. - */ - string reason = 2; - - /* - The reason as a code. - */ - RejectReason reason_code = 3; - - /* - The map of order nonces the trader was matched with but doesn't accept. The - map contains the _other_ trader's order nonces and the reason for rejecting - them. This can be a subset of the whole list of orders presented as matches - if the trader only wants to reject some of them. This map is only - considered by the auctioneer if the main reason_code is set to - PARTIAL_REJECT. Otherwise it is assumed that the whole batch was faulty for - some reason and that the trader rejects all orders contained. The auctioneer - will only accept a certain number of these partial rejects before a trader's - account is removed completely from the current batch. Abusing this - functionality can also lead to a ban of the trader. - - The order nonces are hex encoded strings because the protobuf map doesn't - allow raw bytes to be the map key type. - */ - map rejected_orders = 4; -} - -message OrderReject { - enum OrderRejectReason { - /* - The trader's client has a preference to only match orders with peers it - doesn't already have channels with. The order that is rejected with this - reason type comes from a peer that the trader already has channels with. - */ - DUPLICATE_PEER = 0; - - /* - The trader's client couldn't connect to the remote node of the matched - order or the channel funding could not be initialized for another - reason. This could also be the rejecting node's fault if their - connection is not stable. Using this code can have a negative impact on - the reputation score of both nodes, depending on the number of errors - recorded. - */ - CHANNEL_FUNDING_FAILED = 1; - } - - /* - The reason/error string for the rejection. - */ - string reason = 1; - - /* - The reason as a code. - */ - OrderRejectReason reason_code = 2; -} - -enum ChannelType { - // The channel supports static to_remote keys. - TWEAKLESS = 0; - - // The channel uses an anchor-based commitment. - ANCHORS = 1; - - /* - The channel build upon the anchor-based commitment and requires an - additional CLTV of the channel lease maturity on any commitment and HTLC - outputs that pay directly to the channel initiator (the seller). - */ - SCRIPT_ENFORCED_LEASE = 2; -} - -message ChannelInfo { - // The identifying type of the channel. - ChannelType type = 1; - - // The node's identifying public key. - bytes local_node_key = 2; - - // The remote node's identifying public key. - bytes remote_node_key = 3; - - /* - The node's base public key used within the non-delayed pay-to-self output on - the commitment transaction. - */ - bytes local_payment_base_point = 4; - - /* - RemotePaymentBasePoint is the remote node's base public key used within the - non-delayed pay-to-self output on the commitment transaction. - */ - bytes remote_payment_base_point = 5; -} - -message OrderMatchSign { - /* - The ID of the batch that the signatures are meant for. - */ - bytes batch_id = 1; - - /* - A map with the signatures to spend the accounts being spent in a batch - transaction. The map key corresponds to the trader's account key of the - account in the batch transaction. The account key/ID has to be hex encoded - into a string because protobuf doesn't allow bytes as a map key data type. - */ - map account_sigs = 2; - - /* - The information for each channel created as part of a batch that's submitted - to the auctioneer to ensure they can properly enforce a channel's service - lifetime. Entries are indexed by the string representation of a channel's - outpoint. - */ - map channel_infos = 3; -} - -message AccountRecovery { - /* - The trader's account key of the account to recover. - */ - bytes trader_key = 1; -} - -message ServerAuctionMessage { - oneof msg { - /* - Step 2 of the 3-way authentication handshake. Contains the - authentication challenge. Subscriptions sent by the trader must sign - the message SHA256(SHA256(accountPubKey || nonce) || challenge) - with their account key to prove ownership of said key. - */ - ServerChallenge challenge = 1; - - /* - The trader has subscribed to account updates successfully, the 3-way - authentication handshake completed normally. - */ - SubscribeSuccess success = 2; - - /* - An error occurred during any part of the communication. The trader - should inspect the error code and act accordingly. - */ - SubscribeError error = 3; - - /* - The auctioneer has matched a set of orders into a batch and now - instructs the traders to validate the batch and prepare for order - execution. Because traders have the possibility of backing out of a - batch, multiple of these messages with the SAME batch_id can be sent. - */ - OrderMatchPrepare prepare = 4; - - /* - This message is sent after all traders send back an OrderMatchAccept - method. It signals that the traders should execute their local funding - protocol, then send signatures for their account inputs. - */ - OrderMatchSignBegin sign = 5; - - /* - All traders have accepted and signed the batch and the final transaction - was broadcast. - */ - OrderMatchFinalize finalize = 6; - - /* - The answer to a trader's request for account recovery. This message - contains all information that is needed to restore the account to - working order on the trader side. - */ - AuctionAccount account = 7; - } -} - -message ServerChallenge { - /* - The unique challenge for each stream that has to be signed with the trader's - account key for each account subscription. - */ - bytes challenge = 1; - - /* - The commit hash the challenge was created for. - */ - bytes commit_hash = 2; -} - -message SubscribeSuccess { - /* - The trader's account key this message is referring to. - */ - bytes trader_key = 1; -} - -message MatchedMarket { - /* - Maps a user's own order_nonce to the opposite order type they were matched - with. The order_nonce is a 32 byte hex encoded string because bytes is not - allowed as a map key data type in protobuf. - */ - map matched_orders = 1; - - /* - The uniform clearing price rate in parts per billion that was used for this - batch. - */ - uint32 clearing_price_rate = 2; -} - -message OrderMatchPrepare { - /* - Deprecated, use matched_markets. - */ - map matched_orders = 1 [deprecated = true]; - - /* - Deprecated, use matched_markets. - */ - uint32 clearing_price_rate = 2 [deprecated = true]; - - /* - A list of the user's own accounts that are being spent by the matched - orders. The list contains the differences that would be applied by the - server when executing the orders. - */ - repeated AccountDiff charged_accounts = 3; - - /* - The fee parameters used to calculate the execution fees. - */ - ExecutionFee execution_fee = 4; - - /* - The batch transaction with all non-witness data. - */ - bytes batch_transaction = 5; - - /* - Fee rate of the batch transaction, expressed in satoshis per 1000 weight - units (sat/kW). - */ - uint64 fee_rate_sat_per_kw = 6; - - /* - Fee rebate in satoshis, offered if another batch participant wants to pay - more fees for a faster confirmation. - */ - uint64 fee_rebate_sat = 7; - - /* - The 32 byte unique identifier of this batch. - */ - bytes batch_id = 8; - - /* - The batch verification protocol version the server is using. Clients that - don't support this version MUST return an `OrderMatchAccept` message with - an empty list of orders so the batch can continue. The user should then be - informed that a software update is required. - */ - uint32 batch_version = 9; - - /* - Maps the distinct lease duration markets to the orders that were matched - within and the discovered market clearing price. - */ - map matched_markets = 10; - - /* - The earliest absolute height in the chain in which the batch transaction can - be found within. This will be used by traders to base off their absolute - channel lease maturity height. - */ - uint32 batch_height_hint = 11; -} - -message OrderMatchSignBegin { - /* - The 32 byte unique identifier of this batch. - */ - bytes batch_id = 1; -} - -message OrderMatchFinalize { - /* - The unique identifier of the finalized batch. - */ - bytes batch_id = 1; - - /* - The final transaction ID of the published batch transaction. - */ - bytes batch_txid = 2; - - // Don't re-use, this was a field that was removed. - reserved 3; -} - -message SubscribeError { - enum Error { - /* - The error cannot be mapped to a specific code. - */ - UNKNOWN = 0; - - /* - The server is shutting down for maintenance. Traders should close the - long-lived stream/connection and try to connect again after some time. - */ - SERVER_SHUTDOWN = 1; - - /* - The account the trader tried to subscribe to does not exist in the - auctioneer's database. - */ - ACCOUNT_DOES_NOT_EXIST = 2; - - /* - The account the trader tried to subscribe to was never completed and a - reservation for it is still pending. - */ - INCOMPLETE_ACCOUNT_RESERVATION = 3; - } - - /* - The string representation of the subscription error. - */ - string error = 1; - - /* - The error code of the subscription error. - */ - Error error_code = 2; - - /* - The trader's account key this error is referring to. This is not set if - the error code is SERVER_SHUTDOWN as that error is only sent once per - connection and not per individual subscription. - */ - bytes trader_key = 3; - - /* - The auctioneer's partial account information as it was stored when creating - the reservation. This is only set if the error code is - INCOMPLETE_ACCOUNT_RESERVATION. Only the fields value, expiry, trader_key, - auctioneer_key, batch_key and height_hint will be set in that - case. - */ - AuctionAccount account_reservation = 4; -} - -enum AuctionAccountState { - /* - The account's funding transaction is not yet confirmed on-chain. - */ - STATE_PENDING_OPEN = 0; - - /* - The account is fully open and confirmed on-chain. - */ - STATE_OPEN = 1; - - /* - The account is still open but the CLTV expiry has passed and the trader can - close it without the auctioneer's key. Orders for accounts in this state - won't be accepted. - */ - STATE_EXPIRED = 2; - - /* - The account was modified by a deposit or withdrawal and is currently waiting - for the modifying transaction to confirm. - */ - STATE_PENDING_UPDATE = 3; - - /* - The account is closed. The auctioneer doesn't track whether the closing - transaction is already confirmed on-chain or not. - */ - STATE_CLOSED = 4; - - /* - The account has recently participated in a batch and is not yet confirmed. - */ - STATE_PENDING_BATCH = 5; - - /* - The account has reached the expiration height while it had a pending update - that hasn't yet confirmed. This allows accounts to be renewed once - confirmed and expired. - */ - STATE_EXPIRED_PENDING_UPDATE = 6; -} - -message AuctionAccount { - /* - The value of the account in satoshis. Must match the amount of the - account_point output. - */ - uint64 value = 1; - - /* - The block height at which the account should expire. - */ - uint32 expiry = 2; - - /* - The trader's account key. - */ - bytes trader_key = 3; - - /* - The long term auctioneer's account key. - */ - bytes auctioneer_key = 4; - - /* - The current batch key used to create the account output. - */ - bytes batch_key = 5; - - /* - The current state of the account as the auctioneer sees it. - */ - AuctionAccountState state = 6; - - /* - The block height of the last change to the account's output. Can be used to - scan the chain for the output's spend state more efficiently. - */ - uint32 height_hint = 7; - - /* - Transaction output of the account. Depending on the state of the account, - this output might have been spent. - */ - OutPoint outpoint = 8; - - /* - The latest transaction of an account. This is only known by the auctioneer - after the account has met its initial funding confirmation. - */ - bytes latest_tx = 9; -} - -message MatchedOrder { - /* - The bids the trader's own order was matched against. This list is empty if - the trader's order was a bid order itself. - */ - repeated MatchedBid matched_bids = 1; - - /* - The asks the trader's own order was matched against. This list is empty if - the trader's order was an ask order itself. - */ - repeated MatchedAsk matched_asks = 2; -} - -message MatchedAsk { - /* - The ask order that was matched against. - */ - ServerAsk ask = 1; - - /* - The number of units that were filled from/by this matched order. - */ - uint32 units_filled = 2; -} -message MatchedBid { - /* - The ask order that was matched against. - */ - ServerBid bid = 1; - - /* - The number of units that were filled from/by this matched order. - */ - uint32 units_filled = 2; -} - -message AccountDiff { - enum AccountState { - OUTPUT_RECREATED = 0; - OUTPUT_DUST_EXTENDED_OFFCHAIN = 1; - OUTPUT_DUST_ADDED_TO_FEES = 2; - OUTPUT_FULLY_SPENT = 3; - } - - /* - The final balance of the account after the executed batch. - */ - uint64 ending_balance = 1; - - /* - Depending on the amount of the final balance of the account, the remainder - is either sent to a new on-chain output, extended off-chain or fully - consumed by the batch and its fees. - */ - AccountState ending_state = 2; - - /* - If the account was re-created on-chain then the new account's index in the - transaction is set here. If the account was fully spent or the remainder was - extended off-chain then no new account outpoint is created and -1 is - returned here. - */ - int32 outpoint_index = 3; - - /* - The trader's account key this diff is referring to. - */ - bytes trader_key = 4; - - /* - The new account expiry height used to verify the batch. If the batch is - successfully executed the account must update its expiry height to this - value. - */ - uint32 new_expiry = 5; -} - -enum OrderChannelType { - // Used to set defaults when a trader doesn't specify a channel type. - ORDER_CHANNEL_TYPE_UNKNOWN = 0; - - /* - The channel type will vary per matched channel based on the features shared - between its participants. - */ - ORDER_CHANNEL_TYPE_PEER_DEPENDENT = 1; - - /* - A channel type that builds upon the anchors commitment format to enforce - channel lease maturities in the commitment and HTLC outputs that pay to the - channel initiator/seller. - */ - ORDER_CHANNEL_TYPE_SCRIPT_ENFORCED = 2; -} - -message ServerOrder { - /* - The trader's account key of the account to use for the order. - */ - bytes trader_key = 1; - - /* - Fixed order rate in parts per billion. - */ - uint32 rate_fixed = 2; - - /* - Order amount in satoshis. - */ - uint64 amt = 3; - - uint64 min_chan_amt = 4; - - // TODO(guggero): implement - // repeated bytes must_fill_pub = 5; - reserved 5; - - /* - Order nonce of 32 byte length, acts as unique order identifier. - */ - bytes order_nonce = 6; - - /* - Signature of the order's digest, signed with the user's account key. The - signature must be fixed-size LN wire format encoded. Version 0 includes the - fields version, rate_fixed, amt, max_batch_fee_rate_sat_per_kw and - lease_duration_blocks in the order digest. - */ - bytes order_sig = 7; - - /* - The multi signature key of the node creating the order, will be used for the - target channel's funding TX 2-of-2 multi signature output. - */ - bytes multi_sig_key = 8; - - /* - The pubkey of the node creating the order. - */ - bytes node_pub = 9; - - /* - The network addresses of the node creating the order. - */ - repeated NodeAddress node_addr = 10; - - /* - // TODO(guggero): implement - int64 min_node_score = 11; - */ - reserved 11; - - /* - The type of the channel that should be opened. - */ - OrderChannelType channel_type = 12; - - /* - Maximum fee rate the trader is willing to pay for the batch transaction, - expressed in satoshis per 1000 weight units (sat/kW). - */ - uint64 max_batch_fee_rate_sat_per_kw = 13; - - // List of nodes that will be allowed to match with our order. Incompatible - // with the `not_allowed_node_ids` field. - repeated bytes allowed_node_ids = 14; - - // List of nodes that won't be allowed to match with our order. Incompatible - // with the `allowed_node_ids` field. - repeated bytes not_allowed_node_ids = 15; -} - -enum NodeTier { - // The default node tier. This value will be determined at run-time by the - // current order version. - TIER_DEFAULT = 0; - - // Tier 0, bid with this tier are opting out of the smaller "higher - // quality" pool of nodes to match their bids. Nodes in this tier are - // considered to have "no rating". - TIER_0 = 1; - - // Tier 1, the "base" node tier. Nodes in this tier are shown to have a - // higher degree of up time and route-ability compared to the rest of the - // nodes in the network. This is the current default node tier when - // submitting bid orders. - TIER_1 = 2; -} - -message ServerBid { - /* - The common fields shared between both ask and bid order types. - */ - ServerOrder details = 1; - - /* - Required number of blocks that a channel opened as a result of this bid - should be kept open. - */ - uint32 lease_duration_blocks = 2; - - // TODO(guggero): implement - // bool instant = 3; - reserved 3; - - /* - The version of the order format that is used. Will be increased once new - features are added. - */ - uint32 version = 4; - - /* - The minimum node tier this order should be matched with. Only asks backed by - a node this tier or higher will be eligible for matching with this bid. - */ - NodeTier min_node_tier = 5; - - /* - Give the incoming channel that results from this bid being matched an - initial outbound balance by adding additional funds from the taker's account - into the channel. As a simplification for the execution protocol and the - channel reserve calculations, the self_chan_balance can be at most the same - as the order amount and the min_chan_amt must be set to the full order - amount. - */ - uint64 self_chan_balance = 6; - - /* - If this bid order is meant to lease a channel for another node (which is - dubbed a "sidecar channel") then this boolean needs to be set to true. The - multi_sig_key, node_pub and node_addr fields of the order details must then - correspond to the recipient node's details. - */ - bool is_sidecar_channel = 7; -} - -message ServerAsk { - /* - The common fields shared between both ask and bid order types. - */ - ServerOrder details = 1; - - /* - The number of blocks the liquidity provider is willing to provide the - channel funds for. - */ - uint32 lease_duration_blocks = 4; - - /* - The version of the order format that is used. Will be increased once new - features are added. - */ - uint32 version = 5; -} - -message CancelOrder { - bytes order_nonce = 1; -} - -message InvalidOrder { - enum FailReason { INVALID_AMT = 0; } - - bytes order_nonce = 1; - FailReason fail_reason = 2; - string fail_string = 3; -} - -message ServerInput { - // The outpoint that the input corresponds to. - OutPoint outpoint = 1; - - /* - The signature script required by the input. This only applies to NP2WKH - inputs. - */ - bytes sig_script = 2; -} - -message ServerOutput { - // The value, in satoshis, of the output. - uint64 value = 1; - - // The script of the output to send the value to. - bytes script = 2; -} - -message ServerModifyAccountRequest { - /* - The trader's account key of the account to be modified. - */ - bytes trader_key = 1; - - /* - An additional set of inputs that can be included in the spending transaction - of an account. These can be used to deposit more funds into an account. - These must be under control of the backing lnd node's wallet. - */ - repeated ServerInput new_inputs = 2; - - /* - An additional set of outputs that can be included in the spending - transaction of an account. These can be used to withdraw funds from an - account. - */ - repeated ServerOutput new_outputs = 3; - - message NewAccountParameters { - // The new value of the account. - uint64 value = 1; - - // The new expiry of the account as an absolute height. - uint32 expiry = 2; - } - - // The new parameters to apply for the account. - NewAccountParameters new_params = 4; -} - -message ServerModifyAccountResponse { - /* - The auctioneer's signature that allows a trader to broadcast a transaction - spending from an account output. - */ - bytes account_sig = 1; -} - -message ServerOrderStateRequest { - bytes order_nonce = 1; -} - -enum OrderState { - ORDER_SUBMITTED = 0; - ORDER_CLEARED = 1; - ORDER_PARTIALLY_FILLED = 2; - ORDER_EXECUTED = 3; - ORDER_CANCELED = 4; - ORDER_EXPIRED = 5; - ORDER_FAILED = 6; -} - -message ServerOrderStateResponse { - /* - The state the order currently is in. - */ - OrderState state = 1; - - /* - The number of currently unfilled units of this order. This will be equal to - the total amount of units until the order has reached the state PARTIAL_FILL - or EXECUTED. - */ - uint32 units_unfulfilled = 2; -} - -message TermsRequest { -} - -enum DurationBucketState { - /* - NO_MARKET indicates that this bucket doesn't actually exist, in that no - market is present for this market. - */ - NO_MARKET = 0; - - /* - MARKET_CLOSED indicates that this market exists, but that it isn't currently - running. - */ - MARKET_CLOSED = 1; - - /* - ACCEPTING_ORDERS indicates that we're accepting orders for this bucket, but - not yet clearing for this duration. - */ - ACCEPTING_ORDERS = 2; - - /* - MARKET_OPEN indicates that we're accepting orders, and fully clearing the - market for this duration. - */ - MARKET_OPEN = 3; -} - -message TermsResponse { - /* - The maximum account size in satoshis currently allowed by the auctioneer. - */ - uint64 max_account_value = 1; - - /* - Deprecated, use explicit order duration from lease_duration_buckets. - */ - uint32 max_order_duration_blocks = 2 [deprecated = true]; - - /* - The execution fee charged per matched order. - */ - ExecutionFee execution_fee = 3; - - /* - Deprecated, use lease_duration_buckets. - */ - map lease_durations = 4 [deprecated = true]; - - // The confirmation target to use for fee estimation of the next batch. - uint32 next_batch_conf_target = 5; - - /* - The fee rate, in satoshis per kiloweight, estimated to use for the next - batch. - */ - uint64 next_batch_fee_rate_sat_per_kw = 6; - - /* - The absolute unix timestamp at which the auctioneer will attempt to clear - the next batch. - */ - uint64 next_batch_clear_timestamp = 7; - - /* - The set of lease durations the market is currently accepting and the state - the duration buckets currently are in. - */ - map lease_duration_buckets = 8; - - /* - The value used by the auctioneer to determine if an account expiry height - needs to be extended after participating in a batch and for how long. - */ - uint32 auto_renew_extension_blocks = 9; -} - -message RelevantBatchRequest { - // The unique identifier of the batch. - bytes id = 1; - - /* - The set of accounts the trader is interested in retrieving information - for within the batch. Each account is identified by its trader key. - */ - repeated bytes accounts = 2; -} - -message RelevantBatch { - // The version of the batch. - uint32 version = 1; - - // The unique identifier of the batch. - bytes id = 2; - - /* - The set of modifications that should be applied to the requested accounts as - a result of this batch. - */ - repeated AccountDiff charged_accounts = 3; - - /* - Deprecated, use matched_markets. - */ - map matched_orders = 4 [deprecated = true]; - - /* - Deprecated, use matched_markets. - */ - uint32 clearing_price_rate = 5 [deprecated = true]; - - // The fee parameters used to calculate the execution fees. - ExecutionFee execution_fee = 6; - - // The batch transaction including all witness data. - bytes transaction = 7; - - /* - Fee rate of the batch transaction, expressed in satoshis per 1000 weight - units (sat/kW). - */ - uint64 fee_rate_sat_per_kw = 8; - - // The unix timestamp in nanoseconds the batch was made. - uint64 creation_timestamp_ns = 9; - - /* - Maps the distinct lease duration markets to the orders that were matched - within and the discovered market clearing price. - */ - map matched_markets = 10; -} - -message ExecutionFee { - /* - The base fee in satoshis charged per order, regardless of the matched size. - */ - uint64 base_fee = 1; - - /* - The fee rate in parts per million. - */ - uint64 fee_rate = 2; -} - -message NodeAddress { - string network = 1; - string addr = 2; -} - -message OutPoint { - /* - Raw bytes representing the transaction id. - */ - bytes txid = 1; - - /* - The index of the output on the transaction. - */ - uint32 output_index = 2; -} - -message AskSnapshot { - // The version of the order. - uint32 version = 1; - - // The period of time the channel will survive for. - uint32 lease_duration_blocks = 2; - - // The true bid price of the order in parts per billion. - uint32 rate_fixed = 3; - - // The channel type to be created. - OrderChannelType chan_type = 4; -} -message BidSnapshot { - // The version of the order. - uint32 version = 1; - - // The period of time the matched channel should be allocated for. - uint32 lease_duration_blocks = 2; - - // The true bid price of the order in parts per billion. - uint32 rate_fixed = 3; - - // The channel type to be created. - OrderChannelType chan_type = 4; -} -message MatchedOrderSnapshot { - // The full ask order that was matched. - AskSnapshot ask = 1; - - // The full bid order that was matched. - BidSnapshot bid = 2; - - // The fixed rate premium that was matched, expressed in parts-ber-billion. - uint32 matching_rate = 3; - - // The total number of satoshis that were bought. - uint64 total_sats_cleared = 4; - - // The total number of units that were matched. - uint32 units_matched = 5; -} - -message BatchSnapshotRequest { - // The unique identifier of the batch encoded as a compressed pubkey. - bytes batch_id = 1; -} - -message MatchedMarketSnapshot { - /* - The set of all orders matched in the batch. - */ - repeated MatchedOrderSnapshot matched_orders = 1; - - /* - The uniform clearing price rate in parts per billion that was used for this - batch. - */ - uint32 clearing_price_rate = 2; -} - -message BatchSnapshotResponse { - // The version of the batch. - uint32 version = 1; - - // The unique identifier of the batch. - bytes batch_id = 2; - - // The unique identifier of the prior batch. - bytes prev_batch_id = 3; - - /* - Deprecated, use matched_markets. - */ - uint32 clearing_price_rate = 4 [deprecated = true]; - - /* - Deprecated, use matched_markets. - */ - repeated MatchedOrderSnapshot matched_orders = 5 [deprecated = true]; - - // The txid of the batch transaction. - string batch_tx_id = 7; - - // The batch transaction including all witness data. - bytes batch_tx = 6; - - // The fee rate, in satoshis per kiloweight, of the batch transaction. - uint64 batch_tx_fee_rate_sat_per_kw = 8; - - // The unix timestamp in nanoseconds the batch was made. - uint64 creation_timestamp_ns = 9; - - /* - Maps the distinct lease duration markets to the orders that were matched - within and the discovered market clearing price. - */ - map matched_markets = 10; -} - -message ServerNodeRatingRequest { - // The target node to obtain ratings information for. - repeated bytes node_pubkeys = 1; -} - -message NodeRating { - // The pubkey for the node these ratings belong to. - bytes node_pubkey = 1; - - // The tier of the target node. - NodeTier node_tier = 2; -} - -message ServerNodeRatingResponse { - // A series of node ratings for each of the queried nodes. - repeated NodeRating node_ratings = 1; -} - -message BatchSnapshotsRequest { - /* - The unique identifier of the first batch to return, encoded as a compressed - pubkey. This represents the newest/most current batch to fetch. If this is - empty or a zero batch ID, the most recent finalized batch is used as the - starting point to go back from. - */ - bytes start_batch_id = 1; - - /* - The number of batches to return at most, including the start batch. - */ - uint32 num_batches_back = 2; -} - -message BatchSnapshotsResponse { - // The list of batches requested. - repeated BatchSnapshotResponse batches = 1; -} - -message MarketInfoRequest { -} - -message MarketInfo { - message TierValue { - NodeTier tier = 1; - uint32 value = 2; - } - - // The number of open/pending ask orders per node tier. - repeated TierValue num_asks = 1; - - // The number of open/pending bid orders per node tier. - repeated TierValue num_bids = 2; - - /* - The total number of open/unmatched units in open/pending ask orders per node - tier. - */ - repeated TierValue ask_open_interest_units = 3; - - /* - The total number of open/unmatched units in open/pending bid orders per node - tier. - */ - repeated TierValue bid_open_interest_units = 4; -} - -message MarketInfoResponse { - // A map of all markets identified by their lease duration and the current - // set of statistics. - map markets = 1; -} diff --git a/protos/pool/v0.5.8-alpha/auctioneerrpc/hashmail.proto b/protos/pool/v0.5.8-alpha/auctioneerrpc/hashmail.proto deleted file mode 100644 index bdac1f6..0000000 --- a/protos/pool/v0.5.8-alpha/auctioneerrpc/hashmail.proto +++ /dev/null @@ -1,118 +0,0 @@ -syntax = "proto3"; - -// We can't rename this to auctioneerrpc, otherwise it would be a breaking -// change since the package name is also contained in the HTTP URIs and old -// clients would call the wrong endpoints. Luckily with the go_package option we -// can have different golang and RPC package names. -package poolrpc; - -option go_package = "github.com/lightninglabs/pool/auctioneerrpc"; - -// HashMail exposes a simple synchronous network stream that can be used for -// various types of synchronization and coordination. The service allows -// authenticated users to create a simplex stream call a cipher box. Once the -// stream is created, any user that knows of the stream ID can read/write from -// the stream, but only a single user can be on either side at a time. -service HashMail { - /* - NewCipherBox creates a new cipher box pipe/stream given a valid - authentication mechanism. If the authentication mechanism has been revoked, - or needs to be changed, then a CipherChallenge message is returned. - Otherwise the method will either be accepted or rejected. - */ - rpc NewCipherBox (CipherBoxAuth) returns (CipherInitResp); - - /* - DelCipherBox attempts to tear down an existing cipher box pipe. The same - authentication mechanism used to initially create the stream MUST be - specified. - */ - rpc DelCipherBox (CipherBoxAuth) returns (DelCipherBoxResp); - - /* - SendStream opens up the write side of the passed CipherBox pipe. Writes - will be non-blocking up to the buffer size of the pipe. Beyond that writes - will block until completed. - */ - rpc SendStream (stream CipherBox) returns (CipherBoxDesc); - - /* - RecvStream opens up the read side of the passed CipherBox pipe. This method - will block until a full message has been read as this is a message based - pipe/stream abstraction. - */ - rpc RecvStream (CipherBoxDesc) returns (stream CipherBox); -} - -message PoolAccountAuth { - // The account key being used to authenticate. - bytes acct_key = 1; - - // A valid signature over the stream ID being used. - bytes stream_sig = 2; -} - -message SidecarAuth { - /* - A valid sidecar ticket that has been signed (offered) by a Pool account in - the active state. - */ - string ticket = 1; -} - -message CipherBoxAuth { - // A description of the stream one is attempting to initialize. - CipherBoxDesc desc = 1; - - oneof auth { - PoolAccountAuth acct_auth = 2; - - SidecarAuth sidecar_auth = 3; - } -} - -message DelCipherBoxResp { -} - -message CipherChallenge { - // TODO(roasbeef): payment request, node key, etc, etc -} - -message CipherError { -} - -message CipherSuccess { - CipherBoxDesc desc = 1; -} - -message CipherInitResp { - oneof resp { - /* - CipherSuccess is returned if the initialization of the cipher box was - successful. - */ - CipherSuccess success = 1; - - /* - CipherChallenge is returned if the authentication mechanism was revoked - or needs to be refreshed. - */ - CipherChallenge challenge = 2; - - /* - CipherError is returned if the authentication mechanism failed to - validate. - */ - CipherError error = 3; - } -} - -message CipherBoxDesc { - bytes stream_id = 1; -} - -message CipherBox { - CipherBoxDesc desc = 1; - - bytes msg = 2; -} diff --git a/protos/pool/v0.5.8-alpha/trader.proto b/protos/pool/v0.5.8-alpha/trader.proto deleted file mode 100644 index 34dd35a..0000000 --- a/protos/pool/v0.5.8-alpha/trader.proto +++ /dev/null @@ -1,1361 +0,0 @@ -syntax = "proto3"; - -import "auctioneerrpc/auctioneer.proto"; - -package poolrpc; - -option go_package = "github.com/lightninglabs/pool/poolrpc"; - -service Trader { - /* pool: `getinfo` - GetInfo returns general information about the state of the Pool trader - daemon. - */ - rpc GetInfo (GetInfoRequest) returns (GetInfoResponse); - - /* pool: `stop` - Stop gracefully shuts down the Pool trader daemon. - */ - rpc StopDaemon (StopDaemonRequest) returns (StopDaemonResponse); - - /* - QuoteAccount gets a fee quote to fund an account of the given size with the - given confirmation target. If the connected lnd wallet doesn't have enough - balance to fund an account of the requested size, an error is returned. - */ - rpc QuoteAccount (QuoteAccountRequest) returns (QuoteAccountResponse); - - /* pool: `accounts new` - InitAccount creates a new account with the requested size and expiration, - funding it from the wallet of the connected lnd node. - */ - rpc InitAccount (InitAccountRequest) returns (Account); - - /* pool: `accounts list` - ListAccounts returns a list of all accounts known to the trader daemon and - their current state. - */ - rpc ListAccounts (ListAccountsRequest) returns (ListAccountsResponse); - - /* pool: `accounts close` - CloseAccount closes an account and returns the funds locked in that account - to the connected lnd node's wallet. - */ - rpc CloseAccount (CloseAccountRequest) returns (CloseAccountResponse); - - /* pool: `accounts withdraw` - WithdrawAccount splits off parts of the account balance into the specified - outputs while recreating the account with a reduced balance. - */ - rpc WithdrawAccount (WithdrawAccountRequest) - returns (WithdrawAccountResponse); - - /* pool: `accounts deposit` - DepositAccount adds more funds from the connected lnd node's wallet to an - account. - */ - rpc DepositAccount (DepositAccountRequest) returns (DepositAccountResponse); - - /* pool: `accounts renew` - RenewAccount renews the expiration of an account. - */ - rpc RenewAccount (RenewAccountRequest) returns (RenewAccountResponse); - - /* pool: `accounts bumpfee` - BumpAccountFee attempts to bump the fee of an account's transaction through - child-pays-for-parent (CPFP). Since the CPFP is performed through the - backing lnd node, the account transaction must contain an output under its - control for a successful bump. If a CPFP has already been performed for an - account, and this RPC is invoked again, then a replacing transaction (RBF) - of the child will be broadcast. - */ - rpc BumpAccountFee (BumpAccountFeeRequest) returns (BumpAccountFeeResponse); - - /* pool: `accounts recover` - RecoverAccounts queries the auction server for this trader daemon's accounts - in case we lost our local account database. - */ - rpc RecoverAccounts (RecoverAccountsRequest) - returns (RecoverAccountsResponse); - - /* pool: `orders submit` - SubmitOrder creates a new ask or bid order and submits for the given account - and submits it to the auction server for matching. - */ - rpc SubmitOrder (SubmitOrderRequest) returns (SubmitOrderResponse); - - /* pool: `orders list` - ListOrders returns a list of all active and archived orders that are - currently known to the trader daemon. - */ - rpc ListOrders (ListOrdersRequest) returns (ListOrdersResponse); - - /* pool: `orders cancel` - CancelOrder cancels an active order with the auction server to remove it - from future matching. - */ - rpc CancelOrder (CancelOrderRequest) returns (CancelOrderResponse); - - /* - QuoteOrder calculates the premium, execution fees and max batch fee rate for - an order based on the given order parameters. - */ - rpc QuoteOrder (QuoteOrderRequest) returns (QuoteOrderResponse); - - /* pool: `auction fee` - AuctionFee returns the current auction order execution fee specified by the - auction server. - */ - rpc AuctionFee (AuctionFeeRequest) returns (AuctionFeeResponse); - - /* pool: `auction leasedurations` - LeaseDurations returns the current set of valid lease duration in the - market as is, and also information w.r.t if the market is currently active. - */ - rpc LeaseDurations (LeaseDurationRequest) returns (LeaseDurationResponse); - - /* pool: `auction nextbatchinfo` - NextBatchInfo returns information about the next batch the auctioneer will - perform. - */ - rpc NextBatchInfo (NextBatchInfoRequest) returns (NextBatchInfoResponse); - - /* pool: `auction snapshot` - BatchSnapshot returns the snapshot of a past batch identified by its ID. - If no ID is provided, the snapshot of the last finalized batch is returned. - Deprecated, use BatchSnapshots instead. - */ - rpc BatchSnapshot (BatchSnapshotRequest) returns (BatchSnapshotResponse); - - /* pool: `listauth` - GetLsatTokens returns all LSAT tokens the daemon ever paid for. - */ - rpc GetLsatTokens (TokensRequest) returns (TokensResponse); - - /* pool: `auction leases` - Leases returns the list of channels that were either purchased or sold by - the trader within the auction. - */ - rpc Leases (LeasesRequest) returns (LeasesResponse); - - /* pool: `auction ratings` - Returns the Node Tier information for this target Lightning node, and other - related ranking information. - */ - rpc NodeRatings (NodeRatingRequest) returns (NodeRatingResponse); - - /* pool: `auction snapshot` - BatchSnapshots returns a list of batch snapshots starting at the start batch - ID and going back through the history of batches, returning at most the - number of specified batches. A maximum of 100 snapshots can be queried in - one call. If no start batch ID is provided, the most recent finalized batch - is used as the starting point to go back from. - */ - rpc BatchSnapshots (BatchSnapshotsRequest) returns (BatchSnapshotsResponse); - - /* pool: `sidecar offer` - OfferSidecar is step 1/4 of the sidecar negotiation between the provider - (the trader submitting the bid order) and the recipient (the trader - receiving the sidecar channel). - This step must be run by the provider. The result is a sidecar ticket with - an offer to lease a sidecar channel for the recipient. The offer will be - signed with the provider's lnd node public key. The ticket returned by this - call will have the state "offered". - */ - rpc OfferSidecar (OfferSidecarRequest) returns (SidecarTicket); - - /* pool: `sidecar register` - RegisterSidecarRequest is step 2/4 of the sidecar negotiation between the - provider (the trader submitting the bid order) and the recipient (the trader - receiving the sidecar channel). - This step must be run by the recipient. The result is a sidecar ticket with - the recipient's node information and channel funding multisig pubkey filled - in. The ticket returned by this call will have the state "registered". - */ - rpc RegisterSidecar (RegisterSidecarRequest) returns (SidecarTicket); - - /* pool: `sidecar expectchannel` - ExpectSidecarChannel is step 4/4 of the sidecar negotiation between the - provider (the trader submitting the bid order) and the recipient (the trader - receiving the sidecar channel). - This step must be run by the recipient once the provider has submitted the - bid order for the sidecar channel. From this point onwards the Pool trader - daemon of both the provider as well as the recipient need to be online to - receive and react to match making events from the server. - */ - rpc ExpectSidecarChannel (ExpectSidecarChannelRequest) - returns (ExpectSidecarChannelResponse); - - /* pool: `sidecar printticket` - Decodes the base58 encoded sidecar ticket into its individual data fields - for a more human-readable representation. - */ - rpc DecodeSidecarTicket (SidecarTicket) returns (DecodedSidecarTicket); - - /* pool: `sidecar list` - ListSidecars lists all sidecar tickets currently in the local database. This - includes tickets offered by our node as well as tickets that our node is the - recipient of. Optionally a ticket ID can be provided to filter the tickets. - */ - rpc ListSidecars (ListSidecarsRequest) returns (ListSidecarsResponse); - - /* pool: `sidecar cancel` - CancelSidecar cancels the execution of a specific sidecar ticket. Depending - on the state of the sidecar ticket its associated bid order might be - canceled as well (if this ticket was offered by our node). - */ - rpc CancelSidecar (CancelSidecarRequest) returns (CancelSidecarResponse); -} - -message InitAccountRequest { - uint64 account_value = 1; - - oneof account_expiry { - uint32 absolute_height = 2; - uint32 relative_height = 3; - } - - oneof fees { - /* - The target number of blocks that the transaction should be confirmed in. - */ - uint32 conf_target = 4; - - /* - The fee rate, in satoshis per kw, to use for the initial funding - transaction. - */ - uint64 fee_rate_sat_per_kw = 6; - } - - /* - An optional identification string that will be appended to the user agent - string sent to the server to give information about the usage of pool. This - initiator part is meant for user interfaces to add their name to give the - full picture of the binary used (poold, LiT) and the method used for opening - the account (pool CLI, LiT UI, other 3rd party UI). - */ - string initiator = 5; -} - -message QuoteAccountRequest { - uint64 account_value = 1; - - oneof fees { - /* - The target number of blocks that the transaction should be confirmed in. - */ - uint32 conf_target = 2; - - // TODO(guggero): Add sat_per_vbyte as soon as lnd has a parameter for - // that in rpcServer.EstimateFee. - } -} - -message QuoteAccountResponse { - uint64 miner_fee_rate_sat_per_kw = 1; - - uint64 miner_fee_total = 2; -} - -message ListAccountsRequest { - /* - Only list accounts that are still active. - */ - bool active_only = 1; -} -message ListAccountsResponse { - repeated Account accounts = 1; -} - -message Output { - // The value, in satoshis, of the output. - uint64 value_sat = 1; - - // The address corresponding to the output. - string address = 2; -} - -message OutputWithFee { - // The address corresponding to the output. - string address = 1; - - oneof fees { - /* - The target number of blocks that the transaction should be confirmed in. - */ - uint32 conf_target = 2; - - /* - The fee rate, in satoshis per kw, to use for the withdrawal transaction. - */ - uint64 fee_rate_sat_per_kw = 3; - } -} - -message OutputsWithImplicitFee { - repeated Output outputs = 1; -} - -message CloseAccountRequest { - // The trader key associated with the account that will be closed. - bytes trader_key = 1; - - oneof funds_destination { - /* - A single output/address to which the remaining funds of the account will - be sent to at the specified fee. If an address is not specified, then - the funds are sent to an address the backing lnd node controls. - */ - OutputWithFee output_with_fee = 2; - - /* - The outputs to which the remaining funds of the account will be sent to. - This should only be used when wanting to create two or more outputs, - otherwise OutputWithFee should be used instead. The fee of the account's - closing transaction is implicitly defined by the combined value of all - outputs. - */ - OutputsWithImplicitFee outputs = 3; - } -} -message CloseAccountResponse { - // The hash of the closing transaction. - bytes close_txid = 1; -} - -message WithdrawAccountRequest { - /* - The trader key associated with the account that funds will be withdrawed - from. - */ - bytes trader_key = 1; - - // The outputs we'll withdraw funds from the account into. - repeated Output outputs = 2; - - /* - The fee rate, in satoshis per kw, to use for the withdrawal transaction. - */ - uint64 fee_rate_sat_per_kw = 3; - - oneof account_expiry { - // The new absolute expiration height of the account. - uint32 absolute_expiry = 4; - - // The new relative expiration height of the account. - uint32 relative_expiry = 5; - } -} -message WithdrawAccountResponse { - // The state of the account after processing the withdrawal. - Account account = 1; - - // The transaction used to withdraw funds from the account. - bytes withdraw_txid = 2; -} - -message DepositAccountRequest { - /* - The trader key associated with the account that funds will be deposited - into. - */ - bytes trader_key = 1; - - // The amount in satoshis to deposit into the account. - uint64 amount_sat = 2; - - /* - The fee rate, in satoshis per kw, to use for the deposit transaction. - */ - uint64 fee_rate_sat_per_kw = 3; - - oneof account_expiry { - // The new absolute expiration height of the account. - uint32 absolute_expiry = 4; - - // The new relative expiration height of the account. - uint32 relative_expiry = 5; - } -} -message DepositAccountResponse { - // The state of the account after processing the deposit. - Account account = 1; - - // The transaction used to deposit funds into the account. - bytes deposit_txid = 2; -} - -message RenewAccountRequest { - // The key associated with the account to renew. - bytes account_key = 1; - - oneof account_expiry { - // The new absolute expiration height of the account. - uint32 absolute_expiry = 2; - - // The new relative expiration height of the account. - uint32 relative_expiry = 3; - } - - // The fee rate, in satoshis per kw, to use for the renewal transaction. - uint64 fee_rate_sat_per_kw = 4; -} -message RenewAccountResponse { - // The state of the account after processing the renewal. - Account account = 1; - - // The transaction used to renew the expiration of the account. - bytes renewal_txid = 2; -} - -message BumpAccountFeeRequest { - /* - The trader key associated with the account that will have its fee bumped. - */ - bytes trader_key = 1; - - /* - The new fee rate, in satoshis per kw, to use for the child of the account - transaction. - */ - uint64 fee_rate_sat_per_kw = 2; -} -message BumpAccountFeeResponse { -} - -enum AccountState { - // The state of an account when it is pending its confirmation on-chain. - PENDING_OPEN = 0; - - /* - The state of an account when it has undergone an update on-chain either as - part of a matched order or a trader modification and it is pending its - confirmation on-chain. - */ - PENDING_UPDATE = 1; - - // The state of an account once it has confirmed on-chain. - OPEN = 2; - - /* - The state of an account once its expiration has been reached and its closing - transaction has confirmed. - */ - EXPIRED = 3; - - /* - The state of an account when we're waiting for the closing transaction of - an account to confirm that required cooperation with the auctioneer. - */ - PENDING_CLOSED = 4; - - // The state of an account once its closing transaction has confirmed. - CLOSED = 5; - - /* - The state of an account that indicates that the account was attempted to be - recovered but failed because the opening transaction wasn't found by lnd. - This could be because it was never published or it never confirmed. Then the - funds are SAFU and the account can be considered to never have been opened - in the first place. - */ - RECOVERY_FAILED = 6; - - /* - The account has recently participated in a batch and is not yet confirmed. - */ - PENDING_BATCH = 7; -} - -message Account { - /* - The identifying component of an account. This is the key used for the trader - in the 2-of-2 multi-sig construction of an account with an auctioneer. - */ - bytes trader_key = 1; - - /* - The current outpoint associated with the account. This will change every - time the account has been updated. - */ - OutPoint outpoint = 2; - - // The current total amount of satoshis in the account. - uint64 value = 3; - - /* - The amount of satoshis in the account that is available, meaning not - allocated to any oustanding orders. - */ - uint64 available_balance = 4; - - // The height at which the account will expire. - uint32 expiration_height = 5; - - // The current state of the account. - AccountState state = 6; - - // The hash of the account's latest transaction. - bytes latest_txid = 7; -} - -message SubmitOrderRequest { - oneof details { - Ask ask = 1; - Bid bid = 2; - } - - /* - An optional identification string that will be appended to the user agent - string sent to the server to give information about the usage of pool. This - initiator part is meant for user interfaces to add their name to give the - full picture of the binary used (poold, LiT) and the method used for - submitting the order (pool CLI, LiT UI, other 3rd party UI). - */ - string initiator = 3; -} -message SubmitOrderResponse { - oneof details { - /* - Order failed with the given reason. - */ - InvalidOrder invalid_order = 1; - - /* - The order nonce of the accepted order. - */ - bytes accepted_order_nonce = 2; - } - - /* - In case a bid order was submitted for a sidecar ticket, that ticket is - updated with the new state and bid order nonce. - */ - string updated_sidecar_ticket = 3; -} - -message ListOrdersRequest { - /* - Can be set to true to list the orders including all events, which can be - very verbose. - */ - bool verbose = 1; - - /* - Only list orders that are still active. - */ - bool active_only = 2; -} -message ListOrdersResponse { - repeated Ask asks = 1; - repeated Bid bids = 2; -} - -message CancelOrderRequest { - bytes order_nonce = 1; -} -message CancelOrderResponse { -} - -message Order { - /* - The trader's account key of the account that is used for the order. - */ - bytes trader_key = 1; - - /* - Fixed order rate in parts per billion. - */ - uint32 rate_fixed = 2; - - /* - Order amount in satoshis. - */ - uint64 amt = 3; - - /* - Maximum fee rate the trader is willing to pay for the batch transaction, - expressed in satoshis per 1000 weight units (sat/KW). - */ - uint64 max_batch_fee_rate_sat_per_kw = 4; - - /* - Order nonce, acts as unique order identifier. - */ - bytes order_nonce = 5; - - /* - The state the order currently is in. - */ - OrderState state = 6; - - /* - The number of order units the amount corresponds to. - */ - uint32 units = 7; - - /* - The number of currently unfilled units of this order. This will be equal to - the total amount of units until the order has reached the state PARTIAL_FILL - or EXECUTED. - */ - uint32 units_unfulfilled = 8; - - // The value reserved from the account by this order to ensure the account - // can pay execution and chain fees in case it gets matched. - uint64 reserved_value_sat = 9; - - // The unix timestamp in nanoseconds the order was first created/submitted. - uint64 creation_timestamp_ns = 10; - - /* - A list of events that were emitted for this order. This field is only set - when the verbose flag is set to true in the request. - */ - repeated OrderEvent events = 11; - - // The minimum number of order units that must be matched per order pair. - uint32 min_units_match = 12; - - // The channel type to use for the resulting matched channels. - OrderChannelType channel_type = 13; - - // List of nodes that will be allowed to match with our order. Incompatible - // with the `not_allowed_node_ids` field. - repeated bytes allowed_node_ids = 14; - - // List of nodes that won't be allowed to match with our order. Incompatible - // with the `allowed_node_ids` field. - repeated bytes not_allowed_node_ids = 15; -} - -message Bid { - /* - The common fields shared between both ask and bid order types. - */ - Order details = 1; - - /* - Required number of blocks that a channel opened as a result of this bid - should be kept open. - */ - uint32 lease_duration_blocks = 2; - - /* - The version of the order format that is used. Will be increased once new - features are added. - */ - uint32 version = 3; - - /* - The minimum node tier this order should be matched with. Only asks backed by - a node this tier or higher will be eligible for matching with this bid. - */ - NodeTier min_node_tier = 4; - - /* - Give the incoming channel that results from this bid being matched an - initial outbound balance by adding additional funds from the taker's account - into the channel. As a simplification for the execution protocol and the - channel reserve calculations, the self_chan_balance can be at most the same - as the order amount and the min_chan_amt must be set to the full order - amount. - */ - uint64 self_chan_balance = 5; - - /* - If this bid order is meant to lease a channel for another node (which is - dubbed a "sidecar channel") then this ticket contains all information - required for setting up that sidecar channel. The ticket is expected to be - the base58 encoded ticket, including the prefix and the checksum. - */ - string sidecar_ticket = 6; -} - -message Ask { - /* - The common fields shared between both ask and bid order types. - */ - Order details = 1; - - /* - The number of blocks the liquidity provider is willing to provide the - channel funds for. - */ - uint32 lease_duration_blocks = 2; - - /* - The version of the order format that is used. Will be increased once new - features are added. - */ - uint32 version = 3; -} - -message QuoteOrderRequest { - /* - Order amount in satoshis. - */ - uint64 amt = 1; - - /* - Fixed order rate in parts per billion. - */ - uint32 rate_fixed = 2; - - /* - Required number of blocks that a channel opened as a result of this bid - should be kept open. - */ - uint32 lease_duration_blocks = 3; - - /* - Maximum fee rate the trader is willing to pay for the batch transaction, - expressed in satoshis per 1000 weight units (sat/KW). - */ - uint64 max_batch_fee_rate_sat_per_kw = 4; - - // The minimum number of order units that must be matched per order pair. - uint32 min_units_match = 5; -} -message QuoteOrderResponse { - /* - The total order premium in satoshis for filling the entire order. This - represents the interest amount paid to the maker by the taker excluding any - execution or chain fees. - */ - uint64 total_premium_sat = 1; - - /* - The fixed order rate expressed as a fraction instead of parts per billion. - */ - double rate_per_block = 2; - - /* - The fixed order rate expressed as a percentage instead of parts per billion. - */ - double rate_percent = 3; - - /* - The total execution fee in satoshis that needs to be paid to the auctioneer - for executing the entire order. - */ - uint64 total_execution_fee_sat = 4; - - /* - The worst case chain fees that need to be paid if fee rates spike up to the - max_batch_fee_rate_sat_per_kw value specified in the request. This value is - highly dependent on the min_units_match parameter as well since the - calculation assumes chain fees for the chain footprint of opening - amt/min_units_match channels (hence worst case calculation). - */ - uint64 worst_case_chain_fee_sat = 5; -} - -message OrderEvent { - /* - The unix timestamp in nanoseconds the event was emitted at. This is the - primary key of the event and is unique across the database. - */ - int64 timestamp_ns = 1; - - // The human readable representation of the event. - string event_str = 2; - - oneof event { - // The order was updated in the database. - UpdatedEvent state_change = 3; - - // The order was involved in a match making attempt. - MatchEvent matched = 4; - } -} - -message UpdatedEvent { - /* - The state of the order previous to the change. This is what the state - changed from. - */ - OrderState previous_state = 1; - - /* - The new state of the order after the change. This is what the state changed - to. - */ - OrderState new_state = 2; - - // The units that were filled at the time of the event. - uint32 units_filled = 3; -} - -message MatchEvent { - // The state of the match making process the order went through. - MatchState match_state = 1; - - // The number of units that would be (or were) filled with this match. - uint32 units_filled = 2; - - // The nonce of the order we were matched to. - bytes matched_order = 3; - - /* - The reason why the trader daemon rejected the order. Is only set if - match_state is set to REJECTED. - */ - MatchRejectReason reject_reason = 4; -} - -enum MatchState { - /* - The OrderMatchPrepare message from the auctioneer was received initially. - */ - PREPARE = 0; - - /* - The OrderMatchPrepare message from the auctioneer was processed successfully - and the batch was accepted. - */ - ACCEPTED = 1; - - /* - The order was rejected by the trader daemon, either as an answer to a - OrderMatchSignBegin or OrderMatchFinalize message from the auctioneer. - */ - REJECTED = 2; - - /* - The OrderMatchSignBegin message from the auctioneer was processed - successfully. - */ - SIGNED = 3; - - /* - The OrderMatchFinalize message from the auctioneer was processed - successfully. - */ - FINALIZED = 4; -} - -enum MatchRejectReason { - // No reject occurred, this is the default value. - NONE = 0; - - /* - The client didn't come up with the same result as the server and is - rejecting the batch because of that. - */ - SERVER_MISBEHAVIOR = 1; - - /* - The client doesn't support the current batch verification version the - server is using. - */ - BATCH_VERSION_MISMATCH = 2; - - /* - The client rejects some of the orders, not the full batch. This reason is - set on matches for orders that were in the same batch as partial reject ones - but were not themselves rejected. - */ - PARTIAL_REJECT_COLLATERAL = 3; - - /* - The trader's client has a preference to only match orders with peers it - doesn't already have channels with. The order that is rejected with this - reason type comes from a peer that the trader already has channels with. - */ - PARTIAL_REJECT_DUPLICATE_PEER = 4; - - /* - The trader's client couldn't connect to the remote node of the matched - order or the channel funding could not be initialized for another - reason. This could also be the rejecting node's fault if their - connection is not stable. Using this code can have a negative impact on - the reputation score of both nodes, depending on the number of errors - recorded. - */ - PARTIAL_REJECT_CHANNEL_FUNDING_FAILED = 5; -} - -message RecoverAccountsRequest { - /* - Recover the latest account states without interacting with the - Lightning Labs server. - */ - bool full_client = 1; - - /* - Number of accounts that we are trying to recover. Used during the - full_client recovery process. - */ - uint32 account_target = 2; - - /* - Auctioneer's public key. Used during the full_client recovery process. - This field should be left empty for testnet/mainnet, its value is already - hardcoded in our codebase. - */ - string auctioneer_key = 3; - - /* - Initial block height. We won't try to look for any account with an expiry - height smaller than this value. Used during the full_client recovery - process. - */ - uint32 height_hint = 4; - - // bitcoind/btcd instance address. Used during the full_client recovery - // process. - string bitcoin_host = 5; - - // bitcoind/btcd user name. Used during the full_client recovery - // process. - string bitcoin_user = 6; - - // bitcoind/btcd password. Used during the full_client recovery - // process. - string bitcoin_password = 7; - - // Use HTTP POST mode? bitcoind only supports this mode. Used during the - // full_client recovery process. - bool bitcoin_httppostmode = 8; - - // Use TLS to connect? bitcoind only supports non-TLS connections. Used - // during the full_client recovery process. - bool bitcoin_usetls = 9; - - // Path to btcd's TLS certificate, if TLS is enabled. Used during the - // full_client recovery process. - string bitcoin_tlspath = 10; -} - -message RecoverAccountsResponse { - // The number of accounts that were recovered. - uint32 num_recovered_accounts = 1; -} - -message AuctionFeeRequest { -} - -message AuctionFeeResponse { - /* - The execution fee charged per matched order. - */ - ExecutionFee execution_fee = 1; -} - -message Lease { - // The outpoint of the channel created. - OutPoint channel_point = 1; - - // The amount, in satoshis, of the channel created. - uint64 channel_amt_sat = 2; - - // The intended duration, in blocks, of the channel created. - uint32 channel_duration_blocks = 3; - - // The absolute height that this channel lease expires. - uint32 channel_lease_expiry = 4; - - /* - The premium, in satoshis, either paid or received for the offered liquidity. - */ - uint64 premium_sat = 5; - - /* - The execution fee, in satoshis, charged by the auctioneer for the channel - created. - */ - uint64 execution_fee_sat = 6; - - /* - The fee, in satoshis, charged by the auctioneer for the batch execution - transaction that created this lease. - */ - uint64 chain_fee_sat = 7; - - /* - The actual fixed rate expressed in parts per billionth this lease was - bought/sold at. - */ - uint64 clearing_rate_price = 8; - - /* - The actual fixed rate of the bid/ask, this should always be 'better' than - the clearing_rate_price. - */ - uint64 order_fixed_rate = 9; - - // The order executed that resulted in the channel created. - bytes order_nonce = 10; - - /* - The unique identifier for the order that was matched with that resulted - in the channel created. - */ - bytes matched_order_nonce = 16; - - // Whether this channel was purchased from another trader or not. - bool purchased = 11; - - // The pubkey of the node that this channel was bought/sold from. - bytes channel_remote_node_key = 12; - - // The tier of the node that this channel was bought/sold from. - NodeTier channel_node_tier = 13; - - // The self channel balance that was pushed to the recipient. - uint64 self_chan_balance = 14; - - // Whether the channel was leased as a sidecar channel (bid orders only). - bool sidecar_channel = 15; -} - -message LeasesRequest { - /* - An optional list of batches to retrieve the leases of. If empty, leases - throughout all batches are returned. - */ - repeated bytes batch_ids = 1; - - /* - An optional list of accounts to retrieve the leases of. If empty, leases - for all accounts are returned. - */ - repeated bytes accounts = 2; -} - -message LeasesResponse { - // The relevant list of leases purchased or sold within the auction. - repeated Lease leases = 1; - - // The total amount of satoshis earned from the leases returned. - uint64 total_amt_earned_sat = 2; - - // The total amount of satoshis paid for the leases returned. - uint64 total_amt_paid_sat = 3; -} - -message TokensRequest { -} - -message TokensResponse { - /** - List of all tokens the daemon knows of, including old/expired tokens. - */ - repeated LsatToken tokens = 1; -} - -message LsatToken { - /** - The base macaroon that was baked by the auth server. - */ - bytes base_macaroon = 1; - - /** - The payment hash of the payment that was paid to obtain the token. - */ - bytes payment_hash = 2; - - /** - The preimage of the payment hash, knowledge of this is proof that the - payment has been paid. If the preimage is set to all zeros, this means the - payment is still pending and the token is not yet fully valid. - */ - bytes payment_preimage = 3; - - /** - The amount of millisatoshis that was paid to get the token. - */ - int64 amount_paid_msat = 4; - - /** - The amount of millisatoshis paid in routing fee to pay for the token. - */ - int64 routing_fee_paid_msat = 5; - - /** - The creation time of the token as UNIX timestamp in seconds. - */ - int64 time_created = 6; - - /** - Indicates whether the token is expired or still valid. - */ - bool expired = 7; - - /** - Identifying attribute of this token in the store. Currently represents the - file name of the token where it's stored on the file system. - */ - string storage_name = 8; -} - -message LeaseDurationRequest { -} - -message LeaseDurationResponse { - /* - Deprecated, use lease_duration_buckets. - */ - map lease_durations = 1 [deprecated = true]; - - /* - The set of lease durations the market is currently accepting and the state - the duration buckets currently are in. - */ - map lease_duration_buckets = 2; -} - -message NextBatchInfoRequest { -} - -message NextBatchInfoResponse { - /* - The confirmation target the auctioneer will use for fee estimation of the - next batch. - */ - uint32 conf_target = 5; - - /* - The fee rate, in satoshis per kiloweight, estimated by the auctioneer to use - for the next batch. - */ - uint64 fee_rate_sat_per_kw = 6; - - /* - The absolute unix timestamp in seconds at which the auctioneer will attempt - to clear the next batch. - */ - uint64 clear_timestamp = 7; - - /* - The value used by the auctioneer to determine if an account expiry height - needs to be extended after participating in a batch and for how long. - */ - uint32 auto_renew_extension_blocks = 8; -} - -message NodeRatingRequest { - // The target node to obtain ratings information for. - repeated bytes node_pubkeys = 1; -} - -message NodeRatingResponse { - // A series of node ratings for each of the queried nodes. - repeated NodeRating node_ratings = 1; -} - -message GetInfoRequest { -} - -message GetInfoResponse { - // The version of the Pool daemon that is running. - string version = 1; - - // The total number of accounts in the local database. - uint32 accounts_total = 2; - - /* - The total number of accounts that are in an active, non-archived state, - including expired accounts. - */ - uint32 accounts_active = 3; - - // The total number of accounts that are active but have expired. - uint32 accounts_active_expired = 4; - - // The total number of accounts that are in an archived/closed state. - uint32 accounts_archived = 5; - - // The total number of orders in the local database. - uint32 orders_total = 6; - - /* - The total number of active/pending orders that are still waiting for - execution. - */ - uint32 orders_active = 7; - - // The total number of orders that have been archived. - uint32 orders_archived = 8; - - // The current block height as seen by the connected lnd node. - uint32 current_block_height = 9; - - // The number of batches an account of this node was ever involved in. - uint32 batches_involved = 10; - - // Our lnd node's rating as judged by the auctioneer server. - NodeRating node_rating = 11; - - // The number of available LSAT tokens. - uint32 lsat_tokens = 12; - - /* - Indicates whether there is an active subscription connection to the - auctioneer. This will never be true if there is no active account. If there - are active accounts, this value represents the network connection status to - the auctioneer server. - */ - bool subscribed_to_auctioneer = 13; - - /* - Indicates whether the global `--newnodesonly` command line flag or - `newnodesonly=true` configuration parameter was set on the Pool trader - daemon. - */ - bool new_nodes_only = 14; - - /* - A map of all markets identified by their lease duration and the current - set of statistics such as number of open orders and total units of open - interest. - */ - map market_info = 15; -} - -message StopDaemonRequest { -} - -message StopDaemonResponse { -} - -message OfferSidecarRequest { - /* - If false, then only the trader_key, unit, self_chan_balance, and - lease_duration_blocks need to be set in the bid below. Otherwise, the - fields as they're set when submitting a bid need to be filled in. - */ - bool auto_negotiate = 1; - - /* - The bid template that will be used to populate the initial sidecar ticket - as well as auto negotiate the remainig steps of the sidecar channel if - needed. - */ - Bid bid = 2; -} - -message SidecarTicket { - /* - The complete sidecar ticket in its string encoded form which is base58 - encoded, has a human readable prefix ('sidecar...') and a checksum built in. - The string encoded version will only be used on the trader side of the API. - All requests to the auctioneer expect the ticket to be in its raw, tlv - encoded byte form. - */ - string ticket = 1; -} - -message DecodedSidecarTicket { - // The unique, pseudorandom identifier of the ticket. - bytes id = 1; - - // The version of the ticket encoding format. - uint32 version = 2; - - // The state of the ticket. - string state = 3; - - // The offered channel capacity in satoshis. - uint64 offer_capacity = 4; - - // The offered push amount in satoshis. - uint64 offer_push_amount = 5; - - // The offered lease duration in blocks. - uint32 offer_lease_duration_blocks = 6; - - // The public key the offer was signed with. - bytes offer_sign_pubkey = 7; - - // The signature over the offer's digest. - bytes offer_signature = 8; - - // Whether the offer was created with the automatic order creation flag. - bool offer_auto = 9; - - // The recipient node's public identity key. - bytes recipient_node_pubkey = 10; - - /* - The recipient node's channel multisig public key to be used for the sidecar - channel. - */ - bytes recipient_multisig_pubkey = 11; - - // The index used when deriving the above multisig pubkey. - uint32 recipient_multisig_pubkey_index = 12; - - // The nonce of the bid order created for this sidecar ticket. - bytes order_bid_nonce = 13; - - /* - The signature over the order's digest, signed with the private key that - corresponds to the offer_sign_pubkey. - */ - bytes order_signature = 14; - - // The pending channel ID of the sidecar channel during the execution phase. - bytes execution_pending_channel_id = 15; - - // The original, base58 encoded ticket. - string encoded_ticket = 16; -} - -message RegisterSidecarRequest { - /* - The sidecar ticket to register and add the node and channel funding - information to. The ticket must be in the state "offered". - */ - string ticket = 1; - - /* - If this value is True, then the daemon will attempt to finish negotiating - the details of the sidecar channel automatically in the background. The - progress of the ticket can be monitored using the SidecarState RPC. In - addition, if this flag is set, then this method will _block_ until the - sidecar negotiation either finishes or breaks down. - */ - bool auto_negotiate = 2; -} - -message ExpectSidecarChannelRequest { - /* - The sidecar ticket to expect an incoming channel for. The ticket must be in - the state "ordered". - */ - string ticket = 1; -} - -message ExpectSidecarChannelResponse { -} - -message ListSidecarsRequest { - /* - The optional sidecar ID to filter for. If set, the result should either be - a single ticket or no ticket in most cases. But because the ID is just 8 - bytes and is randomly generated, there could be collisions, especially since - tickets can also be crafted by a malicious party and given to any node. - That's why the offer's public key is also used as an identifying element - since that cannot easily be forged without also producing a valid signature. - So an attacker cannot overwrite a ticket a node offered by themselves - offering a ticket with the same ID and tricking the victim into registering - that. Long story sort, there could be multiple tickets with the same ID but - different offer public keys, which is why those keys should be checked as - well. - */ - bytes sidecar_id = 1; -} - -message ListSidecarsResponse { - repeated DecodedSidecarTicket tickets = 1; -} - -message CancelSidecarRequest { - bytes sidecar_id = 1; -} - -message CancelSidecarResponse { -} diff --git a/scripts/generate_types.sh b/scripts/generate_types.sh deleted file mode 100644 index 97dc092..0000000 --- a/scripts/generate_types.sh +++ /dev/null @@ -1,185 +0,0 @@ -#!/bin/bash -x -# Generate typescript definitions and service definitions from proto file - -set -e - -LND_RELEASE_TAG=$1 -LOOP_RELEASE_TAG=$2 -POOL_RELEASE_TAG=$3 -FARADAY_RELEASE_TAG=$4 -PROTOC_VERSION=$5 - -echo "LND release tag:" $LND_RELEASE_TAG -echo "Loop release tag:" $LOOP_RELEASE_TAG -echo "Pool release tag:" $POOL_RELEASE_TAG -echo "Faraday release tag:" $FARADAY_RELEASE_TAG -echo "Protoc version:" $PROTOC_VERSION - -GENERATED_TYPES_DIR=lib/types/proto -if [ -d "$GENERATED_TYPES_DIR" ] -then - rm -rf "$GENERATED_TYPES_DIR" -fi -mkdir -p "$GENERATED_TYPES_DIR" - -# Download and install protoc -unameOut="$(uname -s)" -case "${unameOut}" in - Linux*) platform=Linux;; - Darwin*) platform=Mac;; - *) platform="UNKNOWN:${unameOut}" -esac - -mkdir -p protoc -if [[ $platform == 'Linux' ]]; then - PROTOC_URL="https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" -elif [[ $platform == 'Mac' ]]; then - PROTOC_URL="https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-osx-x86_64.zip" -else - echo "Cannot download protoc. ${platform} is not currently supported by ts-protoc-gen" - exit 1 -fi - -curl -L ${PROTOC_URL} -o "protoc-${PROTOC_VERSION}.zip" -unzip "protoc-${PROTOC_VERSION}.zip" -d protoc -rm "protoc-${PROTOC_VERSION}.zip" - -TS_PROTO_OPTIONS="\ - --ts_proto_opt=esModuleInterop=true \ - --ts_proto_opt=onlyTypes=true \ - --ts_proto_opt=stringEnums=true \ - --ts_proto_opt=forceLong=string \ - --ts_proto_opt=lowerCaseServiceMethods=true \ - --ts_proto_opt=exportCommonSymbols=false \ -" - -# Run protoc -echo "LND: running protoc..." -mkdir -p "$GENERATED_TYPES_DIR/lnd" -protoc/bin/protoc \ - --proto_path=protos/lnd/${LND_RELEASE_TAG} \ - --plugin=./node_modules/.bin/protoc-gen-ts_proto \ - --ts_proto_out=$GENERATED_TYPES_DIR/lnd \ - $TS_PROTO_OPTIONS \ - lightning.proto \ - walletunlocker.proto \ - autopilotrpc/autopilot.proto \ - chainrpc/chainnotifier.proto \ - invoicesrpc/invoices.proto \ - routerrpc/router.proto \ - signrpc/signer.proto \ - walletrpc/walletkit.proto \ - watchtowerrpc/watchtower.proto \ - wtclientrpc/wtclient.proto - - -echo "LOOP: running protoc..." -mkdir -p "$GENERATED_TYPES_DIR/loop" -protoc/bin/protoc \ - --proto_path=protos/loop/${LOOP_RELEASE_TAG} \ - --plugin=./node_modules/.bin/protoc-gen-ts_proto \ - --ts_proto_out=$GENERATED_TYPES_DIR/loop \ - $TS_PROTO_OPTIONS \ - client.proto \ - debug.proto \ - swapserverrpc/common.proto - -echo "POOL: running protoc..." -mkdir -p "$GENERATED_TYPES_DIR/pool" -protoc/bin/protoc \ - --proto_path=protos/pool/${POOL_RELEASE_TAG} \ - --plugin=./node_modules/.bin/protoc-gen-ts_proto \ - --ts_proto_out=$GENERATED_TYPES_DIR/pool \ - $TS_PROTO_OPTIONS \ - trader.proto \ - auctioneerrpc/auctioneer.proto \ - auctioneerrpc/hashmail.proto - -echo "FARADY: running protoc..." -mkdir -p "$GENERATED_TYPES_DIR/faraday" -protoc/bin/protoc \ - --proto_path=protos/faraday/${FARADAY_RELEASE_TAG} \ - --plugin=./node_modules/.bin/protoc-gen-ts_proto \ - --ts_proto_out=$GENERATED_TYPES_DIR/faraday \ - $TS_PROTO_OPTIONS \ - faraday.proto - -# Temporarily generate schema files in order to provide metadata -# about the services and subscription methods to the api classes -SCHEMA_DIR=lib/types/schema -if [ -d "$SCHEMA_DIR" ] -then - rm -rf "$SCHEMA_DIR" -fi -mkdir -p "$SCHEMA_DIR" - -SCHEMA_PROTO_OPTIONS="\ - --ts_proto_opt=esModuleInterop=true \ - --ts_proto_opt=outputEncodeMethods=false \ - --ts_proto_opt=outputClientImpl=false \ - --ts_proto_opt=outputServices=generic-definitions \ -" - -echo "LND: generating schema..." -mkdir -p "$SCHEMA_DIR/lnd" -protoc/bin/protoc \ - --proto_path=protos/lnd/${LND_RELEASE_TAG} \ - --plugin=./node_modules/.bin/protoc-gen-ts_proto \ - --ts_proto_out=$SCHEMA_DIR/lnd \ - $SCHEMA_PROTO_OPTIONS \ - lightning.proto \ - walletunlocker.proto \ - autopilotrpc/autopilot.proto \ - chainrpc/chainnotifier.proto \ - invoicesrpc/invoices.proto \ - routerrpc/router.proto \ - signrpc/signer.proto \ - walletrpc/walletkit.proto \ - watchtowerrpc/watchtower.proto \ - wtclientrpc/wtclient.proto - -echo "LOOP: generating schema..." -mkdir -p "$SCHEMA_DIR/loop" -protoc/bin/protoc \ - --proto_path=protos/loop/${LOOP_RELEASE_TAG} \ - --plugin=./node_modules/.bin/protoc-gen-ts_proto \ - --ts_proto_out=$SCHEMA_DIR/loop \ - $SCHEMA_PROTO_OPTIONS \ - client.proto \ - debug.proto \ - swapserverrpc/common.proto - -echo "POOL: generating schema..." -mkdir -p "$SCHEMA_DIR/pool" -protoc/bin/protoc \ - --proto_path=protos/pool/${POOL_RELEASE_TAG} \ - --plugin=./node_modules/.bin/protoc-gen-ts_proto \ - --ts_proto_out=$SCHEMA_DIR/pool \ - $SCHEMA_PROTO_OPTIONS \ - trader.proto \ - auctioneerrpc/auctioneer.proto \ - auctioneerrpc/hashmail.proto - -echo "FARADY: generating schema..." -mkdir -p "$SCHEMA_DIR/faraday" -protoc/bin/protoc \ - --proto_path=protos/faraday/${FARADAY_RELEASE_TAG} \ - --plugin=./node_modules/.bin/protoc-gen-ts_proto \ - --ts_proto_out=$SCHEMA_DIR/faraday \ - $SCHEMA_PROTO_OPTIONS \ - faraday.proto - -# Cleanup proto directory/files -rm -rf *.proto protoc - -# Perform a bit of post-processing on the generated code -echo "Perform post-processing on the generated code..." -ts-node scripts/process_types.ts - -# Format the generated files with prettier -echo "Formatting generated code with prettier..." -prettier --check --write --loglevel=error 'lib/types/proto/**' - -# Cleanup schema directory/files -echo "Deleting schema files..." -rm -rf "$SCHEMA_DIR" diff --git a/scripts/process_types.ts b/scripts/process_types.ts deleted file mode 100644 index b7d7076..0000000 --- a/scripts/process_types.ts +++ /dev/null @@ -1,183 +0,0 @@ -import fs from 'fs'; -import glob from 'glob'; -import os from 'os'; -import path from 'path'; -import readline from 'readline'; - -const deepPartialCode = ` -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - `; - -/** - * This function performs some necessary modifications to the - * generated TS files to make them compatible with the - * actual JS request & response objects of the WASM client - */ - -const typesDir = 'lib/types/proto'; -const files = glob.sync(`${typesDir}/**/*.ts`); -files.forEach((file, i) => { - const tempFile = `${typesDir}/temp-${i}.d.ts`; - - const reader = readline.createInterface({ - input: fs.createReadStream(file) - }); - const writer = fs.createWriteStream(tempFile, { - flags: 'a' - }); - - reader.on('line', (line) => { - // remove this import since its usage is replaced below - if (line === "import { Observable } from 'rxjs';") return; - - let newLine = line; - - // replace Observable return value with onMessage & onError callbacks - // before: monitor(request: MonitorRequest): Observable; - // after: monitor(request: MonitorRequest, onMessage: (res: SwapStatus) => void, onError: (e: Error) => void): void; - let match = newLine.match(/\): Observable<(.*)>/); - if (match) { - const replaceWith = `, onMessage?: (msg: ${match[1]}) => void, onError?: (err: Error) => void): void`; - newLine = newLine.replace(match[0], replaceWith); - } - - // remove Observable around request values since JS doesn't support client streaming - // before: sendToRoute(request: Observable) - // after: sendToRoute(request: SendToRouteRequest) - match = newLine.match(/request: Observable<(\w*)>/); - if (match) { - const replaceWith = `request: ${match[1]}`; - newLine = newLine.replace(match[0], replaceWith); - } - - // wrap all request types with DeepPartial<> so that all fields are optional - // before: request: GetInfoRequest - // after: request: DeepPartial - match = newLine.match(/request: (\w+)(\)|,|$)/); - if (match) { - const replaceWith = `request?: DeepPartial<${match[1]}>${match[2]}`; - newLine = newLine.replace(match[0], replaceWith); - } - - // replace "Uint8Array" type with "Uint8Array | string" because the WASM doesn't properly - // parse the Uint8Array objects when converted to JSON - match = newLine.match(/: Uint8Array/); - if (match) { - const replaceWith = `: Uint8Array | string`; - newLine = newLine.replace(match[0], replaceWith); - } - - writer.write(newLine); - writer.write(os.EOL); - }); - - reader.on('close', () => { - // inject the DeepPartial type manually because we would need to include - // a bunch of JS code in order to have it injected by the ts-proto plugin - writer.write(deepPartialCode); - writer.end(); - - fs.renameSync(tempFile, file); - }); -}); - -/** - * Reads the schema files in order to extract which methods are server streaming. - * We do this in order to generate the streaming.ts file which is used to determine - * if the Proxy should call 'request' or 'subscribe'. The only other solution - * would be to either hard-code the subscription methods, which increases the - * maintenance burden on updates, or to generate JS code which increases the - * bundle size. This build-time approach which only includes a small additional - * file felt like a worthy trade-off. - */ -const services: Record> = {}; -const subscriptionMethods: string[] = []; -const pkgFiles: Record = {}; - -const schemaDir = 'lib/types/schema'; -const schemaFiles = glob.sync(`${schemaDir}/**/*.ts`); -schemaFiles.forEach((file) => { - // get all of the exports from the generated file - const imports = require(`../${file}`); - // find the service definition export name (ex: SwapClientDefinition) - const definitionName = Object.keys(imports).find((i) => - i.endsWith('Definition') - ); - if (!definitionName) return; - // get a reference to the actual definition object - const serviceDef = imports[definitionName]; - - // add the package name to the services object - const pkgName = imports.protobufPackage; - if (!services[pkgName]) services[pkgName] = {}; - services[pkgName][serviceDef.name] = serviceDef.fullName; - - // add the package file to the pkgFiles object - if (!pkgFiles[pkgName]) pkgFiles[pkgName] = []; - pkgFiles[pkgName].push(file.replace(schemaDir, '')); - - // extract subscription methods into the array - Object.values(serviceDef.methods).forEach((m: any) => { - if (m.responseStream) { - subscriptionMethods.push(`${serviceDef.fullName}.${m.name}`); - } - }); -}); - -// create the schema.ts file -const schemaContent = ` - // This file is auto-generated by the 'process_types.ts' script - - // Collection of service names to avoid having to use magic strings for - // the RPC services. If anything gets renamed in the protos, it'll - // produce a compiler error - export const serviceNames = ${JSON.stringify(services)}; - - // This array contains the list of methods that are server streaming. It is - // used to determine if the Proxy should call 'request' or 'subscribe'. The - // only other solution would be to either hard-code the subscription methods, - // which increases the maintenance burden on updates, or to have protoc generate JS code - // which increases the bundle size. This build-time approach which only - // includes a small additional file appears to be worthy trade-off - export const subscriptionMethods = ${JSON.stringify(subscriptionMethods)}; -`; -fs.writeFileSync(path.join(typesDir, 'schema.ts'), schemaContent); - -const indexExports: string[] = []; -// create a file for each protobuf package (ex: looprpc.ts) which exports all the types -// from each of the generated files in that package -Object.entries(pkgFiles).forEach(([pkgName, paths]) => { - const exportStmts = paths - .map((f) => { - const relPath = f.replace(path.extname(f), ''); - return `export * from '.${relPath}';`; - }) - .join(os.EOL); - const destPath = path.join(typesDir, `${pkgName}.ts`); - fs.writeFileSync(destPath, exportStmts); - - // add a named import for this package to the array - indexExports.push(`import * as ${pkgName} from './${pkgName}';`); -}); - -// create an index.ts file which re-exports all the types from the package files -const pkgNames = Object.keys(pkgFiles); -indexExports.push(`export { ${pkgNames.join(', ')} };`); -fs.writeFileSync(path.join(typesDir, 'index.ts'), indexExports.join(os.EOL)); diff --git a/scripts/update_protos.sh b/scripts/update_protos.sh deleted file mode 100644 index d2d915d..0000000 --- a/scripts/update_protos.sh +++ /dev/null @@ -1,37 +0,0 @@ -LND_RELEASE_TAG=$1 -LOOP_RELEASE_TAG=$2 -POOL_RELEASE_TAG=$3 -FARADAY_RELEASE_TAG=$4 - -echo "LND release tag:" $LND_RELEASE_TAG -echo "Loop release tag:" $LOOP_RELEASE_TAG -echo "Pool release tag:" $POOL_RELEASE_TAG -echo "Faraday release tag:" $FARADAY_RELEASE_TAG - -# RPC Servers -LND_URL="https://raw.githubusercontent.com/lightningnetwork/lnd" -LOOP_URL="https://raw.githubusercontent.com/lightninglabs/loop" -POOL_URL="https://raw.githubusercontent.com/lightninglabs/pool" -FARADAY_URL="https://raw.githubusercontent.com/lightninglabs/faraday" - -curl ${LND_URL}/${LND_RELEASE_TAG}/lnrpc/lightning.proto --create-dirs -o protos/lnd/${LND_RELEASE_TAG}/lightning.proto -curl ${LND_URL}/${LND_RELEASE_TAG}/lnrpc/walletunlocker.proto --create-dirs -o protos/lnd/${LND_RELEASE_TAG}/walletunlocker.proto -curl ${LND_URL}/${LND_RELEASE_TAG}/lnrpc/autopilotrpc/autopilot.proto --create-dirs -o protos/lnd/${LND_RELEASE_TAG}/autopilotrpc/autopilot.proto -curl ${LND_URL}/${LND_RELEASE_TAG}/lnrpc/chainrpc/chainnotifier.proto --create-dirs -o protos/lnd/${LND_RELEASE_TAG}/chainrpc/chainnotifier.proto -curl ${LND_URL}/${LND_RELEASE_TAG}/lnrpc/invoicesrpc/invoices.proto --create-dirs -o protos/lnd/${LND_RELEASE_TAG}/invoicesrpc/invoices.proto -curl ${LND_URL}/${LND_RELEASE_TAG}/lnrpc/routerrpc/router.proto --create-dirs -o protos/lnd/${LND_RELEASE_TAG}/routerrpc/router.proto -curl ${LND_URL}/${LND_RELEASE_TAG}/lnrpc/signrpc/signer.proto --create-dirs -o protos/lnd/${LND_RELEASE_TAG}/signrpc/signer.proto -curl ${LND_URL}/${LND_RELEASE_TAG}/lnrpc/walletrpc/walletkit.proto --create-dirs -o protos/lnd/${LND_RELEASE_TAG}/walletrpc/walletkit.proto -curl ${LND_URL}/${LND_RELEASE_TAG}/lnrpc/watchtowerrpc/watchtower.proto --create-dirs -o protos/lnd/${LND_RELEASE_TAG}/watchtowerrpc/watchtower.proto -curl ${LND_URL}/${LND_RELEASE_TAG}/lnrpc/wtclientrpc/wtclient.proto --create-dirs -o protos/lnd/${LND_RELEASE_TAG}/wtclientrpc/wtclient.proto - -curl ${LOOP_URL}/${LOOP_RELEASE_TAG}/looprpc/client.proto --create-dirs -o protos/loop/${LOOP_RELEASE_TAG}/client.proto -curl ${LOOP_URL}/${LOOP_RELEASE_TAG}/looprpc/debug.proto --create-dirs -o protos/loop/${LOOP_RELEASE_TAG}/debug.proto -curl ${LOOP_URL}/${LOOP_RELEASE_TAG}/swapserverrpc/common.proto --create-dirs -o protos/loop/${LOOP_RELEASE_TAG}/swapserverrpc/common.proto -curl ${LOOP_URL}/${LOOP_RELEASE_TAG}/swapserverrpc/server.proto --create-dirs -o protos/loop/${LOOP_RELEASE_TAG}/swapserverrpc/server.proto - -curl ${POOL_URL}/${POOL_RELEASE_TAG}/poolrpc/trader.proto --create-dirs -o protos/pool/${POOL_RELEASE_TAG}/trader.proto -curl ${POOL_URL}/${POOL_RELEASE_TAG}/auctioneerrpc/auctioneer.proto --create-dirs -o protos/pool/${POOL_RELEASE_TAG}/auctioneerrpc/auctioneer.proto -curl ${POOL_URL}/${POOL_RELEASE_TAG}/auctioneerrpc/hashmail.proto --create-dirs -o protos/pool/${POOL_RELEASE_TAG}/auctioneerrpc/hashmail.proto - -curl ${FARADAY_URL}/${FARADAY_RELEASE_TAG}/frdrpc/faraday.proto --create-dirs -o protos/faraday/${FARADAY_RELEASE_TAG}/faraday.proto