mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-12-28 01:24:42 +01:00
c3efba16ff
A small change in one routine creates a lot of changes! We actually recommended moving away from these in v0.7.0 (2019-02-28), but never deprecated them formally. Changelog-Deprecated: JSON-RPC: `pay`, `decode`, `decodepay`, `getroute`, `listinvoices`, `listpays` and `listsendpays` `msatoshi` fields (use `amount_msat`). Changelog-Deprecated: JSON-RPC: `getinfo` `msatoshi_fees_collected` field (use `fees_collected_msat`). Changelog-Deprecated: JSON-RPC: `listpeers` `channels`: `msatoshi_to_us`, `msatoshi_to_us_min`, `msatoshi_to_us_max`, `msatoshi_total`, `dust_limit_satoshis`, `our_channel_reserve_satoshis`, `their_channel_reserve_satoshis`, `spendable_msatoshi`, `receivable_msatoshi`, `in_msatoshi_offered`, `in_msatoshi_fulfilled`, `out_msatoshi_offered`, `out_msatoshi_fulfilled`, `max_htlc_value_in_flight_msat` and `htlc_minimum_msat` (use `to_us_msat`, `min_to_us_msat`, `max_to_us_msat`, `total_msat`, `dust_limit_msat`, `our_reserve_msat`, `their_reserve_msat`, `spendable_msat`, `receivable_msat`, `in_offered_msat`, `in_fulfilled_msat`, `out_offered_msat`, `out_fulfilled_msat`, `max_total_htlc_in_msat` and `minimum_htlc_in_msat`). Changelog-Deprecated: JSON-RPC: `listinvoices` and `pay` `msatoshi_received` and `msatoshi_sent` (use `amount_received_msat`, `amount_sent_msat`) Changelog-Deprecated: JSON-RPC: `listpays` and `listsendpays` `msatoshi_sent` (use `amount_sent_msat`) Changelog-Deprecated: JSON-RPC: `listforwards` `in_msatoshi`, `out_msatoshi` and `fee` (use `in_msat`, `out_msat` and `fee_msat`) Changelog-Deprecated: JSON-RPC: `listfunds` `outputs` `value` (use `amount_msat`) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
271 lines
7.5 KiB
JSON
271 lines
7.5 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"outputs",
|
|
"channels"
|
|
],
|
|
"properties": {
|
|
"outputs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"required": [
|
|
"txid",
|
|
"output",
|
|
"amount_msat",
|
|
"scriptpubkey",
|
|
"status",
|
|
"reserved"
|
|
],
|
|
"properties": {
|
|
"txid": {
|
|
"type": "txid",
|
|
"description": "the ID of the spendable transaction"
|
|
},
|
|
"output": {
|
|
"type": "u32",
|
|
"description": "the index within *txid*"
|
|
},
|
|
"amount_msat": {
|
|
"type": "msat",
|
|
"description": "the amount of the output"
|
|
},
|
|
"scriptpubkey": {
|
|
"type": "hex",
|
|
"description": "the scriptPubkey of the output"
|
|
},
|
|
"address": {
|
|
"type": "string",
|
|
"description": "the bitcoin address of the output"
|
|
},
|
|
"redeemscript": {
|
|
"type": "hex",
|
|
"description": "the redeemscript, only if it's p2sh-wrapped"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"unconfirmed",
|
|
"confirmed",
|
|
"spent"
|
|
]
|
|
},
|
|
"reserved": {
|
|
"type": "boolean",
|
|
"description": "whether this UTXO is currently reserved for an in-flight tx"
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"confirmed"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"blockheight"
|
|
],
|
|
"properties": {
|
|
"txid": {},
|
|
"output": {},
|
|
"amount_msat": {},
|
|
"scriptpubkey": {},
|
|
"address": {},
|
|
"value": {},
|
|
"redeemscript": {},
|
|
"status": {},
|
|
"reserved": {},
|
|
"reserved_to_block": {},
|
|
"blockheight": {
|
|
"type": "u32",
|
|
"description": "Block height where it was confirmed"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"reserved": {
|
|
"type": "boolean",
|
|
"enum": [
|
|
"true"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"reserved_to_block"
|
|
],
|
|
"properties": {
|
|
"txid": {},
|
|
"output": {},
|
|
"amount_msat": {},
|
|
"scriptpubkey": {},
|
|
"address": {},
|
|
"value": {},
|
|
"redeemscript": {},
|
|
"status": {},
|
|
"blockheight": {},
|
|
"reserved": {},
|
|
"reserved_to_block": {
|
|
"type": "u32",
|
|
"description": "Block height where reservation will expire"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"channels": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"required": [
|
|
"peer_id",
|
|
"our_amount_msat",
|
|
"amount_msat",
|
|
"funding_txid",
|
|
"funding_output",
|
|
"connected",
|
|
"state"
|
|
],
|
|
"properties": {
|
|
"peer_id": {
|
|
"type": "pubkey",
|
|
"description": "the peer with which the channel is opened"
|
|
},
|
|
"our_amount_msat": {
|
|
"type": "msat",
|
|
"description": "available satoshis on our node's end of the channel"
|
|
},
|
|
"channel_sat": {
|
|
"deprecated": true
|
|
},
|
|
"amount_msat": {
|
|
"type": "msat",
|
|
"description": "total channel value"
|
|
},
|
|
"channel_total_sat": {
|
|
"deprecated": true
|
|
},
|
|
"funding_txid": {
|
|
"type": "txid",
|
|
"description": "funding transaction id"
|
|
},
|
|
"funding_output": {
|
|
"type": "u32",
|
|
"description": "the 0-based index of the output in the funding transaction"
|
|
},
|
|
"connected": {
|
|
"type": "boolean",
|
|
"description": "whether the channel peer is connected"
|
|
},
|
|
"state": {
|
|
"type": "string",
|
|
"enum": [
|
|
"OPENINGD",
|
|
"CHANNELD_AWAITING_LOCKIN",
|
|
"CHANNELD_NORMAL",
|
|
"CHANNELD_SHUTTING_DOWN",
|
|
"CLOSINGD_SIGEXCHANGE",
|
|
"CLOSINGD_COMPLETE",
|
|
"AWAITING_UNILATERAL",
|
|
"FUNDING_SPEND_SEEN",
|
|
"ONCHAIN",
|
|
"DUALOPEND_OPEN_INIT",
|
|
"DUALOPEND_AWAITING_LOCKIN"
|
|
],
|
|
"description": "the channel state, in particular \"CHANNELD_NORMAL\" means the channel can be used normally"
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"state": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CHANNELD_NORMAL"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"short_channel_id"
|
|
],
|
|
"properties": {
|
|
"peer_id": {},
|
|
"our_amount_msat": {},
|
|
"channel_sat": {},
|
|
"amount_msat": {},
|
|
"channel_total_sat": {},
|
|
"funding_txid": {},
|
|
"funding_output": {},
|
|
"connected": {},
|
|
"state": {},
|
|
"short_channel_id": {
|
|
"type": "short_channel_id",
|
|
"description": "short channel id of channel"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"state": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CHANNELD_SHUTTING_DOWN",
|
|
"CLOSINGD_SIGEXCHANGE",
|
|
"CLOSINGD_COMPLETE",
|
|
"AWAITING_UNILATERAL",
|
|
"FUNDING_SPEND_SEEN",
|
|
"ONCHAIN"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"additionalProperties": false,
|
|
"required": [],
|
|
"properties": {
|
|
"peer_id": {},
|
|
"our_amount_msat": {},
|
|
"channel_sat": {},
|
|
"amount_msat": {},
|
|
"channel_total_sat": {},
|
|
"funding_txid": {},
|
|
"funding_output": {},
|
|
"connected": {},
|
|
"state": {},
|
|
"short_channel_id": {
|
|
"type": "short_channel_id",
|
|
"description": "short channel id of channel (only if funding reached lockin depth before closing)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|