btcpayserver/BTCPayServer/wwwroot/swagger/v1/swagger.template.lightning.common.json
d11n 8981414705
API: Add Lightning Payment info endpoint (#3557)
* Upgrade Lightning lib

* API: Add Lightning Payment info endpoint
2022-04-12 18:01:58 +09:00

243 lines
9.5 KiB
JSON

{
"components": {
"schemas": {
"ConnectToNodeRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"nodeURI": {
"type": "string",
"nullable": true,
"description": "Node URI in the form `pubkey@endpoint[:port]`"
}
}
},
"CreateLightningInvoiceRequest": {
"type": "object",
"properties": {
"amount": {
"type": "string",
"description": "Amount wrapped in a string, represented in a millistatoshi string. (1000 millisatoshi = 1 satoshi)",
"nullable": false
},
"description": {
"type": "string",
"nullable": true,
"description": "Description of the invoice in the BOLT11"
},
"descriptionHash": {
"type": "string",
"format": "hex",
"nullable": true,
"description": "Description hash of the invoice in the BOLT11"
},
"expiry": {
"description": "Expiration time in seconds",
"allOf": [ {"$ref": "#/components/schemas/TimeSpanSeconds"}]
},
"privateRouteHints": {
"type": "boolean",
"nullable": true,
"default": false,
"description": "True if the invoice should include private route hints"
}
}
},
"LightningChannelData": {
"type": "object",
"additionalProperties": false,
"properties": {
"remoteNode": {
"type": "string",
"nullable": false,
"description": "The public key of the node (Node ID)"
},
"isPublic": {
"type": "boolean",
"description": "Whether the node is public"
},
"isActive": {
"type": "boolean",
"description": "Whether the node is online"
},
"capacity": {
"type": "string",
"description": "The capacity of the channel in millisatoshi",
"nullable": false
},
"localBalance": {
"type": "string",
"description": "The local balance of the channel in millisatoshi",
"nullable": false
},
"channelPoint": {
"type": "string",
"nullable": true
}
}
},
"LightningPaymentData": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "The payment's ID"
},
"status": {
"$ref": "#/components/schemas/LightningPaymentStatus"
},
"BOLT11": {
"type": "string",
"description": "The BOLT11 representation of the payment",
"nullable": false
},
"paymentHash": {
"type": "string",
"description": "The payment hash",
"nullable": false
},
"preimage": {
"type": "string",
"description": "The payment preimage (available when status is complete)"
},
"createdAt": {
"description": "The unix timestamp when the payment got created",
"nullable": true,
"allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}]
},
"totalAmount": {
"type": "string",
"description": "The total amount (including fees) in millisatoshi"
},
"feeAmount": {
"type": "string",
"description": "The total fees in millisatoshi"
}
}
},
"LightningInvoiceData": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "The invoice's ID"
},
"status": {
"$ref": "#/components/schemas/LightningInvoiceStatus"
},
"BOLT11": {
"type": "string",
"description": "The BOLT11 representation of the invoice",
"nullable": false
},
"paidAt": {
"description": "The unix timestamp when the invoice got paid",
"nullable": true,
"allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}]
},
"expiresAt": {
"description": "The unix timestamp when the invoice expires",
"allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}]
},
"amount": {
"type": "string",
"description": "The amount of the invoice in millisatoshi"
},
"amountReceived": {
"type": "string",
"description": "The amount received in millisatoshi"
}
}
},
"LightningInvoiceStatus": {
"type": "string",
"description": "",
"x-enumNames": [
"Unpaid",
"Paid",
"Expired"
],
"enum": [
"Unpaid",
"Paid",
"Expired"
]
},
"LightningPaymentStatus": {
"type": "string",
"description": "",
"x-enumNames": [
"Unknown",
"Pending",
"Complete",
"Failed"
],
"enum": [
"Unknown",
"Pending",
"Complete",
"Failed"
]
},
"LightningNodeInformationData": {
"type": "object",
"properties": {
"nodeURIs": {
"type": "array",
"description": "Node URIs to connect to this node in the form `pubkey@endpoint[:port]`",
"items": {
"type": "string"
}
},
"blockHeight": {
"type": "integer",
"description": "The block height of the lightning node"
}
}
},
"PayLightningInvoiceRequest": {
"type": "object",
"properties": {
"BOLT11": {
"type": "string",
"description": "The BOLT11 of the invoice to pay"
},
"maxFeePercent": {
"type": "string",
"format": "float",
"nullable": true,
"description": "The fee limit expressed as a percentage of the payment amount",
"example": "6.15"
},
"maxFeeFlat": {
"type": "string",
"nullable": true,
"description": "The fee limit expressed as a fixed amount in satoshi",
"example": "21"
}
}
},
"OpenLightningChannelRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"nodeURI": {
"type": "string",
"description": "Node URI in the form `pubkey@endpoint[:port]`"
},
"channelAmount": {
"type": "string",
"description": "The amount to fund (in satoshi)"
},
"feeRate": {
"type": "number",
"description": "The amount to fund (in satoshi per byte)"
}
}
}
}
}
}