channel rpc
This commit is contained in:
parent
11860d099f
commit
b5bd1a74d9
24 changed files with 35275 additions and 33084 deletions
|
|
@ -101,8 +101,10 @@ service Lightning {
|
|||
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
|
||||
VerifyMessage verifies a signature over a message and recovers the signer's
|
||||
public key. The signature is only deemed valid if the recovered public key
|
||||
corresponds to a node key in the public Lightning network. 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.
|
||||
*/
|
||||
|
|
@ -141,6 +143,13 @@ service Lightning {
|
|||
*/
|
||||
rpc GetInfo (GetInfoRequest) returns (GetInfoResponse);
|
||||
|
||||
/* lncli: 'getdebuginfo'
|
||||
GetDebugInfo returns debug information concerning the state of the daemon
|
||||
and its subsystems. This includes the full configuration and the latest log
|
||||
entries from the log file.
|
||||
*/
|
||||
rpc GetDebugInfo (GetDebugInfoRequest) returns (GetDebugInfoResponse);
|
||||
|
||||
/** lncli: `getrecoveryinfo`
|
||||
GetRecoveryInfo returns information concerning the recovery mode including
|
||||
whether it's in a recovery mode, whether the recovery is finished, and the
|
||||
|
|
@ -320,7 +329,7 @@ service Lightning {
|
|||
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
|
||||
settle_index is specified, then 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.
|
||||
|
|
@ -339,13 +348,13 @@ service Lightning {
|
|||
*/
|
||||
rpc ListPayments (ListPaymentsRequest) returns (ListPaymentsResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `deletepayments`
|
||||
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);
|
||||
|
||||
/*
|
||||
/* lncli: `deletepayments --all`
|
||||
DeleteAllPayments deletes all outgoing payments from DB. Note that it will
|
||||
not attempt to delete In-Flight payments, since that would be unsafe.
|
||||
*/
|
||||
|
|
@ -477,7 +486,7 @@ service Lightning {
|
|||
rpc ExportAllChannelBackups (ChanBackupExportRequest)
|
||||
returns (ChanBackupSnapshot);
|
||||
|
||||
/*
|
||||
/* lncli: `verifychanbackup`
|
||||
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.
|
||||
|
|
@ -567,6 +576,10 @@ service Lightning {
|
|||
/* lncli: `subscribecustom`
|
||||
SubscribeCustomMessages subscribes to a stream of incoming custom peer
|
||||
messages.
|
||||
|
||||
To include messages with type outside of the custom range (>= 32768) lnd
|
||||
needs to be compiled with the `dev` build tag, and the message type to
|
||||
override should be specified in lnd's experimental protocol configuration.
|
||||
*/
|
||||
rpc SubscribeCustomMessages (SubscribeCustomMessagesRequest)
|
||||
returns (stream CustomMessage);
|
||||
|
|
@ -578,18 +591,26 @@ service Lightning {
|
|||
*/
|
||||
rpc ListAliases (ListAliasesRequest) returns (ListAliasesResponse);
|
||||
|
||||
rpc LookupHtlc (LookupHtlcRequest) returns (LookupHtlcResponse);
|
||||
/*
|
||||
LookupHtlcResolution retrieves a final htlc resolution from the database.
|
||||
If the htlc has no final resolution yet, a NotFound grpc status code is
|
||||
returned.
|
||||
*/
|
||||
rpc LookupHtlcResolution (LookupHtlcResolutionRequest)
|
||||
returns (LookupHtlcResolutionResponse);
|
||||
}
|
||||
|
||||
message LookupHtlcRequest {
|
||||
message LookupHtlcResolutionRequest {
|
||||
uint64 chan_id = 1;
|
||||
|
||||
uint64 htlc_index = 2;
|
||||
}
|
||||
|
||||
message LookupHtlcResponse {
|
||||
message LookupHtlcResolutionResponse {
|
||||
// Settled is true is the htlc was settled. If false, the htlc was failed.
|
||||
bool settled = 1;
|
||||
|
||||
// Offchain indicates whether the htlc was resolved off-chain or on-chain.
|
||||
bool offchain = 2;
|
||||
}
|
||||
|
||||
|
|
@ -612,6 +633,9 @@ message SendCustomMessageRequest {
|
|||
bytes peer = 1;
|
||||
|
||||
// Message type. This value needs to be in the custom range (>= 32768).
|
||||
// To send a type < custom range, lnd needs to be compiled with the `dev`
|
||||
// build tag, and the message type to override should be specified in lnd's
|
||||
// experimental protocol configuration.
|
||||
uint32 type = 2;
|
||||
|
||||
// Raw message data.
|
||||
|
|
@ -860,7 +884,8 @@ message SendRequest {
|
|||
repeated FeatureBit dest_features = 15;
|
||||
|
||||
/*
|
||||
The payment address of the generated invoice.
|
||||
The payment address of the generated invoice. This is also called
|
||||
payment secret in specifications (e.g. BOLT 11).
|
||||
*/
|
||||
bytes payment_addr = 16;
|
||||
}
|
||||
|
|
@ -1066,6 +1091,18 @@ message LightningAddress {
|
|||
string host = 2;
|
||||
}
|
||||
|
||||
enum CoinSelectionStrategy {
|
||||
// Use the coin selection strategy defined in the global configuration
|
||||
// (lnd.conf).
|
||||
STRATEGY_USE_GLOBAL_CONFIG = 0;
|
||||
|
||||
// Select the largest available coins first during coin selection.
|
||||
STRATEGY_LARGEST = 1;
|
||||
|
||||
// Randomly select the available coins during coin selection.
|
||||
STRATEGY_RANDOM = 2;
|
||||
}
|
||||
|
||||
message EstimateFeeRequest {
|
||||
// The map from addresses to amounts for the transaction.
|
||||
map<string, int64> AddrToAmount = 1;
|
||||
|
|
@ -1080,6 +1117,9 @@ message EstimateFeeRequest {
|
|||
|
||||
// Whether unconfirmed outputs should be used as inputs for the transaction.
|
||||
bool spend_unconfirmed = 4;
|
||||
|
||||
// The strategy to use for selecting coins during fees estimation.
|
||||
CoinSelectionStrategy coin_selection_strategy = 5;
|
||||
}
|
||||
|
||||
message EstimateFeeResponse {
|
||||
|
|
@ -1120,6 +1160,9 @@ message SendManyRequest {
|
|||
|
||||
// Whether unconfirmed outputs should be used as inputs for the transaction.
|
||||
bool spend_unconfirmed = 8;
|
||||
|
||||
// The strategy to use for selecting coins during sending many requests.
|
||||
CoinSelectionStrategy coin_selection_strategy = 9;
|
||||
}
|
||||
message SendManyResponse {
|
||||
// The id of the transaction
|
||||
|
|
@ -1147,9 +1190,8 @@ message SendCoinsRequest {
|
|||
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.
|
||||
If set, the amount field should be unset. It indicates lnd will send all
|
||||
wallet coins or all selected coins to the specified address.
|
||||
*/
|
||||
bool send_all = 6;
|
||||
|
||||
|
|
@ -1162,6 +1204,12 @@ message SendCoinsRequest {
|
|||
|
||||
// Whether unconfirmed outputs should be used as inputs for the transaction.
|
||||
bool spend_unconfirmed = 9;
|
||||
|
||||
// The strategy to use for selecting coins.
|
||||
CoinSelectionStrategy coin_selection_strategy = 10;
|
||||
|
||||
// A list of selected outpoints as inputs for the transaction.
|
||||
repeated OutPoint outpoints = 11;
|
||||
}
|
||||
message SendCoinsResponse {
|
||||
// The transaction ID of the transaction
|
||||
|
|
@ -1335,6 +1383,13 @@ enum CommitmentType {
|
|||
channel before its maturity date.
|
||||
*/
|
||||
SCRIPT_ENFORCED_LEASE = 4;
|
||||
|
||||
/*
|
||||
A channel that uses musig2 for the funding output, and the new tapscript
|
||||
features where relevant.
|
||||
*/
|
||||
// TODO(roasbeef): need script enforce mirror type for the above as well?
|
||||
SIMPLE_TAPROOT = 5;
|
||||
}
|
||||
|
||||
message ChannelConstraints {
|
||||
|
|
@ -1524,6 +1579,19 @@ message Channel {
|
|||
|
||||
// This is the confirmed / on-chain zero-conf SCID.
|
||||
uint64 zero_conf_confirmed_scid = 33;
|
||||
|
||||
// The configured alias name of our peer.
|
||||
string peer_alias = 34;
|
||||
|
||||
// This is the peer SCID alias.
|
||||
uint64 peer_scid_alias = 35 [jstype = JS_STRING];
|
||||
|
||||
/*
|
||||
An optional note-to-self to go along with the channel containing some
|
||||
useful information. This is only ever stored locally and in no way impacts
|
||||
the channel's operation.
|
||||
*/
|
||||
string memo = 36;
|
||||
}
|
||||
|
||||
message ListChannelsRequest {
|
||||
|
|
@ -1537,6 +1605,11 @@ message ListChannelsRequest {
|
|||
empty, all channels will be returned.
|
||||
*/
|
||||
bytes peer = 5;
|
||||
|
||||
// Informs the server if the peer alias lookup per channel should be
|
||||
// enabled. It is turned off by default in order to avoid degradation of
|
||||
// performance for existing clients.
|
||||
bool peer_alias_lookup = 6;
|
||||
}
|
||||
message ListChannelsResponse {
|
||||
// The list of active channels
|
||||
|
|
@ -1884,12 +1957,16 @@ message GetInfoResponse {
|
|||
/*
|
||||
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
|
||||
/*
|
||||
A list of active chains the node is connected to. This will only
|
||||
ever contain a single entry since LND will only ever have a single
|
||||
chain backend during its lifetime.
|
||||
*/
|
||||
repeated Chain chains = 16;
|
||||
|
||||
// The URIs of the current node.
|
||||
|
|
@ -1905,6 +1982,17 @@ message GetInfoResponse {
|
|||
Indicates whether the HTLC interceptor API is in always-on mode.
|
||||
*/
|
||||
bool require_htlc_interceptor = 21;
|
||||
|
||||
// Indicates whether final htlc resolutions are stored on disk.
|
||||
bool store_final_htlc_resolutions = 22;
|
||||
}
|
||||
|
||||
message GetDebugInfoRequest {
|
||||
}
|
||||
|
||||
message GetDebugInfoResponse {
|
||||
map<string, string> config = 1;
|
||||
repeated string log = 2;
|
||||
}
|
||||
|
||||
message GetRecoveryInfoRequest {
|
||||
|
|
@ -1921,8 +2009,9 @@ message GetRecoveryInfoResponse {
|
|||
}
|
||||
|
||||
message Chain {
|
||||
// The blockchain the node is on (eg bitcoin, litecoin)
|
||||
string chain = 1;
|
||||
// Deprecated. The chain is now always assumed to be bitcoin.
|
||||
// The blockchain the node is on (must be bitcoin)
|
||||
string chain = 1 [deprecated = true];
|
||||
|
||||
// The network the node is on (eg regtest, testnet, mainnet)
|
||||
string network = 2;
|
||||
|
|
@ -1982,12 +2071,18 @@ message CloseChannelRequest {
|
|||
//
|
||||
// NOTE: This field is only respected if we're the initiator of the channel.
|
||||
uint64 max_fee_per_vbyte = 7;
|
||||
|
||||
// If true, then the rpc call will not block while it awaits a closing txid.
|
||||
// Consequently this RPC call will not return a closing txid if this value
|
||||
// is set.
|
||||
bool no_wait = 8;
|
||||
}
|
||||
|
||||
message CloseStatusUpdate {
|
||||
oneof update {
|
||||
PendingUpdate close_pending = 1;
|
||||
ChannelCloseUpdate chan_close = 3;
|
||||
InstantUpdate close_instant = 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1996,6 +2091,9 @@ message PendingUpdate {
|
|||
uint32 output_index = 2;
|
||||
}
|
||||
|
||||
message InstantUpdate {
|
||||
}
|
||||
|
||||
message ReadyForPsbtFunding {
|
||||
/*
|
||||
The P2WSH address of the channel funding multisig address that the below
|
||||
|
|
@ -2040,6 +2138,9 @@ message BatchOpenChannelRequest {
|
|||
|
||||
// An optional label for the batch transaction, limited to 500 characters.
|
||||
string label = 6;
|
||||
|
||||
// The strategy to use for selecting coins during batch opening channels.
|
||||
CoinSelectionStrategy coin_selection_strategy = 7;
|
||||
}
|
||||
|
||||
message BatchOpenChannel {
|
||||
|
|
@ -2090,6 +2191,76 @@ message BatchOpenChannel {
|
|||
the remote peer supports explicit channel negotiation.
|
||||
*/
|
||||
CommitmentType commitment_type = 9;
|
||||
|
||||
/*
|
||||
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 = 10;
|
||||
|
||||
/*
|
||||
The maximum number of concurrent HTLCs we will allow the remote party to add
|
||||
to the commitment transaction.
|
||||
*/
|
||||
uint32 remote_max_htlcs = 11;
|
||||
|
||||
/*
|
||||
Max local csv is the maximum csv delay we will allow for our own commitment
|
||||
transaction.
|
||||
*/
|
||||
uint32 max_local_csv = 12;
|
||||
|
||||
/*
|
||||
If this is true, then a zero-conf channel open will be attempted.
|
||||
*/
|
||||
bool zero_conf = 13;
|
||||
|
||||
/*
|
||||
If this is true, then an option-scid-alias channel-type open will be
|
||||
attempted.
|
||||
*/
|
||||
bool scid_alias = 14;
|
||||
|
||||
/*
|
||||
The base fee charged regardless of the number of milli-satoshis sent.
|
||||
*/
|
||||
uint64 base_fee = 15;
|
||||
|
||||
/*
|
||||
The fee rate in ppm (parts per million) that will be charged in
|
||||
proportion of the value of each forwarded HTLC.
|
||||
*/
|
||||
uint64 fee_rate = 16;
|
||||
|
||||
/*
|
||||
If use_base_fee is true the open channel announcement will update the
|
||||
channel base fee with the value specified in base_fee. In the case of
|
||||
a base_fee of 0 use_base_fee is needed downstream to distinguish whether
|
||||
to use the default base fee value specified in the config or 0.
|
||||
*/
|
||||
bool use_base_fee = 17;
|
||||
|
||||
/*
|
||||
If use_fee_rate is true the open channel announcement will update the
|
||||
channel fee rate with the value specified in fee_rate. In the case of
|
||||
a fee_rate of 0 use_fee_rate is needed downstream to distinguish whether
|
||||
to use the default fee rate value specified in the config or 0.
|
||||
*/
|
||||
bool use_fee_rate = 18;
|
||||
|
||||
/*
|
||||
The number of satoshis we require the remote peer to reserve. This value,
|
||||
if specified, must be above the dust limit and below 20% of the channel
|
||||
capacity.
|
||||
*/
|
||||
uint64 remote_chan_reserve_sat = 19;
|
||||
|
||||
/*
|
||||
An optional note-to-self to go along with the channel containing some
|
||||
useful information. This is only ever stored locally and in no way impacts
|
||||
the channel's operation.
|
||||
*/
|
||||
string memo = 20;
|
||||
}
|
||||
|
||||
message BatchOpenChannelResponse {
|
||||
|
|
@ -2238,6 +2409,25 @@ message OpenChannelRequest {
|
|||
capacity.
|
||||
*/
|
||||
uint64 remote_chan_reserve_sat = 25;
|
||||
|
||||
/*
|
||||
If set, then lnd will attempt to commit all the coins under control of the
|
||||
internal wallet to open the channel, and the LocalFundingAmount field must
|
||||
be zero and is ignored.
|
||||
*/
|
||||
bool fund_max = 26;
|
||||
|
||||
/*
|
||||
An optional note-to-self to go along with the channel containing some
|
||||
useful information. This is only ever stored locally and in no way impacts
|
||||
the channel's operation.
|
||||
*/
|
||||
string memo = 27;
|
||||
|
||||
/*
|
||||
A list of selected outpoints that are allocated for channel funding.
|
||||
*/
|
||||
repeated OutPoint outpoints = 28;
|
||||
}
|
||||
message OpenStatusUpdate {
|
||||
oneof update {
|
||||
|
|
@ -2319,6 +2509,11 @@ message ChanPointShim {
|
|||
the value is less than 500,000, or as an absolute height otherwise.
|
||||
*/
|
||||
uint32 thaw_height = 6;
|
||||
|
||||
/*
|
||||
Indicates that the funding output is using a MuSig2 multi-sig output.
|
||||
*/
|
||||
bool musig2 = 7;
|
||||
}
|
||||
|
||||
message PsbtShim {
|
||||
|
|
@ -2469,6 +2664,9 @@ message PendingHTLC {
|
|||
}
|
||||
|
||||
message PendingChannelsRequest {
|
||||
// Indicates whether to include the raw transaction hex for
|
||||
// waiting_close_channels.
|
||||
bool include_raw_tx = 1;
|
||||
}
|
||||
message PendingChannelsResponse {
|
||||
message PendingChannel {
|
||||
|
|
@ -2504,6 +2702,13 @@ message PendingChannelsResponse {
|
|||
|
||||
// Whether this channel is advertised to the network or not.
|
||||
bool private = 12;
|
||||
|
||||
/*
|
||||
An optional note-to-self to go along with the channel containing some
|
||||
useful information. This is only ever stored locally and in no way
|
||||
impacts the channel's operation.
|
||||
*/
|
||||
string memo = 13;
|
||||
}
|
||||
|
||||
message PendingOpenChannel {
|
||||
|
|
@ -2531,6 +2736,17 @@ message PendingChannelsResponse {
|
|||
|
||||
// Previously used for confirmation_height. Do not reuse.
|
||||
reserved 2;
|
||||
|
||||
// The number of blocks until the funding transaction is considered
|
||||
// expired. If this value gets close to zero, there is a risk that the
|
||||
// channel funding will be canceled by the channel responder. The
|
||||
// channel should be fee bumped using CPFP (see walletrpc.BumpFee) to
|
||||
// ensure that the channel confirms in time. Otherwise a force-close
|
||||
// will be necessary if the channel confirms after the funding
|
||||
// transaction expires. A negative value means the channel responder has
|
||||
// very likely canceled the funding and the channel will never become
|
||||
// fully operational.
|
||||
int32 funding_expiry_blocks = 3;
|
||||
}
|
||||
|
||||
message WaitingCloseChannel {
|
||||
|
|
@ -2548,6 +2764,10 @@ message PendingChannelsResponse {
|
|||
|
||||
// The transaction id of the closing transaction
|
||||
string closing_txid = 4;
|
||||
|
||||
// The raw hex encoded bytes of the closing transaction. Included if
|
||||
// include_raw_tx in the request is true.
|
||||
string closing_tx_hex = 5;
|
||||
}
|
||||
|
||||
message Commitments {
|
||||
|
|
@ -2683,6 +2903,14 @@ message WalletAccountBalance {
|
|||
}
|
||||
|
||||
message WalletBalanceRequest {
|
||||
// The wallet account the balance is shown for.
|
||||
// If this is not specified, the balance of the "default" account is shown.
|
||||
string account = 1;
|
||||
|
||||
// The minimum number of confirmations each one of your outputs used for the
|
||||
// funding transaction must satisfy. If this is not specified, the default
|
||||
// value of 1 is used.
|
||||
int32 min_confs = 2;
|
||||
}
|
||||
|
||||
message WalletBalanceResponse {
|
||||
|
|
@ -2768,6 +2996,9 @@ message QueryRoutesRequest {
|
|||
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.
|
||||
|
||||
Note: must not be set if making a payment to a blinded path (delta is
|
||||
set by the aggregate parameters provided by blinded_payment_paths)
|
||||
*/
|
||||
int32 final_cltv_delta = 4;
|
||||
|
||||
|
|
@ -2841,12 +3072,21 @@ message QueryRoutesRequest {
|
|||
*/
|
||||
repeated lnrpc.RouteHint route_hints = 16;
|
||||
|
||||
/*
|
||||
An optional blinded path(s) to reach the destination. Note that the
|
||||
introduction node must be provided as the first hop in the route.
|
||||
*/
|
||||
repeated BlindedPaymentPath blinded_payment_paths = 19;
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
Note: must not be set if making a payment to a blinded route (features
|
||||
are provided in blinded_payment_paths).
|
||||
*/
|
||||
repeated lnrpc.FeatureBit dest_features = 17;
|
||||
|
||||
|
|
@ -2952,6 +3192,32 @@ message Hop {
|
|||
|
||||
// The payment metadata to send along with the payment to the payee.
|
||||
bytes metadata = 13;
|
||||
|
||||
/*
|
||||
Blinding point is an optional blinding point included for introduction
|
||||
nodes in blinded paths. This field is mandatory for hops that represents
|
||||
the introduction point in a blinded path.
|
||||
*/
|
||||
bytes blinding_point = 14;
|
||||
|
||||
/*
|
||||
Encrypted data is a receiver-produced blob of data that provides hops
|
||||
in a blinded route with forwarding data. As this data is encrypted by
|
||||
the recipient, we will not be able to parse it - it is essentially an
|
||||
arbitrary blob of data from our node's perspective. This field is
|
||||
mandatory for all hops in a blinded path, including the introduction
|
||||
node.
|
||||
*/
|
||||
bytes encrypted_data = 15;
|
||||
|
||||
/*
|
||||
The total amount that is sent to the recipient (possibly across multiple
|
||||
HTLCs), as specified by the sender when making a payment to a blinded path.
|
||||
This value is only set in the final hop payload of a blinded payment. This
|
||||
value is analogous to the MPPRecord that is used for regular (non-blinded)
|
||||
MPP payments.
|
||||
*/
|
||||
uint64 total_amt_msat = 16;
|
||||
}
|
||||
|
||||
message MPPRecord {
|
||||
|
|
@ -2959,7 +3225,8 @@ 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.
|
||||
The same payment_addr must be used on all subpayments. This is also called
|
||||
payment secret in specifications (e.g. BOLT 11).
|
||||
*/
|
||||
bytes payment_addr = 11;
|
||||
|
||||
|
|
@ -3089,6 +3356,9 @@ message RoutingPolicy {
|
|||
|
||||
// Custom channel update tlv records.
|
||||
map<uint64, bytes> custom_records = 8;
|
||||
|
||||
int32 inbound_fee_base_msat = 9;
|
||||
int32 inbound_fee_rate_milli_msat = 10;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -3175,6 +3445,10 @@ message ChanInfoRequest {
|
|||
output index for the channel.
|
||||
*/
|
||||
uint64 chan_id = 1 [jstype = JS_STRING];
|
||||
|
||||
// The channel point of the channel in format funding_txid:output_index. If
|
||||
// chan_id is specified, this field is ignored.
|
||||
string chan_point = 2;
|
||||
}
|
||||
|
||||
message NetworkInfoRequest {
|
||||
|
|
@ -3297,6 +3571,64 @@ message RouteHint {
|
|||
repeated HopHint hop_hints = 1;
|
||||
}
|
||||
|
||||
message BlindedPaymentPath {
|
||||
// The blinded path to send the payment to.
|
||||
BlindedPath blinded_path = 1;
|
||||
|
||||
// The base fee for the blinded path provided, expressed in msat.
|
||||
uint64 base_fee_msat = 2;
|
||||
|
||||
/*
|
||||
The proportional fee for the blinded path provided, expressed in parts
|
||||
per million.
|
||||
*/
|
||||
uint32 proportional_fee_rate = 3;
|
||||
|
||||
/*
|
||||
The total CLTV delta for the blinded path provided, including the
|
||||
final CLTV delta for the receiving node.
|
||||
*/
|
||||
uint32 total_cltv_delta = 4;
|
||||
|
||||
/*
|
||||
The minimum hltc size that may be sent over the blinded path, expressed
|
||||
in msat.
|
||||
*/
|
||||
uint64 htlc_min_msat = 5;
|
||||
|
||||
/*
|
||||
The maximum htlc size that may be sent over the blinded path, expressed
|
||||
in msat.
|
||||
*/
|
||||
uint64 htlc_max_msat = 6;
|
||||
|
||||
// The feature bits for the route.
|
||||
repeated FeatureBit features = 7;
|
||||
}
|
||||
|
||||
message BlindedPath {
|
||||
// The unblinded pubkey of the introduction node for the route.
|
||||
bytes introduction_node = 1;
|
||||
|
||||
// The ephemeral pubkey used by nodes in the blinded route.
|
||||
bytes blinding_point = 2;
|
||||
|
||||
/*
|
||||
A set of blinded node keys and data blobs for the blinded portion of the
|
||||
route. Note that the first hop is expected to be the introduction node,
|
||||
so the route is always expected to have at least one hop.
|
||||
*/
|
||||
repeated BlindedHop blinded_hops = 3;
|
||||
}
|
||||
|
||||
message BlindedHop {
|
||||
// The blinded public key of the node.
|
||||
bytes blinded_node = 1;
|
||||
|
||||
// An encrypted blob of data provided to the blinded node.
|
||||
bytes encrypted_data = 2;
|
||||
}
|
||||
|
||||
message AMPInvoiceState {
|
||||
// The state the HTLCs associated with this setID are in.
|
||||
InvoiceHTLCState state = 1;
|
||||
|
|
@ -3351,7 +3683,7 @@ message Invoice {
|
|||
int64 value_msat = 23;
|
||||
|
||||
/*
|
||||
Whether this invoice has been fulfilled
|
||||
Whether this invoice has been fulfilled.
|
||||
|
||||
The field is deprecated. Use the state field instead (compare to SETTLED).
|
||||
*/
|
||||
|
|
@ -3359,12 +3691,14 @@ message Invoice {
|
|||
|
||||
/*
|
||||
When this invoice was created.
|
||||
Measured in seconds since the unix epoch.
|
||||
Note: Output only, don't specify for creating an invoice.
|
||||
*/
|
||||
int64 creation_date = 7;
|
||||
|
||||
/*
|
||||
When this invoice was settled.
|
||||
Measured in seconds since the unix epoch.
|
||||
Note: Output only, don't specify for creating an invoice.
|
||||
*/
|
||||
int64 settle_date = 8;
|
||||
|
|
@ -3385,7 +3719,7 @@ message Invoice {
|
|||
*/
|
||||
bytes description_hash = 10;
|
||||
|
||||
// Payment request expiry time in seconds. Default is 3600 (1 hour).
|
||||
// Payment request expiry time in seconds. Default is 86400 (24 hours).
|
||||
int64 expiry = 11;
|
||||
|
||||
// Fallback on-chain address.
|
||||
|
|
@ -3401,6 +3735,8 @@ message Invoice {
|
|||
repeated RouteHint route_hints = 14;
|
||||
|
||||
// Whether this invoice should include routing hints for private channels.
|
||||
// Note: When enabled, if value and value_msat are zero, a large number of
|
||||
// hints with these channels can be included, which might not be desirable.
|
||||
bool private = 15;
|
||||
|
||||
/*
|
||||
|
|
@ -3426,22 +3762,22 @@ message Invoice {
|
|||
|
||||
/*
|
||||
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.
|
||||
be set if this invoice has been settled or accepted. 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.
|
||||
ONLY be set if this invoice has been settled or accepted. 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;
|
||||
|
|
@ -3479,9 +3815,10 @@ message 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.
|
||||
The payment address of this invoice. This is also called payment secret in
|
||||
specifications (e.g. BOLT 11). 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;
|
||||
|
|
@ -3501,6 +3838,48 @@ message Invoice {
|
|||
Note: Output only, don't specify for creating an invoice.
|
||||
*/
|
||||
map<string, AMPInvoiceState> amp_invoice_state = 28;
|
||||
|
||||
/*
|
||||
Signals that the invoice should include blinded paths to hide the true
|
||||
identity of the recipient.
|
||||
*/
|
||||
bool is_blinded = 29;
|
||||
|
||||
/*
|
||||
Config values to use when creating blinded paths for this invoice. These
|
||||
can be used to override the defaults config values provided in by the
|
||||
global config. This field is only used if is_blinded is true.
|
||||
*/
|
||||
BlindedPathConfig blinded_path_config = 30;
|
||||
}
|
||||
|
||||
message BlindedPathConfig {
|
||||
/*
|
||||
The minimum number of real hops to include in a blinded path. This doesn't
|
||||
include our node, so if the minimum is 1, then the path will contain at
|
||||
minimum our node along with an introduction node hop. If it is zero then
|
||||
the shortest path will use our node as an introduction node.
|
||||
*/
|
||||
optional uint32 min_num_real_hops = 1;
|
||||
|
||||
/*
|
||||
The number of hops to include in a blinded path. This doesn't include our
|
||||
node, so if it is 1, then the path will contain our node along with an
|
||||
introduction node or dummy node hop. If paths shorter than NumHops is
|
||||
found, then they will be padded using dummy hops.
|
||||
*/
|
||||
optional uint32 num_hops = 2;
|
||||
|
||||
/*
|
||||
The maximum number of blinded paths to select and add to an invoice.
|
||||
*/
|
||||
optional uint32 max_num_paths = 3;
|
||||
|
||||
/*
|
||||
A list of node IDs of nodes that should not be used in any of our generated
|
||||
blinded paths.
|
||||
*/
|
||||
repeated bytes node_omission_list = 4;
|
||||
}
|
||||
|
||||
enum InvoiceHTLCState {
|
||||
|
|
@ -3586,9 +3965,9 @@ message AddInvoiceResponse {
|
|||
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.
|
||||
The payment address of the generated invoice. This is also called
|
||||
payment secret in specifications (e.g. BOLT 11). This value should be used
|
||||
in all payments for this invoice as we require it for end to end security.
|
||||
*/
|
||||
bytes payment_addr = 17;
|
||||
}
|
||||
|
|
@ -3629,7 +4008,16 @@ message ListInvoiceRequest {
|
|||
specified index offset. This can be used to paginate backwards.
|
||||
*/
|
||||
bool reversed = 6;
|
||||
|
||||
// If set, returns all invoices with a creation date greater than or equal
|
||||
// to it. Measured in seconds since the unix epoch.
|
||||
uint64 creation_date_start = 7;
|
||||
|
||||
// If set, returns all invoices with a creation date less than or equal to
|
||||
// it. Measured in seconds since the unix epoch.
|
||||
uint64 creation_date_end = 8;
|
||||
}
|
||||
|
||||
message ListInvoiceResponse {
|
||||
/*
|
||||
A list of invoices from the time slice of the time series specified in the
|
||||
|
|
@ -3700,6 +4088,11 @@ enum PaymentFailureReason {
|
|||
Insufficient local balance.
|
||||
*/
|
||||
FAILURE_REASON_INSUFFICIENT_BALANCE = 5;
|
||||
|
||||
/*
|
||||
The payment was canceled.
|
||||
*/
|
||||
FAILURE_REASON_CANCELED = 6;
|
||||
}
|
||||
|
||||
message Payment {
|
||||
|
|
@ -3730,10 +4123,20 @@ message Payment {
|
|||
string payment_request = 9;
|
||||
|
||||
enum PaymentStatus {
|
||||
UNKNOWN = 0;
|
||||
// Deprecated. This status will never be returned.
|
||||
UNKNOWN = 0 [deprecated = true];
|
||||
|
||||
// Payment has inflight HTLCs.
|
||||
IN_FLIGHT = 1;
|
||||
|
||||
// Payment is settled.
|
||||
SUCCEEDED = 2;
|
||||
|
||||
// Payment is failed.
|
||||
FAILED = 3;
|
||||
|
||||
// Payment is created and has not attempted any HTLCs.
|
||||
INITIATED = 4;
|
||||
}
|
||||
|
||||
// The status of the payment.
|
||||
|
|
@ -3828,6 +4231,14 @@ message ListPaymentsRequest {
|
|||
of payments, as all of them have to be iterated through to be counted.
|
||||
*/
|
||||
bool count_total_payments = 5;
|
||||
|
||||
// If set, returns all payments with a creation date greater than or equal
|
||||
// to it. Measured in seconds since the unix epoch.
|
||||
uint64 creation_date_start = 6;
|
||||
|
||||
// If set, returns all payments with a creation date less than or equal to
|
||||
// it. Measured in seconds since the unix epoch.
|
||||
uint64 creation_date_end = 7;
|
||||
}
|
||||
|
||||
message ListPaymentsResponse {
|
||||
|
|
@ -3873,6 +4284,10 @@ message DeleteAllPaymentsRequest {
|
|||
Only delete failed HTLCs from payments, not the payment itself.
|
||||
*/
|
||||
bool failed_htlcs_only = 2;
|
||||
|
||||
// Delete all payments. NOTE: Using this option requires careful
|
||||
// consideration as it is a destructive operation.
|
||||
bool all_payments = 3;
|
||||
}
|
||||
|
||||
message DeletePaymentResponse {
|
||||
|
|
@ -3923,6 +4338,7 @@ message PayReq {
|
|||
bytes payment_addr = 11;
|
||||
int64 num_msat = 12;
|
||||
map<uint32, Feature> features = 13;
|
||||
repeated BlindedPaymentPath blinded_paths = 14;
|
||||
}
|
||||
|
||||
enum FeatureBit {
|
||||
|
|
@ -3949,6 +4365,8 @@ enum FeatureBit {
|
|||
ANCHORS_OPT = 21;
|
||||
ANCHORS_ZERO_FEE_HTLC_REQ = 22;
|
||||
ANCHORS_ZERO_FEE_HTLC_OPT = 23;
|
||||
ROUTE_BLINDING_REQUIRED = 24;
|
||||
ROUTE_BLINDING_OPTIONAL = 25;
|
||||
AMP_REQ = 30;
|
||||
AMP_OPT = 31;
|
||||
}
|
||||
|
|
@ -3978,7 +4396,15 @@ message ChannelFeeReport {
|
|||
// The effective fee rate in milli-satoshis. Computed by dividing the
|
||||
// fee_per_mil value by 1 million.
|
||||
double fee_rate = 4;
|
||||
|
||||
// The base fee charged regardless of the number of milli-satoshis sent.
|
||||
int32 inbound_base_fee_msat = 6;
|
||||
|
||||
// The amount charged per milli-satoshis transferred expressed in
|
||||
// millionths of a satoshi.
|
||||
int32 inbound_fee_per_mil = 7;
|
||||
}
|
||||
|
||||
message FeeReportResponse {
|
||||
// An array of channel fee reports which describes the current fee schedule
|
||||
// for each channel.
|
||||
|
|
@ -3997,6 +4423,16 @@ message FeeReportResponse {
|
|||
uint64 month_fee_sum = 4;
|
||||
}
|
||||
|
||||
message InboundFee {
|
||||
// The inbound base fee charged regardless of the number of milli-satoshis
|
||||
// received in the channel. By default, only negative values are accepted.
|
||||
int32 base_fee_msat = 1;
|
||||
|
||||
// The effective inbound fee rate in micro-satoshis (parts per million).
|
||||
// By default, only negative values are accepted.
|
||||
int32 fee_rate_ppm = 2;
|
||||
}
|
||||
|
||||
message PolicyUpdateRequest {
|
||||
oneof scope {
|
||||
// If set, then this update applies to all currently active channels.
|
||||
|
|
@ -4029,7 +4465,12 @@ message PolicyUpdateRequest {
|
|||
|
||||
// If true, min_htlc_msat is applied.
|
||||
bool min_htlc_msat_specified = 8;
|
||||
|
||||
// Optional inbound fee. If unset, the previously set value will be
|
||||
// retained [EXPERIMENTAL].
|
||||
InboundFee inbound_fee = 10;
|
||||
}
|
||||
|
||||
enum UpdateFailure {
|
||||
UPDATE_FAILURE_UNKNOWN = 0;
|
||||
UPDATE_FAILURE_PENDING = 1;
|
||||
|
|
@ -4305,6 +4746,7 @@ message Failure {
|
|||
EXPIRY_TOO_FAR = 22;
|
||||
MPP_TIMEOUT = 23;
|
||||
INVALID_ONION_PAYLOAD = 24;
|
||||
INVALID_ONION_BLINDING = 25;
|
||||
|
||||
/*
|
||||
An internal error occurred.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue