myLightning

REST API specification for the myLightning web wallet. [Work In Progress!!!]
More information:
Contact Info: seregost@gmail.com
Version: 1.0.0
BasePath:/rest/v1
Apache 2.0
http://www.apache.org/licenses/LICENSE-2.0.html

Access

  1. APIKey KeyParamName:connect.sid KeyInQuery:false KeyInHeader:true
  2. APIKey KeyParamName:_csrf KeyInQuery:true KeyInHeader:false

Methods

[ Jump to Models ]

Table of Contents

Wallet

Wallet

Up
post /closechannel
Closes a specified channel. (closechannel)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body CloseChannelRequest (required)
Body Parameter

Return type

GenericResponse

Example data

Content-Type: application/json
{
  "error" : {
    "message" : "aeiou"
  }
}

Produces

This API call produces the following media types according to the Accept 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

Up
post /createinvoice
Creates an invoice for payment. (createinvoice)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body CreateInvoiceRequest (required)
Body Parameter

Return type

CreateInvoiceResponse

Example data

Content-Type: application/json
{
  "payment_request" : "aeiou",
  "error" : {
    "message" : "aeiou"
  }
}

Produces

This API call produces the following media types according to the Accept 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

Up
get /getalldata
Returns all wallet data for the current user. (getalldata)

Return type

DataResponse

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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation DataResponse

401

unauthorized

Up
get /getqrimage
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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

image generated

401

unauthorized

Up
post /login
Logs user into the system (login)

Request body

body LoginRequest (required)
Body Parameter

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

login succeeded

401

unauthorized

Up
post /logout
Logs user out (logout)

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

logout succeeded

400

Invalid status value

Up
post /openchannel
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

body OpenChannelRequest (required)
Body Parameter

Return type

GenericResponse

Example data

Content-Type: application/json
{
  "error" : {
    "message" : "aeiou"
  }
}

Produces

This API call produces the following media types according to the Accept 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

Up
get /ping
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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

session is valid

401

unauthorized

Up
post /quickpay
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

body QuickPayRequest (required)
Body Parameter

Return type

GenericResponse

Example data

Content-Type: application/json
{
  "error" : {
    "message" : "aeiou"
  }
}

Produces

This API call produces the following media types according to the Accept 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

Up
post /sendinvoice
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

body SendInvoiceRequest (required)
Body Parameter

Return type

GenericResponse

Example data

Content-Type: application/json
{
  "error" : {
    "message" : "aeiou"
  }
}

Produces

This API call produces the following media types according to the Accept 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

Models

[ Jump to Methods ]

Table of Contents

  1. Balances -
  2. Channel -
  3. CloseChannelRequest -
  4. CreateInvoiceRequest -
  5. CreateInvoiceResponse -
  6. DataResponse -
  7. Error -
  8. GenericResponse -
  9. Info -
  10. LoginRequest -
  11. OpenChannelRequest -
  12. QuickPayRequest -
  13. SendInvoiceRequest -

Balances - Up

btcfunds (optional)
lntfunds (optional)

Channel - Up

node (optional)
String Remote node's public key
channel (optional)
String Channel ID
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)

CloseChannelRequest - Up

channelpoint (optional)
String Unique identifier for the channel to close

CreateInvoiceRequest - Up

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.

CreateInvoiceResponse - Up

payment_request (optional)
String code for the payment request for customers to send payment.
error (optional)

DataResponse - Up

address (optional)
balances (optional)
info (optional)

Error - Up

message (optional)

GenericResponse - Up

error (optional)

Info - Up

nodeId (optional)
String Node's public key
alias (optional)
port (optional)
synchronized (optional)
Boolean Indicates status of blockchain synchronization
blockheight (optional)

LoginRequest - Up

username (optional)
password (optional)

OpenChannelRequest - Up

remotenode (optional)
String Unique identifier for the remote node.
amount (optional)
BigDecimal Channel capacity in user defined [denomination].

QuickPayRequest - Up

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

SendInvoiceRequest - Up

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.