Skip to content

Commit

Permalink
doc: Lock example values
Browse files Browse the repository at this point in the history
Changelog-Added: Test script generates all RPC documentation examples now.
  • Loading branch information
ShahanaFarooqui committed Oct 22, 2024
1 parent 287a94f commit e70eeec
Show file tree
Hide file tree
Showing 107 changed files with 4,245 additions and 5,922 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ tests/node_pb2.py
tests/node_pb2_grpc.py
tests/primitives_pb2.py
tests/primitives_pb2_grpc.py
tests/autogenerate-examples-status.log
tests/autogenerate-examples.json

# Ignore unrelated stuff
.DS_Store
Expand Down
4,258 changes: 1,501 additions & 2,757 deletions contrib/msggen/msggen/schema.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions doc/schemas/lightning-addpsbtoutput.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@
}
},
"response": {
"psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEBAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbAA==",
"psbt": "cHNidP8BAgpsbt1001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101",
"estimated_added_weight": 172,
"outnum": 0
"outnum": 1
}
},
{
Expand All @@ -103,11 +103,11 @@
"method": "addpsbtoutput",
"params": [
3333333,
"cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQECAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbAAEDCNXcMgAAAAAAAQQiUSA2cYCeVGcxdSZII2urHpalr5osmF2lPbYRaw1nKyPcmQA="
"cHNidP8BAgpsbt20020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202"
]
},
"response": {
"psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQECAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbAAEDCNXcMgAAAAAAAQQiUSA2cYCeVGcxdSZII2urHpalr5osmF2lPbYRaw1nKyPcmQA=",
"psbt": "cHNidP8BAgpsbt20020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202",
"estimated_added_weight": 172,
"outnum": 1
}
Expand All @@ -118,14 +118,14 @@
"method": "addpsbtoutput",
"params": {
"satoshi": 3333333,
"initialpsbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQECAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbAAEDCNXcMgAAAAAAAQQiUSA2cYCeVGcxdSZII2urHpalr5osmF2lPbYRaw1nKyPcmQA=",
"destination": "bcrt1p52spc7t99z0wu444elxahxzkcu86gakzvnfp7ugudf567am2uspsuneuq9"
"initialpsbt": "cHNidP8BAgpsbt20020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202",
"destination": "bcrt1p5201010101010101010101010101010101010101010101010101010101"
}
},
"response": {
"psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEDAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbAAEDCNXcMgAAAAAAAQQiUSA2cYCeVGcxdSZII2urHpalr5osmF2lPbYRaw1nKyPcmQABAwjV3DIAAAAAAAEEIlEgoqAceWUonu5Wtc/N25hWxw+kdsJk0h9xHGppr3dq5AMA",
"psbt": "cHNidP8BAgpsbt300303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303",
"estimated_added_weight": 172,
"outnum": 2
"outnum": 1
}
}
]
Expand Down
12 changes: 12 additions & 0 deletions doc/schemas/lightning-askrene-listlayers.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,17 @@
],
"resources": [
"Main web site: <https://github.com/ElementsProject/lightning>"
],
"examples": [
{
"request": {
"id": "example:askrene-listlayers#1",
"method": "askrene-listlayers",
"params": {}
},
"response": {
"layers": []
}
}
]
}
18 changes: 9 additions & 9 deletions doc/schemas/lightning-bkpr-channelsapy.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@
"response": {
"channels_apy": [
{
"account": "252d1b0a1e57895e84137f28cf19ab2c35847e284c112fefdecc7afeaa5c1de7",
"account": "channelid0120000120000120000120000120000120000120000120000120000",
"routed_out_msat": 1000000,
"routed_in_msat": 510081208,
"routed_in_msat": 510481208,
"lease_fee_paid_msat": 0,
"lease_fee_earned_msat": 0,
"pushed_out_msat": 0,
Expand All @@ -226,15 +226,15 @@
"fees_out_msat": 0,
"fees_in_msat": 106,
"utilization_out": "0.1000%",
"utilization_in": "51.0081%",
"utilization_in_initial": "51.0081%",
"utilization_in": "51.0481%",
"utilization_in_initial": "51.0481%",
"apy_out": "0.0000%",
"apy_in": "0.0252%",
"apy_in_initial": "0.0252%",
"apy_total": "0.0252%"
},
{
"account": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2",
"account": "channelid0230000230000230000230000230000230000230000230000230000",
"routed_out_msat": 510181102,
"routed_in_msat": 0,
"lease_fee_paid_msat": 0,
Expand All @@ -255,7 +255,7 @@
"apy_total_initial": "0.0505%"
},
{
"account": "f8fc83a432cbfb2fffe222cc06727fdd977b5dd10ebd6707158e799e6f522d9f",
"account": "channelid0250000250000250000250000250000250000250000250000250000",
"routed_out_msat": 500000000,
"routed_in_msat": 0,
"lease_fee_paid_msat": 0,
Expand All @@ -278,7 +278,7 @@
{
"account": "net",
"routed_out_msat": 1011181102,
"routed_in_msat": 510081208,
"routed_in_msat": 510481208,
"lease_fee_paid_msat": 0,
"lease_fee_earned_msat": 0,
"pushed_out_msat": 0,
Expand All @@ -289,8 +289,8 @@
"fees_in_msat": 106,
"utilization_out": "33.7060%",
"utilization_out_initial": "50.5591%",
"utilization_in": "17.0027%",
"utilization_in_initial": "51.0081%",
"utilization_in": "17.0160%",
"utilization_in_initial": "51.0481%",
"apy_out": "0.0084%",
"apy_out_initial": "0.0126%",
"apy_in": "0.0084%",
Expand Down
39 changes: 6 additions & 33 deletions doc/schemas/lightning-bkpr-inspect.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,50 +212,23 @@
"id": "example:bkpr-inspect#1",
"method": "bkpr-inspect",
"params": {
"account": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2"
"account": "channelid0230200230200230200230200230200230200230200230200230200"
}
},
"response": {
"txs": [
{
"txid": "cd23f0517eefc27194981253eb07b19b055246df77033e052c66eaf2bbb00483",
"blockheight": 111,
"fees_paid_msat": 4927000,
"txid": "channeltxid230200230200230200230200230200230200230200230200230200",
"blockheight": 123,
"fees_paid_msat": 5020000,
"outputs": [
{
"account": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2",
"outnum": 0,
"account": "channelid0230200230200230200230200230200230200230200230200230200",
"outnum": 1,
"output_tag": "channel_open",
"output_value_msat": 1000000000,
"credit_msat": 1000000000,
"currency": "bcrt",
"spend_tag": "channel_close",
"spending_txid": "70e0466dc2e74f25afe38df6a85d5e8857079873a6d5eda4732806a7ac427305",
"debit_msat": 489818898
}
]
},
{
"txid": "70e0466dc2e74f25afe38df6a85d5e8857079873a6d5eda4732806a7ac427305",
"blockheight": 121,
"fees_paid_msat": 2895898,
"outputs": [
{
"account": "wallet",
"outnum": 0,
"output_tag": "deposit",
"output_value_msat": 486923000,
"credit_msat": 486923000,
"currency": "bcrt"
},
{
"account": "external",
"outnum": 1,
"output_tag": "to_them",
"output_value_msat": 510181000,
"credit_msat": 510181000,
"currency": "bcrt",
"originating_account": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2"
}
]
}
Expand Down
Loading

0 comments on commit e70eeec

Please sign in to comment.