2022-07-19 08:34:39 +01:00
|
|
|
{
|
|
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": false,
|
|
|
|
"required": [
|
|
|
|
"events"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"events": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": true,
|
|
|
|
"required": [
|
|
|
|
"account",
|
|
|
|
"type",
|
|
|
|
"tag",
|
|
|
|
"credit_msat",
|
|
|
|
"debit_msat",
|
|
|
|
"currency",
|
|
|
|
"timestamp"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"account": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "The account name. If the account is a channel, the channel_id"
|
|
|
|
},
|
|
|
|
"type": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"onchain_fee",
|
|
|
|
"chain",
|
|
|
|
"channel"
|
|
|
|
],
|
|
|
|
"description": "Coin movement type"
|
|
|
|
},
|
|
|
|
"tag": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "Description of movement"
|
|
|
|
},
|
|
|
|
"credit_msat": {
|
|
|
|
"type": "msat",
|
|
|
|
"description": "Amount credited"
|
|
|
|
},
|
|
|
|
"debit_msat": {
|
|
|
|
"type": "msat",
|
|
|
|
"description": "Amount debited"
|
|
|
|
},
|
|
|
|
"currency": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "human-readable bech32 part for this coin type"
|
|
|
|
},
|
|
|
|
"timestamp": {
|
|
|
|
"type": "u32",
|
|
|
|
"description": "Timestamp this event was recorded by the node. For consolidated events such as onchain_fees, the most recent timestamp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"if": {
|
|
|
|
"properties": {
|
|
|
|
"type": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"chain"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"then": {
|
|
|
|
"properties": {
|
|
|
|
"account": {},
|
|
|
|
"type": {},
|
|
|
|
"tag": {},
|
|
|
|
"credit_msat": {},
|
|
|
|
"debit_msat": {},
|
|
|
|
"currency": {},
|
|
|
|
"timestamp": {},
|
|
|
|
"outpoint": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "The txid:outnum for this event"
|
|
|
|
},
|
|
|
|
"blockheight": {
|
|
|
|
"type": "u32",
|
|
|
|
"description": "For chain events, blockheight this occured at"
|
|
|
|
},
|
|
|
|
"origin": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "The account this movement originated from"
|
|
|
|
},
|
|
|
|
"payment_id": {
|
|
|
|
"type": "hex",
|
|
|
|
"description": "lightning payment identifier. For an htlc, this will be the preimage."
|
|
|
|
},
|
|
|
|
"txid": {
|
|
|
|
"type": "txid",
|
|
|
|
"description": "The txid of the transaction that created this event"
|
2022-07-19 08:34:40 +01:00
|
|
|
},
|
|
|
|
"description": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "The description of this event"
|
2022-07-19 08:34:39 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"required": [
|
|
|
|
"outpoint",
|
|
|
|
"blockheight"
|
|
|
|
],
|
|
|
|
"additionalProperties": false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"if": {
|
|
|
|
"properties": {
|
|
|
|
"type": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"onchain_fee"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"then": {
|
|
|
|
"properties": {
|
|
|
|
"account": {},
|
|
|
|
"type": {},
|
|
|
|
"tag": {},
|
|
|
|
"credit_msat": {},
|
|
|
|
"debit_msat": {},
|
|
|
|
"currency": {},
|
|
|
|
"timestamp": {},
|
2022-07-19 08:34:40 +01:00
|
|
|
"description": {},
|
2022-07-19 08:34:39 +01:00
|
|
|
"txid": {
|
|
|
|
"type": "txid",
|
|
|
|
"description": "The txid of the transaction that created this event"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"required": [
|
|
|
|
"txid"
|
|
|
|
],
|
|
|
|
"additionalProperties": false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"if": {
|
|
|
|
"properties": {
|
|
|
|
"type": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"channel"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"then": {
|
|
|
|
"properties": {
|
|
|
|
"account": {},
|
|
|
|
"type": {},
|
|
|
|
"tag": {},
|
|
|
|
"credit_msat": {},
|
|
|
|
"debit_msat": {},
|
|
|
|
"currency": {},
|
|
|
|
"timestamp": {},
|
2022-07-19 08:34:40 +01:00
|
|
|
"description": {},
|
2022-07-19 08:34:39 +01:00
|
|
|
"fees_msat": {
|
|
|
|
"type": "msat",
|
|
|
|
"description": "Amount paid in fees"
|
|
|
|
},
|
bkpr: track channel rebalances, display in listincome
Track rebalances, and report income events for them.
Previously `listincome` would report:
- invoice event, debit, outgoing channel
- invoice_fee event, debit, outgoing channel
- invoice event, credit, inbound channel
Now reports:
- rebalance_fee, debit, outgoing channel
(same value as invoice_fee above)
Note: only applies on channel events; if a rebalance falls to chain
we'll use the older style of accounting.
Changelog-None
2022-07-31 22:55:58 +01:00
|
|
|
"is_rebalance": {
|
|
|
|
"type": "boolean",
|
|
|
|
"description": "Is this payment part of a rebalance"
|
|
|
|
},
|
2022-07-19 08:34:39 +01:00
|
|
|
"payment_id": {
|
|
|
|
"type": "hex",
|
|
|
|
"description": "lightning payment identifier. For an htlc, this will be the preimage."
|
|
|
|
},
|
|
|
|
"part_id": {
|
|
|
|
"type": "u32",
|
|
|
|
"description": "Counter for multi-part payments"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"additionalProperties": false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|