myLightning
REST API specification for the myLightning web wallet. [Work In Progress!!!]
Version: 1.0.0
BasePath:/rest/v1
Apache 2.0
http://www.apache.org/licenses/LICENSE-2.0.html
Access
- APIKey KeyParamName:connect.sid KeyInQuery:false KeyInHeader:true
- APIKey KeyParamName:_csrf KeyInQuery:true KeyInHeader:false
[ Jump to Models ]
Table of Contents
Closes a specified channel. (closechannel)
Consumes
This API call consumes the following media types via the
Content-Type request header:
Request body
Return type
Example data
Content-Type: application/json
{
"error" : {
"message" : "aeiou"
}
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
sent to network. see error response for any network errors.
GenericResponse
401
unauthorized
Creates an invoice for payment. (createinvoice)
Consumes
This API call consumes the following media types via the
Content-Type request header:
Request body
Return type
Example data
Content-Type: application/json
{
"payment_request" : "aeiou",
"error" : {
"message" : "aeiou"
}
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
sent to network. see error response for any network errors.
CreateInvoiceResponse
401
unauthorized
Returns all wallet data for the current user. (getalldata)
Return type
Example data
Content-Type: application/json
{
"balances" : {
"btcfunds" : 0.80082819046101150206595775671303272247314453125,
"lntfunds" : 6.02745618307040320615897144307382404804229736328125
},
"address" : "aeiou",
"info" : {
"synchronized" : true,
"port" : 1,
"alias" : "aeiou",
"nodeId" : "aeiou",
"blockheight" : 5
}
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
successful operation
DataResponse
401
unauthorized
Returns the qr image equivalent of the input code. (getqrimage)
Query parameters
inputcode (required)
Query Parameter —
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
image generated
401
unauthorized
Logs user into the system (login)
Request body
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
login succeeded
401
unauthorized
Logs user out (logout)
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
logout succeeded
400
Invalid status value
Open a channel to a remote node. (openchannel)
Consumes
This API call consumes the following media types via the
Content-Type request header:
Request body
Return type
Example data
Content-Type: application/json
{
"error" : {
"message" : "aeiou"
}
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
sent to network. see error response for any network errors.
GenericResponse
401
unauthorized
Ping server to validate session. (ping)
Consumes
This API call consumes the following media types via the
Content-Type request header:
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
session is valid
401
unauthorized
Send a quickpay to a user in the local address book. (quickpay)
Consumes
This API call consumes the following media types via the
Content-Type request header:
Request body
Return type
Example data
Content-Type: application/json
{
"error" : {
"message" : "aeiou"
}
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
sent to network. see error response for any network errors.
GenericResponse
401
unauthorized
Sends an invoice with the specified invoiceid. (sendinvoice)
Consumes
This API call consumes the following media types via the
Content-Type request header:
Request body
Return type
Example data
Content-Type: application/json
{
"error" : {
"message" : "aeiou"
}
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
sent to network. see error response for any network errors.
GenericResponse
401
unauthorized
[ Jump to Methods ]
Table of Contents
Balances -
Channel -
CloseChannelRequest -
CreateInvoiceRequest -
CreateInvoiceResponse -
DataResponse -
Error -
GenericResponse -
Info -
LoginRequest -
OpenChannelRequest -
QuickPayRequest -
SendInvoiceRequest -
btcfunds (optional)
lntfunds (optional)
node (optional)
String Remote node's public key
channel (optional)
state (optional)
String Current state of the channel
balance (optional)
BigDecimal Balance in user defined [denomination].
capacity (optional)
BigDecimal Capacity of channel in user defined [denomination].
channelpoint (optional)
channelpoint (optional)
String Unique identifier for the channel to close
amount (optional)
BigDecimal Amount to request in users defined [denomination].
memo (optional)
String Memo to associate with invoice
quickpay (optional)
Boolean Whether to include a quickpay address in the resulting payment request.
payment_request (optional)
String code for the payment request for customers to send payment.
error (optional)
address (optional)
balances (optional)
info (optional)
nodeId (optional)
alias (optional)
port (optional)
synchronized (optional)
Boolean Indicates status of blockchain synchronization
blockheight (optional)
username (optional)
password (optional)
remotenode (optional)
String Unique identifier for the remote node.
amount (optional)
BigDecimal Channel capacity in user defined [denomination].
dest (optional)
String Alias of destination node as included in the address book.
amount (optional)
BigDecimal Amount to pay in user defined [denomination].
memo (optional)
String Memo to associate with invoice
invoiceid (optional)
String Network defined payment_request for the invoice
alias (optional)
String Future alias to add to address book for the recipient of this invoice.