mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-12-28 01:24:42 +01:00
36a2491a89
We had json_add_amount_msat_only(), which was designed to be used to print out msat fields, if we had sats. However, we misused it, so split it into the three different cases: 1. json_add_amount_sat_msat: We are using it correctly, with a field called xxx_msat. 2. json_add_amount_sats_deprecated: We were using it wrong, so deprecate the old field and create a new one which does end in _msat. 3. json_add_sats: we were using it to hand sats as a JSON parameter to an interface, where "XXXsat". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Deprecated: Plugins: `rbf_channel` and `openchannel2` hooks `their_funding` (use `their_funding_msat`) Changelog-Deprecated: Plugins: `openchannel2` hook `dust_limit_satoshis` (use `dust_limit_msat`) Changelog-Deprecated: Plugins: `openchannel` hook `funding_satoshis` (use `funding_msat`) Changelog-Deprecated: Plugins: `openchannel` hook `dust_limit_satoshis` (use `dust_limit_msat`) Changelog-Deprecated: Plugins: `openchannel` hook `channel_reserve_satoshis` (use `channel_reserve_msat`) Changelog-Deprecated: Plugins: `channel_opened` notification `amount` (use `funding_msat`) Changelog-Deprecated: JSON-RPC: `listtransactions` `msat` (use `amount_msat`) Changelog-Deprecated: Plugins: `htlc_accepted` `forward_amount` (use `forward_msat`)
177 lines
5.4 KiB
JSON
177 lines
5.4 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"transactions"
|
|
],
|
|
"properties": {
|
|
"transactions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"hash",
|
|
"rawtx",
|
|
"blockheight",
|
|
"txindex",
|
|
"locktime",
|
|
"version",
|
|
"inputs",
|
|
"outputs"
|
|
],
|
|
"properties": {
|
|
"hash": {
|
|
"type": "txid",
|
|
"description": "the transaction id"
|
|
},
|
|
"rawtx": {
|
|
"type": "hex",
|
|
"description": "the raw transaction"
|
|
},
|
|
"blockheight": {
|
|
"type": "u32",
|
|
"description": "the block height of this tx"
|
|
},
|
|
"txindex": {
|
|
"type": "u32",
|
|
"description": "the transaction number within the block"
|
|
},
|
|
"type": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"theirs",
|
|
"deposit",
|
|
"withdraw",
|
|
"channel_funding",
|
|
"channel_mutual_close",
|
|
"channel_unilateral_close",
|
|
"channel_sweep",
|
|
"channel_htlc_success",
|
|
"channel_htlc_timeout",
|
|
"channel_penalty",
|
|
"channel_unilateral_cheat"
|
|
],
|
|
"description": "Reason we care about this transaction (*EXPERIMENTAL_FEATURES* only)"
|
|
}
|
|
},
|
|
"channel": {
|
|
"type": "short_channel_id",
|
|
"description": "the channel this transaction is associated with (*EXPERIMENTAL_FEATURES* only)"
|
|
},
|
|
"locktime": {
|
|
"type": "u32",
|
|
"description": "The nLocktime for this tx"
|
|
},
|
|
"version": {
|
|
"type": "u32",
|
|
"description": "The nVersion for this tx"
|
|
},
|
|
"inputs": {
|
|
"type": "array",
|
|
"description": "Each input, in order",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"txid",
|
|
"index",
|
|
"sequence"
|
|
],
|
|
"properties": {
|
|
"txid": {
|
|
"type": "txid",
|
|
"description": "the transaction id spent"
|
|
},
|
|
"index": {
|
|
"type": "u32",
|
|
"description": "the output spent"
|
|
},
|
|
"sequence": {
|
|
"type": "u32",
|
|
"description": "the nSequence value"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"theirs",
|
|
"deposit",
|
|
"withdraw",
|
|
"channel_funding",
|
|
"channel_mutual_close",
|
|
"channel_unilateral_close",
|
|
"channel_sweep",
|
|
"channel_htlc_success",
|
|
"channel_htlc_timeout",
|
|
"channel_penalty",
|
|
"channel_unilateral_cheat"
|
|
],
|
|
"description": "the purpose of this input (*EXPERIMENTAL_FEATURES* only)"
|
|
},
|
|
"channel": {
|
|
"type": "short_channel_id",
|
|
"description": "the channel this input is associated with (*EXPERIMENTAL_FEATURES* only)"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"outputs": {
|
|
"type": "array",
|
|
"description": "Each output, in order",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"index",
|
|
"amount_msat",
|
|
"scriptPubKey"
|
|
],
|
|
"properties": {
|
|
"index": {
|
|
"type": "u32",
|
|
"description": "the 0-based output number"
|
|
},
|
|
"amount_msat": {
|
|
"type": "msat",
|
|
"description": "the amount of the output"
|
|
},
|
|
"msat": {
|
|
"deprecated": true
|
|
},
|
|
"scriptPubKey": {
|
|
"type": "hex",
|
|
"description": "the scriptPubKey"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"theirs",
|
|
"deposit",
|
|
"withdraw",
|
|
"channel_funding",
|
|
"channel_mutual_close",
|
|
"channel_unilateral_close",
|
|
"channel_sweep",
|
|
"channel_htlc_success",
|
|
"channel_htlc_timeout",
|
|
"channel_penalty",
|
|
"channel_unilateral_cheat"
|
|
],
|
|
"description": "the purpose of this output (*EXPERIMENTAL_FEATURES* only)"
|
|
},
|
|
"channel": {
|
|
"type": "short_channel_id",
|
|
"description": "the channel this output is associated with (*EXPERIMENTAL_FEATURES* only)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|