1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenSeedRequest {
    ///*
    ///aezeed_passphrase is an optional user provided passphrase that will be used
    ///to encrypt the generated aezeed cipher seed. When using REST, this field
    ///must be encoded as base64.
    #[prost(bytes, tag = "1")]
    pub aezeed_passphrase: std::vec::Vec<u8>,
    ///*
    ///seed_entropy is an optional 16-bytes generated via CSPRNG. If not
    ///specified, then a fresh set of randomness will be used to create the seed.
    ///When using REST, this field must be encoded as base64.
    #[prost(bytes, tag = "2")]
    pub seed_entropy: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenSeedResponse {
    ///*
    ///cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed
    ///cipher seed obtained by the user. This field is optional, as if not
    ///provided, then the daemon will generate a new cipher seed for the user.
    ///Otherwise, then the daemon will attempt to recover the wallet state linked
    ///to this cipher seed.
    #[prost(string, repeated, tag = "1")]
    pub cipher_seed_mnemonic: ::std::vec::Vec<std::string::String>,
    ///*
    ///enciphered_seed are the raw aezeed cipher seed bytes. This is the raw
    ///cipher text before run through our mnemonic encoding scheme.
    #[prost(bytes, tag = "2")]
    pub enciphered_seed: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InitWalletRequest {
    ///*
    ///wallet_password is the passphrase that should be used to encrypt the
    ///wallet. This MUST be at least 8 chars in length. After creation, this
    ///password is required to unlock the daemon. When using REST, this field
    ///must be encoded as base64.
    #[prost(bytes, tag = "1")]
    pub wallet_password: std::vec::Vec<u8>,
    ///*
    ///cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed
    ///cipher seed obtained by the user. This may have been generated by the
    ///GenSeed method, or be an existing seed.
    #[prost(string, repeated, tag = "2")]
    pub cipher_seed_mnemonic: ::std::vec::Vec<std::string::String>,
    ///*
    ///aezeed_passphrase is an optional user provided passphrase that will be used
    ///to encrypt the generated aezeed cipher seed. When using REST, this field
    ///must be encoded as base64.
    #[prost(bytes, tag = "3")]
    pub aezeed_passphrase: std::vec::Vec<u8>,
    ///*
    ///recovery_window is an optional argument specifying the address lookahead
    ///when restoring a wallet seed. The recovery window applies to each
    ///individual branch of the BIP44 derivation paths. Supplying a recovery
    ///window of zero indicates that no addresses should be recovered, such after
    ///the first initialization of the wallet.
    #[prost(int32, tag = "4")]
    pub recovery_window: i32,
    ///*
    ///channel_backups is an optional argument that allows clients to recover the
    ///settled funds within a set of channels. This should be populated if the
    ///user was unable to close out all channels and sweep funds before partial or
    ///total data loss occurred. If specified, then after on-chain recovery of
    ///funds, lnd begin to carry out the data loss recovery protocol in order to
    ///recover the funds in each channel from a remote force closed transaction.
    #[prost(message, optional, tag = "5")]
    pub channel_backups: ::std::option::Option<ChanBackupSnapshot>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InitWalletResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnlockWalletRequest {
    ///*
    ///wallet_password should be the current valid passphrase for the daemon. This
    ///will be required to decrypt on-disk material that the daemon requires to
    ///function properly. When using REST, this field must be encoded as base64.
    #[prost(bytes, tag = "1")]
    pub wallet_password: std::vec::Vec<u8>,
    ///*
    ///recovery_window is an optional argument specifying the address lookahead
    ///when restoring a wallet seed. The recovery window applies to each
    ///individual branch of the BIP44 derivation paths. Supplying a recovery
    ///window of zero indicates that no addresses should be recovered, such after
    ///the first initialization of the wallet.
    #[prost(int32, tag = "2")]
    pub recovery_window: i32,
    ///*
    ///channel_backups is an optional argument that allows clients to recover the
    ///settled funds within a set of channels. This should be populated if the
    ///user was unable to close out all channels and sweep funds before partial or
    ///total data loss occurred. If specified, then after on-chain recovery of
    ///funds, lnd begin to carry out the data loss recovery protocol in order to
    ///recover the funds in each channel from a remote force closed transaction.
    #[prost(message, optional, tag = "3")]
    pub channel_backups: ::std::option::Option<ChanBackupSnapshot>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnlockWalletResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangePasswordRequest {
    ///*
    ///current_password should be the current valid passphrase used to unlock the
    ///daemon. When using REST, this field must be encoded as base64.
    #[prost(bytes, tag = "1")]
    pub current_password: std::vec::Vec<u8>,
    ///*
    ///new_password should be the new passphrase that will be needed to unlock the
    ///daemon. When using REST, this field must be encoded as base64.
    #[prost(bytes, tag = "2")]
    pub new_password: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangePasswordResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Utxo {
    //// The type of address
    #[prost(enumeration = "AddressType", tag = "1")]
    pub address_type: i32,
    //// The address
    #[prost(string, tag = "2")]
    pub address: std::string::String,
    //// The value of the unspent coin in satoshis
    #[prost(int64, tag = "3")]
    pub amount_sat: i64,
    //// The pkscript in hex
    #[prost(string, tag = "4")]
    pub pk_script: std::string::String,
    //// The outpoint in format txid:n
    #[prost(message, optional, tag = "5")]
    pub outpoint: ::std::option::Option<OutPoint>,
    //// The number of confirmations for the Utxo
    #[prost(int64, tag = "6")]
    pub confirmations: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Transaction {
    //// The transaction hash
    #[prost(string, tag = "1")]
    pub tx_hash: std::string::String,
    //// The transaction amount, denominated in satoshis
    #[prost(int64, tag = "2")]
    pub amount: i64,
    //// The number of confirmations
    #[prost(int32, tag = "3")]
    pub num_confirmations: i32,
    //// The hash of the block this transaction was included in
    #[prost(string, tag = "4")]
    pub block_hash: std::string::String,
    //// The height of the block this transaction was included in
    #[prost(int32, tag = "5")]
    pub block_height: i32,
    //// Timestamp of this transaction
    #[prost(int64, tag = "6")]
    pub time_stamp: i64,
    //// Fees paid for this transaction
    #[prost(int64, tag = "7")]
    pub total_fees: i64,
    //// Addresses that received funds for this transaction
    #[prost(string, repeated, tag = "8")]
    pub dest_addresses: ::std::vec::Vec<std::string::String>,
    //// The raw transaction hex.
    #[prost(string, tag = "9")]
    pub raw_tx_hex: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTransactionsRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionDetails {
    //// The list of transactions relevant to the wallet.
    #[prost(message, repeated, tag = "1")]
    pub transactions: ::std::vec::Vec<Transaction>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeeLimit {
    #[prost(oneof = "fee_limit::Limit", tags = "1, 3, 2")]
    pub limit: ::std::option::Option<fee_limit::Limit>,
}
pub mod fee_limit {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Limit {
        ///*
        ///The fee limit expressed as a fixed amount of satoshis.
        ///
        ///The fields fixed and fixed_msat are mutually exclusive.
        #[prost(int64, tag = "1")]
        Fixed(i64),
        ///*
        ///The fee limit expressed as a fixed amount of millisatoshis.
        ///
        ///The fields fixed and fixed_msat are mutually exclusive.
        #[prost(int64, tag = "3")]
        FixedMsat(i64),
        //// The fee limit expressed as a percentage of the payment amount.
        #[prost(int64, tag = "2")]
        Percent(i64),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendRequest {
    ///*
    ///The identity pubkey of the payment recipient. When using REST, this field
    ///must be encoded as base64.
    #[prost(bytes, tag = "1")]
    pub dest: std::vec::Vec<u8>,
    ///*
    ///The hex-encoded identity pubkey of the payment recipient. Deprecated now
    ///that the REST gateway supports base64 encoding of bytes fields.
    #[prost(string, tag = "2")]
    pub dest_string: std::string::String,
    ///*
    ///The amount to send expressed in satoshis.
    ///
    ///The fields amt and amt_msat are mutually exclusive.
    #[prost(int64, tag = "3")]
    pub amt: i64,
    ///*
    ///The amount to send expressed in millisatoshis.
    ///
    ///The fields amt and amt_msat are mutually exclusive.
    #[prost(int64, tag = "12")]
    pub amt_msat: i64,
    ///*
    ///The hash to use within the payment's HTLC. When using REST, this field
    ///must be encoded as base64.
    #[prost(bytes, tag = "4")]
    pub payment_hash: std::vec::Vec<u8>,
    ///*
    ///The hex-encoded hash to use within the payment's HTLC. Deprecated now
    ///that the REST gateway supports base64 encoding of bytes fields.
    #[prost(string, tag = "5")]
    pub payment_hash_string: std::string::String,
    ///*
    ///A bare-bones invoice for a payment within the Lightning Network. With the
    ///details of the invoice, the sender has all the data necessary to send a
    ///payment to the recipient.
    #[prost(string, tag = "6")]
    pub payment_request: std::string::String,
    ///*
    ///The CLTV delta from the current height that should be used to set the
    ///timelock for the final hop.
    #[prost(int32, tag = "7")]
    pub final_cltv_delta: i32,
    ///*
    ///The maximum number of satoshis that will be paid as a fee of the payment.
    ///This value can be represented either as a percentage of the amount being
    ///sent, or as a fixed amount of the maximum fee the user is willing the pay to
    ///send the payment.
    #[prost(message, optional, tag = "8")]
    pub fee_limit: ::std::option::Option<FeeLimit>,
    ///*
    ///The channel id of the channel that must be taken to the first hop. If zero,
    ///any channel may be used.
    #[prost(uint64, tag = "9")]
    pub outgoing_chan_id: u64,
    ///*
    ///The pubkey of the last hop of the route. If empty, any hop may be used.
    #[prost(bytes, tag = "13")]
    pub last_hop_pubkey: std::vec::Vec<u8>,
    ///*
    ///An optional maximum total time lock for the route. This should not exceed
    ///lnd's `--max-cltv-expiry` setting. If zero, then the value of
    ///`--max-cltv-expiry` is enforced.
    #[prost(uint32, tag = "10")]
    pub cltv_limit: u32,
    ///*
    ///An optional field that can be used to pass an arbitrary set of TLV records
    ///to a peer which understands the new records. This can be used to pass
    ///application specific data during the payment attempt. Record types are
    ///required to be in the custom range >= 65536. When using REST, the values
    ///must be encoded as base64.
    #[prost(map = "uint64, bytes", tag = "11")]
    pub dest_custom_records: ::std::collections::HashMap<u64, std::vec::Vec<u8>>,
    //// If set, circular payments to self are permitted.
    #[prost(bool, tag = "14")]
    pub allow_self_payment: bool,
    ///*
    ///Features assumed to be supported by the final node. All transitive feature
    ///dependencies must also be set properly. For a given feature bit pair, either
    ///optional or remote may be set, but not both. If this field is nil or empty,
    ///the router will try to load destination features from the graph as a
    ///fallback.
    #[prost(enumeration = "FeatureBit", repeated, tag = "15")]
    pub dest_features: ::std::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendResponse {
    #[prost(string, tag = "1")]
    pub payment_error: std::string::String,
    #[prost(bytes, tag = "2")]
    pub payment_preimage: std::vec::Vec<u8>,
    #[prost(message, optional, tag = "3")]
    pub payment_route: ::std::option::Option<Route>,
    #[prost(bytes, tag = "4")]
    pub payment_hash: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendToRouteRequest {
    ///*
    ///The payment hash to use for the HTLC. When using REST, this field must be
    ///encoded as base64.
    #[prost(bytes, tag = "1")]
    pub payment_hash: std::vec::Vec<u8>,
    ///*
    ///An optional hex-encoded payment hash to be used for the HTLC. Deprecated now
    ///that the REST gateway supports base64 encoding of bytes fields.
    #[prost(string, tag = "2")]
    pub payment_hash_string: std::string::String,
    //// Route that should be used to attempt to complete the payment.
    #[prost(message, optional, tag = "4")]
    pub route: ::std::option::Option<Route>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelAcceptRequest {
    //// The pubkey of the node that wishes to open an inbound channel.
    #[prost(bytes, tag = "1")]
    pub node_pubkey: std::vec::Vec<u8>,
    //// The hash of the genesis block that the proposed channel resides in.
    #[prost(bytes, tag = "2")]
    pub chain_hash: std::vec::Vec<u8>,
    //// The pending channel id.
    #[prost(bytes, tag = "3")]
    pub pending_chan_id: std::vec::Vec<u8>,
    //// The funding amount in satoshis that initiator wishes to use in the
    //// channel.
    #[prost(uint64, tag = "4")]
    pub funding_amt: u64,
    //// The push amount of the proposed channel in millisatoshis.
    #[prost(uint64, tag = "5")]
    pub push_amt: u64,
    //// The dust limit of the initiator's commitment tx.
    #[prost(uint64, tag = "6")]
    pub dust_limit: u64,
    //// The maximum amount of coins in millisatoshis that can be pending in this
    //// channel.
    #[prost(uint64, tag = "7")]
    pub max_value_in_flight: u64,
    //// The minimum amount of satoshis the initiator requires us to have at all
    //// times.
    #[prost(uint64, tag = "8")]
    pub channel_reserve: u64,
    //// The smallest HTLC in millisatoshis that the initiator will accept.
    #[prost(uint64, tag = "9")]
    pub min_htlc: u64,
    //// The initial fee rate that the initiator suggests for both commitment
    //// transactions.
    #[prost(uint64, tag = "10")]
    pub fee_per_kw: u64,
    ///*
    ///The number of blocks to use for the relative time lock in the pay-to-self
    ///output of both commitment transactions.
    #[prost(uint32, tag = "11")]
    pub csv_delay: u32,
    //// The total number of incoming HTLC's that the initiator will accept.
    #[prost(uint32, tag = "12")]
    pub max_accepted_htlcs: u32,
    //// A bit-field which the initiator uses to specify proposed channel
    //// behavior.
    #[prost(uint32, tag = "13")]
    pub channel_flags: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelAcceptResponse {
    //// Whether or not the client accepts the channel.
    #[prost(bool, tag = "1")]
    pub accept: bool,
    //// The pending channel id to which this response applies.
    #[prost(bytes, tag = "2")]
    pub pending_chan_id: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelPoint {
    //// The index of the output of the funding transaction
    #[prost(uint32, tag = "3")]
    pub output_index: u32,
    #[prost(oneof = "channel_point::FundingTxid", tags = "1, 2")]
    pub funding_txid: ::std::option::Option<channel_point::FundingTxid>,
}
pub mod channel_point {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum FundingTxid {
        ///*
        ///Txid of the funding transaction. When using REST, this field must be
        ///encoded as base64.
        #[prost(bytes, tag = "1")]
        FundingTxidBytes(std::vec::Vec<u8>),
        ///*
        ///Hex-encoded string representing the byte-reversed hash of the funding
        ///transaction.
        #[prost(string, tag = "2")]
        FundingTxidStr(std::string::String),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutPoint {
    //// Raw bytes representing the transaction id.
    #[prost(bytes, tag = "1")]
    pub txid_bytes: std::vec::Vec<u8>,
    //// Reversed, hex-encoded string representing the transaction id.
    #[prost(string, tag = "2")]
    pub txid_str: std::string::String,
    //// The index of the output on the transaction.
    #[prost(uint32, tag = "3")]
    pub output_index: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LightningAddress {
    //// The identity pubkey of the Lightning node
    #[prost(string, tag = "1")]
    pub pubkey: std::string::String,
    //// The network location of the lightning node, e.g. `69.69.69.69:1337` or
    //// `localhost:10011`
    #[prost(string, tag = "2")]
    pub host: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EstimateFeeRequest {
    //// The map from addresses to amounts for the transaction.
    #[prost(map = "string, int64", tag = "1")]
    pub addr_to_amount: ::std::collections::HashMap<std::string::String, i64>,
    //// The target number of blocks that this transaction should be confirmed
    //// by.
    #[prost(int32, tag = "2")]
    pub target_conf: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EstimateFeeResponse {
    //// The total fee in satoshis.
    #[prost(int64, tag = "1")]
    pub fee_sat: i64,
    //// The fee rate in satoshi/byte.
    #[prost(int64, tag = "2")]
    pub feerate_sat_per_byte: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendManyRequest {
    //// The map from addresses to amounts
    #[prost(map = "string, int64", tag = "1")]
    pub addr_to_amount: ::std::collections::HashMap<std::string::String, i64>,
    //// The target number of blocks that this transaction should be confirmed
    //// by.
    #[prost(int32, tag = "3")]
    pub target_conf: i32,
    //// A manual fee rate set in sat/byte that should be used when crafting the
    //// transaction.
    #[prost(int64, tag = "5")]
    pub sat_per_byte: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendManyResponse {
    //// The id of the transaction
    #[prost(string, tag = "1")]
    pub txid: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendCoinsRequest {
    //// The address to send coins to
    #[prost(string, tag = "1")]
    pub addr: std::string::String,
    //// The amount in satoshis to send
    #[prost(int64, tag = "2")]
    pub amount: i64,
    //// The target number of blocks that this transaction should be confirmed
    //// by.
    #[prost(int32, tag = "3")]
    pub target_conf: i32,
    //// A manual fee rate set in sat/byte that should be used when crafting the
    //// transaction.
    #[prost(int64, tag = "5")]
    pub sat_per_byte: i64,
    ///*
    ///If set, then the amount field will be ignored, and lnd will attempt to
    ///send all the coins under control of the internal wallet to the specified
    ///address.
    #[prost(bool, tag = "6")]
    pub send_all: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendCoinsResponse {
    //// The transaction ID of the transaction
    #[prost(string, tag = "1")]
    pub txid: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListUnspentRequest {
    //// The minimum number of confirmations to be included.
    #[prost(int32, tag = "1")]
    pub min_confs: i32,
    //// The maximum number of confirmations to be included.
    #[prost(int32, tag = "2")]
    pub max_confs: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListUnspentResponse {
    //// A list of utxos
    #[prost(message, repeated, tag = "1")]
    pub utxos: ::std::vec::Vec<Utxo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewAddressRequest {
    //// The address type
    #[prost(enumeration = "AddressType", tag = "1")]
    pub r#type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewAddressResponse {
    //// The newly generated wallet address
    #[prost(string, tag = "1")]
    pub address: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignMessageRequest {
    ///*
    ///The message to be signed. When using REST, this field must be encoded as
    ///base64.
    #[prost(bytes, tag = "1")]
    pub msg: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignMessageResponse {
    //// The signature for the given message
    #[prost(string, tag = "1")]
    pub signature: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerifyMessageRequest {
    ///*
    ///The message over which the signature is to be verified. When using REST,
    ///this field must be encoded as base64.
    #[prost(bytes, tag = "1")]
    pub msg: std::vec::Vec<u8>,
    //// The signature to be verified over the given message
    #[prost(string, tag = "2")]
    pub signature: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerifyMessageResponse {
    //// Whether the signature was valid over the given message
    #[prost(bool, tag = "1")]
    pub valid: bool,
    //// The pubkey recovered from the signature
    #[prost(string, tag = "2")]
    pub pubkey: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectPeerRequest {
    //// Lightning address of the peer, in the format `<pubkey>@host`
    #[prost(message, optional, tag = "1")]
    pub addr: ::std::option::Option<LightningAddress>,
    ///* If set, the daemon will attempt to persistently connect to the target
    /// peer. Otherwise, the call will be synchronous.
    #[prost(bool, tag = "2")]
    pub perm: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectPeerResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DisconnectPeerRequest {
    //// The pubkey of the node to disconnect from
    #[prost(string, tag = "1")]
    pub pub_key: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DisconnectPeerResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Htlc {
    #[prost(bool, tag = "1")]
    pub incoming: bool,
    #[prost(int64, tag = "2")]
    pub amount: i64,
    #[prost(bytes, tag = "3")]
    pub hash_lock: std::vec::Vec<u8>,
    #[prost(uint32, tag = "4")]
    pub expiration_height: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Channel {
    //// Whether this channel is active or not
    #[prost(bool, tag = "1")]
    pub active: bool,
    //// The identity pubkey of the remote node
    #[prost(string, tag = "2")]
    pub remote_pubkey: std::string::String,
    ///*
    ///The outpoint (txid:index) of the funding transaction. With this value, Bob
    ///will be able to generate a signature for Alice's version of the commitment
    ///transaction.
    #[prost(string, tag = "3")]
    pub channel_point: std::string::String,
    ///*
    ///The unique channel ID for the channel. The first 3 bytes are the block
    ///height, the next 3 the index within the block, and the last 2 bytes are the
    ///output index for the channel.
    #[prost(uint64, tag = "4")]
    pub chan_id: u64,
    //// The total amount of funds held in this channel
    #[prost(int64, tag = "5")]
    pub capacity: i64,
    //// This node's current balance in this channel
    #[prost(int64, tag = "6")]
    pub local_balance: i64,
    //// The counterparty's current balance in this channel
    #[prost(int64, tag = "7")]
    pub remote_balance: i64,
    ///*
    ///The amount calculated to be paid in fees for the current set of commitment
    ///transactions. The fee amount is persisted with the channel in order to
    ///allow the fee amount to be removed and recalculated with each channel state
    ///update, including updates that happen after a system restart.
    #[prost(int64, tag = "8")]
    pub commit_fee: i64,
    //// The weight of the commitment transaction
    #[prost(int64, tag = "9")]
    pub commit_weight: i64,
    ///*
    ///The required number of satoshis per kilo-weight that the requester will pay
    ///at all times, for both the funding transaction and commitment transaction.
    ///This value can later be updated once the channel is open.
    #[prost(int64, tag = "10")]
    pub fee_per_kw: i64,
    //// The unsettled balance in this channel
    #[prost(int64, tag = "11")]
    pub unsettled_balance: i64,
    ///*
    ///The total number of satoshis we've sent within this channel.
    #[prost(int64, tag = "12")]
    pub total_satoshis_sent: i64,
    ///*
    ///The total number of satoshis we've received within this channel.
    #[prost(int64, tag = "13")]
    pub total_satoshis_received: i64,
    ///*
    ///The total number of updates conducted within this channel.
    #[prost(uint64, tag = "14")]
    pub num_updates: u64,
    ///*
    ///The list of active, uncleared HTLCs currently pending within the channel.
    #[prost(message, repeated, tag = "15")]
    pub pending_htlcs: ::std::vec::Vec<Htlc>,
    ///*
    ///The CSV delay expressed in relative blocks. If the channel is force closed,
    ///we will need to wait for this many blocks before we can regain our funds.
    #[prost(uint32, tag = "16")]
    pub csv_delay: u32,
    //// Whether this channel is advertised to the network or not.
    #[prost(bool, tag = "17")]
    pub private: bool,
    //// True if we were the ones that created the channel.
    #[prost(bool, tag = "18")]
    pub initiator: bool,
    //// A set of flags showing the current state of the channel.
    #[prost(string, tag = "19")]
    pub chan_status_flags: std::string::String,
    //// The minimum satoshis this node is required to reserve in its balance.
    #[prost(int64, tag = "20")]
    pub local_chan_reserve_sat: i64,
    ///*
    ///The minimum satoshis the other node is required to reserve in its balance.
    #[prost(int64, tag = "21")]
    pub remote_chan_reserve_sat: i64,
    //// Deprecated. Use commitment_type.
    #[prost(bool, tag = "22")]
    pub static_remote_key: bool,
    //// The commitment type used by this channel.
    #[prost(enumeration = "CommitmentType", tag = "26")]
    pub commitment_type: i32,
    ///*
    ///The number of seconds that the channel has been monitored by the channel
    ///scoring system. Scores are currently not persisted, so this value may be
    ///less than the lifetime of the channel [EXPERIMENTAL].
    #[prost(int64, tag = "23")]
    pub lifetime: i64,
    ///*
    ///The number of seconds that the remote peer has been observed as being online
    ///by the channel scoring system over the lifetime of the channel
    ///[EXPERIMENTAL].
    #[prost(int64, tag = "24")]
    pub uptime: i64,
    ///*
    ///Close address is the address that we will enforce payout to on cooperative
    ///close if the channel was opened utilizing option upfront shutdown. This
    ///value can be set on channel open by setting close_address in an open channel
    ///request. If this value is not set, you can still choose a payout address by
    ///cooperatively closing with the delivery_address field set.
    #[prost(string, tag = "25")]
    pub close_address: std::string::String,
    ///
    ///The amount that the initiator of the channel optionally pushed to the remote
    ///party on channel open. This amount will be zero if the channel initiator did
    ///not push any funds to the remote peer. If the initiator field is true, we
    ///pushed this amount to our peer, if it is false, the remote peer pushed this
    ///amount to us.
    #[prost(uint64, tag = "27")]
    pub push_amount_sat: u64,
    ///*
    ///This uint32 indicates if this channel is to be considered 'frozen'. A
    ///frozen channel doest not allow a cooperative channel close by the
    ///initiator. The thaw_height is the height that this restriction stops
    ///applying to the channel. This field is optional, not setting it or using a
    ///value of zero will mean the channel has no additional restrictions.
    #[prost(uint32, tag = "28")]
    pub thaw_height: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListChannelsRequest {
    #[prost(bool, tag = "1")]
    pub active_only: bool,
    #[prost(bool, tag = "2")]
    pub inactive_only: bool,
    #[prost(bool, tag = "3")]
    pub public_only: bool,
    #[prost(bool, tag = "4")]
    pub private_only: bool,
    ///*
    ///Filters the response for channels with a target peer's pubkey. If peer is
    ///empty, all channels will be returned.
    #[prost(bytes, tag = "5")]
    pub peer: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListChannelsResponse {
    //// The list of active channels
    #[prost(message, repeated, tag = "11")]
    pub channels: ::std::vec::Vec<Channel>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelCloseSummary {
    //// The outpoint (txid:index) of the funding transaction.
    #[prost(string, tag = "1")]
    pub channel_point: std::string::String,
    ////  The unique channel ID for the channel.
    #[prost(uint64, tag = "2")]
    pub chan_id: u64,
    //// The hash of the genesis block that this channel resides within.
    #[prost(string, tag = "3")]
    pub chain_hash: std::string::String,
    //// The txid of the transaction which ultimately closed this channel.
    #[prost(string, tag = "4")]
    pub closing_tx_hash: std::string::String,
    //// Public key of the remote peer that we formerly had a channel with.
    #[prost(string, tag = "5")]
    pub remote_pubkey: std::string::String,
    //// Total capacity of the channel.
    #[prost(int64, tag = "6")]
    pub capacity: i64,
    //// Height at which the funding transaction was spent.
    #[prost(uint32, tag = "7")]
    pub close_height: u32,
    //// Settled balance at the time of channel closure
    #[prost(int64, tag = "8")]
    pub settled_balance: i64,
    //// The sum of all the time-locked outputs at the time of channel closure
    #[prost(int64, tag = "9")]
    pub time_locked_balance: i64,
    //// Details on how the channel was closed.
    #[prost(enumeration = "channel_close_summary::ClosureType", tag = "10")]
    pub close_type: i32,
    ///*
    ///Open initiator is the party that initiated opening the channel. Note that
    ///this value may be unknown if the channel was closed before we migrated to
    ///store open channel information after close.
    #[prost(enumeration = "Initiator", tag = "11")]
    pub open_initiator: i32,
    ///*
    ///Close initiator indicates which party initiated the close. This value will
    ///be unknown for channels that were cooperatively closed before we started
    ///tracking cooperative close initiators. Note that this indicates which party
    ///initiated a close, and it is possible for both to initiate cooperative or
    ///force closes, although only one party's close will be confirmed on chain.
    #[prost(enumeration = "Initiator", tag = "12")]
    pub close_initiator: i32,
}
pub mod channel_close_summary {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum ClosureType {
        CooperativeClose = 0,
        LocalForceClose = 1,
        RemoteForceClose = 2,
        BreachClose = 3,
        FundingCanceled = 4,
        Abandoned = 5,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClosedChannelsRequest {
    #[prost(bool, tag = "1")]
    pub cooperative: bool,
    #[prost(bool, tag = "2")]
    pub local_force: bool,
    #[prost(bool, tag = "3")]
    pub remote_force: bool,
    #[prost(bool, tag = "4")]
    pub breach: bool,
    #[prost(bool, tag = "5")]
    pub funding_canceled: bool,
    #[prost(bool, tag = "6")]
    pub abandoned: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClosedChannelsResponse {
    #[prost(message, repeated, tag = "1")]
    pub channels: ::std::vec::Vec<ChannelCloseSummary>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Peer {
    //// The identity pubkey of the peer
    #[prost(string, tag = "1")]
    pub pub_key: std::string::String,
    //// Network address of the peer; eg `127.0.0.1:10011`
    #[prost(string, tag = "3")]
    pub address: std::string::String,
    //// Bytes of data transmitted to this peer
    #[prost(uint64, tag = "4")]
    pub bytes_sent: u64,
    //// Bytes of data transmitted from this peer
    #[prost(uint64, tag = "5")]
    pub bytes_recv: u64,
    //// Satoshis sent to this peer
    #[prost(int64, tag = "6")]
    pub sat_sent: i64,
    //// Satoshis received from this peer
    #[prost(int64, tag = "7")]
    pub sat_recv: i64,
    //// A channel is inbound if the counterparty initiated the channel
    #[prost(bool, tag = "8")]
    pub inbound: bool,
    //// Ping time to this peer
    #[prost(int64, tag = "9")]
    pub ping_time: i64,
    /// The type of sync we are currently performing with this peer.
    #[prost(enumeration = "peer::SyncType", tag = "10")]
    pub sync_type: i32,
    //// Features advertised by the remote peer in their init message.
    #[prost(map = "uint32, message", tag = "11")]
    pub features: ::std::collections::HashMap<u32, Feature>,
    ///
    ///The latest errors received from our peer with timestamps, limited to the 10
    ///most recent errors. These errors are tracked across peer connections, but
    ///are not persisted across lnd restarts. Note that these errors are only
    ///stored for peers that we have channels open with, to prevent peers from
    ///spamming us with errors at no cost.
    #[prost(message, repeated, tag = "12")]
    pub errors: ::std::vec::Vec<TimestampedError>,
}
pub mod peer {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum SyncType {
        ///*
        ///Denotes that we cannot determine the peer's current sync type.
        UnknownSync = 0,
        ///*
        ///Denotes that we are actively receiving new graph updates from the peer.
        ActiveSync = 1,
        ///*
        ///Denotes that we are not receiving new graph updates from the peer.
        PassiveSync = 2,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimestampedError {
    /// The unix timestamp in seconds when the error occurred.
    #[prost(uint64, tag = "1")]
    pub timestamp: u64,
    /// The string representation of the error sent by our peer.
    #[prost(string, tag = "2")]
    pub error: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPeersRequest {
    ///
    ///If true, only the last error that our peer sent us will be returned with
    ///the peer's information, rather than the full set of historic errors we have
    ///stored.
    #[prost(bool, tag = "1")]
    pub latest_error: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPeersResponse {
    //// The list of currently connected peers
    #[prost(message, repeated, tag = "1")]
    pub peers: ::std::vec::Vec<Peer>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PeerEventSubscription {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PeerEvent {
    //// The identity pubkey of the peer.
    #[prost(string, tag = "1")]
    pub pub_key: std::string::String,
    #[prost(enumeration = "peer_event::EventType", tag = "2")]
    pub r#type: i32,
}
pub mod peer_event {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum EventType {
        PeerOnline = 0,
        PeerOffline = 1,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInfoRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInfoResponse {
    //// The version of the LND software that the node is running.
    #[prost(string, tag = "14")]
    pub version: std::string::String,
    //// The SHA1 commit hash that the daemon is compiled with.
    #[prost(string, tag = "20")]
    pub commit_hash: std::string::String,
    //// The identity pubkey of the current node.
    #[prost(string, tag = "1")]
    pub identity_pubkey: std::string::String,
    //// If applicable, the alias of the current node, e.g. "bob"
    #[prost(string, tag = "2")]
    pub alias: std::string::String,
    //// The color of the current node in hex code format
    #[prost(string, tag = "17")]
    pub color: std::string::String,
    //// Number of pending channels
    #[prost(uint32, tag = "3")]
    pub num_pending_channels: u32,
    //// Number of active channels
    #[prost(uint32, tag = "4")]
    pub num_active_channels: u32,
    //// Number of inactive channels
    #[prost(uint32, tag = "15")]
    pub num_inactive_channels: u32,
    //// Number of peers
    #[prost(uint32, tag = "5")]
    pub num_peers: u32,
    //// The node's current view of the height of the best block
    #[prost(uint32, tag = "6")]
    pub block_height: u32,
    //// The node's current view of the hash of the best block
    #[prost(string, tag = "8")]
    pub block_hash: std::string::String,
    //// Timestamp of the block best known to the wallet
    #[prost(int64, tag = "13")]
    pub best_header_timestamp: i64,
    //// Whether the wallet's view is synced to the main chain
    #[prost(bool, tag = "9")]
    pub synced_to_chain: bool,
    /// Whether we consider ourselves synced with the public channel graph.
    #[prost(bool, tag = "18")]
    pub synced_to_graph: bool,
    ///*
    ///Whether the current node is connected to testnet. This field is
    ///deprecated and the network field should be used instead
    #[prost(bool, tag = "10")]
    pub testnet: bool,
    //// A list of active chains the node is connected to
    #[prost(message, repeated, tag = "16")]
    pub chains: ::std::vec::Vec<Chain>,
    //// The URIs of the current node.
    #[prost(string, repeated, tag = "12")]
    pub uris: ::std::vec::Vec<std::string::String>,
    ///
    ///Features that our node has advertised in our init message, node
    ///announcements and invoices.
    #[prost(map = "uint32, message", tag = "19")]
    pub features: ::std::collections::HashMap<u32, Feature>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Chain {
    //// The blockchain the node is on (eg bitcoin, litecoin)
    #[prost(string, tag = "1")]
    pub chain: std::string::String,
    //// The network the node is on (eg regtest, testnet, mainnet)
    #[prost(string, tag = "2")]
    pub network: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfirmationUpdate {
    #[prost(bytes, tag = "1")]
    pub block_sha: std::vec::Vec<u8>,
    #[prost(int32, tag = "2")]
    pub block_height: i32,
    #[prost(uint32, tag = "3")]
    pub num_confs_left: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelOpenUpdate {
    #[prost(message, optional, tag = "1")]
    pub channel_point: ::std::option::Option<ChannelPoint>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelCloseUpdate {
    #[prost(bytes, tag = "1")]
    pub closing_txid: std::vec::Vec<u8>,
    #[prost(bool, tag = "2")]
    pub success: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloseChannelRequest {
    ///*
    ///The outpoint (txid:index) of the funding transaction. With this value, Bob
    ///will be able to generate a signature for Alice's version of the commitment
    ///transaction.
    #[prost(message, optional, tag = "1")]
    pub channel_point: ::std::option::Option<ChannelPoint>,
    //// If true, then the channel will be closed forcibly. This means the
    //// current commitment transaction will be signed and broadcast.
    #[prost(bool, tag = "2")]
    pub force: bool,
    //// The target number of blocks that the closure transaction should be
    //// confirmed by.
    #[prost(int32, tag = "3")]
    pub target_conf: i32,
    //// A manual fee rate set in sat/byte that should be used when crafting the
    //// closure transaction.
    #[prost(int64, tag = "4")]
    pub sat_per_byte: i64,
    ///
    ///An optional address to send funds to in the case of a cooperative close.
    ///If the channel was opened with an upfront shutdown script and this field
    ///is set, the request to close will fail because the channel must pay out
    ///to the upfront shutdown addresss.
    #[prost(string, tag = "5")]
    pub delivery_address: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloseStatusUpdate {
    #[prost(oneof = "close_status_update::Update", tags = "1, 3")]
    pub update: ::std::option::Option<close_status_update::Update>,
}
pub mod close_status_update {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Update {
        #[prost(message, tag = "1")]
        ClosePending(super::PendingUpdate),
        #[prost(message, tag = "3")]
        ChanClose(super::ChannelCloseUpdate),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PendingUpdate {
    #[prost(bytes, tag = "1")]
    pub txid: std::vec::Vec<u8>,
    #[prost(uint32, tag = "2")]
    pub output_index: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadyForPsbtFunding {
    ///*
    ///The P2WSH address of the channel funding multisig address that the below
    ///specified amount in satoshis needs to be sent to.
    #[prost(string, tag = "1")]
    pub funding_address: std::string::String,
    ///*
    ///The exact amount in satoshis that needs to be sent to the above address to
    ///fund the pending channel.
    #[prost(int64, tag = "2")]
    pub funding_amount: i64,
    ///*
    ///A raw PSBT that contains the pending channel output. If a base PSBT was
    ///provided in the PsbtShim, this is the base PSBT with one additional output.
    ///If no base PSBT was specified, this is an otherwise empty PSBT with exactly
    ///one output.
    #[prost(bytes, tag = "3")]
    pub psbt: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpenChannelRequest {
    ///*
    ///The pubkey of the node to open a channel with. When using REST, this field
    ///must be encoded as base64.
    #[prost(bytes, tag = "2")]
    pub node_pubkey: std::vec::Vec<u8>,
    ///*
    ///The hex encoded pubkey of the node to open a channel with. Deprecated now
    ///that the REST gateway supports base64 encoding of bytes fields.
    #[prost(string, tag = "3")]
    pub node_pubkey_string: std::string::String,
    //// The number of satoshis the wallet should commit to the channel
    #[prost(int64, tag = "4")]
    pub local_funding_amount: i64,
    //// The number of satoshis to push to the remote side as part of the initial
    //// commitment state
    #[prost(int64, tag = "5")]
    pub push_sat: i64,
    //// The target number of blocks that the funding transaction should be
    //// confirmed by.
    #[prost(int32, tag = "6")]
    pub target_conf: i32,
    //// A manual fee rate set in sat/byte that should be used when crafting the
    //// funding transaction.
    #[prost(int64, tag = "7")]
    pub sat_per_byte: i64,
    //// Whether this channel should be private, not announced to the greater
    //// network.
    #[prost(bool, tag = "8")]
    pub private: bool,
    //// The minimum value in millisatoshi we will require for incoming HTLCs on
    //// the channel.
    #[prost(int64, tag = "9")]
    pub min_htlc_msat: i64,
    //// The delay we require on the remote's commitment transaction. If this is
    //// not set, it will be scaled automatically with the channel size.
    #[prost(uint32, tag = "10")]
    pub remote_csv_delay: u32,
    //// The minimum number of confirmations each one of your outputs used for
    //// the funding transaction must satisfy.
    #[prost(int32, tag = "11")]
    pub min_confs: i32,
    //// Whether unconfirmed outputs should be used as inputs for the funding
    //// transaction.
    #[prost(bool, tag = "12")]
    pub spend_unconfirmed: bool,
    ///
    ///Close address is an optional address which specifies the address to which
    ///funds should be paid out to upon cooperative close. This field may only be
    ///set if the peer supports the option upfront feature bit (call listpeers
    ///to check). The remote peer will only accept cooperative closes to this
    ///address if it is set.
    ///
    ///Note: If this value is set on channel creation, you will *not* be able to
    ///cooperatively close out to a different address.
    #[prost(string, tag = "13")]
    pub close_address: std::string::String,
    ///*
    ///Funding shims are an optional argument that allow the caller to intercept
    ///certain funding functionality. For example, a shim can be provided to use a
    ///particular key for the commitment key (ideally cold) rather than use one
    ///that is generated by the wallet as normal, or signal that signing will be
    ///carried out in an interactive manner (PSBT based).
    #[prost(message, optional, tag = "14")]
    pub funding_shim: ::std::option::Option<FundingShim>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpenStatusUpdate {
    ///*
    ///The pending channel ID of the created channel. This value may be used to
    ///further the funding flow manually via the FundingStateStep method.
    #[prost(bytes, tag = "4")]
    pub pending_chan_id: std::vec::Vec<u8>,
    #[prost(oneof = "open_status_update::Update", tags = "1, 3, 5")]
    pub update: ::std::option::Option<open_status_update::Update>,
}
pub mod open_status_update {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Update {
        ///*
        ///Signals that the channel is now fully negotiated and the funding
        ///transaction published.
        #[prost(message, tag = "1")]
        ChanPending(super::PendingUpdate),
        ///*
        ///Signals that the channel's funding transaction has now reached the
        ///required number of confirmations on chain and can be used.
        #[prost(message, tag = "3")]
        ChanOpen(super::ChannelOpenUpdate),
        ///*
        ///Signals that the funding process has been suspended and the construction
        ///of a PSBT that funds the channel PK script is now required.
        #[prost(message, tag = "5")]
        PsbtFund(super::ReadyForPsbtFunding),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyLocator {
    //// The family of key being identified.
    #[prost(int32, tag = "1")]
    pub key_family: i32,
    //// The precise index of the key being identified.
    #[prost(int32, tag = "2")]
    pub key_index: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyDescriptor {
    ///*
    ///The raw bytes of the key being identified.
    #[prost(bytes, tag = "1")]
    pub raw_key_bytes: std::vec::Vec<u8>,
    ///*
    ///The key locator that identifies which key to use for signing.
    #[prost(message, optional, tag = "2")]
    pub key_loc: ::std::option::Option<KeyLocator>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChanPointShim {
    ///*
    ///The size of the pre-crafted output to be used as the channel point for this
    ///channel funding.
    #[prost(int64, tag = "1")]
    pub amt: i64,
    //// The target channel point to refrence in created commitment transactions.
    #[prost(message, optional, tag = "2")]
    pub chan_point: ::std::option::Option<ChannelPoint>,
    //// Our local key to use when creating the multi-sig output.
    #[prost(message, optional, tag = "3")]
    pub local_key: ::std::option::Option<KeyDescriptor>,
    //// The key of the remote party to use when creating the multi-sig output.
    #[prost(bytes, tag = "4")]
    pub remote_key: std::vec::Vec<u8>,
    ///*
    ///If non-zero, then this will be used as the pending channel ID on the wire
    ///protocol to initate the funding request. This is an optional field, and
    ///should only be set if the responder is already expecting a specific pending
    ///channel ID.
    #[prost(bytes, tag = "5")]
    pub pending_chan_id: std::vec::Vec<u8>,
    ///*
    ///This uint32 indicates if this channel is to be considered 'frozen'. A
    ///frozen channel does not allow a cooperative channel close by the
    ///initiator. The thaw_height is the height that this restriction stops
    ///applying to the channel.
    #[prost(uint32, tag = "6")]
    pub thaw_height: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PsbtShim {
    ///*
    ///A unique identifier of 32 random bytes that will be used as the pending
    ///channel ID to identify the PSBT state machine when interacting with it and
    ///on the wire protocol to initiate the funding request.
    #[prost(bytes, tag = "1")]
    pub pending_chan_id: std::vec::Vec<u8>,
    ///*
    ///An optional base PSBT the new channel output will be added to. If this is
    ///non-empty, it must be a binary serialized PSBT.
    #[prost(bytes, tag = "2")]
    pub base_psbt: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FundingShim {
    #[prost(oneof = "funding_shim::Shim", tags = "1, 2")]
    pub shim: ::std::option::Option<funding_shim::Shim>,
}
pub mod funding_shim {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Shim {
        ///*
        ///A channel shim where the channel point was fully constructed outside
        ///of lnd's wallet and the transaction might already be published.
        #[prost(message, tag = "1")]
        ChanPointShim(super::ChanPointShim),
        ///*
        ///A channel shim that uses a PSBT to fund and sign the channel funding
        ///transaction.
        #[prost(message, tag = "2")]
        PsbtShim(super::PsbtShim),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FundingShimCancel {
    //// The pending channel ID of the channel to cancel the funding shim for.
    #[prost(bytes, tag = "1")]
    pub pending_chan_id: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FundingPsbtVerify {
    ///*
    ///The funded but not yet signed PSBT that sends the exact channel capacity
    ///amount to the PK script returned in the open channel message in a previous
    ///step.
    #[prost(bytes, tag = "1")]
    pub funded_psbt: std::vec::Vec<u8>,
    //// The pending channel ID of the channel to get the PSBT for.
    #[prost(bytes, tag = "2")]
    pub pending_chan_id: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FundingPsbtFinalize {
    ///*
    ///The funded PSBT that contains all witness data to send the exact channel
    ///capacity amount to the PK script returned in the open channel message in a
    ///previous step.
    #[prost(bytes, tag = "1")]
    pub signed_psbt: std::vec::Vec<u8>,
    //// The pending channel ID of the channel to get the PSBT for.
    #[prost(bytes, tag = "2")]
    pub pending_chan_id: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FundingTransitionMsg {
    #[prost(oneof = "funding_transition_msg::Trigger", tags = "1, 2, 3, 4")]
    pub trigger: ::std::option::Option<funding_transition_msg::Trigger>,
}
pub mod funding_transition_msg {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Trigger {
        ///*
        ///The funding shim to register. This should be used before any
        ///channel funding has began by the remote party, as it is intended as a
        ///preparatory step for the full channel funding.
        #[prost(message, tag = "1")]
        ShimRegister(super::FundingShim),
        //// Used to cancel an existing registered funding shim.
        #[prost(message, tag = "2")]
        ShimCancel(super::FundingShimCancel),
        ///*
        ///Used to continue a funding flow that was initiated to be executed
        ///through a PSBT. This step verifies that the PSBT contains the correct
        ///outputs to fund the channel.
        #[prost(message, tag = "3")]
        PsbtVerify(super::FundingPsbtVerify),
        ///*
        ///Used to continue a funding flow that was initiated to be executed
        ///through a PSBT. This step finalizes the funded and signed PSBT, finishes
        ///negotiation with the peer and finally publishes the resulting funding
        ///transaction.
        #[prost(message, tag = "4")]
        PsbtFinalize(super::FundingPsbtFinalize),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FundingStateStepResp {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PendingHtlc {
    //// The direction within the channel that the htlc was sent
    #[prost(bool, tag = "1")]
    pub incoming: bool,
    //// The total value of the htlc
    #[prost(int64, tag = "2")]
    pub amount: i64,
    //// The final output to be swept back to the user's wallet
    #[prost(string, tag = "3")]
    pub outpoint: std::string::String,
    //// The next block height at which we can spend the current stage
    #[prost(uint32, tag = "4")]
    pub maturity_height: u32,
    ///*
    ///The number of blocks remaining until the current stage can be swept.
    ///Negative values indicate how many blocks have passed since becoming
    ///mature.
    #[prost(int32, tag = "5")]
    pub blocks_til_maturity: i32,
    //// Indicates whether the htlc is in its first or second stage of recovery
    #[prost(uint32, tag = "6")]
    pub stage: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PendingChannelsRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PendingChannelsResponse {
    //// The balance in satoshis encumbered in pending channels
    #[prost(int64, tag = "1")]
    pub total_limbo_balance: i64,
    //// Channels pending opening
    #[prost(message, repeated, tag = "2")]
    pub pending_open_channels: ::std::vec::Vec<pending_channels_response::PendingOpenChannel>,
    ///
    ///Deprecated: Channels pending closing previously contained cooperatively
    ///closed channels with a single confirmation. These channels are now
    ///considered closed from the time we see them on chain.
    #[prost(message, repeated, tag = "3")]
    pub pending_closing_channels: ::std::vec::Vec<pending_channels_response::ClosedChannel>,
    //// Channels pending force closing
    #[prost(message, repeated, tag = "4")]
    pub pending_force_closing_channels:
        ::std::vec::Vec<pending_channels_response::ForceClosedChannel>,
    //// Channels waiting for closing tx to confirm
    #[prost(message, repeated, tag = "5")]
    pub waiting_close_channels: ::std::vec::Vec<pending_channels_response::WaitingCloseChannel>,
}
pub mod pending_channels_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct PendingChannel {
        #[prost(string, tag = "1")]
        pub remote_node_pub: std::string::String,
        #[prost(string, tag = "2")]
        pub channel_point: std::string::String,
        #[prost(int64, tag = "3")]
        pub capacity: i64,
        #[prost(int64, tag = "4")]
        pub local_balance: i64,
        #[prost(int64, tag = "5")]
        pub remote_balance: i64,
        //// The minimum satoshis this node is required to reserve in its
        //// balance.
        #[prost(int64, tag = "6")]
        pub local_chan_reserve_sat: i64,
        ///*
        ///The minimum satoshis the other node is required to reserve in its
        ///balance.
        #[prost(int64, tag = "7")]
        pub remote_chan_reserve_sat: i64,
        /// The party that initiated opening the channel.
        #[prost(enumeration = "super::Initiator", tag = "8")]
        pub initiator: i32,
        //// The commitment type used by this channel.
        #[prost(enumeration = "super::CommitmentType", tag = "9")]
        pub commitment_type: i32,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct PendingOpenChannel {
        //// The pending channel
        #[prost(message, optional, tag = "1")]
        pub channel: ::std::option::Option<PendingChannel>,
        //// The height at which this channel will be confirmed
        #[prost(uint32, tag = "2")]
        pub confirmation_height: u32,
        ///*
        ///The amount calculated to be paid in fees for the current set of
        ///commitment transactions. The fee amount is persisted with the channel
        ///in order to allow the fee amount to be removed and recalculated with
        ///each channel state update, including updates that happen after a system
        ///restart.
        #[prost(int64, tag = "4")]
        pub commit_fee: i64,
        //// The weight of the commitment transaction
        #[prost(int64, tag = "5")]
        pub commit_weight: i64,
        ///*
        ///The required number of satoshis per kilo-weight that the requester will
        ///pay at all times, for both the funding transaction and commitment
        ///transaction. This value can later be updated once the channel is open.
        #[prost(int64, tag = "6")]
        pub fee_per_kw: i64,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct WaitingCloseChannel {
        //// The pending channel waiting for closing tx to confirm
        #[prost(message, optional, tag = "1")]
        pub channel: ::std::option::Option<PendingChannel>,
        //// The balance in satoshis encumbered in this channel
        #[prost(int64, tag = "2")]
        pub limbo_balance: i64,
        ///*
        ///A list of valid commitment transactions. Any of these can confirm at
        ///this point.
        #[prost(message, optional, tag = "3")]
        pub commitments: ::std::option::Option<Commitments>,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Commitments {
        //// Hash of the local version of the commitment tx.
        #[prost(string, tag = "1")]
        pub local_txid: std::string::String,
        //// Hash of the remote version of the commitment tx.
        #[prost(string, tag = "2")]
        pub remote_txid: std::string::String,
        //// Hash of the remote pending version of the commitment tx.
        #[prost(string, tag = "3")]
        pub remote_pending_txid: std::string::String,
        ///
        ///The amount in satoshis calculated to be paid in fees for the local
        ///commitment.
        #[prost(uint64, tag = "4")]
        pub local_commit_fee_sat: u64,
        ///
        ///The amount in satoshis calculated to be paid in fees for the remote
        ///commitment.
        #[prost(uint64, tag = "5")]
        pub remote_commit_fee_sat: u64,
        ///
        ///The amount in satoshis calculated to be paid in fees for the remote
        ///pending commitment.
        #[prost(uint64, tag = "6")]
        pub remote_pending_commit_fee_sat: u64,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ClosedChannel {
        //// The pending channel to be closed
        #[prost(message, optional, tag = "1")]
        pub channel: ::std::option::Option<PendingChannel>,
        //// The transaction id of the closing transaction
        #[prost(string, tag = "2")]
        pub closing_txid: std::string::String,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ForceClosedChannel {
        //// The pending channel to be force closed
        #[prost(message, optional, tag = "1")]
        pub channel: ::std::option::Option<PendingChannel>,
        //// The transaction id of the closing transaction
        #[prost(string, tag = "2")]
        pub closing_txid: std::string::String,
        //// The balance in satoshis encumbered in this pending channel
        #[prost(int64, tag = "3")]
        pub limbo_balance: i64,
        //// The height at which funds can be swept into the wallet
        #[prost(uint32, tag = "4")]
        pub maturity_height: u32,
        ///
        ///Remaining # of blocks until the commitment output can be swept.
        ///Negative values indicate how many blocks have passed since becoming
        ///mature.
        #[prost(int32, tag = "5")]
        pub blocks_til_maturity: i32,
        //// The total value of funds successfully recovered from this channel
        #[prost(int64, tag = "6")]
        pub recovered_balance: i64,
        #[prost(message, repeated, tag = "8")]
        pub pending_htlcs: ::std::vec::Vec<super::PendingHtlc>,
        #[prost(enumeration = "force_closed_channel::AnchorState", tag = "9")]
        pub anchor: i32,
    }
    pub mod force_closed_channel {
        #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
        #[repr(i32)]
        pub enum AnchorState {
            Limbo = 0,
            Recovered = 1,
            Lost = 2,
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelEventSubscription {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelEventUpdate {
    #[prost(enumeration = "channel_event_update::UpdateType", tag = "5")]
    pub r#type: i32,
    #[prost(oneof = "channel_event_update::Channel", tags = "1, 2, 3, 4, 6")]
    pub channel: ::std::option::Option<channel_event_update::Channel>,
}
pub mod channel_event_update {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum UpdateType {
        OpenChannel = 0,
        ClosedChannel = 1,
        ActiveChannel = 2,
        InactiveChannel = 3,
        PendingOpenChannel = 4,
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Channel {
        #[prost(message, tag = "1")]
        OpenChannel(super::Channel),
        #[prost(message, tag = "2")]
        ClosedChannel(super::ChannelCloseSummary),
        #[prost(message, tag = "3")]
        ActiveChannel(super::ChannelPoint),
        #[prost(message, tag = "4")]
        InactiveChannel(super::ChannelPoint),
        #[prost(message, tag = "6")]
        PendingOpenChannel(super::PendingUpdate),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WalletBalanceRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WalletBalanceResponse {
    //// The balance of the wallet
    #[prost(int64, tag = "1")]
    pub total_balance: i64,
    //// The confirmed balance of a wallet(with >= 1 confirmations)
    #[prost(int64, tag = "2")]
    pub confirmed_balance: i64,
    //// The unconfirmed balance of a wallet(with 0 confirmations)
    #[prost(int64, tag = "3")]
    pub unconfirmed_balance: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelBalanceRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelBalanceResponse {
    //// Sum of channels balances denominated in satoshis
    #[prost(int64, tag = "1")]
    pub balance: i64,
    //// Sum of channels pending balances denominated in satoshis
    #[prost(int64, tag = "2")]
    pub pending_open_balance: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryRoutesRequest {
    //// The 33-byte hex-encoded public key for the payment destination
    #[prost(string, tag = "1")]
    pub pub_key: std::string::String,
    ///*
    ///The amount to send expressed in satoshis.
    ///
    ///The fields amt and amt_msat are mutually exclusive.
    #[prost(int64, tag = "2")]
    pub amt: i64,
    ///*
    ///The amount to send expressed in millisatoshis.
    ///
    ///The fields amt and amt_msat are mutually exclusive.
    #[prost(int64, tag = "12")]
    pub amt_msat: i64,
    ///*
    ///An optional CLTV delta from the current height that should be used for the
    ///timelock of the final hop. Note that unlike SendPayment, QueryRoutes does
    ///not add any additional block padding on top of final_ctlv_delta. This
    ///padding of a few blocks needs to be added manually or otherwise failures may
    ///happen when a block comes in while the payment is in flight.
    #[prost(int32, tag = "4")]
    pub final_cltv_delta: i32,
    ///*
    ///The maximum number of satoshis that will be paid as a fee of the payment.
    ///This value can be represented either as a percentage of the amount being
    ///sent, or as a fixed amount of the maximum fee the user is willing the pay to
    ///send the payment.
    #[prost(message, optional, tag = "5")]
    pub fee_limit: ::std::option::Option<FeeLimit>,
    ///*
    ///A list of nodes to ignore during path finding. When using REST, these fields
    ///must be encoded as base64.
    #[prost(bytes, repeated, tag = "6")]
    pub ignored_nodes: ::std::vec::Vec<std::vec::Vec<u8>>,
    ///*
    ///Deprecated. A list of edges to ignore during path finding.
    #[prost(message, repeated, tag = "7")]
    pub ignored_edges: ::std::vec::Vec<EdgeLocator>,
    ///*
    ///The source node where the request route should originated from. If empty,
    ///self is assumed.
    #[prost(string, tag = "8")]
    pub source_pub_key: std::string::String,
    ///*
    ///If set to true, edge probabilities from mission control will be used to get
    ///the optimal route.
    #[prost(bool, tag = "9")]
    pub use_mission_control: bool,
    ///*
    ///A list of directed node pairs that will be ignored during path finding.
    #[prost(message, repeated, tag = "10")]
    pub ignored_pairs: ::std::vec::Vec<NodePair>,
    ///*
    ///An optional maximum total time lock for the route. If the source is empty or
    ///ourselves, this should not exceed lnd's `--max-cltv-expiry` setting. If
    ///zero, then the value of `--max-cltv-expiry` is used as the limit.
    #[prost(uint32, tag = "11")]
    pub cltv_limit: u32,
    ///*
    ///An optional field that can be used to pass an arbitrary set of TLV records
    ///to a peer which understands the new records. This can be used to pass
    ///application specific data during the payment attempt. If the destination
    ///does not support the specified recrods, and error will be returned.
    ///Record types are required to be in the custom range >= 65536. When using
    ///REST, the values must be encoded as base64.
    #[prost(map = "uint64, bytes", tag = "13")]
    pub dest_custom_records: ::std::collections::HashMap<u64, std::vec::Vec<u8>>,
    ///*
    ///The channel id of the channel that must be taken to the first hop. If zero,
    ///any channel may be used.
    #[prost(uint64, tag = "14")]
    pub outgoing_chan_id: u64,
    ///*
    ///The pubkey of the last hop of the route. If empty, any hop may be used.
    #[prost(bytes, tag = "15")]
    pub last_hop_pubkey: std::vec::Vec<u8>,
    ///*
    ///Optional route hints to reach the destination through private channels.
    #[prost(message, repeated, tag = "16")]
    pub route_hints: ::std::vec::Vec<RouteHint>,
    ///*
    ///Features assumed to be supported by the final node. All transitive feature
    ///dependencies must also be set properly. For a given feature bit pair, either
    ///optional or remote may be set, but not both. If this field is nil or empty,
    ///the router will try to load destination features from the graph as a
    ///fallback.
    #[prost(enumeration = "FeatureBit", repeated, tag = "17")]
    pub dest_features: ::std::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodePair {
    ///*
    ///The sending node of the pair. When using REST, this field must be encoded as
    ///base64.
    #[prost(bytes, tag = "1")]
    pub from: std::vec::Vec<u8>,
    ///*
    ///The receiving node of the pair. When using REST, this field must be encoded
    ///as base64.
    #[prost(bytes, tag = "2")]
    pub to: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EdgeLocator {
    //// The short channel id of this edge.
    #[prost(uint64, tag = "1")]
    pub channel_id: u64,
    ///*
    ///The direction of this edge. If direction_reverse is false, the direction
    ///of this edge is from the channel endpoint with the lexicographically smaller
    ///pub key to the endpoint with the larger pub key. If direction_reverse is
    ///is true, the edge goes the other way.
    #[prost(bool, tag = "2")]
    pub direction_reverse: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryRoutesResponse {
    ///*
    ///The route that results from the path finding operation. This is still a
    ///repeated field to retain backwards compatibility.
    #[prost(message, repeated, tag = "1")]
    pub routes: ::std::vec::Vec<Route>,
    ///*
    ///The success probability of the returned route based on the current mission
    ///control state. [EXPERIMENTAL]
    #[prost(double, tag = "2")]
    pub success_prob: f64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hop {
    ///*
    ///The unique channel ID for the channel. The first 3 bytes are the block
    ///height, the next 3 the index within the block, and the last 2 bytes are the
    ///output index for the channel.
    #[prost(uint64, tag = "1")]
    pub chan_id: u64,
    #[prost(int64, tag = "2")]
    pub chan_capacity: i64,
    #[prost(int64, tag = "3")]
    pub amt_to_forward: i64,
    #[prost(int64, tag = "4")]
    pub fee: i64,
    #[prost(uint32, tag = "5")]
    pub expiry: u32,
    #[prost(int64, tag = "6")]
    pub amt_to_forward_msat: i64,
    #[prost(int64, tag = "7")]
    pub fee_msat: i64,
    ///*
    ///An optional public key of the hop. If the public key is given, the payment
    ///can be executed without relying on a copy of the channel graph.
    #[prost(string, tag = "8")]
    pub pub_key: std::string::String,
    ///*
    ///If set to true, then this hop will be encoded using the new variable length
    ///TLV format. Note that if any custom tlv_records below are specified, then
    ///this field MUST be set to true for them to be encoded properly.
    #[prost(bool, tag = "9")]
    pub tlv_payload: bool,
    ///*
    ///An optional TLV record that signals the use of an MPP payment. If present,
    ///the receiver will enforce that that the same mpp_record is included in the
    ///final hop payload of all non-zero payments in the HTLC set. If empty, a
    ///regular single-shot payment is or was attempted.
    #[prost(message, optional, tag = "10")]
    pub mpp_record: ::std::option::Option<MppRecord>,
    ///*
    ///An optional set of key-value TLV records. This is useful within the context
    ///of the SendToRoute call as it allows callers to specify arbitrary K-V pairs
    ///to drop off at each hop within the onion.
    #[prost(map = "uint64, bytes", tag = "11")]
    pub custom_records: ::std::collections::HashMap<u64, std::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MppRecord {
    ///*
    ///A unique, random identifier used to authenticate the sender as the intended
    ///payer of a multi-path payment. The payment_addr must be the same for all
    ///subpayments, and match the payment_addr provided in the receiver's invoice.
    ///The same payment_addr must be used on all subpayments.
    #[prost(bytes, tag = "11")]
    pub payment_addr: std::vec::Vec<u8>,
    ///*
    ///The total amount in milli-satoshis being sent as part of a larger multi-path
    ///payment. The caller is responsible for ensuring subpayments to the same node
    ///and payment_hash sum exactly to total_amt_msat. The same
    ///total_amt_msat must be used on all subpayments.
    #[prost(int64, tag = "10")]
    pub total_amt_msat: i64,
}
///*
///A path through the channel graph which runs over one or more channels in
///succession. This struct carries all the information required to craft the
///Sphinx onion packet, and send the payment along the first hop in the path. A
///route is only selected as valid if all the channels have sufficient capacity to
///carry the initial payment amount after fees are accounted for.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Route {
    ///*
    ///The cumulative (final) time lock across the entire route. This is the CLTV
    ///value that should be extended to the first hop in the route. All other hops
    ///will decrement the time-lock as advertised, leaving enough time for all
    ///hops to wait for or present the payment preimage to complete the payment.
    #[prost(uint32, tag = "1")]
    pub total_time_lock: u32,
    ///*
    ///The sum of the fees paid at each hop within the final route. In the case
    ///of a one-hop payment, this value will be zero as we don't need to pay a fee
    ///to ourselves.
    #[prost(int64, tag = "2")]
    pub total_fees: i64,
    ///*
    ///The total amount of funds required to complete a payment over this route.
    ///This value includes the cumulative fees at each hop. As a result, the HTLC
    ///extended to the first-hop in the route will need to have at least this many
    ///satoshis, otherwise the route will fail at an intermediate node due to an
    ///insufficient amount of fees.
    #[prost(int64, tag = "3")]
    pub total_amt: i64,
    ///*
    ///Contains details concerning the specific forwarding details at each hop.
    #[prost(message, repeated, tag = "4")]
    pub hops: ::std::vec::Vec<Hop>,
    ///*
    ///The total fees in millisatoshis.
    #[prost(int64, tag = "5")]
    pub total_fees_msat: i64,
    ///*
    ///The total amount in millisatoshis.
    #[prost(int64, tag = "6")]
    pub total_amt_msat: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeInfoRequest {
    //// The 33-byte hex-encoded compressed public of the target node
    #[prost(string, tag = "1")]
    pub pub_key: std::string::String,
    //// If true, will include all known channels associated with the node.
    #[prost(bool, tag = "2")]
    pub include_channels: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeInfo {
    ///*
    ///An individual vertex/node within the channel graph. A node is
    ///connected to other nodes by one or more channel edges emanating from it. As
    ///the graph is directed, a node will also have an incoming edge attached to
    ///it for each outgoing edge.
    #[prost(message, optional, tag = "1")]
    pub node: ::std::option::Option<LightningNode>,
    //// The total number of channels for the node.
    #[prost(uint32, tag = "2")]
    pub num_channels: u32,
    //// The sum of all channels capacity for the node, denominated in satoshis.
    #[prost(int64, tag = "3")]
    pub total_capacity: i64,
    //// A list of all public channels for the node.
    #[prost(message, repeated, tag = "4")]
    pub channels: ::std::vec::Vec<ChannelEdge>,
}
///*
///An individual vertex/node within the channel graph. A node is
///connected to other nodes by one or more channel edges emanating from it. As the
///graph is directed, a node will also have an incoming edge attached to it for
///each outgoing edge.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LightningNode {
    #[prost(uint32, tag = "1")]
    pub last_update: u32,
    #[prost(string, tag = "2")]
    pub pub_key: std::string::String,
    #[prost(string, tag = "3")]
    pub alias: std::string::String,
    #[prost(message, repeated, tag = "4")]
    pub addresses: ::std::vec::Vec<NodeAddress>,
    #[prost(string, tag = "5")]
    pub color: std::string::String,
    #[prost(map = "uint32, message", tag = "6")]
    pub features: ::std::collections::HashMap<u32, Feature>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeAddress {
    #[prost(string, tag = "1")]
    pub network: std::string::String,
    #[prost(string, tag = "2")]
    pub addr: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RoutingPolicy {
    #[prost(uint32, tag = "1")]
    pub time_lock_delta: u32,
    #[prost(int64, tag = "2")]
    pub min_htlc: i64,
    #[prost(int64, tag = "3")]
    pub fee_base_msat: i64,
    #[prost(int64, tag = "4")]
    pub fee_rate_milli_msat: i64,
    #[prost(bool, tag = "5")]
    pub disabled: bool,
    #[prost(uint64, tag = "6")]
    pub max_htlc_msat: u64,
    #[prost(uint32, tag = "7")]
    pub last_update: u32,
}
///*
///A fully authenticated channel along with all its unique attributes.
///Once an authenticated channel announcement has been processed on the network,
///then an instance of ChannelEdgeInfo encapsulating the channels attributes is
///stored. The other portions relevant to routing policy of a channel are stored
///within a ChannelEdgePolicy for each direction of the channel.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelEdge {
    ///*
    ///The unique channel ID for the channel. The first 3 bytes are the block
    ///height, the next 3 the index within the block, and the last 2 bytes are the
    ///output index for the channel.
    #[prost(uint64, tag = "1")]
    pub channel_id: u64,
    #[prost(string, tag = "2")]
    pub chan_point: std::string::String,
    #[prost(uint32, tag = "3")]
    pub last_update: u32,
    #[prost(string, tag = "4")]
    pub node1_pub: std::string::String,
    #[prost(string, tag = "5")]
    pub node2_pub: std::string::String,
    #[prost(int64, tag = "6")]
    pub capacity: i64,
    #[prost(message, optional, tag = "7")]
    pub node1_policy: ::std::option::Option<RoutingPolicy>,
    #[prost(message, optional, tag = "8")]
    pub node2_policy: ::std::option::Option<RoutingPolicy>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelGraphRequest {
    ///*
    ///Whether unannounced channels are included in the response or not. If set,
    ///unannounced channels are included. Unannounced channels are both private
    ///channels, and public channels that are not yet announced to the network.
    #[prost(bool, tag = "1")]
    pub include_unannounced: bool,
}
//// Returns a new instance of the directed channel graph.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelGraph {
    //// The list of `LightningNode`s in this channel graph
    #[prost(message, repeated, tag = "1")]
    pub nodes: ::std::vec::Vec<LightningNode>,
    //// The list of `ChannelEdge`s in this channel graph
    #[prost(message, repeated, tag = "2")]
    pub edges: ::std::vec::Vec<ChannelEdge>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeMetricsRequest {
    //// The requested node metrics.
    #[prost(enumeration = "NodeMetricType", repeated, tag = "1")]
    pub types: ::std::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeMetricsResponse {
    ///*
    ///Betweenness centrality is the sum of the ratio of shortest paths that pass
    ///through the node for each pair of nodes in the graph (not counting paths
    ///starting or ending at this node).
    ///Map of node pubkey to betweenness centrality of the node. Normalized
    ///values are in the [0,1] closed interval.
    #[prost(map = "string, message", tag = "1")]
    pub betweenness_centrality: ::std::collections::HashMap<std::string::String, FloatMetric>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FloatMetric {
    //// Arbitrary float value.
    #[prost(double, tag = "1")]
    pub value: f64,
    //// The value normalized to [0,1] or [-1,1].
    #[prost(double, tag = "2")]
    pub normalized_value: f64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChanInfoRequest {
    ///*
    ///The unique channel ID for the channel. The first 3 bytes are the block
    ///height, the next 3 the index within the block, and the last 2 bytes are the
    ///output index for the channel.
    #[prost(uint64, tag = "1")]
    pub chan_id: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkInfoRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkInfo {
    #[prost(uint32, tag = "1")]
    pub graph_diameter: u32,
    #[prost(double, tag = "2")]
    pub avg_out_degree: f64,
    #[prost(uint32, tag = "3")]
    pub max_out_degree: u32,
    #[prost(uint32, tag = "4")]
    pub num_nodes: u32,
    #[prost(uint32, tag = "5")]
    pub num_channels: u32,
    #[prost(int64, tag = "6")]
    pub total_network_capacity: i64,
    #[prost(double, tag = "7")]
    pub avg_channel_size: f64,
    #[prost(int64, tag = "8")]
    pub min_channel_size: i64,
    #[prost(int64, tag = "9")]
    pub max_channel_size: i64,
    #[prost(int64, tag = "10")]
    pub median_channel_size_sat: i64,
    /// The number of edges marked as zombies.
    #[prost(uint64, tag = "11")]
    pub num_zombie_chans: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraphTopologySubscription {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraphTopologyUpdate {
    #[prost(message, repeated, tag = "1")]
    pub node_updates: ::std::vec::Vec<NodeUpdate>,
    #[prost(message, repeated, tag = "2")]
    pub channel_updates: ::std::vec::Vec<ChannelEdgeUpdate>,
    #[prost(message, repeated, tag = "3")]
    pub closed_chans: ::std::vec::Vec<ClosedChannelUpdate>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeUpdate {
    #[prost(string, repeated, tag = "1")]
    pub addresses: ::std::vec::Vec<std::string::String>,
    #[prost(string, tag = "2")]
    pub identity_key: std::string::String,
    #[prost(bytes, tag = "3")]
    pub global_features: std::vec::Vec<u8>,
    #[prost(string, tag = "4")]
    pub alias: std::string::String,
    #[prost(string, tag = "5")]
    pub color: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelEdgeUpdate {
    ///*
    ///The unique channel ID for the channel. The first 3 bytes are the block
    ///height, the next 3 the index within the block, and the last 2 bytes are the
    ///output index for the channel.
    #[prost(uint64, tag = "1")]
    pub chan_id: u64,
    #[prost(message, optional, tag = "2")]
    pub chan_point: ::std::option::Option<ChannelPoint>,
    #[prost(int64, tag = "3")]
    pub capacity: i64,
    #[prost(message, optional, tag = "4")]
    pub routing_policy: ::std::option::Option<RoutingPolicy>,
    #[prost(string, tag = "5")]
    pub advertising_node: std::string::String,
    #[prost(string, tag = "6")]
    pub connecting_node: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClosedChannelUpdate {
    ///*
    ///The unique channel ID for the channel. The first 3 bytes are the block
    ///height, the next 3 the index within the block, and the last 2 bytes are the
    ///output index for the channel.
    #[prost(uint64, tag = "1")]
    pub chan_id: u64,
    #[prost(int64, tag = "2")]
    pub capacity: i64,
    #[prost(uint32, tag = "3")]
    pub closed_height: u32,
    #[prost(message, optional, tag = "4")]
    pub chan_point: ::std::option::Option<ChannelPoint>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HopHint {
    //// The public key of the node at the start of the channel.
    #[prost(string, tag = "1")]
    pub node_id: std::string::String,
    //// The unique identifier of the channel.
    #[prost(uint64, tag = "2")]
    pub chan_id: u64,
    //// The base fee of the channel denominated in millisatoshis.
    #[prost(uint32, tag = "3")]
    pub fee_base_msat: u32,
    ///*
    ///The fee rate of the channel for sending one satoshi across it denominated in
    ///millionths of a satoshi.
    #[prost(uint32, tag = "4")]
    pub fee_proportional_millionths: u32,
    //// The time-lock delta of the channel.
    #[prost(uint32, tag = "5")]
    pub cltv_expiry_delta: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteHint {
    ///*
    ///A list of hop hints that when chained together can assist in reaching a
    ///specific destination.
    #[prost(message, repeated, tag = "1")]
    pub hop_hints: ::std::vec::Vec<HopHint>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Invoice {
    ///*
    ///An optional memo to attach along with the invoice. Used for record keeping
    ///purposes for the invoice's creator, and will also be set in the description
    ///field of the encoded payment request if the description_hash field is not
    ///being used.
    #[prost(string, tag = "1")]
    pub memo: std::string::String,
    ///*
    ///The hex-encoded preimage (32 byte) which will allow settling an incoming
    ///HTLC payable to this preimage. When using REST, this field must be encoded
    ///as base64.
    #[prost(bytes, tag = "3")]
    pub r_preimage: std::vec::Vec<u8>,
    ///*
    ///The hash of the preimage. When using REST, this field must be encoded as
    ///base64.
    #[prost(bytes, tag = "4")]
    pub r_hash: std::vec::Vec<u8>,
    ///*
    ///The value of this invoice in satoshis
    ///
    ///The fields value and value_msat are mutually exclusive.
    #[prost(int64, tag = "5")]
    pub value: i64,
    ///*
    ///The value of this invoice in millisatoshis
    ///
    ///The fields value and value_msat are mutually exclusive.
    #[prost(int64, tag = "23")]
    pub value_msat: i64,
    //// Whether this invoice has been fulfilled
    #[prost(bool, tag = "6")]
    pub settled: bool,
    //// When this invoice was created
    #[prost(int64, tag = "7")]
    pub creation_date: i64,
    //// When this invoice was settled
    #[prost(int64, tag = "8")]
    pub settle_date: i64,
    ///*
    ///A bare-bones invoice for a payment within the Lightning Network. With the
    ///details of the invoice, the sender has all the data necessary to send a
    ///payment to the recipient.
    #[prost(string, tag = "9")]
    pub payment_request: std::string::String,
    ///*
    ///Hash (SHA-256) of a description of the payment. Used if the description of
    ///payment (memo) is too long to naturally fit within the description field
    ///of an encoded payment request. When using REST, this field must be encoded
    ///as base64.
    #[prost(bytes, tag = "10")]
    pub description_hash: std::vec::Vec<u8>,
    //// Payment request expiry time in seconds. Default is 3600 (1 hour).
    #[prost(int64, tag = "11")]
    pub expiry: i64,
    //// Fallback on-chain address.
    #[prost(string, tag = "12")]
    pub fallback_addr: std::string::String,
    //// Delta to use for the time-lock of the CLTV extended to the final hop.
    #[prost(uint64, tag = "13")]
    pub cltv_expiry: u64,
    ///*
    ///Route hints that can each be individually used to assist in reaching the
    ///invoice's destination.
    #[prost(message, repeated, tag = "14")]
    pub route_hints: ::std::vec::Vec<RouteHint>,
    //// Whether this invoice should include routing hints for private channels.
    #[prost(bool, tag = "15")]
    pub private: bool,
    ///*
    ///The "add" index of this invoice. Each newly created invoice will increment
    ///this index making it monotonically increasing. Callers to the
    ///SubscribeInvoices call can use this to instantly get notified of all added
    ///invoices with an add_index greater than this one.
    #[prost(uint64, tag = "16")]
    pub add_index: u64,
    ///*
    ///The "settle" index of this invoice. Each newly settled invoice will
    ///increment this index making it monotonically increasing. Callers to the
    ///SubscribeInvoices call can use this to instantly get notified of all
    ///settled invoices with an settle_index greater than this one.
    #[prost(uint64, tag = "17")]
    pub settle_index: u64,
    //// Deprecated, use amt_paid_sat or amt_paid_msat.
    #[prost(int64, tag = "18")]
    pub amt_paid: i64,
    ///*
    ///The amount that was accepted for this invoice, in satoshis. This will ONLY
    ///be set if this invoice has been settled. We provide this field as if the
    ///invoice was created with a zero value, then we need to record what amount
    ///was ultimately accepted. Additionally, it's possible that the sender paid
    ///MORE that was specified in the original invoice. So we'll record that here
    ///as well.
    #[prost(int64, tag = "19")]
    pub amt_paid_sat: i64,
    ///*
    ///The amount that was accepted for this invoice, in millisatoshis. This will
    ///ONLY be set if this invoice has been settled. We provide this field as if
    ///the invoice was created with a zero value, then we need to record what
    ///amount was ultimately accepted. Additionally, it's possible that the sender
    ///paid MORE that was specified in the original invoice. So we'll record that
    ///here as well.
    #[prost(int64, tag = "20")]
    pub amt_paid_msat: i64,
    ///*
    ///The state the invoice is in.
    #[prost(enumeration = "invoice::InvoiceState", tag = "21")]
    pub state: i32,
    //// List of HTLCs paying to this invoice [EXPERIMENTAL].
    #[prost(message, repeated, tag = "22")]
    pub htlcs: ::std::vec::Vec<InvoiceHtlc>,
    //// List of features advertised on the invoice.
    #[prost(map = "uint32, message", tag = "24")]
    pub features: ::std::collections::HashMap<u32, Feature>,
    ///*
    ///Indicates if this invoice was a spontaneous payment that arrived via keysend
    ///[EXPERIMENTAL].
    #[prost(bool, tag = "25")]
    pub is_keysend: bool,
}
pub mod invoice {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum InvoiceState {
        Open = 0,
        Settled = 1,
        Canceled = 2,
        Accepted = 3,
    }
}
//// Details of an HTLC that paid to an invoice
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InvoiceHtlc {
    //// Short channel id over which the htlc was received.
    #[prost(uint64, tag = "1")]
    pub chan_id: u64,
    //// Index identifying the htlc on the channel.
    #[prost(uint64, tag = "2")]
    pub htlc_index: u64,
    //// The amount of the htlc in msat.
    #[prost(uint64, tag = "3")]
    pub amt_msat: u64,
    //// Block height at which this htlc was accepted.
    #[prost(int32, tag = "4")]
    pub accept_height: i32,
    //// Time at which this htlc was accepted.
    #[prost(int64, tag = "5")]
    pub accept_time: i64,
    //// Time at which this htlc was settled or canceled.
    #[prost(int64, tag = "6")]
    pub resolve_time: i64,
    //// Block height at which this htlc expires.
    #[prost(int32, tag = "7")]
    pub expiry_height: i32,
    //// Current state the htlc is in.
    #[prost(enumeration = "InvoiceHtlcState", tag = "8")]
    pub state: i32,
    //// Custom tlv records.
    #[prost(map = "uint64, bytes", tag = "9")]
    pub custom_records: ::std::collections::HashMap<u64, std::vec::Vec<u8>>,
    //// The total amount of the mpp payment in msat.
    #[prost(uint64, tag = "10")]
    pub mpp_total_amt_msat: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddInvoiceResponse {
    #[prost(bytes, tag = "1")]
    pub r_hash: std::vec::Vec<u8>,
    ///*
    ///A bare-bones invoice for a payment within the Lightning Network. With the
    ///details of the invoice, the sender has all the data necessary to send a
    ///payment to the recipient.
    #[prost(string, tag = "2")]
    pub payment_request: std::string::String,
    ///*
    ///The "add" index of this invoice. Each newly created invoice will increment
    ///this index making it monotonically increasing. Callers to the
    ///SubscribeInvoices call can use this to instantly get notified of all added
    ///invoices with an add_index greater than this one.
    #[prost(uint64, tag = "16")]
    pub add_index: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PaymentHash {
    ///*
    ///The hex-encoded payment hash of the invoice to be looked up. The passed
    ///payment hash must be exactly 32 bytes, otherwise an error is returned.
    ///Deprecated now that the REST gateway supports base64 encoding of bytes
    ///fields.
    #[prost(string, tag = "1")]
    pub r_hash_str: std::string::String,
    ///*
    ///The payment hash of the invoice to be looked up. When using REST, this field
    ///must be encoded as base64.
    #[prost(bytes, tag = "2")]
    pub r_hash: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInvoiceRequest {
    ///*
    ///If set, only invoices that are not settled and not canceled will be returned
    ///in the response.
    #[prost(bool, tag = "1")]
    pub pending_only: bool,
    ///*
    ///The index of an invoice that will be used as either the start or end of a
    ///query to determine which invoices should be returned in the response.
    #[prost(uint64, tag = "4")]
    pub index_offset: u64,
    //// The max number of invoices to return in the response to this query.
    #[prost(uint64, tag = "5")]
    pub num_max_invoices: u64,
    ///*
    ///If set, the invoices returned will result from seeking backwards from the
    ///specified index offset. This can be used to paginate backwards.
    #[prost(bool, tag = "6")]
    pub reversed: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInvoiceResponse {
    ///*
    ///A list of invoices from the time slice of the time series specified in the
    ///request.
    #[prost(message, repeated, tag = "1")]
    pub invoices: ::std::vec::Vec<Invoice>,
    ///*
    ///The index of the last item in the set of returned invoices. This can be used
    ///to seek further, pagination style.
    #[prost(uint64, tag = "2")]
    pub last_index_offset: u64,
    ///*
    ///The index of the last item in the set of returned invoices. This can be used
    ///to seek backwards, pagination style.
    #[prost(uint64, tag = "3")]
    pub first_index_offset: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InvoiceSubscription {
    ///*
    ///If specified (non-zero), then we'll first start by sending out
    ///notifications for all added indexes with an add_index greater than this
    ///value. This allows callers to catch up on any events they missed while they
    ///weren't connected to the streaming RPC.
    #[prost(uint64, tag = "1")]
    pub add_index: u64,
    ///*
    ///If specified (non-zero), then we'll first start by sending out
    ///notifications for all settled indexes with an settle_index greater than
    ///this value. This allows callers to catch up on any events they missed while
    ///they weren't connected to the streaming RPC.
    #[prost(uint64, tag = "2")]
    pub settle_index: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Payment {
    //// The payment hash
    #[prost(string, tag = "1")]
    pub payment_hash: std::string::String,
    //// Deprecated, use value_sat or value_msat.
    #[prost(int64, tag = "2")]
    pub value: i64,
    //// Deprecated, use creation_time_ns
    #[prost(int64, tag = "3")]
    pub creation_date: i64,
    //// Deprecated, use fee_sat or fee_msat.
    #[prost(int64, tag = "5")]
    pub fee: i64,
    //// The payment preimage
    #[prost(string, tag = "6")]
    pub payment_preimage: std::string::String,
    //// The value of the payment in satoshis
    #[prost(int64, tag = "7")]
    pub value_sat: i64,
    //// The value of the payment in milli-satoshis
    #[prost(int64, tag = "8")]
    pub value_msat: i64,
    //// The optional payment request being fulfilled.
    #[prost(string, tag = "9")]
    pub payment_request: std::string::String,
    /// The status of the payment.
    #[prost(enumeration = "payment::PaymentStatus", tag = "10")]
    pub status: i32,
    ////  The fee paid for this payment in satoshis
    #[prost(int64, tag = "11")]
    pub fee_sat: i64,
    ////  The fee paid for this payment in milli-satoshis
    #[prost(int64, tag = "12")]
    pub fee_msat: i64,
    //// The time in UNIX nanoseconds at which the payment was created.
    #[prost(int64, tag = "13")]
    pub creation_time_ns: i64,
    //// The HTLCs made in attempt to settle the payment.
    #[prost(message, repeated, tag = "14")]
    pub htlcs: ::std::vec::Vec<HtlcAttempt>,
    ///*
    ///The creation index of this payment. Each payment can be uniquely identified
    ///by this index, which may not strictly increment by 1 for payments made in
    ///older versions of lnd.
    #[prost(uint64, tag = "15")]
    pub payment_index: u64,
    #[prost(enumeration = "PaymentFailureReason", tag = "16")]
    pub failure_reason: i32,
}
pub mod payment {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum PaymentStatus {
        Unknown = 0,
        InFlight = 1,
        Succeeded = 2,
        Failed = 3,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HtlcAttempt {
    //// The status of the HTLC.
    #[prost(enumeration = "htlc_attempt::HtlcStatus", tag = "1")]
    pub status: i32,
    //// The route taken by this HTLC.
    #[prost(message, optional, tag = "2")]
    pub route: ::std::option::Option<Route>,
    //// The time in UNIX nanoseconds at which this HTLC was sent.
    #[prost(int64, tag = "3")]
    pub attempt_time_ns: i64,
    ///*
    ///The time in UNIX nanoseconds at which this HTLC was settled or failed.
    ///This value will not be set if the HTLC is still IN_FLIGHT.
    #[prost(int64, tag = "4")]
    pub resolve_time_ns: i64,
    /// Detailed htlc failure info.
    #[prost(message, optional, tag = "5")]
    pub failure: ::std::option::Option<Failure>,
}
pub mod htlc_attempt {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum HtlcStatus {
        InFlight = 0,
        Succeeded = 1,
        Failed = 2,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPaymentsRequest {
    ///*
    ///If true, then return payments that have not yet fully completed. This means
    ///that pending payments, as well as failed payments will show up if this
    ///field is set to true. This flag doesn't change the meaning of the indices,
    ///which are tied to individual payments.
    #[prost(bool, tag = "1")]
    pub include_incomplete: bool,
    ///*
    ///The index of a payment that will be used as either the start or end of a
    ///query to determine which payments should be returned in the response. The
    ///index_offset is exclusive. In the case of a zero index_offset, the query
    ///will start with the oldest payment when paginating forwards, or will end
    ///with the most recent payment when paginating backwards.
    #[prost(uint64, tag = "2")]
    pub index_offset: u64,
    //// The maximal number of payments returned in the response to this query.
    #[prost(uint64, tag = "3")]
    pub max_payments: u64,
    ///*
    ///If set, the payments returned will result from seeking backwards from the
    ///specified index offset. This can be used to paginate backwards. The order
    ///of the returned payments is always oldest first (ascending index order).
    #[prost(bool, tag = "4")]
    pub reversed: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPaymentsResponse {
    //// The list of payments
    #[prost(message, repeated, tag = "1")]
    pub payments: ::std::vec::Vec<Payment>,
    ///*
    ///The index of the first item in the set of returned payments. This can be
    ///used as the index_offset to continue seeking backwards in the next request.
    #[prost(uint64, tag = "2")]
    pub first_index_offset: u64,
    ///*
    ///The index of the last item in the set of returned payments. This can be used
    ///as the index_offset to continue seeking forwards in the next request.
    #[prost(uint64, tag = "3")]
    pub last_index_offset: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAllPaymentsRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAllPaymentsResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AbandonChannelRequest {
    #[prost(message, optional, tag = "1")]
    pub channel_point: ::std::option::Option<ChannelPoint>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AbandonChannelResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DebugLevelRequest {
    #[prost(bool, tag = "1")]
    pub show: bool,
    #[prost(string, tag = "2")]
    pub level_spec: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DebugLevelResponse {
    #[prost(string, tag = "1")]
    pub sub_systems: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PayReqString {
    //// The payment request string to be decoded
    #[prost(string, tag = "1")]
    pub pay_req: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PayReq {
    #[prost(string, tag = "1")]
    pub destination: std::string::String,
    #[prost(string, tag = "2")]
    pub payment_hash: std::string::String,
    #[prost(int64, tag = "3")]
    pub num_satoshis: i64,
    #[prost(int64, tag = "4")]
    pub timestamp: i64,
    #[prost(int64, tag = "5")]
    pub expiry: i64,
    #[prost(string, tag = "6")]
    pub description: std::string::String,
    #[prost(string, tag = "7")]
    pub description_hash: std::string::String,
    #[prost(string, tag = "8")]
    pub fallback_addr: std::string::String,
    #[prost(int64, tag = "9")]
    pub cltv_expiry: i64,
    #[prost(message, repeated, tag = "10")]
    pub route_hints: ::std::vec::Vec<RouteHint>,
    #[prost(bytes, tag = "11")]
    pub payment_addr: std::vec::Vec<u8>,
    #[prost(int64, tag = "12")]
    pub num_msat: i64,
    #[prost(map = "uint32, message", tag = "13")]
    pub features: ::std::collections::HashMap<u32, Feature>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Feature {
    #[prost(string, tag = "2")]
    pub name: std::string::String,
    #[prost(bool, tag = "3")]
    pub is_required: bool,
    #[prost(bool, tag = "4")]
    pub is_known: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeeReportRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelFeeReport {
    //// The short channel id that this fee report belongs to.
    #[prost(uint64, tag = "5")]
    pub chan_id: u64,
    //// The channel that this fee report belongs to.
    #[prost(string, tag = "1")]
    pub channel_point: std::string::String,
    //// The base fee charged regardless of the number of milli-satoshis sent.
    #[prost(int64, tag = "2")]
    pub base_fee_msat: i64,
    //// The amount charged per milli-satoshis transferred expressed in
    //// millionths of a satoshi.
    #[prost(int64, tag = "3")]
    pub fee_per_mil: i64,
    //// The effective fee rate in milli-satoshis. Computed by dividing the
    //// fee_per_mil value by 1 million.
    #[prost(double, tag = "4")]
    pub fee_rate: f64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeeReportResponse {
    //// An array of channel fee reports which describes the current fee schedule
    //// for each channel.
    #[prost(message, repeated, tag = "1")]
    pub channel_fees: ::std::vec::Vec<ChannelFeeReport>,
    //// The total amount of fee revenue (in satoshis) the switch has collected
    //// over the past 24 hrs.
    #[prost(uint64, tag = "2")]
    pub day_fee_sum: u64,
    //// The total amount of fee revenue (in satoshis) the switch has collected
    //// over the past 1 week.
    #[prost(uint64, tag = "3")]
    pub week_fee_sum: u64,
    //// The total amount of fee revenue (in satoshis) the switch has collected
    //// over the past 1 month.
    #[prost(uint64, tag = "4")]
    pub month_fee_sum: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PolicyUpdateRequest {
    //// The base fee charged regardless of the number of milli-satoshis sent.
    #[prost(int64, tag = "3")]
    pub base_fee_msat: i64,
    //// The effective fee rate in milli-satoshis. The precision of this value
    //// goes up to 6 decimal places, so 1e-6.
    #[prost(double, tag = "4")]
    pub fee_rate: f64,
    //// The required timelock delta for HTLCs forwarded over the channel.
    #[prost(uint32, tag = "5")]
    pub time_lock_delta: u32,
    //// If set, the maximum HTLC size in milli-satoshis. If unset, the maximum
    //// HTLC will be unchanged.
    #[prost(uint64, tag = "6")]
    pub max_htlc_msat: u64,
    //// The minimum HTLC size in milli-satoshis. Only applied if
    //// min_htlc_msat_specified is true.
    #[prost(uint64, tag = "7")]
    pub min_htlc_msat: u64,
    //// If true, min_htlc_msat is applied.
    #[prost(bool, tag = "8")]
    pub min_htlc_msat_specified: bool,
    #[prost(oneof = "policy_update_request::Scope", tags = "1, 2")]
    pub scope: ::std::option::Option<policy_update_request::Scope>,
}
pub mod policy_update_request {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Scope {
        //// If set, then this update applies to all currently active channels.
        #[prost(bool, tag = "1")]
        Global(bool),
        //// If set, this update will target a specific channel.
        #[prost(message, tag = "2")]
        ChanPoint(super::ChannelPoint),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PolicyUpdateResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ForwardingHistoryRequest {
    //// Start time is the starting point of the forwarding history request. All
    //// records beyond this point will be included, respecting the end time, and
    //// the index offset.
    #[prost(uint64, tag = "1")]
    pub start_time: u64,
    //// End time is the end point of the forwarding history request. The
    //// response will carry at most 50k records between the start time and the
    //// end time. The index offset can be used to implement pagination.
    #[prost(uint64, tag = "2")]
    pub end_time: u64,
    //// Index offset is the offset in the time series to start at. As each
    //// response can only contain 50k records, callers can use this to skip
    //// around within a packed time series.
    #[prost(uint32, tag = "3")]
    pub index_offset: u32,
    //// The max number of events to return in the response to this query.
    #[prost(uint32, tag = "4")]
    pub num_max_events: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ForwardingEvent {
    //// Timestamp is the time (unix epoch offset) that this circuit was
    //// completed.
    #[prost(uint64, tag = "1")]
    pub timestamp: u64,
    //// The incoming channel ID that carried the HTLC that created the circuit.
    #[prost(uint64, tag = "2")]
    pub chan_id_in: u64,
    //// The outgoing channel ID that carried the preimage that completed the
    //// circuit.
    #[prost(uint64, tag = "4")]
    pub chan_id_out: u64,
    //// The total amount (in satoshis) of the incoming HTLC that created half
    //// the circuit.
    #[prost(uint64, tag = "5")]
    pub amt_in: u64,
    //// The total amount (in satoshis) of the outgoing HTLC that created the
    //// second half of the circuit.
    #[prost(uint64, tag = "6")]
    pub amt_out: u64,
    //// The total fee (in satoshis) that this payment circuit carried.
    #[prost(uint64, tag = "7")]
    pub fee: u64,
    //// The total fee (in milli-satoshis) that this payment circuit carried.
    #[prost(uint64, tag = "8")]
    pub fee_msat: u64,
    //// The total amount (in milli-satoshis) of the incoming HTLC that created
    //// half the circuit.
    #[prost(uint64, tag = "9")]
    pub amt_in_msat: u64,
    //// The total amount (in milli-satoshis) of the outgoing HTLC that created
    //// the second half of the circuit.
    #[prost(uint64, tag = "10")]
    pub amt_out_msat: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ForwardingHistoryResponse {
    //// A list of forwarding events from the time slice of the time series
    //// specified in the request.
    #[prost(message, repeated, tag = "1")]
    pub forwarding_events: ::std::vec::Vec<ForwardingEvent>,
    //// The index of the last time in the set of returned forwarding events. Can
    //// be used to seek further, pagination style.
    #[prost(uint32, tag = "2")]
    pub last_offset_index: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportChannelBackupRequest {
    //// The target channel point to obtain a back up for.
    #[prost(message, optional, tag = "1")]
    pub chan_point: ::std::option::Option<ChannelPoint>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelBackup {
    ///*
    ///Identifies the channel that this backup belongs to.
    #[prost(message, optional, tag = "1")]
    pub chan_point: ::std::option::Option<ChannelPoint>,
    ///*
    ///Is an encrypted single-chan backup. this can be passed to
    ///RestoreChannelBackups, or the WalletUnlocker Init and Unlock methods in
    ///order to trigger the recovery protocol. When using REST, this field must be
    ///encoded as base64.
    #[prost(bytes, tag = "2")]
    pub chan_backup: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiChanBackup {
    ///*
    ///Is the set of all channels that are included in this multi-channel backup.
    #[prost(message, repeated, tag = "1")]
    pub chan_points: ::std::vec::Vec<ChannelPoint>,
    ///*
    ///A single encrypted blob containing all the static channel backups of the
    ///channel listed above. This can be stored as a single file or blob, and
    ///safely be replaced with any prior/future versions. When using REST, this
    ///field must be encoded as base64.
    #[prost(bytes, tag = "2")]
    pub multi_chan_backup: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChanBackupExportRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChanBackupSnapshot {
    ///*
    ///The set of new channels that have been added since the last channel backup
    ///snapshot was requested.
    #[prost(message, optional, tag = "1")]
    pub single_chan_backups: ::std::option::Option<ChannelBackups>,
    ///*
    ///A multi-channel backup that covers all open channels currently known to
    ///lnd.
    #[prost(message, optional, tag = "2")]
    pub multi_chan_backup: ::std::option::Option<MultiChanBackup>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelBackups {
    ///*
    ///A set of single-chan static channel backups.
    #[prost(message, repeated, tag = "1")]
    pub chan_backups: ::std::vec::Vec<ChannelBackup>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreChanBackupRequest {
    #[prost(oneof = "restore_chan_backup_request::Backup", tags = "1, 2")]
    pub backup: ::std::option::Option<restore_chan_backup_request::Backup>,
}
pub mod restore_chan_backup_request {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Backup {
        ///*
        ///The channels to restore as a list of channel/backup pairs.
        #[prost(message, tag = "1")]
        ChanBackups(super::ChannelBackups),
        ///*
        ///The channels to restore in the packed multi backup format. When using
        ///REST, this field must be encoded as base64.
        #[prost(bytes, tag = "2")]
        MultiChanBackup(std::vec::Vec<u8>),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreBackupResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelBackupSubscription {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerifyChanBackupResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MacaroonPermission {
    //// The entity a permission grants access to.
    #[prost(string, tag = "1")]
    pub entity: std::string::String,
    //// The action that is granted.
    #[prost(string, tag = "2")]
    pub action: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BakeMacaroonRequest {
    //// The list of permissions the new macaroon should grant.
    #[prost(message, repeated, tag = "1")]
    pub permissions: ::std::vec::Vec<MacaroonPermission>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BakeMacaroonResponse {
    //// The hex encoded macaroon, serialized in binary format.
    #[prost(string, tag = "1")]
    pub macaroon: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Failure {
    //// Failure code as defined in the Lightning spec
    #[prost(enumeration = "failure::FailureCode", tag = "1")]
    pub code: i32,
    //// An optional channel update message.
    #[prost(message, optional, tag = "3")]
    pub channel_update: ::std::option::Option<ChannelUpdate>,
    //// A failure type-dependent htlc value.
    #[prost(uint64, tag = "4")]
    pub htlc_msat: u64,
    //// The sha256 sum of the onion payload.
    #[prost(bytes, tag = "5")]
    pub onion_sha_256: std::vec::Vec<u8>,
    //// A failure type-dependent cltv expiry value.
    #[prost(uint32, tag = "6")]
    pub cltv_expiry: u32,
    //// A failure type-dependent flags value.
    #[prost(uint32, tag = "7")]
    pub flags: u32,
    ///*
    ///The position in the path of the intermediate or final node that generated
    ///the failure message. Position zero is the sender node.
    #[prost(uint32, tag = "8")]
    pub failure_source_index: u32,
    //// A failure type-dependent block height.
    #[prost(uint32, tag = "9")]
    pub height: u32,
}
pub mod failure {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum FailureCode {
        ///*
        ///The numbers assigned in this enumeration match the failure codes as
        ///defined in BOLT #4. Because protobuf 3 requires enums to start with 0,
        ///a RESERVED value is added.
        Reserved = 0,
        IncorrectOrUnknownPaymentDetails = 1,
        IncorrectPaymentAmount = 2,
        FinalIncorrectCltvExpiry = 3,
        FinalIncorrectHtlcAmount = 4,
        FinalExpiryTooSoon = 5,
        InvalidRealm = 6,
        ExpiryTooSoon = 7,
        InvalidOnionVersion = 8,
        InvalidOnionHmac = 9,
        InvalidOnionKey = 10,
        AmountBelowMinimum = 11,
        FeeInsufficient = 12,
        IncorrectCltvExpiry = 13,
        ChannelDisabled = 14,
        TemporaryChannelFailure = 15,
        RequiredNodeFeatureMissing = 16,
        RequiredChannelFeatureMissing = 17,
        UnknownNextPeer = 18,
        TemporaryNodeFailure = 19,
        PermanentNodeFailure = 20,
        PermanentChannelFailure = 21,
        ExpiryTooFar = 22,
        MppTimeout = 23,
        ///*
        ///An internal error occurred.
        InternalFailure = 997,
        ///*
        ///The error source is known, but the failure itself couldn't be decoded.
        UnknownFailure = 998,
        ///*
        ///An unreadable failure result is returned if the received failure message
        ///cannot be decrypted. In that case the error source is unknown.
        UnreadableFailure = 999,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelUpdate {
    ///*
    ///The signature that validates the announced data and proves the ownership
    ///of node id.
    #[prost(bytes, tag = "1")]
    pub signature: std::vec::Vec<u8>,
    ///*
    ///The target chain that this channel was opened within. This value
    ///should be the genesis hash of the target chain. Along with the short
    ///channel ID, this uniquely identifies the channel globally in a
    ///blockchain.
    #[prost(bytes, tag = "2")]
    pub chain_hash: std::vec::Vec<u8>,
    ///*
    ///The unique description of the funding transaction.
    #[prost(uint64, tag = "3")]
    pub chan_id: u64,
    ///*
    ///A timestamp that allows ordering in the case of multiple announcements.
    ///We should ignore the message if timestamp is not greater than the
    ///last-received.
    #[prost(uint32, tag = "4")]
    pub timestamp: u32,
    ///*
    ///The bitfield that describes whether optional fields are present in this
    ///update. Currently, the least-significant bit must be set to 1 if the
    ///optional field MaxHtlc is present.
    #[prost(uint32, tag = "10")]
    pub message_flags: u32,
    ///*
    ///The bitfield that describes additional meta-data concerning how the
    ///update is to be interpreted. Currently, the least-significant bit must be
    ///set to 0 if the creating node corresponds to the first node in the
    ///previously sent channel announcement and 1 otherwise. If the second bit
    ///is set, then the channel is set to be disabled.
    #[prost(uint32, tag = "5")]
    pub channel_flags: u32,
    ///*
    ///The minimum number of blocks this node requires to be added to the expiry
    ///of HTLCs. This is a security parameter determined by the node operator.
    ///This value represents the required gap between the time locks of the
    ///incoming and outgoing HTLC's set to this node.
    #[prost(uint32, tag = "6")]
    pub time_lock_delta: u32,
    ///*
    ///The minimum HTLC value which will be accepted.
    #[prost(uint64, tag = "7")]
    pub htlc_minimum_msat: u64,
    ///*
    ///The base fee that must be used for incoming HTLC's to this particular
    ///channel. This value will be tacked onto the required for a payment
    ///independent of the size of the payment.
    #[prost(uint32, tag = "8")]
    pub base_fee: u32,
    ///*
    ///The fee rate that will be charged per millionth of a satoshi.
    #[prost(uint32, tag = "9")]
    pub fee_rate: u32,
    ///*
    ///The maximum HTLC value which will be accepted.
    #[prost(uint64, tag = "11")]
    pub htlc_maximum_msat: u64,
    ///*
    ///The set of data that was appended to this message, some of which we may
    ///not actually know how to iterate or parse. By holding onto this data, we
    ///ensure that we're able to properly validate the set of signatures that
    ///cover these new fields, and ensure we're able to make upgrades to the
    ///network in a forwards compatible manner.
    #[prost(bytes, tag = "12")]
    pub extra_opaque_data: std::vec::Vec<u8>,
}
///*
///`AddressType` has to be one of:
///
///- `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0)
///- `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1)
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AddressType {
    WitnessPubkeyHash = 0,
    NestedPubkeyHash = 1,
    UnusedWitnessPubkeyHash = 2,
    UnusedNestedPubkeyHash = 3,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CommitmentType {
    ///*
    ///A channel using the legacy commitment format having tweaked to_remote
    ///keys.
    Legacy = 0,
    ///*
    ///A channel that uses the modern commitment format where the key in the
    ///output of the remote party does not change each state. This makes back
    ///up and recovery easier as when the channel is closed, the funds go
    ///directly to that key.
    StaticRemoteKey = 1,
    ///*
    ///A channel that uses a commitment format that has anchor outputs on the
    ///commitments, allowing fee bumping after a force close transaction has
    ///been broadcast.
    Anchors = 2,
    ///*
    ///Returned when the commitment type isn't known or unavailable.
    UnknownCommitmentType = 999,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Initiator {
    Unknown = 0,
    Local = 1,
    Remote = 2,
    Both = 3,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NodeMetricType {
    Unknown = 0,
    BetweennessCentrality = 1,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum InvoiceHtlcState {
    Accepted = 0,
    Settled = 1,
    Canceled = 2,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PaymentFailureReason {
    ///*
    ///Payment isn't failed (yet).
    FailureReasonNone = 0,
    ///*
    ///There are more routes to try, but the payment timeout was exceeded.
    FailureReasonTimeout = 1,
    ///*
    ///All possible routes were tried and failed permanently. Or were no
    ///routes to the destination at all.
    FailureReasonNoRoute = 2,
    ///*
    ///A non-recoverable error has occured.
    FailureReasonError = 3,
    ///*
    ///Payment details incorrect (unknown hash, invalid amt or
    ///invalid final cltv delta)
    FailureReasonIncorrectPaymentDetails = 4,
    ///*
    ///Insufficient local balance.
    FailureReasonInsufficientBalance = 5,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FeatureBit {
    DatalossProtectReq = 0,
    DatalossProtectOpt = 1,
    InitialRouingSync = 3,
    UpfrontShutdownScriptReq = 4,
    UpfrontShutdownScriptOpt = 5,
    GossipQueriesReq = 6,
    GossipQueriesOpt = 7,
    TlvOnionReq = 8,
    TlvOnionOpt = 9,
    ExtGossipQueriesReq = 10,
    ExtGossipQueriesOpt = 11,
    StaticRemoteKeyReq = 12,
    StaticRemoteKeyOpt = 13,
    PaymentAddrReq = 14,
    PaymentAddrOpt = 15,
    MppReq = 16,
    MppOpt = 17,
}
#[doc = r" Generated client implementations."]
pub mod wallet_unlocker_client {
    #![allow(unused_variables, dead_code, missing_docs)]
    use tonic::codegen::*;
    #[doc = " The WalletUnlocker service is used to set up a wallet password for"]
    #[doc = " lnd at first startup, and unlock a previously set up wallet."]
    pub struct WalletUnlockerClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl WalletUnlockerClient<tonic::transport::Channel> {
        #[doc = r" Attempt to create a new client by connecting to a given endpoint."]
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: std::convert::TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> WalletUnlockerClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::ResponseBody: Body + HttpBody + Send + 'static,
        T::Error: Into<StdError>,
        <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_interceptor(inner: T, interceptor: impl Into<tonic::Interceptor>) -> Self {
            let inner = tonic::client::Grpc::with_interceptor(inner, interceptor);
            Self { inner }
        }
        #[doc = "*"]
        #[doc = "GenSeed is the first method that should be used to instantiate a new lnd"]
        #[doc = "instance. This method allows a caller to generate a new aezeed cipher seed"]
        #[doc = "given an optional passphrase. If provided, the passphrase will be necessary"]
        #[doc = "to decrypt the cipherseed to expose the internal wallet seed."]
        #[doc = ""]
        #[doc = "Once the cipherseed is obtained and verified by the user, the InitWallet"]
        #[doc = "method should be used to commit the newly generated seed, and create the"]
        #[doc = "wallet."]
        pub async fn gen_seed(
            &mut self,
            request: impl tonic::IntoRequest<super::GenSeedRequest>,
        ) -> Result<tonic::Response<super::GenSeedResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.WalletUnlocker/GenSeed");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "*"]
        #[doc = "InitWallet is used when lnd is starting up for the first time to fully"]
        #[doc = "initialize the daemon and its internal wallet. At the very least a wallet"]
        #[doc = "password must be provided. This will be used to encrypt sensitive material"]
        #[doc = "on disk."]
        #[doc = ""]
        #[doc = "In the case of a recovery scenario, the user can also specify their aezeed"]
        #[doc = "mnemonic and passphrase. If set, then the daemon will use this prior state"]
        #[doc = "to initialize its internal wallet."]
        #[doc = ""]
        #[doc = "Alternatively, this can be used along with the GenSeed RPC to obtain a"]
        #[doc = "seed, then present it to the user. Once it has been verified by the user,"]
        #[doc = "the seed can be fed into this RPC in order to commit the new wallet."]
        pub async fn init_wallet(
            &mut self,
            request: impl tonic::IntoRequest<super::InitWalletRequest>,
        ) -> Result<tonic::Response<super::InitWalletResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.WalletUnlocker/InitWallet");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `unlock`"]
        #[doc = "UnlockWallet is used at startup of lnd to provide a password to unlock"]
        #[doc = "the wallet database."]
        pub async fn unlock_wallet(
            &mut self,
            request: impl tonic::IntoRequest<super::UnlockWalletRequest>,
        ) -> Result<tonic::Response<super::UnlockWalletResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.WalletUnlocker/UnlockWallet");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `changepassword`"]
        #[doc = "ChangePassword changes the password of the encrypted wallet. This will"]
        #[doc = "automatically unlock the wallet database if successful."]
        pub async fn change_password(
            &mut self,
            request: impl tonic::IntoRequest<super::ChangePasswordRequest>,
        ) -> Result<tonic::Response<super::ChangePasswordResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.WalletUnlocker/ChangePassword");
            self.inner.unary(request.into_request(), path, codec).await
        }
    }
    impl<T: Clone> Clone for WalletUnlockerClient<T> {
        fn clone(&self) -> Self {
            Self {
                inner: self.inner.clone(),
            }
        }
    }
    impl<T> std::fmt::Debug for WalletUnlockerClient<T> {
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
            write!(f, "WalletUnlockerClient {{ ... }}")
        }
    }
}
#[doc = r" Generated client implementations."]
pub mod lightning_client {
    #![allow(unused_variables, dead_code, missing_docs)]
    use tonic::codegen::*;
    pub struct LightningClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl LightningClient<tonic::transport::Channel> {
        #[doc = r" Attempt to create a new client by connecting to a given endpoint."]
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: std::convert::TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> LightningClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::ResponseBody: Body + HttpBody + Send + 'static,
        T::Error: Into<StdError>,
        <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_interceptor(inner: T, interceptor: impl Into<tonic::Interceptor>) -> Self {
            let inner = tonic::client::Grpc::with_interceptor(inner, interceptor);
            Self { inner }
        }
        #[doc = "* lncli: `walletbalance`"]
        #[doc = "WalletBalance returns total unspent outputs(confirmed and unconfirmed), all"]
        #[doc = "confirmed unspent outputs and all unconfirmed unspent outputs under control"]
        #[doc = "of the wallet."]
        pub async fn wallet_balance(
            &mut self,
            request: impl tonic::IntoRequest<super::WalletBalanceRequest>,
        ) -> Result<tonic::Response<super::WalletBalanceResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/WalletBalance");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `channelbalance`"]
        #[doc = "ChannelBalance returns the total funds available across all open channels"]
        #[doc = "in satoshis."]
        pub async fn channel_balance(
            &mut self,
            request: impl tonic::IntoRequest<super::ChannelBalanceRequest>,
        ) -> Result<tonic::Response<super::ChannelBalanceResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/ChannelBalance");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `listchaintxns`"]
        #[doc = "GetTransactions returns a list describing all the known transactions"]
        #[doc = "relevant to the wallet."]
        pub async fn get_transactions(
            &mut self,
            request: impl tonic::IntoRequest<super::GetTransactionsRequest>,
        ) -> Result<tonic::Response<super::TransactionDetails>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/GetTransactions");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `estimatefee`"]
        #[doc = "EstimateFee asks the chain backend to estimate the fee rate and total fees"]
        #[doc = "for a transaction that pays to multiple specified outputs."]
        pub async fn estimate_fee(
            &mut self,
            request: impl tonic::IntoRequest<super::EstimateFeeRequest>,
        ) -> Result<tonic::Response<super::EstimateFeeResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/EstimateFee");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `sendcoins`"]
        #[doc = "SendCoins executes a request to send coins to a particular address. Unlike"]
        #[doc = "SendMany, this RPC call only allows creating a single output at a time. If"]
        #[doc = "neither target_conf, or sat_per_byte are set, then the internal wallet will"]
        #[doc = "consult its fee model to determine a fee for the default confirmation"]
        #[doc = "target."]
        pub async fn send_coins(
            &mut self,
            request: impl tonic::IntoRequest<super::SendCoinsRequest>,
        ) -> Result<tonic::Response<super::SendCoinsResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/SendCoins");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `listunspent`"]
        #[doc = "ListUnspent returns a list of all utxos spendable by the wallet with a"]
        #[doc = "number of confirmations between the specified minimum and maximum."]
        pub async fn list_unspent(
            &mut self,
            request: impl tonic::IntoRequest<super::ListUnspentRequest>,
        ) -> Result<tonic::Response<super::ListUnspentResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/ListUnspent");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "*"]
        #[doc = "SubscribeTransactions creates a uni-directional stream from the server to"]
        #[doc = "the client in which any newly discovered transactions relevant to the"]
        #[doc = "wallet are sent over."]
        pub async fn subscribe_transactions(
            &mut self,
            request: impl tonic::IntoRequest<super::GetTransactionsRequest>,
        ) -> Result<tonic::Response<tonic::codec::Streaming<super::Transaction>>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path =
                http::uri::PathAndQuery::from_static("/lnrpc.Lightning/SubscribeTransactions");
            self.inner
                .server_streaming(request.into_request(), path, codec)
                .await
        }
        #[doc = "* lncli: `sendmany`"]
        #[doc = "SendMany handles a request for a transaction that creates multiple specified"]
        #[doc = "outputs in parallel. If neither target_conf, or sat_per_byte are set, then"]
        #[doc = "the internal wallet will consult its fee model to determine a fee for the"]
        #[doc = "default confirmation target."]
        pub async fn send_many(
            &mut self,
            request: impl tonic::IntoRequest<super::SendManyRequest>,
        ) -> Result<tonic::Response<super::SendManyResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/SendMany");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `newaddress`"]
        #[doc = "NewAddress creates a new address under control of the local wallet."]
        pub async fn new_address(
            &mut self,
            request: impl tonic::IntoRequest<super::NewAddressRequest>,
        ) -> Result<tonic::Response<super::NewAddressResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/NewAddress");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `signmessage`"]
        #[doc = "SignMessage signs a message with this node's private key. The returned"]
        #[doc = "signature string is `zbase32` encoded and pubkey recoverable, meaning that"]
        #[doc = "only the message digest and signature are needed for verification."]
        pub async fn sign_message(
            &mut self,
            request: impl tonic::IntoRequest<super::SignMessageRequest>,
        ) -> Result<tonic::Response<super::SignMessageResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/SignMessage");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `verifymessage`"]
        #[doc = "VerifyMessage verifies a signature over a msg. The signature must be"]
        #[doc = "zbase32 encoded and signed by an active node in the resident node's"]
        #[doc = "channel database. In addition to returning the validity of the signature,"]
        #[doc = "VerifyMessage also returns the recovered pubkey from the signature."]
        pub async fn verify_message(
            &mut self,
            request: impl tonic::IntoRequest<super::VerifyMessageRequest>,
        ) -> Result<tonic::Response<super::VerifyMessageResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/VerifyMessage");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `connect`"]
        #[doc = "ConnectPeer attempts to establish a connection to a remote peer. This is at"]
        #[doc = "the networking level, and is used for communication between nodes. This is"]
        #[doc = "distinct from establishing a channel with a peer."]
        pub async fn connect_peer(
            &mut self,
            request: impl tonic::IntoRequest<super::ConnectPeerRequest>,
        ) -> Result<tonic::Response<super::ConnectPeerResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/ConnectPeer");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `disconnect`"]
        #[doc = "DisconnectPeer attempts to disconnect one peer from another identified by a"]
        #[doc = "given pubKey. In the case that we currently have a pending or active channel"]
        #[doc = "with the target peer, then this action will be not be allowed."]
        pub async fn disconnect_peer(
            &mut self,
            request: impl tonic::IntoRequest<super::DisconnectPeerRequest>,
        ) -> Result<tonic::Response<super::DisconnectPeerResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/DisconnectPeer");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `listpeers`"]
        #[doc = "ListPeers returns a verbose listing of all currently active peers."]
        pub async fn list_peers(
            &mut self,
            request: impl tonic::IntoRequest<super::ListPeersRequest>,
        ) -> Result<tonic::Response<super::ListPeersResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/ListPeers");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "*"]
        #[doc = "SubscribePeerEvents creates a uni-directional stream from the server to"]
        #[doc = "the client in which any events relevant to the state of peers are sent"]
        #[doc = "over. Events include peers going online and offline."]
        pub async fn subscribe_peer_events(
            &mut self,
            request: impl tonic::IntoRequest<super::PeerEventSubscription>,
        ) -> Result<tonic::Response<tonic::codec::Streaming<super::PeerEvent>>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/SubscribePeerEvents");
            self.inner
                .server_streaming(request.into_request(), path, codec)
                .await
        }
        #[doc = "* lncli: `getinfo`"]
        #[doc = "GetInfo returns general information concerning the lightning node including"]
        #[doc = "it's identity pubkey, alias, the chains it is connected to, and information"]
        #[doc = "concerning the number of open+pending channels."]
        pub async fn get_info(
            &mut self,
            request: impl tonic::IntoRequest<super::GetInfoRequest>,
        ) -> Result<tonic::Response<super::GetInfoResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/GetInfo");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `pendingchannels`"]
        #[doc = "PendingChannels returns a list of all the channels that are currently"]
        #[doc = "considered \"pending\". A channel is pending if it has finished the funding"]
        #[doc = "workflow and is waiting for confirmations for the funding txn, or is in the"]
        #[doc = "process of closure, either initiated cooperatively or non-cooperatively."]
        pub async fn pending_channels(
            &mut self,
            request: impl tonic::IntoRequest<super::PendingChannelsRequest>,
        ) -> Result<tonic::Response<super::PendingChannelsResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/PendingChannels");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `listchannels`"]
        #[doc = "ListChannels returns a description of all the open channels that this node"]
        #[doc = "is a participant in."]
        pub async fn list_channels(
            &mut self,
            request: impl tonic::IntoRequest<super::ListChannelsRequest>,
        ) -> Result<tonic::Response<super::ListChannelsResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/ListChannels");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "*"]
        #[doc = "SubscribeChannelEvents creates a uni-directional stream from the server to"]
        #[doc = "the client in which any updates relevant to the state of the channels are"]
        #[doc = "sent over. Events include new active channels, inactive channels, and closed"]
        #[doc = "channels."]
        pub async fn subscribe_channel_events(
            &mut self,
            request: impl tonic::IntoRequest<super::ChannelEventSubscription>,
        ) -> Result<
            tonic::Response<tonic::codec::Streaming<super::ChannelEventUpdate>>,
            tonic::Status,
        > {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path =
                http::uri::PathAndQuery::from_static("/lnrpc.Lightning/SubscribeChannelEvents");
            self.inner
                .server_streaming(request.into_request(), path, codec)
                .await
        }
        #[doc = "* lncli: `closedchannels`"]
        #[doc = "ClosedChannels returns a description of all the closed channels that"]
        #[doc = "this node was a participant in."]
        pub async fn closed_channels(
            &mut self,
            request: impl tonic::IntoRequest<super::ClosedChannelsRequest>,
        ) -> Result<tonic::Response<super::ClosedChannelsResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/ClosedChannels");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "*"]
        #[doc = "OpenChannelSync is a synchronous version of the OpenChannel RPC call. This"]
        #[doc = "call is meant to be consumed by clients to the REST proxy. As with all"]
        #[doc = "other sync calls, all byte slices are intended to be populated as hex"]
        #[doc = "encoded strings."]
        pub async fn open_channel_sync(
            &mut self,
            request: impl tonic::IntoRequest<super::OpenChannelRequest>,
        ) -> Result<tonic::Response<super::ChannelPoint>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/OpenChannelSync");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `openchannel`"]
        #[doc = "OpenChannel attempts to open a singly funded channel specified in the"]
        #[doc = "request to a remote peer. Users are able to specify a target number of"]
        #[doc = "blocks that the funding transaction should be confirmed in, or a manual fee"]
        #[doc = "rate to us for the funding transaction. If neither are specified, then a"]
        #[doc = "lax block confirmation target is used. Each OpenStatusUpdate will return"]
        #[doc = "the pending channel ID of the in-progress channel. Depending on the"]
        #[doc = "arguments specified in the OpenChannelRequest, this pending channel ID can"]
        #[doc = "then be used to manually progress the channel funding flow."]
        pub async fn open_channel(
            &mut self,
            request: impl tonic::IntoRequest<super::OpenChannelRequest>,
        ) -> Result<tonic::Response<tonic::codec::Streaming<super::OpenStatusUpdate>>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/OpenChannel");
            self.inner
                .server_streaming(request.into_request(), path, codec)
                .await
        }
        #[doc = "*"]
        #[doc = "FundingStateStep is an advanced funding related call that allows the caller"]
        #[doc = "to either execute some preparatory steps for a funding workflow, or"]
        #[doc = "manually progress a funding workflow. The primary way a funding flow is"]
        #[doc = "identified is via its pending channel ID. As an example, this method can be"]
        #[doc = "used to specify that we're expecting a funding flow for a particular"]
        #[doc = "pending channel ID, for which we need to use specific parameters."]
        #[doc = "Alternatively, this can be used to interactively drive PSBT signing for"]
        #[doc = "funding for partially complete funding transactions."]
        pub async fn funding_state_step(
            &mut self,
            request: impl tonic::IntoRequest<super::FundingTransitionMsg>,
        ) -> Result<tonic::Response<super::FundingStateStepResp>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/FundingStateStep");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "*"]
        #[doc = "ChannelAcceptor dispatches a bi-directional streaming RPC in which"]
        #[doc = "OpenChannel requests are sent to the client and the client responds with"]
        #[doc = "a boolean that tells LND whether or not to accept the channel. This allows"]
        #[doc = "node operators to specify their own criteria for accepting inbound channels"]
        #[doc = "through a single persistent connection."]
        pub async fn channel_acceptor(
            &mut self,
            request: impl tonic::IntoStreamingRequest<Message = super::ChannelAcceptResponse>,
        ) -> Result<
            tonic::Response<tonic::codec::Streaming<super::ChannelAcceptRequest>>,
            tonic::Status,
        > {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/ChannelAcceptor");
            self.inner
                .streaming(request.into_streaming_request(), path, codec)
                .await
        }
        #[doc = "* lncli: `closechannel`"]
        #[doc = "CloseChannel attempts to close an active channel identified by its channel"]
        #[doc = "outpoint (ChannelPoint). The actions of this method can additionally be"]
        #[doc = "augmented to attempt a force close after a timeout period in the case of an"]
        #[doc = "inactive peer. If a non-force close (cooperative closure) is requested,"]
        #[doc = "then the user can specify either a target number of blocks until the"]
        #[doc = "closure transaction is confirmed, or a manual fee rate. If neither are"]
        #[doc = "specified, then a default lax, block confirmation target is used."]
        pub async fn close_channel(
            &mut self,
            request: impl tonic::IntoRequest<super::CloseChannelRequest>,
        ) -> Result<tonic::Response<tonic::codec::Streaming<super::CloseStatusUpdate>>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/CloseChannel");
            self.inner
                .server_streaming(request.into_request(), path, codec)
                .await
        }
        #[doc = "* lncli: `abandonchannel`"]
        #[doc = "AbandonChannel removes all channel state from the database except for a"]
        #[doc = "close summary. This method can be used to get rid of permanently unusable"]
        #[doc = "channels due to bugs fixed in newer versions of lnd. Only available"]
        #[doc = "when in debug builds of lnd."]
        pub async fn abandon_channel(
            &mut self,
            request: impl tonic::IntoRequest<super::AbandonChannelRequest>,
        ) -> Result<tonic::Response<super::AbandonChannelResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/AbandonChannel");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `sendpayment`"]
        #[doc = "Deprecated, use routerrpc.SendPayment. SendPayment dispatches a"]
        #[doc = "bi-directional streaming RPC for sending payments through the Lightning"]
        #[doc = "Network. A single RPC invocation creates a persistent bi-directional"]
        #[doc = "stream allowing clients to rapidly send payments through the Lightning"]
        #[doc = "Network with a single persistent connection."]
        pub async fn send_payment(
            &mut self,
            request: impl tonic::IntoStreamingRequest<Message = super::SendRequest>,
        ) -> Result<tonic::Response<tonic::codec::Streaming<super::SendResponse>>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/SendPayment");
            self.inner
                .streaming(request.into_streaming_request(), path, codec)
                .await
        }
        #[doc = "*"]
        #[doc = "SendPaymentSync is the synchronous non-streaming version of SendPayment."]
        #[doc = "This RPC is intended to be consumed by clients of the REST proxy."]
        #[doc = "Additionally, this RPC expects the destination's public key and the payment"]
        #[doc = "hash (if any) to be encoded as hex strings."]
        pub async fn send_payment_sync(
            &mut self,
            request: impl tonic::IntoRequest<super::SendRequest>,
        ) -> Result<tonic::Response<super::SendResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/SendPaymentSync");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `sendtoroute`"]
        #[doc = "SendToRoute is a bi-directional streaming RPC for sending payment through"]
        #[doc = "the Lightning Network. This method differs from SendPayment in that it"]
        #[doc = "allows users to specify a full route manually. This can be used for things"]
        #[doc = "like rebalancing, and atomic swaps."]
        pub async fn send_to_route(
            &mut self,
            request: impl tonic::IntoStreamingRequest<Message = super::SendToRouteRequest>,
        ) -> Result<tonic::Response<tonic::codec::Streaming<super::SendResponse>>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/SendToRoute");
            self.inner
                .streaming(request.into_streaming_request(), path, codec)
                .await
        }
        #[doc = "*"]
        #[doc = "SendToRouteSync is a synchronous version of SendToRoute. It Will block"]
        #[doc = "until the payment either fails or succeeds."]
        pub async fn send_to_route_sync(
            &mut self,
            request: impl tonic::IntoRequest<super::SendToRouteRequest>,
        ) -> Result<tonic::Response<super::SendResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/SendToRouteSync");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `addinvoice`"]
        #[doc = "AddInvoice attempts to add a new invoice to the invoice database. Any"]
        #[doc = "duplicated invoices are rejected, therefore all invoices *must* have a"]
        #[doc = "unique payment preimage."]
        pub async fn add_invoice(
            &mut self,
            request: impl tonic::IntoRequest<super::Invoice>,
        ) -> Result<tonic::Response<super::AddInvoiceResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/AddInvoice");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `listinvoices`"]
        #[doc = "ListInvoices returns a list of all the invoices currently stored within the"]
        #[doc = "database. Any active debug invoices are ignored. It has full support for"]
        #[doc = "paginated responses, allowing users to query for specific invoices through"]
        #[doc = "their add_index. This can be done by using either the first_index_offset or"]
        #[doc = "last_index_offset fields included in the response as the index_offset of the"]
        #[doc = "next request. By default, the first 100 invoices created will be returned."]
        #[doc = "Backwards pagination is also supported through the Reversed flag."]
        pub async fn list_invoices(
            &mut self,
            request: impl tonic::IntoRequest<super::ListInvoiceRequest>,
        ) -> Result<tonic::Response<super::ListInvoiceResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/ListInvoices");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `lookupinvoice`"]
        #[doc = "LookupInvoice attempts to look up an invoice according to its payment hash."]
        #[doc = "The passed payment hash *must* be exactly 32 bytes, if not, an error is"]
        #[doc = "returned."]
        pub async fn lookup_invoice(
            &mut self,
            request: impl tonic::IntoRequest<super::PaymentHash>,
        ) -> Result<tonic::Response<super::Invoice>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/LookupInvoice");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "*"]
        #[doc = "SubscribeInvoices returns a uni-directional stream (server -> client) for"]
        #[doc = "notifying the client of newly added/settled invoices. The caller can"]
        #[doc = "optionally specify the add_index and/or the settle_index. If the add_index"]
        #[doc = "is specified, then we'll first start by sending add invoice events for all"]
        #[doc = "invoices with an add_index greater than the specified value. If the"]
        #[doc = "settle_index is specified, the next, we'll send out all settle events for"]
        #[doc = "invoices with a settle_index greater than the specified value. One or both"]
        #[doc = "of these fields can be set. If no fields are set, then we'll only send out"]
        #[doc = "the latest add/settle events."]
        pub async fn subscribe_invoices(
            &mut self,
            request: impl tonic::IntoRequest<super::InvoiceSubscription>,
        ) -> Result<tonic::Response<tonic::codec::Streaming<super::Invoice>>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/SubscribeInvoices");
            self.inner
                .server_streaming(request.into_request(), path, codec)
                .await
        }
        #[doc = "* lncli: `decodepayreq`"]
        #[doc = "DecodePayReq takes an encoded payment request string and attempts to decode"]
        #[doc = "it, returning a full description of the conditions encoded within the"]
        #[doc = "payment request."]
        pub async fn decode_pay_req(
            &mut self,
            request: impl tonic::IntoRequest<super::PayReqString>,
        ) -> Result<tonic::Response<super::PayReq>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/DecodePayReq");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `listpayments`"]
        #[doc = "ListPayments returns a list of all outgoing payments."]
        pub async fn list_payments(
            &mut self,
            request: impl tonic::IntoRequest<super::ListPaymentsRequest>,
        ) -> Result<tonic::Response<super::ListPaymentsResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/ListPayments");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "*"]
        #[doc = "DeleteAllPayments deletes all outgoing payments from DB."]
        pub async fn delete_all_payments(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteAllPaymentsRequest>,
        ) -> Result<tonic::Response<super::DeleteAllPaymentsResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/DeleteAllPayments");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `describegraph`"]
        #[doc = "DescribeGraph returns a description of the latest graph state from the"]
        #[doc = "point of view of the node. The graph information is partitioned into two"]
        #[doc = "components: all the nodes/vertexes, and all the edges that connect the"]
        #[doc = "vertexes themselves. As this is a directed graph, the edges also contain"]
        #[doc = "the node directional specific routing policy which includes: the time lock"]
        #[doc = "delta, fee information, etc."]
        pub async fn describe_graph(
            &mut self,
            request: impl tonic::IntoRequest<super::ChannelGraphRequest>,
        ) -> Result<tonic::Response<super::ChannelGraph>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/DescribeGraph");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `getnodemetrics`"]
        #[doc = "GetNodeMetrics returns node metrics calculated from the graph. Currently"]
        #[doc = "the only supported metric is betweenness centrality of individual nodes."]
        pub async fn get_node_metrics(
            &mut self,
            request: impl tonic::IntoRequest<super::NodeMetricsRequest>,
        ) -> Result<tonic::Response<super::NodeMetricsResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/GetNodeMetrics");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `getchaninfo`"]
        #[doc = "GetChanInfo returns the latest authenticated network announcement for the"]
        #[doc = "given channel identified by its channel ID: an 8-byte integer which"]
        #[doc = "uniquely identifies the location of transaction's funding output within the"]
        #[doc = "blockchain."]
        pub async fn get_chan_info(
            &mut self,
            request: impl tonic::IntoRequest<super::ChanInfoRequest>,
        ) -> Result<tonic::Response<super::ChannelEdge>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/GetChanInfo");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `getnodeinfo`"]
        #[doc = "GetNodeInfo returns the latest advertised, aggregated, and authenticated"]
        #[doc = "channel information for the specified node identified by its public key."]
        pub async fn get_node_info(
            &mut self,
            request: impl tonic::IntoRequest<super::NodeInfoRequest>,
        ) -> Result<tonic::Response<super::NodeInfo>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/GetNodeInfo");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `queryroutes`"]
        #[doc = "QueryRoutes attempts to query the daemon's Channel Router for a possible"]
        #[doc = "route to a target destination capable of carrying a specific amount of"]
        #[doc = "satoshis. The returned route contains the full details required to craft and"]
        #[doc = "send an HTLC, also including the necessary information that should be"]
        #[doc = "present within the Sphinx packet encapsulated within the HTLC."]
        pub async fn query_routes(
            &mut self,
            request: impl tonic::IntoRequest<super::QueryRoutesRequest>,
        ) -> Result<tonic::Response<super::QueryRoutesResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/QueryRoutes");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `getnetworkinfo`"]
        #[doc = "GetNetworkInfo returns some basic stats about the known channel graph from"]
        #[doc = "the point of view of the node."]
        pub async fn get_network_info(
            &mut self,
            request: impl tonic::IntoRequest<super::NetworkInfoRequest>,
        ) -> Result<tonic::Response<super::NetworkInfo>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/GetNetworkInfo");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `stop`"]
        #[doc = "StopDaemon will send a shutdown request to the interrupt handler, triggering"]
        #[doc = "a graceful shutdown of the daemon."]
        pub async fn stop_daemon(
            &mut self,
            request: impl tonic::IntoRequest<super::StopRequest>,
        ) -> Result<tonic::Response<super::StopResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/StopDaemon");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "*"]
        #[doc = "SubscribeChannelGraph launches a streaming RPC that allows the caller to"]
        #[doc = "receive notifications upon any changes to the channel graph topology from"]
        #[doc = "the point of view of the responding node. Events notified include: new"]
        #[doc = "nodes coming online, nodes updating their authenticated attributes, new"]
        #[doc = "channels being advertised, updates in the routing policy for a directional"]
        #[doc = "channel edge, and when channels are closed on-chain."]
        pub async fn subscribe_channel_graph(
            &mut self,
            request: impl tonic::IntoRequest<super::GraphTopologySubscription>,
        ) -> Result<
            tonic::Response<tonic::codec::Streaming<super::GraphTopologyUpdate>>,
            tonic::Status,
        > {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path =
                http::uri::PathAndQuery::from_static("/lnrpc.Lightning/SubscribeChannelGraph");
            self.inner
                .server_streaming(request.into_request(), path, codec)
                .await
        }
        #[doc = "* lncli: `debuglevel`"]
        #[doc = "DebugLevel allows a caller to programmatically set the logging verbosity of"]
        #[doc = "lnd. The logging can be targeted according to a coarse daemon-wide logging"]
        #[doc = "level, or in a granular fashion to specify the logging for a target"]
        #[doc = "sub-system."]
        pub async fn debug_level(
            &mut self,
            request: impl tonic::IntoRequest<super::DebugLevelRequest>,
        ) -> Result<tonic::Response<super::DebugLevelResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/DebugLevel");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `feereport`"]
        #[doc = "FeeReport allows the caller to obtain a report detailing the current fee"]
        #[doc = "schedule enforced by the node globally for each channel."]
        pub async fn fee_report(
            &mut self,
            request: impl tonic::IntoRequest<super::FeeReportRequest>,
        ) -> Result<tonic::Response<super::FeeReportResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/FeeReport");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `updatechanpolicy`"]
        #[doc = "UpdateChannelPolicy allows the caller to update the fee schedule and"]
        #[doc = "channel policies for all channels globally, or a particular channel."]
        pub async fn update_channel_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::PolicyUpdateRequest>,
        ) -> Result<tonic::Response<super::PolicyUpdateResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/UpdateChannelPolicy");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `fwdinghistory`"]
        #[doc = "ForwardingHistory allows the caller to query the htlcswitch for a record of"]
        #[doc = "all HTLCs forwarded within the target time range, and integer offset"]
        #[doc = "within that time range. If no time-range is specified, then the first chunk"]
        #[doc = "of the past 24 hrs of forwarding history are returned."]
        #[doc = ""]
        #[doc = "A list of forwarding events are returned. The size of each forwarding event"]
        #[doc = "is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB."]
        #[doc = "As a result each message can only contain 50k entries. Each response has"]
        #[doc = "the index offset of the last entry. The index offset can be provided to the"]
        #[doc = "request to allow the caller to skip a series of records."]
        pub async fn forwarding_history(
            &mut self,
            request: impl tonic::IntoRequest<super::ForwardingHistoryRequest>,
        ) -> Result<tonic::Response<super::ForwardingHistoryResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/ForwardingHistory");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `exportchanbackup`"]
        #[doc = "ExportChannelBackup attempts to return an encrypted static channel backup"]
        #[doc = "for the target channel identified by it channel point. The backup is"]
        #[doc = "encrypted with a key generated from the aezeed seed of the user. The"]
        #[doc = "returned backup can either be restored using the RestoreChannelBackup"]
        #[doc = "method once lnd is running, or via the InitWallet and UnlockWallet methods"]
        #[doc = "from the WalletUnlocker service."]
        pub async fn export_channel_backup(
            &mut self,
            request: impl tonic::IntoRequest<super::ExportChannelBackupRequest>,
        ) -> Result<tonic::Response<super::ChannelBackup>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/ExportChannelBackup");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "*"]
        #[doc = "ExportAllChannelBackups returns static channel backups for all existing"]
        #[doc = "channels known to lnd. A set of regular singular static channel backups for"]
        #[doc = "each channel are returned. Additionally, a multi-channel backup is returned"]
        #[doc = "as well, which contains a single encrypted blob containing the backups of"]
        #[doc = "each channel."]
        pub async fn export_all_channel_backups(
            &mut self,
            request: impl tonic::IntoRequest<super::ChanBackupExportRequest>,
        ) -> Result<tonic::Response<super::ChanBackupSnapshot>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path =
                http::uri::PathAndQuery::from_static("/lnrpc.Lightning/ExportAllChannelBackups");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "*"]
        #[doc = "VerifyChanBackup allows a caller to verify the integrity of a channel backup"]
        #[doc = "snapshot. This method will accept either a packed Single or a packed Multi."]
        #[doc = "Specifying both will result in an error."]
        pub async fn verify_chan_backup(
            &mut self,
            request: impl tonic::IntoRequest<super::ChanBackupSnapshot>,
        ) -> Result<tonic::Response<super::VerifyChanBackupResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/VerifyChanBackup");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "* lncli: `restorechanbackup`"]
        #[doc = "RestoreChannelBackups accepts a set of singular channel backups, or a"]
        #[doc = "single encrypted multi-chan backup and attempts to recover any funds"]
        #[doc = "remaining within the channel. If we are able to unpack the backup, then the"]
        #[doc = "new channel will be shown under listchannels, as well as pending channels."]
        pub async fn restore_channel_backups(
            &mut self,
            request: impl tonic::IntoRequest<super::RestoreChanBackupRequest>,
        ) -> Result<tonic::Response<super::RestoreBackupResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path =
                http::uri::PathAndQuery::from_static("/lnrpc.Lightning/RestoreChannelBackups");
            self.inner.unary(request.into_request(), path, codec).await
        }
        #[doc = "*"]
        #[doc = "SubscribeChannelBackups allows a client to sub-subscribe to the most up to"]
        #[doc = "date information concerning the state of all channel backups. Each time a"]
        #[doc = "new channel is added, we return the new set of channels, along with a"]
        #[doc = "multi-chan backup containing the backup info for all channels. Each time a"]
        #[doc = "channel is closed, we send a new update, which contains new new chan back"]
        #[doc = "ups, but the updated set of encrypted multi-chan backups with the closed"]
        #[doc = "channel(s) removed."]
        pub async fn subscribe_channel_backups(
            &mut self,
            request: impl tonic::IntoRequest<super::ChannelBackupSubscription>,
        ) -> Result<
            tonic::Response<tonic::codec::Streaming<super::ChanBackupSnapshot>>,
            tonic::Status,
        > {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path =
                http::uri::PathAndQuery::from_static("/lnrpc.Lightning/SubscribeChannelBackups");
            self.inner
                .server_streaming(request.into_request(), path, codec)
                .await
        }
        #[doc = "* lncli: `bakemacaroon`"]
        #[doc = "BakeMacaroon allows the creation of a new macaroon with custom read and"]
        #[doc = "write permissions. No first-party caveats are added since this can be done"]
        #[doc = "offline."]
        pub async fn bake_macaroon(
            &mut self,
            request: impl tonic::IntoRequest<super::BakeMacaroonRequest>,
        ) -> Result<tonic::Response<super::BakeMacaroonResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::new(
                    tonic::Code::Unknown,
                    format!("Service was not ready: {}", e.into()),
                )
            })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/lnrpc.Lightning/BakeMacaroon");
            self.inner.unary(request.into_request(), path, codec).await
        }
    }
    impl<T: Clone> Clone for LightningClient<T> {
        fn clone(&self) -> Self {
            Self {
                inner: self.inner.clone(),
            }
        }
    }
    impl<T> std::fmt::Debug for LightningClient<T> {
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
            write!(f, "LightningClient {{ ... }}")
        }
    }
}