Commit Graph

788 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
a011a3f414
lnrpc: add testnet bool to GetInfo RPC, remove lightning_id 2016-12-12 15:56:54 -08:00
Olaoluwa Osuntokun
a92017fe9a
lnrpc: rebuild protos 2016-12-12 15:56:38 -08:00
bryanvu
2bf5794645 lnrpc: added rpc support for querying a channel's satoshis sent/received
Added total_satoshis_sent and total_satoshis_received fields to the
ListChannels RPC call.
2016-11-22 14:57:03 -06:00
Olaoluwa Osuntokun
39262c66d6
lnrpc: add current block height and a 'synced 'bit to GetInfo response 2016-11-14 15:54:53 -08:00
Olaoluwa Osuntokun
df74d8981d
lnrpc: display creation date and settle date for Invoices 2016-11-12 18:09:36 -08:00
Olaoluwa Osuntokun
64396a69c3
lnrpc: add synchronous versions of SendPayment and OpenChannel
This commit adds synchronous version of the RPC’s to send payments over
channels and open new channels. The previous async versions of these
RPC calls have been removed from the REST interface.

Additionally for these two RPC calls any field which accepted byte
slices now also accept a variant of the field which is a hex-encoded
string.

The OpenChannelSync RPC is intended to be used along with either the
ListChannels or PendingChannels RPC to poll for a channels existence or
non-existence as a signal that the channel is finally open.
2016-11-10 17:33:34 -08:00
Olaoluwa Osuntokun
de1a3e1436
lnrpc: convert all instances of lightning_id to regular compressed pubkeys
This commit modifies a few of the RPC call which previously took a
lightning_id as their paramter to instead take a compressed public key
field. With this change must of the code within the daemon can be
simplified as we only use public keys everywhere throuhgout the daemon.

Signed-off-by: Olaoluwa Osuntokun <laolu32@gmail.com>
2016-10-27 19:41:51 -07:00
Olaoluwa Osuntokun
bde47f6ebb
lnrpc: returns the node's pubkey instead of lighting_id in ListPeers 2016-10-26 14:31:48 -07:00
Olaoluwa Osuntokun
566cd86a1d
lnrpc: add cursory REST support to the RPC server
This commit adds a REST interface to the existing gRPC server by
employing a simple http proxy auto-generated from the existing protobuf
files. Currently full-support for any streaming RPC’s are currently
untested. In addition to auto-generating a REST proxy server, a
swagger.json is also generated which allows for gRPC-like native
objects with higher-level clients, and also for auto-generated
documentation.

Due to limitations with accepting raw byte strings as parameters, some
RPC’s have been modified to take both raw-bytes and string arguments.
Additionally a new RPC has been added ‘NewWitnessAddress’ since the
proxy doesn’t currently support enum-based arguments.

Currently the proxy server is embedded within the daemon as an active
HTTP server, however we may want to package the proxy server as a
separate binary in the future. Similarly, we may want to add additional
configuration information which controls the optional inclusion of the
REST proxy.

Atm, just like the current gRPC interface, the REST API is fully
unauthenticated. Before moving to an initial alpha release after making
the necessary changes to meet the spec drafted in Milan, authentication
of the RPC interfaces will be addressed.
2016-10-15 14:39:00 -07:00
Olaoluwa Osuntokun
68c4f0432e
lnrpc: split off channel info from ListPeers into new ListChannels RPC
This commit extracts the channel information that was previously
returned within the ListPeers command to a new RPC command:
ListChannels. Additionally, any pending HTLC’s within the open channel
are also displayed.
2016-09-25 20:02:47 -07:00
Olaoluwa Osuntokun
6ff11ba65c
lnrpc: include the settled bit when listing and looking up invoices 2016-09-23 15:06:32 -07:00
Olaoluwa Osuntokun
071a6a54de
lnrpc: add the raw identity pub key to the GetInfo RPC 2016-09-21 19:48:39 -07:00
Olaoluwa Osuntokun
39e6217860
lnrpc: add new invoice related RPC commands 2016-09-21 19:48:18 -07:00
andrew.shvv
2788dbeaa8 Add RPC to show current total available channel capacity #29 (#35)
This commit adds a new RPC command: `channelbalance` which returns the
sum of all available channel capacity across all open channels. The
total balance is currently returned in units of `satoshis`. Additionally
the `networkHarness` has been modified slightly to allow specifying the
additional "extra" command line parameters when creating the initial
seed nodes. Minor refactoring within the integration tests has been
undertaken in order to increase code re-use across tests.

Closes #29.
2016-09-15 12:00:56 -07:00
Olaoluwa Osuntokun
7aaa46d7ff
lnrpc: change the target_node field in OpenChannelRequest to a byte array 2016-09-13 15:34:18 -07:00
Olaoluwa Osuntokun
a9f0caff87
lnrpc: rename AllowForceClose field in CloseChannelRequest 2016-09-12 19:07:27 -07:00
BitfuryLightning
2bcff188e8 lncli: Add graphical output of routing table
LIGHT-131, LIGHT-140, LIGHT-138
`lncli showroutingtable` may output routing table as image.
Use graphviz for graph rendering.
Add explicit version dependency for tools. Add error checking.
2016-09-06 20:06:51 -04:00
BitfuryLightning
b5f07ede46 lncli: Make output of lncli sane and readable
LIGHT-133, LIGHT-138 Make output of `lncli showrouting table` in
two different formats: table and json.
Instead of sending serialized routing table send list of channels.
2016-09-06 20:01:21 -04:00
Olaoluwa Osuntokun
d548e56069
lnrpc: OpenChannel and CloseChannel now return "status updates"
This commit modifies the prior protos to make the open/close channel
RPC commands return the “union” status update rather than a concrete
item of that union directly. With this change, RPC clients can now
receive status updates of the current state of the opening or closing
channel.
2016-08-30 16:42:34 -07:00
Olaoluwa Osuntokun
61ba20dfc1
lnrpc: recompile protos to add routing table cmd's 2016-08-11 11:31:21 -07:00
BitfuryLightning
f8c851769f multi: initial integration of routing module
This commit integrates BitFury's current routing functionality into lnd. The
primary ochestration point for the routing sub-system in the routingMgr. The
routingMgr manages all persistent and volatile state related to routing within
the network.

Newly opened channels, either when the initiator or responder are inserted into
the routing table once the channel is fully open. Once new links are inserted
the routingMgr can then perform path selection in order to locate an "optimal"
path to a target destination.
2016-08-11 11:20:27 -07:00
Olaoluwa Osuntokun
32e5de301d
lnrpc: recompile generated files after updating to latest proto compiler
Soon we’ll be using dependency management/pinning to avoid having to
continually do this dance…
2016-07-14 16:16:19 -07:00
Olaoluwa Osuntokun
09f6ecef1f
lnrpc: add bi-directional streaming SendPayment RPC 2016-07-12 17:36:40 -07:00
Olaoluwa Osuntokun
dd9acfdd4d
lnrpc: add pendingchannels RPC call, regenerate protos 2016-07-07 15:24:58 -07:00
Olaoluwa Osuntokun
c7f49e19aa
lnrpc: make close/open channel into streaming RPC calls 2016-07-07 15:24:39 -07:00
Olaoluwa Osuntokun
630561326c
lnrpc: add initial basic getinfo RPC 2016-07-05 18:52:13 -07:00
Olaoluwa Osuntokun
6e5fb13a0d
lnrpc: add new SendCoins RPC to service
This commit adds a new RPC to the RPC server: “sendcoins”. This RPC is
identical to “sendmany” with one small change: the level of send
parallelization is 1. This is useful when one wishes to simply send
coins to a friend and/or a payment.
2016-06-29 11:28:23 -07:00
Olaoluwa Osuntokun
2ea21422b5
lnrpc: make remote_id and channel_point strings in ActiveChannel 2016-06-22 22:06:42 -07:00
Olaoluwa Osuntokun
cf32b07f61
lnrpc: recompile protobufs to new RPC spec 2016-06-21 13:14:10 -07:00
Olaoluwa Osuntokun
1188fd2bf6
lnd: implement open+close channel workflow in daemon
This commit adds the necessary plumbing within the server, peer, and
rpcServer to handle opening and cooperatively closing a channel with a
remote peer.

Many new data structures have been added to the peer in order to allow
it to efficiently manage opening+.losing new/existing lightning
channels. Additional documentation has been added to several methods
within the peer struct, with some minor renaming along with way. The
peer has also gained a dedicated goroutine whose job it is to manage
any requests pertaining to opening, or closing any channels with the
remote peer.

The messages have been added to lnrpc define the requests and responses
to channel open+close messages. Additional channel logic has been added
between the rpcServer, peer, and server in order to properly manage the
necessary synchronization.
2016-06-21 13:14:05 -07:00
Olaoluwa Osuntokun
9ef7e23384
lnd: implement connectpeer and listpeers RPC calls 2016-06-21 13:14:01 -07:00
Olaoluwa Osuntokun
c7e9bb8c58
lnrpc: implement wallet balance RPC call 2016-06-21 13:13:57 -07:00
Olaoluwa Osuntokun
bba8770bb4 lnrpc: add address type param to NewAddress
The new available address types are: regular p2pkh, p2wkh, and finally
p2wkh nested within p2sh. The latter address type will initially be
used to allow users to “fund” the lnd wallet.
2016-04-24 20:26:32 -07:00
Olaoluwa Osuntokun
2b047ff56c lnrpc: update golang proto compiler
The newest version has changed the generated gRPC source files a bit.
If you’re running the _newset_ version of gRPC against the previously
generated code, you’ll get a compile error.

This commit fixes the above behavior.
2016-04-24 12:38:47 -07:00
Olaoluwa Osuntokun
4366b1b114 lnrpc: remote Listen/Chat, re-compile proto file 2016-01-16 19:27:02 -08:00
Olaoluwa Osuntokun
40ff68a541 lnrpc: re-build proto files 2016-01-14 23:55:45 -08:00
Tadge Dryja
8a50faaf47 add functions to rpc.proto, start lnshell 2016-01-14 23:55:45 -08:00
Tadge Dryja
31f3df2183 add gitignore, cli shell 2015-12-30 16:19:09 -04:00