Skip to content

Commit f067b73

Browse files
rustyrussellsangbida
authored andcommitted
doc: provide realistic example for bkpr-report.
This should make the accountants happy! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 90b8610 commit f067b73

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

contrib/msggen/msggen/schema.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5227,6 +5227,30 @@
52275227
}
52285228
}
52295229
},
5230+
"examples": [
5231+
{
5232+
"request": {
5233+
"id": "example:bkpr-report#1",
5234+
"method": "bkpr-report",
5235+
"params": {
5236+
"headers": [
5237+
"Date,Tag,Account,Description,Credit,Debit,BTC/USD,Credit (USD),Debit(USD)"
5238+
],
5239+
"format": "{localtime},{tag},{account},{description?Invoice description {description}:{outpoint?Onchain output {outpoint}:{txid?Onchain transaction {txid}}}},{credit?+{credit}:0},{debit?-{debit}:0},{currencyrate},${currencycredit},${currencydebit}",
5240+
"escape": "csv"
5241+
}
5242+
},
5243+
"response": {
5244+
"report": [
5245+
"Date,Tag,Account,Description,Credit,Debit,BTC/USD,Credit (USD),Debit(USD)",
5246+
"2026-04-02 12:42:03,deposit,wallet,Onchain output 37562cf0b3a5d6783ae02925bcc486bb89afe156abf15e692736e5da9a060018:1,+0.02000000000,0,67140.89,$1342.81,$0.00",
5247+
"2026-04-02 12:42:04,invoice,9b3114c8003dc8dedbcf3b7bc9fb04e1575a1112aea33be8369ae9670aff64f4,Invoice description test_bkpr_report_invoice,0,-0.00000123456,67140.89,$0.00,$0.08",
5248+
"2026-04-02 12:42:04,onchain_fee,9b3114c8003dc8dedbcf3b7bc9fb04e1575a1112aea33be8369ae9670aff64f4,Onchain transaction f464ff0a67e99a36e83ba3ae12115a57e104fbc97b3bcfdbdec83d00c814319b,0,-0.00004927000,67140.89,$0.00,$3.30"
5249+
],
5250+
"format-hint": "simple"
5251+
}
5252+
}
5253+
],
52305254
"author": [
52315255
"Rusty Russell [rusty@rustcorp.com.au](mailto:rusty@rustcorp.com.au) is mainly responsible."
52325256
],

doc/schemas/bkpr-report.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,30 @@
113113
}
114114
}
115115
},
116+
"examples": [
117+
{
118+
"request": {
119+
"id": "example:bkpr-report#1",
120+
"method": "bkpr-report",
121+
"params": {
122+
"headers": [
123+
"Date,Tag,Account,Description,Credit,Debit,BTC/USD,Credit (USD),Debit(USD)"
124+
],
125+
"format": "{localtime},{tag},{account},{description?Invoice description {description}:{outpoint?Onchain output {outpoint}:{txid?Onchain transaction {txid}}}},{credit?+{credit}:0},{debit?-{debit}:0},{currencyrate},${currencycredit},${currencydebit}",
126+
"escape": "csv"
127+
}
128+
},
129+
"response": {
130+
"report": [
131+
"Date,Tag,Account,Description,Credit,Debit,BTC/USD,Credit (USD),Debit(USD)",
132+
"2026-04-02 12:42:03,deposit,wallet,Onchain output 37562cf0b3a5d6783ae02925bcc486bb89afe156abf15e692736e5da9a060018:1,+0.02000000000,0,67140.89,$1342.81,$0.00",
133+
"2026-04-02 12:42:04,invoice,9b3114c8003dc8dedbcf3b7bc9fb04e1575a1112aea33be8369ae9670aff64f4,Invoice description test_bkpr_report_invoice,0,-0.00000123456,67140.89,$0.00,$0.08",
134+
"2026-04-02 12:42:04,onchain_fee,9b3114c8003dc8dedbcf3b7bc9fb04e1575a1112aea33be8369ae9670aff64f4,Onchain transaction f464ff0a67e99a36e83ba3ae12115a57e104fbc97b3bcfdbdec83d00c814319b,0,-0.00004927000,67140.89,$0.00,$3.30"
135+
],
136+
"format-hint": "simple"
137+
}
138+
}
139+
],
116140
"author": [
117141
"Rusty Russell [rusty@rustcorp.com.au](mailto:rusty@rustcorp.com.au) is mainly responsible."
118142
],

0 commit comments

Comments
 (0)