diff --git a/build.gradle b/build.gradle index 09696f79d..a4dbe0703 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ group 'org.lightningj' -version '0.4-Beta' +version '0.4.1-Beta' apply plugin: "groovy" apply plugin: 'com.google.protobuf' diff --git a/docs/index.adoc b/docs/index.adoc index 3a1717ae5..55212908b 100644 --- a/docs/index.adoc +++ b/docs/index.adoc @@ -36,11 +36,12 @@ to the license agreement can be found link:LICENSE.txt[here]. == Whats New -* 0.4-Beta : API generated from LDN rpc.proto for LND 0.4-Beta tag. Also check out +* 0.4.1-Beta : Generated API from LND 0.4.1 Beta release. +* 0.4-Beta : API generated from LDN rpc.proto for LND 0.4-Beta tag. Also check out the new grails plugin as link:http://grails.lightningj.org[] -* 0.3-Beta : Z-Base32 encoder/decoder, updated API to support new Wallet Seed generation. -* 0.2-Beta : Added support for Macaroons authentication. -* 0.1-Beta : This is the initial release with generated APIs (Synchronous and Asynchronous) for +* 0.3-Beta : Z-Base32 encoder/decoder, updated API to support new Wallet Seed generation. +* 0.2-Beta : Added support for Macaroons authentication. +* 0.1-Beta : This is the initial release with generated APIs (Synchronous and Asynchronous) for LND. === Roadmap diff --git a/src/main/proto/lightning.api.proto b/src/main/proto/lightning.api.proto index 089d0151e..e18d69444 100644 --- a/src/main/proto/lightning.api.proto +++ b/src/main/proto/lightning.api.proto @@ -1,7 +1,7 @@ /** * This file is fetched from https://github.com/lightningnetwork/lnd/blob/master/lnrpc/rpc.proto * And is distributed under LNDs MIT License. - * LND 0.4-Beta tag : Downloaded 2018-03-16 + * LND 0.4.1-Beta tag : Downloaded 2018-04-03 */ syntax = "proto3"; @@ -10,6 +10,7 @@ import "google/api/annotations.proto"; package lnrpc; option java_package = "org.lightningj.lnd.proto"; + /** * Comments in this file will be directly parsed into the API * Documentation as descriptions of the associated method, message, or field. @@ -750,7 +751,7 @@ message HTLC { uint32 expiration_height = 4 [json_name = "expiration_height"]; } -message ActiveChannel { +message Channel { /// Whether this channel is active or not bool active = 1 [json_name = "active"]; @@ -789,7 +790,7 @@ message ActiveChannel { int64 commit_fee = 8 [json_name = "commit_fee"]; /// The weight of the commitment transaction - int64 commit_weight = 9 [ json_name = "commit_weight" ]; + int64 commit_weight = 9 [json_name = "commit_weight"]; /** The required number of satoshis per kilo-weight that the requester will pay @@ -826,14 +827,21 @@ message ActiveChannel { closed, we'll need to wait for this many blocks before we can regain our funds. */ - uint32 csv_delay = 16 [ json_name = "csv_delay" ]; + uint32 csv_delay = 16 [json_name = "csv_delay"]; + + /// Whether this channel is advertised to the network or not + bool private = 17 [json_name = "private"]; } message ListChannelsRequest { + bool active_only = 1; + bool inactive_only = 2; + bool public_only = 3; + bool private_only = 4; } message ListChannelsResponse { /// The list of active channels - repeated ActiveChannel channels = 11 [json_name = "channels"]; + repeated Channel channels = 11 [json_name = "channels"]; } message Peer { @@ -972,10 +980,10 @@ message OpenChannelRequest { /// The number of satoshis to push to the remote side as part of the initial commitment state int64 push_sat = 5 [json_name = "push_sat"]; - /// The target number of blocks that the closure transaction should be confirmed by. + /// The target number of blocks that the funding transaction should be confirmed by. int32 target_conf = 6; - /// A manual fee rate set in sat/byte that should be used when crafting the closure transaction. + /// A manual fee rate set in sat/byte that should be used when crafting the funding transaction. int64 sat_per_byte = 7; /// Whether this channel should be private, not announced to the greater network. @@ -983,6 +991,9 @@ message OpenChannelRequest { /// The minimum value in millisatoshi we will require for incoming HTLCs on the channel. int64 min_htlc_msat = 9 [json_name = "min_htlc_msat"]; + + /// 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 [json_name = "remote_csv_delay"]; } message OpenStatusUpdate { oneof update { diff --git a/src/test/groovy/org/lightningj/lnd/wrapper/MessageSpec.groovy b/src/test/groovy/org/lightningj/lnd/wrapper/MessageSpec.groovy index 27095a156..ca34f2d5e 100644 --- a/src/test/groovy/org/lightningj/lnd/wrapper/MessageSpec.groovy +++ b/src/test/groovy/org/lightningj/lnd/wrapper/MessageSpec.groovy @@ -58,7 +58,7 @@ class MessageSpec extends Specification { def "Verify that toJsonAsString returns json in string format"(){ expect: - genOpenChannelRequest().toJsonAsString(false) == '{"node_pubkey":"","node_pubkey_string":"02ad1fddad0c572ec3e886cbea31bbafa30b5f7e745da7e936ed9d1471116cdc02","local_funding_amount":40000,"push_sat":25000,"targetConf":0,"satPerByte":0,"private":false,"min_htlc_msat":0}' + genOpenChannelRequest().toJsonAsString(false) == '{"node_pubkey":"","node_pubkey_string":"02ad1fddad0c572ec3e886cbea31bbafa30b5f7e745da7e936ed9d1471116cdc02","local_funding_amount":40000,"push_sat":25000,"targetConf":0,"satPerByte":0,"private":false,"min_htlc_msat":0,"remote_csv_delay":0}' genOpenChannelRequest().toJsonAsString(true) == """ { "node_pubkey": "", @@ -68,7 +68,8 @@ class MessageSpec extends Specification { "targetConf": 0, "satPerByte": 0, "private": false, - "min_htlc_msat": 0 + "min_htlc_msat": 0, + "remote_csv_delay": 0 }""" } @@ -97,7 +98,8 @@ class MessageSpec extends Specification { "targetConf": 0, "satPerByte": 0, "private": false, - "min_htlc_msat": 0 + "min_htlc_msat": 0, + "remote_csv_delay": 0 }""" }