Unified more .md style

This commit is contained in:
MG-ng 2021-09-28 20:28:45 +02:00 committed by Overtorment
parent a184872b02
commit d5fb16b074

View File

@ -95,15 +95,15 @@ Create new user account and get credentials. Not whitelisted partners should ret
Request: Request:
{ {
"partnerid" : "bluewallet" // string, not mandatory parameter "partnerid" : "bluewallet" // string, not mandatory parameter
"accounttype" : "..." // string, not mandatory, default is common, also can be test or core "accounttype" : "..." // string, not mandatory, default is common, also can be test or core
} }
Response: Response:
{ {
"login":"...", // srting "login":"...", // string
"password":"...", // srting "password":"...", // string
} }
## POST /auth?type=auth ## POST /auth?type=auth
@ -120,9 +120,9 @@ Request:
Response: Response:
{ {
"access_token": "...", //string "access_token": "...", // string
"token_type": "...", //string "token_type": "...", // string
"refresh_token": "...", //string "refresh_token": "...", // string
"expiry": "0001-01-01T00:00:00Z" // datetime "expiry": "0001-01-01T00:00:00Z" // datetime
} }
@ -135,16 +135,16 @@ Authorize user with Oauth user and login
Request: Request:
{ {
"refresh_token": "...", //string "refresh_token": "...", // string
} }
Response: Response:
{ {
"access_token": "...", //string "access_token": "...", // string
"token_type": "...", //string "token_type": "...", // string
"refresh_token": "...", //string "refresh_token": "...", // string
"expiry": "0001-01-01T00:00:00Z" // datetime "expiry": "0001-01-01T00:00:00Z" // datetime
} }
## POST /oauth2/token ## POST /oauth2/token
@ -154,17 +154,17 @@ Authorize user with Oauth user and login
Request: Request:
{ {
"grant_type": "client_credentials", //string "grant_type": "client_credentials", // string
"client_id": "...", //string "client_id": "...", // string
"client_secret": "..." // string "client_secret": "..." // string
} }
Response: Response:
{ {
"access_token": "...", //string "access_token": "...", // string
"token_type": "...", //string "token_type": "...", // string
"refresh_token": "...", //string "refresh_token": "...", // string
"expiry": "0001-01-01T00:00:00Z" // datetime "expiry": "0001-01-01T00:00:00Z" // datetime
} }
@ -229,34 +229,34 @@ Request:
Response: Response:
{ {
"destination": "...", //string, lnd node address "destination": "...", // string, lnd node address
"payment_hash": "...", //string "payment_hash": "...", // string
"num_satoshis": "78497", //string, satoshis "num_satoshis": "78497", // string, satoshis
"timestamp": "1534430501", //string, unixtime "timestamp": "1534430501", // string, unixtime
"expiry": "3600", //string, seconds "expiry": "3600", // string, seconds
"description": "...", //string "description": "...", // string
"description_hash": "", //string "description_hash": "", // string
"fallback_addr": "...", //string, fallback on-chain address "fallback_addr": "...", // string, fallback on-chain address
"cltv_expiry": "...", //string, delta to use for the time-lock of the CLTV extended to the final hop "cltv_expiry": "...", // string, delta to use for the time-lock of the CLTV extended to the final hop
"route_hints": [ "route_hints": [
{ {
"hop_hints" : [ "hop_hints" : [
{ {
"node_id": "..", //string, the public key of the node at the start of the "node_id": "..", // string, the public key of the node at the start of the
// channel. // channel.
"chan_id": ..., //int, the unique identifier of the channel. "chan_id": ..., // int, the unique identifier of the channel.
"fee_base_msat": ..., //int, The base fee of the channel denominated in "fee_base_msat": ..., // int, The base fee of the channel denominated in
// millisatoshis. // millisatoshis.
"fee_proportional_millionths": ..., "fee_proportional_millionths": ...,
//int, the fee rate of the channel // int, the fee rate of the channel
// for sending one satoshi across it denominated // for sending one satoshi across it denominated
// in millionths of a satoshi // in millionths of a satoshi
"cltv_expiry_delta": ... "cltv_expiry_delta": ...
//int, the fee rate of the channel for sending one satoshi // int, the fee rate of the channel for sending one satoshi
// across it denominated in millionths of a satoshi // across it denominated in millionths of a satoshi
}, ... }, ...
] ]
@ -288,7 +288,7 @@ Request:
{ {
"destination" : "..." // string, destination lnd node address "destination" : "..." // string, destination lnd node address
"amt": "..." // string, "amt": "..." // string,
} }
Response: Response:
@ -311,26 +311,26 @@ Request:
Response: Response:
{ {
"payment_error": "..." //string "payment_error": "..." // string
"payment_preimage": "..." //string "payment_preimage": "..." // string
"payment_route": { "payment_route": {
"total_time_lock": ... , //int "total_time_lock": ... , // int
"total_fees": ... , //int "total_fees": ... , // int
"total_amt": ... , //int "total_amt": ... , // int
"total_fees_msat": ... , //int "total_fees_msat": ... , // int
"total_amt_msat": ... , //int "total_amt_msat": ... , // int
"hops": [ "hops": [
{ {
"chan_id": ... , //int "chan_id": ... , // int
"chan_capacity": ... , //int "chan_capacity": ... , // int
"amt_to_forward": ... , //int "amt_to_forward": ... , // int
"fee": ... , //int "fee": ... , // int
"expiry": ... , //int "expiry": ... , // int
"amt_to_forward_msat": ... , //int "amt_to_forward_msat": ... , // int
"fee_msat": ... , //int "fee_msat": ... , // int
}, },
] ]
} }
} }
## POST /sendcoins ## POST /sendcoins
@ -357,7 +357,7 @@ Request:
{ {
"limit" : 10, // INT "limit" : 10, // INT
"offset": 0, // INT "offset": 0, // INT
} }
Response: Response:
@ -398,10 +398,10 @@ Request:
Response: Response:
{ {
"BTC": { //string, currency "BTC": { // string, currency
"TotalBalance": 109388, //int, satoshis "TotalBalance": 109388, // int, satoshis
"AvailableBalance": 109388, // int, satoshis "AvailableBalance": 109388, // int, satoshis
"UncomfirmedBalance": 0 //int, satoshis "UncomfirmedBalance": 0 // int, satoshis
}, ... }, ...
//now available only btc balance //now available only btc balance
@ -422,22 +422,22 @@ Response:
"fee": 0, // int, in cents of percent, i.e. 100 for 1%, 50 for 0.5%, 1 for 0.01% "fee": 0, // int, in cents of percent, i.e. 100 for 1%, 50 for 0.5%, 1 for 0.01%
"identity_pubkey": "...", //string, lnd node identity pubkey "identity_pubkey": "...", // string, lnd node identity pubkey
"alias": "...", //string, lnd node alias "alias": "...", // string, lnd node alias
"num_pending_channels": 0, //int "num_pending_channels": 0, // int
"num_active_channels": 3, //int "num_active_channels": 3, // int
"num_peers": 6, //int "num_peers": 6, // int
"block_height": 542389, //int "block_height": 542389, // int
"block_hash": "...", //string "block_hash": "...", // string
"synced_to_chain": true, //bool "synced_to_chain": true, // bool
"testnet": false, "testnet": false,
"chains": [ "chains": [
"bitcoin" //string, available chans to operate by lnd "bitcoin" // string, available chans to operate by lnd
], ],
"uris": [ "uris": [
"...", //string, uris of lnd node "...", // string, uris of lnd node
], ],
"best_header_timestamp": "...", //string, unixtime "best_header_timestamp": "...", // string, unixtime
"version": "..." // string, lnd version "version": "..." // string, lnd version
} }
@ -448,21 +448,21 @@ Returns fees user pays for payments, status of the system, etc.
Request: Request:
{ {
"amt": "...", //string "amt": "...", // string
"memo":"...", //string "memo":"...", // string
"receipt":"...", //string, not mandatory parameter "receipt":"...", // string, not mandatory parameter
"preimage": "...", //string, not mandatory parameter "preimage": "...", // string, not mandatory parameter
"fallbackAddr": "...", //string, not mandatory parameter "fallbackAddr": "...", // string, not mandatory parameter
"expiry": "...", //string, not mandatory parameter "expiry": "...", // string, not mandatory parameter
"private": "..." //string, not mandatory parameter "private": "..." // string, not mandatory parameter
} }
Response: Response:
{ {
"r_hash": "...", //string, "r_hash": "...", // string,
"pay_req": "...", //string, a bare-bones invoice for a payment within the Lightning Network "pay_req": "...", // string, a bare-bones invoice for a payment within the Lightning Network
"add_index": ... //int, The “add” index of this invoice. Each newly created invoice will "add_index": ... // int, The “add” index of this invoice. Each newly created invoice will
// increment this index making it monotonically increasing. // increment this index making it monotonically increasing.
// Callers to the SubscribeInvoices call can use this to instantly // Callers to the SubscribeInvoices call can use this to instantly
// get notified of all added invoices with an add_index greater than this one. // get notified of all added invoices with an add_index greater than this one.
@ -479,12 +479,12 @@ Request:
Response: Response:
{ {
"r_hash": "...", //string "r_hash": "...", // string
"payment_request": "...", //string "payment_request": "...", // string
"add_index": "...", //string "add_index": "...", // string
"description": "...", //string "description": "...", // string
"amt": ... , //int "amt": ... , // int
"ispaid": ... //bool "ispaid": ... // bool
} }
# Data structures # Data structures
@ -498,14 +498,14 @@ Response:
// paid_invoice - user paid someone's invoice // paid_invoice - user paid someone's invoice
// sent_coins - user sent coins by lnd to someone's btc account // sent_coins - user sent coins by lnd to someone's btc account
// received_invoice_payments - user received payments by invoice // received_invoice_payments - user received payments by invoice
"txid": "...", // string, internal tx id. not related to onchain transaction id "txid": "...", // string, internal tx id. not related to onchain transaction id
"amt": 666, // satoshi, int "amt": 666, // satoshi, int
"fee": 11, // satoshi, int "fee": 11, // satoshi, int
"timestamp": 1234567, // int, unixtime "timestamp": 1234567, // int, unixtime
"from": "...", // string "from": "...", // string
"to": "...", // string "to": "...", // string
"description": "...", // string, user-defined text "description": "...", // string, user-defined text
"invoice": "...", // string, original bolt11-format invoice "invoice": "...", // string, original bolt11-format invoice
} }
# Explaining oauth2 mechanism # Explaining oauth2 mechanism