lnrpc: explain how to use map types in REST

This commit is contained in:
Oliver Gugger 2020-06-03 17:35:19 +02:00
parent e73c9218d7
commit 1cda467701
No known key found for this signature in database
GPG Key ID: 8E4256593F177720
3 changed files with 32 additions and 0 deletions

@ -12367,6 +12367,11 @@ type LightningClient interface {
// lncli: `estimatefee`
//EstimateFee asks the chain backend to estimate the fee rate and total fees
//for a transaction that pays to multiple specified outputs.
//
//When using REST, the `AddrToAmount` map type can be set by appending
//`&AddrToAmount[<address>]=<amount_to_send>` to the URL. Unfortunately this
//map type doesn't appear in the REST API documentation because of a bug in
//the grpc-gateway library.
EstimateFee(ctx context.Context, in *EstimateFeeRequest, opts ...grpc.CallOption) (*EstimateFeeResponse, error)
// lncli: `sendcoins`
//SendCoins executes a request to send coins to a particular address. Unlike
@ -12590,6 +12595,11 @@ type LightningClient interface {
//satoshis. The returned route contains the full details required to craft and
//send an HTLC, also including the necessary information that should be
//present within the Sphinx packet encapsulated within the HTLC.
//
//When using REST, the `dest_custom_records` map type can be set by appending
//`&dest_custom_records[<record_number>]=<record_data_base64_url_encoded>`
//to the URL. Unfortunately this map type doesn't appear in the REST API
//documentation because of a bug in the grpc-gateway library.
QueryRoutes(ctx context.Context, in *QueryRoutesRequest, opts ...grpc.CallOption) (*QueryRoutesResponse, error)
// lncli: `getnetworkinfo`
//GetNetworkInfo returns some basic stats about the known channel graph from
@ -13448,6 +13458,11 @@ type LightningServer interface {
// lncli: `estimatefee`
//EstimateFee asks the chain backend to estimate the fee rate and total fees
//for a transaction that pays to multiple specified outputs.
//
//When using REST, the `AddrToAmount` map type can be set by appending
//`&AddrToAmount[<address>]=<amount_to_send>` to the URL. Unfortunately this
//map type doesn't appear in the REST API documentation because of a bug in
//the grpc-gateway library.
EstimateFee(context.Context, *EstimateFeeRequest) (*EstimateFeeResponse, error)
// lncli: `sendcoins`
//SendCoins executes a request to send coins to a particular address. Unlike
@ -13671,6 +13686,11 @@ type LightningServer interface {
//satoshis. The returned route contains the full details required to craft and
//send an HTLC, also including the necessary information that should be
//present within the Sphinx packet encapsulated within the HTLC.
//
//When using REST, the `dest_custom_records` map type can be set by appending
//`&dest_custom_records[<record_number>]=<record_data_base64_url_encoded>`
//to the URL. Unfortunately this map type doesn't appear in the REST API
//documentation because of a bug in the grpc-gateway library.
QueryRoutes(context.Context, *QueryRoutesRequest) (*QueryRoutesResponse, error)
// lncli: `getnetworkinfo`
//GetNetworkInfo returns some basic stats about the known channel graph from

@ -46,6 +46,11 @@ service Lightning {
/* lncli: `estimatefee`
EstimateFee asks the chain backend to estimate the fee rate and total fees
for a transaction that pays to multiple specified outputs.
When using REST, the `AddrToAmount` map type can be set by appending
`&AddrToAmount[<address>]=<amount_to_send>` to the URL. Unfortunately this
map type doesn't appear in the REST API documentation because of a bug in
the grpc-gateway library.
*/
rpc EstimateFee (EstimateFeeRequest) returns (EstimateFeeResponse);
@ -355,6 +360,11 @@ service Lightning {
satoshis. The returned route contains the full details required to craft and
send an HTLC, also including the necessary information that should be
present within the Sphinx packet encapsulated within the HTLC.
When using REST, the `dest_custom_records` map type can be set by appending
`&dest_custom_records[<record_number>]=<record_data_base64_url_encoded>`
to the URL. Unfortunately this map type doesn't appear in the REST API
documentation because of a bug in the grpc-gateway library.
*/
rpc QueryRoutes (QueryRoutesRequest) returns (QueryRoutesResponse);

@ -1001,6 +1001,7 @@
"/v1/graph/routes/{pub_key}/{amt}": {
"get": {
"summary": "lncli: `queryroutes`\nQueryRoutes attempts to query the daemon's Channel Router for a possible\nroute to a target destination capable of carrying a specific amount of\nsatoshis. The returned route contains the full details required to craft and\nsend an HTLC, also including the necessary information that should be\npresent within the Sphinx packet encapsulated within the HTLC.",
"description": "When using REST, the `dest_custom_records` map type can be set by appending\n`\u0026dest_custom_records[\u003crecord_number\u003e]=\u003crecord_data_base64_url_encoded\u003e`\nto the URL. Unfortunately this map type doesn't appear in the REST API\ndocumentation because of a bug in the grpc-gateway library.",
"operationId": "QueryRoutes",
"responses": {
"200": {
@ -1854,6 +1855,7 @@
"/v1/transactions/fee": {
"get": {
"summary": "lncli: `estimatefee`\nEstimateFee asks the chain backend to estimate the fee rate and total fees\nfor a transaction that pays to multiple specified outputs.",
"description": "When using REST, the `AddrToAmount` map type can be set by appending\n`\u0026AddrToAmount[\u003caddress\u003e]=\u003camount_to_send\u003e` to the URL. Unfortunately this\nmap type doesn't appear in the REST API documentation because of a bug in\nthe grpc-gateway library.",
"operationId": "EstimateFee",
"responses": {
"200": {