diff options
| author | Adam Soltys <[email protected]> | 2020-08-03 21:38:29 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-08-03 21:38:29 -0700 |
| commit | 2bcd5e9cd2233934b6d78724a07172b187ceb0b0 (patch) | |
| tree | dba0c6451c1fa962dda1c3aa848abaa36d7012ab /config | |
| parent | 1f44dadfb24913d9a6835f3b18340ede580e886a (diff) | |
| download | coinos-server-2bcd5e9cd2233934b6d78724a07172b187ceb0b0.tar.gz coinos-server-2bcd5e9cd2233934b6d78724a07172b187ceb0b0.zip | |
user urls
Diffstat (limited to 'config')
| -rw-r--r-- | config/rpc.proto | 170 |
1 files changed, 158 insertions, 12 deletions
diff --git a/config/rpc.proto b/config/rpc.proto index f69b768f..ee5504d7 100644 --- a/config/rpc.proto +++ b/config/rpc.proto @@ -140,6 +140,14 @@ service Lightning { */ 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 @@ -985,6 +993,30 @@ enum CommitmentType { UNKNOWN_COMMITMENT_TYPE = 999; } +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; @@ -1057,10 +1089,11 @@ message Channel { repeated HTLC pending_htlcs = 15; /* - 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. 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; + uint32 csv_delay = 16 [deprecated = true]; // Whether this channel is advertised to the network or not. bool private = 17; @@ -1071,13 +1104,15 @@ message Channel { // A set of flags showing the current state of the channel. string chan_status_flags = 19; - // The minimum satoshis this node is required to reserve in its balance. - int64 local_chan_reserve_sat = 20; + // Deprecated. The minimum satoshis this node is required to reserve in its + // balance. + int64 local_chan_reserve_sat = 20 [deprecated = true]; /* - The minimum satoshis the other node is required to reserve in its balance. + Deprecated. The minimum satoshis the other node is required to reserve in + its balance. */ - int64 remote_chan_reserve_sat = 21; + int64 remote_chan_reserve_sat = 21 [deprecated = true]; // Deprecated. Use commitment_type. bool static_remote_key = 22 [deprecated = true]; @@ -1122,9 +1157,17 @@ message Channel { 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. + 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; } message ListChannelsRequest { @@ -1206,6 +1249,79 @@ message ChannelCloseSummary { force closes, although only one party's close will be confirmed on chain. */ Initiator close_initiator = 12; + + repeated Resolution resolutions = 13; +} + +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 { @@ -1381,6 +1497,19 @@ message GetInfoResponse { map<uint32, Feature> features = 19; } +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; @@ -1537,6 +1666,12 @@ message OpenChannelRequest { 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; } message OpenStatusUpdate { oneof update { @@ -1611,10 +1746,11 @@ message ChanPointShim { 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. + 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; } @@ -1632,6 +1768,16 @@ message PsbtShim { 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 { |
