diff --git a/channelrequest.md b/channelrequest.md deleted file mode 100644 index 85c3ebd..0000000 --- a/channelrequest.md +++ /dev/null @@ -1,174 +0,0 @@ -# LSP channel request - - -## Version: 0.0.1 - -### /node/info - -#### GET -##### Summary - -Returns general service information about LSP - -##### Description - -Returns information about LSP Lightning node and services on offer. - -##### Responses - -| Code | Description | -| ---- | ----------- | -| 200 | Node and service info | - -### /channel/buy - -#### POST -##### Summary - -Request a channel to purchase. - -##### Description - -Request a channel to purchase. - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ---- | -| Channel request | body | Channel to purchase. | Yes | object | - -##### Responses - -| Code | Description | Schema | -| ---- | ----------- | ------ | -| 200 | Channel quote | [ChannelQuote](#channelquote) | - -### /channel/manual_finalise - -#### POST -##### Summary - -Finalise a purchased channel - -##### Description - -Set the node that LSP will open a channel to after paying for your channel. - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ---- | -| Channel request | body | Channel to purchase. | Yes | object | - -##### Responses - -| Code | Description | -| ---- | ----------- | -| 200 | Channel claimed | - -### /channel/order - -#### GET -##### Summary - -Get an order - -##### Description - -Get all information regarding a channel order - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ---- | -| order_id | query | Order id. | Yes | string | - -##### Responses - -| Code | Description | Schema | -| ---- | ----------- | ------ | -| 200 | Channel quote | [ChannelOrder](#channelorder) | - -### /lnurl/channel - -#### GET -##### Summary - -LN URL connect to node - -##### Description - -LNURL Channel - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ---- | -| order_id | query | Required for LNURL connect | Yes | string | -| k1 | query | Required for LNURL callback | Yes | string | -| remote_id | query | Required for LNURL callback. Remote node address of form node_key@ip_address:port_number | Yes | string | - -##### Responses - -| Code | Description | Schema | -| ---- | ----------- | ------ | -| 200 | LNURL connect | [LNURLConnect](#lnurlconnect) | - -### Models - -#### LNURLConnect - -| Name | Type | Description | Required | -| ---- | ---- | ----------- | -------- | -| k1 | string | order id | Yes | -| tag | string | | Yes | -| callback | string | A second-level URL which would initiate an OpenChannel message from target LN node | Yes | -| uri | string | LSP node info | Yes | -| status | string | Response status
_Enum:_ `"OK"`, `"ERROR"` | Yes | -| reason | string | Error reason | Yes | - -#### ChannelQuote - -| Name | Type | Description | Required | -| ---- | ---- | ----------- | -------- | -| order_id | string | | Yes | -| ln_invoice | string | | Yes | -| total_amount | integer | | Yes | -| btc_address | string | | Yes | -| lnurl_channel | string | | Yes | - -#### ChannelOrder - -| Name | Type | Description | Required | -| ---- | ---- | ----------- | -------- | -| _id | string | Order id | Yes | -| local_balance | integer | | Yes | -| remote_balance | integer | | Yes | -| channel_expiry | integer | Channel expiry is in weeks. | Yes | -| channel_expiry_ts | integer | LSP has the righ to close the channel after this time | Yes | -| order_expiry | integer | order is valid until this time | Yes | -| total_amount | integer | total amount payable by customer | Yes | -| btc_address | string | Destination address for on chain payments | Yes | -| created_at | integer | Time that the order was created | Yes | -| amount_received | number | how much satoshi orders has recieved | Yes | -| remote_node | object | | Yes | -| channel_open_tx | object | | Yes | -| purchase_invoice | string | | Yes | -| lnurl | object | LNUrl channel object | Yes | -| state | [OrderStates](#orderstates) | | Yes | -| onchain_payments | [ object ] | | Yes | - -#### OrderStates - -Order state can be one of the following - -| Name | Type | Description | Required | -| ---- | ---- | ----------- | -------- | -| CREATED | number | Order has been created | Yes | -| PAID | number | Order has been paid | Yes | -| URI_SET | number | Order has been paid and node uri is set | Yes | -| OPENING | number | Lightning channel is opening | Yes | -| CLOSING | number | Lightning channel is closing | Yes | -| GIVE_UP | number | Gave up opening channel | Yes | -| CLOSED | number | Lightning channel has been closed | Yes | -| OPEN | number | Lightning channel is open | Yes | diff --git a/open-channel-via-ln-payment.md b/open-channel-via-ln-payment.md deleted file mode 100644 index 6e3b38f..0000000 --- a/open-channel-via-ln-payment.md +++ /dev/null @@ -1,186 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [lspd.proto](#lspd.proto) - - [ChannelInformationReply](#lspd.ChannelInformationReply) - - [ChannelInformationRequest](#lspd.ChannelInformationRequest) - - [OpenChannelReply](#lspd.OpenChannelReply) - - [OpenChannelRequest](#lspd.OpenChannelRequest) - - [PaymentInformation](#lspd.PaymentInformation) - - [RegisterPaymentReply](#lspd.RegisterPaymentReply) - - [RegisterPaymentRequest](#lspd.RegisterPaymentRequest) - - - - - [ChannelOpener](#lspd.ChannelOpener) - - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## lspd.proto - - - - - -### ChannelInformationReply - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of of lsp | -| pubkey | [string](#string) | | The identity pubkey of the Lightning node | -| host | [string](#string) | | The network location of the lightning node, e.g. `12.34.56.78:9012` or / `localhost:10011` | -| channel_capacity | [int64](#int64) | | The channel capacity in satoshis | -| target_conf | [int32](#int32) | | The target number of blocks that the funding transaction should be / confirmed by. | -| base_fee_msat | [int64](#int64) | | The base fee charged regardless of the number of milli-satoshis sent. | -| fee_rate | [double](#double) | | The effective fee rate in milli-satoshis. The precision of this value goes / up to 6 decimal places, so 1e-6. | -| time_lock_delta | [uint32](#uint32) | | The required timelock delta for HTLCs forwarded over the channel. | -| min_htlc_msat | [int64](#int64) | | The minimum value in millisatoshi we will require for incoming HTLCs on / the channel. | -| channel_fee_permyriad | [int64](#int64) | | | -| lsp_pubkey | [bytes](#bytes) | | | - - - - - - - - -### ChannelInformationRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| pubkey | [string](#string) | | The identity pubkey of the Lightning node | - - - - - - - - -### OpenChannelReply - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| tx_hash | [string](#string) | | The transaction hash | -| output_index | [uint32](#uint32) | | The output index | - - - - - - - - -### OpenChannelRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| pubkey | [string](#string) | | The identity pubkey of the Lightning node | - - - - - - - - -### PaymentInformation - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| payment_hash | [bytes](#bytes) | | | -| payment_secret | [bytes](#bytes) | | | -| destination | [bytes](#bytes) | | | -| incoming_amount_msat | [int64](#int64) | | | -| outgoing_amount_msat | [int64](#int64) | | | - - - - - - - - -### RegisterPaymentReply - - - - - - - - - -### RegisterPaymentRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| blob | [bytes](#bytes) | | | - - - - - - - - - - - - - - -### ChannelOpener - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| ChannelInformation | [ChannelInformationRequest](#lspd.ChannelInformationRequest) | [ChannelInformationReply](#lspd.ChannelInformationReply) | | -| OpenChannel | [OpenChannelRequest](#lspd.OpenChannelRequest) | [OpenChannelReply](#lspd.OpenChannelReply) | | -| RegisterPayment | [RegisterPaymentRequest](#lspd.RegisterPaymentRequest) | [RegisterPaymentReply](#lspd.RegisterPaymentReply) | | - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ Type | Java Type | Python Type | -| ----------- | ----- | -------- | --------- | ----------- | -| double | | double | double | float | -| float | | float | float | float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | -| sfixed32 | Always four bytes. | int32 | int | int | -| sfixed64 | Always eight bytes. | int64 | long | int/long | -| bool | | bool | boolean | boolean | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | -