Skip to content

Commit

Permalink
Merge pull request #78 from RadarTech/cf-lnd-v0.11.1-beta
Browse files Browse the repository at this point in the history
Add Support for LND v0.11.1-beta
cavanmflynn authored Oct 7, 2020
2 parents 76474c8 + f168f59 commit 17a2c7b
Showing 17 changed files with 2,454 additions and 1,630 deletions.
Original file line number Diff line number Diff line change
@@ -8,25 +8,25 @@ option go_package = "github.com/lightningnetwork/lnd/lnrpc/autopilotrpc";
// 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.
*/
@@ -37,12 +37,12 @@ message StatusRequest {
}

message StatusResponse {
/// Indicates whether the autopilot is active or not.
// Indicates whether the autopilot is active or not.
bool active = 1;
}

message ModifyStatusRequest {
/// Whether the autopilot agent should be enabled or not.
// Whether the autopilot agent should be enabled or not.
bool enable = 1;
}

@@ -52,7 +52,7 @@ message ModifyStatusResponse {
message QueryScoresRequest {
repeated string pubkeys = 1;

/// If set, we will ignore the local channel state when calculating scores.
// If set, we will ignore the local channel state when calculating scores.
bool ignore_local_state = 2;
}

@@ -66,10 +66,10 @@ message QueryScoresResponse {
}

message SetScoresRequest {
/// The name of the heuristic to provide scores to.
// 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].
*/
Original file line number Diff line number Diff line change
@@ -2,6 +2,44 @@ syntax = "proto3";

package 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 client can specify whether the confirmation request should be for a
particular transaction by its hash or for an output script by specifying a
zero hash.
*/
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
@@ -140,39 +178,3 @@ message BlockEpoch {
// The height of the block.
uint32 height = 2;
}

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 client can specify whether the confirmation request should be for a
particular transaction by its hash or for an output script by specifying a
zero hash.
*/
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);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
syntax = "proto3";


import "rpc.proto";

package invoicesrpc;
@@ -10,95 +9,95 @@ 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);
}

message CancelInvoiceMsg {
/// Hash corresponding to the (hold) invoice to cancel.
// Hash corresponding to the (hold) invoice to cancel.
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
// 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).
// Payment request expiry time in seconds. Default is 3600 (1 hour).
int64 expiry = 5;

/// Fallback on-chain address.
// Fallback on-chain address.
string fallback_addr = 6;

/// Delta to use for the time-lock of the CLTV extended to the final hop.
// 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.
// 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.
@@ -107,8 +106,8 @@ message AddHoldInvoiceResp {
}

message SettleInvoiceMsg {
/// Externally discovered pre-image that should be used to settle the hold
/// invoice.
// Externally discovered pre-image that should be used to settle the hold
// invoice.
bytes preimage = 1;
}

@@ -118,6 +117,6 @@ message SettleInvoiceResp {
message SubscribeSingleInvoiceRequest {
reserved 1;

/// Hash corresponding to the (hold) invoice to subscribe to.
// Hash corresponding to the (hold) invoice to subscribe to.
bytes r_hash = 2;
}
Loading

0 comments on commit 17a2c7b

Please sign in to comment.