diff --git a/doc/lightning-addgossip.7.md b/doc/lightning-addgossip.7.md index 5d009fba1..fba520c5a 100644 --- a/doc/lightning-addgossip.7.md +++ b/doc/lightning-addgossip.7.md @@ -42,4 +42,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:86b47e27413141ffd6e8b79d83ac4a5cc80e5a7e6f5ba4b0df6825e744f9eea7) +[comment]: # ( SHA256STAMP:1a64fbaed63ffee21df3d46956a6dca193982b1b135a9b095e68652a720c77ac) diff --git a/doc/lightning-autocleaninvoice.7.md b/doc/lightning-autocleaninvoice.7.md index cfcc8c6dc..270f63b87 100644 --- a/doc/lightning-autocleaninvoice.7.md +++ b/doc/lightning-autocleaninvoice.7.md @@ -50,4 +50,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:dc9caae8f7ca886630f2685ea972fb1113ffcfd5a5e46c2d212c3c4bbc4e5f44) +[comment]: # ( SHA256STAMP:4506a00326dbfa7d44cbf891ad31cbfa66351d852aa0c58735bae03d32938edb) diff --git a/doc/lightning-check.7.md b/doc/lightning-check.7.md index 2747771e1..a15bba93e 100644 --- a/doc/lightning-check.7.md +++ b/doc/lightning-check.7.md @@ -40,4 +40,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:47419eb2a6d8d83866773a49170f6fa6047de01435d602fa08487c59d87fb93c) +[comment]: # ( SHA256STAMP:10d986d91af6315ee755d119cb1b77f306e2360105191116282f3faead350ce8) diff --git a/doc/lightning-checkmessage.7.md b/doc/lightning-checkmessage.7.md index b12f988e0..da056b3fc 100644 --- a/doc/lightning-checkmessage.7.md +++ b/doc/lightning-checkmessage.7.md @@ -50,4 +50,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:eb1ea64cb5e8e16e8e7214f38184b60f2c30d8e7f68db1623fabda665bf1fdec) +[comment]: # ( SHA256STAMP:6df0e61e28118786861aacc073e3289268fe1b00837c3fd02a537aa13e5acae5) diff --git a/doc/lightning-close.7.md b/doc/lightning-close.7.md index b4bb0e21b..c88b6b87f 100644 --- a/doc/lightning-close.7.md +++ b/doc/lightning-close.7.md @@ -133,4 +133,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:db5ba99eb3393f6c55833f0bbace34b3ca504d490a25cb26c53b8790ae325981) +[comment]: # ( SHA256STAMP:3540adff8d75123f90598a2c0657924c0d5a53aa26716980f9a59879fcfb1f6b) diff --git a/doc/lightning-connect.7.md b/doc/lightning-connect.7.md index 8801b1599..2209f67ec 100644 --- a/doc/lightning-connect.7.md +++ b/doc/lightning-connect.7.md @@ -89,4 +89,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:306d0966721f20c9a8688f33a030114a5ac095c6218eeb7fafd88fca97b9ee52) +[comment]: # ( SHA256STAMP:540ce22f5d912b59732b8b2659e4a950d1344eb926901e26476a246d9eb473b8) diff --git a/doc/lightning-createinvoice.7.md b/doc/lightning-createinvoice.7.md index 9c6610690..459c206c7 100644 --- a/doc/lightning-createinvoice.7.md +++ b/doc/lightning-createinvoice.7.md @@ -74,4 +74,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:4582bb142f91497a1bc09a10c745d5c03b5540c6c53675426a6c5c5d079420a9) +[comment]: # ( SHA256STAMP:ea89ed849c8ad6cac8e1e136999046d1f7589bf176be0e65438174357f87ed11) diff --git a/doc/lightning-createonion.7.md b/doc/lightning-createonion.7.md index 402a0d485..b35d33836 100644 --- a/doc/lightning-createonion.7.md +++ b/doc/lightning-createonion.7.md @@ -136,4 +136,4 @@ RESOURCES Main web site: [bolt04]: https://github.com/lightningnetwork/lightning-rfc/blob/master/04-onion-routing.md -[comment]: # ( SHA256STAMP:a00e746c41b59c6f34fb4a875cf3bf1cded7101f3e4d6d5b35f577d6aca6387f) +[comment]: # ( SHA256STAMP:23e999fedfde74a200c0e6626fa828548b3b60952de30c5885cd63b1922f4508) diff --git a/doc/lightning-datastore.7.md b/doc/lightning-datastore.7.md index 3be24c720..cc81552bf 100644 --- a/doc/lightning-datastore.7.md +++ b/doc/lightning-datastore.7.md @@ -65,4 +65,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:fd53ebaf7190249460f62aa509010207dbdbc3ae3c90279f49d3c61d4a621c7d) +[comment]: # ( SHA256STAMP:89e1f4926dd83df233b92aae626de776ec3bb2d29887ec29e8cf479ee2a16b85) diff --git a/doc/lightning-decode.7.md b/doc/lightning-decode.7.md index 07eceb288..6708071ed 100644 --- a/doc/lightning-decode.7.md +++ b/doc/lightning-decode.7.md @@ -180,4 +180,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:7ddb369a73cb0bf8782e2176d0726e13015d9099f71a5ceda39d3e1cb7cd2241) +[comment]: # ( SHA256STAMP:cd4a18d07c23b6a995f8db7cac25344e340e512c786b8cf743f56ecceeb84960) diff --git a/doc/lightning-decodepay.7.md b/doc/lightning-decodepay.7.md index e7b72ffaf..e74da14f6 100644 --- a/doc/lightning-decodepay.7.md +++ b/doc/lightning-decodepay.7.md @@ -69,4 +69,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:b6cf489b74ca9719c8adc7d17115f8109d61e288e77f8b3bed02ac64d7ede08f) +[comment]: # ( SHA256STAMP:d92e1197708fff40f8ad71ccec3c0d8122d8088da1803c02bb042b09dbf2ee33) diff --git a/doc/lightning-deldatastore.7.md b/doc/lightning-deldatastore.7.md index fa8855b03..477887641 100644 --- a/doc/lightning-deldatastore.7.md +++ b/doc/lightning-deldatastore.7.md @@ -48,4 +48,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:b9d59e2d14e91b9440f75fc1577e9f26848821d87d8281e5ca2393adf412fa0d) +[comment]: # ( SHA256STAMP:ac7468cf6eadc8ab85216b4d5ecb55a32f3d0bc84180f477151c3748901824de) diff --git a/doc/lightning-delexpiredinvoice.7.md b/doc/lightning-delexpiredinvoice.7.md index 447a1d346..664661ac6 100644 --- a/doc/lightning-delexpiredinvoice.7.md +++ b/doc/lightning-delexpiredinvoice.7.md @@ -38,4 +38,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:cfc042477a22946d8f3a07fbecf543a0063a73b54f955b1fc6adc4e8a294ec32) +[comment]: # ( SHA256STAMP:20cca78dbc3681427e1d536ba2f81e0bc05e2b5209edf884137f2ad25e642e84) diff --git a/doc/lightning-delinvoice.7.md b/doc/lightning-delinvoice.7.md index 714cd4988..935c3e80d 100644 --- a/doc/lightning-delinvoice.7.md +++ b/doc/lightning-delinvoice.7.md @@ -73,4 +73,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:63d72da38a7b758ef7fb7f3a35fbb1c48fd3f3c2a5bffef6559fc98dccd77cf6) +[comment]: # ( SHA256STAMP:cd3b009a6ef0c220ca21c6d8e3a5716ca2080997016cf00a2e26defc03cfac73) diff --git a/doc/lightning-delpay.7.md b/doc/lightning-delpay.7.md index 9d532363c..a5c32f37f 100644 --- a/doc/lightning-delpay.7.md +++ b/doc/lightning-delpay.7.md @@ -101,4 +101,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:2fe7a92ce837282fc473f8f56b2040910fb1dcf8d0d7768fda5695dd5a5b4f01) +[comment]: # ( SHA256STAMP:af8299cd87efe8254969069851d99bffffa033013f4a8b9fc94cdab6cfa0ff78) diff --git a/doc/lightning-disableoffer.7.md b/doc/lightning-disableoffer.7.md index d70c0ff46..652d4fdd2 100644 --- a/doc/lightning-disableoffer.7.md +++ b/doc/lightning-disableoffer.7.md @@ -74,4 +74,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:75f31b4614cfb2083d7f5c5de17d0892aae8504434da600132668b326fa4e0a4) +[comment]: # ( SHA256STAMP:a7dbc87d991d1040283b5fbfe732fb9bc7c81efad3aa8b5bfb11ffe59ed3f069) diff --git a/doc/lightning-disconnect.7.md b/doc/lightning-disconnect.7.md index 8d5b60bb5..19424cdef 100644 --- a/doc/lightning-disconnect.7.md +++ b/doc/lightning-disconnect.7.md @@ -59,4 +59,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:86b47e27413141ffd6e8b79d83ac4a5cc80e5a7e6f5ba4b0df6825e744f9eea7) +[comment]: # ( SHA256STAMP:1a64fbaed63ffee21df3d46956a6dca193982b1b135a9b095e68652a720c77ac) diff --git a/doc/lightning-feerates.7.md b/doc/lightning-feerates.7.md index 1770699d5..d1beb1eab 100644 --- a/doc/lightning-feerates.7.md +++ b/doc/lightning-feerates.7.md @@ -119,4 +119,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:aa3360c535d2f7e42adead8e78a290a21c5bd88d412f9afa53dfe7388c7edeab) +[comment]: # ( SHA256STAMP:8fe321fcba7b3a471f4f83f98638dbc820fc0abe91f3d53ca55fdb0222e17a8d) diff --git a/doc/lightning-fetchinvoice.7.md b/doc/lightning-fetchinvoice.7.md index 39253cdfb..bb7c3f34c 100644 --- a/doc/lightning-fetchinvoice.7.md +++ b/doc/lightning-fetchinvoice.7.md @@ -88,4 +88,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:5820acc18bb293035f040e2079363cd2ae03fd31be0c4de78b957502fbd31b4e) +[comment]: # ( SHA256STAMP:e0033e40d86355e51abb48472f802a9a713ed5b2725828467515f9541207dac5) diff --git a/doc/lightning-fundchannel.7.md b/doc/lightning-fundchannel.7.md index b1b120509..1861d3b57 100644 --- a/doc/lightning-fundchannel.7.md +++ b/doc/lightning-fundchannel.7.md @@ -113,4 +113,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:43dfc7b25dad697f3589492a5bdcd895b8edbc2d39e9edb6a9c18313fac9ca50) +[comment]: # ( SHA256STAMP:4a8d7c524cfe257f961531929d14d3589efb6ecd182a33e92aade30af90406f8) diff --git a/doc/lightning-fundchannel_cancel.7.md b/doc/lightning-fundchannel_cancel.7.md index 9815ff5d0..55133d910 100644 --- a/doc/lightning-fundchannel_cancel.7.md +++ b/doc/lightning-fundchannel_cancel.7.md @@ -59,4 +59,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:9c612f1a2569f40743dff555768e2138ce31f7794eeec06d5ff834461be2e45a) +[comment]: # ( SHA256STAMP:d433fc29ad064a09c92160038973c7161bb56947166a2701c0d5d278e276917c) diff --git a/doc/lightning-fundchannel_complete.7.md b/doc/lightning-fundchannel_complete.7.md index 0b6cbdc54..e1690fe20 100644 --- a/doc/lightning-fundchannel_complete.7.md +++ b/doc/lightning-fundchannel_complete.7.md @@ -61,4 +61,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:29c1e2bbc878ffb6b7e41f552afc608af58e335a329c79d09680e8e2995ff0d5) +[comment]: # ( SHA256STAMP:6fad848d20b3e0a6085790085b0aa91d24cc33e4b0127fc40521ce9c102182d1) diff --git a/doc/lightning-fundchannel_start.7.md b/doc/lightning-fundchannel_start.7.md index 4e501d14a..af9694d4b 100644 --- a/doc/lightning-fundchannel_start.7.md +++ b/doc/lightning-fundchannel_start.7.md @@ -79,4 +79,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:8d7a9f3cf343f7c72148a5d0b1aa0217cd9ef91e8c618dc2ff1077b15b9f25d4) +[comment]: # ( SHA256STAMP:eab533b02f2bffecef27724078461ed25f3a9b729c2432b80bbdc35aea670ca2) diff --git a/doc/lightning-funderupdate.7.md b/doc/lightning-funderupdate.7.md index 1be23d842..cec36163b 100644 --- a/doc/lightning-funderupdate.7.md +++ b/doc/lightning-funderupdate.7.md @@ -146,4 +146,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:ed47e802b2e61f46461f5b65312c8c4de40e64a0970d1d745e59d63201dbfae8) +[comment]: # ( SHA256STAMP:01be8ecebe9025991de323bde9bc41591a9cde1b106fa01fc328451d31eb9a70) diff --git a/doc/lightning-fundpsbt.7.md b/doc/lightning-fundpsbt.7.md index d9b61d637..4dfca65eb 100644 --- a/doc/lightning-fundpsbt.7.md +++ b/doc/lightning-fundpsbt.7.md @@ -115,4 +115,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:fd84205c50f43a2e55b0adb1c4d0709cd5d909c211148b005674e8e1afffba53) +[comment]: # ( SHA256STAMP:635cc321d158bcdb3ca24f13c9955cc9b867e34247c1cf3d91edbbe21eb06a48) diff --git a/doc/lightning-getinfo.7.md b/doc/lightning-getinfo.7.md index 1d6bd5187..40e1f98d0 100644 --- a/doc/lightning-getinfo.7.md +++ b/doc/lightning-getinfo.7.md @@ -117,4 +117,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:50c41a77a5f440cc22e5df9e3748e4280cd4508469887382690c580f10bc5af4) +[comment]: # ( SHA256STAMP:8374064ca0f95ab0c20d3edaf7f3742316af98f4d1e0e8de88922524f1ea3ce5) diff --git a/doc/lightning-getlog.7.md b/doc/lightning-getlog.7.md index d7b18f92b..3637fe010 100644 --- a/doc/lightning-getlog.7.md +++ b/doc/lightning-getlog.7.md @@ -90,4 +90,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:155507c9105521bb4c113232d9bc6fd585cce269303ee8e7e27ea803ca8405cf) +[comment]: # ( SHA256STAMP:963fc75819ffb63271f25e31f30a6fe54457803d8bf296556589f76874fb39c0) diff --git a/doc/lightning-getroute.7.md b/doc/lightning-getroute.7.md index c004a2f75..f597678cd 100644 --- a/doc/lightning-getroute.7.md +++ b/doc/lightning-getroute.7.md @@ -309,4 +309,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:a297c66baaf5dd18528e4e8bc1bac3348536fed7be474f1c26475b88198a2c1e) +[comment]: # ( SHA256STAMP:0c1f92ff24ae0277fed3cf3fd41f2f45e4a57558a4b61fc51a1a698b4f3d8f01) diff --git a/doc/lightning-getsharedsecret.7.md b/doc/lightning-getsharedsecret.7.md index 7b337c500..72b24eedc 100644 --- a/doc/lightning-getsharedsecret.7.md +++ b/doc/lightning-getsharedsecret.7.md @@ -91,4 +91,4 @@ RESOURCES * Main web site: -[comment]: # ( SHA256STAMP:41cce7390624f69aeac9118887ac751825087e0ef792cff8d5197500af9539ba) +[comment]: # ( SHA256STAMP:e54898c6b950be6242a641212b71b6ce33ea31068f3572cd42be5d2b87365eb7) diff --git a/doc/lightning-help.7.md b/doc/lightning-help.7.md index 6b5739320..2bccd6cc7 100644 --- a/doc/lightning-help.7.md +++ b/doc/lightning-help.7.md @@ -67,4 +67,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:2e41227e559aac229adc2cab0f0a2e591ed0ad33218bfe8647ce4022f25332fd) +[comment]: # ( SHA256STAMP:262fdbfc6ea8142c57637e5c48a9536b0e8577ef823ebfc830cc0c14d56fb08d) diff --git a/doc/lightning-invoice.7.md b/doc/lightning-invoice.7.md index ada739a9b..692eea431 100644 --- a/doc/lightning-invoice.7.md +++ b/doc/lightning-invoice.7.md @@ -113,4 +113,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:a65026d45e3a70b98c97d838c08748f873aeab20321d930de17fb45cf5022848) +[comment]: # ( SHA256STAMP:f7d82473482e5454fc03641fddcfa97984e6a597e7ad377ced2cbed1512e91ed) diff --git a/doc/lightning-keysend.7.md b/doc/lightning-keysend.7.md index 7759d70cc..559d9813f 100644 --- a/doc/lightning-keysend.7.md +++ b/doc/lightning-keysend.7.md @@ -114,4 +114,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:1c931f2ff49a169011ca6c2abde58281570a1db0dfbdca829105999723fe8bb8) +[comment]: # ( SHA256STAMP:bf507985544575c4ef2fe194fda6a693378cb8ab3bfb30ca7a7c066be271be29) diff --git a/doc/lightning-listchannels.7.md b/doc/lightning-listchannels.7.md index a1876b168..1cc762ec1 100644 --- a/doc/lightning-listchannels.7.md +++ b/doc/lightning-listchannels.7.md @@ -77,4 +77,4 @@ Lightning RFC site - BOLT \#7: -[comment]: # ( SHA256STAMP:ab173bcd769b6abd351a670e63be6adfbdfb0c24abcef157c0912b28f86d2250) +[comment]: # ( SHA256STAMP:c2ebd6407a66ad5f67b5fd933552a468e306b1fed7868f92985c24e321861fae) diff --git a/doc/lightning-listconfigs.7 b/doc/lightning-listconfigs.7 index 1ef66bf32..5818f32f4 100644 --- a/doc/lightning-listconfigs.7 +++ b/doc/lightning-listconfigs.7 @@ -92,6 +92,8 @@ On success, an object is returned, containing: .IP \[bu] \fBexperimental-shutdown-wrong-funding\fR (boolean, optional): \fBexperimental-shutdown-wrong-funding\fR field from config or cmdline, or default .IP \[bu] +\fBexperimental-websocket-port\fR (u16, optional): \fBexperimental-websocket-port\fR field from config or cmdline, or default +.IP \[bu] \fBrgb\fR (hex, optional): \fBrgb\fR field from config or cmdline, or default (always 6 characters) .IP \[bu] \fBalias\fR (string, optional): \fBalias\fR field from config or cmdline, or default @@ -120,6 +122,8 @@ On success, an object is returned, containing: .IP \[bu] \fBmax-concurrent-htlcs\fR (u32, optional): \fBmax-concurrent-htlcs\fR field from config or cmdline, or default .IP \[bu] +\fBmax-dust-htlc-exposure-msat\fR (msat, optional): \fBmax-dust-htlc-exposure-mast\fR field from config or cmdline, or default +.IP \[bu] \fBmin-capacity-sat\fR (u64, optional): \fBmin-capacity-sat\fR field from config or cmdline, or default .IP \[bu] \fBaddr\fR (string, optional): \fBaddr\fR field from config or cmdline (can be more than one) @@ -152,6 +156,8 @@ On success, an object is returned, containing: .IP \[bu] \fBsubdaemon\fR (string, optional): \fBsubdaemon\fR fields from config or cmdline if any (can be more than one) .IP \[bu] +\fBfetchinvoice-noconnect\fR (boolean, optional): \fBfeatchinvoice-noconnect\fR fileds from config or cmdline, or default +.IP \[bu] \fBtor-service-password\fR (string, optional): \fBtor-service-password\fR field from config or cmdline, if any .RE @@ -270,4 +276,4 @@ Vincenzo Palazzo \fI wrote the initial versi Main web site: \fIhttps://github.com/ElementsProject/lightning\fR -\" SHA256STAMP:b6e48314de5642ec61a3e2c989ac0197630c2a3c0e8e6d86020b597679049400 +\" SHA256STAMP:37b3fd1b2c5b2c903c25579f96d0bb4116955f3aebbf6bbb97f8a62e352cf440 diff --git a/doc/lightning-listconfigs.7.md b/doc/lightning-listconfigs.7.md index bddae8497..b61f7d01f 100644 --- a/doc/lightning-listconfigs.7.md +++ b/doc/lightning-listconfigs.7.md @@ -208,4 +208,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:71a911b67203f75e7c1f717be611f505713fce4e8113fc4a84c89bc50730d2bf) +[comment]: # ( SHA256STAMP:59b197ad256bd701744ed5aa9f663166e48ef6320cf3a1538af0bd855daa3186) diff --git a/doc/lightning-listdatastore.7.md b/doc/lightning-listdatastore.7.md index e88a93307..316e719e9 100644 --- a/doc/lightning-listdatastore.7.md +++ b/doc/lightning-listdatastore.7.md @@ -46,4 +46,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:052a5b86380b78fe292fae2f0378b4bd3d200f838a6ad36e0ee8bed619cb9d1c) +[comment]: # ( SHA256STAMP:1e5d31c36f5aa2d2cb6bedb07a94b18880ba95529885c104b177d91bf251d420) diff --git a/doc/lightning-listforwards.7.md b/doc/lightning-listforwards.7.md index 9d2ad9d77..1ff8b2b70 100644 --- a/doc/lightning-listforwards.7.md +++ b/doc/lightning-listforwards.7.md @@ -58,4 +58,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:8d5189bf6f515520f1acd225f372e1123378eab01b032313b5956089a635c2f7) +[comment]: # ( SHA256STAMP:abfaaa00817734d8acb77d02d7c024112c90605a8f93a134971a617ab4d383f9) diff --git a/doc/lightning-listfunds.7.md b/doc/lightning-listfunds.7.md index 248938f26..a2a5ec3a7 100644 --- a/doc/lightning-listfunds.7.md +++ b/doc/lightning-listfunds.7.md @@ -37,7 +37,7 @@ On success, an object is returned, containing: - **reserved_to_block** (u32): Block height where reservation will expire - **channels** (array of objects): - **peer_id** (pubkey): the peer with which the channel is opened - - **our_amount_msat** (msat): available satoshis on our node's end of the channel + - **our_amount_msat** (msat): available satoshis on our node’s end of the channel - **amount_msat** (msat): total channel value - **funding_txid** (txid): funding transaction id - **funding_output** (u32): the 0-based index of the output in the funding transaction @@ -67,4 +67,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:26ae5f60c67eb3a481191ccf109b09ded7dc14d2881898b9f0173ef05a2ef47b) +[comment]: # ( SHA256STAMP:7e2ee47b9e35c222ee8b671745990800feaba771cf60fbe8390c2afd040e878f) diff --git a/doc/lightning-listinvoices.7.md b/doc/lightning-listinvoices.7.md index eed0b2c48..763a8d232 100644 --- a/doc/lightning-listinvoices.7.md +++ b/doc/lightning-listinvoices.7.md @@ -56,4 +56,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:5fc525b5436359e2271f4131a626bcd1654792d980e478738a0564dcedb58761) +[comment]: # ( SHA256STAMP:3dc5d5b8f7796d29e0d174d96e93915cbc7131b173a1547de022e021c55e8db6) diff --git a/doc/lightning-listnodes.7.md b/doc/lightning-listnodes.7.md index 59208b5a9..39d184904 100644 --- a/doc/lightning-listnodes.7.md +++ b/doc/lightning-listnodes.7.md @@ -95,4 +95,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:f9e1f4655b416c5e60279cf11a832bc4c652f503e48095dc3cf39deee5f0c769) +[comment]: # ( SHA256STAMP:4a5cfb1cf3d7fd77e49d6e7e369a9a6d374345b011d7db2fa9b4062156869ca4) diff --git a/doc/lightning-listoffers.7.md b/doc/lightning-listoffers.7.md index 7cf74ee2e..baca636d2 100644 --- a/doc/lightning-listoffers.7.md +++ b/doc/lightning-listoffers.7.md @@ -80,4 +80,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:12402a6d1f50df80e6efa5f10de38911385e2e5386e67d38d15b7045d661c78a) +[comment]: # ( SHA256STAMP:5cae5e0e423e66b02602ecc433de9686b16630979e794944059c65a100f54f9e) diff --git a/doc/lightning-listpays.7.md b/doc/lightning-listpays.7.md index da8e5e66a..a862b51e1 100644 --- a/doc/lightning-listpays.7.md +++ b/doc/lightning-listpays.7.md @@ -56,4 +56,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:7dd58bcc0886cc981dff1534fac6753a4554c801a6c03e8ed7295166fcd5f89d) +[comment]: # ( SHA256STAMP:6ffbb1273de04f356cf79dab9a988ab030eee3317cb22e10d12d1c672249fc67) diff --git a/doc/lightning-listpeers.7.md b/doc/lightning-listpeers.7.md index 6bdf46e5c..f3ff7e96b 100644 --- a/doc/lightning-listpeers.7.md +++ b/doc/lightning-listpeers.7.md @@ -376,4 +376,4 @@ Main web site: Lightning RFC site (BOLT \#9): -[comment]: # ( SHA256STAMP:7d11de5d2ff844d6f9e4b8093bd135c7a38d17f159ba7aca4821c5365ca11e71) +[comment]: # ( SHA256STAMP:956a13291bebc808bf1505a5d2030280aca441c5ca9991a6baae70c8715429a4) diff --git a/doc/lightning-listsendpays.7.md b/doc/lightning-listsendpays.7.md index fc8c1e8b1..941078994 100644 --- a/doc/lightning-listsendpays.7.md +++ b/doc/lightning-listsendpays.7.md @@ -60,4 +60,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:4a3ec9bd1d5b1959856d3822245e94793712d23f82f5909a415125810bdcd538) +[comment]: # ( SHA256STAMP:1dfcb495e0004b9dadffd7f69b58275bf9168c9f4007675b390ebbaea07ffde6) diff --git a/doc/lightning-listtransactions.7.md b/doc/lightning-listtransactions.7.md index b0f7fc179..767a92bde 100644 --- a/doc/lightning-listtransactions.7.md +++ b/doc/lightning-listtransactions.7.md @@ -104,4 +104,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:f170fb4e2ab3bf44d6159f9bcf5445102db3774f19cb61e7b8c68acfaac51688) +[comment]: # ( SHA256STAMP:ba0624377601e6e90c2ca90b709fd076f3ed0f2b813f73553ec6b935eeec54a1) diff --git a/doc/lightning-multifundchannel.7.md b/doc/lightning-multifundchannel.7.md index 2cd8a062d..e42b0a228 100644 --- a/doc/lightning-multifundchannel.7.md +++ b/doc/lightning-multifundchannel.7.md @@ -158,4 +158,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:acad87896396156dff379973010ed1243af8bbb3ee5cfcc052ca177e0725bce3) +[comment]: # ( SHA256STAMP:a6358ad8d361ae4104c727e6b8ab342923a613b78d5f13552794f827a1125e8b) diff --git a/doc/lightning-multiwithdraw.7.md b/doc/lightning-multiwithdraw.7.md index e756698d6..52b5379d8 100644 --- a/doc/lightning-multiwithdraw.7.md +++ b/doc/lightning-multiwithdraw.7.md @@ -71,4 +71,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:0b374dbb074a5eed153d6a153526c20bd1681f67245dfc42a8ec3a2f1510c6b5) +[comment]: # ( SHA256STAMP:044cdcd69e6ece931b6d0f9b25dd842fd456ee479725e610c03694210256583f) diff --git a/doc/lightning-newaddr.7.md b/doc/lightning-newaddr.7.md index ca616c307..e2dda2a4c 100644 --- a/doc/lightning-newaddr.7.md +++ b/doc/lightning-newaddr.7.md @@ -55,4 +55,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:af64240aaa930f899eda7b146a5cdc22abb7572d20ff6f9012097a84b3affeaa) +[comment]: # ( SHA256STAMP:1a7b5336bdb0dbc93c9e160bb36c20c0d0d3fb908bdd85a84499fbc99680f3a6) diff --git a/doc/lightning-notifications.7.md b/doc/lightning-notifications.7.md index bd190df2c..5667fb773 100644 --- a/doc/lightning-notifications.7.md +++ b/doc/lightning-notifications.7.md @@ -102,4 +102,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:86b47e27413141ffd6e8b79d83ac4a5cc80e5a7e6f5ba4b0df6825e744f9eea7) +[comment]: # ( SHA256STAMP:1a64fbaed63ffee21df3d46956a6dca193982b1b135a9b095e68652a720c77ac) diff --git a/doc/lightning-offer.7.md b/doc/lightning-offer.7.md index bc6d5421b..0fa3a4218 100644 --- a/doc/lightning-offer.7.md +++ b/doc/lightning-offer.7.md @@ -134,4 +134,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:c35ff51ba9c0f373c22cbf42504d1328299e5af0e37e7ae3f80324ff2c10100a) +[comment]: # ( SHA256STAMP:4bbcec9c30f77239db780945965ad5cccf702365c3e592921fac57ed6bfd080f) diff --git a/doc/lightning-offerout.7.md b/doc/lightning-offerout.7.md index b52d408c7..a70db8707 100644 --- a/doc/lightning-offerout.7.md +++ b/doc/lightning-offerout.7.md @@ -99,4 +99,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:99a4e1cdf68ec7bcf05b9d6b088b8a84f01d085fae5a1565192f488ff8484570) +[comment]: # ( SHA256STAMP:fb60c3239f3d47b421f842304263ec73f864a307b77e39265653c3e85880a483) diff --git a/doc/lightning-openchannel_abort.7.md b/doc/lightning-openchannel_abort.7.md index a379edba6..77748c6af 100644 --- a/doc/lightning-openchannel_abort.7.md +++ b/doc/lightning-openchannel_abort.7.md @@ -54,4 +54,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:898dd91de80eb022badf10bb572af5ad9211f17364207a1837f15dd0bc252eca) +[comment]: # ( SHA256STAMP:78d6fbc1044e3a499ca618ea71845aa04043f46c169f4f50763644c7a3e35572) diff --git a/doc/lightning-openchannel_bump.7.md b/doc/lightning-openchannel_bump.7.md index e1940d185..2eb748c4c 100644 --- a/doc/lightning-openchannel_bump.7.md +++ b/doc/lightning-openchannel_bump.7.md @@ -80,4 +80,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:4c15f6f42116769c12494154266359e025753150ec7862937c2864fd99dd3d45) +[comment]: # ( SHA256STAMP:0b3c4fc19cdad9162b91585c4af2dc5293ecd8925628d10b612cd777dcdedeea) diff --git a/doc/lightning-openchannel_init.7.md b/doc/lightning-openchannel_init.7.md index a4052ad6f..bd043a91c 100644 --- a/doc/lightning-openchannel_init.7.md +++ b/doc/lightning-openchannel_init.7.md @@ -102,4 +102,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:d37b879bb07c8a29c3733620792bff777d8316e22cea9abd38efca9585a790e0) +[comment]: # ( SHA256STAMP:bd405699ff27104ccc97dec81be9de1e7459c91333d78616268e4e9c198ee5af) diff --git a/doc/lightning-openchannel_signed.7.md b/doc/lightning-openchannel_signed.7.md index 38270bfc8..51dec370a 100644 --- a/doc/lightning-openchannel_signed.7.md +++ b/doc/lightning-openchannel_signed.7.md @@ -66,4 +66,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:d0d4435e0b0885f8f3685ea381cf0b020db2ff1ea5ca44c7d0d09e59d0419cc7) +[comment]: # ( SHA256STAMP:d85297e1ab0b3bbf206082c479dcfdc6469461e531321ce5576c6ff7f296d481) diff --git a/doc/lightning-openchannel_update.7.md b/doc/lightning-openchannel_update.7.md index 825774062..55618e278 100644 --- a/doc/lightning-openchannel_update.7.md +++ b/doc/lightning-openchannel_update.7.md @@ -71,4 +71,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:a8f8b9f3ad51bea47548602a73c4e0844b8ed1493054a226ec97397ccef25aa4) +[comment]: # ( SHA256STAMP:22ff9536e97ea194d9d9ba10a4f3244a0818a1605502b7ed25241a3a97f041d1) diff --git a/doc/lightning-parsefeerate.7.md b/doc/lightning-parsefeerate.7.md index 6635b9a57..8afc62370 100644 --- a/doc/lightning-parsefeerate.7.md +++ b/doc/lightning-parsefeerate.7.md @@ -43,4 +43,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:a7bb800571a9ae47b3fb417ef02ce62de8afb2a710c45961b4871e270b4560d9) +[comment]: # ( SHA256STAMP:045cab2977c7fcc12ed5267d4007a704028a00bc07f90265ed1cd7a46a414e63) diff --git a/doc/lightning-pay.7.md b/doc/lightning-pay.7.md index cc241c8eb..49dc3be81 100644 --- a/doc/lightning-pay.7.md +++ b/doc/lightning-pay.7.md @@ -143,4 +143,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:1c931f2ff49a169011ca6c2abde58281570a1db0dfbdca829105999723fe8bb8) +[comment]: # ( SHA256STAMP:bf507985544575c4ef2fe194fda6a693378cb8ab3bfb30ca7a7c066be271be29) diff --git a/doc/lightning-ping.7.md b/doc/lightning-ping.7.md index 9408b06f2..225b48bf7 100644 --- a/doc/lightning-ping.7.md +++ b/doc/lightning-ping.7.md @@ -69,4 +69,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:aa91cd20bea0156c4b2b2ca377945c383ad3ae06d31b972fbce9fc1999cfbc70) +[comment]: # ( SHA256STAMP:a78a1d58cfe1fbf654ee58aad20ffcaa075f63bd8774c64be5ec28857e95ae3b) diff --git a/doc/lightning-plugin.7.md b/doc/lightning-plugin.7.md index d7759f927..3b4f455c1 100644 --- a/doc/lightning-plugin.7.md +++ b/doc/lightning-plugin.7.md @@ -62,4 +62,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:418af4df95dc56c0d1bf1d42dded0a5fcbc875800a603d80ea6d18bb2ff0b531) +[comment]: # ( SHA256STAMP:a07c71d232c39c0b959d07b9391d107413841753b67443d5f3698e1afd9cd2e4) diff --git a/doc/lightning-reserveinputs.7.md b/doc/lightning-reserveinputs.7.md index ac799598d..2cdc30649 100644 --- a/doc/lightning-reserveinputs.7.md +++ b/doc/lightning-reserveinputs.7.md @@ -63,4 +63,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:77e6483379efd12bde3532e3d86a4305c83c7ab31819eef4b1ec0a993f6d24bc) +[comment]: # ( SHA256STAMP:a675e16a820eca4da07743ace010deaa12aa51d2c3d73d4db6b32ffb8ee65f7a) diff --git a/doc/lightning-sendcustommsg.7.md b/doc/lightning-sendcustommsg.7.md index 1517b3eb5..a7ef72579 100644 --- a/doc/lightning-sendcustommsg.7.md +++ b/doc/lightning-sendcustommsg.7.md @@ -68,4 +68,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:ebaf8137d91cab5c0899dc749079ab5f1bbe8df998c155b41496b80820128af3) +[comment]: # ( SHA256STAMP:f07e2df415b1ec2ad7b19acdd2909616d7aa54bb3c5ae69359d4c8b87ee839bf) diff --git a/doc/lightning-sendinvoice.7.md b/doc/lightning-sendinvoice.7.md index 4c2c02c18..6ca11f5dc 100644 --- a/doc/lightning-sendinvoice.7.md +++ b/doc/lightning-sendinvoice.7.md @@ -78,4 +78,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:4788ac272caee6e3dc8200cfbaf9dafffd2d10880b33f3d06e067767c1e0eee8) +[comment]: # ( SHA256STAMP:b4cf6c380589a566c695e96f3668294b4411a57c7724aa68b293bac9e2194462) diff --git a/doc/lightning-sendonion.7.md b/doc/lightning-sendonion.7.md index c906c38f9..ad88418c6 100644 --- a/doc/lightning-sendonion.7.md +++ b/doc/lightning-sendonion.7.md @@ -127,4 +127,4 @@ RESOURCES Main web site: [bolt04]: https://github.com/lightningnetwork/lightning-rfc/blob/master/04-onion-routing.md -[comment]: # ( SHA256STAMP:aeade675a3e42ffc0b7be2bfefe429fdc5b52e6f4000687db90dfffd5b0b588d) +[comment]: # ( SHA256STAMP:d588d85b79f709a57441479504ee8761331c852284ebb8effeab91a557437517) diff --git a/doc/lightning-sendonionmessage.7.md b/doc/lightning-sendonionmessage.7.md index b371e9c96..03627a56a 100644 --- a/doc/lightning-sendonionmessage.7.md +++ b/doc/lightning-sendonionmessage.7.md @@ -50,4 +50,4 @@ Main web site: [bolt04]: https://github.com/lightningnetwork/lightning-rfc/blob/master/04-onion-routing.md -[comment]: # ( SHA256STAMP:9125b71f093569c584c116210e488f11331029fca930dada6c040009daeb09f8) +[comment]: # ( SHA256STAMP:39a66bd8e28db8780d7b1365372f7cc638b32a80bb5515657d381b4520f06901) diff --git a/doc/lightning-sendpay.7.md b/doc/lightning-sendpay.7.md index 1bcddd7fc..41e4ec2c3 100644 --- a/doc/lightning-sendpay.7.md +++ b/doc/lightning-sendpay.7.md @@ -127,4 +127,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:f7572da509a442c08f73460c042d8e2aa950747ce175ebb9b89d32b88add6de6) +[comment]: # ( SHA256STAMP:44540ace609ccfa7b023526d7a92ba7cf4a6058f3ae2124c20fa65b92137e41b) diff --git a/doc/lightning-sendpsbt.7.md b/doc/lightning-sendpsbt.7.md index 33eba7570..fd150b9d3 100644 --- a/doc/lightning-sendpsbt.7.md +++ b/doc/lightning-sendpsbt.7.md @@ -65,4 +65,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:0b374dbb074a5eed153d6a153526c20bd1681f67245dfc42a8ec3a2f1510c6b5) +[comment]: # ( SHA256STAMP:044cdcd69e6ece931b6d0f9b25dd842fd456ee479725e610c03694210256583f) diff --git a/doc/lightning-setchannelfee.7.md b/doc/lightning-setchannelfee.7.md index da2b8c161..cefcf6f4d 100644 --- a/doc/lightning-setchannelfee.7.md +++ b/doc/lightning-setchannelfee.7.md @@ -81,4 +81,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:1f040269076ac47e5ed973225bfddbcffdec83dd91f6df143d29bcb981de04ed) +[comment]: # ( SHA256STAMP:2245fde48f1858886e0f484cb3d96331fef9c41b0081ae51478d912189c38907) diff --git a/doc/lightning-signmessage.7.md b/doc/lightning-signmessage.7.md index 86e125dce..86fa363fd 100644 --- a/doc/lightning-signmessage.7.md +++ b/doc/lightning-signmessage.7.md @@ -41,4 +41,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:54ed4ed0f8e10de232b82793ffa6a1794ef632f8fd315deeb276803f6f2d639d) +[comment]: # ( SHA256STAMP:028ade4d84a65b0438347897f4ff5cfc99b5f22d8320b606c9630a1f9da16ef2) diff --git a/doc/lightning-signpsbt.7.md b/doc/lightning-signpsbt.7.md index ed479897f..cef87f311 100644 --- a/doc/lightning-signpsbt.7.md +++ b/doc/lightning-signpsbt.7.md @@ -71,4 +71,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:d306b6b0c64e9739bf6a3c6751137f23da6300c6cd8abc3fcd7ebfae9caae732) +[comment]: # ( SHA256STAMP:5f7bc2a5f8b6fe72bf70caa3ff14d6f1260c2d366becbc7798ee3bb0374e0b1b) diff --git a/doc/lightning-stop.7.md b/doc/lightning-stop.7.md index f5f79a9f1..3c86d5194 100644 --- a/doc/lightning-stop.7.md +++ b/doc/lightning-stop.7.md @@ -42,4 +42,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:42c2ed4003d088c2b42260d7c1098ae81cfe2f91fb6fce3a7dffe6b8729a5181) +[comment]: # ( SHA256STAMP:bbdf7415bc7de519ca944c28326c334d9f014f4c987d7e3017ac628c6d1c55ec) diff --git a/doc/lightning-txdiscard.7.md b/doc/lightning-txdiscard.7.md index 8cd8a5aca..114432830 100644 --- a/doc/lightning-txdiscard.7.md +++ b/doc/lightning-txdiscard.7.md @@ -44,4 +44,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:1edb3d89e7c231cae344baf6bacf658bbd104c751b1e7dc6a32bb83d102a98eb) +[comment]: # ( SHA256STAMP:ced935d8d9047fe1dfb746fc72aafc5b99a8b7b639f854a56478884e5205ffb9) diff --git a/doc/lightning-txprepare.7.md b/doc/lightning-txprepare.7.md index 0d7ad3c9e..dcc46344a 100644 --- a/doc/lightning-txprepare.7.md +++ b/doc/lightning-txprepare.7.md @@ -84,4 +84,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:3b18b65b58bce0ce6fcacd49d86b6da2b59828c4b3474d1de0f6ab76d810044c) +[comment]: # ( SHA256STAMP:f16a12290870442316c8f3fb552627637610ab6a7cfed9082089040c78dce2be) diff --git a/doc/lightning-txsend.7.md b/doc/lightning-txsend.7.md index 6505ca628..8bb18b6c1 100644 --- a/doc/lightning-txsend.7.md +++ b/doc/lightning-txsend.7.md @@ -44,4 +44,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:f97eb686421f6c9636a97100787cb3af3b482e07434d9e2b158ed09f06335f32) +[comment]: # ( SHA256STAMP:5bf27f1cbcb247cde5c5570f90be77fc7e8b3e8c80622e75c31e6ac445f2b910) diff --git a/doc/lightning-unreserveinputs.7.md b/doc/lightning-unreserveinputs.7.md index 14106f3bf..869adbb3f 100644 --- a/doc/lightning-unreserveinputs.7.md +++ b/doc/lightning-unreserveinputs.7.md @@ -53,4 +53,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:4239256a270c707e6beb2da43fb5069ebc59affb9f22df8fc67c19229aca3f44) +[comment]: # ( SHA256STAMP:f7aca3e1a40d66e07986cb9e98033e815c4eea2237dc75664a6c47951a8132ed) diff --git a/doc/lightning-utxopsbt.7.md b/doc/lightning-utxopsbt.7.md index bf111880e..01db6aede 100644 --- a/doc/lightning-utxopsbt.7.md +++ b/doc/lightning-utxopsbt.7.md @@ -100,4 +100,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:3be73c6c58be24510cfa792ad428990664ebf1e01d6cdb8c245607aea376d79a) +[comment]: # ( SHA256STAMP:3c3734a0eb4c2fabf216e11e729ad582cb1fb91dbcb8d2bfc44d56f3206f20fc) diff --git a/doc/lightning-waitanyinvoice.7.md b/doc/lightning-waitanyinvoice.7.md index a4e818490..6dafab1ad 100644 --- a/doc/lightning-waitanyinvoice.7.md +++ b/doc/lightning-waitanyinvoice.7.md @@ -73,4 +73,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:53448470413976900d69dfd360b36e16b893b2db2bb959ee06bdfc7a98e58d7b) +[comment]: # ( SHA256STAMP:33df5fb9bcbcb6d2240d0d18b970b2300414aae36b81fb276fcedfc21480d22f) diff --git a/doc/lightning-waitblockheight.7.md b/doc/lightning-waitblockheight.7.md index 2605244fa..a84561bac 100644 --- a/doc/lightning-waitblockheight.7.md +++ b/doc/lightning-waitblockheight.7.md @@ -38,4 +38,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:bf58d803775bc97144d92449d85de21189fa00fe9cec22bd64bc7cde87ebfe06) +[comment]: # ( SHA256STAMP:98f9993935e2820e8e407d1743764346ca6fa1b72228cc82827617a2ed3f3c80) diff --git a/doc/lightning-waitinvoice.7.md b/doc/lightning-waitinvoice.7.md index 9d4cad467..c3447b5ad 100644 --- a/doc/lightning-waitinvoice.7.md +++ b/doc/lightning-waitinvoice.7.md @@ -58,4 +58,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:53448470413976900d69dfd360b36e16b893b2db2bb959ee06bdfc7a98e58d7b) +[comment]: # ( SHA256STAMP:33df5fb9bcbcb6d2240d0d18b970b2300414aae36b81fb276fcedfc21480d22f) diff --git a/doc/lightning-waitsendpay.7.md b/doc/lightning-waitsendpay.7.md index 42d526d09..abca8ea0e 100644 --- a/doc/lightning-waitsendpay.7.md +++ b/doc/lightning-waitsendpay.7.md @@ -101,4 +101,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:c40814f929fb6d741e0724ba75f0833e52fae1f03ed2d1fac9a8ba1186ceabab) +[comment]: # ( SHA256STAMP:3f89cf80acc1e9363509f0a053a617f8b381790823f8cd05fa6c708eb72fcc7e) diff --git a/doc/lightning-withdraw.7.md b/doc/lightning-withdraw.7.md index aec49c362..204f2131c 100644 --- a/doc/lightning-withdraw.7.md +++ b/doc/lightning-withdraw.7.md @@ -73,4 +73,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:10741263b2d8890b368d48ab7be8d2fc9bd149afa73c5ba7022dfb6903f0135d) +[comment]: # ( SHA256STAMP:cef8d48a59313019e671900621426733d47be2f0c22d5cb2d06ce0b9b7d43592) diff --git a/doc/schemas/addgossip.schema.json b/doc/schemas/addgossip.schema.json index b797a82c2..1aad2dcae 100644 --- a/doc/schemas/addgossip.schema.json +++ b/doc/schemas/addgossip.schema.json @@ -1,7 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "properties": { - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": {} } diff --git a/doc/schemas/autocleaninvoice.schema.json b/doc/schemas/autocleaninvoice.schema.json index 7ed3db3d5..f370eee56 100644 --- a/doc/schemas/autocleaninvoice.schema.json +++ b/doc/schemas/autocleaninvoice.schema.json @@ -1,41 +1,48 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "required": [ "enabled" ], - "properties": { - "enabled": { - "type": "boolean", - "description": "whether invoice autocleaning is active" - } - }, - "if": { - "properties": { - "enabled": { - "type": "boolean", - "enum": [ true ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "expired_by", "cycle_seconds" ], - "properties": { - "enabled": { }, - "expired_by": { - "type": "u64", - "description": "how long an invoice must be expired (seconds) before we delete it" - }, - "cycle_seconds": { - "type": "u64", - "description": "how long an invoice must be expired (seconds) before we delete it" - } - } - }, - "else": { - "additionalProperties": false, - "properties": { - "enabled": { } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "whether invoice autocleaning is active" } + }, + "if": { + "properties": { + "enabled": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "expired_by", + "cycle_seconds" + ], + "properties": { + "enabled": {}, + "expired_by": { + "type": "u64", + "description": "how long an invoice must be expired (seconds) before we delete it" + }, + "cycle_seconds": { + "type": "u64", + "description": "how long an invoice must be expired (seconds) before we delete it" + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "enabled": {} + } + } } diff --git a/doc/schemas/check.schema.json b/doc/schemas/check.schema.json index faecc7d78..5b4010afb 100644 --- a/doc/schemas/check.schema.json +++ b/doc/schemas/check.schema.json @@ -1,12 +1,14 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "properties": { - "command_to_check": { - "type": "string", - "description": "the *command_to_check* argument" - } - }, - "required": [ "command_to_check" ] + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": { + "command_to_check": { + "type": "string", + "description": "the *command_to_check* argument" + } + }, + "required": [ + "command_to_check" + ] } diff --git a/doc/schemas/checkmessage.schema.json b/doc/schemas/checkmessage.schema.json index 7bc2833bd..c4bd81988 100644 --- a/doc/schemas/checkmessage.schema.json +++ b/doc/schemas/checkmessage.schema.json @@ -1,56 +1,66 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ "verified" ], - "additionalProperties": true, - "properties": { - "verified": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "verified" + ], + "additionalProperties": true, + "properties": { + "verified": { + "type": "boolean", + "description": "Whether the signature was valid" + } + }, + "allOf": [ + { + "if": { + "properties": { + "verified": { "type": "boolean", - "description": "Whether the signature was valid" + "enum": [ + true + ] + } } + }, + "then": { + "additionalProperties": false, + "required": [ + "pubkey" + ], + "properties": { + "verified": {}, + "pubkey": { + "type": "pubkey", + "description": "the *pubkey* parameter, or the pubkey found by looking for known nodes" + } + } + } }, - "allOf": [ - { - "if": { - "properties": { - "verified": { - "type": "boolean", - "enum": [ true ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "pubkey" ], - "properties": { - "verified": { }, - "pubkey": { - "type": "pubkey", - "description": "the *pubkey* parameter, or the pubkey found by looking for known nodes" - } - } - } - }, - { - "if": { - "properties": { - "verified": { - "type": "boolean", - "enum": [ false ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "pubkey" ], - "properties": { - "verified": { }, - "pubkey": { - "type": "pubkey", - "description": "the *pubkey* (if any) which could have signed this; this is usually not useful!" - } - } - } - } - ] + { + "if": { + "properties": { + "verified": { + "type": "boolean", + "enum": [ + false + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "pubkey" + ], + "properties": { + "verified": {}, + "pubkey": { + "type": "pubkey", + "description": "the *pubkey* (if any) which could have signed this; this is usually not useful!" + } + } + } + } + ] } diff --git a/doc/schemas/close.schema.json b/doc/schemas/close.schema.json index b28dee645..8e547dae3 100644 --- a/doc/schemas/close.schema.json +++ b/doc/schemas/close.schema.json @@ -1,41 +1,53 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ "type" ], - "properties": { - "type": { - "type": "string", - "enum": [ "mutual", "unilateral", "unopened" ], - "description": "Whether we successfully negotiated a mutual close, closed without them, or discarded not-yet-opened channel" - } - }, - "if": { - "properties": { - "type": { - "type": "string", - "enum": [ "mutual", "unilateral" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "tx", "txid" ], - "properties": { - "type": { }, - "tx": { - "type": "hex", - "description": "the raw bitcoin transaction used to close the channel (if it was open)" - }, - "txid": { - "type": "txid", - "description": "the transaction id of the *tx* field" - } - } - }, - "else": { - "additionalProperties": false, - "properties": { - "type": { } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mutual", + "unilateral", + "unopened" + ], + "description": "Whether we successfully negotiated a mutual close, closed without them, or discarded not-yet-opened channel" } + }, + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "mutual", + "unilateral" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "tx", + "txid" + ], + "properties": { + "type": {}, + "tx": { + "type": "hex", + "description": "the raw bitcoin transaction used to close the channel (if it was open)" + }, + "txid": { + "type": "txid", + "description": "the transaction id of the *tx* field" + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "type": {} + } + } } diff --git a/doc/schemas/connect.schema.json b/doc/schemas/connect.schema.json index 3ce55591c..557292b65 100644 --- a/doc/schemas/connect.schema.json +++ b/doc/schemas/connect.schema.json @@ -1,82 +1,110 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "id", "features", "direction", "address" ], - "properties": { - "id": { - "type": "pubkey", - "description": "the peer we connected to" - }, - "features": { - "type": "hex", - "description": "BOLT 9 features bitmap offered by peer" - }, - "direction": { - "type": "string", - "enum": [ "in", "out" ], - "description": "Whether they initiated connection or we did" - }, - "address": { - "type": "object", - "description": "Address information (mainly useful if **direction** is *out*)", - "additionalProperties": true, - "required": [ "type" ], - "properties": { - "type": { - "type": "string", - "enum": [ "local socket", "ipv4", "ipv6", "torv2", "torv3" ], - "description": "Type of connection (*torv2*/*torv3* only if **direction** is *out*)" - } - }, - "allOf": [ - { - "if": { - "properties": { - "type": { - "type": "string", - "enum": [ "local socket" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "socket" ], - "properties": { - "type": { }, - "socket": { - "type": "string", - "description": "socket filename" - } - } - } - }, - { - "if": { - "properties": { - "type": { - "type": "string", - "enum": [ "ipv4", "ipv6", "torv2", "torv3" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "address", "port" ], - "properties": { - "type": { }, - "address": { - "type": "string", - "description": "address in expected format for **type**" - }, - "port": { - "type": "u16", - "description": "port number" - } - } - } - } - ] - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "features", + "direction", + "address" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "the peer we connected to" + }, + "features": { + "type": "hex", + "description": "BOLT 9 features bitmap offered by peer" + }, + "direction": { + "type": "string", + "enum": [ + "in", + "out" + ], + "description": "Whether they initiated connection or we did" + }, + "address": { + "type": "object", + "description": "Address information (mainly useful if **direction** is *out*)", + "additionalProperties": true, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local socket", + "ipv4", + "ipv6", + "torv2", + "torv3" + ], + "description": "Type of connection (*torv2*/*torv3* only if **direction** is *out*)" + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "local socket" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "socket" + ], + "properties": { + "type": {}, + "socket": { + "type": "string", + "description": "socket filename" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "ipv4", + "ipv6", + "torv2", + "torv3" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "address", + "port" + ], + "properties": { + "type": {}, + "address": { + "type": "string", + "description": "address in expected format for **type**" + }, + "port": { + "type": "u16", + "description": "port number" + } + } + } + } + ] } + } } diff --git a/doc/schemas/createinvoice.schema.json b/doc/schemas/createinvoice.schema.json index 8e79c8094..f1d6e1828 100644 --- a/doc/schemas/createinvoice.schema.json +++ b/doc/schemas/createinvoice.schema.json @@ -1,71 +1,81 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "label", "payment_hash", "status", "description", "expires_at" ], - "properties": { - "label": { - "type": "string", - "description": "the label for the invoice" - }, - "bolt11": { - "type": "string", - "description": "the bolt11 string (always present unless **bolt12** is)" - }, - "bolt12": { - "type": "string", - "description": "the bolt12 string instead of **bolt11** (**experimental-offers** only)" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "amount_msat": { - "type": "msat", - "description": "The amount of the invoice (if it has one)" - }, - "status": { - "type": "string", - "enum": [ "paid", "expired", "unpaid" ], - "description": "Whether it has been paid, or can no longer be paid" - }, - "description": { - "type": "string", - "description": "Description extracted from **bolt11** or **bolt12**" - }, - "expires_at": { - "type": "u64", - "description": "UNIX timestamp of when invoice expires (or expired)" - }, - "pay_index": { - "type": "u64", - "description": "Incrementing id for when this was paid (**status** *paid* only)" - }, - "amount_received_msat": { - "type": "msat", - "description": "Amount actually received (**status** *paid* only)" - }, - "paid_at": { - "type": "u64", - "description": "UNIX timestamp of when invoice was paid (**status** *paid* only)" - }, - "payment_preimage": { - "type": "hex", - "description": "the proof of payment: SHA256 of this **payment_hash**", - "maxLength": 64, - "minLength": 64 - }, - "local_offer_id": { - "type": "hex", - "description": "the *id* of our offer which created this invoice (**experimental-offers** only).", - "maxLength": 64, - "minLength": 64 - }, - "payer_note": { - "type": "string", - "description": "the optional *payer_note* from invoice_request which created this invoice (**experimental-offers** only)." - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "label", + "payment_hash", + "status", + "description", + "expires_at" + ], + "properties": { + "label": { + "type": "string", + "description": "the label for the invoice" + }, + "bolt11": { + "type": "string", + "description": "the bolt11 string (always present unless **bolt12** is)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string instead of **bolt11** (**experimental-offers** only)" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "amount_msat": { + "type": "msat", + "description": "The amount of the invoice (if it has one)" + }, + "status": { + "type": "string", + "enum": [ + "paid", + "expired", + "unpaid" + ], + "description": "Whether it has been paid, or can no longer be paid" + }, + "description": { + "type": "string", + "description": "Description extracted from **bolt11** or **bolt12**" + }, + "expires_at": { + "type": "u64", + "description": "UNIX timestamp of when invoice expires (or expired)" + }, + "pay_index": { + "type": "u64", + "description": "Incrementing id for when this was paid (**status** *paid* only)" + }, + "amount_received_msat": { + "type": "msat", + "description": "Amount actually received (**status** *paid* only)" + }, + "paid_at": { + "type": "u64", + "description": "UNIX timestamp of when invoice was paid (**status** *paid* only)" + }, + "payment_preimage": { + "type": "hex", + "description": "the proof of payment: SHA256 of this **payment_hash**", + "maxLength": 64, + "minLength": 64 + }, + "local_offer_id": { + "type": "hex", + "description": "the *id* of our offer which created this invoice (**experimental-offers** only).", + "maxLength": 64, + "minLength": 64 + }, + "payer_note": { + "type": "string", + "description": "the optional *payer_note* from invoice_request which created this invoice (**experimental-offers** only)." } + } } diff --git a/doc/schemas/createonion.schema.json b/doc/schemas/createonion.schema.json index 7917163e1..7b4df9923 100644 --- a/doc/schemas/createonion.schema.json +++ b/doc/schemas/createonion.schema.json @@ -1,22 +1,25 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "onion", "shared_secrets" ], - "properties": { - "onion": { - "type": "hex", - "description": "the onion packet (*onion_size* bytes)" - }, - "shared_secrets": { - "type": "array", - "description": "one shared secret for each node in the *hops* parameter", - "items": { - "type": "hex", - "description": "the shared secret with this hop", - "maxLength": 64, - "minLength": 64 - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "onion", + "shared_secrets" + ], + "properties": { + "onion": { + "type": "hex", + "description": "the onion packet (*onion_size* bytes)" + }, + "shared_secrets": { + "type": "array", + "description": "one shared secret for each node in the *hops* parameter", + "items": { + "type": "hex", + "description": "the shared secret with this hop", + "maxLength": 64, + "minLength": 64 + } } + } } diff --git a/doc/schemas/datastore.schema.json b/doc/schemas/datastore.schema.json index 783642a4f..92aa07704 100644 --- a/doc/schemas/datastore.schema.json +++ b/doc/schemas/datastore.schema.json @@ -1,27 +1,29 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "key" ], - "properties": { - "key": { - "type": "array", - "items": { - "type": "string", - "description": "Part of the key added to the datastore" - } - }, - "generation": { - "type": "u64", - "description": "The number of times this has been updated" - }, - "hex": { - "type": "hex", - "description": "The hex data which has been added to the datastore" - }, - "string": { - "type": "string", - "description": "The data as a string, if it's valid utf-8" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "key" + ], + "properties": { + "key": { + "type": "array", + "items": { + "type": "string", + "description": "Part of the key added to the datastore" + } + }, + "generation": { + "type": "u64", + "description": "The number of times this has been updated" + }, + "hex": { + "type": "hex", + "description": "The hex data which has been added to the datastore" + }, + "string": { + "type": "string", + "description": "The data as a string, if it's valid utf-8" } + } } diff --git a/doc/schemas/decode.schema.json b/doc/schemas/decode.schema.json index d985e365a..9e12c1588 100644 --- a/doc/schemas/decode.schema.json +++ b/doc/schemas/decode.schema.json @@ -1,802 +1,908 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ "type", "valid" ], - "properties": { - "type": { - "type": "string", - "enum": [ "bolt12 offer", "bolt12 invoice", "bolt12 invoice_request", "bolt11 invoice" ], - "description": "what kind of object it decoded to" - }, - "valid": { - "type": "boolean", - "description": "if this is false, you *MUST* not use the result except for diagnostics!" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "type", + "valid" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt12 offer", + "bolt12 invoice", + "bolt12 invoice_request", + "bolt11 invoice" + ], + "description": "what kind of object it decoded to" }, - "allOf": [ - { - "if": { - "properties": { - "type": { - "type": "string", - "enum": [ "bolt12 offer" ] - }, - "valid": { - "type": "boolean", - "enum": [ true ] - } - } - }, - "then": { - "required": [ "offer_id", "node_id", "description" ], - "additionalProperties": false, - "properties": { - "type": { }, - "valid": { }, - "offer_id": { - "type": "hex", - "description": "the id of this offer (merkle hash of non-signature fields)", - "maxLength": 64, - "minLength": 64 - }, - "node_id": { - "type": "point32", - "description": "x-only public key of the offering node" - }, - "signature": { - "type": "bip340sig", - "description": "BIP-340 signature of the *node_id* on this offer" - }, - "chains": { - "type": "array", - "description": "which blockchains this offer is for (missing implies bitcoin mainnet only)", - "items": { - "type": "hex", - "description": "the genesis blockhash", - "maxLength": 64, - "minLength": 64 - } - }, - "currency": { - "type": "string", - "description": "ISO 4217 code of the currency (missing implies Bitcoin)", - "maxLength": 3, - "minLength": 3 - }, - "minor_unit": { - "type": "u32", - "description": "the number of decimal places to apply to amount (if currency known)" - }, - "warning_offer_unknown_currency": { - "type": "string", - "description": "The currency code is unknown (so no **minor_unit**)" - }, - "amount": { - "type": "u64", - "description": "the amount in the *currency* adjusted by *minor_unit*, if any" - }, - "amount_msat": { - "type": "msat", - "description": "the amount in bitcoin (if specified, and no *currency*)" - }, - "send_invoice": { - "type": "boolean", - "description": "present if this is a send_invoice offer", - "enum" : [ true ] - }, - "refund_for": { - "type": "hex", - "description": "the *payment_preimage* of invoice this is a refund for", - "maxLength": 64, - "minLength": 64 - }, - "description": { - "type": "string", - "description": "the description of the purpose of the offer" - }, - "vendor": { - "type": "string", - "description": "the name of the vendor for this offer" - }, - "features": { - "type": "hex", - "description": "the array of feature bits for this offer" - }, - "absolute_expiry": { - "type": "u64", - "description": "UNIX timestamp of when this offer expires" - }, - "paths": { - "type": "array", - "description": "Paths to the destination", - "items": { - "type": "object", - "required": [ "blinding", "path" ], - "additionalProperties": false, - "properties": { - "blinding": { - "type": "pubkey", - "description": "blinding factor for this path" - }, - "path": { - "type": "array", - "description": "an individual path", - "items": { - "type": "object", - "required": [ "node_id", "enctlv" ], - "additionalProperties": false, - "properties": { - "node_id": { - "type": "pubkey", - "description": "node_id of the hop" - }, - "enctlv": { - "type": "hex", - "description": "encrypted TLV entry for this hop" - } - } - } - } - } - } - }, - "quantity_min": { - "type": "u64", - "description": "the minimum quantity" - }, - "quantity_max": { - "type": "u64", - "description": "the maximum quantity" - }, - "recurrence": { - "type": "object", - "description": "how often to this offer should be used", - "required": [ "period", "time_unit" ], - "additionalProperties": false, - "properties": { - "time_unit": { - "type": "u32", - "description": "the BOLT12 time unit" - }, - "time_unit_name": { - "type": "string", - "description": "the name of *time_unit* (if valid)" - }, - "period": { - "type": "u32", - "description": "how many *time_unit* per payment period" - }, - "basetime": { - "type": "u64", - "description": "period starts at this UNIX timestamp" - }, - "start_any_period": { - "type": "u64", - "description": "you can start at any period (only if **basetime** present)" - }, - "limit": { - "type": "u32", - "description": "maximum period number for recurrence" - }, - "paywindow": { - "type": "object", - "description": "when within a period will payment be accepted (default is prior and during the period)", - "required": [ "seconds_before", "seconds_after" ], - "additionalProperties": false, - "properties": { - "seconds_before": { - "type": "u32", - "description": "seconds prior to period start" - }, - "seconds_after": { - "type": "u32", - "description": "seconds after to period start" - }, - "proportional_amount": { - "type": "boolean", - "enum": [ true ], - "description": "amount should be scaled if payed after period start" - } - } - } - } - } - } - } - }, - { - "if": { - "properties": { - "type": { - "type": "string", - "enum": [ "bolt12 offer" ] - }, - "valid": { - "type": "boolean", - "enum": [false ] - } - } - }, - "then": { - "required": [ ], - "additionalProperties": false, - "properties": { - "type": { }, - "valid": { }, - "offer_id": { }, - "node_id": { }, - "signature": { }, - "chains": { }, - "currency": { }, - "minor_unit": { }, - "warning_offer_unknown_currency": { }, - "amount": { }, - "amount_msat": { }, - "send_invoice": { }, - "refund_for": { }, - "description": { }, - "vendor": { }, - "features": { }, - "absolute_expiry": { }, - "paths": { }, - "quantity_min": { }, - "quantity_max": { }, - "recurrence": { }, - "warning_offer_missing_description": { - "type": "string", - "description": "No **description**" - } - } - } - }, - { - "if": { - "properties": { - "type": { - "type": "string", - "enum": [ "bolt12 invoice" ] - }, - "valid": { - "type": "boolean", - "enum": [ true ] - } - } - }, - "then": { - "required": [ "node_id", "signature", "amount_msat", "description", "created_at", "payment_hash", "relative_expiry", "min_final_cltv_expiry" ], - "additionalProperties": false, - "properties": { - "type": { }, - "valid": { }, - "offer_id": { - "type": "hex", - "description": "the id of this offer (merkle hash of non-signature fields)", - "maxLength": 64, - "minLength": 64 - }, - "node_id": { - "type": "point32", - "description": "x-only public key of the offering node" - }, - "signature": { - "type": "bip340sig", - "description": "BIP-340 signature of the *node_id* on this offer" - }, - "chain": { - "type": "hex", - "description": "which blockchain this invoice is for (missing implies bitcoin mainnet only)", - "maxLength": 64, - "minLength": 64 - }, - "amount_msat": { - "type": "msat", - "description": "the amount in bitcoin" - }, - "send_invoice": { - "type": "boolean", - "description": "present if this offer was a send_invoice offer", - "enum" : [ true ] - }, - "refund_for": { - "type": "hex", - "description": "the *payment_preimage* of invoice this is a refund for", - "maxLength": 64, - "minLength": 64 - }, - "description": { - "type": "string", - "description": "the description of the purpose of the offer" - }, - "vendor": { - "type": "string", - "description": "the name of the vendor for this offer" - }, - "features": { - "type": "hex", - "description": "the array of feature bits for this offer" - }, - "paths": { - "type": "array", - "description": "Paths to the destination", - "items": { - "type": "object", - "required": [ "blinding", "path" ], - "additionalProperties": false, - "properties": { - "blinding": { - "type": "pubkey", - "description": "blinding factor for this path" - }, - "path": { - "type": "array", - "description": "an individual path", - "items": { - "type": "object", - "required": [ "node_id", "enctlv" ], - "additionalProperties": false, - "properties": { - "node_id": { - "type": "pubkey", - "description": "node_id of the hop" - }, - "enctlv": { - "type": "hex", - "description": "encrypted TLV entry for this hop" - } - } - } - } - } - } - }, - "quantity": { - "type": "u64", - "description": "the quantity ordered" - }, - "recurrence_counter": { - "type": "u32", - "description": "the 0-based counter for a recurring payment" - }, - "recurrence_start": { - "type": "u32", - "description": "the optional start period for a recurring payment" - }, - "recurrence_basetime": { - "type": "u32", - "description": "the UNIX timestamp of the first recurrence period start" - }, - "payer_key": { - "type": "point32", - "description": "the transient key which identifies the payer" - }, - "payer_info": { - "type": "hex", - "description": "the payer-provided blob to derive payer_key" - }, - "timestamp": { - "deprecated": true - }, - "created_at": { - "type": "u64", - "description": "the UNIX timestamp of invoice creation" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage*", - "maxLength": 64, - "minLength": 64 - }, - "relative_expiry": { - "type": "u32", - "description": "the number of seconds after *created_at* when this expires" - }, - "min_final_cltv_expiry": { - "type": "u32", - "description": "the number of blocks required by destination" - }, - "fallbacks": { - "type": "array", - "description": "onchain addresses", - "items": { - "type": "object", - "required": ["version", "hex"], - "additionalProperties": false, - "properties": { - "version": { - "type": "u8", - "description": "Segwit address version" - }, - "hex": { - "type": "hex", - "description": "Raw encoded segwit address" - }, - "address": { - "type": "string", - "description": "bech32 segwit address" - } - } - } - }, - "refund_signature": { - "type": "bip340sig", - "description": "the payer key signature to get a refund" - } - } - } - }, - { - "if": { - "properties": { - "type": { - "type": "string", - "enum": [ "bolt12 invoice" ] - }, - "valid": { - "type": "boolean", - "enum": [ false ] - } - } - }, - "then": { - "required": [ ], - "additionalProperties": false, - "properties": { - "type": { }, - "valid": { }, - "offer_id": { }, - "node_id": { }, - "signature": { }, - "chain": { }, - "amount_msat": { }, - "send_invoice": { }, - "refund_for": { }, - "description": { }, - "vendor": { }, - "features": { }, - "paths": { }, - "quantity": { }, - "recurrence_counter": { }, - "recurrence_start": { }, - "recurrence_basetime": { }, - "payer_key": { }, - "payer_info": { }, - "timestamp": { }, - "created_at": { }, - "payment_hash": { }, - "relative_expiry": { }, - "min_final_cltv_expiry": { }, - "fallbacks": { }, - "refund_signature": { }, - "warning_invoice_missing_amount": { - "type": "string", - "description": "**amount_msat* missing" - }, - "warning_invoice_missing_description": { - "type": "string", - "description": "No **description**" - }, - "warning_invoice_missing_blinded_payinfo": { - "type": "string", - "description": "Has **paths** without payinfo" - }, - "warning_invoice_invalid_blinded_payinfo": { - "type": "string", - "description": "Does not have exactly one payinfo for each of **paths**" - }, - "warning_invoice_missing_recurrence_basetime": { - "type": "string", - "description": "Has **recurrence_counter** without **recurrence_basetime**" - }, - "warning_invoice_missing_created_at": { - "type": "string", - "description": "Missing **created_at**" - }, - "warning_invoice_missing_payment_hash": { - "type": "string", - "description": "Missing **payment_hash**" - }, - "warning_invoice_refund_signature_missing_payer_key": { - "type": "string", - "description": "Missing **payer_key** for refund_signature" - }, - "warning_invoice_refund_signature_invalid": { - "type": "string", - "description": "**refund_signature** incorrect" - }, - "warning_invoice_refund_missing_signature": { - "type": "string", - "description": "No **refund_signature**" - }, - "fallbacks": { - "type": "array", - "items": { - "type": "object", - "required": ["version", "hex"], - "properties": { - "version": { }, - "hex": { }, - "address": { }, - "warning_invoice_fallbacks_version_invalid": { - "type": "string", - "description": "**version** is > 16" - } - } - } - } - } - } - }, - { - "if": { - "properties": { - "type": { - "type": "string", - "enum": [ "bolt12 invoice_request" ] - }, - "valid": { - "type": "boolean", - "enum": [ true ] - } - } - }, - "then": { - "required": [ "offer_id", "payer_key" ], - "additionalProperties": false, - "properties": { - "type": { }, - "valid": { }, - "offer_id": { - "type": "hex", - "description": "the id of the offer this is requesting (merkle hash of non-signature fields)", - "maxLength": 64, - "minLength": 64 - }, - "chain": { - "type": "hex", - "description": "which blockchain this invoice_request is for (missing implies bitcoin mainnet only)", - "maxLength": 64, - "minLength": 64 - }, - "amount_msat": { - "type": "msat", - "description": "the amount in bitcoin" - }, - "features": { - "type": "hex", - "description": "the array of feature bits for this offer" - }, - "quantity": { - "type": "u64", - "description": "the quantity ordered" - }, - "recurrence_counter": { - "type": "u32", - "description": "the 0-based counter for a recurring payment" - }, - "recurrence_start": { - "type": "u32", - "description": "the optional start period for a recurring payment" - }, - "payer_key": { - "type": "point32", - "description": "the transient key which identifies the payer" - }, - "payer_info": { - "type": "hex", - "description": "the payer-provided blob to derive payer_key" - }, - "recurrence_signature": { - "type": "bip340sig", - "description": "the payer key signature" - } - } - } - }, - { - "if": { - "properties": { - "type": { - "type": "string", - "enum": [ "bolt12 invoice_request" ] - }, - "valid": { - "type": "boolean", - "enum": [ false ] - } - } - }, - "then": { - "required": [ ], - "additionalProperties": false, - "properties": { - "type": { }, - "valid": { }, - "offer_id": { }, - "chain": { }, - "amount_msat": { }, - "features": { }, - "quantity": { }, - "recurrence_counter": { }, - "recurrence_start": { }, - "payer_key": { }, - "payer_info": { }, - "recurrence_signature": { }, - "warning_invoice_request_missing_offer_id": { - "type": "string", - "description": "No **offer_id**" - }, - "warning_invoice_request_missing_payer_key": { - "type": "string", - "description": "No **payer_key**" - }, - "warning_invoice_request_missing_recurrence_signature": { - "type": "string", - "description": "No **recurrence_signature**" - }, - "warning_invoice_request_invalid_recurrence_signature": { - "type": "string", - "description": "**recurrence_signature** incorrect" - } - } - } - }, - { - "if": { - "properties": { - "type": { - "type": "string", - "enum": [ "bolt11 invoice" ] - }, - "valid": { - "type": "boolean", - "enum": [ true ] - } - } - }, - "then": { - "required": [ "currency", "created_at", "expiry", "payee", "min_final_cltv_expiry", "payment_hash", "signature" ], - "additionalProperties": false, - "properties": { - "currency": { - "type": "string", - "description": "the BIP173 name for the currency" - }, - "created_at": { - "type": "u64", - "description": "the UNIX-style timestamp of the invoice" - }, - "expiry": { - "type": "u64", - "description": "the number of seconds this is valid after *timestamp*" - }, - "payee": { - "type": "pubkey", - "description": "the public key of the recipient" - }, - "msatoshi": { - "type": "u64", - "deprecated": true - }, - "amount_msat": { - "type": "msat", - "description": "Amount the invoice asked for" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage*", - "maxLength": 64, - "minLength": 64 - }, - "signature": { - "type": "signature", - "description": "signature of the *payee* on this invoice" - }, - "description": { - "type": "string", - "description": "the description of the purpose of the purchase" - }, - "description_hash": { - "type": "hex", - "description": "the hash of the description, in place of *description*", - "maxLength": 64, - "minLength": 64 - }, - "min_final_cltv_expiry": { - "type": "u32", - "description": "the minimum CLTV delay for the final node" - }, - "payment_secret": { - "type": "hex", - "description": "the secret to hand to the payee node", - "maxLength": 64, - "minLength": 64 - }, - "features": { - "type": "hex", - "description": "the features bitmap for this invoice" - }, - "fallbacks": { - "type": "array", - "description": "onchain addresses", - "items": { - "type": "object", - "required": ["type", "hex"], - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "description": "the address type (if known)", - "enum": [ "P2PKH", "P2SH", "P2WPKH", "P2WSH" ] - }, - "addr": { - "type": "string", - "description": "the address in appropriate format for *type*" - }, - "hex": { - "type": "hex", - "description": "Raw encoded address" - } - } - } - }, - "routes": { - "type": "array", - "description": "Route hints to the *payee*", - "items": { - "type": "array", - "description": "hops in the route", - "items": { - "type": "object", - "required": [ "pubkey", "short_channel_id", "fee_base_msat", "fee_proportional_millionths", "cltv_expiry_delta" ], - "additionalProperties": false, - "properties": { - "pubkey": { - "type": "pubkey", - "description": "the public key of the node" - }, - "short_channel_id": { - "type": "short_channel_id", - "description": "a channel to the next peer" - }, - "fee_base_msat": { - "type": "u32", - "description": "the base fee for payments" - }, - "fee_proportional_millionths": { - "type": "u32", - "description": "the parts-per-million fee for payments" - }, - "cltv_expiry_delta": { - "type": "u32", - "description": "the CLTV delta across this hop" - } - } - } - } - }, - "extra": { - "type": "array", - "description": "Any extra fields we didn't know how to parse", - "items": { - "type": "object", - "required": [ "tag", "data" ], - "additionalProperties": false, - "properties": { - "tag": { - "type": "string", - "description": "The bech32 letter which identifies this field", - "maxLength": 1, - "minLength": 1 - }, - "data": { - "type": "string", - "description": "The bech32 data for this field" - } - } - } - } - } - } - } - ] + "valid": { + "type": "boolean", + "description": "if this is false, you *MUST* not use the result except for diagnostics!" + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt12 offer" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "required": [ + "offer_id", + "node_id", + "description" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "valid": {}, + "offer_id": { + "type": "hex", + "description": "the id of this offer (merkle hash of non-signature fields)", + "maxLength": 64, + "minLength": 64 + }, + "node_id": { + "type": "point32", + "description": "x-only public key of the offering node" + }, + "signature": { + "type": "bip340sig", + "description": "BIP-340 signature of the *node_id* on this offer" + }, + "chains": { + "type": "array", + "description": "which blockchains this offer is for (missing implies bitcoin mainnet only)", + "items": { + "type": "hex", + "description": "the genesis blockhash", + "maxLength": 64, + "minLength": 64 + } + }, + "currency": { + "type": "string", + "description": "ISO 4217 code of the currency (missing implies Bitcoin)", + "maxLength": 3, + "minLength": 3 + }, + "minor_unit": { + "type": "u32", + "description": "the number of decimal places to apply to amount (if currency known)" + }, + "warning_offer_unknown_currency": { + "type": "string", + "description": "The currency code is unknown (so no **minor_unit**)" + }, + "amount": { + "type": "u64", + "description": "the amount in the *currency* adjusted by *minor_unit*, if any" + }, + "amount_msat": { + "type": "msat", + "description": "the amount in bitcoin (if specified, and no *currency*)" + }, + "send_invoice": { + "type": "boolean", + "description": "present if this is a send_invoice offer", + "enum": [ + true + ] + }, + "refund_for": { + "type": "hex", + "description": "the *payment_preimage* of invoice this is a refund for", + "maxLength": 64, + "minLength": 64 + }, + "description": { + "type": "string", + "description": "the description of the purpose of the offer" + }, + "vendor": { + "type": "string", + "description": "the name of the vendor for this offer" + }, + "features": { + "type": "hex", + "description": "the array of feature bits for this offer" + }, + "absolute_expiry": { + "type": "u64", + "description": "UNIX timestamp of when this offer expires" + }, + "paths": { + "type": "array", + "description": "Paths to the destination", + "items": { + "type": "object", + "required": [ + "blinding", + "path" + ], + "additionalProperties": false, + "properties": { + "blinding": { + "type": "pubkey", + "description": "blinding factor for this path" + }, + "path": { + "type": "array", + "description": "an individual path", + "items": { + "type": "object", + "required": [ + "node_id", + "enctlv" + ], + "additionalProperties": false, + "properties": { + "node_id": { + "type": "pubkey", + "description": "node_id of the hop" + }, + "enctlv": { + "type": "hex", + "description": "encrypted TLV entry for this hop" + } + } + } + } + } + } + }, + "quantity_min": { + "type": "u64", + "description": "the minimum quantity" + }, + "quantity_max": { + "type": "u64", + "description": "the maximum quantity" + }, + "recurrence": { + "type": "object", + "description": "how often to this offer should be used", + "required": [ + "period", + "time_unit" + ], + "additionalProperties": false, + "properties": { + "time_unit": { + "type": "u32", + "description": "the BOLT12 time unit" + }, + "time_unit_name": { + "type": "string", + "description": "the name of *time_unit* (if valid)" + }, + "period": { + "type": "u32", + "description": "how many *time_unit* per payment period" + }, + "basetime": { + "type": "u64", + "description": "period starts at this UNIX timestamp" + }, + "start_any_period": { + "type": "u64", + "description": "you can start at any period (only if **basetime** present)" + }, + "limit": { + "type": "u32", + "description": "maximum period number for recurrence" + }, + "paywindow": { + "type": "object", + "description": "when within a period will payment be accepted (default is prior and during the period)", + "required": [ + "seconds_before", + "seconds_after" + ], + "additionalProperties": false, + "properties": { + "seconds_before": { + "type": "u32", + "description": "seconds prior to period start" + }, + "seconds_after": { + "type": "u32", + "description": "seconds after to period start" + }, + "proportional_amount": { + "type": "boolean", + "enum": [ + true + ], + "description": "amount should be scaled if payed after period start" + } + } + } + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt12 offer" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + false + ] + } + } + }, + "then": { + "required": [], + "additionalProperties": false, + "properties": { + "type": {}, + "valid": {}, + "offer_id": {}, + "node_id": {}, + "signature": {}, + "chains": {}, + "currency": {}, + "minor_unit": {}, + "warning_offer_unknown_currency": {}, + "amount": {}, + "amount_msat": {}, + "send_invoice": {}, + "refund_for": {}, + "description": {}, + "vendor": {}, + "features": {}, + "absolute_expiry": {}, + "paths": {}, + "quantity_min": {}, + "quantity_max": {}, + "recurrence": {}, + "warning_offer_missing_description": { + "type": "string", + "description": "No **description**" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt12 invoice" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "required": [ + "node_id", + "signature", + "amount_msat", + "description", + "created_at", + "payment_hash", + "relative_expiry", + "min_final_cltv_expiry" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "valid": {}, + "offer_id": { + "type": "hex", + "description": "the id of this offer (merkle hash of non-signature fields)", + "maxLength": 64, + "minLength": 64 + }, + "node_id": { + "type": "point32", + "description": "x-only public key of the offering node" + }, + "signature": { + "type": "bip340sig", + "description": "BIP-340 signature of the *node_id* on this offer" + }, + "chain": { + "type": "hex", + "description": "which blockchain this invoice is for (missing implies bitcoin mainnet only)", + "maxLength": 64, + "minLength": 64 + }, + "amount_msat": { + "type": "msat", + "description": "the amount in bitcoin" + }, + "send_invoice": { + "type": "boolean", + "description": "present if this offer was a send_invoice offer", + "enum": [ + true + ] + }, + "refund_for": { + "type": "hex", + "description": "the *payment_preimage* of invoice this is a refund for", + "maxLength": 64, + "minLength": 64 + }, + "description": { + "type": "string", + "description": "the description of the purpose of the offer" + }, + "vendor": { + "type": "string", + "description": "the name of the vendor for this offer" + }, + "features": { + "type": "hex", + "description": "the array of feature bits for this offer" + }, + "paths": { + "type": "array", + "description": "Paths to the destination", + "items": { + "type": "object", + "required": [ + "blinding", + "path" + ], + "additionalProperties": false, + "properties": { + "blinding": { + "type": "pubkey", + "description": "blinding factor for this path" + }, + "path": { + "type": "array", + "description": "an individual path", + "items": { + "type": "object", + "required": [ + "node_id", + "enctlv" + ], + "additionalProperties": false, + "properties": { + "node_id": { + "type": "pubkey", + "description": "node_id of the hop" + }, + "enctlv": { + "type": "hex", + "description": "encrypted TLV entry for this hop" + } + } + } + } + } + } + }, + "quantity": { + "type": "u64", + "description": "the quantity ordered" + }, + "recurrence_counter": { + "type": "u32", + "description": "the 0-based counter for a recurring payment" + }, + "recurrence_start": { + "type": "u32", + "description": "the optional start period for a recurring payment" + }, + "recurrence_basetime": { + "type": "u32", + "description": "the UNIX timestamp of the first recurrence period start" + }, + "payer_key": { + "type": "point32", + "description": "the transient key which identifies the payer" + }, + "payer_info": { + "type": "hex", + "description": "the payer-provided blob to derive payer_key" + }, + "timestamp": { + "deprecated": true + }, + "created_at": { + "type": "u64", + "description": "the UNIX timestamp of invoice creation" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage*", + "maxLength": 64, + "minLength": 64 + }, + "relative_expiry": { + "type": "u32", + "description": "the number of seconds after *created_at* when this expires" + }, + "min_final_cltv_expiry": { + "type": "u32", + "description": "the number of blocks required by destination" + }, + "fallbacks": { + "type": "array", + "description": "onchain addresses", + "items": { + "type": "object", + "required": [ + "version", + "hex" + ], + "additionalProperties": false, + "properties": { + "version": { + "type": "u8", + "description": "Segwit address version" + }, + "hex": { + "type": "hex", + "description": "Raw encoded segwit address" + }, + "address": { + "type": "string", + "description": "bech32 segwit address" + } + } + } + }, + "refund_signature": { + "type": "bip340sig", + "description": "the payer key signature to get a refund" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt12 invoice" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + false + ] + } + } + }, + "then": { + "required": [], + "additionalProperties": false, + "properties": { + "type": {}, + "valid": {}, + "offer_id": {}, + "node_id": {}, + "signature": {}, + "chain": {}, + "amount_msat": {}, + "send_invoice": {}, + "refund_for": {}, + "description": {}, + "vendor": {}, + "features": {}, + "paths": {}, + "quantity": {}, + "recurrence_counter": {}, + "recurrence_start": {}, + "recurrence_basetime": {}, + "payer_key": {}, + "payer_info": {}, + "timestamp": {}, + "created_at": {}, + "payment_hash": {}, + "relative_expiry": {}, + "min_final_cltv_expiry": {}, + "fallbacks": { + "type": "array", + "items": { + "type": "object", + "required": [ + "version", + "hex" + ], + "properties": { + "version": {}, + "hex": {}, + "address": {}, + "warning_invoice_fallbacks_version_invalid": { + "type": "string", + "description": "**version** is > 16" + } + } + } + }, + "refund_signature": {}, + "warning_invoice_missing_amount": { + "type": "string", + "description": "**amount_msat* missing" + }, + "warning_invoice_missing_description": { + "type": "string", + "description": "No **description**" + }, + "warning_invoice_missing_blinded_payinfo": { + "type": "string", + "description": "Has **paths** without payinfo" + }, + "warning_invoice_invalid_blinded_payinfo": { + "type": "string", + "description": "Does not have exactly one payinfo for each of **paths**" + }, + "warning_invoice_missing_recurrence_basetime": { + "type": "string", + "description": "Has **recurrence_counter** without **recurrence_basetime**" + }, + "warning_invoice_missing_created_at": { + "type": "string", + "description": "Missing **created_at**" + }, + "warning_invoice_missing_payment_hash": { + "type": "string", + "description": "Missing **payment_hash**" + }, + "warning_invoice_refund_signature_missing_payer_key": { + "type": "string", + "description": "Missing **payer_key** for refund_signature" + }, + "warning_invoice_refund_signature_invalid": { + "type": "string", + "description": "**refund_signature** incorrect" + }, + "warning_invoice_refund_missing_signature": { + "type": "string", + "description": "No **refund_signature**" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt12 invoice_request" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "required": [ + "offer_id", + "payer_key" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "valid": {}, + "offer_id": { + "type": "hex", + "description": "the id of the offer this is requesting (merkle hash of non-signature fields)", + "maxLength": 64, + "minLength": 64 + }, + "chain": { + "type": "hex", + "description": "which blockchain this invoice_request is for (missing implies bitcoin mainnet only)", + "maxLength": 64, + "minLength": 64 + }, + "amount_msat": { + "type": "msat", + "description": "the amount in bitcoin" + }, + "features": { + "type": "hex", + "description": "the array of feature bits for this offer" + }, + "quantity": { + "type": "u64", + "description": "the quantity ordered" + }, + "recurrence_counter": { + "type": "u32", + "description": "the 0-based counter for a recurring payment" + }, + "recurrence_start": { + "type": "u32", + "description": "the optional start period for a recurring payment" + }, + "payer_key": { + "type": "point32", + "description": "the transient key which identifies the payer" + }, + "payer_info": { + "type": "hex", + "description": "the payer-provided blob to derive payer_key" + }, + "recurrence_signature": { + "type": "bip340sig", + "description": "the payer key signature" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt12 invoice_request" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + false + ] + } + } + }, + "then": { + "required": [], + "additionalProperties": false, + "properties": { + "type": {}, + "valid": {}, + "offer_id": {}, + "chain": {}, + "amount_msat": {}, + "features": {}, + "quantity": {}, + "recurrence_counter": {}, + "recurrence_start": {}, + "payer_key": {}, + "payer_info": {}, + "recurrence_signature": {}, + "warning_invoice_request_missing_offer_id": { + "type": "string", + "description": "No **offer_id**" + }, + "warning_invoice_request_missing_payer_key": { + "type": "string", + "description": "No **payer_key**" + }, + "warning_invoice_request_missing_recurrence_signature": { + "type": "string", + "description": "No **recurrence_signature**" + }, + "warning_invoice_request_invalid_recurrence_signature": { + "type": "string", + "description": "**recurrence_signature** incorrect" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt11 invoice" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "required": [ + "currency", + "created_at", + "expiry", + "payee", + "min_final_cltv_expiry", + "payment_hash", + "signature" + ], + "additionalProperties": false, + "properties": { + "currency": { + "type": "string", + "description": "the BIP173 name for the currency" + }, + "created_at": { + "type": "u64", + "description": "the UNIX-style timestamp of the invoice" + }, + "expiry": { + "type": "u64", + "description": "the number of seconds this is valid after *timestamp*" + }, + "payee": { + "type": "pubkey", + "description": "the public key of the recipient" + }, + "msatoshi": { + "type": "u64", + "deprecated": true + }, + "amount_msat": { + "type": "msat", + "description": "Amount the invoice asked for" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage*", + "maxLength": 64, + "minLength": 64 + }, + "signature": { + "type": "signature", + "description": "signature of the *payee* on this invoice" + }, + "description": { + "type": "string", + "description": "the description of the purpose of the purchase" + }, + "description_hash": { + "type": "hex", + "description": "the hash of the description, in place of *description*", + "maxLength": 64, + "minLength": 64 + }, + "min_final_cltv_expiry": { + "type": "u32", + "description": "the minimum CLTV delay for the final node" + }, + "payment_secret": { + "type": "hex", + "description": "the secret to hand to the payee node", + "maxLength": 64, + "minLength": 64 + }, + "features": { + "type": "hex", + "description": "the features bitmap for this invoice" + }, + "fallbacks": { + "type": "array", + "description": "onchain addresses", + "items": { + "type": "object", + "required": [ + "type", + "hex" + ], + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "description": "the address type (if known)", + "enum": [ + "P2PKH", + "P2SH", + "P2WPKH", + "P2WSH" + ] + }, + "addr": { + "type": "string", + "description": "the address in appropriate format for *type*" + }, + "hex": { + "type": "hex", + "description": "Raw encoded address" + } + } + } + }, + "routes": { + "type": "array", + "description": "Route hints to the *payee*", + "items": { + "type": "array", + "description": "hops in the route", + "items": { + "type": "object", + "required": [ + "pubkey", + "short_channel_id", + "fee_base_msat", + "fee_proportional_millionths", + "cltv_expiry_delta" + ], + "additionalProperties": false, + "properties": { + "pubkey": { + "type": "pubkey", + "description": "the public key of the node" + }, + "short_channel_id": { + "type": "short_channel_id", + "description": "a channel to the next peer" + }, + "fee_base_msat": { + "type": "u32", + "description": "the base fee for payments" + }, + "fee_proportional_millionths": { + "type": "u32", + "description": "the parts-per-million fee for payments" + }, + "cltv_expiry_delta": { + "type": "u32", + "description": "the CLTV delta across this hop" + } + } + } + } + }, + "extra": { + "type": "array", + "description": "Any extra fields we didn't know how to parse", + "items": { + "type": "object", + "required": [ + "tag", + "data" + ], + "additionalProperties": false, + "properties": { + "tag": { + "type": "string", + "description": "The bech32 letter which identifies this field", + "maxLength": 1, + "minLength": 1 + }, + "data": { + "type": "string", + "description": "The bech32 data for this field" + } + } + } + } + } + } + } + ] } diff --git a/doc/schemas/decodepay.schema.json b/doc/schemas/decodepay.schema.json index 949404293..15fd12298 100644 --- a/doc/schemas/decodepay.schema.json +++ b/doc/schemas/decodepay.schema.json @@ -1,146 +1,171 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ "currency", "created_at", "expiry", "payee", "min_final_cltv_expiry", "payment_hash", "signature" ], - "additionalProperties": false, - "properties": { - "currency": { - "type": "string", - "description": "the BIP173 name for the currency" - }, - "created_at": { - "type": "u64", - "description": "the UNIX-style timestamp of the invoice" - }, - "expiry": { - "type": "u64", - "description": "the number of seconds this is valid after *timestamp*" - }, - "payee": { - "type": "pubkey", - "description": "the public key of the recipient" - }, - "msatoshi": { - "type": "u64", - "deprecated": true - }, - "amount_msat": { - "type": "msat", - "description": "Amount the invoice asked for" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage*", - "maxLength": 64, - "minLength": 64 - }, - "signature": { - "type": "signature", - "description": "signature of the *payee* on this invoice" - }, - "description": { - "type": "string", - "description": "the description of the purpose of the purchase" - }, - "description_hash": { - "type": "hex", - "description": "the hash of the description, in place of *description*", - "maxLength": 64, - "minLength": 64 - }, - "min_final_cltv_expiry": { - "type": "u32", - "description": "the minimum CLTV delay for the final node" - }, - "payment_secret": { - "type": "hex", - "description": "the secret to hand to the payee node", - "maxLength": 64, - "minLength": 64 - }, - "features": { - "type": "hex", - "description": "the features bitmap for this invoice" - }, - "fallbacks": { - "type": "array", - "description": "onchain addresses", - "items": { - "type": "object", - "required": ["type", "hex"], - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "description": "the address type (if known)", - "enum": [ "P2PKH", "P2SH", "P2WPKH", "P2WSH" ] - }, - "addr": { - "type": "string", - "description": "the address in appropriate format for *type*" - }, - "hex": { - "type": "hex", - "description": "Raw encoded address" - } - } - } - }, - "routes": { - "type": "array", - "description": "Route hints to the *payee*", - "items": { - "type": "array", - "description": "hops in the route", - "items": { - "type": "object", - "required": [ "pubkey", "short_channel_id", "fee_base_msat", "fee_proportional_millionths", "cltv_expiry_delta" ], - "additionalProperties": false, - "properties": { - "pubkey": { - "type": "pubkey", - "description": "the public key of the node" - }, - "short_channel_id": { - "type": "short_channel_id", - "description": "a channel to the next peer" - }, - "fee_base_msat": { - "type": "u32", - "description": "the base fee for payments" - }, - "fee_proportional_millionths": { - "type": "u32", - "description": "the parts-per-million fee for payments" - }, - "cltv_expiry_delta": { - "type": "u32", - "description": "the CLTV delta across this hop" - } - } - } - } - }, - "extra": { - "type": "array", - "description": "Any extra fields we didn't know how to parse", - "items": { - "type": "object", - "required": [ "tag", "data" ], - "additionalProperties": false, - "properties": { - "tag": { - "type": "string", - "description": "The bech32 letter which identifies this field", - "maxLength": 1, - "minLength": 1 - }, - "data": { - "type": "string", - "description": "The bech32 data for this field" - } - } - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "currency", + "created_at", + "expiry", + "payee", + "min_final_cltv_expiry", + "payment_hash", + "signature" + ], + "additionalProperties": false, + "properties": { + "currency": { + "type": "string", + "description": "the BIP173 name for the currency" + }, + "created_at": { + "type": "u64", + "description": "the UNIX-style timestamp of the invoice" + }, + "expiry": { + "type": "u64", + "description": "the number of seconds this is valid after *timestamp*" + }, + "payee": { + "type": "pubkey", + "description": "the public key of the recipient" + }, + "msatoshi": { + "type": "u64", + "deprecated": true + }, + "amount_msat": { + "type": "msat", + "description": "Amount the invoice asked for" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage*", + "maxLength": 64, + "minLength": 64 + }, + "signature": { + "type": "signature", + "description": "signature of the *payee* on this invoice" + }, + "description": { + "type": "string", + "description": "the description of the purpose of the purchase" + }, + "description_hash": { + "type": "hex", + "description": "the hash of the description, in place of *description*", + "maxLength": 64, + "minLength": 64 + }, + "min_final_cltv_expiry": { + "type": "u32", + "description": "the minimum CLTV delay for the final node" + }, + "payment_secret": { + "type": "hex", + "description": "the secret to hand to the payee node", + "maxLength": 64, + "minLength": 64 + }, + "features": { + "type": "hex", + "description": "the features bitmap for this invoice" + }, + "fallbacks": { + "type": "array", + "description": "onchain addresses", + "items": { + "type": "object", + "required": [ + "type", + "hex" + ], + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "description": "the address type (if known)", + "enum": [ + "P2PKH", + "P2SH", + "P2WPKH", + "P2WSH" + ] + }, + "addr": { + "type": "string", + "description": "the address in appropriate format for *type*" + }, + "hex": { + "type": "hex", + "description": "Raw encoded address" + } + } + } + }, + "routes": { + "type": "array", + "description": "Route hints to the *payee*", + "items": { + "type": "array", + "description": "hops in the route", + "items": { + "type": "object", + "required": [ + "pubkey", + "short_channel_id", + "fee_base_msat", + "fee_proportional_millionths", + "cltv_expiry_delta" + ], + "additionalProperties": false, + "properties": { + "pubkey": { + "type": "pubkey", + "description": "the public key of the node" + }, + "short_channel_id": { + "type": "short_channel_id", + "description": "a channel to the next peer" + }, + "fee_base_msat": { + "type": "u32", + "description": "the base fee for payments" + }, + "fee_proportional_millionths": { + "type": "u32", + "description": "the parts-per-million fee for payments" + }, + "cltv_expiry_delta": { + "type": "u32", + "description": "the CLTV delta across this hop" + } + } + } + } + }, + "extra": { + "type": "array", + "description": "Any extra fields we didn't know how to parse", + "items": { + "type": "object", + "required": [ + "tag", + "data" + ], + "additionalProperties": false, + "properties": { + "tag": { + "type": "string", + "description": "The bech32 letter which identifies this field", + "maxLength": 1, + "minLength": 1 + }, + "data": { + "type": "string", + "description": "The bech32 data for this field" + } + } + } } + } } diff --git a/doc/schemas/deldatastore.schema.json b/doc/schemas/deldatastore.schema.json index 4f0c7c347..c5a2875b6 100644 --- a/doc/schemas/deldatastore.schema.json +++ b/doc/schemas/deldatastore.schema.json @@ -1,27 +1,29 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "key" ], - "properties": { - "key": { - "type": "array", - "items": { - "type": "string", - "description": "Part of the key added to the datastore" - } - }, - "generation": { - "type": "u64", - "description": "The number of times this has been updated" - }, - "hex": { - "type": "hex", - "description": "The hex data which has removed from the datastore" - }, - "string": { - "type": "string", - "description": "The data as a string, if it's valid utf-8" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "key" + ], + "properties": { + "key": { + "type": "array", + "items": { + "type": "string", + "description": "Part of the key added to the datastore" + } + }, + "generation": { + "type": "u64", + "description": "The number of times this has been updated" + }, + "hex": { + "type": "hex", + "description": "The hex data which has removed from the datastore" + }, + "string": { + "type": "string", + "description": "The data as a string, if it's valid utf-8" } + } } diff --git a/doc/schemas/delexpiredinvoice.schema.json b/doc/schemas/delexpiredinvoice.schema.json index 3f3efd17a..f99496c5a 100644 --- a/doc/schemas/delexpiredinvoice.schema.json +++ b/doc/schemas/delexpiredinvoice.schema.json @@ -1,8 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ ], - "additionalProperties": false, - "properties": { - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": {} } diff --git a/doc/schemas/delinvoice.schema.json b/doc/schemas/delinvoice.schema.json index bbcf61fca..1803a7fbd 100644 --- a/doc/schemas/delinvoice.schema.json +++ b/doc/schemas/delinvoice.schema.json @@ -1,159 +1,179 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ "label", "payment_hash", "status", "expires_at" ], - "additionalProperties": true, - "properties": { - "label": { - "type": "string", - "description": "Unique label given at creation time" - }, - "bolt11": { - "type": "string", - "description": "BOLT11 string" - }, - "bolt12": { - "type": "string", - "description": "BOLT12 string" - }, - "msatoshi": { - "deprecated": "true" - }, - "amount_msat": { - "type": "msat", - "description": "the amount required to pay this invoice" - }, - "description": { - "type": "string", - "description": "description used in the invoice" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "status": { - "type": "string", - "description": "State of invoice", - "enum": [ "paid", "expired", "unpaid" ] - }, - "expires_at": { - "type": "u64", - "description": "UNIX timestamp when invoice expires (or expired)" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "label", + "payment_hash", + "status", + "expires_at" + ], + "additionalProperties": true, + "properties": { + "label": { + "type": "string", + "description": "Unique label given at creation time" }, - "allOf": [ - { - "if": { - "required": [ "bolt12" ] - }, - "then": { - "required": [ ], - "additionalProperties": false, - "properties": { - "label": { }, - "bolt12": { }, - "status": { }, - "expires_at": { }, - "msatoshi": { }, - "amount_msat": { }, - "description": { }, - "payment_hash": { }, - "pay_index": { }, - "amount_received_msat": { }, - "paid_at": { }, - "payment_preimage": { }, - "local_offer_id": { - "type": "hex", - "description": "offer for which this invoice was created" - }, - "payer_note": { - "type": "string", - "description": "the optional *payer_note* from invoice_request which created this invoice" - } - } - }, - "else": { - "required": [ "bolt11" ], - "additionalProperties": false, - "properties": { - "label": { }, - "bolt11": { }, - "status": { }, - "expires_at": { }, - "msatoshi": { }, - "amount_msat": { }, - "description": { }, - "payment_hash": { }, - "pay_index": { }, - "amount_received_msat": { }, - "paid_at": { }, - "payment_preimage": { } - } - } - }, - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "paid" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "pay_index", "amount_received_msat", "paid_at", "payment_preimage" ], - "properties": { - "label": { }, - "bolt11": { }, - "bolt12": { }, - "status": { }, - "expires_at": { }, - "msatoshi": { }, - "amount_msat": { }, - "description": { }, - "payment_hash": { }, - "payer_note": { }, - "local_offer_id": { }, - "pay_index": { - "type": "u64", - "description": "unique index for this invoice payment" - }, - "amount_received_msat": { - "type": "msat", - "description": "how much was actually received" - }, - "paid_at": { - "type": "u64", - "description": "UNIX timestamp of when payment was received" - }, - "payment_preimage": { - "type": "hex", - "description": "SHA256 of this is the *payment_hash* offered in the invoice", - "maxLength": 64, - "minLength": 64 - } - } - }, - "else": { - "additionalProperties": false, - "properties": { - "label": { }, - "bolt11": { }, - "bolt12": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "description": { }, - "payment_hash": { }, - "expires_at": { }, - "pay_index": { }, - "payer_note": { }, - "local_offer_id": { } - } - } - } - ] + "bolt11": { + "type": "string", + "description": "BOLT11 string" + }, + "bolt12": { + "type": "string", + "description": "BOLT12 string" + }, + "msatoshi": { + "deprecated": "true" + }, + "amount_msat": { + "type": "msat", + "description": "the amount required to pay this invoice" + }, + "description": { + "type": "string", + "description": "description used in the invoice" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "status": { + "type": "string", + "description": "State of invoice", + "enum": [ + "paid", + "expired", + "unpaid" + ] + }, + "expires_at": { + "type": "u64", + "description": "UNIX timestamp when invoice expires (or expired)" + } + }, + "allOf": [ + { + "if": { + "required": [ + "bolt12" + ] + }, + "then": { + "required": [], + "additionalProperties": false, + "properties": { + "label": {}, + "bolt12": {}, + "status": {}, + "expires_at": {}, + "msatoshi": {}, + "amount_msat": {}, + "description": {}, + "payment_hash": {}, + "pay_index": {}, + "amount_received_msat": {}, + "paid_at": {}, + "payment_preimage": {}, + "local_offer_id": { + "type": "hex", + "description": "offer for which this invoice was created" + }, + "payer_note": { + "type": "string", + "description": "the optional *payer_note* from invoice_request which created this invoice" + } + } + }, + "else": { + "required": [ + "bolt11" + ], + "additionalProperties": false, + "properties": { + "label": {}, + "bolt11": {}, + "status": {}, + "expires_at": {}, + "msatoshi": {}, + "amount_msat": {}, + "description": {}, + "payment_hash": {}, + "pay_index": {}, + "amount_received_msat": {}, + "paid_at": {}, + "payment_preimage": {} + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "paid" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "pay_index", + "amount_received_msat", + "paid_at", + "payment_preimage" + ], + "properties": { + "label": {}, + "bolt11": {}, + "bolt12": {}, + "status": {}, + "expires_at": {}, + "msatoshi": {}, + "amount_msat": {}, + "description": {}, + "payment_hash": {}, + "payer_note": {}, + "local_offer_id": {}, + "pay_index": { + "type": "u64", + "description": "unique index for this invoice payment" + }, + "amount_received_msat": { + "type": "msat", + "description": "how much was actually received" + }, + "paid_at": { + "type": "u64", + "description": "UNIX timestamp of when payment was received" + }, + "payment_preimage": { + "type": "hex", + "description": "SHA256 of this is the *payment_hash* offered in the invoice", + "maxLength": 64, + "minLength": 64 + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "label": {}, + "bolt11": {}, + "bolt12": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "description": {}, + "payment_hash": {}, + "expires_at": {}, + "pay_index": {}, + "payer_note": {}, + "local_offer_id": {} + } + } + } + ] } diff --git a/doc/schemas/delpay.schema.json b/doc/schemas/delpay.schema.json index d603a1d01..0f31780f2 100644 --- a/doc/schemas/delpay.schema.json +++ b/doc/schemas/delpay.schema.json @@ -1,85 +1,97 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ "payments" ], - "additionalProperties": false, - "properties": { - "payments": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ "id", "payment_hash", "status", "amount_sent_msat", "created_at" ], - "properties": { - "id": { - "type": "u64", - "description": "unique ID for this payment attempt" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "status": { - "type": "string", - "enum": [ "pending", "failed", "complete" ], - "description": "status of the payment" - }, - "msatoshi_sent": { - "deprecated": true - }, - "amount_sent_msat": { - "type": "msat", - "description": "the amount we actually sent, including fees" - }, - "partid": { - "type": "u64", - "description": "unique ID within this (multi-part) payment" - }, - "destination": { - "type": "pubkey", - "description": "the final destination of the payment if known" - }, - "msatoshi": { - "deprecated": true - }, - "amount_msat": { - "type": "msat", - "description": "the amount the destination received, if known" - }, - "created_at": { - "type": "u64", - "description": "the UNIX timestamp showing when this payment was initiated" - }, - "groupid": { - "type": "u64", - "description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" - }, - "payment_preimage": { - "type": "hex", - "description": "proof of payment", - "maxLength": 64, - "minLength": 64 - }, - "label": { - "type": "string", - "description": "the label, if given to sendpay" - }, - "bolt11": { - "type": "string", - "description": "the bolt11 string (if pay supplied one)" - }, - "bolt12": { - "type": "string", - "description": "the bolt12 string (if supplied for pay: **experimental-offers** only)." - }, - "erroronion": { - "type": "hex", - "description": "the error onion returned on failure, if any." - } - } - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "payments" + ], + "additionalProperties": false, + "properties": { + "payments": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "payment_hash", + "status", + "amount_sent_msat", + "created_at" + ], + "properties": { + "id": { + "type": "u64", + "description": "unique ID for this payment attempt" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "failed", + "complete" + ], + "description": "status of the payment" + }, + "msatoshi_sent": { + "deprecated": true + }, + "amount_sent_msat": { + "type": "msat", + "description": "the amount we actually sent, including fees" + }, + "partid": { + "type": "u64", + "description": "unique ID within this (multi-part) payment" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment if known" + }, + "msatoshi": { + "deprecated": true + }, + "amount_msat": { + "type": "msat", + "description": "the amount the destination received, if known" + }, + "created_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "groupid": { + "type": "u64", + "description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" + }, + "payment_preimage": { + "type": "hex", + "description": "proof of payment", + "maxLength": 64, + "minLength": 64 + }, + "label": { + "type": "string", + "description": "the label, if given to sendpay" + }, + "bolt11": { + "type": "string", + "description": "the bolt11 string (if pay supplied one)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string (if supplied for pay: **experimental-offers** only)." + }, + "erroronion": { + "type": "hex", + "description": "the error onion returned on failure, if any." + } + } + } } + } } diff --git a/doc/schemas/disableoffer.schema.json b/doc/schemas/disableoffer.schema.json index c781a54b0..8b7331bf5 100644 --- a/doc/schemas/disableoffer.schema.json +++ b/doc/schemas/disableoffer.schema.json @@ -1,39 +1,48 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ "offer_id", "active", "single_use", "bolt12", "bolt12_unsigned", "used" ], - "additionalProperties": false, - "properties": { - "offer_id": { - "type": "hex", - "description": "the merkle hash of the offer", - "maxLength": 64, - "minLength": 64 - }, - "active": { - "type": "boolean", - "enum": [ false ], - "description": "Whether the offer can produce invoices/payments" - }, - "single_use": { - "type": "boolean", - "description": "Whether the offer is disabled after first successful use" - }, - "bolt12": { - "type": "string", - "description": "The bolt12 string representing this offer" - }, - "bolt12_unsigned": { - "type": "string", - "description": "The bolt12 string representing this offer, without signature" - }, - "used": { - "type": "boolean", - "description": "Whether the offer has had an invoice paid / payment made" - }, - "label": { - "type": "string", - "description": "The label provided when offer was created" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "offer_id", + "active", + "single_use", + "bolt12", + "bolt12_unsigned", + "used" + ], + "additionalProperties": false, + "properties": { + "offer_id": { + "type": "hex", + "description": "the merkle hash of the offer", + "maxLength": 64, + "minLength": 64 + }, + "active": { + "type": "boolean", + "enum": [ + false + ], + "description": "Whether the offer can produce invoices/payments" + }, + "single_use": { + "type": "boolean", + "description": "Whether the offer is disabled after first successful use" + }, + "bolt12": { + "type": "string", + "description": "The bolt12 string representing this offer" + }, + "bolt12_unsigned": { + "type": "string", + "description": "The bolt12 string representing this offer, without signature" + }, + "used": { + "type": "boolean", + "description": "Whether the offer has had an invoice paid / payment made" + }, + "label": { + "type": "string", + "description": "The label provided when offer was created" } + } } diff --git a/doc/schemas/disconnect.schema.json b/doc/schemas/disconnect.schema.json index b797a82c2..1aad2dcae 100644 --- a/doc/schemas/disconnect.schema.json +++ b/doc/schemas/disconnect.schema.json @@ -1,7 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "properties": { - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": {} } diff --git a/doc/schemas/feerates.schema.json b/doc/schemas/feerates.schema.json index 3f25817e7..980f1d20c 100644 --- a/doc/schemas/feerates.schema.json +++ b/doc/schemas/feerates.schema.json @@ -1,119 +1,131 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ ], - "properties": { - "warning_missing_feerates": { - "type": "string", - "description": "Some fee estimates are missing" - }, - "perkb": { - "type": "object", - "description": "If *style* parameter was perkb", - "additionalProperties": false, - "required": [ "min_acceptable", "max_acceptable" ], - "properties": { - "min_acceptable": { - "type": "u32", - "description": "The smallest feerate that you can use, usually the minimum relayed feerate of the backend" - }, - "max_acceptable": { - "type": "u32", - "description": "The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet)." - }, - "opening": { - "type": "u32", - "description": "Default feerate for lightning-fundchannel(7) and lightning-withdraw(7)" - }, - "mutual_close": { - "type": "u32", - "description": "Feerate to aim for in cooperative shutdown. Note that since mutual close is a **negotiation**, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer." - }, - "unilateral_close": { - "type": "u32", - "description": "Feerate for commitment_transaction in a live channel which we originally funded" - }, - "delayed_to_us": { - "type": "u32", - "description": "Feerate for returning unilateral close funds to our wallet" - }, - "htlc_resolution": { - "type": "u32", - "description": "Feerate for returning unilateral close HTLC outputs to our wallet" - }, - "penalty": { - "type": "u32", - "description": "Feerate to start at when penalizing a cheat attempt" - } - } - }, - "perkw": { - "type": "object", - "description": "If *style* parameter was perkw", - "additionalProperties": false, - "required": [ "min_acceptable", "max_acceptable" ], - "properties": { - "min_acceptable": { - "type": "u32", - "description": "The smallest feerate that you can use, usually the minimum relayed feerate of the backend" - }, - "max_acceptable": { - "type": "u32", - "description": "The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet)." - }, - "opening": { - "type": "u32", - "description": "Default feerate for lightning-fundchannel(7) and lightning-withdraw(7)" - }, - "mutual_close": { - "type": "u32", - "description": "Feerate to aim for in cooperative shutdown. Note that since mutual close is a **negotiation**, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer." - }, - "unilateral_close": { - "type": "u32", - "description": "Feerate for commitment_transaction in a live channel which we originally funded" - }, - "delayed_to_us": { - "type": "u32", - "description": "Feerate for returning unilateral close funds to our wallet" - }, - "htlc_resolution": { - "type": "u32", - "description": "Feerate for returning unilateral close HTLC outputs to our wallet" - }, - "penalty": { - "type": "u32", - "description": "Feerate to start at when penalizing a cheat attempt" - } - } - }, - "onchain_fee_estimates": { - "type": "object", - "additionalProperties": false, - "required": [ "opening_channel_satoshis", "mutual_close_satoshis", "unilateral_close_satoshis", "htlc_timeout_satoshis", "htlc_success_satoshis" ], - "properties": { - "opening_channel_satoshis": { - "type": "u64", - "description": "Estimated cost of typical channel open" - }, - "mutual_close_satoshis": { - "type": "u64", - "description": "Estimated cost of typical channel close" - }, - "unilateral_close_satoshis": { - "type": "u64", - "description": "Estimated cost of typical unilateral close (without HTLCs)" - }, - "htlc_timeout_satoshis": { - "type": "u64", - "description": "Estimated cost of typical HTLC timeout transaction" - }, - "htlc_success_satoshis": { - "type": "u64", - "description": "Estimated cost of typical HTLC fulfillment transaction" - } - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "warning_missing_feerates": { + "type": "string", + "description": "Some fee estimates are missing" + }, + "perkb": { + "type": "object", + "description": "If *style* parameter was perkb", + "additionalProperties": false, + "required": [ + "min_acceptable", + "max_acceptable" + ], + "properties": { + "min_acceptable": { + "type": "u32", + "description": "The smallest feerate that you can use, usually the minimum relayed feerate of the backend" + }, + "max_acceptable": { + "type": "u32", + "description": "The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet)." + }, + "opening": { + "type": "u32", + "description": "Default feerate for lightning-fundchannel(7) and lightning-withdraw(7)" + }, + "mutual_close": { + "type": "u32", + "description": "Feerate to aim for in cooperative shutdown. Note that since mutual close is a **negotiation**, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer." + }, + "unilateral_close": { + "type": "u32", + "description": "Feerate for commitment_transaction in a live channel which we originally funded" + }, + "delayed_to_us": { + "type": "u32", + "description": "Feerate for returning unilateral close funds to our wallet" + }, + "htlc_resolution": { + "type": "u32", + "description": "Feerate for returning unilateral close HTLC outputs to our wallet" + }, + "penalty": { + "type": "u32", + "description": "Feerate to start at when penalizing a cheat attempt" + } + } + }, + "perkw": { + "type": "object", + "description": "If *style* parameter was perkw", + "additionalProperties": false, + "required": [ + "min_acceptable", + "max_acceptable" + ], + "properties": { + "min_acceptable": { + "type": "u32", + "description": "The smallest feerate that you can use, usually the minimum relayed feerate of the backend" + }, + "max_acceptable": { + "type": "u32", + "description": "The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet)." + }, + "opening": { + "type": "u32", + "description": "Default feerate for lightning-fundchannel(7) and lightning-withdraw(7)" + }, + "mutual_close": { + "type": "u32", + "description": "Feerate to aim for in cooperative shutdown. Note that since mutual close is a **negotiation**, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer." + }, + "unilateral_close": { + "type": "u32", + "description": "Feerate for commitment_transaction in a live channel which we originally funded" + }, + "delayed_to_us": { + "type": "u32", + "description": "Feerate for returning unilateral close funds to our wallet" + }, + "htlc_resolution": { + "type": "u32", + "description": "Feerate for returning unilateral close HTLC outputs to our wallet" + }, + "penalty": { + "type": "u32", + "description": "Feerate to start at when penalizing a cheat attempt" + } + } + }, + "onchain_fee_estimates": { + "type": "object", + "additionalProperties": false, + "required": [ + "opening_channel_satoshis", + "mutual_close_satoshis", + "unilateral_close_satoshis", + "htlc_timeout_satoshis", + "htlc_success_satoshis" + ], + "properties": { + "opening_channel_satoshis": { + "type": "u64", + "description": "Estimated cost of typical channel open" + }, + "mutual_close_satoshis": { + "type": "u64", + "description": "Estimated cost of typical channel close" + }, + "unilateral_close_satoshis": { + "type": "u64", + "description": "Estimated cost of typical unilateral close (without HTLCs)" + }, + "htlc_timeout_satoshis": { + "type": "u64", + "description": "Estimated cost of typical HTLC timeout transaction" + }, + "htlc_success_satoshis": { + "type": "u64", + "description": "Estimated cost of typical HTLC fulfillment transaction" + } + } } + } } diff --git a/doc/schemas/fetchinvoice.schema.json b/doc/schemas/fetchinvoice.schema.json index ff538b58c..951dcd19d 100644 --- a/doc/schemas/fetchinvoice.schema.json +++ b/doc/schemas/fetchinvoice.schema.json @@ -1,68 +1,77 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "invoice", "changes" ], - "properties": { - "invoice": { - "type": "string", - "description": "The BOLT12 invoice we fetched" - }, - "changes": { - "type": "object", - "description": "Summary of changes from offer", - "additionalProperties": false, - "required": [ ], - "properties": { - "description_appended": { - "type": "string", - "description": "extra characters appended to the *description* field." - }, - "description": { - "type": "string", - "description": "a completely replaced *description* field" - }, - "vendor_removed": { - "type": "string", - "description": "The *vendor* from the offer, which is missing in the invoice" - }, - "vendor": { - "type": "string", - "description": "a completely replaced *vendor* field" - }, - "msat": { - "type": "msat", - "description": "the amount, if different from the offer amount multiplied by any *quantity* (or the offer had no amount, or was not in BTC)." - } - } - }, - "next_period": { - "type": "object", - "description": "Only for recurring invoices if the next period is under the *recurrence_limit*", - "additionalProperties": false, - "required": [ "counter", "starttime", "endtime", "paywindow_start", "paywindow_end" ], - "properties": { - "counter": { - "type": "u64", - "description": "the index of the next period to fetchinvoice" - }, - "starttime": { - "type": "u64", - "description": "UNIX timestamp that the next period starts" - }, - "endtime": { - "type": "u64", - "description": "UNIX timestamp that the next period ends" - }, - "paywindow_start": { - "type": "u64", - "description": "UNIX timestamp of the earliest time that the next invoice can be fetched" - }, - "paywindow_end": { - "type": "u64", - "description": "UNIX timestamp of the latest time that the next invoice can be fetched" - } - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "invoice", + "changes" + ], + "properties": { + "invoice": { + "type": "string", + "description": "The BOLT12 invoice we fetched" + }, + "changes": { + "type": "object", + "description": "Summary of changes from offer", + "additionalProperties": false, + "required": [], + "properties": { + "description_appended": { + "type": "string", + "description": "extra characters appended to the *description* field." + }, + "description": { + "type": "string", + "description": "a completely replaced *description* field" + }, + "vendor_removed": { + "type": "string", + "description": "The *vendor* from the offer, which is missing in the invoice" + }, + "vendor": { + "type": "string", + "description": "a completely replaced *vendor* field" + }, + "msat": { + "type": "msat", + "description": "the amount, if different from the offer amount multiplied by any *quantity* (or the offer had no amount, or was not in BTC)." + } + } + }, + "next_period": { + "type": "object", + "description": "Only for recurring invoices if the next period is under the *recurrence_limit*", + "additionalProperties": false, + "required": [ + "counter", + "starttime", + "endtime", + "paywindow_start", + "paywindow_end" + ], + "properties": { + "counter": { + "type": "u64", + "description": "the index of the next period to fetchinvoice" + }, + "starttime": { + "type": "u64", + "description": "UNIX timestamp that the next period starts" + }, + "endtime": { + "type": "u64", + "description": "UNIX timestamp that the next period ends" + }, + "paywindow_start": { + "type": "u64", + "description": "UNIX timestamp of the earliest time that the next invoice can be fetched" + }, + "paywindow_end": { + "type": "u64", + "description": "UNIX timestamp of the latest time that the next invoice can be fetched" + } + } } + } } diff --git a/doc/schemas/fundchannel.schema.json b/doc/schemas/fundchannel.schema.json index 44775d377..40ee1deb1 100644 --- a/doc/schemas/fundchannel.schema.json +++ b/doc/schemas/fundchannel.schema.json @@ -1,30 +1,35 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "tx", "txid", "outnum", "channel_id" ], - "properties": { - "tx": { - "type": "hex", - "description": "The raw transaction which funded the channel" - }, - "txid": { - "type": "txid", - "description": "The txid of the transaction which funded the channel" - }, - "outnum": { - "type": "u32", - "description": "The 0-based output index showing which output funded the channel" - }, - "channel_id": { - "type": "hex", - "description": "The channel_id of the resulting channel", - "minLength": 64, - "maxLength": 64 - }, - "close_to": { - "type": "hex", - "description": "The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "tx", + "txid", + "outnum", + "channel_id" + ], + "properties": { + "tx": { + "type": "hex", + "description": "The raw transaction which funded the channel" + }, + "txid": { + "type": "txid", + "description": "The txid of the transaction which funded the channel" + }, + "outnum": { + "type": "u32", + "description": "The 0-based output index showing which output funded the channel" + }, + "channel_id": { + "type": "hex", + "description": "The channel_id of the resulting channel", + "minLength": 64, + "maxLength": 64 + }, + "close_to": { + "type": "hex", + "description": "The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`" } + } } diff --git a/doc/schemas/fundchannel_cancel.schema.json b/doc/schemas/fundchannel_cancel.schema.json index a9e1e663e..2c507db3e 100644 --- a/doc/schemas/fundchannel_cancel.schema.json +++ b/doc/schemas/fundchannel_cancel.schema.json @@ -1,12 +1,14 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "cancelled" ], - "properties": { - "cancelled": { - "type": "string", - "description": "A message indicating it was cancelled by RPC" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "cancelled" + ], + "properties": { + "cancelled": { + "type": "string", + "description": "A message indicating it was cancelled by RPC" } + } } diff --git a/doc/schemas/fundchannel_complete.schema.json b/doc/schemas/fundchannel_complete.schema.json index 90b29faee..3b3d0eefb 100644 --- a/doc/schemas/fundchannel_complete.schema.json +++ b/doc/schemas/fundchannel_complete.schema.json @@ -1,19 +1,24 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "channel_id", "commitments_secured" ], - "properties": { - "channel_id": { - "type": "hex", - "description": "The channel_id of the resulting channel", - "minLength": 64, - "maxLength": 64 - }, - "commitments_secured": { - "type": "boolean", - "enum": [ true ], - "description": "Indication that channel is safe to use" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "commitments_secured" + ], + "properties": { + "channel_id": { + "type": "hex", + "description": "The channel_id of the resulting channel", + "minLength": 64, + "maxLength": 64 + }, + "commitments_secured": { + "type": "boolean", + "enum": [ + true + ], + "description": "Indication that channel is safe to use" } + } } diff --git a/doc/schemas/fundchannel_start.schema.json b/doc/schemas/fundchannel_start.schema.json index 335e1eb1f..b7cc51b85 100644 --- a/doc/schemas/fundchannel_start.schema.json +++ b/doc/schemas/fundchannel_start.schema.json @@ -1,20 +1,23 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "funding_address", "scriptpubkey" ], - "properties": { - "funding_address": { - "type": "string", - "description": "The address to send funding to for the channel" - }, - "scriptpubkey": { - "type": "hex", - "description": "The raw scriptPubkey for the address" - }, - "close_to": { - "type": "hex", - "description": "The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "funding_address", + "scriptpubkey" + ], + "properties": { + "funding_address": { + "type": "string", + "description": "The address to send funding to for the channel" + }, + "scriptpubkey": { + "type": "hex", + "description": "The raw scriptPubkey for the address" + }, + "close_to": { + "type": "hex", + "description": "The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`" } + } } diff --git a/doc/schemas/funderupdate.schema.json b/doc/schemas/funderupdate.schema.json index a130be14d..4bca13652 100644 --- a/doc/schemas/funderupdate.schema.json +++ b/doc/schemas/funderupdate.schema.json @@ -1,76 +1,92 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": ["summary", "policy", "policy_mod", "leases_only", "min_their_funding_msat", "max_their_funding_msat", "per_channel_min_msat", "per_channel_max_msat", "reserve_tank_msat", "fuzz_percent", "fund_probability"], - "properties": { - "summary": { - "type": "string", - "description": "Summary of the current funding policy e.g. (match 100)" - }, - "policy": { - "type": "string", - "enum": [ "match", "available", "fixed" ], - "description": "Policy funder plugin will use to decide how much captial to commit to a v2 open channel request" - }, - "policy_mod": { - "type": "u32", - "description": "The *policy_mod* is the number or 'modification' to apply to the policy." - }, - "leases_only": { - "type": "boolean", - "description": "Only contribute funds to `option_will_fund` lease requests." - }, - "min_their_funding_msat": { - "type": "msat", - "description": "The minimum funding sats that we require from peer to activate our funding policy." - }, - "max_their_funding_msat": { - "type": "msat", - "description": "The maximum funding sats that we'll allow from peer to activate our funding policy." - }, - "per_channel_min_msat": { - "type": "msat", - "description": "The minimum amount that we will fund a channel open with." - }, - "per_channel_max_msat": { - "type": "msat", - "description": "The maximum amount that we will fund a channel open with." - }, - "reserve_tank_msat": { - "type": "msat", - "description": "Amount of sats to leave available in the node wallet." - }, - "fuzz_percent": { - "type": "u32", - "description": "Percentage to fuzz our funding amount by." - }, - "fund_probability": { - "type": "u32", - "description": "Percent of opens to consider funding. 100 means we'll consider funding every requested open channel request." - }, - "lease_fee_base_msat": { - "type": "msat", - "description": "Flat fee to charge for a channel lease." - }, - "lease_fee_basis": { - "type": "u32", - "description": "Proportional fee to charge for a channel lease, calculated as 1/10,000th of requested funds." - }, - "funding_weight": { - "type": "u32", - "description": "Transaction weight the channel opener will pay us for a leased funding transaction." - }, - "channel_fee_max_base_msat": { - "type": "msat", - "description": "Maximum channel_fee_base_msat we'll charge for routing funds leased on this channel." - }, - "channel_fee_max_proportional_thousandths": { - "type": "u32", - "description": "Maximum channel_fee_proportional_millitionths we'll charge for routing funds leased on this channel, in thousandths." - }, - "compact_lease": { - "type": "hex", - "description": "Compact description of the channel lease parameters." - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "summary", + "policy", + "policy_mod", + "leases_only", + "min_their_funding_msat", + "max_their_funding_msat", + "per_channel_min_msat", + "per_channel_max_msat", + "reserve_tank_msat", + "fuzz_percent", + "fund_probability" + ], + "properties": { + "summary": { + "type": "string", + "description": "Summary of the current funding policy e.g. (match 100)" + }, + "policy": { + "type": "string", + "enum": [ + "match", + "available", + "fixed" + ], + "description": "Policy funder plugin will use to decide how much captial to commit to a v2 open channel request" + }, + "policy_mod": { + "type": "u32", + "description": "The *policy_mod* is the number or 'modification' to apply to the policy." + }, + "leases_only": { + "type": "boolean", + "description": "Only contribute funds to `option_will_fund` lease requests." + }, + "min_their_funding_msat": { + "type": "msat", + "description": "The minimum funding sats that we require from peer to activate our funding policy." + }, + "max_their_funding_msat": { + "type": "msat", + "description": "The maximum funding sats that we'll allow from peer to activate our funding policy." + }, + "per_channel_min_msat": { + "type": "msat", + "description": "The minimum amount that we will fund a channel open with." + }, + "per_channel_max_msat": { + "type": "msat", + "description": "The maximum amount that we will fund a channel open with." + }, + "reserve_tank_msat": { + "type": "msat", + "description": "Amount of sats to leave available in the node wallet." + }, + "fuzz_percent": { + "type": "u32", + "description": "Percentage to fuzz our funding amount by." + }, + "fund_probability": { + "type": "u32", + "description": "Percent of opens to consider funding. 100 means we'll consider funding every requested open channel request." + }, + "lease_fee_base_msat": { + "type": "msat", + "description": "Flat fee to charge for a channel lease." + }, + "lease_fee_basis": { + "type": "u32", + "description": "Proportional fee to charge for a channel lease, calculated as 1/10,000th of requested funds." + }, + "funding_weight": { + "type": "u32", + "description": "Transaction weight the channel opener will pay us for a leased funding transaction." + }, + "channel_fee_max_base_msat": { + "type": "msat", + "description": "Maximum channel_fee_base_msat we'll charge for routing funds leased on this channel." + }, + "channel_fee_max_proportional_thousandths": { + "type": "u32", + "description": "Maximum channel_fee_proportional_millitionths we'll charge for routing funds leased on this channel, in thousandths." + }, + "compact_lease": { + "type": "hex", + "description": "Compact description of the channel lease parameters." } + } } diff --git a/doc/schemas/fundpsbt.schema.json b/doc/schemas/fundpsbt.schema.json index 8aac22c6d..84f0969e7 100644 --- a/doc/schemas/fundpsbt.schema.json +++ b/doc/schemas/fundpsbt.schema.json @@ -1,61 +1,76 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "psbt", "feerate_per_kw", "estimated_final_weight", "excess_msat" ], - "properties": { - "psbt": { - "type": "string", - "description": "Unsigned PSBT which fulfills the parameters given" - }, - "feerate_per_kw": { - "type": "u32", - "description": "The feerate used to create the PSBT, in satoshis-per-kiloweight" - }, - "estimated_final_weight": { - "type": "u32", - "description": "The estimated weight of the transaction once fully signed" - }, - "excess_msat": { - "type": "msat", - "description": "The amount above *satoshi* which is available. This could be zero, or dust; it will be zero if *change_outnum* is also returned" - }, - "change_outnum": { - "type": "u32", - "description": "The 0-based output number where change was placed (only if parameter *excess_as_change* was true and there was sufficient funds)" - }, - "reservations": { - "type": "array", - "description": "If *reserve* was true or a non-zero number, just as per lightning-reserveinputs(7)", - "items": { - "type": "object", - "required": ["txid", "vout", "was_reserved", "reserved", "reserved_to_block" ], - "additionalProperties": false, - "properties": { - "txid": { - "type": "txid", - "description": "The txid of the transaction" - }, - "vout": { - "type": "u32", - "description": "The 0-based output number" - }, - "was_reserved": { - "type": "boolean", - "enum": [ false ], - "description": "Whether this output was previously reserved" - }, - "reserved": { - "type": "boolean", - "enum": [ true ], - "description": "Whether this output is now reserved" - }, - "reserved_to_block": { - "type": "u32", - "description": "The blockheight the reservation will expire" - } - } - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "psbt", + "feerate_per_kw", + "estimated_final_weight", + "excess_msat" + ], + "properties": { + "psbt": { + "type": "string", + "description": "Unsigned PSBT which fulfills the parameters given" + }, + "feerate_per_kw": { + "type": "u32", + "description": "The feerate used to create the PSBT, in satoshis-per-kiloweight" + }, + "estimated_final_weight": { + "type": "u32", + "description": "The estimated weight of the transaction once fully signed" + }, + "excess_msat": { + "type": "msat", + "description": "The amount above *satoshi* which is available. This could be zero, or dust; it will be zero if *change_outnum* is also returned" + }, + "change_outnum": { + "type": "u32", + "description": "The 0-based output number where change was placed (only if parameter *excess_as_change* was true and there was sufficient funds)" + }, + "reservations": { + "type": "array", + "description": "If *reserve* was true or a non-zero number, just as per lightning-reserveinputs(7)", + "items": { + "type": "object", + "required": [ + "txid", + "vout", + "was_reserved", + "reserved", + "reserved_to_block" + ], + "additionalProperties": false, + "properties": { + "txid": { + "type": "txid", + "description": "The txid of the transaction" + }, + "vout": { + "type": "u32", + "description": "The 0-based output number" + }, + "was_reserved": { + "type": "boolean", + "enum": [ + false + ], + "description": "Whether this output was previously reserved" + }, + "reserved": { + "type": "boolean", + "enum": [ + true + ], + "description": "Whether this output is now reserved" + }, + "reserved_to_block": { + "type": "u32", + "description": "The blockheight the reservation will expire" + } + } + } } + } } diff --git a/doc/schemas/getinfo.schema.json b/doc/schemas/getinfo.schema.json index 02e2c5b43..4e0eda46a 100644 --- a/doc/schemas/getinfo.schema.json +++ b/doc/schemas/getinfo.schema.json @@ -1,148 +1,190 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "id", "alias", "color", "num_peers", "num_pending_channels", "num_active_channels", "num_inactive_channels", "version", "blockheight", "network", "fees_collected_msat", "lightning-dir" ], - "properties": { - "id": { - "type": "pubkey", - "description": "The public key unique to this node" - }, - "alias": { - "type": "string", - "description": "The fun alias this node will advertize", - "maxLength": 32 - }, - "color": { - "type": "hex", - "description": "The favorite RGB color this node will advertize", - "minLength": 6, - "maxLength": 6 - }, - "num_peers": { - "type": "u32", - "description": "The total count of peers, connected or with channels" - }, - "num_pending_channels": { - "type": "u32", - "description": "The total count of channels being opened" - }, - "num_active_channels": { - "type": "u32", - "description": "The total count of channels in normal state" - }, - "num_inactive_channels": { - "type": "u32", - "description": "The total count of channels waiting for opening or closing transactions to be mined" - }, - "version": { - "type": "string", - "description": "Identifies what bugs you are running into" - }, - "lightning-dir": { - "type": "string", - "description": "Identifies where you can find the configuration and other related files" - }, - "blockheight": { - "type": "u32", - "description": "The highest block height we've learned" - }, - "network": { - "type": "string", - "description": "represents the type of network on the node are working (e.g: `bitcoin`, `testnet`, or `regtest`)" - }, - "msatoshi_fees_collected": { - "type": "u64", - "deprecated": true - }, - "fees_collected_msat": { - "type": "msat", - "description": "Total routing fees collected by this node" - }, - "address": { - "type": "array", - "description": "The addresses we announce to the world", - "items": { - "type": "object", - "required": [ "type", "port" ], - "additionalProperties": true, - "properties": { - "type": { - "type": "string", - "enum": [ "ipv4", "ipv6", "torv2", "torv3", "websocket" ], - "description": "Type of connection" - }, - "port": { - "type": "u16", - "description": "port number" - } - }, - "if": { - "properties": { - "type": { - "type": "string", - "enum": [ "ipv4", "ipv6", "torv2", "torv3" ] - } - } - }, - "then": { - "required": [ "type", "address", "port" ], - "additionalProperties": false, - "properties": { - "type": { }, - "port": { }, - "address": { - "type": "string", - "description": "address in expected format for **type**" - } - } - }, - "else": { - "required": [ "type", "port" ], - "additionalProperties": false, - "properties": { - "type": { }, - "port": { } - } - } - } - }, - "binding": { - "type": "array", - "description": "The addresses we are listening on", - "items": { - "type": "object", - "required": [ "type" ], - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "*FIXME*": "The variant in connect.schema.json is more complete", - "enum": [ "local socket", "ipv4", "ipv6", "torv2", "torv3" ], - "description": "Type of connection" - }, - "address": { - "type": "string", - "description": "address in expected format for **type**" - }, - "port": { - "type": "u16", - "description": "port number" - }, - "socket": { - "type": "string", - "description": "socket filename (only if **type** is \"local socket\")" - } - } - } - }, - "warning_bitcoind_sync": { - "type": "string", - "description": "Bitcoind is not up-to-date with network." - }, - "warning_lightningd_sync": { - "type": "string", - "description": "Lightningd is still loading latest blocks from bitcoind." - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "alias", + "color", + "num_peers", + "num_pending_channels", + "num_active_channels", + "num_inactive_channels", + "version", + "blockheight", + "network", + "fees_collected_msat", + "lightning-dir" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "The public key unique to this node" + }, + "alias": { + "type": "string", + "description": "The fun alias this node will advertize", + "maxLength": 32 + }, + "color": { + "type": "hex", + "description": "The favorite RGB color this node will advertize", + "minLength": 6, + "maxLength": 6 + }, + "num_peers": { + "type": "u32", + "description": "The total count of peers, connected or with channels" + }, + "num_pending_channels": { + "type": "u32", + "description": "The total count of channels being opened" + }, + "num_active_channels": { + "type": "u32", + "description": "The total count of channels in normal state" + }, + "num_inactive_channels": { + "type": "u32", + "description": "The total count of channels waiting for opening or closing transactions to be mined" + }, + "version": { + "type": "string", + "description": "Identifies what bugs you are running into" + }, + "lightning-dir": { + "type": "string", + "description": "Identifies where you can find the configuration and other related files" + }, + "blockheight": { + "type": "u32", + "description": "The highest block height we've learned" + }, + "network": { + "type": "string", + "description": "represents the type of network on the node are working (e.g: `bitcoin`, `testnet`, or `regtest`)" + }, + "msatoshi_fees_collected": { + "type": "u64", + "deprecated": true + }, + "fees_collected_msat": { + "type": "msat", + "description": "Total routing fees collected by this node" + }, + "address": { + "type": "array", + "description": "The addresses we announce to the world", + "items": { + "type": "object", + "required": [ + "type", + "port" + ], + "additionalProperties": true, + "properties": { + "type": { + "type": "string", + "enum": [ + "ipv4", + "ipv6", + "torv2", + "torv3", + "websocket" + ], + "description": "Type of connection" + }, + "port": { + "type": "u16", + "description": "port number" + } + }, + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "ipv4", + "ipv6", + "torv2", + "torv3" + ] + } + } + }, + "then": { + "required": [ + "type", + "address", + "port" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "port": {}, + "address": { + "type": "string", + "description": "address in expected format for **type**" + } + } + }, + "else": { + "required": [ + "type", + "port" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "port": {} + } + } + } + }, + "binding": { + "type": "array", + "description": "The addresses we are listening on", + "items": { + "type": "object", + "required": [ + "type" + ], + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "*FIXME*": "The variant in connect.schema.json is more complete", + "enum": [ + "local socket", + "ipv4", + "ipv6", + "torv2", + "torv3" + ], + "description": "Type of connection" + }, + "address": { + "type": "string", + "description": "address in expected format for **type**" + }, + "port": { + "type": "u16", + "description": "port number" + }, + "socket": { + "type": "string", + "description": "socket filename (only if **type** is \"local socket\")" + } + } + } + }, + "warning_bitcoind_sync": { + "type": "string", + "description": "Bitcoind is not up-to-date with network." + }, + "warning_lightningd_sync": { + "type": "string", + "description": "Lightningd is still loading latest blocks from bitcoind." } + } } diff --git a/doc/schemas/getlog.schema.json b/doc/schemas/getlog.schema.json index 23c9981b5..b2ba62b75 100644 --- a/doc/schemas/getlog.schema.json +++ b/doc/schemas/getlog.schema.json @@ -1,127 +1,163 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "created_at", "bytes_used", "bytes_max", "log" ], - "properties": { - "created_at": { - "type": "string", - "description": "UNIX timestamp with 9 decimal places, when logging was initialized" - }, - "bytes_used": { - "type": "u32", - "description": "The number of bytes used by logging records" - }, - "bytes_max": { - "type": "u32", - "description": "The bytes_used values at which records will be trimmed " - }, - "log": { - "type": "array", - "items": { - "type": "object", - "required": [ "type" ], - "additionalProperties": true, - "properties": { - "type": { - "type": "string", - "enum": [ "SKIPPED", "BROKEN", "UNUSUAL", "INFO", "DEBUG", "IO_IN", "IO_OUT" ] - } - }, - "allOf": [ - { - "if": { - "additionalProperties": true, - "properties": { - "type": { - "enum": [ "SKIPPED" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "num_skipped" ], - "properties": { - "type": { }, - "num_skipped": { - "type": "u32", - "description": "number of unprinted log entries (deleted or below *level* parameter)" - } - } - } - }, - { - "if": { - "additionalProperties": true, - "properties": { - "type": { - "enum": [ "BROKEN", "UNUSUAL", "INFO", "DEBUG" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "time", "source", "log" ], - "properties": { - "type": { }, - "time": { - "type": "string", - "description": "UNIX timestamp with 9 decimal places after **created_at**" - }, - "source": { - "type": "string", - "description": "The particular logbook this was found in" - }, - "log": { - "type": "string", - "description": "The actual log message" - }, - "node_id": { - "type": "pubkey", - "description": "The peer this is associated with" - } - } - } - }, - { - "if": { - "additionalProperties": true, - "properties": { - "type": { - "enum": [ "IO_IN", "IO_OUT" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "time", "source", "log", "data" ], - "properties": { - "type": { }, - "time": { - "type": "string", - "description": "Seconds after **created_at**, with 9 decimal places" - }, - "source": { - "type": "string", - "description": "The particular logbook this was found in" - }, - "log": { - "type": "string", - "description": "The associated log message" - }, - "node_id": { - "type": "pubkey", - "description": "The peer this is associated with" - }, - "data": { - "type": "hex", - "description": "The IO which occurred" - } - } - } - } - ] - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "created_at", + "bytes_used", + "bytes_max", + "log" + ], + "properties": { + "created_at": { + "type": "string", + "description": "UNIX timestamp with 9 decimal places, when logging was initialized" + }, + "bytes_used": { + "type": "u32", + "description": "The number of bytes used by logging records" + }, + "bytes_max": { + "type": "u32", + "description": "The bytes_used values at which records will be trimmed " + }, + "log": { + "type": "array", + "items": { + "type": "object", + "required": [ + "type" + ], + "additionalProperties": true, + "properties": { + "type": { + "type": "string", + "enum": [ + "SKIPPED", + "BROKEN", + "UNUSUAL", + "INFO", + "DEBUG", + "IO_IN", + "IO_OUT" + ] + } + }, + "allOf": [ + { + "if": { + "additionalProperties": true, + "properties": { + "type": { + "enum": [ + "SKIPPED" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "num_skipped" + ], + "properties": { + "type": {}, + "num_skipped": { + "type": "u32", + "description": "number of unprinted log entries (deleted or below *level* parameter)" + } + } + } + }, + { + "if": { + "additionalProperties": true, + "properties": { + "type": { + "enum": [ + "BROKEN", + "UNUSUAL", + "INFO", + "DEBUG" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "time", + "source", + "log" + ], + "properties": { + "type": {}, + "time": { + "type": "string", + "description": "UNIX timestamp with 9 decimal places after **created_at**" + }, + "source": { + "type": "string", + "description": "The particular logbook this was found in" + }, + "log": { + "type": "string", + "description": "The actual log message" + }, + "node_id": { + "type": "pubkey", + "description": "The peer this is associated with" + } + } + } + }, + { + "if": { + "additionalProperties": true, + "properties": { + "type": { + "enum": [ + "IO_IN", + "IO_OUT" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "time", + "source", + "log", + "data" + ], + "properties": { + "type": {}, + "time": { + "type": "string", + "description": "Seconds after **created_at**, with 9 decimal places" + }, + "source": { + "type": "string", + "description": "The particular logbook this was found in" + }, + "log": { + "type": "string", + "description": "The associated log message" + }, + "node_id": { + "type": "pubkey", + "description": "The peer this is associated with" + }, + "data": { + "type": "hex", + "description": "The IO which occurred" + } + } + } + } + ] + } } + } } diff --git a/doc/schemas/getroute.schema.json b/doc/schemas/getroute.schema.json index 9e5ebe7eb..d6878da41 100644 --- a/doc/schemas/getroute.schema.json +++ b/doc/schemas/getroute.schema.json @@ -1,47 +1,59 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "route" ], - "properties": { - "route": { - "type": "array", - "items": { - "type": "object", - "required": [ "id", "direction", "channel", "amount_msat", "delay", "style" ], - "additionalProperties": false, - "properties": { - "id": { - "type": "pubkey", - "description": "The node at the end of this hop" - }, - "channel": { - "type": "short_channel_id", - "description": "The channel joining these nodes" - }, - "direction": { - "type": "u32", - "description": "0 if this channel is traversed from lesser to greater **id**, otherwise 1" - }, - "msatoshi": { - "type": "u64", - "deprecated": true - }, - "amount_msat": { - "type": "msat", - "description": "The amount expected by the node at the end of this hop" - }, - "delay": { - "type": "u32", - "description": "The total CLTV expected by the node at the end of this hop" - }, - "style": { - "type": "string", - "description": "The features understood by the destination node", - "enum": [ "legacy", "tlv" ] - } - } - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "route" + ], + "properties": { + "route": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "direction", + "channel", + "amount_msat", + "delay", + "style" + ], + "additionalProperties": false, + "properties": { + "id": { + "type": "pubkey", + "description": "The node at the end of this hop" + }, + "channel": { + "type": "short_channel_id", + "description": "The channel joining these nodes" + }, + "direction": { + "type": "u32", + "description": "0 if this channel is traversed from lesser to greater **id**, otherwise 1" + }, + "msatoshi": { + "type": "u64", + "deprecated": true + }, + "amount_msat": { + "type": "msat", + "description": "The amount expected by the node at the end of this hop" + }, + "delay": { + "type": "u32", + "description": "The total CLTV expected by the node at the end of this hop" + }, + "style": { + "type": "string", + "description": "The features understood by the destination node", + "enum": [ + "legacy", + "tlv" + ] + } + } + } } + } } diff --git a/doc/schemas/getsharedsecret.schema.json b/doc/schemas/getsharedsecret.schema.json index 143d0e87c..276ea1e09 100644 --- a/doc/schemas/getsharedsecret.schema.json +++ b/doc/schemas/getsharedsecret.schema.json @@ -1,14 +1,16 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "required": [ "shared_secret" ], - "properties": { - "shared_secret": { - "type": "hex", - "description": "the SHA-2 of the compressed encoding of the shared secp256k1 point", - "maxLength": 64, - "minLength": 64 - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "shared_secret" + ], + "properties": { + "shared_secret": { + "type": "hex", + "description": "the SHA-2 of the compressed encoding of the shared secp256k1 point", + "maxLength": 64, + "minLength": 64 } + } } diff --git a/doc/schemas/help.schema.json b/doc/schemas/help.schema.json index 37c9ce150..df8777c0d 100644 --- a/doc/schemas/help.schema.json +++ b/doc/schemas/help.schema.json @@ -1,35 +1,42 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "help" ], - "properties": { - "help": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true, - "required": [ "command", "category", "description", "verbose" ], - "properties": { - "command": { - "type": "string", - "description": "the command" - }, - "category": { - "type": "string", - "description": "the category for this command (useful for grouping)" - }, - "description": { - "type": "string", - "description": "a one-line description of the purpose of this command" - }, - "verbose": { - "type": "string", - "description": "a full description of this command (including whether it's deprecated)" - } - } - } - }, - "format-hint": { } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "help" + ], + "properties": { + "help": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "command", + "category", + "description", + "verbose" + ], + "properties": { + "command": { + "type": "string", + "description": "the command" + }, + "category": { + "type": "string", + "description": "the category for this command (useful for grouping)" + }, + "description": { + "type": "string", + "description": "a one-line description of the purpose of this command" + }, + "verbose": { + "type": "string", + "description": "a full description of this command (including whether it's deprecated)" + } + } + } + }, + "format-hint": {} + } } diff --git a/doc/schemas/invoice.schema.json b/doc/schemas/invoice.schema.json index 4e7976555..fcb3f899a 100644 --- a/doc/schemas/invoice.schema.json +++ b/doc/schemas/invoice.schema.json @@ -1,48 +1,53 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "payment_hash", "expires_at", "bolt11", "payment_secret" ], - "properties": { - "bolt11": { - "type": "string", - "description": "the bolt11 string" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "payment_secret": { - "type": "hex", - "description": "the *payment_secret* to place in the onion", - "maxLength": 64, - "minLength": 64 - }, - "expires_at": { - "type": "u64", - "description": "UNIX timestamp of when invoice expires" - }, - "warning_capacity": { - "type": "string", - "description": "even using all possible channels, there's not enough incoming capacity to pay this invoice." - }, - "warning_offline": { - "type": "string", - "description": "there would be enough incoming capacity, but some channels are offline, so there isn't." - }, - "warning_deadends": { - "type": "string", - "description": "there would be enough incoming capacity, but some channels are dead-ends (no other public channels from those peers), so there isn't." - }, - "warning_private_unused": { - "type": "string", - "description": "there would be enough incoming capacity, but some channels are unannounced and *exposeprivatechannels* is *false*, so there isn't." - }, - "warning_mpp": { - "type": "string", - "description": "there is sufficient capacity, but not in a single channel, so the payer will have to use multi-part payments." - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "payment_hash", + "expires_at", + "bolt11", + "payment_secret" + ], + "properties": { + "bolt11": { + "type": "string", + "description": "the bolt11 string" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "payment_secret": { + "type": "hex", + "description": "the *payment_secret* to place in the onion", + "maxLength": 64, + "minLength": 64 + }, + "expires_at": { + "type": "u64", + "description": "UNIX timestamp of when invoice expires" + }, + "warning_capacity": { + "type": "string", + "description": "even using all possible channels, there's not enough incoming capacity to pay this invoice." + }, + "warning_offline": { + "type": "string", + "description": "there would be enough incoming capacity, but some channels are offline, so there isn't." + }, + "warning_deadends": { + "type": "string", + "description": "there would be enough incoming capacity, but some channels are dead-ends (no other public channels from those peers), so there isn't." + }, + "warning_private_unused": { + "type": "string", + "description": "there would be enough incoming capacity, but some channels are unannounced and *exposeprivatechannels* is *false*, so there isn't." + }, + "warning_mpp": { + "type": "string", + "description": "there is sufficient capacity, but not in a single channel, so the payer will have to use multi-part payments." } + } } diff --git a/doc/schemas/keysend.schema.json b/doc/schemas/keysend.schema.json index b3bd48ccc..1a4f395f9 100644 --- a/doc/schemas/keysend.schema.json +++ b/doc/schemas/keysend.schema.json @@ -1,55 +1,65 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "payment_preimage", "payment_hash", "created_at", "parts", "amount_msat", "amount_sent_msat", "status" ], - "properties": { - "payment_preimage": { - "type": "hex", - "description": "the proof of payment: SHA256 of this **payment_hash**", - "maxLength": 64, - "minLength": 64 - }, - "destination": { - "type": "pubkey", - "description": "the final destination of the payment" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "created_at": { - "type": "number", - "description": "the UNIX timestamp showing when this payment was initiated" - }, - "parts": { - "type": "u32", - "description": "how many attempts this took" - }, - "msatoshi": { - "deprecated": true - }, - "amount_msat": { - "type": "msat", - "description": "Amount the recipient received" - }, - "msatoshi_sent": { - "deprecated": true - }, - "amount_sent_msat": { - "type": "msat", - "description": "Total amount we sent (including fees)" - }, - "warning_partial_completion": { - "type": "string", - "description": "Not all parts of a multi-part payment have completed" - }, - "status": { - "type": "string", - "enum": [ "complete" ], - "description": "status of payment" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "payment_preimage", + "payment_hash", + "created_at", + "parts", + "amount_msat", + "amount_sent_msat", + "status" + ], + "properties": { + "payment_preimage": { + "type": "hex", + "description": "the proof of payment: SHA256 of this **payment_hash**", + "maxLength": 64, + "minLength": 64 + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "created_at": { + "type": "number", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "parts": { + "type": "u32", + "description": "how many attempts this took" + }, + "msatoshi": { + "deprecated": true + }, + "amount_msat": { + "type": "msat", + "description": "Amount the recipient received" + }, + "msatoshi_sent": { + "deprecated": true + }, + "amount_sent_msat": { + "type": "msat", + "description": "Total amount we sent (including fees)" + }, + "warning_partial_completion": { + "type": "string", + "description": "Not all parts of a multi-part payment have completed" + }, + "status": { + "type": "string", + "enum": [ + "complete" + ], + "description": "status of payment" } + } } diff --git a/doc/schemas/listchannels.schema.json b/doc/schemas/listchannels.schema.json index bd1ab36b7..a187e6196 100644 --- a/doc/schemas/listchannels.schema.json +++ b/doc/schemas/listchannels.schema.json @@ -1,77 +1,94 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "channels" ], - "properties": { - "channels": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true, - "required": [ "source", "destination", "short_channel_id", "public", "amount_msat", "message_flags", "channel_flags", "active", "last_update", "base_fee_millisatoshi", "fee_per_millionth", "delay", "htlc_minimum_msat", "features" ], - "properties": { - "source": { - "type": "pubkey", - "description": "the source node" - }, - "destination": { - "type": "pubkey", - "description": "the destination node" - }, - "public": { - "type": "boolean", - "description": "true if this is announced (otherwise it must be our channel)" - }, - "amount_msat": { - "type": "msat", - "description": "the total capacity of this channel (always a whole number of satoshis)" - }, - "message_flags": { - "type": "u8", - "description": "as defined by BOLT #7" - }, - "channel_flags": { - "type": "u8", - "description": "as defined by BOLT #7" - }, - "active": { - "type": "boolean", - "description": "true unless source has disabled it, or it's a local channel and the peer is disconnected or it's still opening or closing" - }, - "last_update": { - "type": "u32", - "description": "UNIX timestamp on the last channel_update from *source*" - }, - "base_fee_millisatoshi": { - "type": "u32", - "description": "Base fee changed by *source* to use this channel" - }, - "fee_per_millionth": { - "type": "u32", - "description": "Proportional fee changed by *source* to use this channel, in parts-per-million" - }, - "delay": { - "type": "u32", - "description": "The number of blocks delay required by *source* to use this channel" - }, - "htlc_minimum_msat": { - "type": "msat", - "description": "The smallest payment *source* will allow via this channel" - }, - "satoshis": { - "deprecated": true - }, - "htlc_maximum_msat": { - "type": "msat", - "description": "The largest payment *source* will allow via this channel" - }, - "features": { - "type": "hex", - "description": "BOLT #9 features bitmap for this channel" - } - } - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channels" + ], + "properties": { + "channels": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "source", + "destination", + "short_channel_id", + "public", + "amount_msat", + "message_flags", + "channel_flags", + "active", + "last_update", + "base_fee_millisatoshi", + "fee_per_millionth", + "delay", + "htlc_minimum_msat", + "features" + ], + "properties": { + "source": { + "type": "pubkey", + "description": "the source node" + }, + "destination": { + "type": "pubkey", + "description": "the destination node" + }, + "public": { + "type": "boolean", + "description": "true if this is announced (otherwise it must be our channel)" + }, + "amount_msat": { + "type": "msat", + "description": "the total capacity of this channel (always a whole number of satoshis)" + }, + "message_flags": { + "type": "u8", + "description": "as defined by BOLT #7" + }, + "channel_flags": { + "type": "u8", + "description": "as defined by BOLT #7" + }, + "active": { + "type": "boolean", + "description": "true unless source has disabled it, or it's a local channel and the peer is disconnected or it's still opening or closing" + }, + "last_update": { + "type": "u32", + "description": "UNIX timestamp on the last channel_update from *source*" + }, + "base_fee_millisatoshi": { + "type": "u32", + "description": "Base fee changed by *source* to use this channel" + }, + "fee_per_millionth": { + "type": "u32", + "description": "Proportional fee changed by *source* to use this channel, in parts-per-million" + }, + "delay": { + "type": "u32", + "description": "The number of blocks delay required by *source* to use this channel" + }, + "htlc_minimum_msat": { + "type": "msat", + "description": "The smallest payment *source* will allow via this channel" + }, + "satoshis": { + "deprecated": true + }, + "htlc_maximum_msat": { + "type": "msat", + "description": "The largest payment *source* will allow via this channel" + }, + "features": { + "type": "hex", + "description": "BOLT #9 features bitmap for this channel" + } + } + } } + } } diff --git a/doc/schemas/listconfigs.schema.json b/doc/schemas/listconfigs.schema.json index 1ecdb0c35..ac041bf8d 100644 --- a/doc/schemas/listconfigs.schema.json +++ b/doc/schemas/listconfigs.schema.json @@ -1,263 +1,267 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ ], - "properties": { - "# version": { - "type": "string", - "description": "Special field indicating the current version" - }, - "plugins": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ "path", "name" ], - "description": "`plugin` field from config or cmdline", - "properties": { - "path": { - "type": "string", - "description": "Full path of the plugin" - }, - "name": { - "type": "string", - "description": "short name of the plugin" - }, - "options": { - "type": "object", - "additionalProperties": true, - "required": [ ], - "description": "Specific options set for this plugin", - "properties": { - } - } - } - } - }, - "important-plugins": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ "path", "name" ], - "description": "`important-plugin` field from config or cmdline, or built-in", - "properties": { - "path": { - "type": "string", - "description": "Full path of the plugin" - }, - "name": { - "type": "string", - "description": "short name of the plugin" - }, - "options": { - "type": "object", - "additionalProperties": true, - "required": [ ], - "description": "Specific options set for this plugin", - "properties": { - } - } - } - } - }, - "conf": { - "type": "string", - "description": "`conf` field from cmdline, or default" - }, - "lightning-dir": { - "type": "string", - "description": "`lightning-dir` field from config or cmdline, or default" - }, - "network": { - "type": "string", - "description": "`network` field from config or cmdline, or default" - }, - "allow-deprecated-apis": { - "type": "boolean", - "description": "`allow-deprecated-apis` field from config or cmdline, or default" - }, - "rpc-file": { - "type": "string", - "description": "`rpc-file` field from config or cmdline, or default" - }, - "disable-plugin": { - "type": "array", - "items": { - "type": "string", - "description": "`disable-plugin` field from config or cmdline" - } - }, - "always-use-proxy": { - "type": "boolean", - "description": "`always-use-proxy` field from config or cmdline, or default" - }, - "daemon": { - "type": "boolean", - "description": "`daemon` field from config or cmdline, or default" - }, - "wallet": { - "type": "string", - "description": "`wallet` field from config or cmdline, or default" - }, - "large-channels": { - "type": "boolean", - "description": "`large-channels` field from config or cmdline, or default" - }, - "experimental-dual-fund": { - "type": "boolean", - "description": "`experimental-dual-fund` field from config or cmdline, or default" - }, - "experimental-onion-messages": { - "type": "boolean", - "description": "`experimental-onion-messages` field from config or cmdline, or default" - }, - "experimental-offers": { - "type": "boolean", - "description": "`experimental-offers` field from config or cmdline, or default" - }, - "experimental-shutdown-wrong-funding": { - "type": "boolean", - "description": "`experimental-shutdown-wrong-funding` field from config or cmdline, or default" - }, - "experimental-websocket-port": { - "type": "u16", - "description": "`experimental-websocket-port` field from config or cmdline, or default" - }, - "rgb": { - "type": "hex", - "description": "`rgb` field from config or cmdline, or default", - "maxLength": 6, - "minLength": 6 - }, - "alias": { - "type": "string", - "description": "`alias` field from config or cmdline, or default" - }, - "pid-file": { - "type": "string", - "description": "`pid-file` field from config or cmdline, or default" - }, - "ignore-fee-limits": { - "type": "boolean", - "description": "`ignore-fee-limits` field from config or cmdline, or default" - }, - "watchtime-blocks": { - "type": "u32", - "description": "`watchtime-blocks` field from config or cmdline, or default" - }, - "max-locktime-blocks": { - "type": "u32", - "description": "`max-locktime-blocks` field from config or cmdline, or default" - }, - "funding-confirms": { - "type": "u32", - "description": "`funding-confirms` field from config or cmdline, or default" - }, - "cltv-delta": { - "type": "u32", - "description": "`cltv-delta` field from config or cmdline, or default" - }, - "cltv-final": { - "type": "u32", - "description": "`cltv-final` field from config or cmdline, or default" - }, - "commit-time": { - "type": "u32", - "description": "`commit-time` field from config or cmdline, or default" - }, - "fee-base": { - "type": "u32", - "description": "`fee-base` field from config or cmdline, or default" - }, - "rescan": { - "type": "integer", - "description": "`rescan` field from config or cmdline, or default" - }, - "fee-per-satoshi": { - "type": "u32", - "description": "`fee-per-satoshi` field from config or cmdline, or default" - }, - "max-concurrent-htlcs": { - "type": "u32", - "description": "`max-concurrent-htlcs` field from config or cmdline, or default" - }, - "max-dust-htlc-exposure-msat": { - "type": "msat", - "description": "`max-dust-htlc-exposure-mast` field from config or cmdline, or default" - }, - "min-capacity-sat": { - "type": "u64", - "description": "`min-capacity-sat` field from config or cmdline, or default" - }, - "addr": { - "type": "string", - "description": "`addr` field from config or cmdline (can be more than one)" - }, - "announce-addr": { - "type": "string", - "description": "`announce-addr` field from config or cmdline (can be more than one)" - }, - "bind-addr": { - "type": "string", - "description": "`bind-addr` field from config or cmdline (can be more than one)" - }, - "offline": { - "type": "boolean", - "description": "`true` if `offline` was set in config or cmdline" - }, - "autolisten": { - "type": "boolean", - "description": "`autolisten` field from config or cmdline, or default" - }, - "proxy": { - "type": "string", - "description": "`proxy` field from config or cmdline, or default" - }, - "disable-dns": { - "type": "boolean", - "description": "`true` if `disable-dns` was set in config or cmdline" - }, - "encrypted-hsm": { - "type": "boolean", - "description": "`true` if `encrypted-hsm` was set in config or cmdline" - }, - "rpc-file-mode": { - "type": "string", - "description": "`rpc-file-mode` field from config or cmdline, or default" - }, - "log-level": { - "type": "string", - "description": "`log-level` field from config or cmdline, or default" - }, - "log-prefix": { - "type": "string", - "description": "`log-prefix` field from config or cmdline, or default" - }, - "log-file": { - "type": "string", - "description": "`log-file` field from config or cmdline, or default" - }, - "log-timestamps": { - "type": "boolean", - "description": "`log-timestamps` field from config or cmdline, or default" - }, - "force-feerates": { - "type": "string", - "description": "force-feerate configuration setting, if any" - }, - "subdaemon": { - "type": "string", - "description": "`subdaemon` fields from config or cmdline if any (can be more than one)" - }, - "fetchinvoice-noconnect": { - "type": "boolean", - "description": "`featchinvoice-noconnect` fileds from config or cmdline, or default" - }, - "tor-service-password": { - "type": "string", - "description": "`tor-service-password` field from config or cmdline, if any" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "# version": { + "type": "string", + "description": "Special field indicating the current version" + }, + "plugins": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "path", + "name" + ], + "description": "`plugin` field from config or cmdline", + "properties": { + "path": { + "type": "string", + "description": "Full path of the plugin" + }, + "name": { + "type": "string", + "description": "short name of the plugin" + }, + "options": { + "type": "object", + "additionalProperties": true, + "required": [], + "description": "Specific options set for this plugin", + "properties": {} + } + } + } + }, + "important-plugins": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "path", + "name" + ], + "description": "`important-plugin` field from config or cmdline, or built-in", + "properties": { + "path": { + "type": "string", + "description": "Full path of the plugin" + }, + "name": { + "type": "string", + "description": "short name of the plugin" + }, + "options": { + "type": "object", + "additionalProperties": true, + "required": [], + "description": "Specific options set for this plugin", + "properties": {} + } + } + } + }, + "conf": { + "type": "string", + "description": "`conf` field from cmdline, or default" + }, + "lightning-dir": { + "type": "string", + "description": "`lightning-dir` field from config or cmdline, or default" + }, + "network": { + "type": "string", + "description": "`network` field from config or cmdline, or default" + }, + "allow-deprecated-apis": { + "type": "boolean", + "description": "`allow-deprecated-apis` field from config or cmdline, or default" + }, + "rpc-file": { + "type": "string", + "description": "`rpc-file` field from config or cmdline, or default" + }, + "disable-plugin": { + "type": "array", + "items": { + "type": "string", + "description": "`disable-plugin` field from config or cmdline" + } + }, + "always-use-proxy": { + "type": "boolean", + "description": "`always-use-proxy` field from config or cmdline, or default" + }, + "daemon": { + "type": "boolean", + "description": "`daemon` field from config or cmdline, or default" + }, + "wallet": { + "type": "string", + "description": "`wallet` field from config or cmdline, or default" + }, + "large-channels": { + "type": "boolean", + "description": "`large-channels` field from config or cmdline, or default" + }, + "experimental-dual-fund": { + "type": "boolean", + "description": "`experimental-dual-fund` field from config or cmdline, or default" + }, + "experimental-onion-messages": { + "type": "boolean", + "description": "`experimental-onion-messages` field from config or cmdline, or default" + }, + "experimental-offers": { + "type": "boolean", + "description": "`experimental-offers` field from config or cmdline, or default" + }, + "experimental-shutdown-wrong-funding": { + "type": "boolean", + "description": "`experimental-shutdown-wrong-funding` field from config or cmdline, or default" + }, + "experimental-websocket-port": { + "type": "u16", + "description": "`experimental-websocket-port` field from config or cmdline, or default" + }, + "rgb": { + "type": "hex", + "description": "`rgb` field from config or cmdline, or default", + "maxLength": 6, + "minLength": 6 + }, + "alias": { + "type": "string", + "description": "`alias` field from config or cmdline, or default" + }, + "pid-file": { + "type": "string", + "description": "`pid-file` field from config or cmdline, or default" + }, + "ignore-fee-limits": { + "type": "boolean", + "description": "`ignore-fee-limits` field from config or cmdline, or default" + }, + "watchtime-blocks": { + "type": "u32", + "description": "`watchtime-blocks` field from config or cmdline, or default" + }, + "max-locktime-blocks": { + "type": "u32", + "description": "`max-locktime-blocks` field from config or cmdline, or default" + }, + "funding-confirms": { + "type": "u32", + "description": "`funding-confirms` field from config or cmdline, or default" + }, + "cltv-delta": { + "type": "u32", + "description": "`cltv-delta` field from config or cmdline, or default" + }, + "cltv-final": { + "type": "u32", + "description": "`cltv-final` field from config or cmdline, or default" + }, + "commit-time": { + "type": "u32", + "description": "`commit-time` field from config or cmdline, or default" + }, + "fee-base": { + "type": "u32", + "description": "`fee-base` field from config or cmdline, or default" + }, + "rescan": { + "type": "integer", + "description": "`rescan` field from config or cmdline, or default" + }, + "fee-per-satoshi": { + "type": "u32", + "description": "`fee-per-satoshi` field from config or cmdline, or default" + }, + "max-concurrent-htlcs": { + "type": "u32", + "description": "`max-concurrent-htlcs` field from config or cmdline, or default" + }, + "max-dust-htlc-exposure-msat": { + "type": "msat", + "description": "`max-dust-htlc-exposure-mast` field from config or cmdline, or default" + }, + "min-capacity-sat": { + "type": "u64", + "description": "`min-capacity-sat` field from config or cmdline, or default" + }, + "addr": { + "type": "string", + "description": "`addr` field from config or cmdline (can be more than one)" + }, + "announce-addr": { + "type": "string", + "description": "`announce-addr` field from config or cmdline (can be more than one)" + }, + "bind-addr": { + "type": "string", + "description": "`bind-addr` field from config or cmdline (can be more than one)" + }, + "offline": { + "type": "boolean", + "description": "`true` if `offline` was set in config or cmdline" + }, + "autolisten": { + "type": "boolean", + "description": "`autolisten` field from config or cmdline, or default" + }, + "proxy": { + "type": "string", + "description": "`proxy` field from config or cmdline, or default" + }, + "disable-dns": { + "type": "boolean", + "description": "`true` if `disable-dns` was set in config or cmdline" + }, + "encrypted-hsm": { + "type": "boolean", + "description": "`true` if `encrypted-hsm` was set in config or cmdline" + }, + "rpc-file-mode": { + "type": "string", + "description": "`rpc-file-mode` field from config or cmdline, or default" + }, + "log-level": { + "type": "string", + "description": "`log-level` field from config or cmdline, or default" + }, + "log-prefix": { + "type": "string", + "description": "`log-prefix` field from config or cmdline, or default" + }, + "log-file": { + "type": "string", + "description": "`log-file` field from config or cmdline, or default" + }, + "log-timestamps": { + "type": "boolean", + "description": "`log-timestamps` field from config or cmdline, or default" + }, + "force-feerates": { + "type": "string", + "description": "force-feerate configuration setting, if any" + }, + "subdaemon": { + "type": "string", + "description": "`subdaemon` fields from config or cmdline if any (can be more than one)" + }, + "fetchinvoice-noconnect": { + "type": "boolean", + "description": "`featchinvoice-noconnect` fileds from config or cmdline, or default" + }, + "tor-service-password": { + "type": "string", + "description": "`tor-service-password` field from config or cmdline, if any" } + } } diff --git a/doc/schemas/listdatastore.schema.json b/doc/schemas/listdatastore.schema.json index 0ce336f04..a07f793de 100644 --- a/doc/schemas/listdatastore.schema.json +++ b/doc/schemas/listdatastore.schema.json @@ -1,37 +1,41 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "datastore" ], - "properties": { - "datastore": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ "key" ], - "properties": { - "key": { - "type": "array", - "items": { - "type": "string", - "description": "Part of the key added to the datastore" - } - }, - "generation": { - "type": "u64", - "description": "The number of times this has been updated" - }, - "hex": { - "type": "hex", - "description": "The hex data from the datastore" - }, - "string": { - "type": "string", - "description": "The data as a string, if it's valid utf-8" - } - } - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "datastore" + ], + "properties": { + "datastore": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key" + ], + "properties": { + "key": { + "type": "array", + "items": { + "type": "string", + "description": "Part of the key added to the datastore" + } + }, + "generation": { + "type": "u64", + "description": "The number of times this has been updated" + }, + "hex": { + "type": "hex", + "description": "The hex data from the datastore" + }, + "string": { + "type": "string", + "description": "The data as a string, if it's valid utf-8" + } + } + } } + } } diff --git a/doc/schemas/listforwards.schema.json b/doc/schemas/listforwards.schema.json index f52b10ee0..1f311a5d6 100644 --- a/doc/schemas/listforwards.schema.json +++ b/doc/schemas/listforwards.schema.json @@ -1,205 +1,230 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "forwards" ], - "properties": { - "forwards": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true, - "required": [ "in_channel", "in_msat", "status", "received_time" ], - "properties": { - "in_channel": { - "type": "short_channel_id", - "description": "the channel that received the HTLC" - }, - "in_msatoshi": { - "deprecated": true - }, - "in_msat": { - "type": "msat", - "description": "the value of the incoming HTLC" - }, - "status": { - "type": "string", - "enum": [ "offered", "settled", "local_failed", "failed" ], - "description": "still ongoing, completed, failed locally, or failed after forwarding" - }, - "received_time": { - "type": "number", - "description": "the UNIX timestamp when this was received" - }, - "out_channel": { - "type": "short_channel_id", - "description": "the channel that the HTLC was forwarded to" - }, - "payment_hash": { - "type": "hex", - "description": "payment hash sought by HTLC", - "maxLength": 64, - "minLength": 64 - } - }, - "allOf": [ - { - "if": { - "required": [ "out_channel" ] - }, - "then": { - "additionalProperties": false, - "required": [ "fee_msat", "out_msat" ], - "properties": { - "in_channel": { }, - "in_msatoshi": { }, - "in_msat": { }, - "status": { }, - "received_time": { }, - "resolved_time": { }, - "out_channel": { }, - "payment_hash": { }, - "failcode": { }, - "failreason": { }, - "fee": { - "deprecated": true - }, - "fee_msat": { - "type": "msat", - "description": "the amount this paid in fees" - }, - "out_msatoshi": { - "deprecated": true - }, - "out_msat": { - "type": "msat", - "description": "the amount we sent out the *out_channel*" - } - } - }, - "else": { - "additionalProperties": false, - "required": [ ], - "properties": { - "in_channel": { }, - "in_msatoshi": { }, - "in_msat": { }, - "status": { }, - "received_time": { }, - "resolved_time": { }, - "payment_hash": { }, - "failcode": { }, - "failreason": { } - } - } - }, - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "settled", "failed" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "resolved_time" ], - "properties": { - "in_channel": { }, - "in_msatoshi": { }, - "in_msat": { }, - "status": { }, - "received_time": { }, - "out_channel": { }, - "payment_hash": { }, - "fee": { }, - "fee_msat": { }, - "out_msatoshi": { }, - "out_msat": { }, - "failcode": { }, - "failreason": { }, - "resolved_time": { - "type": "number", - "description": "the UNIX timestamp when this was resolved" - } - } - }, - "else": { - "additionalProperties": false, - "properties": { - "in_channel": { }, - "in_msatoshi": { }, - "in_msat": { }, - "status": { }, - "received_time": { }, - "out_channel": { }, - "payment_hash": { }, - "fee": { }, - "fee_msat": { }, - "failcode": { }, - "failreason": { }, - "out_msatoshi": { }, - "out_msat": { } - } - } - }, - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "local_failed", "failed" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ ], - "properties": { - "in_channel": { }, - "in_msatoshi": { }, - "in_msat": { }, - "status": { }, - "received_time": { }, - "out_channel": { }, - "payment_hash": { }, - "fee": { }, - "fee_msat": { }, - "out_msatoshi": { }, - "out_msat": { }, - "resolved_time": { }, - "failcode": { - "type": "u32", - "description": "the numeric onion code returned" - }, - "failreason": { - "type": "string", - "description": "the name of the onion code returned" - } - } - }, - "else": { - "additionalProperties": false, - "required": [ ], - "properties": { - "in_channel": { }, - "in_msatoshi": { }, - "in_msat": { }, - "status": { }, - "received_time": { }, - "out_channel": { }, - "payment_hash": { }, - "fee": { }, - "fee_msat": { }, - "out_msatoshi": { }, - "out_msat": { }, - "resolved_time": { } - } - } - } - ] - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "forwards" + ], + "properties": { + "forwards": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "in_channel", + "in_msat", + "status", + "received_time" + ], + "properties": { + "in_channel": { + "type": "short_channel_id", + "description": "the channel that received the HTLC" + }, + "in_msatoshi": { + "deprecated": true + }, + "in_msat": { + "type": "msat", + "description": "the value of the incoming HTLC" + }, + "status": { + "type": "string", + "enum": [ + "offered", + "settled", + "local_failed", + "failed" + ], + "description": "still ongoing, completed, failed locally, or failed after forwarding" + }, + "received_time": { + "type": "number", + "description": "the UNIX timestamp when this was received" + }, + "out_channel": { + "type": "short_channel_id", + "description": "the channel that the HTLC was forwarded to" + }, + "payment_hash": { + "type": "hex", + "description": "payment hash sought by HTLC", + "maxLength": 64, + "minLength": 64 + } + }, + "allOf": [ + { + "if": { + "required": [ + "out_channel" + ] + }, + "then": { + "additionalProperties": false, + "required": [ + "fee_msat", + "out_msat" + ], + "properties": { + "in_channel": {}, + "in_msatoshi": {}, + "in_msat": {}, + "status": {}, + "received_time": {}, + "resolved_time": {}, + "out_channel": {}, + "payment_hash": {}, + "failcode": {}, + "failreason": {}, + "fee": { + "deprecated": true + }, + "fee_msat": { + "type": "msat", + "description": "the amount this paid in fees" + }, + "out_msatoshi": { + "deprecated": true + }, + "out_msat": { + "type": "msat", + "description": "the amount we sent out the *out_channel*" + } + } + }, + "else": { + "additionalProperties": false, + "required": [], + "properties": { + "in_channel": {}, + "in_msatoshi": {}, + "in_msat": {}, + "status": {}, + "received_time": {}, + "resolved_time": {}, + "payment_hash": {}, + "failcode": {}, + "failreason": {} + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "settled", + "failed" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "resolved_time" + ], + "properties": { + "in_channel": {}, + "in_msatoshi": {}, + "in_msat": {}, + "status": {}, + "received_time": {}, + "out_channel": {}, + "payment_hash": {}, + "fee": {}, + "fee_msat": {}, + "out_msatoshi": {}, + "out_msat": {}, + "failcode": {}, + "failreason": {}, + "resolved_time": { + "type": "number", + "description": "the UNIX timestamp when this was resolved" + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "in_channel": {}, + "in_msatoshi": {}, + "in_msat": {}, + "status": {}, + "received_time": {}, + "out_channel": {}, + "payment_hash": {}, + "fee": {}, + "fee_msat": {}, + "failcode": {}, + "failreason": {}, + "out_msatoshi": {}, + "out_msat": {} + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "local_failed", + "failed" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [], + "properties": { + "in_channel": {}, + "in_msatoshi": {}, + "in_msat": {}, + "status": {}, + "received_time": {}, + "out_channel": {}, + "payment_hash": {}, + "fee": {}, + "fee_msat": {}, + "out_msatoshi": {}, + "out_msat": {}, + "resolved_time": {}, + "failcode": { + "type": "u32", + "description": "the numeric onion code returned" + }, + "failreason": { + "type": "string", + "description": "the name of the onion code returned" + } + } + }, + "else": { + "additionalProperties": false, + "required": [], + "properties": { + "in_channel": {}, + "in_msatoshi": {}, + "in_msat": {}, + "status": {}, + "received_time": {}, + "out_channel": {}, + "payment_hash": {}, + "fee": {}, + "fee_msat": {}, + "out_msatoshi": {}, + "out_msat": {}, + "resolved_time": {} + } + } + } + ] + } } + } } diff --git a/doc/schemas/listfunds.schema.json b/doc/schemas/listfunds.schema.json index 84172c855..a5d5b8751 100644 --- a/doc/schemas/listfunds.schema.json +++ b/doc/schemas/listfunds.schema.json @@ -1,217 +1,270 @@ { - "$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" - }, - "value": { - "type": "u64", - "deprecated": true - }, - "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" ] - } - }, - "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)" - } - } - } - } - ] - } - } + "$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" + }, + "value": { + "type": "u64", + "deprecated": true + }, + "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" + ] + } + }, + "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)" + } + } + } + } + ] + } } + } } diff --git a/doc/schemas/listinvoices.schema.json b/doc/schemas/listinvoices.schema.json index 0de5af67f..bbd505684 100644 --- a/doc/schemas/listinvoices.schema.json +++ b/doc/schemas/listinvoices.schema.json @@ -1,132 +1,151 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "invoices" ], - "properties": { - "invoices": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true, - "required": [ "label", "description", "payment_hash", "status", "expires_at" ], - "properties": { - "label": { - "type": "string", - "description": "unique label supplied at invoice creation" - }, - "description": { - "type": "string", - "description": "description used in the invoice" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "status": { - "type": "string", - "enum": [ "unpaid", "paid", "expired" ], - "description": "Whether it's paid, unpaid or unpayable" - }, - "expires_at": { - "type": "u64", - "description": "UNIX timestamp of when it will become / became unpayable" - }, - "msatoshi": { - "deprecated": "true" - }, - "amount_msat": { - "type": "msat", - "description": "the amount required to pay this invoice" - }, - "bolt11": { - "type": "string", - "description": "the BOLT11 string (always present unless *bolt12* is)" - }, - "bolt12": { - "type": "string", - "description": "the BOLT12 string (always present unless *bolt11* is)" - }, - "local_offer_id": { - "type": "hex", - "description": "the *id* of our offer which created this invoice (**experimental-offers** only).", - "maxLength": 64, - "minLength": 64 - }, - "payer_note": { - "type": "string", - "description": "the optional *payer_note* from invoice_request which created this invoice (**experimental-offers** only)." - } - }, - "allOf": [ - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "paid" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "pay_index", "amount_received_msat", "paid_at", "payment_preimage" ], - "properties": { - "label": { }, - "description": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "bolt11": { }, - "bolt12": { }, - "local_offer_id": { }, - "payer_note": { }, - "expires_at": { }, - "pay_index": { - "type": "u64", - "description": "Unique incrementing index for this payment" - }, - "msatoshi_received": { - "deprecated": true - }, - "amount_received_msat": { - "type": "msat", - "description": "the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)" - }, - "paid_at": { - "type": "u64", - "description": "UNIX timestamp of when it was paid" - }, - "payment_preimage": { - "type": "hex", - "description": "proof of payment", - "maxLength": 64, - "minLength": 64 - } - } - }, - "else": { - "additionalProperties": false, - "properties": { - "label": { }, - "description": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "bolt11": { }, - "bolt12": { }, - "local_offer_id": { }, - "payer_note": { }, - "expires_at": { } - } - } - } - ] - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "invoices" + ], + "properties": { + "invoices": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "label", + "description", + "payment_hash", + "status", + "expires_at" + ], + "properties": { + "label": { + "type": "string", + "description": "unique label supplied at invoice creation" + }, + "description": { + "type": "string", + "description": "description used in the invoice" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "status": { + "type": "string", + "enum": [ + "unpaid", + "paid", + "expired" + ], + "description": "Whether it's paid, unpaid or unpayable" + }, + "expires_at": { + "type": "u64", + "description": "UNIX timestamp of when it will become / became unpayable" + }, + "msatoshi": { + "deprecated": "true" + }, + "amount_msat": { + "type": "msat", + "description": "the amount required to pay this invoice" + }, + "bolt11": { + "type": "string", + "description": "the BOLT11 string (always present unless *bolt12* is)" + }, + "bolt12": { + "type": "string", + "description": "the BOLT12 string (always present unless *bolt11* is)" + }, + "local_offer_id": { + "type": "hex", + "description": "the *id* of our offer which created this invoice (**experimental-offers** only).", + "maxLength": 64, + "minLength": 64 + }, + "payer_note": { + "type": "string", + "description": "the optional *payer_note* from invoice_request which created this invoice (**experimental-offers** only)." + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "paid" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "pay_index", + "amount_received_msat", + "paid_at", + "payment_preimage" + ], + "properties": { + "label": {}, + "description": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "bolt11": {}, + "bolt12": {}, + "local_offer_id": {}, + "payer_note": {}, + "expires_at": {}, + "pay_index": { + "type": "u64", + "description": "Unique incrementing index for this payment" + }, + "msatoshi_received": { + "deprecated": true + }, + "amount_received_msat": { + "type": "msat", + "description": "the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)" + }, + "paid_at": { + "type": "u64", + "description": "UNIX timestamp of when it was paid" + }, + "payment_preimage": { + "type": "hex", + "description": "proof of payment", + "maxLength": 64, + "minLength": 64 + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "label": {}, + "description": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "bolt11": {}, + "bolt12": {}, + "local_offer_id": {}, + "payer_note": {}, + "expires_at": {} + } + } + } + ] + } } + } } diff --git a/doc/schemas/listnodes.schema.json b/doc/schemas/listnodes.schema.json index 4437bfbc8..d88250f66 100644 --- a/doc/schemas/listnodes.schema.json +++ b/doc/schemas/listnodes.schema.json @@ -1,158 +1,198 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "nodes" ], - "properties": { - "nodes": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true, - "required": [ "nodeid" ], - "properties": { - "nodeid": { - "type": "pubkey", - "description": "the public key of the node" - }, - "last_timestamp": { - "type": "u32", - "description": "A node_announcement has been received for this node (UNIX timestamp)" - } - }, - "allOf": [ - { - "if": { - "required": [ "last_timestamp" ] - }, - "then": { - "additionalProperties": false, - "required": [ "nodeid", "last_timestamp", "alias", "color", "features", "addresses" ], - "properties": { - "nodeid": { }, - "last_timestamp": { }, - "option_will_fund": { }, - "alias": { - "type": "string", - "description": "The fun alias this node advertized", - "maxLength": 32 - }, - "color": { - "type": "hex", - "description": "The favorite RGB color this node advertized", - "minLength": 6, - "maxLength": 6 - }, - "features": { - "type": "hex", - "description": "BOLT #9 features bitmap this node advertized" - }, - "addresses": { - "type": "array", - "description": "The addresses this node advertized", - "items": { - "type": "object", - "required": [ "type", "port" ], - "additionalProperties": true, - "properties": { - "type": { - "type": "string", - "enum": [ "ipv4", "ipv6", "torv2", "torv3", "websocket" ], - "description": "Type of connection" - }, - "port": { - "type": "u16", - "description": "port number" - } - }, - "if": { - "properties": { - "type": { - "type": "string", - "enum": [ "ipv4", "ipv6", "torv2", "torv3" ] - } - } - }, - "then": { - "required": [ "type", "address", "port" ], - "additionalProperties": false, - "properties": { - "type": { }, - "port": { }, - "address": { - "type": "string", - "description": "address in expected format for **type**" - } - } - }, - "else": { - "required": [ "type", "port" ], - "additionalProperties": false, - "properties": { - "type": { }, - "port": { } - } - } - } - } - } - }, - "else": { - "additionalProperties": false, - "properties": { - "nodeid": { } - } - } - }, - { - "if": { - "required": [ "option_will_fund" ] - }, - "then": { - "additionalProperties": true, - "required": [ "option_will_fund" ], - "properties": { - "option_will_fund": { - "type": "object", - "additionalProperties": false, - "required": [ "lease_fee_base_msat", - "lease_fee_basis", - "funding_weight", - "channel_fee_max_base_msat", - "channel_fee_max_proportional_thousandths", - "compact_lease" ], - "properties": { - "lease_fee_base_msat": { - "type": "msat", - "description": "the fixed fee for a lease (whole number of satoshis)" - }, - "lease_fee_basis": { - "type": "u32", - "description": "the proportional fee in basis points (parts per 10,000) for a lease" - }, - "funding_weight": { - "type": "u32", - "description": "the onchain weight you'll have to pay for a lease" - }, - "channel_fee_max_base_msat": { - "type": "msat", - "description": "the maximum base routing fee this node will charge during the lease" - }, - "channel_fee_max_proportional_thousandths": { - "type": "u32", - "description": "the maximum proportional routing fee this node will charge during the lease (in thousandths, not millionths like channel_update)" - }, - "compact_lease": { - "type": "hex", - "description": "the lease as represented in the node_announcement" - } - } - } - } - } - } - ] - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "nodes" + ], + "properties": { + "nodes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "nodeid" + ], + "properties": { + "nodeid": { + "type": "pubkey", + "description": "the public key of the node" + }, + "last_timestamp": { + "type": "u32", + "description": "A node_announcement has been received for this node (UNIX timestamp)" + } + }, + "allOf": [ + { + "if": { + "required": [ + "last_timestamp" + ] + }, + "then": { + "additionalProperties": false, + "required": [ + "nodeid", + "last_timestamp", + "alias", + "color", + "features", + "addresses" + ], + "properties": { + "nodeid": {}, + "last_timestamp": {}, + "option_will_fund": {}, + "alias": { + "type": "string", + "description": "The fun alias this node advertized", + "maxLength": 32 + }, + "color": { + "type": "hex", + "description": "The favorite RGB color this node advertized", + "minLength": 6, + "maxLength": 6 + }, + "features": { + "type": "hex", + "description": "BOLT #9 features bitmap this node advertized" + }, + "addresses": { + "type": "array", + "description": "The addresses this node advertized", + "items": { + "type": "object", + "required": [ + "type", + "port" + ], + "additionalProperties": true, + "properties": { + "type": { + "type": "string", + "enum": [ + "ipv4", + "ipv6", + "torv2", + "torv3", + "websocket" + ], + "description": "Type of connection" + }, + "port": { + "type": "u16", + "description": "port number" + } + }, + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "ipv4", + "ipv6", + "torv2", + "torv3" + ] + } + } + }, + "then": { + "required": [ + "type", + "address", + "port" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "port": {}, + "address": { + "type": "string", + "description": "address in expected format for **type**" + } + } + }, + "else": { + "required": [ + "type", + "port" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "port": {} + } + } + } + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "nodeid": {} + } + } + }, + { + "if": { + "required": [ + "option_will_fund" + ] + }, + "then": { + "additionalProperties": true, + "required": [ + "option_will_fund" + ], + "properties": { + "option_will_fund": { + "type": "object", + "additionalProperties": false, + "required": [ + "lease_fee_base_msat", + "lease_fee_basis", + "funding_weight", + "channel_fee_max_base_msat", + "channel_fee_max_proportional_thousandths", + "compact_lease" + ], + "properties": { + "lease_fee_base_msat": { + "type": "msat", + "description": "the fixed fee for a lease (whole number of satoshis)" + }, + "lease_fee_basis": { + "type": "u32", + "description": "the proportional fee in basis points (parts per 10,000) for a lease" + }, + "funding_weight": { + "type": "u32", + "description": "the onchain weight you'll have to pay for a lease" + }, + "channel_fee_max_base_msat": { + "type": "msat", + "description": "the maximum base routing fee this node will charge during the lease" + }, + "channel_fee_max_proportional_thousandths": { + "type": "u32", + "description": "the maximum proportional routing fee this node will charge during the lease (in thousandths, not millionths like channel_update)" + }, + "compact_lease": { + "type": "hex", + "description": "the lease as represented in the node_announcement" + } + } + } + } + } + } + ] + } } + } } diff --git a/doc/schemas/listoffers.schema.json b/doc/schemas/listoffers.schema.json index b7f21d112..9f5be747d 100644 --- a/doc/schemas/listoffers.schema.json +++ b/doc/schemas/listoffers.schema.json @@ -1,48 +1,57 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "offers" ], - "properties": { - "offers": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ "offer_id", "active", "single_use", "bolt12", "bolt12_unsigned", "used" ], - "properties": { - "offer_id": { - "type": "hex", - "description": "the id of this offer (merkle hash of non-signature fields)", - "maxLength": 64, - "minLength": 64 - }, - "active": { - "type": "boolean", - "description": "whether this can still be used" - }, - "single_use": { - "type": "boolean", - "description": "whether this expires as soon as it's paid" - }, - "bolt12": { - "type": "string", - "description": "the bolt12 encoding of the offer" - }, - "bolt12_unsigned": { - "type": "string", - "description": "the bolt12 encoding of the offer, without signature" - }, - "used": { - "type": "boolean", - "description": "True if an associated invoice has been paid" - }, - "label": { - "type": "string", - "description": "the (optional) user-specified label" - } - } - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "offers" + ], + "properties": { + "offers": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "offer_id", + "active", + "single_use", + "bolt12", + "bolt12_unsigned", + "used" + ], + "properties": { + "offer_id": { + "type": "hex", + "description": "the id of this offer (merkle hash of non-signature fields)", + "maxLength": 64, + "minLength": 64 + }, + "active": { + "type": "boolean", + "description": "whether this can still be used" + }, + "single_use": { + "type": "boolean", + "description": "whether this expires as soon as it's paid" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 encoding of the offer" + }, + "bolt12_unsigned": { + "type": "string", + "description": "the bolt12 encoding of the offer, without signature" + }, + "used": { + "type": "boolean", + "description": "True if an associated invoice has been paid" + }, + "label": { + "type": "string", + "description": "the (optional) user-specified label" + } + } + } } + } } diff --git a/doc/schemas/listpays.schema.json b/doc/schemas/listpays.schema.json index 78c4ee4a1..f10062ea2 100644 --- a/doc/schemas/listpays.schema.json +++ b/doc/schemas/listpays.schema.json @@ -1,147 +1,168 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "pays" ], - "properties": { - "pays": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true, - "required": [ "payment_hash", "status", "created_at" ], - "properties": { - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "status": { - "type": "string", - "enum": [ "pending", "failed", "complete" ], - "description": "status of the payment" - }, - "destination": { - "type": "pubkey", - "description": "the final destination of the payment if known" - }, - "created_at": { - "type": "u64", - "description": "the UNIX timestamp showing when this payment was initiated" - }, - "label": { - "type": "string", - "description": "the label, if given to sendpay" - }, - "bolt11": { - "type": "string", - "description": "the bolt11 string (if pay supplied one)" - }, - "bolt12": { - "type": "string", - "description": "the bolt12 string (if supplied for pay: **experimental-offers** only)." - } - }, - "allOf": [ - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "pending", "complete" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "amount_sent_msat" ], - "properties": { - "payment_hash": { }, - "status": { }, - "destination": { }, - "created_at": { }, - "label": { }, - "bolt11": { }, - "bolt12": { }, - "preimage": { }, - "number_of_parts": { }, - "amount_msat": { - "type": "msat", - "description": "the amount the destination received, if known" - }, - "amount_sent_msat": { - "type": "msat", - "description": "the amount we actually sent, including fees" - } - } - } - }, - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "complete" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "preimage" ], - "properties": { - "payment_hash": { }, - "status": { }, - "destination": { }, - "created_at": { }, - "label": { }, - "bolt11": { }, - "bolt12": { }, - "amount_msat": { }, - "amount_sent_msat": { }, - "preimage": { - "type": "hex", - "description": "proof of payment", - "maxLength": 64, - "minLength": 64 - }, - "number_of_parts": { - "type": "u64", - "description": "the number of parts for a successful payment (only if more than one)." - } - } - } - }, - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "failed" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ ], - "properties": { - "payment_hash": { }, - "status": { }, - "destination": { }, - "created_at": { }, - "label": { }, - "bolt11": { }, - "bolt12": { }, - "amount_sent_msat": { }, - "erroronion": { - "type": "hex", - "description": "the error onion returned on failure, if any." - } - } - } - } - ] - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "pays" + ], + "properties": { + "pays": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "payment_hash", + "status", + "created_at" + ], + "properties": { + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "failed", + "complete" + ], + "description": "status of the payment" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment if known" + }, + "created_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "label": { + "type": "string", + "description": "the label, if given to sendpay" + }, + "bolt11": { + "type": "string", + "description": "the bolt11 string (if pay supplied one)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string (if supplied for pay: **experimental-offers** only)." + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "pending", + "complete" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "amount_sent_msat" + ], + "properties": { + "payment_hash": {}, + "status": {}, + "destination": {}, + "created_at": {}, + "label": {}, + "bolt11": {}, + "bolt12": {}, + "preimage": {}, + "number_of_parts": {}, + "amount_msat": { + "type": "msat", + "description": "the amount the destination received, if known" + }, + "amount_sent_msat": { + "type": "msat", + "description": "the amount we actually sent, including fees" + } + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "complete" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "preimage" + ], + "properties": { + "payment_hash": {}, + "status": {}, + "destination": {}, + "created_at": {}, + "label": {}, + "bolt11": {}, + "bolt12": {}, + "amount_msat": {}, + "amount_sent_msat": {}, + "preimage": { + "type": "hex", + "description": "proof of payment", + "maxLength": 64, + "minLength": 64 + }, + "number_of_parts": { + "type": "u64", + "description": "the number of parts for a successful payment (only if more than one)." + } + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "failed" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [], + "properties": { + "payment_hash": {}, + "status": {}, + "destination": {}, + "created_at": {}, + "label": {}, + "bolt11": {}, + "bolt12": {}, + "amount_sent_msat": {}, + "erroronion": { + "type": "hex", + "description": "the error onion returned on failure, if any." + } + } + } + } + ] + } } + } } diff --git a/doc/schemas/listpeers.schema.json b/doc/schemas/listpeers.schema.json index 42b753445..1a37fd2bc 100644 --- a/doc/schemas/listpeers.schema.json +++ b/doc/schemas/listpeers.schema.json @@ -1,951 +1,1125 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "peers" ], - "properties": { - "peers": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true, - "required": [ "id", "connected", "channels" ], - "properties": { - "id": { - "type": "pubkey", - "description": "the public key of the peer" - }, - "connected": { - "type": "boolean", - "description": "True if the peer is currently connected" - }, - "log": { - "type": "array", - "description": "if *level* is specified, logs for this peer", - "items": { - "type": "object", - "additionalProperties": true, - "required": [ "type" ], - "properties": { - "type": { - "type": "string", - "enum": [ "SKIPPED", "BROKEN", "UNUSUAL", "INFO", "DEBUG", "IO_IN", "IO_OUT" ] - } - }, - "allOf": [ - { - "if": { - "properties": { - "type": { - "enum": [ "SKIPPED" ] - } - } - }, - "then": { - "type": "object", - "additionalProperties": false, - "required": [ "num_skipped" ], - "properties": { - "type": { }, - "num_skipped": { - "type": "u32", - "description": "number of deleted/omitted entries" - } - } - } - }, - { - "if": { - "properties": { - "type": { - "enum": [ "BROKEN", "UNUSUAL", "INFO", "DEBUG" ] - } - } - }, - "then": { - "type": "object", - "additionalProperties": false, - "required": [ "time", "source", "log", "node_id" ], - "properties": { - "type": { }, - "time": { - "type": "string", - "description": "UNIX timestamp with 9 decimal places" - }, - "source": { - "type": "string", - "description": "The particular logbook this was found in" - }, - "log": { - "type": "string", - "description": "The actual log message" - }, - "node_id": { - "type": "pubkey", - "description": "The peer this is associated with" - } - } - } - }, - { - "if": { - "properties": { - "type": { - "enum": [ "IO_IN", "IO_OUT" ] - } - } - }, - "then": { - "type": "object", - "additionalProperties": false, - "required": [ "time", "source", "log", "node_id", "data" ], - "properties": { - "type": { }, - "time": { - "type": "string", - "description": "UNIX timestamp with 9 decimal places" - }, - "source": { - "type": "string", - "description": "The particular logbook this was found in" - }, - "log": { - "type": "string", - "description": "The actual log message" - }, - "node_id": { - "type": "pubkey", - "description": "The peer this is associated with" - }, - "data": { - "type": "hex", - "description": "The IO which occurred" - } - } - } - } - ] - } - }, - "channels": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true, - "required": [ "state", "opener", "features" ], - "properties": { - "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" - }, - "scratch_txid": { - "type": "txid", - "description": "The txid we would use if we went onchain now" - }, - "feerate": { - "type": "object", - "description": "Feerates for the current tx", - "additionalProperties": false, - "required": [ "perkw", "perkb" ], - "properties": { - "perkw": { - "type": "u32", - "description": "Feerate per 1000 weight (i.e kSipa)" - }, - "perkb": { - "type": "u32", - "description": "Feerate per 1000 virtual bytes" - } - } - }, - "owner": { - "type": "string", - "description": "The current subdaemon controlling this connection" - }, - "short_channel_id": { - "type": "short_channel_id", - "description": "The short_channel_id (once locked in)" - }, - "channel_id": { - "type": "hex", - "description": "The full channel_id", - "minLength": 64, - "maxLength": 64 - }, - "funding_txid": { - "type": "txid", - "description": "ID of the funding transaction" - }, - "initial_feerate": { - "type": "string", - "description": "For inflight opens, the first feerate used to initiate the channel open" - }, - "last_feerate": { - "type": "string", - "description": "For inflight opens, the most recent feerate used on the channel open" - }, - "next_feerate": { - "type": "string", - "description": "For inflight opens, the next feerate we'll use for the channel open" - }, - "next_fee_step": { - "type": "u32", - "description": "For inflight opens, the next feerate step we'll use for the channel open" - }, - "inflight": { - "type": "array", - "description": "Current candidate funding transactions (only for dual-funding)", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ "funding_txid", "funding_outnum", "feerate", "total_funding_msat", "our_funding_msat", "scratch_txid" ], - "properties": { - "funding_txid": { - "type": "txid", - "description": "ID of the funding transaction" - }, - "funding_outnum": { - "type": "u32", - "description": "The 0-based output number of the funding transaction which opens the channel" - }, - "feerate": { - "type": "string", - "description": "The feerate for this funding transaction in per-1000-weight, with \"kpw\" appended" - }, - "total_funding_msat": { - "type": "msat", - "description": "total amount in the channel" - }, - "our_funding_msat": { - "type": "msat", - "description": "amount we have in the channel" - }, - "scratch_txid": { - "type": "txid", - "description": "The commitment transaction txid we would use if we went onchain now" - } - } - } - }, - "close_to": { - "type": "hex", - "description": "scriptPubkey which we have to close to if we mutual close" - }, - "private": { - "type": "boolean", - "description": "if False, we will not announce this channel" - }, - "opener": { - "type": "string", - "enum": [ "local", "remote" ], - "description": "Who initiated the channel" - }, - "closer": { - "FIXME": "deprecated_apis turns off null!", - "type": [ "string", "null" ], - "enum": [ "local", "remote", null ], - "description": "Who initiated the channel close (`null` is deprecated!)" - }, - "features": { - "type": "array", - "items": { - "type": "string", - "enum": [ "option_static_remotekey", "option_anchor_outputs" ], - "description": "BOLT #9 features which apply to this channel" - } - }, - "funding": { - "type": "object", - "additionalProperties": false, - "required": [ "local_msat", "remote_msat" ], - "properties": { - "local_msat": { - "type": "msat", - "description": "Amount of channel we funded" - }, - "remote_msat": { - "type": "msat", - "description": "Amount of channel they funded" - } - } - }, - "funding_allocation_msat": { - "deprecated": true - }, - "funding_msat": { - "deprecated": true - }, - "to_us_msat": { - "type": "msat", - "description": "how much of channel is owed to us" - }, - "min_to_us_msat": { - "type": "msat", - "description": "least amount owed to us ever" - }, - "max_to_us_msat": { - "type": "msat", - "description": "most amount owed to us ever" - }, - "total_msat": { - "type": "msat", - "description": "total amount in the channel" - }, - "fee_base_msat": { - "type": "msat", - "description": "amount we charge to use the channel" - }, - "fee_proportional_millionths": { - "type": "u32", - "description": "amount we charge to use the channel in parts-per-million" - }, - "dust_limit_msat": { - "type": "msat", - "description": "minimum amount for an output on the channel transactions" - }, - "max_total_htlc_in_msat": { - "type": "msat", - "description": "max amount accept in a single payment" - }, - "their_reserve_msat": { - "type": "msat", - "description": "minimum we insist they keep in channel" - }, - "our_reserve_msat": { - "type": "msat", - "description": "minimum they insist we keep in channel" - }, - "spendable_msat": { - "type": "msat", - "description": "total we could send through channel" - }, - "receivable_msat": { - "type": "msat", - "description": "total peer could send through channel" - }, - "minimum_htlc_in_msat": { - "type": "msat", - "description": "the minimum amount HTLC we accept" - }, - "their_to_self_delay": { - "type": "u32", - "description": "the number of blocks before they can take their funds if they unilateral close" - }, - "our_to_self_delay": { - "type": "u32", - "description": "the number of blocks before we can take our funds if we unilateral close" - }, - "max_accepted_htlcs": { - "type": "u32", - "description": "Maximum number of incoming HTLC we will accept at once" - }, - "msatoshi_to_us": { - "deprecated": true - }, - "msatoshi_to_us_min": { - "deprecated": true - }, - "msatoshi_to_us_max": { - "deprecated": true - }, - "msatoshi_total": { - "deprecated": true - }, - "dust_limit_satoshis": { - "deprecated": true - }, - "max_htlc_value_in_flight_msat": { - "deprecated": true - }, - "our_channel_reserve_satoshis": { - "deprecated": true - }, - "their_channel_reserve_satoshis": { - "deprecated": true - }, - "spendable_msatoshi": { - "deprecated": true - }, - "receivable_msatoshi": { - "deprecated": true - }, - "htlc_minimum_msat": { - "deprecated": true - }, - "state_changes": { - "type": "array", - "description": "Prior state changes", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ "timestamp", "old_state", "new_state", "cause", "message" ], - "properties": { - "timestamp": { - "type": "string", - "description": "UTC timestamp of form YYYY-mm-ddTHH:MM:SS.%03dZ" - }, - "old_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": "Previous state" - }, - "new_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": "New state" - }, - "cause": { - "type": "string", - "enum": [ "unknown", "local", "user", "remote", "protocol", "onchain" ], - "description": "What caused the change" - }, - "message": { - "type": "string", - "description": "Human-readable explanation" - } - } - } - }, - "status": { - "type": "array", - "items": { - "type": "string", - "description": "Billboard log of significant changes" - } - }, - "in_payments_offered": { - "type": "u64", - "description": "Number of incoming payment attempts" - }, - "in_offered_msat": { - "type": "msat", - "description": "Total amount of incoming payment attempts" - }, - "in_msatoshi_offered": { - "deprecated": true - }, - "in_payments_fulfilled": { - "type": "u64", - "description": "Number of successful incoming payment attempts" - }, - "in_fulfilled_msat": { - "type": "msat", - "description": "Total amount of successful incoming payment attempts" - }, - "in_msatoshi_fulfilled": { - "deprecated": true - }, - "out_payments_offered": { - "type": "u64", - "description": "Number of outgoing payment attempts" - }, - "out_offered_msat": { - "type": "msat", - "description": "Total amount of outgoing payment attempts" - }, - "out_msatoshi_offered": { - "deprecated": true - }, - "out_payments_fulfilled": { - "type": "u64", - "description": "Number of successful outgoing payment attempts" - }, - "out_fulfilled_msat": { - "type": "msat", - "description": "Total amount of successful outgoing payment attempts" - }, - "out_msatoshi_fulfilled": { - "deprecated": true - }, - "htlcs": { - "type": "array", - "description": "current HTLCs in this channel", - "items": { - "type": "object", - "additionalProperties": true, - "required": [ "direction", "id", "amount_msat", "expiry", "payment_hash", "state" ], - "properties": { - "direction": { - "type": "string", - "enum": [ "in", "out" ], - "description": "Whether it came from peer, or is going to peer" - }, - "id": { - "type": "u64", - "description": "Unique ID for this htlc on this channel in this direction" - }, - "amount_msat": { - "type": "msat", - "description": "Amount send/received for this HTLC" - }, - "msatoshi": { - "deprecated": true - }, - "expiry": { - "type": "u32", - "description": "Block this HTLC expires at" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the payment_preimage which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "local_trimmed": { - "type": "boolean", - "enum": [ true ], - "description": "if this is too small to enforce onchain" - }, - "status": { - "type": "string", - "description": "set if this HTLC is currently waiting on a hook (and shows what plugin)" - } - }, - "allOf": [ - { - "if": { - "properties": { - "direction": { - "enum": [ "out" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "state" ], - "properties": { - "direction": { }, - "id": { }, - "amount_msat": { }, - "msatoshi": { }, - "expiry": { }, - "payment_hash": { }, - "local_trimmed": { }, - "status": { }, - "state": { - "type": "string", - "enum": [ "SENT_ADD_HTLC", "SENT_ADD_COMMIT", "RCVD_ADD_REVOCATION", "RCVD_ADD_ACK_COMMIT", "SENT_ADD_ACK_REVOCATION", "RCVD_REMOVE_HTLC", "RCVD_REMOVE_COMMIT", "SENT_REMOVE_REVOCATION", "SENT_REMOVE_ACK_COMMIT", "RCVD_REMOVE_ACK_REVOCATION" ], - "description": "Status of the HTLC" - } - } - } - }, - { - "if": { - "properties": { - "direction": { - "enum": [ "in" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "state" ], - "properties": { - "direction": { }, - "id": { }, - "amount_msat": { }, - "msatoshi": { }, - "expiry": { }, - "payment_hash": { }, - "local_trimmed": { }, - "status": { }, - "state": { - "type": "string", - "enum": [ "RCVD_ADD_HTLC", "RCVD_ADD_COMMIT", "SENT_ADD_REVOCATION", "SENT_ADD_ACK_COMMIT", "RCVD_ADD_ACK_REVOCATION", "SENT_REMOVE_HTLC", "SENT_REMOVE_COMMIT", "RCVD_REMOVE_REVOCATION", "RCVD_REMOVE_ACK_COMMIT", "SENT_REMOVE_ACK_REVOCATION" ], - "description": "Status of the HTLC" - } - } - } - } - ] - } - } - }, - "allOf": [ - { - "if": { - "required": [ "close_to" ] - }, - "then": { - "additionalProperties": false, - "required": [ ], - "properties": { - "state": { }, - "scratch_txid": { }, - "feerate": { }, - "owner": { }, - "short_channel_id": { }, - "channel_id": { }, - "funding_txid": { }, - "close_to": { }, - "private": { }, - "opener": { }, - "closer": { }, - "features": { }, - "funding": { }, - "funding_allocation_msat": { }, - "funding_msat": { }, - "to_us_msat": { }, - "min_to_us_msat": { }, - "max_to_us_msat": { }, - "total_msat": { }, - "fee_base_msat": { }, - "fee_proportional_millionths": { }, - "dust_limit_msat": { }, - "max_total_htlc_in_msat": { }, - "their_reserve_msat": { }, - "our_reserve_msat": { }, - "spendable_msat": { }, - "receivable_msat": { }, - "minimum_htlc_in_msat": { }, - "spendable_msatoshi": { }, - "receivable_msatoshi": { }, - "their_to_self_delay": { }, - "our_to_self_delay": { }, - "max_accepted_htlcs": { }, - "msatoshi_to_us": { }, - "msatoshi_to_us_min": { }, - "msatoshi_to_us_max": { }, - "msatoshi_total": { }, - "dust_limit_satoshis": { }, - "max_htlc_value_in_flight_msat": { }, - "our_channel_reserve_satoshis": { }, - "their_channel_reserve_satoshis": { }, - "spendable_satoshis": { }, - "receivable_satoshis": { }, - "htlc_minimum_msat": { }, - "state_changes": { }, - "status": { }, - "in_payments_offered": { }, - "in_offered_msat": { }, - "in_msatoshi_offered": { }, - "in_payments_fulfilled": { }, - "in_fulfilled_msat": { }, - "in_msatoshi_fulfilled": { }, - "out_payments_offered": { }, - "out_offered_msat": { }, - "out_msatoshi_offered": { }, - "out_payments_fulfilled": { }, - "out_fulfilled_msat": { }, - "out_msatoshi_fulfilled": { }, - "htlcs": { }, - "initial_feerate": { }, - "last_feerate": { }, - "next_feerate": { }, - "inflight": { }, - "last_tx_fee": { }, - "last_tx_fee_msat": { }, - "direction": { }, - "close_to_addr": { - "type": "string", - "description": "The bitcoin address we will close to" - } - } - } - }, - { - "if": { - "required": [ "scratch_txid" ] - }, - "then": { - "additionalProperties": false, - "required": [ "last_tx_fee_msat" ], - "properties": { - "state": { }, - "scratch_txid": { }, - "feerate": { }, - "owner": { }, - "short_channel_id": { }, - "channel_id": { }, - "funding_txid": { }, - "inflight": { }, - "close_to": { }, - "private": { }, - "opener": { }, - "closer": { }, - "features": { }, - "funding": { }, - "funding_allocation_msat": { }, - "funding_msat": { }, - "to_us_msat": { }, - "min_to_us_msat": { }, - "max_to_us_msat": { }, - "total_msat": { }, - "fee_base_msat": { }, - "fee_proportional_millionths": { }, - "dust_limit_msat": { }, - "max_total_htlc_in_msat": { }, - "their_reserve_msat": { }, - "our_reserve_msat": { }, - "spendable_msat": { }, - "receivable_msat": { }, - "minimum_htlc_in_msat": { }, - "spendable_msatoshi": { }, - "receivable_msatoshi": { }, - "their_to_self_delay": { }, - "our_to_self_delay": { }, - "max_accepted_htlcs": { }, - "msatoshi_to_us": { }, - "msatoshi_to_us_min": { }, - "msatoshi_to_us_max": { }, - "msatoshi_total": { }, - "dust_limit_satoshis": { }, - "max_htlc_value_in_flight_msat": { }, - "our_channel_reserve_satoshis": { }, - "their_channel_reserve_satoshis": { }, - "spendable_satoshis": { }, - "receivable_satoshis": { }, - "htlc_minimum_msat": { }, - "state_changes": { }, - "status": { }, - "in_payments_offered": { }, - "in_offered_msat": { }, - "in_msatoshi_offered": { }, - "in_payments_fulfilled": { }, - "in_fulfilled_msat": { }, - "in_msatoshi_fulfilled": { }, - "out_payments_offered": { }, - "out_offered_msat": { }, - "out_msatoshi_offered": { }, - "out_payments_fulfilled": { }, - "out_fulfilled_msat": { }, - "out_msatoshi_fulfilled": { }, - "htlcs": { }, - "initial_feerate": { }, - "last_feerate": { }, - "next_feerate": { }, - "close_to_addr": { }, - "initial_feerate": { }, - "last_feerate": { }, - "next_feerate": { }, - "direction": { }, - "last_tx_fee": { - "deprecated": true - }, - "last_tx_fee_msat": { - "type": "msat", - "description": "fee attached to this the current tx" - } - } - } - }, - { - "if": { - "required": [ "short_channel_id" ] - }, - "then": { - "additionalProperties": false, - "required": [ "direction" ], - "properties": { - "state": { }, - "scratch_txid": { }, - "feerate": { }, - "owner": { }, - "short_channel_id": { }, - "channel_id": { }, - "funding_txid": { }, - "inflight": { }, - "close_to": { }, - "private": { }, - "opener": { }, - "closer": { }, - "features": { }, - "funding": { }, - "funding_allocation_msat": { }, - "funding_msat": { }, - "to_us_msat": { }, - "min_to_us_msat": { }, - "max_to_us_msat": { }, - "total_msat": { }, - "fee_base_msat": { }, - "fee_proportional_millionths": { }, - "dust_limit_msat": { }, - "max_total_htlc_in_msat": { }, - "their_reserve_msat": { }, - "our_reserve_msat": { }, - "spendable_msat": { }, - "receivable_msat": { }, - "minimum_htlc_in_msat": { }, - "spendable_msatoshi": { }, - "receivable_msatoshi": { }, - "their_to_self_delay": { }, - "our_to_self_delay": { }, - "max_accepted_htlcs": { }, - "msatoshi_to_us": { }, - "msatoshi_to_us_min": { }, - "msatoshi_to_us_max": { }, - "msatoshi_total": { }, - "dust_limit_satoshis": { }, - "max_htlc_value_in_flight_msat": { }, - "our_channel_reserve_satoshis": { }, - "their_channel_reserve_satoshis": { }, - "spendable_satoshis": { }, - "receivable_satoshis": { }, - "htlc_minimum_msat": { }, - "state_changes": { }, - "status": { }, - "in_payments_offered": { }, - "in_offered_msat": { }, - "in_msatoshi_offered": { }, - "in_payments_fulfilled": { }, - "in_fulfilled_msat": { }, - "in_msatoshi_fulfilled": { }, - "out_payments_offered": { }, - "out_offered_msat": { }, - "out_msatoshi_offered": { }, - "out_payments_fulfilled": { }, - "out_fulfilled_msat": { }, - "out_msatoshi_fulfilled": { }, - "htlcs": { }, - "initial_feerate": { }, - "last_feerate": { }, - "next_feerate": { }, - "last_tx_fee": { }, - "close_to_addr": { }, - "initial_feerate": { }, - "last_feerate": { }, - "next_feerate": { }, - "last_tx_fee": { }, - "last_tx_fee_msat": { }, - "direction": { - "type": "u32", - "description": "0 if we're the lesser node_id, 1 if we're the greater" - } - } - } - }, - { - "if": { - "required": [ "inflight" ] - }, - "then": { - "additionalProperties": false, - "required": [ "initial_feerate", "last_feerate", "next_feerate" ], - "properties": { - "state": { }, - "scratch_txid": { }, - "feerate": { }, - "owner": { }, - "short_channel_id": { }, - "channel_id": { }, - "funding_txid": { }, - "close_to": { }, - "private": { }, - "opener": { }, - "closer": { }, - "features": { }, - "funding": { }, - "funding_allocation_msat": { }, - "funding_msat": { }, - "to_us_msat": { }, - "min_to_us_msat": { }, - "max_to_us_msat": { }, - "total_msat": { }, - "fee_base_msat": { }, - "fee_proportional_millionths": { }, - "dust_limit_msat": { }, - "max_total_htlc_in_msat": { }, - "their_reserve_msat": { }, - "our_reserve_msat": { }, - "spendable_msat": { }, - "receivable_msat": { }, - "minimum_htlc_in_msat": { }, - "spendable_msatoshi": { }, - "receivable_msatoshi": { }, - "their_to_self_delay": { }, - "our_to_self_delay": { }, - "max_accepted_htlcs": { }, - "msatoshi_to_us": { }, - "msatoshi_to_us_min": { }, - "msatoshi_to_us_max": { }, - "msatoshi_total": { }, - "dust_limit_satoshis": { }, - "max_htlc_value_in_flight_msat": { }, - "our_channel_reserve_satoshis": { }, - "their_channel_reserve_satoshis": { }, - "spendable_satoshis": { }, - "receivable_satoshis": { }, - "htlc_minimum_msat": { }, - "state_changes": { }, - "status": { }, - "in_payments_offered": { }, - "in_offered_msat": { }, - "in_msatoshi_offered": { }, - "in_payments_fulfilled": { }, - "in_fulfilled_msat": { }, - "in_msatoshi_fulfilled": { }, - "out_payments_offered": { }, - "out_offered_msat": { }, - "out_msatoshi_offered": { }, - "out_payments_fulfilled": { }, - "out_fulfilled_msat": { }, - "out_msatoshi_fulfilled": { }, - "htlcs": { }, - "inflight": { }, - "last_tx_fee": { }, - "close_to_addr": { }, - "direction": { }, - "last_tx_fee": { }, - "last_tx_fee_msat": { }, - "initial_feerate": { - "type": "string", - "description": "The feerate for the initial funding transaction in per-1000-weight, with \"kpw\" appended" - }, - "last_feerate": { - "type": "string", - "description": "The feerate for the latest funding transaction in per-1000-weight, with \"kpw\" appended" - }, - "next_feerate": { - "type": "string", - "description": "The minimum feerate for the next funding transaction in per-1000-weight, with \"kpw\" appended" - } - } - } - } - ] - } - } - }, - "allOf": [ - { - "if": { - "additionalProperties": true, - "properties": { - "connected": { - "enum": [ true ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "netaddr", "features" ], - "properties": { - "id": { }, - "channels": { }, - "connected": { }, - "htlcs": { }, - "log": { }, - "last_tx_fee": { }, - "netaddr": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "description": "A single entry array", - "items": { - "type": "string", - "description": "address, e.g. 1.2.3.4:1234" - } - }, - "features": { - "type": "hex", - "description": "bitmap of BOLT #9 features from peer's INIT message" } - } - } - } - ] - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "peers" + ], + "properties": { + "peers": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "id", + "connected", + "channels" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "the public key of the peer" + }, + "connected": { + "type": "boolean", + "description": "True if the peer is currently connected" + }, + "log": { + "type": "array", + "description": "if *level* is specified, logs for this peer", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "SKIPPED", + "BROKEN", + "UNUSUAL", + "INFO", + "DEBUG", + "IO_IN", + "IO_OUT" + ] + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "enum": [ + "SKIPPED" + ] + } + } + }, + "then": { + "type": "object", + "additionalProperties": false, + "required": [ + "num_skipped" + ], + "properties": { + "type": {}, + "num_skipped": { + "type": "u32", + "description": "number of deleted/omitted entries" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "enum": [ + "BROKEN", + "UNUSUAL", + "INFO", + "DEBUG" + ] + } + } + }, + "then": { + "type": "object", + "additionalProperties": false, + "required": [ + "time", + "source", + "log", + "node_id" + ], + "properties": { + "type": {}, + "time": { + "type": "string", + "description": "UNIX timestamp with 9 decimal places" + }, + "source": { + "type": "string", + "description": "The particular logbook this was found in" + }, + "log": { + "type": "string", + "description": "The actual log message" + }, + "node_id": { + "type": "pubkey", + "description": "The peer this is associated with" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "enum": [ + "IO_IN", + "IO_OUT" + ] + } + } + }, + "then": { + "type": "object", + "additionalProperties": false, + "required": [ + "time", + "source", + "log", + "node_id", + "data" + ], + "properties": { + "type": {}, + "time": { + "type": "string", + "description": "UNIX timestamp with 9 decimal places" + }, + "source": { + "type": "string", + "description": "The particular logbook this was found in" + }, + "log": { + "type": "string", + "description": "The actual log message" + }, + "node_id": { + "type": "pubkey", + "description": "The peer this is associated with" + }, + "data": { + "type": "hex", + "description": "The IO which occurred" + } + } + } + } + ] + } + }, + "channels": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "state", + "opener", + "features" + ], + "properties": { + "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" + }, + "scratch_txid": { + "type": "txid", + "description": "The txid we would use if we went onchain now" + }, + "feerate": { + "type": "object", + "description": "Feerates for the current tx", + "additionalProperties": false, + "required": [ + "perkw", + "perkb" + ], + "properties": { + "perkw": { + "type": "u32", + "description": "Feerate per 1000 weight (i.e kSipa)" + }, + "perkb": { + "type": "u32", + "description": "Feerate per 1000 virtual bytes" + } + } + }, + "owner": { + "type": "string", + "description": "The current subdaemon controlling this connection" + }, + "short_channel_id": { + "type": "short_channel_id", + "description": "The short_channel_id (once locked in)" + }, + "channel_id": { + "type": "hex", + "description": "The full channel_id", + "minLength": 64, + "maxLength": 64 + }, + "funding_txid": { + "type": "txid", + "description": "ID of the funding transaction" + }, + "initial_feerate": { + "type": "string", + "description": "For inflight opens, the first feerate used to initiate the channel open" + }, + "last_feerate": { + "type": "string", + "description": "For inflight opens, the most recent feerate used on the channel open" + }, + "next_feerate": { + "type": "string", + "description": "For inflight opens, the next feerate we'll use for the channel open" + }, + "next_fee_step": { + "type": "u32", + "description": "For inflight opens, the next feerate step we'll use for the channel open" + }, + "inflight": { + "type": "array", + "description": "Current candidate funding transactions (only for dual-funding)", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "funding_txid", + "funding_outnum", + "feerate", + "total_funding_msat", + "our_funding_msat", + "scratch_txid" + ], + "properties": { + "funding_txid": { + "type": "txid", + "description": "ID of the funding transaction" + }, + "funding_outnum": { + "type": "u32", + "description": "The 0-based output number of the funding transaction which opens the channel" + }, + "feerate": { + "type": "string", + "description": "The feerate for this funding transaction in per-1000-weight, with \"kpw\" appended" + }, + "total_funding_msat": { + "type": "msat", + "description": "total amount in the channel" + }, + "our_funding_msat": { + "type": "msat", + "description": "amount we have in the channel" + }, + "scratch_txid": { + "type": "txid", + "description": "The commitment transaction txid we would use if we went onchain now" + } + } + } + }, + "close_to": { + "type": "hex", + "description": "scriptPubkey which we have to close to if we mutual close" + }, + "private": { + "type": "boolean", + "description": "if False, we will not announce this channel" + }, + "opener": { + "type": "string", + "enum": [ + "local", + "remote" + ], + "description": "Who initiated the channel" + }, + "closer": { + "FIXME": "deprecated_apis turns off null!", + "type": [ + "string", + "null" + ], + "enum": [ + "local", + "remote", + null + ], + "description": "Who initiated the channel close (`null` is deprecated!)" + }, + "features": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "option_static_remotekey", + "option_anchor_outputs" + ], + "description": "BOLT #9 features which apply to this channel" + } + }, + "funding": { + "type": "object", + "additionalProperties": false, + "required": [ + "local_msat", + "remote_msat" + ], + "properties": { + "local_msat": { + "type": "msat", + "description": "Amount of channel we funded" + }, + "remote_msat": { + "type": "msat", + "description": "Amount of channel they funded" + } + } + }, + "funding_allocation_msat": { + "deprecated": true + }, + "funding_msat": { + "deprecated": true + }, + "to_us_msat": { + "type": "msat", + "description": "how much of channel is owed to us" + }, + "min_to_us_msat": { + "type": "msat", + "description": "least amount owed to us ever" + }, + "max_to_us_msat": { + "type": "msat", + "description": "most amount owed to us ever" + }, + "total_msat": { + "type": "msat", + "description": "total amount in the channel" + }, + "fee_base_msat": { + "type": "msat", + "description": "amount we charge to use the channel" + }, + "fee_proportional_millionths": { + "type": "u32", + "description": "amount we charge to use the channel in parts-per-million" + }, + "dust_limit_msat": { + "type": "msat", + "description": "minimum amount for an output on the channel transactions" + }, + "max_total_htlc_in_msat": { + "type": "msat", + "description": "max amount accept in a single payment" + }, + "their_reserve_msat": { + "type": "msat", + "description": "minimum we insist they keep in channel" + }, + "our_reserve_msat": { + "type": "msat", + "description": "minimum they insist we keep in channel" + }, + "spendable_msat": { + "type": "msat", + "description": "total we could send through channel" + }, + "receivable_msat": { + "type": "msat", + "description": "total peer could send through channel" + }, + "minimum_htlc_in_msat": { + "type": "msat", + "description": "the minimum amount HTLC we accept" + }, + "their_to_self_delay": { + "type": "u32", + "description": "the number of blocks before they can take their funds if they unilateral close" + }, + "our_to_self_delay": { + "type": "u32", + "description": "the number of blocks before we can take our funds if we unilateral close" + }, + "max_accepted_htlcs": { + "type": "u32", + "description": "Maximum number of incoming HTLC we will accept at once" + }, + "msatoshi_to_us": { + "deprecated": true + }, + "msatoshi_to_us_min": { + "deprecated": true + }, + "msatoshi_to_us_max": { + "deprecated": true + }, + "msatoshi_total": { + "deprecated": true + }, + "dust_limit_satoshis": { + "deprecated": true + }, + "max_htlc_value_in_flight_msat": { + "deprecated": true + }, + "our_channel_reserve_satoshis": { + "deprecated": true + }, + "their_channel_reserve_satoshis": { + "deprecated": true + }, + "spendable_msatoshi": { + "deprecated": true + }, + "receivable_msatoshi": { + "deprecated": true + }, + "htlc_minimum_msat": { + "deprecated": true + }, + "state_changes": { + "type": "array", + "description": "Prior state changes", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "timestamp", + "old_state", + "new_state", + "cause", + "message" + ], + "properties": { + "timestamp": { + "type": "string", + "description": "UTC timestamp of form YYYY-mm-ddTHH:MM:SS.%03dZ" + }, + "old_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": "Previous state" + }, + "new_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": "New state" + }, + "cause": { + "type": "string", + "enum": [ + "unknown", + "local", + "user", + "remote", + "protocol", + "onchain" + ], + "description": "What caused the change" + }, + "message": { + "type": "string", + "description": "Human-readable explanation" + } + } + } + }, + "status": { + "type": "array", + "items": { + "type": "string", + "description": "Billboard log of significant changes" + } + }, + "in_payments_offered": { + "type": "u64", + "description": "Number of incoming payment attempts" + }, + "in_offered_msat": { + "type": "msat", + "description": "Total amount of incoming payment attempts" + }, + "in_msatoshi_offered": { + "deprecated": true + }, + "in_payments_fulfilled": { + "type": "u64", + "description": "Number of successful incoming payment attempts" + }, + "in_fulfilled_msat": { + "type": "msat", + "description": "Total amount of successful incoming payment attempts" + }, + "in_msatoshi_fulfilled": { + "deprecated": true + }, + "out_payments_offered": { + "type": "u64", + "description": "Number of outgoing payment attempts" + }, + "out_offered_msat": { + "type": "msat", + "description": "Total amount of outgoing payment attempts" + }, + "out_msatoshi_offered": { + "deprecated": true + }, + "out_payments_fulfilled": { + "type": "u64", + "description": "Number of successful outgoing payment attempts" + }, + "out_fulfilled_msat": { + "type": "msat", + "description": "Total amount of successful outgoing payment attempts" + }, + "out_msatoshi_fulfilled": { + "deprecated": true + }, + "htlcs": { + "type": "array", + "description": "current HTLCs in this channel", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "direction", + "id", + "amount_msat", + "expiry", + "payment_hash", + "state" + ], + "properties": { + "direction": { + "type": "string", + "enum": [ + "in", + "out" + ], + "description": "Whether it came from peer, or is going to peer" + }, + "id": { + "type": "u64", + "description": "Unique ID for this htlc on this channel in this direction" + }, + "amount_msat": { + "type": "msat", + "description": "Amount send/received for this HTLC" + }, + "msatoshi": { + "deprecated": true + }, + "expiry": { + "type": "u32", + "description": "Block this HTLC expires at" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the payment_preimage which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "local_trimmed": { + "type": "boolean", + "enum": [ + true + ], + "description": "if this is too small to enforce onchain" + }, + "status": { + "type": "string", + "description": "set if this HTLC is currently waiting on a hook (and shows what plugin)" + } + }, + "allOf": [ + { + "if": { + "properties": { + "direction": { + "enum": [ + "out" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "state" + ], + "properties": { + "direction": {}, + "id": {}, + "amount_msat": {}, + "msatoshi": {}, + "expiry": {}, + "payment_hash": {}, + "local_trimmed": {}, + "status": {}, + "state": { + "type": "string", + "enum": [ + "SENT_ADD_HTLC", + "SENT_ADD_COMMIT", + "RCVD_ADD_REVOCATION", + "RCVD_ADD_ACK_COMMIT", + "SENT_ADD_ACK_REVOCATION", + "RCVD_REMOVE_HTLC", + "RCVD_REMOVE_COMMIT", + "SENT_REMOVE_REVOCATION", + "SENT_REMOVE_ACK_COMMIT", + "RCVD_REMOVE_ACK_REVOCATION" + ], + "description": "Status of the HTLC" + } + } + } + }, + { + "if": { + "properties": { + "direction": { + "enum": [ + "in" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "state" + ], + "properties": { + "direction": {}, + "id": {}, + "amount_msat": {}, + "msatoshi": {}, + "expiry": {}, + "payment_hash": {}, + "local_trimmed": {}, + "status": {}, + "state": { + "type": "string", + "enum": [ + "RCVD_ADD_HTLC", + "RCVD_ADD_COMMIT", + "SENT_ADD_REVOCATION", + "SENT_ADD_ACK_COMMIT", + "RCVD_ADD_ACK_REVOCATION", + "SENT_REMOVE_HTLC", + "SENT_REMOVE_COMMIT", + "RCVD_REMOVE_REVOCATION", + "RCVD_REMOVE_ACK_COMMIT", + "SENT_REMOVE_ACK_REVOCATION" + ], + "description": "Status of the HTLC" + } + } + } + } + ] + } + } + }, + "allOf": [ + { + "if": { + "required": [ + "close_to" + ] + }, + "then": { + "additionalProperties": false, + "required": [], + "properties": { + "state": {}, + "scratch_txid": {}, + "feerate": {}, + "owner": {}, + "short_channel_id": {}, + "channel_id": {}, + "funding_txid": {}, + "close_to": {}, + "private": {}, + "opener": {}, + "closer": {}, + "features": {}, + "funding": {}, + "funding_allocation_msat": {}, + "funding_msat": {}, + "to_us_msat": {}, + "min_to_us_msat": {}, + "max_to_us_msat": {}, + "total_msat": {}, + "fee_base_msat": {}, + "fee_proportional_millionths": {}, + "dust_limit_msat": {}, + "max_total_htlc_in_msat": {}, + "their_reserve_msat": {}, + "our_reserve_msat": {}, + "spendable_msat": {}, + "receivable_msat": {}, + "minimum_htlc_in_msat": {}, + "spendable_msatoshi": {}, + "receivable_msatoshi": {}, + "their_to_self_delay": {}, + "our_to_self_delay": {}, + "max_accepted_htlcs": {}, + "msatoshi_to_us": {}, + "msatoshi_to_us_min": {}, + "msatoshi_to_us_max": {}, + "msatoshi_total": {}, + "dust_limit_satoshis": {}, + "max_htlc_value_in_flight_msat": {}, + "our_channel_reserve_satoshis": {}, + "their_channel_reserve_satoshis": {}, + "spendable_satoshis": {}, + "receivable_satoshis": {}, + "htlc_minimum_msat": {}, + "state_changes": {}, + "status": {}, + "in_payments_offered": {}, + "in_offered_msat": {}, + "in_msatoshi_offered": {}, + "in_payments_fulfilled": {}, + "in_fulfilled_msat": {}, + "in_msatoshi_fulfilled": {}, + "out_payments_offered": {}, + "out_offered_msat": {}, + "out_msatoshi_offered": {}, + "out_payments_fulfilled": {}, + "out_fulfilled_msat": {}, + "out_msatoshi_fulfilled": {}, + "htlcs": {}, + "initial_feerate": {}, + "last_feerate": {}, + "next_feerate": {}, + "inflight": {}, + "last_tx_fee": {}, + "last_tx_fee_msat": {}, + "direction": {}, + "close_to_addr": { + "type": "string", + "description": "The bitcoin address we will close to" + } + } + } + }, + { + "if": { + "required": [ + "scratch_txid" + ] + }, + "then": { + "additionalProperties": false, + "required": [ + "last_tx_fee_msat" + ], + "properties": { + "state": {}, + "scratch_txid": {}, + "feerate": {}, + "owner": {}, + "short_channel_id": {}, + "channel_id": {}, + "funding_txid": {}, + "inflight": {}, + "close_to": {}, + "private": {}, + "opener": {}, + "closer": {}, + "features": {}, + "funding": {}, + "funding_allocation_msat": {}, + "funding_msat": {}, + "to_us_msat": {}, + "min_to_us_msat": {}, + "max_to_us_msat": {}, + "total_msat": {}, + "fee_base_msat": {}, + "fee_proportional_millionths": {}, + "dust_limit_msat": {}, + "max_total_htlc_in_msat": {}, + "their_reserve_msat": {}, + "our_reserve_msat": {}, + "spendable_msat": {}, + "receivable_msat": {}, + "minimum_htlc_in_msat": {}, + "spendable_msatoshi": {}, + "receivable_msatoshi": {}, + "their_to_self_delay": {}, + "our_to_self_delay": {}, + "max_accepted_htlcs": {}, + "msatoshi_to_us": {}, + "msatoshi_to_us_min": {}, + "msatoshi_to_us_max": {}, + "msatoshi_total": {}, + "dust_limit_satoshis": {}, + "max_htlc_value_in_flight_msat": {}, + "our_channel_reserve_satoshis": {}, + "their_channel_reserve_satoshis": {}, + "spendable_satoshis": {}, + "receivable_satoshis": {}, + "htlc_minimum_msat": {}, + "state_changes": {}, + "status": {}, + "in_payments_offered": {}, + "in_offered_msat": {}, + "in_msatoshi_offered": {}, + "in_payments_fulfilled": {}, + "in_fulfilled_msat": {}, + "in_msatoshi_fulfilled": {}, + "out_payments_offered": {}, + "out_offered_msat": {}, + "out_msatoshi_offered": {}, + "out_payments_fulfilled": {}, + "out_fulfilled_msat": {}, + "out_msatoshi_fulfilled": {}, + "htlcs": {}, + "initial_feerate": {}, + "last_feerate": {}, + "next_feerate": {}, + "close_to_addr": {}, + "direction": {}, + "last_tx_fee": { + "deprecated": true + }, + "last_tx_fee_msat": { + "type": "msat", + "description": "fee attached to this the current tx" + } + } + } + }, + { + "if": { + "required": [ + "short_channel_id" + ] + }, + "then": { + "additionalProperties": false, + "required": [ + "direction" + ], + "properties": { + "state": {}, + "scratch_txid": {}, + "feerate": {}, + "owner": {}, + "short_channel_id": {}, + "channel_id": {}, + "funding_txid": {}, + "inflight": {}, + "close_to": {}, + "private": {}, + "opener": {}, + "closer": {}, + "features": {}, + "funding": {}, + "funding_allocation_msat": {}, + "funding_msat": {}, + "to_us_msat": {}, + "min_to_us_msat": {}, + "max_to_us_msat": {}, + "total_msat": {}, + "fee_base_msat": {}, + "fee_proportional_millionths": {}, + "dust_limit_msat": {}, + "max_total_htlc_in_msat": {}, + "their_reserve_msat": {}, + "our_reserve_msat": {}, + "spendable_msat": {}, + "receivable_msat": {}, + "minimum_htlc_in_msat": {}, + "spendable_msatoshi": {}, + "receivable_msatoshi": {}, + "their_to_self_delay": {}, + "our_to_self_delay": {}, + "max_accepted_htlcs": {}, + "msatoshi_to_us": {}, + "msatoshi_to_us_min": {}, + "msatoshi_to_us_max": {}, + "msatoshi_total": {}, + "dust_limit_satoshis": {}, + "max_htlc_value_in_flight_msat": {}, + "our_channel_reserve_satoshis": {}, + "their_channel_reserve_satoshis": {}, + "spendable_satoshis": {}, + "receivable_satoshis": {}, + "htlc_minimum_msat": {}, + "state_changes": {}, + "status": {}, + "in_payments_offered": {}, + "in_offered_msat": {}, + "in_msatoshi_offered": {}, + "in_payments_fulfilled": {}, + "in_fulfilled_msat": {}, + "in_msatoshi_fulfilled": {}, + "out_payments_offered": {}, + "out_offered_msat": {}, + "out_msatoshi_offered": {}, + "out_payments_fulfilled": {}, + "out_fulfilled_msat": {}, + "out_msatoshi_fulfilled": {}, + "htlcs": {}, + "initial_feerate": {}, + "last_feerate": {}, + "next_feerate": {}, + "last_tx_fee": {}, + "close_to_addr": {}, + "last_tx_fee_msat": {}, + "direction": { + "type": "u32", + "description": "0 if we're the lesser node_id, 1 if we're the greater" + } + } + } + }, + { + "if": { + "required": [ + "inflight" + ] + }, + "then": { + "additionalProperties": false, + "required": [ + "initial_feerate", + "last_feerate", + "next_feerate" + ], + "properties": { + "state": {}, + "scratch_txid": {}, + "feerate": {}, + "owner": {}, + "short_channel_id": {}, + "channel_id": {}, + "funding_txid": {}, + "close_to": {}, + "private": {}, + "opener": {}, + "closer": {}, + "features": {}, + "funding": {}, + "funding_allocation_msat": {}, + "funding_msat": {}, + "to_us_msat": {}, + "min_to_us_msat": {}, + "max_to_us_msat": {}, + "total_msat": {}, + "fee_base_msat": {}, + "fee_proportional_millionths": {}, + "dust_limit_msat": {}, + "max_total_htlc_in_msat": {}, + "their_reserve_msat": {}, + "our_reserve_msat": {}, + "spendable_msat": {}, + "receivable_msat": {}, + "minimum_htlc_in_msat": {}, + "spendable_msatoshi": {}, + "receivable_msatoshi": {}, + "their_to_self_delay": {}, + "our_to_self_delay": {}, + "max_accepted_htlcs": {}, + "msatoshi_to_us": {}, + "msatoshi_to_us_min": {}, + "msatoshi_to_us_max": {}, + "msatoshi_total": {}, + "dust_limit_satoshis": {}, + "max_htlc_value_in_flight_msat": {}, + "our_channel_reserve_satoshis": {}, + "their_channel_reserve_satoshis": {}, + "spendable_satoshis": {}, + "receivable_satoshis": {}, + "htlc_minimum_msat": {}, + "state_changes": {}, + "status": {}, + "in_payments_offered": {}, + "in_offered_msat": {}, + "in_msatoshi_offered": {}, + "in_payments_fulfilled": {}, + "in_fulfilled_msat": {}, + "in_msatoshi_fulfilled": {}, + "out_payments_offered": {}, + "out_offered_msat": {}, + "out_msatoshi_offered": {}, + "out_payments_fulfilled": {}, + "out_fulfilled_msat": {}, + "out_msatoshi_fulfilled": {}, + "htlcs": {}, + "inflight": {}, + "last_tx_fee": {}, + "close_to_addr": {}, + "direction": {}, + "last_tx_fee_msat": {}, + "initial_feerate": { + "type": "string", + "description": "The feerate for the initial funding transaction in per-1000-weight, with \"kpw\" appended" + }, + "last_feerate": { + "type": "string", + "description": "The feerate for the latest funding transaction in per-1000-weight, with \"kpw\" appended" + }, + "next_feerate": { + "type": "string", + "description": "The minimum feerate for the next funding transaction in per-1000-weight, with \"kpw\" appended" + } + } + } + } + ] + } + } + }, + "allOf": [ + { + "if": { + "additionalProperties": true, + "properties": { + "connected": { + "enum": [ + true + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "netaddr", + "features" + ], + "properties": { + "id": {}, + "channels": {}, + "connected": {}, + "htlcs": {}, + "log": {}, + "last_tx_fee": {}, + "netaddr": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "description": "A single entry array", + "items": { + "type": "string", + "description": "address, e.g. 1.2.3.4:1234" + } + }, + "features": { + "type": "hex", + "description": "bitmap of BOLT #9 features from peer's INIT message" + } + } + } + } + ] + } } + } } diff --git a/doc/schemas/listsendpays.schema.json b/doc/schemas/listsendpays.schema.json index d94a25431..8daaaf827 100644 --- a/doc/schemas/listsendpays.schema.json +++ b/doc/schemas/listsendpays.schema.json @@ -1,173 +1,193 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "payments" ], - "properties": { - "payments": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true, - "required": [ "id", "payment_hash", "status", "created_at", "amount_sent_msat" ], - "properties": { - "id": { - "type": "u64", - "description": "unique ID for this payment attempt" - }, - "groupid": { - "type": "u64", - "description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "status": { - "type": "string", - "enum": [ "pending", "failed", "complete" ], - "description": "status of the payment" - }, - "msatoshi": { - "deprecated": true - }, - "amount_msat": { - "type": "msat", - "description": "The amount delivered to destination (if known)" - }, - "destination": { - "type": "pubkey", - "description": "the final destination of the payment if known" - }, - "created_at": { - "type": "u64", - "description": "the UNIX timestamp showing when this payment was initiated" - }, - "msatoshi_sent": { - "deprecated": true - }, - "amount_sent_msat": { - "type": "msat", - "description": "The amount sent" - }, - "label": { - "type": "string", - "description": "the label, if given to sendpay" - }, - "bolt11": { - "type": "string", - "description": "the bolt11 string (if pay supplied one)" - }, - "bolt12": { - "type": "string", - "description": "the bolt12 string (if supplied for pay: **experimental-offers** only)." - } - }, - "allOf": [ - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "complete" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "payment_preimage" ], - "properties": { - "id": { }, - "partid": { }, - "groupid": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "destination": { }, - "created_at": { }, - "msatoshi_sent": { }, - "amount_sent_msat": { }, - "label": { }, - "bolt11": { }, - "bolt12": { }, - "payment_preimage": { - "type": "hex", - "description": "the proof of payment: SHA256 of this **payment_hash**", - "maxLength": 64, - "minLength": 64 - } - } - } - }, - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "failed" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ ], - "properties": { - "id": { }, - "partid": { }, - "groupid": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "destination": { }, - "created_at": { }, - "msatoshi_sent": { }, - "amount_sent_msat": { }, - "label": { }, - "bolt11": { }, - "bolt12": { }, - "erroronion": { - "type": "hex", - "description": "the onion message returned" - } - } - } - }, - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "pending" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ ], - "properties": { - "id": { }, - "partid": { }, - "groupid": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "destination": { }, - "created_at": { }, - "msatoshi_sent": { }, - "amount_sent_msat": { }, - "label": { }, - "bolt11": { }, - "bolt12": { } - } - } - } - ] - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "payments" + ], + "properties": { + "payments": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "id", + "payment_hash", + "status", + "created_at", + "amount_sent_msat" + ], + "properties": { + "id": { + "type": "u64", + "description": "unique ID for this payment attempt" + }, + "groupid": { + "type": "u64", + "description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "failed", + "complete" + ], + "description": "status of the payment" + }, + "msatoshi": { + "deprecated": true + }, + "amount_msat": { + "type": "msat", + "description": "The amount delivered to destination (if known)" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment if known" + }, + "created_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "msatoshi_sent": { + "deprecated": true + }, + "amount_sent_msat": { + "type": "msat", + "description": "The amount sent" + }, + "label": { + "type": "string", + "description": "the label, if given to sendpay" + }, + "bolt11": { + "type": "string", + "description": "the bolt11 string (if pay supplied one)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string (if supplied for pay: **experimental-offers** only)." + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "complete" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "payment_preimage" + ], + "properties": { + "id": {}, + "partid": {}, + "groupid": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "bolt11": {}, + "bolt12": {}, + "payment_preimage": { + "type": "hex", + "description": "the proof of payment: SHA256 of this **payment_hash**", + "maxLength": 64, + "minLength": 64 + } + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "failed" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [], + "properties": { + "id": {}, + "partid": {}, + "groupid": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "bolt11": {}, + "bolt12": {}, + "erroronion": { + "type": "hex", + "description": "the onion message returned" + } + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "pending" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [], + "properties": { + "id": {}, + "partid": {}, + "groupid": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "bolt11": {}, + "bolt12": {} + } + } + } + ] + } } + } } diff --git a/doc/schemas/listtransactions.schema.json b/doc/schemas/listtransactions.schema.json index 7539a8921..a5c5d5e5f 100644 --- a/doc/schemas/listtransactions.schema.json +++ b/doc/schemas/listtransactions.schema.json @@ -1,121 +1,176 @@ { - "$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", "msat" , "scriptPubKey" ], - "properties": { - "index": { - "type": "u32", - "description": "the 0-based output number" - }, - "satoshis": { - "deprecated": true - }, - "msat": { - "type": "msat", - "description": "the amount of the output" - }, - "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)" - } - } - } - } - } - } - } + "$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", + "msat", + "scriptPubKey" + ], + "properties": { + "index": { + "type": "u32", + "description": "the 0-based output number" + }, + "satoshis": { + "deprecated": true + }, + "msat": { + "type": "msat", + "description": "the amount of the output" + }, + "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)" + } + } + } + } + } + } } + } } diff --git a/doc/schemas/multifundchannel.schema.json b/doc/schemas/multifundchannel.schema.json index 5022d32a9..18754c491 100644 --- a/doc/schemas/multifundchannel.schema.json +++ b/doc/schemas/multifundchannel.schema.json @@ -1,83 +1,103 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "tx", "txid", "channel_ids" ], - "properties": { - "tx": { - "type": "hex", - "description": "The raw transaction which funded the channel" - }, - "txid": { - "type": "txid", - "description": "The txid of the transaction which funded the channel" - }, - "channel_ids": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ "id", "channel_id", "outnum" ], - "properties": { - "id": { - "type": "pubkey", - "description": "The peer we opened the channel with" - }, - "outnum": { - "type": "u32", - "description": "The 0-based output index showing which output funded the channel" - }, - "channel_id": { - "type": "hex", - "description": "The channel_id of the resulting channel", - "minLength": 64, - "maxLength": 64 - }, - "close_to": { - "type": "hex", - "description": "The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`" - } - } - } - }, - "failed": { - "type": "array", - "description": "any peers we failed to open with (if *minchannels* was specified less than the number of destinations)", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ "id", "method", "error" ], - "properties": { - "id": { - "type": "pubkey", - "description": "The peer we failed to open the channel with" - }, - "method": { - "type": "string", - "enum": [ "connect", "openchannel_init", "fundchannel_start", "fundchannel_complete" ], - "description": "What stage we failed at" - }, - "error": { - "type": "object", - "additionalProperties": false, - "required": [ "code", "message" ], - "properties": { - "code": { - "type": "integer", - "description": "JSON error code from failing stage" - }, - "message": { - "type": "string", - "description": "Message from stage" - }, - "data": { - "untyped": true, - "description": "Additional error data" - } - } - } - } - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "tx", + "txid", + "channel_ids" + ], + "properties": { + "tx": { + "type": "hex", + "description": "The raw transaction which funded the channel" + }, + "txid": { + "type": "txid", + "description": "The txid of the transaction which funded the channel" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "channel_id", + "outnum" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "The peer we opened the channel with" + }, + "outnum": { + "type": "u32", + "description": "The 0-based output index showing which output funded the channel" + }, + "channel_id": { + "type": "hex", + "description": "The channel_id of the resulting channel", + "minLength": 64, + "maxLength": 64 + }, + "close_to": { + "type": "hex", + "description": "The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`" + } + } + } + }, + "failed": { + "type": "array", + "description": "any peers we failed to open with (if *minchannels* was specified less than the number of destinations)", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "method", + "error" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "The peer we failed to open the channel with" + }, + "method": { + "type": "string", + "enum": [ + "connect", + "openchannel_init", + "fundchannel_start", + "fundchannel_complete" + ], + "description": "What stage we failed at" + }, + "error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "description": "JSON error code from failing stage" + }, + "message": { + "type": "string", + "description": "Message from stage" + }, + "data": { + "untyped": true, + "description": "Additional error data" + } + } + } + } + } } + } } diff --git a/doc/schemas/multiwithdraw.schema.json b/doc/schemas/multiwithdraw.schema.json index d8095507d..d3c831d17 100644 --- a/doc/schemas/multiwithdraw.schema.json +++ b/doc/schemas/multiwithdraw.schema.json @@ -1,16 +1,19 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "tx", "txid" ], - "properties": { - "tx": { - "type": "hex", - "description": "The raw transaction which was sent" - }, - "txid": { - "type": "txid", - "description": "The txid of the **tx**" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "tx", + "txid" + ], + "properties": { + "tx": { + "type": "hex", + "description": "The raw transaction which was sent" + }, + "txid": { + "type": "txid", + "description": "The txid of the **tx**" } + } } diff --git a/doc/schemas/newaddr.schema.json b/doc/schemas/newaddr.schema.json index 4da493aac..8bfa737a9 100644 --- a/doc/schemas/newaddr.schema.json +++ b/doc/schemas/newaddr.schema.json @@ -1,16 +1,16 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ ], - "properties": { - "bech32": { - "type": "string", - "description": "The bech32 (native segwit) address" - }, - "p2sh-segwit": { - "type": "string", - "description": "The p2sh-wrapped address" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "bech32": { + "type": "string", + "description": "The bech32 (native segwit) address" + }, + "p2sh-segwit": { + "type": "string", + "description": "The p2sh-wrapped address" } + } } diff --git a/doc/schemas/notifications.schema.json b/doc/schemas/notifications.schema.json index b797a82c2..1aad2dcae 100644 --- a/doc/schemas/notifications.schema.json +++ b/doc/schemas/notifications.schema.json @@ -1,7 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "properties": { - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": {} } diff --git a/doc/schemas/offer.schema.json b/doc/schemas/offer.schema.json index 45e0e7872..b57c306ed 100644 --- a/doc/schemas/offer.schema.json +++ b/doc/schemas/offer.schema.json @@ -1,43 +1,53 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "offer_id", "active", "single_use", "bolt12", "bolt12_unsigned", "used", "created" ], - "properties": { - "offer_id": { - "type": "hex", - "description": "the id of this offer (merkle hash of non-signature fields)", - "maxLength": 64, - "minLength": 64 - }, - "active": { - "type": "boolean", - "enum": [ true ], - "description": "whether this can still be used" - }, - "single_use": { - "type": "boolean", - "description": "whether this expires as soon as it's paid (reflects the *single_use* parameter)" - }, - "bolt12": { - "type": "string", - "description": "the bolt12 encoding of the offer" - }, - "bolt12_unsigned": { - "type": "string", - "description": "the bolt12 encoding of the offer, without a signature" - }, - "used": { - "type": "boolean", - "description": "True if an associated invoice has been paid" - }, - "created": { - "type": "boolean", - "description": "false if the offer already existed" - }, - "label": { - "type": "string", - "description": "the (optional) user-specified label" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "offer_id", + "active", + "single_use", + "bolt12", + "bolt12_unsigned", + "used", + "created" + ], + "properties": { + "offer_id": { + "type": "hex", + "description": "the id of this offer (merkle hash of non-signature fields)", + "maxLength": 64, + "minLength": 64 + }, + "active": { + "type": "boolean", + "enum": [ + true + ], + "description": "whether this can still be used" + }, + "single_use": { + "type": "boolean", + "description": "whether this expires as soon as it's paid (reflects the *single_use* parameter)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 encoding of the offer" + }, + "bolt12_unsigned": { + "type": "string", + "description": "the bolt12 encoding of the offer, without a signature" + }, + "used": { + "type": "boolean", + "description": "True if an associated invoice has been paid" + }, + "created": { + "type": "boolean", + "description": "false if the offer already existed" + }, + "label": { + "type": "string", + "description": "the (optional) user-specified label" } + } } diff --git a/doc/schemas/offerout.schema.json b/doc/schemas/offerout.schema.json index 531d9dad8..12f7972cc 100644 --- a/doc/schemas/offerout.schema.json +++ b/doc/schemas/offerout.schema.json @@ -1,45 +1,59 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "offer_id", "active", "single_use", "bolt12", "bolt12_unsigned", "used", "created" ], - "properties": { - "offer_id": { - "type": "hex", - "description": "the id of this offer (merkle hash of non-signature fields)", - "maxLength": 64, - "minLength": 64 - }, - "active": { - "type": "boolean", - "enum": [ true ], - "description": "whether this will pay a matching incoming invoice" - }, - "single_use": { - "type": "boolean", - "enum": [ true ], - "description": "whether this expires as soon as it's paid out" - }, - "bolt12": { - "type": "string", - "description": "the bolt12 encoding of the offer" - }, - "bolt12_unsigned": { - "type": "string", - "description": "the bolt12 encoding of the offer, without a signature" - }, - "used": { - "type": "boolean", - "enum": [ false ], - "description": "True if an incoming invoice has been paid" - }, - "created": { - "type": "boolean", - "description": "false if the offer already existed" - }, - "label": { - "type": "string", - "description": "the (optional) user-specified label" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "offer_id", + "active", + "single_use", + "bolt12", + "bolt12_unsigned", + "used", + "created" + ], + "properties": { + "offer_id": { + "type": "hex", + "description": "the id of this offer (merkle hash of non-signature fields)", + "maxLength": 64, + "minLength": 64 + }, + "active": { + "type": "boolean", + "enum": [ + true + ], + "description": "whether this will pay a matching incoming invoice" + }, + "single_use": { + "type": "boolean", + "enum": [ + true + ], + "description": "whether this expires as soon as it's paid out" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 encoding of the offer" + }, + "bolt12_unsigned": { + "type": "string", + "description": "the bolt12 encoding of the offer, without a signature" + }, + "used": { + "type": "boolean", + "enum": [ + false + ], + "description": "True if an incoming invoice has been paid" + }, + "created": { + "type": "boolean", + "description": "false if the offer already existed" + }, + "label": { + "type": "string", + "description": "the (optional) user-specified label" } + } } diff --git a/doc/schemas/openchannel_abort.schema.json b/doc/schemas/openchannel_abort.schema.json index a24f32847..645f8fdb4 100644 --- a/doc/schemas/openchannel_abort.schema.json +++ b/doc/schemas/openchannel_abort.schema.json @@ -1,22 +1,26 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "channel_id", "channel_canceled", "reason" ], - "properties": { - "channel_id": { - "type": "hex", - "description": "the channel id of the aborted channel", - "maxLength": 64, - "minLength": 64 - }, - "channel_canceled": { - "type": "boolean", - "description": "whether this is completely canceled (there may be remaining in-flight transactions)" - }, - "reason": { - "type": "string", - "description": "usually \"Abort requested\", but if it happened to fail at the same time it could be different" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "channel_canceled", + "reason" + ], + "properties": { + "channel_id": { + "type": "hex", + "description": "the channel id of the aborted channel", + "maxLength": 64, + "minLength": 64 + }, + "channel_canceled": { + "type": "boolean", + "description": "whether this is completely canceled (there may be remaining in-flight transactions)" + }, + "reason": { + "type": "string", + "description": "usually \"Abort requested\", but if it happened to fail at the same time it could be different" } + } } diff --git a/doc/schemas/openchannel_bump.schema.json b/doc/schemas/openchannel_bump.schema.json index 509a47022..4b3d41ae1 100644 --- a/doc/schemas/openchannel_bump.schema.json +++ b/doc/schemas/openchannel_bump.schema.json @@ -1,27 +1,34 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "channel_id", "psbt", "commitments_secured", "funding_serial" ], - "properties": { - "channel_id": { - "type": "hex", - "description": "the channel id of the channel", - "maxLength": 64, - "minLength": 64 - }, - "psbt": { - "type": "string", - "description": "the (incomplete) PSBT of the RBF transaction" - }, - "commitments_secured": { - "type": "boolean", - "enum": [ false ], - "description": "whether the *psbt* is complete" - }, - "funding_serial": { - "type": "u64", - "description": "the serial_id of the funding output in the *psbt*" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "psbt", + "commitments_secured", + "funding_serial" + ], + "properties": { + "channel_id": { + "type": "hex", + "description": "the channel id of the channel", + "maxLength": 64, + "minLength": 64 + }, + "psbt": { + "type": "string", + "description": "the (incomplete) PSBT of the RBF transaction" + }, + "commitments_secured": { + "type": "boolean", + "enum": [ + false + ], + "description": "whether the *psbt* is complete" + }, + "funding_serial": { + "type": "u64", + "description": "the serial_id of the funding output in the *psbt*" } + } } diff --git a/doc/schemas/openchannel_init.schema.json b/doc/schemas/openchannel_init.schema.json index 17698593e..767205ef6 100644 --- a/doc/schemas/openchannel_init.schema.json +++ b/doc/schemas/openchannel_init.schema.json @@ -1,27 +1,34 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "channel_id", "psbt", "commitments_secured", "funding_serial" ], - "properties": { - "channel_id": { - "type": "hex", - "description": "the channel id of the channel", - "maxLength": 64, - "minLength": 64 - }, - "psbt": { - "type": "string", - "description": "the (incomplete) PSBT of the funding transaction" - }, - "commitments_secured": { - "type": "boolean", - "enum": [ false ], - "description": "whether the *psbt* is complete" - }, - "funding_serial": { - "type": "u64", - "description": "the serial_id of the funding output in the *psbt*" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "psbt", + "commitments_secured", + "funding_serial" + ], + "properties": { + "channel_id": { + "type": "hex", + "description": "the channel id of the channel", + "maxLength": 64, + "minLength": 64 + }, + "psbt": { + "type": "string", + "description": "the (incomplete) PSBT of the funding transaction" + }, + "commitments_secured": { + "type": "boolean", + "enum": [ + false + ], + "description": "whether the *psbt* is complete" + }, + "funding_serial": { + "type": "u64", + "description": "the serial_id of the funding output in the *psbt*" } + } } diff --git a/doc/schemas/openchannel_signed.schema.json b/doc/schemas/openchannel_signed.schema.json index cb144778e..23b9a11d7 100644 --- a/doc/schemas/openchannel_signed.schema.json +++ b/doc/schemas/openchannel_signed.schema.json @@ -1,22 +1,26 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "channel_id", "tx", "txid" ], - "properties": { - "channel_id": { - "type": "hex", - "description": "the channel id of the channel", - "maxLength": 64, - "minLength": 64 - }, - "tx": { - "type": "hex", - "description": "the funding transaction" - }, - "txid": { - "type": "txid", - "description": "The txid of the **tx**" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "tx", + "txid" + ], + "properties": { + "channel_id": { + "type": "hex", + "description": "the channel id of the channel", + "maxLength": 64, + "minLength": 64 + }, + "tx": { + "type": "hex", + "description": "the funding transaction" + }, + "txid": { + "type": "txid", + "description": "The txid of the **tx**" } + } } diff --git a/doc/schemas/openchannel_update.schema.json b/doc/schemas/openchannel_update.schema.json index 7f59d43d3..91acc1d5e 100644 --- a/doc/schemas/openchannel_update.schema.json +++ b/doc/schemas/openchannel_update.schema.json @@ -1,30 +1,35 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "channel_id", "psbt", "commitments_secured", "funding_outnum" ], - "properties": { - "channel_id": { - "type": "hex", - "description": "the channel id of the channel", - "maxLength": 64, - "minLength": 64 - }, - "psbt": { - "type": "string", - "description": "the PSBT of the funding transaction" - }, - "commitments_secured": { - "type": "boolean", - "description": "whether the *psbt* is complete (if true, sign *psbt* and call `openchannel_signed` to complete the channel open)" - }, - "funding_outnum": { - "type": "u32", - "description": "The index of the funding output in the psbt" - }, - "close_to": { - "type": "hex", - "description": "scriptPubkey which we have to close to if we mutual close" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "psbt", + "commitments_secured", + "funding_outnum" + ], + "properties": { + "channel_id": { + "type": "hex", + "description": "the channel id of the channel", + "maxLength": 64, + "minLength": 64 + }, + "psbt": { + "type": "string", + "description": "the PSBT of the funding transaction" + }, + "commitments_secured": { + "type": "boolean", + "description": "whether the *psbt* is complete (if true, sign *psbt* and call `openchannel_signed` to complete the channel open)" + }, + "funding_outnum": { + "type": "u32", + "description": "The index of the funding output in the psbt" + }, + "close_to": { + "type": "hex", + "description": "scriptPubkey which we have to close to if we mutual close" } + } } diff --git a/doc/schemas/parsefeerate.schema.json b/doc/schemas/parsefeerate.schema.json index 0af834cfe..e431936b1 100644 --- a/doc/schemas/parsefeerate.schema.json +++ b/doc/schemas/parsefeerate.schema.json @@ -1,13 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ ], - "properties": { - "perkw": { - "type": "u32", - "description": "Value of *feerate_str* in kilosipa", - "additionalProperties": false - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "perkw": { + "type": "u32", + "description": "Value of *feerate_str* in kilosipa", + "additionalProperties": false } + } } diff --git a/doc/schemas/pay.schema.json b/doc/schemas/pay.schema.json index b3bd48ccc..1a4f395f9 100644 --- a/doc/schemas/pay.schema.json +++ b/doc/schemas/pay.schema.json @@ -1,55 +1,65 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "payment_preimage", "payment_hash", "created_at", "parts", "amount_msat", "amount_sent_msat", "status" ], - "properties": { - "payment_preimage": { - "type": "hex", - "description": "the proof of payment: SHA256 of this **payment_hash**", - "maxLength": 64, - "minLength": 64 - }, - "destination": { - "type": "pubkey", - "description": "the final destination of the payment" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "created_at": { - "type": "number", - "description": "the UNIX timestamp showing when this payment was initiated" - }, - "parts": { - "type": "u32", - "description": "how many attempts this took" - }, - "msatoshi": { - "deprecated": true - }, - "amount_msat": { - "type": "msat", - "description": "Amount the recipient received" - }, - "msatoshi_sent": { - "deprecated": true - }, - "amount_sent_msat": { - "type": "msat", - "description": "Total amount we sent (including fees)" - }, - "warning_partial_completion": { - "type": "string", - "description": "Not all parts of a multi-part payment have completed" - }, - "status": { - "type": "string", - "enum": [ "complete" ], - "description": "status of payment" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "payment_preimage", + "payment_hash", + "created_at", + "parts", + "amount_msat", + "amount_sent_msat", + "status" + ], + "properties": { + "payment_preimage": { + "type": "hex", + "description": "the proof of payment: SHA256 of this **payment_hash**", + "maxLength": 64, + "minLength": 64 + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "created_at": { + "type": "number", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "parts": { + "type": "u32", + "description": "how many attempts this took" + }, + "msatoshi": { + "deprecated": true + }, + "amount_msat": { + "type": "msat", + "description": "Amount the recipient received" + }, + "msatoshi_sent": { + "deprecated": true + }, + "amount_sent_msat": { + "type": "msat", + "description": "Total amount we sent (including fees)" + }, + "warning_partial_completion": { + "type": "string", + "description": "Not all parts of a multi-part payment have completed" + }, + "status": { + "type": "string", + "enum": [ + "complete" + ], + "description": "status of payment" } + } } diff --git a/doc/schemas/ping.schema.json b/doc/schemas/ping.schema.json index 5d0d132e7..4ea5056a9 100644 --- a/doc/schemas/ping.schema.json +++ b/doc/schemas/ping.schema.json @@ -1,12 +1,14 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "totlen" ], - "properties": { - "totlen": { - "type": "u16", - "description": "the answer length of the reply message (including header: 0 means no reply expected)" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "totlen" + ], + "properties": { + "totlen": { + "type": "u16", + "description": "the answer length of the reply message (including header: 0 means no reply expected)" } + } } diff --git a/doc/schemas/plugin.schema.json b/doc/schemas/plugin.schema.json index fab8966e2..f59c4c513 100644 --- a/doc/schemas/plugin.schema.json +++ b/doc/schemas/plugin.schema.json @@ -1,71 +1,95 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "required": [ "command" ], - "properties": { - "command": { - "type": "string", - "enum": [ "start", "stop", "rescan", "startdir", "list" ], - "description": "the subcommand this is responding to" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "command" + ], + "properties": { + "command": { + "type": "string", + "enum": [ + "start", + "stop", + "rescan", + "startdir", + "list" + ], + "description": "the subcommand this is responding to" + } + }, + "allOf": [ + { + "if": { + "properties": { + "command": { + "type": "string", + "enum": [ + "start", + "startdir", + "rescan", + "list" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "command", + "plugins" + ], + "properties": { + "command": {}, + "plugins": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "active" + ], + "properties": { + "name": { + "type": "string", + "description": "full pathname of the plugin" + }, + "active": { + "type": "boolean", + "description": "status; since plugins are configured asynchronously, a freshly started plugin may not appear immediately." + } + } + } + } + } + } }, - "allOf": [ - { - "if": { - "properties": { - "command": { - "type": "string", - "enum": [ "start", "startdir", "rescan", "list" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "command", "plugins" ], - "properties": { - "command": { }, - "plugins": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ "name", "active" ], - "properties": { - "name": { - "type": "string", - "description": "full pathname of the plugin" - }, - "active": { - "type": "boolean", - "description": "status; since plugins are configured asynchronously, a freshly started plugin may not appear immediately." - } - } - } - } - } - } - }, - { - "if": { - "properties": { - "command": { - "type": "string", - "enum": [ "stop" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "command", "result" ], - "properties": { - "command": { }, - "result": { - "type": "string", - "description": "A message saying it successfully stopped" - } - } - } - } - ] + { + "if": { + "properties": { + "command": { + "type": "string", + "enum": [ + "stop" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "command", + "result" + ], + "properties": { + "command": {}, + "result": { + "type": "string", + "description": "A message saying it successfully stopped" + } + } + } + } + ] } diff --git a/doc/schemas/reserveinputs.schema.json b/doc/schemas/reserveinputs.schema.json index 8adcc03d3..adfc66b9d 100644 --- a/doc/schemas/reserveinputs.schema.json +++ b/doc/schemas/reserveinputs.schema.json @@ -1,39 +1,49 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "reservations" ], - "properties": { - "reservations": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ "txid", "vout", "was_reserved", "reserved", "reserved_to_block" ], - "properties": { - "txid": { - "type": "txid", - "description": "the transaction id" - }, - "vout": { - "type": "u32", - "description": "the output number which was reserved" - }, - "was_reserved": { - "type": "boolean", - "description": "whether the input was already reserved" - }, - "reserved": { - "type": "boolean", - "enum": [ true ], - "description": "whether the input is now reserved" - }, - "reserved_to_block": { - "type": "u32", - "description": "what blockheight the reservation will expire" - } - } - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "reservations" + ], + "properties": { + "reservations": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "txid", + "vout", + "was_reserved", + "reserved", + "reserved_to_block" + ], + "properties": { + "txid": { + "type": "txid", + "description": "the transaction id" + }, + "vout": { + "type": "u32", + "description": "the output number which was reserved" + }, + "was_reserved": { + "type": "boolean", + "description": "whether the input was already reserved" + }, + "reserved": { + "type": "boolean", + "enum": [ + true + ], + "description": "whether the input is now reserved" + }, + "reserved_to_block": { + "type": "u32", + "description": "what blockheight the reservation will expire" + } + } + } } + } } diff --git a/doc/schemas/sendcustommsg.schema.json b/doc/schemas/sendcustommsg.schema.json index 21ce1eb8b..cc61e6190 100644 --- a/doc/schemas/sendcustommsg.schema.json +++ b/doc/schemas/sendcustommsg.schema.json @@ -1,11 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ "status" ], - "properties": { - "status": { - "type": "string", - "description": "Information about where message was queued" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "description": "Information about where message was queued" } + } } diff --git a/doc/schemas/sendinvoice.schema.json b/doc/schemas/sendinvoice.schema.json index df21950a6..d1be691bb 100644 --- a/doc/schemas/sendinvoice.schema.json +++ b/doc/schemas/sendinvoice.schema.json @@ -1,89 +1,106 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "required": [ "label", "description", "payment_hash", "status", "expires_at" ], - "properties": { - "label": { - "type": "string", - "description": "unique label supplied at invoice creation" - }, - "description": { - "type": "string", - "description": "description used in the invoice" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "status": { - "type": "string", - "enum": [ "unpaid", "paid", "expired" ], - "description": "Whether it's paid, unpaid or unpayable" - }, - "expires_at": { - "type": "u64", - "description": "UNIX timestamp of when it will become / became unpayable" - }, - "msatoshi": { - "deprecated": "true" - }, - "amount_msat": { - "type": "msat", - "description": "the amount required to pay this invoice" - }, - "bolt12": { - "type": "string", - "description": "the BOLT12 string" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "label", + "description", + "payment_hash", + "status", + "expires_at" + ], + "properties": { + "label": { + "type": "string", + "description": "unique label supplied at invoice creation" }, - "allOf": [ - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "paid" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "pay_index", "amount_received_msat", "paid_at", "payment_preimage" ], - "properties": { - "label": { }, - "description": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "bolt12": { }, - "expires_at": { }, - "pay_index": { - "type": "u64", - "description": "Unique incrementing index for this payment" - }, - "msatoshi_received": { - "deprecated": true - }, - "amount_received_msat": { - "type": "msat", - "description": "the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)" - }, - "paid_at": { - "type": "u64", - "description": "UNIX timestamp of when it was paid" - }, - "payment_preimage": { - "type": "hex", - "description": "proof of payment", - "maxLength": 64, - "minLength": 64 - } - } - } - } - ] + "description": { + "type": "string", + "description": "description used in the invoice" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "status": { + "type": "string", + "enum": [ + "unpaid", + "paid", + "expired" + ], + "description": "Whether it's paid, unpaid or unpayable" + }, + "expires_at": { + "type": "u64", + "description": "UNIX timestamp of when it will become / became unpayable" + }, + "msatoshi": { + "deprecated": "true" + }, + "amount_msat": { + "type": "msat", + "description": "the amount required to pay this invoice" + }, + "bolt12": { + "type": "string", + "description": "the BOLT12 string" + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "paid" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "pay_index", + "amount_received_msat", + "paid_at", + "payment_preimage" + ], + "properties": { + "label": {}, + "description": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "bolt12": {}, + "expires_at": {}, + "pay_index": { + "type": "u64", + "description": "Unique incrementing index for this payment" + }, + "msatoshi_received": { + "deprecated": true + }, + "amount_received_msat": { + "type": "msat", + "description": "the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)" + }, + "paid_at": { + "type": "u64", + "description": "UNIX timestamp of when it was paid" + }, + "payment_preimage": { + "type": "hex", + "description": "proof of payment", + "maxLength": 64, + "minLength": 64 + } + } + } + } + ] } diff --git a/doc/schemas/sendonion.schema.json b/doc/schemas/sendonion.schema.json index 060078036..56474b44e 100644 --- a/doc/schemas/sendonion.schema.json +++ b/doc/schemas/sendonion.schema.json @@ -1,127 +1,142 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "required": [ "id", "payment_hash", "status", "created_at", "amount_sent_msat" ], - "properties": { - "id": { - "type": "u64", - "description": "unique ID for this payment attempt" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "status": { - "type": "string", - "enum": [ "pending", "complete" ], - "description": "status of the payment (could be complete if already sent previously)" - }, - "msatoshi": { - "deprecated": true - }, - "amount_msat": { - "type": "msat", - "description": "The amount delivered to destination (if known)" - }, - "destination": { - "type": "pubkey", - "description": "the final destination of the payment if known" - }, - "created_at": { - "type": "u64", - "description": "the UNIX timestamp showing when this payment was initiated" - }, - "msatoshi_sent": { - "deprecated": true - }, - "amount_sent_msat": { - "type": "msat", - "description": "The amount sent" - }, - "label": { - "type": "string", - "description": "the label, if given to sendpay" - }, - "bolt11": { - "type": "string", - "description": "the bolt11 string (if supplied)" - }, - "bolt12": { - "type": "string", - "description": "the bolt12 string (if supplied: **experimental-offers** only)." - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "id", + "payment_hash", + "status", + "created_at", + "amount_sent_msat" + ], + "properties": { + "id": { + "type": "u64", + "description": "unique ID for this payment attempt" }, - "allOf": [ - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "complete" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "payment_preimage" ], - "properties": { - "id": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "destination": { }, - "created_at": { }, - "groupid": { }, - "msatoshi_sent": { }, - "amount_sent_msat": { }, - "label": { }, - "bolt11": { }, - "bolt12": { }, - "payment_preimage": { - "type": "hex", - "description": "the proof of payment: SHA256 of this **payment_hash**", - "maxLength": 64, - "minLength": 64 - } - } - } - }, - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "pending" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ ], - "properties": { - "id": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "destination": { }, - "created_at": { }, - "groupid": { }, - "msatoshi_sent": { }, - "amount_sent_msat": { }, - "label": { }, - "bolt11": { }, - "bolt12": { }, - "message": { - "type": "string", - "description": "Monitor status with listpays or waitsendpay" - } - } - } - } - ] + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "complete" + ], + "description": "status of the payment (could be complete if already sent previously)" + }, + "msatoshi": { + "deprecated": true + }, + "amount_msat": { + "type": "msat", + "description": "The amount delivered to destination (if known)" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment if known" + }, + "created_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "msatoshi_sent": { + "deprecated": true + }, + "amount_sent_msat": { + "type": "msat", + "description": "The amount sent" + }, + "label": { + "type": "string", + "description": "the label, if given to sendpay" + }, + "bolt11": { + "type": "string", + "description": "the bolt11 string (if supplied)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string (if supplied: **experimental-offers** only)." + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "complete" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "payment_preimage" + ], + "properties": { + "id": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "groupid": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "bolt11": {}, + "bolt12": {}, + "payment_preimage": { + "type": "hex", + "description": "the proof of payment: SHA256 of this **payment_hash**", + "maxLength": 64, + "minLength": 64 + } + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "pending" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [], + "properties": { + "id": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "groupid": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "bolt11": {}, + "bolt12": {}, + "message": { + "type": "string", + "description": "Monitor status with listpays or waitsendpay" + } + } + } + } + ] } diff --git a/doc/schemas/sendonionmessage.schema.json b/doc/schemas/sendonionmessage.schema.json index 6354c7d82..65571ad4c 100644 --- a/doc/schemas/sendonionmessage.schema.json +++ b/doc/schemas/sendonionmessage.schema.json @@ -1,8 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ ], - "properties": { - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": {} } diff --git a/doc/schemas/sendpay.schema.json b/doc/schemas/sendpay.schema.json index 5089d4553..fec96ba54 100644 --- a/doc/schemas/sendpay.schema.json +++ b/doc/schemas/sendpay.schema.json @@ -1,137 +1,154 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "required": [ "id", "payment_hash", "status", "created_at", "amount_sent_msat" ], - "properties": { - "id": { - "type": "u64", - "description": "unique ID for this payment attempt" - }, - "groupid": { - "type": "u64", - "description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "status": { - "type": "string", - "enum": [ "pending", "complete" ], - "description": "status of the payment (could be complete if already sent previously)" - }, - "msatoshi": { - "deprecated": true - }, - "amount_msat": { - "type": "msat", - "description": "The amount delivered to destination (if known)" - }, - "destination": { - "type": "pubkey", - "description": "the final destination of the payment if known" - }, - "created_at": { - "type": "u64", - "description": "the UNIX timestamp showing when this payment was initiated" - }, - "msatoshi_sent": { - "deprecated": true - }, - "amount_sent_msat": { - "type": "msat", - "description": "The amount sent" - }, - "label": { - "type": "string", - "description": "the *label*, if given to sendpay" - }, - "partid": { - "type": "u64", - "description": "the *partid*, if given to sendpay" - }, - "bolt11": { - "type": "string", - "description": "the bolt11 string (if supplied)" - }, - "bolt12": { - "type": "string", - "description": "the bolt12 string (if supplied: **experimental-offers** only)." - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "id", + "payment_hash", + "status", + "created_at", + "amount_sent_msat" + ], + "properties": { + "id": { + "type": "u64", + "description": "unique ID for this payment attempt" }, - "allOf": [ - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "complete" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "payment_preimage" ], - "properties": { - "id": { }, - "groupid": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "destination": { }, - "created_at": { }, - "msatoshi_sent": { }, - "amount_sent_msat": { }, - "label": { }, - "partid": { }, - "bolt11": { }, - "bolt12": { }, - "payment_preimage": { - "type": "hex", - "description": "the proof of payment: SHA256 of this **payment_hash**", - "maxLength": 64, - "minLength": 64 - } - } - } - }, - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "pending" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "message" ], - "properties": { - "id": { }, - "groupid": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "destination": { }, - "created_at": { }, - "msatoshi_sent": { }, - "amount_sent_msat": { }, - "label": { }, - "partid": { }, - "bolt11": { }, - "bolt12": { }, - "message": { - "type": "string", - "description": "Monitor status with listpays or waitsendpay" - } - } - } - } - ] + "groupid": { + "type": "u64", + "description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "complete" + ], + "description": "status of the payment (could be complete if already sent previously)" + }, + "msatoshi": { + "deprecated": true + }, + "amount_msat": { + "type": "msat", + "description": "The amount delivered to destination (if known)" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment if known" + }, + "created_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "msatoshi_sent": { + "deprecated": true + }, + "amount_sent_msat": { + "type": "msat", + "description": "The amount sent" + }, + "label": { + "type": "string", + "description": "the *label*, if given to sendpay" + }, + "partid": { + "type": "u64", + "description": "the *partid*, if given to sendpay" + }, + "bolt11": { + "type": "string", + "description": "the bolt11 string (if supplied)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string (if supplied: **experimental-offers** only)." + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "complete" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "payment_preimage" + ], + "properties": { + "id": {}, + "groupid": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "partid": {}, + "bolt11": {}, + "bolt12": {}, + "payment_preimage": { + "type": "hex", + "description": "the proof of payment: SHA256 of this **payment_hash**", + "maxLength": 64, + "minLength": 64 + } + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "pending" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "message" + ], + "properties": { + "id": {}, + "groupid": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "partid": {}, + "bolt11": {}, + "bolt12": {}, + "message": { + "type": "string", + "description": "Monitor status with listpays or waitsendpay" + } + } + } + } + ] } diff --git a/doc/schemas/sendpsbt.schema.json b/doc/schemas/sendpsbt.schema.json index d8095507d..d3c831d17 100644 --- a/doc/schemas/sendpsbt.schema.json +++ b/doc/schemas/sendpsbt.schema.json @@ -1,16 +1,19 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "tx", "txid" ], - "properties": { - "tx": { - "type": "hex", - "description": "The raw transaction which was sent" - }, - "txid": { - "type": "txid", - "description": "The txid of the **tx**" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "tx", + "txid" + ], + "properties": { + "tx": { + "type": "hex", + "description": "The raw transaction which was sent" + }, + "txid": { + "type": "txid", + "description": "The txid of the **tx**" } + } } diff --git a/doc/schemas/setchannelfee.schema.json b/doc/schemas/setchannelfee.schema.json index fab668c8c..9f6113a0a 100644 --- a/doc/schemas/setchannelfee.schema.json +++ b/doc/schemas/setchannelfee.schema.json @@ -1,41 +1,48 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "base", "ppm", "channels" ], - "properties": { - "base": { - "type": "u32", - "description": "The fee_base_msat value" - }, - "ppm": { - "type": "u32", - "description": "The fee_proportional_millionths value" - }, - "channels": { - "type": "array", - "description": "channel(s) whose rate is now set", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ "peer_id", "channel_id" ], - "properties": { - "peer_id": { - "type": "pubkey", - "description": "The node_id of the peer" - }, - "channel_id": { - "type": "hex", - "description": "The channel_id of the channel", - "minLength": 64, - "maxLength": 64 - }, - "short_channel_id": { - "type": "short_channel_id", - "description": "the short_channel_id (if locked in)" - } - } - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "base", + "ppm", + "channels" + ], + "properties": { + "base": { + "type": "u32", + "description": "The fee_base_msat value" + }, + "ppm": { + "type": "u32", + "description": "The fee_proportional_millionths value" + }, + "channels": { + "type": "array", + "description": "channel(s) whose rate is now set", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "peer_id", + "channel_id" + ], + "properties": { + "peer_id": { + "type": "pubkey", + "description": "The node_id of the peer" + }, + "channel_id": { + "type": "hex", + "description": "The channel_id of the channel", + "minLength": 64, + "maxLength": 64 + }, + "short_channel_id": { + "type": "short_channel_id", + "description": "the short_channel_id (if locked in)" + } + } + } } + } } diff --git a/doc/schemas/signmessage.schema.json b/doc/schemas/signmessage.schema.json index 4c866e72f..42eea4e77 100644 --- a/doc/schemas/signmessage.schema.json +++ b/doc/schemas/signmessage.schema.json @@ -1,24 +1,28 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "signature", "recid", "zbase" ], - "properties": { - "signature": { - "type": "hex", - "description": "The signature", - "minLength": 128, - "maxLength": 128 - }, - "recid": { - "type": "hex", - "description": "The recovery id (0, 1, 2 or 3)", - "minLength": 2, - "maxLength": 2 - }, - "zbase": { - "type": "string", - "description": "*signature* and *recid* encoded in a style compatible with **lnd**'s [SignMessageRequest](https://api.lightning.community/#grpc-request-signmessagerequest)" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "signature", + "recid", + "zbase" + ], + "properties": { + "signature": { + "type": "hex", + "description": "The signature", + "minLength": 128, + "maxLength": 128 + }, + "recid": { + "type": "hex", + "description": "The recovery id (0, 1, 2 or 3)", + "minLength": 2, + "maxLength": 2 + }, + "zbase": { + "type": "string", + "description": "*signature* and *recid* encoded in a style compatible with **lnd**'s [SignMessageRequest](https://api.lightning.community/#grpc-request-signmessagerequest)" } + } } diff --git a/doc/schemas/signpsbt.schema.json b/doc/schemas/signpsbt.schema.json index f17efe201..271f58c9b 100644 --- a/doc/schemas/signpsbt.schema.json +++ b/doc/schemas/signpsbt.schema.json @@ -1,12 +1,14 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "signed_psbt" ], - "properties": { - "signed_psbt": { - "type": "string", - "description": "The fully signed PSBT" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "signed_psbt" + ], + "properties": { + "signed_psbt": { + "type": "string", + "description": "The fully signed PSBT" } + } } diff --git a/doc/schemas/stop.schema.json b/doc/schemas/stop.schema.json index b4110edf9..00105c743 100644 --- a/doc/schemas/stop.schema.json +++ b/doc/schemas/stop.schema.json @@ -1,5 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "string", - "enum": [ "Shutdown complete" ] + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "string", + "enum": [ + "Shutdown complete" + ] } diff --git a/doc/schemas/txdiscard.schema.json b/doc/schemas/txdiscard.schema.json index 33576f417..956380618 100644 --- a/doc/schemas/txdiscard.schema.json +++ b/doc/schemas/txdiscard.schema.json @@ -1,15 +1,18 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ "unsigned_tx", "txid" ], - "properties": { - "unsigned_tx": { - "type": "hex", - "description": "the unsigned transaction" - }, - "txid": { - "type": "txid", - "description": "the transaction id of *unsigned_tx*" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "unsigned_tx", + "txid" + ], + "properties": { + "unsigned_tx": { + "type": "hex", + "description": "the unsigned transaction" + }, + "txid": { + "type": "txid", + "description": "the transaction id of *unsigned_tx*" } + } } diff --git a/doc/schemas/txprepare.schema.json b/doc/schemas/txprepare.schema.json index 7ee0df8c1..2377c322c 100644 --- a/doc/schemas/txprepare.schema.json +++ b/doc/schemas/txprepare.schema.json @@ -1,19 +1,23 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ "psbt", "unsigned_tx", "txid" ], - "properties": { - "psbt": { - "type": "string", - "description": "the PSBT representing the unsigned transaction" - }, - "unsigned_tx": { - "type": "hex", - "description": "the unsigned transaction" - }, - "txid": { - "type": "txid", - "description": "the transaction id of *unsigned_tx*; you hand this to lightning-txsend(7) or lightning-txdiscard(7), as the inputs of this transaction are reserved." - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "psbt", + "unsigned_tx", + "txid" + ], + "properties": { + "psbt": { + "type": "string", + "description": "the PSBT representing the unsigned transaction" + }, + "unsigned_tx": { + "type": "hex", + "description": "the unsigned transaction" + }, + "txid": { + "type": "txid", + "description": "the transaction id of *unsigned_tx*; you hand this to lightning-txsend(7) or lightning-txdiscard(7), as the inputs of this transaction are reserved." } + } } diff --git a/doc/schemas/txsend.schema.json b/doc/schemas/txsend.schema.json index 51f87a2e8..e7a47f1ca 100644 --- a/doc/schemas/txsend.schema.json +++ b/doc/schemas/txsend.schema.json @@ -1,19 +1,23 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ "psbt", "tx", "txid" ], - "properties": { - "psbt": { - "type": "string", - "description": "the completed PSBT representing the signed transaction" - }, - "tx": { - "type": "hex", - "description": "the fully signed transaction" - }, - "txid": { - "type": "txid", - "description": "the transaction id of *tx*" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "psbt", + "tx", + "txid" + ], + "properties": { + "psbt": { + "type": "string", + "description": "the completed PSBT representing the signed transaction" + }, + "tx": { + "type": "hex", + "description": "the fully signed transaction" + }, + "txid": { + "type": "txid", + "description": "the transaction id of *tx*" } + } } diff --git a/doc/schemas/unreserveinputs.schema.json b/doc/schemas/unreserveinputs.schema.json index b81614034..264f603a2 100644 --- a/doc/schemas/unreserveinputs.schema.json +++ b/doc/schemas/unreserveinputs.schema.json @@ -1,59 +1,70 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "reservations" ], - "properties": { - "reservations": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true, - "required": [ "txid", "vout", "was_reserved", "reserved" ], - "properties": { - "txid": { - "type": "txid", - "description": "the transaction id" - }, - "vout": { - "type": "u32", - "description": "the output number which was reserved" - }, - "was_reserved": { - "type": "boolean", - "description": "whether the input was already reserved (usually `true`)" - }, - "reserved": { - "type": "boolean", - "description": "whether the input is now reserved (may still be `true` if it was reserved for a long time)" - } - }, - "allOf": [ - { - "if": { - "additionalProperties": true, - "properties": { - "reserved": { - "enum": [ true ] - } - } - }, - "then": { - "required": [ "reserved_to_block" ], - "properties": { - "txid": { }, - "vout": { }, - "was_reserved": { }, - "reserved": { }, - "reserved_to_block": { - "type": "u32", - "description": "what blockheight the reservation will expire" - } - } - } - } - ] - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "reservations" + ], + "properties": { + "reservations": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "txid", + "vout", + "was_reserved", + "reserved" + ], + "properties": { + "txid": { + "type": "txid", + "description": "the transaction id" + }, + "vout": { + "type": "u32", + "description": "the output number which was reserved" + }, + "was_reserved": { + "type": "boolean", + "description": "whether the input was already reserved (usually `true`)" + }, + "reserved": { + "type": "boolean", + "description": "whether the input is now reserved (may still be `true` if it was reserved for a long time)" + } + }, + "allOf": [ + { + "if": { + "additionalProperties": true, + "properties": { + "reserved": { + "enum": [ + true + ] + } + } + }, + "then": { + "required": [ + "reserved_to_block" + ], + "properties": { + "txid": {}, + "vout": {}, + "was_reserved": {}, + "reserved": {}, + "reserved_to_block": { + "type": "u32", + "description": "what blockheight the reservation will expire" + } + } + } + } + ] + } } + } } diff --git a/doc/schemas/utxopsbt.schema.json b/doc/schemas/utxopsbt.schema.json index 85c150239..d24ad0348 100644 --- a/doc/schemas/utxopsbt.schema.json +++ b/doc/schemas/utxopsbt.schema.json @@ -1,60 +1,73 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ "psbt", "feerate_per_kw", "estimated_final_weight", "excess_msat" ], - "properties": { - "psbt": { - "type": "string", - "description": "Unsigned PSBT which fulfills the parameters given" - }, - "feerate_per_kw": { - "type": "u32", - "description": "The feerate used to create the PSBT, in satoshis-per-kiloweight" - }, - "estimated_final_weight": { - "type": "u32", - "description": "The estimated weight of the transaction once fully signed" - }, - "excess_msat": { - "type": "msat", - "description": "The amount above *satoshi* which is available. This could be zero, or dust; it will be zero if *change_outnum* is also returned" - }, - "change_outnum": { - "type": "u32", - "description": "The 0-based output number where change was placed (only if parameter *excess_as_change* was true and there was sufficient funds)" - }, - "reservations": { - "type": "array", - "description": "If *reserve* was true or a non-zero number, just as per lightning-reserveinputs(7)", - "items": { - "type": "object", - "required": ["txid", "vout", "was_reserved", "reserved", "reserved_to_block" ], - "additionalProperties": false, - "properties": { - "txid": { - "type": "txid", - "description": "The txid of the transaction" - }, - "vout": { - "type": "u32", - "description": "The 0-based output number" - }, - "was_reserved": { - "type": "boolean", - "description": "Whether this output was previously reserved" - }, - "reserved": { - "type": "boolean", - "enum": [ true ], - "description": "Whether this output is now reserved" - }, - "reserved_to_block": { - "type": "u32", - "description": "The blockheight the reservation will expire" - } - } - } - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "psbt", + "feerate_per_kw", + "estimated_final_weight", + "excess_msat" + ], + "properties": { + "psbt": { + "type": "string", + "description": "Unsigned PSBT which fulfills the parameters given" + }, + "feerate_per_kw": { + "type": "u32", + "description": "The feerate used to create the PSBT, in satoshis-per-kiloweight" + }, + "estimated_final_weight": { + "type": "u32", + "description": "The estimated weight of the transaction once fully signed" + }, + "excess_msat": { + "type": "msat", + "description": "The amount above *satoshi* which is available. This could be zero, or dust; it will be zero if *change_outnum* is also returned" + }, + "change_outnum": { + "type": "u32", + "description": "The 0-based output number where change was placed (only if parameter *excess_as_change* was true and there was sufficient funds)" + }, + "reservations": { + "type": "array", + "description": "If *reserve* was true or a non-zero number, just as per lightning-reserveinputs(7)", + "items": { + "type": "object", + "required": [ + "txid", + "vout", + "was_reserved", + "reserved", + "reserved_to_block" + ], + "additionalProperties": false, + "properties": { + "txid": { + "type": "txid", + "description": "The txid of the transaction" + }, + "vout": { + "type": "u32", + "description": "The 0-based output number" + }, + "was_reserved": { + "type": "boolean", + "description": "Whether this output was previously reserved" + }, + "reserved": { + "type": "boolean", + "enum": [ + true + ], + "description": "Whether this output is now reserved" + }, + "reserved_to_block": { + "type": "u32", + "description": "The blockheight the reservation will expire" + } + } + } } + } } diff --git a/doc/schemas/waitanyinvoice.schema.json b/doc/schemas/waitanyinvoice.schema.json index 85ee1b6e7..8c4b9edad 100644 --- a/doc/schemas/waitanyinvoice.schema.json +++ b/doc/schemas/waitanyinvoice.schema.json @@ -1,108 +1,124 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "required": [ "label", "description", "payment_hash", "status", "expires_at" ], - "properties": { - "label": { - "type": "string", - "description": "unique label supplied at invoice creation" - }, - "description": { - "type": "string", - "description": "description used in the invoice" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "status": { - "type": "string", - "enum": [ "paid", "expired" ], - "description": "Whether it's paid or expired" - }, - "expires_at": { - "type": "u64", - "description": "UNIX timestamp of when it will become / became unpayable" - }, - "msatoshi": { - "deprecated": "true" - }, - "amount_msat": { - "type": "msat", - "description": "the amount required to pay this invoice" - }, - "bolt11": { - "type": "string", - "description": "the BOLT11 string (always present unless *bolt12* is)" - }, - "bolt12": { - "type": "string", - "description": "the BOLT12 string (always present unless *bolt11* is)" - } - }, - "allOf": [ - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "paid" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "pay_index", "amount_received_msat", "paid_at", "payment_preimage" ], - "properties": { - "label": { }, - "description": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "bolt11": { }, - "bolt12": { }, - "expires_at": { }, - "pay_index": { - "type": "u64", - "description": "Unique incrementing index for this payment" - }, - "msatoshi_received": { - "deprecated": true - }, - "amount_received_msat": { - "type": "msat", - "description": "the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)" - }, - "paid_at": { - "type": "u64", - "description": "UNIX timestamp of when it was paid" - }, - "payment_preimage": { - "type": "hex", - "description": "proof of payment", - "maxLength": 64, - "minLength": 64 - } - } - }, - "else": { - "additionalProperties": false, - "properties": { - "label": { }, - "description": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "bolt11": { }, - "bolt12": { }, - "expires_at": { } - } - } - } - ] + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "label", + "description", + "payment_hash", + "status", + "expires_at" + ], + "properties": { + "label": { + "type": "string", + "description": "unique label supplied at invoice creation" + }, + "description": { + "type": "string", + "description": "description used in the invoice" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "status": { + "type": "string", + "enum": [ + "paid", + "expired" + ], + "description": "Whether it's paid or expired" + }, + "expires_at": { + "type": "u64", + "description": "UNIX timestamp of when it will become / became unpayable" + }, + "msatoshi": { + "deprecated": "true" + }, + "amount_msat": { + "type": "msat", + "description": "the amount required to pay this invoice" + }, + "bolt11": { + "type": "string", + "description": "the BOLT11 string (always present unless *bolt12* is)" + }, + "bolt12": { + "type": "string", + "description": "the BOLT12 string (always present unless *bolt11* is)" + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "paid" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "pay_index", + "amount_received_msat", + "paid_at", + "payment_preimage" + ], + "properties": { + "label": {}, + "description": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "bolt11": {}, + "bolt12": {}, + "expires_at": {}, + "pay_index": { + "type": "u64", + "description": "Unique incrementing index for this payment" + }, + "msatoshi_received": { + "deprecated": true + }, + "amount_received_msat": { + "type": "msat", + "description": "the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)" + }, + "paid_at": { + "type": "u64", + "description": "UNIX timestamp of when it was paid" + }, + "payment_preimage": { + "type": "hex", + "description": "proof of payment", + "maxLength": 64, + "minLength": 64 + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "label": {}, + "description": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "bolt11": {}, + "bolt12": {}, + "expires_at": {} + } + } + } + ] } diff --git a/doc/schemas/waitblockheight.schema.json b/doc/schemas/waitblockheight.schema.json index 5b889377e..71fd35ca3 100644 --- a/doc/schemas/waitblockheight.schema.json +++ b/doc/schemas/waitblockheight.schema.json @@ -1,11 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ "blockheight" ], - "properties": { - "blockheight": { - "type": "u32", - "description": "The current block height (>= *blockheight* parameter)" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "blockheight" + ], + "properties": { + "blockheight": { + "type": "u32", + "description": "The current block height (>= *blockheight* parameter)" } + } } diff --git a/doc/schemas/waitinvoice.schema.json b/doc/schemas/waitinvoice.schema.json index 85ee1b6e7..8c4b9edad 100644 --- a/doc/schemas/waitinvoice.schema.json +++ b/doc/schemas/waitinvoice.schema.json @@ -1,108 +1,124 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "required": [ "label", "description", "payment_hash", "status", "expires_at" ], - "properties": { - "label": { - "type": "string", - "description": "unique label supplied at invoice creation" - }, - "description": { - "type": "string", - "description": "description used in the invoice" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "status": { - "type": "string", - "enum": [ "paid", "expired" ], - "description": "Whether it's paid or expired" - }, - "expires_at": { - "type": "u64", - "description": "UNIX timestamp of when it will become / became unpayable" - }, - "msatoshi": { - "deprecated": "true" - }, - "amount_msat": { - "type": "msat", - "description": "the amount required to pay this invoice" - }, - "bolt11": { - "type": "string", - "description": "the BOLT11 string (always present unless *bolt12* is)" - }, - "bolt12": { - "type": "string", - "description": "the BOLT12 string (always present unless *bolt11* is)" - } - }, - "allOf": [ - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "paid" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "pay_index", "amount_received_msat", "paid_at", "payment_preimage" ], - "properties": { - "label": { }, - "description": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "bolt11": { }, - "bolt12": { }, - "expires_at": { }, - "pay_index": { - "type": "u64", - "description": "Unique incrementing index for this payment" - }, - "msatoshi_received": { - "deprecated": true - }, - "amount_received_msat": { - "type": "msat", - "description": "the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)" - }, - "paid_at": { - "type": "u64", - "description": "UNIX timestamp of when it was paid" - }, - "payment_preimage": { - "type": "hex", - "description": "proof of payment", - "maxLength": 64, - "minLength": 64 - } - } - }, - "else": { - "additionalProperties": false, - "properties": { - "label": { }, - "description": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "bolt11": { }, - "bolt12": { }, - "expires_at": { } - } - } - } - ] + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "label", + "description", + "payment_hash", + "status", + "expires_at" + ], + "properties": { + "label": { + "type": "string", + "description": "unique label supplied at invoice creation" + }, + "description": { + "type": "string", + "description": "description used in the invoice" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "status": { + "type": "string", + "enum": [ + "paid", + "expired" + ], + "description": "Whether it's paid or expired" + }, + "expires_at": { + "type": "u64", + "description": "UNIX timestamp of when it will become / became unpayable" + }, + "msatoshi": { + "deprecated": "true" + }, + "amount_msat": { + "type": "msat", + "description": "the amount required to pay this invoice" + }, + "bolt11": { + "type": "string", + "description": "the BOLT11 string (always present unless *bolt12* is)" + }, + "bolt12": { + "type": "string", + "description": "the BOLT12 string (always present unless *bolt11* is)" + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "paid" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "pay_index", + "amount_received_msat", + "paid_at", + "payment_preimage" + ], + "properties": { + "label": {}, + "description": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "bolt11": {}, + "bolt12": {}, + "expires_at": {}, + "pay_index": { + "type": "u64", + "description": "Unique incrementing index for this payment" + }, + "msatoshi_received": { + "deprecated": true + }, + "amount_received_msat": { + "type": "msat", + "description": "the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)" + }, + "paid_at": { + "type": "u64", + "description": "UNIX timestamp of when it was paid" + }, + "payment_preimage": { + "type": "hex", + "description": "proof of payment", + "maxLength": 64, + "minLength": 64 + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "label": {}, + "description": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "bolt11": {}, + "bolt12": {}, + "expires_at": {} + } + } + } + ] } diff --git a/doc/schemas/waitsendpay.schema.json b/doc/schemas/waitsendpay.schema.json index 5932a9b37..853a07610 100644 --- a/doc/schemas/waitsendpay.schema.json +++ b/doc/schemas/waitsendpay.schema.json @@ -1,103 +1,115 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "required": [ "id", "payment_hash", "status", "created_at", "amount_sent_msat" ], - "properties": { - "id": { - "type": "u64", - "description": "unique ID for this payment attempt" - }, - "groupid": { - "type": "u64", - "description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" - }, - "payment_hash": { - "type": "hex", - "description": "the hash of the *payment_preimage* which will prove payment", - "maxLength": 64, - "minLength": 64 - }, - "status": { - "type": "string", - "enum": [ "complete" ], - "description": "status of the payment" - }, - "msatoshi": { - "deprecated": true - }, - "amount_msat": { - "type": "msat", - "description": "The amount delivered to destination (if known)" - }, - "destination": { - "type": "pubkey", - "description": "the final destination of the payment if known" - }, - "created_at": { - "type": "u64", - "description": "the UNIX timestamp showing when this payment was initiated" - }, - "msatoshi_sent": { - "deprecated": true - }, - "amount_sent_msat": { - "type": "msat", - "description": "The amount sent" - }, - "label": { - "type": "string", - "description": "the label, if given to sendpay" - }, - "partid": { - "type": "u64", - "description": "the *partid*, if given to sendpay" - }, - "bolt11": { - "type": "string", - "description": "the bolt11 string (if pay supplied one)" - }, - "bolt12": { - "type": "string", - "description": "the bolt12 string (if supplied for pay: **experimental-offers** only)." - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "id", + "payment_hash", + "status", + "created_at", + "amount_sent_msat" + ], + "properties": { + "id": { + "type": "u64", + "description": "unique ID for this payment attempt" }, - "allOf": [ - { - "if": { - "properties": { - "status": { - "type": "string", - "enum": [ "complete" ] - } - } - }, - "then": { - "additionalProperties": false, - "required": [ "payment_preimage" ], - "properties": { - "id": { }, - "groupid": { }, - "payment_hash": { }, - "status": { }, - "msatoshi": { }, - "amount_msat": { }, - "destination": { }, - "created_at": { }, - "msatoshi_sent": { }, - "amount_sent_msat": { }, - "label": { }, - "partid": { }, - "bolt11": { }, - "bolt12": { }, - "payment_preimage": { - "type": "hex", - "description": "the proof of payment: SHA256 of this **payment_hash**", - "maxLength": 64, - "minLength": 64 - } - } - } - } - ] + "groupid": { + "type": "u64", + "description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" + }, + "payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "status": { + "type": "string", + "enum": [ + "complete" + ], + "description": "status of the payment" + }, + "msatoshi": { + "deprecated": true + }, + "amount_msat": { + "type": "msat", + "description": "The amount delivered to destination (if known)" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment if known" + }, + "created_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "msatoshi_sent": { + "deprecated": true + }, + "amount_sent_msat": { + "type": "msat", + "description": "The amount sent" + }, + "label": { + "type": "string", + "description": "the label, if given to sendpay" + }, + "partid": { + "type": "u64", + "description": "the *partid*, if given to sendpay" + }, + "bolt11": { + "type": "string", + "description": "the bolt11 string (if pay supplied one)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string (if supplied for pay: **experimental-offers** only)." + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "complete" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "payment_preimage" + ], + "properties": { + "id": {}, + "groupid": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "partid": {}, + "bolt11": {}, + "bolt12": {}, + "payment_preimage": { + "type": "hex", + "description": "the proof of payment: SHA256 of this **payment_hash**", + "maxLength": 64, + "minLength": 64 + } + } + } + } + ] } diff --git a/doc/schemas/withdraw.schema.json b/doc/schemas/withdraw.schema.json index 3e2dbac42..3249ccf04 100644 --- a/doc/schemas/withdraw.schema.json +++ b/doc/schemas/withdraw.schema.json @@ -1,19 +1,23 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ "psbt", "tx", "txid" ], - "properties": { - "tx": { - "type": "hex", - "description": "the fully signed bitcoin transaction" - }, - "txid": { - "type": "txid", - "description": "the transaction id of *tx*" - }, - "psbt": { - "type": "string", - "description": "the PSBT representing the unsigned transaction" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "psbt", + "tx", + "txid" + ], + "properties": { + "tx": { + "type": "hex", + "description": "the fully signed bitcoin transaction" + }, + "txid": { + "type": "txid", + "description": "the transaction id of *tx*" + }, + "psbt": { + "type": "string", + "description": "the PSBT representing the unsigned transaction" } + } }