mirror of
https://github.com/lightninglabs/faraday.git
synced 2026-08-13 12:33:35 +02:00
Add the ForwardingAbility RPC that reports, for every (peerIn, peerOut) pair, the raw forwarding facts over a window: effective uptime in seconds and forwarded volume in satoshis. The response is a sparse, packed encoding (deduplicated peer keys plus packed pair indices) carrying only pairs with a non-zero signal; an absent pair means zero over the window. A single liquidity_floor_sat request parameter sets the directional liquidity a pair must hold to count as economically forwardable.
1339 lines
53 KiB
JSON
1339 lines
53 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "faraday.proto",
|
|
"version": "version not set"
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "FaradayServer"
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"paths": {
|
|
"/v1/faraday/closereport": {
|
|
"get": {
|
|
"summary": "*\nGet a channel close report for a specific channel.",
|
|
"description": "Example request:\nhttp://localhost:8466/v1/faraday/closereport",
|
|
"operationId": "FaradayServer_CloseReport",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcCloseReportResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "channel_point",
|
|
"description": "The funding outpoint of the channel the report should be created for,\nformatted txid:outpoint.",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"tags": [
|
|
"FaradayServer"
|
|
]
|
|
}
|
|
},
|
|
"/v1/faraday/exchangerate": {
|
|
"get": {
|
|
"summary": "* frcli:\nGet fiat prices for btc.",
|
|
"description": "Example request:\nhttp://localhost:8466/v1/faraday/exchangerate",
|
|
"operationId": "FaradayServer_ExchangeRate",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcExchangeRateResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "timestamps",
|
|
"description": "A set of timestamps for which we want the bitcoin price.",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"format": "uint64"
|
|
},
|
|
"collectionFormat": "multi"
|
|
},
|
|
{
|
|
"name": "granularity",
|
|
"description": "The level of granularity at which we want the bitcoin price to be quoted.",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string",
|
|
"enum": [
|
|
"UNKNOWN_GRANULARITY",
|
|
"MINUTE",
|
|
"FIVE_MINUTES",
|
|
"FIFTEEN_MINUTES",
|
|
"THIRTY_MINUTES",
|
|
"HOUR",
|
|
"SIX_HOURS",
|
|
"TWELVE_HOURS",
|
|
"DAY"
|
|
],
|
|
"default": "UNKNOWN_GRANULARITY"
|
|
},
|
|
{
|
|
"name": "fiat_backend",
|
|
"description": "The api to be used for fiat related queries.\n\n - COINCAP: Use the CoinCap API for fiat price information.\nThis API is reached through the following URL:\nhttps://api.coincap.io/v2/assets/bitcoin/history\n - COINDESK: Use the CoinDesk API for fiat price information.\nThis API is reached through the following URL:\nhttps://api.coindesk.com/v1/bpi/historical/close.json\n - CUSTOM: Use custom price data provided in a CSV file for fiat price information.\n - COINGECKO: Use the CoinGecko API for fiat price information.\nThis API is reached through the following URL:\nhttps://api.coingecko.com/api/v3/coins/bitcoin/market_chart\n - BITFINEX: Use the Bitfinex API for fiat price information.\nThis API is reached through the following URL:\nhttps://api-pub.bitfinex.com/v2/candles/trade:1h:tBTCUSD/hist",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string",
|
|
"enum": [
|
|
"UNKNOWN_FIATBACKEND",
|
|
"COINCAP",
|
|
"COINDESK",
|
|
"CUSTOM",
|
|
"COINGECKO",
|
|
"BITFINEX"
|
|
],
|
|
"default": "UNKNOWN_FIATBACKEND"
|
|
}
|
|
],
|
|
"tags": [
|
|
"FaradayServer"
|
|
]
|
|
},
|
|
"post": {
|
|
"summary": "* frcli:\nGet fiat prices for btc.",
|
|
"description": "Example request:\nhttp://localhost:8466/v1/faraday/exchangerate",
|
|
"operationId": "FaradayServer_ExchangeRate2",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcExchangeRateResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcExchangeRateRequest"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"FaradayServer"
|
|
]
|
|
}
|
|
},
|
|
"/v1/faraday/getchannelevents": {
|
|
"post": {
|
|
"summary": "*\nGet a list of channel events that occurred for a given channel.",
|
|
"operationId": "FaradayServer_GetChannelEvents",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcChannelEventsResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcChannelEventsRequest"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"FaradayServer"
|
|
]
|
|
}
|
|
},
|
|
"/v1/faraday/insights": {
|
|
"get": {
|
|
"summary": "* frcli: `insights`\nList currently open channel with routing and uptime information.",
|
|
"description": "Example request:\nhttp://localhost:8466/v1/faraday/insights",
|
|
"operationId": "FaradayServer_ChannelInsights",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcChannelInsightsResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"FaradayServer"
|
|
]
|
|
}
|
|
},
|
|
"/v1/faraday/nodeaudit": {
|
|
"get": {
|
|
"summary": "*\nGet a report of your node's activity over a period.",
|
|
"description": "Example request:\nhttp://localhost:8466/v1/faraday/nodeaudit",
|
|
"operationId": "FaradayServer_NodeAudit",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcNodeAuditResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "start_time",
|
|
"description": "The unix time from which to produce the report, inclusive.",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string",
|
|
"format": "uint64"
|
|
},
|
|
{
|
|
"name": "end_time",
|
|
"description": "The unix time until which to produce the report, exclusive.",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string",
|
|
"format": "uint64"
|
|
},
|
|
{
|
|
"name": "disable_fiat",
|
|
"description": "Set to generate a report without conversion to fiat. If set, fiat values\nwill display as 0.",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"name": "granularity",
|
|
"description": "The level of granularity at which we wish to produce fiat prices.",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string",
|
|
"enum": [
|
|
"UNKNOWN_GRANULARITY",
|
|
"MINUTE",
|
|
"FIVE_MINUTES",
|
|
"FIFTEEN_MINUTES",
|
|
"THIRTY_MINUTES",
|
|
"HOUR",
|
|
"SIX_HOURS",
|
|
"TWELVE_HOURS",
|
|
"DAY"
|
|
],
|
|
"default": "UNKNOWN_GRANULARITY"
|
|
},
|
|
{
|
|
"name": "fiat_backend",
|
|
"description": "The api to be used for fiat related queries.\n\n - COINCAP: Use the CoinCap API for fiat price information.\nThis API is reached through the following URL:\nhttps://api.coincap.io/v2/assets/bitcoin/history\n - COINDESK: Use the CoinDesk API for fiat price information.\nThis API is reached through the following URL:\nhttps://api.coindesk.com/v1/bpi/historical/close.json\n - CUSTOM: Use custom price data provided in a CSV file for fiat price information.\n - COINGECKO: Use the CoinGecko API for fiat price information.\nThis API is reached through the following URL:\nhttps://api.coingecko.com/api/v3/coins/bitcoin/market_chart\n - BITFINEX: Use the Bitfinex API for fiat price information.\nThis API is reached through the following URL:\nhttps://api-pub.bitfinex.com/v2/candles/trade:1h:tBTCUSD/hist",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string",
|
|
"enum": [
|
|
"UNKNOWN_FIATBACKEND",
|
|
"COINCAP",
|
|
"COINDESK",
|
|
"CUSTOM",
|
|
"COINGECKO",
|
|
"BITFINEX"
|
|
],
|
|
"default": "UNKNOWN_FIATBACKEND"
|
|
}
|
|
],
|
|
"tags": [
|
|
"FaradayServer"
|
|
]
|
|
},
|
|
"post": {
|
|
"summary": "*\nGet a report of your node's activity over a period.",
|
|
"description": "Example request:\nhttp://localhost:8466/v1/faraday/nodeaudit",
|
|
"operationId": "FaradayServer_NodeAudit2",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcNodeAuditResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcNodeAuditRequest"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"FaradayServer"
|
|
]
|
|
}
|
|
},
|
|
"/v1/faraday/outliers/{rec_request.metric}": {
|
|
"get": {
|
|
"summary": "* frcli: `outliers`\nGet close recommendations for currently open channels based on whether it is\nan outlier.",
|
|
"description": "Example request:\nhttp://localhost:8466/v1/faraday/outliers/REVENUE?rec_request.minimum_monitored=123",
|
|
"operationId": "FaradayServer_OutlierRecommendations",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcCloseRecommendationsResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "rec_request.metric",
|
|
"description": "The data point base close recommendations on. Available options are:\nUptime: ratio of channel peer's uptime to the period they have been\nmonitored to.\nRevenue: the revenue that the channel has produced per block that its\nfunding transaction has been confirmed for.",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"enum": [
|
|
"UNKNOWN",
|
|
"UPTIME",
|
|
"REVENUE",
|
|
"INCOMING_VOLUME",
|
|
"OUTGOING_VOLUME",
|
|
"TOTAL_VOLUME"
|
|
]
|
|
},
|
|
{
|
|
"name": "rec_request.minimum_monitored",
|
|
"description": "The minimum amount of time in seconds that a channel should have been\nmonitored by lnd to be eligible for close. This value is in place to\nprotect against closing of newer channels.",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
{
|
|
"name": "outlier_multiplier",
|
|
"description": "The number of inter-quartile ranges a value needs to be beneath the lower\nquartile/ above the upper quartile to be considered a lower/upper outlier.\nLower values will be more aggressive in recommending channel closes, and\nupper values will be more conservative. Recommended values are 1.5 for\naggressive recommendations and 3 for conservative recommendations.",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "number",
|
|
"format": "float"
|
|
}
|
|
],
|
|
"tags": [
|
|
"FaradayServer"
|
|
]
|
|
},
|
|
"post": {
|
|
"summary": "* frcli: `outliers`\nGet close recommendations for currently open channels based on whether it is\nan outlier.",
|
|
"description": "Example request:\nhttp://localhost:8466/v1/faraday/outliers/REVENUE?rec_request.minimum_monitored=123",
|
|
"operationId": "FaradayServer_OutlierRecommendations2",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcCloseRecommendationsResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "rec_request.metric",
|
|
"description": "The data point base close recommendations on. Available options are:\nUptime: ratio of channel peer's uptime to the period they have been\nmonitored to.\nRevenue: the revenue that the channel has produced per block that its\nfunding transaction has been confirmed for.",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"enum": [
|
|
"UNKNOWN",
|
|
"UPTIME",
|
|
"REVENUE",
|
|
"INCOMING_VOLUME",
|
|
"OUTGOING_VOLUME",
|
|
"TOTAL_VOLUME"
|
|
]
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/FaradayServerOutlierRecommendationsBody"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"FaradayServer"
|
|
]
|
|
}
|
|
},
|
|
"/v1/faraday/revenue": {
|
|
"get": {
|
|
"summary": "* frcli: `revenue`\nGet a pairwise revenue report for a channel.",
|
|
"description": "Example request:\nhttp://localhost:8466/v1/faraday/revenue",
|
|
"operationId": "FaradayServer_RevenueReport",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcRevenueReportResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "chan_points",
|
|
"description": "The funding transaction outpoints for the channels to generate a revenue\nreport for. If this is empty, it will be generated for all open and closed\nchannels. Channel funding points should be expressed with the format\nfundingTxID:outpoint.",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"collectionFormat": "multi"
|
|
},
|
|
{
|
|
"name": "start_time",
|
|
"description": "Start time is beginning of the range over which the report will be\ngenerated, expressed as unix epoch offset in seconds.",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string",
|
|
"format": "uint64"
|
|
},
|
|
{
|
|
"name": "end_time",
|
|
"description": "End time is end of the range over which the report will be\ngenerated, expressed as unix epoch offset in seconds.",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string",
|
|
"format": "uint64"
|
|
}
|
|
],
|
|
"tags": [
|
|
"FaradayServer"
|
|
]
|
|
},
|
|
"post": {
|
|
"summary": "* frcli: `revenue`\nGet a pairwise revenue report for a channel.",
|
|
"description": "Example request:\nhttp://localhost:8466/v1/faraday/revenue",
|
|
"operationId": "FaradayServer_RevenueReport2",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcRevenueReportResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcRevenueReportRequest"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"FaradayServer"
|
|
]
|
|
}
|
|
},
|
|
"/v1/faraday/threshold/{rec_request.metric}": {
|
|
"get": {
|
|
"summary": "* frcli: `threshold`\nGet close recommendations for currently open channels based whether they are\nbelow a set threshold.",
|
|
"description": "Example request:\nhttp://localhost:8466/v1/faraday/threshold/UPTIME?rec_request.minimum_monitored=123",
|
|
"operationId": "FaradayServer_ThresholdRecommendations",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcCloseRecommendationsResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "rec_request.metric",
|
|
"description": "The data point base close recommendations on. Available options are:\nUptime: ratio of channel peer's uptime to the period they have been\nmonitored to.\nRevenue: the revenue that the channel has produced per block that its\nfunding transaction has been confirmed for.",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"enum": [
|
|
"UNKNOWN",
|
|
"UPTIME",
|
|
"REVENUE",
|
|
"INCOMING_VOLUME",
|
|
"OUTGOING_VOLUME",
|
|
"TOTAL_VOLUME"
|
|
]
|
|
},
|
|
{
|
|
"name": "rec_request.minimum_monitored",
|
|
"description": "The minimum amount of time in seconds that a channel should have been\nmonitored by lnd to be eligible for close. This value is in place to\nprotect against closing of newer channels.",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
{
|
|
"name": "threshold_value",
|
|
"description": "The threshold that recommendations will be calculated based on.\nFor uptime: ratio of uptime to observed lifetime beneath which channels\nwill be recommended for closure.\n\nFor revenue: revenue per block that capital has been committed to the\nchannel beneath which channels will be recommended for closure. This\nvalue is provided per block so that channels that have been open for\ndifferent periods of time can be compared.\n\nFor incoming volume: The incoming volume per block that capital has\nbeen committed to the channel beneath which channels will be recommended\nfor closure. This value is provided per block so that channels that have\nbeen open for different periods of time can be compared.\n\nFor outgoing volume: The outgoing volume per block that capital has been\ncommitted to the channel beneath which channels will be recommended for\nclosure. This value is provided per block so that channels that have been\nopen for different periods of time can be compared.\n\nFor total volume: The total volume per block that capital has been\ncommitted to the channel beneath which channels will be recommended for\nclosure. This value is provided per block so that channels that have been\nopen for different periods of time can be compared.",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "number",
|
|
"format": "float"
|
|
}
|
|
],
|
|
"tags": [
|
|
"FaradayServer"
|
|
]
|
|
},
|
|
"post": {
|
|
"summary": "* frcli: `threshold`\nGet close recommendations for currently open channels based whether they are\nbelow a set threshold.",
|
|
"description": "Example request:\nhttp://localhost:8466/v1/faraday/threshold/UPTIME?rec_request.minimum_monitored=123",
|
|
"operationId": "FaradayServer_ThresholdRecommendations2",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/frdrpcCloseRecommendationsResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "rec_request.metric",
|
|
"description": "The data point base close recommendations on. Available options are:\nUptime: ratio of channel peer's uptime to the period they have been\nmonitored to.\nRevenue: the revenue that the channel has produced per block that its\nfunding transaction has been confirmed for.",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"enum": [
|
|
"UNKNOWN",
|
|
"UPTIME",
|
|
"REVENUE",
|
|
"INCOMING_VOLUME",
|
|
"OUTGOING_VOLUME",
|
|
"TOTAL_VOLUME"
|
|
]
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/FaradayServerThresholdRecommendationsBody"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"FaradayServer"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"CloseRecommendationRequestMetric": {
|
|
"type": "string",
|
|
"enum": [
|
|
"UNKNOWN",
|
|
"UPTIME",
|
|
"REVENUE",
|
|
"INCOMING_VOLUME",
|
|
"OUTGOING_VOLUME",
|
|
"TOTAL_VOLUME"
|
|
],
|
|
"default": "UNKNOWN"
|
|
},
|
|
"FaradayServerOutlierRecommendationsBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"rec_request": {
|
|
"type": "object",
|
|
"properties": {
|
|
"minimum_monitored": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "The minimum amount of time in seconds that a channel should have been\nmonitored by lnd to be eligible for close. This value is in place to\nprotect against closing of newer channels."
|
|
}
|
|
},
|
|
"description": "The parameters that are common to all close recommendations.",
|
|
"title": "The parameters that are common to all close recommendations."
|
|
},
|
|
"outlier_multiplier": {
|
|
"type": "number",
|
|
"format": "float",
|
|
"description": "The number of inter-quartile ranges a value needs to be beneath the lower\nquartile/ above the upper quartile to be considered a lower/upper outlier.\nLower values will be more aggressive in recommending channel closes, and\nupper values will be more conservative. Recommended values are 1.5 for\naggressive recommendations and 3 for conservative recommendations."
|
|
}
|
|
}
|
|
},
|
|
"FaradayServerThresholdRecommendationsBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"rec_request": {
|
|
"type": "object",
|
|
"properties": {
|
|
"minimum_monitored": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "The minimum amount of time in seconds that a channel should have been\nmonitored by lnd to be eligible for close. This value is in place to\nprotect against closing of newer channels."
|
|
}
|
|
},
|
|
"description": "The parameters that are common to all close recommendations.",
|
|
"title": "The parameters that are common to all close recommendations."
|
|
},
|
|
"threshold_value": {
|
|
"type": "number",
|
|
"format": "float",
|
|
"description": "The threshold that recommendations will be calculated based on.\nFor uptime: ratio of uptime to observed lifetime beneath which channels\nwill be recommended for closure.\n\nFor revenue: revenue per block that capital has been committed to the\nchannel beneath which channels will be recommended for closure. This\nvalue is provided per block so that channels that have been open for\ndifferent periods of time can be compared.\n\nFor incoming volume: The incoming volume per block that capital has\nbeen committed to the channel beneath which channels will be recommended\nfor closure. This value is provided per block so that channels that have\nbeen open for different periods of time can be compared.\n\nFor outgoing volume: The outgoing volume per block that capital has been\ncommitted to the channel beneath which channels will be recommended for\nclosure. This value is provided per block so that channels that have been\nopen for different periods of time can be compared.\n\nFor total volume: The total volume per block that capital has been\ncommitted to the channel beneath which channels will be recommended for\nclosure. This value is provided per block so that channels that have been\nopen for different periods of time can be compared."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcBitcoinPrice": {
|
|
"type": "object",
|
|
"properties": {
|
|
"price": {
|
|
"type": "string",
|
|
"description": "The price of 1 BTC, expressed in USD."
|
|
},
|
|
"price_timestamp": {
|
|
"type": "string",
|
|
"format": "uint64",
|
|
"description": "The timestamp for this price price provided."
|
|
},
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "The currency that the price is denoted in."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcChannelEvent": {
|
|
"type": "object",
|
|
"properties": {
|
|
"timestamp": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "The timestamp of the event, as Unix seconds."
|
|
},
|
|
"event_type": {
|
|
"$ref": "#/definitions/frdrpcChannelEventType",
|
|
"description": "The type of the event."
|
|
},
|
|
"local_balance": {
|
|
"type": "string",
|
|
"format": "uint64",
|
|
"description": "The channel's local balance at the time of the event in sat."
|
|
},
|
|
"remote_balance": {
|
|
"type": "string",
|
|
"format": "uint64",
|
|
"description": "The channel's remote balance at the time of the event in sat."
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "Server-assigned monotonic identity. Echo this back as the next\nrequest's last_id when paginating."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcChannelEventType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CHAN_EVENT_UNKNOWN",
|
|
"CHAN_EVENT_ONLINE",
|
|
"CHAN_EVENT_OFFLINE",
|
|
"CHAN_EVENT_UPDATE"
|
|
],
|
|
"default": "CHAN_EVENT_UNKNOWN",
|
|
"description": " - CHAN_EVENT_UNKNOWN: An unknown event type.\n - CHAN_EVENT_ONLINE: An online event.\n - CHAN_EVENT_OFFLINE: An offline event.\n - CHAN_EVENT_UPDATE: A channel balance update event."
|
|
},
|
|
"frdrpcChannelEventsRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chan_point": {
|
|
"type": "string",
|
|
"description": "The channel point of the channel to get events for, formatted txid:outpoint."
|
|
},
|
|
"start_time": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "Lower time bound, inclusive, as Unix seconds. Independent filter — does\nnot need to advance between paginated calls. Zero means no lower bound."
|
|
},
|
|
"end_time": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "Upper time bound, exclusive, as Unix seconds. Must be greater than or\nequal to start_time. Zero means \"use the server's current time\"."
|
|
},
|
|
"max_events": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"description": "The maximum number of events to return. If zero, the server default is\nused. The server enforces a hard cap; values above the cap are clamped."
|
|
},
|
|
"last_id": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "Pagination cursor: id of the last event from the previous response.\nPass zero on the first call; for subsequent calls pass the response's\nlast_id to resume past already-returned events."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcChannelEventsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/frdrpcChannelEvent"
|
|
},
|
|
"description": "The list of channel events."
|
|
},
|
|
"last_id": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "Id of the last event returned, suitable as the next request's last_id.\nZero when events is empty."
|
|
},
|
|
"has_more": {
|
|
"type": "boolean",
|
|
"description": "True when the page filled to the requested limit and more events may be\navailable; callers should keep paginating until this is false."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcChannelInsight": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chan_point": {
|
|
"type": "string",
|
|
"description": "The outpoint of the channel's funding transaction."
|
|
},
|
|
"monitored_seconds": {
|
|
"type": "string",
|
|
"format": "uint64",
|
|
"description": "The amount of time in seconds that we have monitored the channel peer's\nuptime for."
|
|
},
|
|
"uptime_seconds": {
|
|
"type": "string",
|
|
"format": "uint64",
|
|
"description": "The amount of time in seconds that the channel peer has been online over\nthe period it has been monitored for."
|
|
},
|
|
"volume_incoming_msat": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "The volume, in millisatoshis, that has been forwarded with this channel as\nthe incoming channel."
|
|
},
|
|
"volume_outgoing_msat": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "The volume, in millisatoshis, that has been forwarded with this channel as\nthe outgoing channel."
|
|
},
|
|
"fees_earned_msat": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "The total fees earned by this channel for its participation in forwards,\nexpressed in millisatoshis. Note that we attribute fees evenly across\nincoming and outgoing channels."
|
|
},
|
|
"confirmations": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"description": "The number of confirmations the funding transaction has."
|
|
},
|
|
"private": {
|
|
"type": "boolean",
|
|
"description": "True if the channel is private."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcChannelInsightsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"channel_insights": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/frdrpcChannelInsight"
|
|
},
|
|
"description": "Insights for the set of currently open channels."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcCloseRecommendationRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"minimum_monitored": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "The minimum amount of time in seconds that a channel should have been\nmonitored by lnd to be eligible for close. This value is in place to\nprotect against closing of newer channels."
|
|
},
|
|
"metric": {
|
|
"$ref": "#/definitions/CloseRecommendationRequestMetric",
|
|
"description": "The data point base close recommendations on. Available options are:\nUptime: ratio of channel peer's uptime to the period they have been\nmonitored to.\nRevenue: the revenue that the channel has produced per block that its\nfunding transaction has been confirmed for."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcCloseRecommendationsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"total_channels": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "The total number of channels, before filtering out channels that are\nnot eligible for close recommendations."
|
|
},
|
|
"considered_channels": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "The number of channels that were considered for close recommendations."
|
|
},
|
|
"recommendations": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/frdrpcRecommendation"
|
|
},
|
|
"description": "A set of channel close recommendations. The absence of a channel in this\nset implies that it was not considered for close because it did not meet\nthe criteria for close recommendations (it is private, or has not been\nmonitored for long enough)."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcCloseReportResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"channel_point": {
|
|
"type": "string",
|
|
"description": "The funding outpoint of the channel."
|
|
},
|
|
"channel_initiator": {
|
|
"type": "boolean",
|
|
"description": "True if we opened the channel, false if the remote peer did."
|
|
},
|
|
"close_type": {
|
|
"type": "string",
|
|
"description": "The type of close that resolved this channel."
|
|
},
|
|
"close_txid": {
|
|
"type": "string",
|
|
"description": "The transaction id of the close transaction that confirmed on chain."
|
|
},
|
|
"open_fee": {
|
|
"type": "string",
|
|
"description": "The fee we paid on chain to open this channel in satoshis, note that this\nfield will be zero if the remote party paid."
|
|
},
|
|
"close_fee": {
|
|
"type": "string",
|
|
"description": "The fee we paid on chain for the close transaction in staoshis, note that\nthis field will be zero if the remote party paid."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcCustomCategory": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "The name for the custom category which will contain all transactions that\nare labelled with a string matching one of the regexes provided in\nlabel identifiers."
|
|
},
|
|
"on_chain": {
|
|
"type": "boolean",
|
|
"description": "Set to true to apply this category to on chain transactions. Can be set in\nconjunction with off_chain to apply the category to all transactions."
|
|
},
|
|
"off_chain": {
|
|
"type": "boolean",
|
|
"description": "Set to true to apply this category to off chain transactions. Can be set in\nconjunction with on_chain to apply the category to all transactions."
|
|
},
|
|
"label_patterns": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "A set of regular expressions which identify transactions by their label as\nbelonging in this custom category. If a label matches any single regex in\nthe set, it is considered to be in the category. These expressions will be\nmatched against various labels that are present in lnd: on chain\ntransactions will be matched against their label field, off chain receipts\nwill be matched against their memo. At present, there is no way to match\nforwards or off chain payments. These expressions must be unique across\ncustom categories, otherwise faraday will not be able to identify which\ncustom category a transaction belongs in."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcEntryType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"UNKNOWN",
|
|
"LOCAL_CHANNEL_OPEN",
|
|
"REMOTE_CHANNEL_OPEN",
|
|
"CHANNEL_OPEN_FEE",
|
|
"CHANNEL_CLOSE",
|
|
"RECEIPT",
|
|
"PAYMENT",
|
|
"FEE",
|
|
"CIRCULAR_RECEIPT",
|
|
"FORWARD",
|
|
"FORWARD_FEE",
|
|
"CIRCULAR_PAYMENT",
|
|
"CIRCULAR_FEE",
|
|
"SWEEP",
|
|
"SWEEP_FEE",
|
|
"CHANNEL_CLOSE_FEE"
|
|
],
|
|
"default": "UNKNOWN",
|
|
"description": " - LOCAL_CHANNEL_OPEN: A channel opening transaction for a channel opened by our node.\n - REMOTE_CHANNEL_OPEN: A channel opening transaction for a channel opened by a remote node.\n - CHANNEL_OPEN_FEE: The on chain fee paid to open a channel.\n - CHANNEL_CLOSE: A channel closing transaction.\n - RECEIPT: Receipt of funds. On chain this reflects receives, off chain settlement\nof invoices.\n - PAYMENT: Payment of funds. On chain this reflects sends, off chain settlement\nof our payments.\n - FEE: Payment of fees.\n - CIRCULAR_RECEIPT: Receipt of a payment to ourselves.\n - FORWARD: A forward through our node.\n - FORWARD_FEE: Fees earned from forwarding.\n - CIRCULAR_PAYMENT: Sending of a payment to ourselves.\n - CIRCULAR_FEE: The fees paid to send an off chain payment to ourselves.\n - SWEEP: A transaction that sweeps funds back into our wallet's control.\n - SWEEP_FEE: The amount of fees paid for a sweep transaction.\n - CHANNEL_CLOSE_FEE: The fees paid to close a channel."
|
|
},
|
|
"frdrpcExchangeRate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"timestamp": {
|
|
"type": "string",
|
|
"format": "uint64",
|
|
"description": "timestamp is the timestamp of the original request made."
|
|
},
|
|
"btc_price": {
|
|
"$ref": "#/definitions/frdrpcBitcoinPrice",
|
|
"description": "Price is the bitcoin price approximation for the timestamp queried. Note\nthat this value has its own timestamp because we are not guaranteed to get\nprice points for the exact timestamp that was queried."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcExchangeRateRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"timestamps": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"format": "uint64"
|
|
},
|
|
"description": "A set of timestamps for which we want the bitcoin price."
|
|
},
|
|
"granularity": {
|
|
"$ref": "#/definitions/frdrpcGranularity",
|
|
"description": "The level of granularity at which we want the bitcoin price to be quoted."
|
|
},
|
|
"fiat_backend": {
|
|
"$ref": "#/definitions/frdrpcFiatBackend",
|
|
"description": "The api to be used for fiat related queries."
|
|
},
|
|
"custom_prices": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/frdrpcBitcoinPrice"
|
|
},
|
|
"description": "Custom price points to use if the CUSTOM FiatBackend option is set."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcExchangeRateResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"rates": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/frdrpcExchangeRate"
|
|
},
|
|
"title": "Rates contains a set of exchange rates for the set of timestamps"
|
|
}
|
|
}
|
|
},
|
|
"frdrpcFiatBackend": {
|
|
"type": "string",
|
|
"enum": [
|
|
"UNKNOWN_FIATBACKEND",
|
|
"COINCAP",
|
|
"COINDESK",
|
|
"CUSTOM",
|
|
"COINGECKO",
|
|
"BITFINEX"
|
|
],
|
|
"default": "UNKNOWN_FIATBACKEND",
|
|
"description": "FiatBackend is the API endpoint to be used for any fiat related queries.\n\n - COINCAP: Use the CoinCap API for fiat price information.\nThis API is reached through the following URL:\nhttps://api.coincap.io/v2/assets/bitcoin/history\n - COINDESK: Use the CoinDesk API for fiat price information.\nThis API is reached through the following URL:\nhttps://api.coindesk.com/v1/bpi/historical/close.json\n - CUSTOM: Use custom price data provided in a CSV file for fiat price information.\n - COINGECKO: Use the CoinGecko API for fiat price information.\nThis API is reached through the following URL:\nhttps://api.coingecko.com/api/v3/coins/bitcoin/market_chart\n - BITFINEX: Use the Bitfinex API for fiat price information.\nThis API is reached through the following URL:\nhttps://api-pub.bitfinex.com/v2/candles/trade:1h:tBTCUSD/hist"
|
|
},
|
|
"frdrpcForwardingAbilityEntry": {
|
|
"type": "object",
|
|
"properties": {
|
|
"packed_idx": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"description": "The indices of the incoming and outgoing peers packed into a single\n32-bit integer: packed_idx = (in \u003c\u003c 16) | out. This caps the peer set at\n65535 peers per direction."
|
|
},
|
|
"effective_uptime_s": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "Seconds the peer pair held at least the requested liquidity floor of\ndirectional forwardable liquidity over the window."
|
|
},
|
|
"forwarded_sat": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "Total successfully forwarded amount over the window, in satoshis."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcForwardingAbilityResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"peers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"format": "byte"
|
|
},
|
|
"description": "Sorted list of unique compressed 33-byte public keys of the peers."
|
|
},
|
|
"entries": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/frdrpcForwardingAbilityEntry"
|
|
},
|
|
"description": "Sparse list of forwarding ability entries. An entry is present only for a\npair that forwarded volume, carrying its exact effective_uptime_s and\nforwarded_sat. Pairs that did not forward are never listed here; they are\neither flagged in quiet_uptime_bitmask or absent. Entries take precedence\nover the bitmask for the same pair."
|
|
},
|
|
"start_time": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "The start of the window the metrics cover, as unix seconds."
|
|
},
|
|
"end_time": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "The end of the window the metrics cover, as unix seconds."
|
|
},
|
|
"up_but_idle_bitmask": {
|
|
"type": "string",
|
|
"format": "byte",
|
|
"description": "A packed bitmask over the n*n ordered peer pairs, where n is the length\nof peers. The bit at index in*n+out is set when that pair held at least\nthe uptime_threshold fraction of effective uptime over the window but did\nnot forward: the dense \"up but idle\" population. A pair with a forwarded\nentry is never flagged here. A pair that is neither listed in entries nor\nflagged here had sub-threshold uptime and no forwards: treat it as zero."
|
|
},
|
|
"uptime_threshold": {
|
|
"type": "number",
|
|
"format": "double",
|
|
"description": "The uptime fraction in [0, 1] used to populate up_but_idle_bitmask,\nechoed back so consumers know the threshold the server applied."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcGranularity": {
|
|
"type": "string",
|
|
"enum": [
|
|
"UNKNOWN_GRANULARITY",
|
|
"MINUTE",
|
|
"FIVE_MINUTES",
|
|
"FIFTEEN_MINUTES",
|
|
"THIRTY_MINUTES",
|
|
"HOUR",
|
|
"SIX_HOURS",
|
|
"TWELVE_HOURS",
|
|
"DAY"
|
|
],
|
|
"default": "UNKNOWN_GRANULARITY",
|
|
"description": "Granularity describes the aggregation level at which the Bitcoin price should\nbe queried. Note that setting lower levels of granularity may require more\nqueries to the fiat backend."
|
|
},
|
|
"frdrpcNodeAuditRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"start_time": {
|
|
"type": "string",
|
|
"format": "uint64",
|
|
"description": "The unix time from which to produce the report, inclusive."
|
|
},
|
|
"end_time": {
|
|
"type": "string",
|
|
"format": "uint64",
|
|
"description": "The unix time until which to produce the report, exclusive."
|
|
},
|
|
"disable_fiat": {
|
|
"type": "boolean",
|
|
"description": "Set to generate a report without conversion to fiat. If set, fiat values\nwill display as 0."
|
|
},
|
|
"granularity": {
|
|
"$ref": "#/definitions/frdrpcGranularity",
|
|
"description": "The level of granularity at which we wish to produce fiat prices."
|
|
},
|
|
"custom_categories": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/frdrpcCustomCategory"
|
|
},
|
|
"description": "An optional set of custom categories which can be used to identify bespoke\ncategories in the report. Each category must have a unique name, and may not\nhave common identifier regexes. Transactions that are matched to these\ncategories report the category name in the CustomCategory field."
|
|
},
|
|
"fiat_backend": {
|
|
"$ref": "#/definitions/frdrpcFiatBackend",
|
|
"description": "The api to be used for fiat related queries."
|
|
},
|
|
"custom_prices": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/frdrpcBitcoinPrice"
|
|
},
|
|
"description": "Custom price points to use if the CUSTOM FiatBackend option is set."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcNodeAuditResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"reports": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/frdrpcReportEntry"
|
|
},
|
|
"description": "On chain reports for the period queried."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcPairReport": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount_outgoing_msat": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "Amount outgoing msat is the amount in millisatoshis that arrived\non the pair channel to be forwarded onwards by our channel."
|
|
},
|
|
"fees_outgoing_msat": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "Fees outgoing is the amount of fees in millisatoshis that we\nattribute to the channel for its role as the outgoing channel in\nforwards."
|
|
},
|
|
"amount_incoming_msat": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "Amount incoming msat is the amount in millisatoshis that arrived\non our channel to be forwarded onwards by the pair channel."
|
|
},
|
|
"fees_incoming_msat": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"description": "Fees incoming is the amount of fees in millisatoshis that we\nattribute to the channel for its role as the incoming channel in\nforwards."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcRecommendation": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chan_point": {
|
|
"type": "string",
|
|
"description": "The channel point [funding txid: outpoint] of the channel being considered\nfor close."
|
|
},
|
|
"value": {
|
|
"type": "number",
|
|
"format": "float",
|
|
"description": "The value of the metric that close recommendations were based on."
|
|
},
|
|
"recommend_close": {
|
|
"type": "boolean",
|
|
"description": "A boolean indicating whether we recommend closing the channel."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcReportEntry": {
|
|
"type": "object",
|
|
"properties": {
|
|
"timestamp": {
|
|
"type": "string",
|
|
"format": "uint64",
|
|
"description": "The unix timestamp of the event."
|
|
},
|
|
"on_chain": {
|
|
"type": "boolean",
|
|
"description": "Whether the entry occurred on chain or off chain."
|
|
},
|
|
"amount": {
|
|
"type": "string",
|
|
"format": "uint64",
|
|
"description": "The amount of the entry, expressed in millisatoshis."
|
|
},
|
|
"credit": {
|
|
"type": "boolean",
|
|
"description": "Whether the entry is a credit or a debit."
|
|
},
|
|
"asset": {
|
|
"type": "string",
|
|
"description": "The asset affected by the entry."
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/frdrpcEntryType",
|
|
"description": "The kind of activity that this entry represents."
|
|
},
|
|
"custom_category": {
|
|
"type": "string",
|
|
"description": "This field will be populated for entry type custom, and represents the name\nof a custom category that the report was produced with."
|
|
},
|
|
"txid": {
|
|
"type": "string",
|
|
"description": "The transaction id of the entry."
|
|
},
|
|
"fiat": {
|
|
"type": "string",
|
|
"description": "The fiat amount of the entry's amount in the currency specified in the\nbtc_price field."
|
|
},
|
|
"reference": {
|
|
"type": "string",
|
|
"description": "A unique identifier for the entry, if available."
|
|
},
|
|
"note": {
|
|
"type": "string",
|
|
"description": "An additional note for the entry, providing additional context."
|
|
},
|
|
"btc_price": {
|
|
"$ref": "#/definitions/frdrpcBitcoinPrice",
|
|
"description": "The bitcoin price and timestamp used to calculate our fiat value."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcRevenueReport": {
|
|
"type": "object",
|
|
"properties": {
|
|
"target_channel": {
|
|
"type": "string",
|
|
"description": "Target channel is the channel that the report is generated for; incoming\nfields in the report mean that this channel was the incoming channel,\nand the pair as the outgoing, outgoing fields mean that this channel was\nthe outgoing channel and the peer was the incoming channel."
|
|
},
|
|
"pair_reports": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/frdrpcPairReport"
|
|
},
|
|
"description": "Pair reports maps the channel point of a peer that we generated revenue\nwith to a report detailing the revenue."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcRevenueReportRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chan_points": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "The funding transaction outpoints for the channels to generate a revenue\nreport for. If this is empty, it will be generated for all open and closed\nchannels. Channel funding points should be expressed with the format\nfundingTxID:outpoint."
|
|
},
|
|
"start_time": {
|
|
"type": "string",
|
|
"format": "uint64",
|
|
"description": "Start time is beginning of the range over which the report will be\ngenerated, expressed as unix epoch offset in seconds."
|
|
},
|
|
"end_time": {
|
|
"type": "string",
|
|
"format": "uint64",
|
|
"description": "End time is end of the range over which the report will be\ngenerated, expressed as unix epoch offset in seconds."
|
|
}
|
|
}
|
|
},
|
|
"frdrpcRevenueReportResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"reports": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/frdrpcRevenueReport"
|
|
},
|
|
"description": "Reports is a set of pairwise revenue report generated for the channel(s)\nover the period specified."
|
|
}
|
|
}
|
|
},
|
|
"protobufAny": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@type": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": {}
|
|
},
|
|
"rpcStatus": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"details": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/protobufAny"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|