redgold 0.1.0

A relative proof conflict resolution & irreversibility service with trust modeling custodial pooling and executor contracts
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
{
 "openapi":"3.0.2",
 "info": {
   "version":"1.4.12",
   "title":"Rosetta",
   "description":"Build Once. Integrate Your Blockchain Everywhere.",
   "license": {
     "name":"Apache 2.0",
     "url":"http://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
 "paths": {
   "/network/list": {
     "post": {
       "summary":"Get List of Available Networks",
       "description":"This endpoint returns a list of NetworkIdentifiers that the Rosetta server supports.",
       "operationId":"networkList",
       "tags": [
         "Network"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/MetadataRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/NetworkListResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/network/status": {
     "post": {
       "summary":"Get Network Status",
       "description":"This endpoint returns the current status of the network requested. Any NetworkIdentifier returned by /network/list should be accessible here.",
       "operationId":"networkStatus",
       "tags": [
         "Network"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/NetworkRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/NetworkStatusResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/network/options": {
     "post": {
       "summary":"Get Network Options",
       "description":"This endpoint returns the version information and allowed network-specific types for a NetworkIdentifier. Any NetworkIdentifier returned by /network/list should be accessible here. Because options are retrievable in the context of a NetworkIdentifier, it is possible to define unique options for each network.",
       "operationId":"networkOptions",
       "tags": [
         "Network"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/NetworkRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/NetworkOptionsResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/block": {
     "post": {
       "summary":"Get a Block",
       "description":"Get a block by its Block Identifier. If transactions are returned in the same call to the node as fetching the block, the response should include these transactions in the Block object. If not, an array of Transaction Identifiers should be returned so /block/transaction fetches can be done to get all transaction information. When requesting a block by the hash component of the BlockIdentifier, this request MUST be idempotent: repeated invocations for the same hash-identified block must return the exact same block contents. No such restriction is imposed when requesting a block by height, given that a chain reorg event might cause the specific block at height `n` to be set to a different one.",
       "operationId":"block",
       "tags": [
         "Block"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/BlockRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/BlockResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/block/transaction": {
     "post": {
       "summary":"Get a Block Transaction",
       "description":"Get a transaction in a block by its Transaction Identifier. This endpoint should only be used when querying a node for a block does not return all transactions contained within it. All transactions returned by this endpoint must be appended to any transactions returned by the /block method by consumers of this data. Fetching a transaction by hash is considered an Explorer Method (which is classified under the Future Work section). This method can be used to let consumers to paginate results when the  block trasactions count is too big to be returned in a single BlockResponse. Calling this endpoint requires reference to a BlockIdentifier because transaction parsing can change depending on which block contains the transaction. For example, in Bitcoin it is necessary to know which block contains a transaction to determine the destination of fee payments. Without specifying a block identifier, the node would have to infer which block to use (which could change during a re-org). Implementations that require fetching previous transactions to populate the response (ex: Previous UTXOs in Bitcoin) may find it useful to run a cache within the Rosetta server in the /data directory (on a path that does not conflict with the node).",
       "operationId":"blockTransaction",
       "tags": [
         "Block"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/BlockTransactionRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/BlockTransactionResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/mempool": {
     "post": {
       "summary":"Get All Mempool Transactions",
       "description":"Get all Transaction Identifiers in the mempool",
       "operationId":"mempool",
       "tags": [
         "Mempool"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/NetworkRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/MempoolResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/mempool/transaction": {
     "post": {
       "summary":"Get a Mempool Transaction",
       "description":"Get a transaction in the mempool by its Transaction Identifier. This is a separate request than fetching a block transaction (/block/transaction) because some blockchain nodes need to know that a transaction query is for something in the mempool instead of a transaction in a block. Transactions may not be fully parsable until they are in a block (ex: may not be possible to determine the fee to pay before a transaction is executed). On this endpoint, it is ok that returned transactions are only estimates of what may actually be included in a block.",
       "operationId":"mempoolTransaction",
       "tags": [
         "Mempool"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/MempoolTransactionRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/MempoolTransactionResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/account/balance": {
     "post": {
       "summary":"Get an Account's Balance",
       "description":"Get an array of all AccountBalances for an AccountIdentifier and the BlockIdentifier at which the balance lookup was performed. The BlockIdentifier must always be returned because some consumers of account balance data need to know specifically at which block the balance was calculated to compare balances they compute from operations with the balance returned by the node. It is important to note that making a balance request for an account without populating the SubAccountIdentifier should not result in the balance of all possible SubAccountIdentifiers being returned. Rather, it should result in the balance pertaining to no SubAccountIdentifiers being returned (sometimes called the liquid balance). To get all balances associated with an account, it may be necessary to perform multiple balance requests with unique AccountIdentifiers. It is also possible to perform a historical balance lookup (if the server supports it) by passing in an optional BlockIdentifier.",
       "operationId":"accountBalance",
       "tags": [
         "Account"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/AccountBalanceRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/AccountBalanceResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/account/coins": {
     "post": {
       "summary":"Get an Account's Unspent Coins",
       "description":"Get an array of all unspent coins for an AccountIdentifier and the BlockIdentifier at which the lookup was performed. If your implementation does not support coins (i.e. it is for an account-based blockchain), you do not need to implement this endpoint. If you implementation does support coins (i.e. it is fro a UTXO-based blockchain), you MUST also complete the `/account/balance` endpoint. It is important to note that making a coins request for an account without populating the SubAccountIdentifier should not result in the coins of all possible SubAccountIdentifiers being returned. Rather, it should result in the coins pertaining to no SubAccountIdentifiers being returned. To get all coins associated with an account, it may be necessary to perform multiple coin requests with unique AccountIdentifiers. Optionally, an implementation may choose to support updating an AccountIdentifier's unspent coins based on the contents of the mempool. Note, using this functionality breaks any guarantee of idempotency.",
       "operationId":"accountCoins",
       "tags": [
         "Account"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/AccountCoinsRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/AccountCoinsResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/construction/derive": {
     "post": {
       "summary":"Derive an AccountIdentifier from a PublicKey",
       "description":"Derive returns the AccountIdentifier associated with a public key. Blockchains that require an on-chain action to create an account should not implement this method.",
       "operationId":"constructionDerive",
       "tags": [
         "Construction"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/ConstructionDeriveRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/ConstructionDeriveResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/construction/preprocess": {
     "post": {
       "summary":"Create a Request to Fetch Metadata",
       "description":"Preprocess is called prior to `/construction/payloads` to construct a request for any metadata that is needed for transaction construction given (i.e. account nonce). The `options` object returned from this endpoint will be sent to the `/construction/metadata` endpoint UNMODIFIED by the caller (in an offline execution environment). If your Construction API implementation has configuration options, they MUST be specified in the `/construction/preprocess` request (in the `metadata` field).",
       "operationId":"constructionPreprocess",
       "tags": [
         "Construction"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/ConstructionPreprocessRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/ConstructionPreprocessResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/construction/metadata": {
     "post": {
       "summary":"Get Metadata for Transaction Construction",
       "description":"Get any information required to construct a transaction for a specific network. Metadata returned here could be a recent hash to use, an account sequence number, or even arbitrary chain state. The request used when calling this endpoint is created by calling `/construction/preprocess` in an offline environment. You should NEVER assume that the request sent to this endpoint will be created by the caller or populated with any custom parameters. This must occur in `/construction/preprocess`. It is important to clarify that this endpoint should not pre-construct any transactions for the client (this should happen in `/construction/payloads`). This endpoint is left purposely unstructured because of the wide scope of metadata that could be required.",
       "operationId":"constructionMetadata",
       "tags": [
         "Construction"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/ConstructionMetadataRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/ConstructionMetadataResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/construction/payloads": {
     "post": {
       "summary":"Generate an Unsigned Transaction and Signing Payloads",
       "description":"Payloads is called with an array of operations and the response from `/construction/metadata`. It returns an unsigned transaction blob and a collection of payloads that must be signed by particular AccountIdentifiers using a certain SignatureType. The array of operations provided in transaction construction often times can not specify all \"effects\" of a transaction (consider invoked transactions in Ethereum). However, they can deterministically specify the \"intent\" of the transaction, which is sufficient for construction. For this reason, parsing the corresponding transaction in the Data API (when it lands on chain) will contain a superset of whatever operations were provided during construction.",
       "operationId":"constructionPayloads",
       "tags": [
         "Construction"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/ConstructionPayloadsRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/ConstructionPayloadsResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/construction/combine": {
     "post": {
       "summary":"Create Network Transaction from Signatures",
       "description":"Combine creates a network-specific transaction from an unsigned transaction and an array of provided signatures. The signed transaction returned from this method will be sent to the `/construction/submit` endpoint by the caller.",
       "operationId":"constructionCombine",
       "tags": [
         "Construction"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/ConstructionCombineRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/ConstructionCombineResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/construction/parse": {
     "post": {
       "summary":"Parse a Transaction",
       "description":"Parse is called on both unsigned and signed transactions to understand the intent of the formulated transaction. This is run as a sanity check before signing (after `/construction/payloads`) and before broadcast (after `/construction/combine`). ",
       "operationId":"constructionParse",
       "tags": [
         "Construction"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/ConstructionParseRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/ConstructionParseResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/construction/hash": {
     "post": {
       "summary":"Get the Hash of a Signed Transaction",
       "description":"TransactionHash returns the network-specific transaction hash for a signed transaction.",
       "operationId":"constructionHash",
       "tags": [
         "Construction"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/ConstructionHashRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/TransactionIdentifierResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/construction/submit": {
     "post": {
       "summary":"Submit a Signed Transaction",
       "description":"Submit a pre-signed transaction to the node. This call should not block on the transaction being included in a block. Rather, it should return immediately with an indication of whether or not the transaction was included in the mempool. The transaction submission response should only return a 200 status if the submitted transaction could be included in the mempool. Otherwise, it should return an error.",
       "operationId":"constructionSubmit",
       "tags": [
         "Construction"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/ConstructionSubmitRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/TransactionIdentifierResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/call": {
     "post": {
       "summary":"Make a Network-Specific Procedure Call",
       "description":"Call invokes an arbitrary, network-specific procedure call with network-specific parameters. The guidance for what this endpoint should or could do is purposely left vague. In Ethereum, this could be used to invoke `eth_call` to implement an entire Rosetta API interface for some smart contract that is not parsed by the implementation creator (like a DEX). This endpoint could also be used to provide access to data that does not map to any Rosetta models instead of requiring an integrator to use some network-specific SDK and call some network-specific endpoint (like surfacing staking parameters). Call is NOT a replacement for implementing Rosetta API endpoints or mapping network-specific data to Rosetta models. Rather, it enables developers to build additional Rosetta API interfaces for things they care about without introducing complexity into a base-level Rosetta implementation. Simply put, imagine that the average integrator will use layered Rosetta API implementations that each surfaces unique data.",
       "operationId":"call",
       "tags": [
         "Call"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/CallRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/CallResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/events/blocks": {
     "post": {
       "summary":"[INDEXER] Get a range of BlockEvents",
       "description":"`/events/blocks` allows the caller to query a sequence of BlockEvents indicating which blocks were added and removed from storage to reach the current state. Following BlockEvents allows lightweight clients to update their state without needing to implement their own syncing logic (like finding the common parent in a reorg). `/events/blocks` is considered an \"indexer\" endpoint and Rosetta implementations are not required to complete it to adhere to the Rosetta spec. However, any Rosetta \"indexer\" MUST support this endpoint.",
       "operationId":"eventsBlocks",
       "tags": [
         "Events"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/EventsBlocksRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/EventsBlocksResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
   "/search/transactions": {
     "post": {
       "summary":"[INDEXER] Search for Transactions",
       "description":"`/search/transactions` allows the caller to search for transactions that meet certain conditions. Some conditions include matching a transaction hash, containing an operation with a certain status, or containing an operation that affects a certain account. `/search/transactions` is considered an \"indexer\" endpoint and Rosetta implementations are not required to complete it to adhere to the Rosetta spec. However, any Rosetta \"indexer\" MUST support this endpoint.",
       "operationId":"searchTransactions",
       "tags": [
         "Search"
        ],
       "requestBody": {
         "required": true,
         "content": {
           "application/json": {
             "schema": {
               "$ref":"#/components/schemas/SearchTransactionsRequest"
              }
            }
          }
        },
       "responses": {
         "200": {
           "description":"Expected response to a valid request",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/SearchTransactionsResponse"
                }
              }
            }
          },
         "500": {
           "description":"unexpected error",
           "content": {
             "application/json": {
               "schema": {
                 "$ref":"#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
 "components": {
   "schemas": {
     "NetworkIdentifier": {
       "description":"The network_identifier specifies which network a particular object is associated with.",
       "type":"object",
       "required": [
         "blockchain",
         "network"
        ],
       "properties": {
         "blockchain": {
           "type":"string",
           "example":"bitcoin"
          },
         "network": {
           "description":"If a blockchain has a specific chain-id or network identifier, it should go in this field. It is up to the client to determine which network-specific identifier is mainnet or testnet.",
           "type":"string",
           "example":"mainnet"
          },
         "sub_network_identifier": {
           "$ref":"#/components/schemas/SubNetworkIdentifier"
          }
        }
      },
     "SubNetworkIdentifier": {
       "description":"In blockchains with sharded state, the SubNetworkIdentifier is required to query some object on a specific shard. This identifier is optional for all non-sharded blockchains.",
       "type":"object",
       "required": [
         "network"
        ],
       "properties": {
         "network": {
           "type":"string",
           "example":"shard 1"
          },
         "metadata": {
           "type":"object",
           "example": {
             "producer":"0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
            }
          }
        }
      },
     "BlockIdentifier": {
       "description":"The block_identifier uniquely identifies a block in a particular network.",
       "type":"object",
       "required": [
         "index",
         "hash"
        ],
       "properties": {
         "index": {
           "description":"This is also known as the block height.",
           "type":"integer",
           "format":"int64",
           "example": 1123941
          },
         "hash": {
           "type":"string",
           "example":"0x1f2cc6c5027d2f201a5453ad1119574d2aed23a392654742ac3c78783c071f85",
           "description":"This should be normalized according to the case specified in the block_hash_case network options."
          }
        }
      },
     "PartialBlockIdentifier": {
       "type":"object",
       "description":"When fetching data by BlockIdentifier, it may be possible to only specify the index or hash. If neither property is specified, it is assumed that the client is making a request at the current block.",
       "properties": {
         "index": {
           "type":"integer",
           "format":"int64",
           "example": 1123941
          },
         "hash": {
           "type":"string",
           "example":"0x1f2cc6c5027d2f201a5453ad1119574d2aed23a392654742ac3c78783c071f85"
          }
        }
      },
     "TransactionIdentifier": {
       "description":"The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool.",
       "type":"object",
       "required": [
         "hash"
        ],
       "properties": {
         "hash": {
           "description":"Any transactions that are attributable only to a block (ex: a block event) should use the hash of the block as the identifier.  This should be normalized according to the case specified in the transaction_hash_case in network options.",
           "type":"string",
           "example":"0x2f23fd8cca835af21f3ac375bac601f97ead75f2e79143bdf71fe2c4be043e8f"
          }
        }
      },
     "OperationIdentifier": {
       "description":"The operation_identifier uniquely identifies an operation within a transaction.",
       "type":"object",
       "required": [
         "index"
        ],
       "properties": {
         "index": {
           "description":"The operation index is used to ensure each operation has a unique identifier within a transaction. This index is only relative to the transaction and NOT GLOBAL. The operations in each transaction should start from index 0. To clarify, there may not be any notion of an operation index in the blockchain being described.",
           "type":"integer",
           "format":"int64",
           "minimum": 0,
           "example": 5
          },
         "network_index": {
           "description":"Some blockchains specify an operation index that is essential for client use. For example, Bitcoin uses a network_index to identify which UTXO was used in a transaction. network_index should not be populated if there is no notion of an operation index in a blockchain (typically most account-based blockchains).",
           "type":"integer",
           "format":"int64",
           "minimum": 0,
           "example": 0
          }
        }
      },
     "AccountIdentifier": {
       "description":"The account_identifier uniquely identifies an account within a network. All fields in the account_identifier are utilized to determine this uniqueness (including the metadata field, if populated).",
       "type":"object",
       "required": [
         "address"
        ],
       "properties": {
         "address": {
           "description":"The address may be a cryptographic public key (or some encoding of it) or a provided username.",
           "type":"string",
           "example":"0x3a065000ab4183c6bf581dc1e55a605455fc6d61"
          },
         "sub_account": {
           "$ref":"#/components/schemas/SubAccountIdentifier"
          },
         "metadata": {
           "description":"Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata.",
           "type":"object"
          }
        }
      },
     "SubAccountIdentifier": {
       "description":"An account may have state specific to a contract address (ERC-20 token) and/or a stake (delegated balance). The sub_account_identifier should specify which state (if applicable) an account instantiation refers to.",
       "type":"object",
       "required": [
         "address"
        ],
       "properties": {
         "address": {
           "description":"The SubAccount address may be a cryptographic value or some other identifier (ex: bonded) that uniquely specifies a SubAccount.",
           "type":"string",
           "example":"0x6b175474e89094c44da98b954eedeac495271d0f"
          },
         "metadata": {
           "description":"If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients.",
           "type":"object"
          }
        }
      },
     "Block": {
       "description":"Blocks contain an array of Transactions that occurred at a particular BlockIdentifier. A hard requirement for blocks returned by Rosetta implementations is that they MUST be _inalterable_: once a client has requested and received a block identified by a specific BlockIndentifier, all future calls for that same BlockIdentifier must return the same block contents.",
       "type":"object",
       "required": [
         "block_identifier",
         "parent_block_identifier",
         "timestamp",
         "transactions"
        ],
       "properties": {
         "block_identifier": {
           "$ref":"#/components/schemas/BlockIdentifier"
          },
         "parent_block_identifier": {
           "$ref":"#/components/schemas/BlockIdentifier"
          },
         "timestamp": {
           "$ref":"#/components/schemas/Timestamp"
          },
         "transactions": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/Transaction"
            }
          },
         "metadata": {
           "type":"object",
           "example": {
             "transactions_root":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
             "difficulty":"123891724987128947"
            }
          }
        }
      },
     "Transaction": {
       "description":"Transactions contain an array of Operations that are attributable to the same TransactionIdentifier.",
       "type":"object",
       "required": [
         "transaction_identifier",
         "operations"
        ],
       "properties": {
         "transaction_identifier": {
           "$ref":"#/components/schemas/TransactionIdentifier"
          },
         "operations": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/Operation"
            }
          },
         "related_transactions": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/RelatedTransaction"
            }
          },
         "metadata": {
           "description":"Transactions that are related to other transactions (like a cross-shard transaction) should include the tranaction_identifier of these transactions in the metadata.",
           "type":"object",
           "example": {
             "size": 12378,
             "lockTime": 1582272577
            }
          }
        }
      },
     "Operation": {
       "description":"Operations contain all balance-changing information within a transaction. They are always one-sided (only affect 1 AccountIdentifier) and can succeed or fail independently from a Transaction. Operations are used both to represent on-chain data (Data API) and to construct new transactions (Construction API), creating a standard interface for reading and writing to blockchains.",
       "type":"object",
       "required": [
         "operation_identifier",
         "type"
        ],
       "properties": {
         "operation_identifier": {
           "$ref":"#/components/schemas/OperationIdentifier"
          },
         "related_operations": {
           "description":"Restrict referenced related_operations to identifier indices < the current operation_identifier.index. This ensures there exists a clear DAG-structure of relations. Since operations are one-sided, one could imagine relating operations in a single transfer or linking operations in a call tree.",
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/OperationIdentifier"
            },
           "example": [
              {
               "index": 1
              },
              {
               "index": 2
              }
            ]
          },
         "type": {
           "description":"Type is the network-specific type of the operation. Ensure that any type that can be returned here is also specified in the NetworkOptionsResponse. This can be very useful to downstream consumers that parse all block data.",
           "type":"string",
           "example":"Transfer"
          },
         "status": {
           "description":"Status is the network-specific status of the operation. Status is not defined on the transaction object because blockchains with smart contracts may have transactions that partially apply (some operations are successful and some are not). Blockchains with atomic transactions (all operations succeed or all operations fail) will have the same status for each operation. On-chain operations (operations retrieved in the `/block` and `/block/transaction` endpoints) MUST have a populated status field (anything on-chain must have succeeded or failed). However, operations provided during transaction construction (often times called \"intent\" in the documentation) MUST NOT have a populated status field (operations yet to be included on-chain have not yet succeeded or failed).",
           "type":"string",
           "example":"Reverted"
          },
         "account": {
           "$ref":"#/components/schemas/AccountIdentifier"
          },
         "amount": {
           "$ref":"#/components/schemas/Amount"
          },
         "coin_change": {
           "$ref":"#/components/schemas/CoinChange"
          },
         "metadata": {
           "type":"object",
           "example": {
             "asm":"304502201fd8abb11443f8b1b9a04e0495e0543d05611473a790c8939f089d073f90509a022100f4677825136605d732e2126d09a2d38c20c75946cd9fc239c0497e84c634e3dd01 03301a8259a12e35694cc22ebc45fee635f4993064190f6ce96e7fb19a03bb6be2",
             "hex":"48304502201fd8abb11443f8b1b9a04e0495e0543d05611473a790c8939f089d073f90509a022100f4677825136605d732e2126d09a2d38c20c75946cd9fc239c0497e84c634e3dd012103301a8259a12e35694cc22ebc45fee635f4993064190f6ce96e7fb19a03bb6be2"
            }
          }
        }
      },
     "Amount": {
       "description":"Amount is some Value of a Currency. It is considered invalid to specify a Value without a Currency.",
       "type":"object",
       "required": [
         "value",
         "currency"
        ],
       "properties": {
         "value": {
           "description":"Value of the transaction in atomic units represented as an arbitrary-sized signed integer. For example, 1 BTC would be represented by a value of 100000000.",
           "type":"string",
           "example":"1238089899992"
          },
         "currency": {
           "$ref":"#/components/schemas/Currency"
          },
         "metadata": {
           "type":"object"
          }
        }
      },
     "Currency": {
       "description":"Currency is composed of a canonical Symbol and Decimals. This Decimals value is used to convert an Amount.Value from atomic units (Satoshis) to standard units (Bitcoins).",
       "type":"object",
       "required": [
         "symbol",
         "decimals"
        ],
       "properties": {
         "symbol": {
           "description":"Canonical symbol associated with a currency.",
           "type":"string",
           "example":"BTC"
          },
         "decimals": {
           "description":"Number of decimal places in the standard unit representation of the amount. For example, BTC has 8 decimals. Note that it is not possible to represent the value of some currency in atomic units that is not base 10.",
           "type":"integer",
           "format":"int32",
           "minimum": 0,
           "example": 8
          },
         "metadata": {
           "description":"Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token.",
           "type":"object",
           "example": {
             "Issuer":"Satoshi"
            }
          }
        }
      },
     "SyncStatus": {
       "description":"SyncStatus is used to provide additional context about an implementation's sync status. This object is often used by implementations to indicate healthiness when block data cannot be queried until some sync phase completes or cannot be determined by comparing the timestamp of the most recent block with the current time.",
       "type":"object",
       "properties": {
         "current_index": {
           "description":"CurrentIndex is the index of the last synced block in the current stage. This is a separate field from current_block_identifier in NetworkStatusResponse because blocks with indices up to and including the current_index may not yet be queryable by the caller. To reiterate, all indices up to and including current_block_identifier in NetworkStatusResponse must be queryable via the /block endpoint (excluding indices less than oldest_block_identifier).",
           "type":"integer",
           "format":"int64",
           "example": 100
          },
         "target_index": {
           "description":"TargetIndex is the index of the block that the implementation is attempting to sync to in the current stage.",
           "type":"integer",
           "format":"int64",
           "example": 150
          },
         "stage": {
           "description":"Stage is the phase of the sync process.",
           "type":"string",
           "example":"header sync"
          },
         "synced": {
           "description":"synced is a boolean that indicates if an implementation has synced up to the most recent block. If this field is not populated, the caller should rely on a traditional tip timestamp comparison to determine if an implementation is synced. This field is particularly useful for quiescent blockchains (blocks only produced when there are pending transactions). In these blockchains, the most recent block could have a timestamp far behind the current time but the node could be healthy and at tip.",
           "type":"boolean"
          }
        }
      },
     "Peer": {
       "description":"A Peer is a representation of a node's peer.",
       "type":"object",
       "required": [
         "peer_id"
        ],
       "properties": {
         "peer_id": {
           "type":"string",
           "example":"0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
          },
         "metadata": {
           "type":"object"
          }
        }
      },
     "Version": {
       "description":"The Version object is utilized to inform the client of the versions of different components of the Rosetta implementation.",
       "type":"object",
       "required": [
         "rosetta_version",
         "node_version"
        ],
       "properties": {
         "rosetta_version": {
           "description":"The rosetta_version is the version of the Rosetta interface the implementation adheres to. This can be useful for clients looking to reliably parse responses.",
           "type":"string",
           "example":"1.2.5"
          },
         "node_version": {
           "description":"The node_version is the canonical version of the node runtime. This can help clients manage deployments.",
           "type":"string",
           "example":"1.0.2"
          },
         "middleware_version": {
           "description":"When a middleware server is used to adhere to the Rosetta interface, it should return its version here. This can help clients manage deployments.",
           "type":"string",
           "example":"0.2.7"
          },
         "metadata": {
           "description":"Any other information that may be useful about versioning of dependent services should be returned here.",
           "type":"object"
          }
        }
      },
     "Allow": {
       "description":"Allow specifies supported Operation status, Operation types, and all possible error statuses. This Allow object is used by clients to validate the correctness of a Rosetta Server implementation. It is expected that these clients will error if they receive some response that contains any of the above information that is not specified here.",
       "type":"object",
       "required": [
         "operation_statuses",
         "operation_types",
         "errors",
         "historical_balance_lookup",
         "call_methods",
         "balance_exemptions",
         "mempool_coins"
        ],
       "properties": {
         "operation_statuses": {
           "description":"All Operation.Status this implementation supports. Any status that is returned during parsing that is not listed here will cause client validation to error.",
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/OperationStatus"
            }
          },
         "operation_types": {
           "description":"All Operation.Type this implementation supports. Any type that is returned during parsing that is not listed here will cause client validation to error.",
           "type":"array",
           "items": {
             "type":"string",
             "example":"TRANSFER"
            }
          },
         "errors": {
           "description":"All Errors that this implementation could return. Any error that is returned during parsing that is not listed here will cause client validation to error.",
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/Error"
            }
          },
         "historical_balance_lookup": {
           "type":"boolean",
           "description":"Any Rosetta implementation that supports querying the balance of an account at any height in the past should set this to true."
          },
         "timestamp_start_index": {
           "type":"integer",
           "format":"int64",
           "minimum": 0,
           "description":"If populated, `timestamp_start_index` indicates the first block index where block timestamps are considered valid (i.e. all blocks less than `timestamp_start_index` could have invalid timestamps). This is useful when the genesis block (or blocks) of a network have timestamp 0. If not populated, block timestamps are assumed to be valid for all available blocks."
          },
         "call_methods": {
           "type":"array",
           "description":"All methods that are supported by the /call endpoint. Communicating which parameters should be provided to /call is the responsibility of the implementer (this is en lieu of defining an entire type system and requiring the implementer to define that in Allow).",
           "items": {
             "type":"string",
             "example":"eth_call"
            }
          },
         "balance_exemptions": {
           "type":"array",
           "description":"BalanceExemptions is an array of BalanceExemption indicating which account balances could change without a corresponding Operation. BalanceExemptions should be used sparingly as they may introduce significant complexity for integrators that attempt to reconcile all account balance changes. If your implementation relies on any BalanceExemptions, you MUST implement historical balance lookup (the ability to query an account balance at any BlockIdentifier).",
           "items": {
             "$ref":"#/components/schemas/BalanceExemption"
            }
          },
         "mempool_coins": {
           "type":"boolean",
           "description":"Any Rosetta implementation that can update an AccountIdentifier's unspent coins based on the contents of the mempool should populate this field as true. If false, requests to `/account/coins` that set `include_mempool` as true will be automatically rejected."
          },
         "block_hash_case": {
           "$ref":"#/components/schemas/Case",
           "description":"This specifies the normalized case for block hash in the BlockIdentifier. If not specified, it's assumed to be case sensitive."
          },
         "transaction_hash_case": {
           "$ref":"#/components/schemas/Case",
           "description":"This specifies the normalized case for transaction hash in the TransactionIdentifier. If not specified, it's assumed to be case sensitive."
          }
        }
      },
     "OperationStatus": {
       "description":"OperationStatus is utilized to indicate which Operation status are considered successful.",
       "type":"object",
       "required": [
         "status",
         "successful"
        ],
       "properties": {
         "status": {
           "description":"The status is the network-specific status of the operation.",
           "type":"string"
          },
         "successful": {
           "description":"An Operation is considered successful if the Operation.Amount should affect the Operation.Account. Some blockchains (like Bitcoin) only include successful operations in blocks but other blockchains (like Ethereum) include unsuccessful operations that incur a fee. To reconcile the computed balance from the stream of Operations, it is critical to understand which Operation.Status indicate an Operation is successful and should affect an Account.",
           "type":"boolean"
          }
        },
       "example": {
         "status":"SUCCESS",
         "successful": true
        }
      },
     "Timestamp": {
       "description":"The timestamp of the block in milliseconds since the Unix Epoch. The timestamp is stored in milliseconds because some blockchains produce blocks more often than once a second.",
       "type":"integer",
       "format":"int64",
       "minimum": 0,
       "example": 1582833600000
      },
     "PublicKey": {
       "description":"PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation.",
       "type":"object",
       "required": [
         "hex_bytes",
         "curve_type"
        ],
       "properties": {
         "hex_bytes": {
           "type":"string",
           "description":"Hex-encoded public key bytes in the format specified by the CurveType."
          },
         "curve_type": {
           "$ref":"#/components/schemas/CurveType"
          }
        }
      },
     "CurveType": {
       "description":"CurveType is the type of cryptographic curve associated with a PublicKey. * secp256k1: SEC compressed - `33 bytes` (https://secg.org/sec1-v2.pdf#subsubsection.2.3.3) * secp256r1: SEC compressed - `33 bytes` (https://secg.org/sec1-v2.pdf#subsubsection.2.3.3) * edwards25519: `y (255-bits) || x-sign-bit (1-bit)` - `32 bytes` (https://ed25519.cr.yp.to/ed25519-20110926.pdf) * tweedle: 1st pk : Fq.t (32 bytes) || 2nd pk : Fq.t (32 bytes) (https://github.com/CodaProtocol/coda/blob/develop/rfcs/0038-rosetta-construction-api.md#marshal-keys) * pallas: `x (255 bits) || y-parity-bit (1-bit) - 32 bytes` (https://github.com/zcash/pasta)",
       "type":"string",
       "enum": [
         "secp256k1",
         "secp256r1",
         "edwards25519",
         "tweedle",
         "pallas"
        ]
      },
     "SigningPayload": {
       "description":"SigningPayload is signed by the client with the keypair associated with an AccountIdentifier using the specified SignatureType. SignatureType can be optionally populated if there is a restriction on the signature scheme that can be used to sign the payload.",
       "type":"object",
       "required": [
         "hex_bytes"
        ],
       "properties": {
         "address": {
           "type":"string",
           "description":"[DEPRECATED by `account_identifier` in `v1.4.4`] The network-specific address of the account that should sign the payload."
          },
         "account_identifier": {
           "$ref":"#/components/schemas/AccountIdentifier"
          },
         "hex_bytes": {
           "type":"string",
           "description":"Hex-encoded string of the payload bytes."
          },
         "signature_type": {
           "$ref":"#/components/schemas/SignatureType"
          }
        }
      },
     "Signature": {
       "description":"Signature contains the payload that was signed, the public keys of the keypairs used to produce the signature, the signature (encoded in hex), and the SignatureType. PublicKey is often times not known during construction of the signing payloads but may be needed to combine signatures properly.",
       "type":"object",
       "required": [
         "signing_payload",
         "public_key",
         "signature_type",
         "hex_bytes"
        ],
       "properties": {
         "signing_payload": {
           "$ref":"#/components/schemas/SigningPayload"
          },
         "public_key": {
           "$ref":"#/components/schemas/PublicKey"
          },
         "signature_type": {
           "$ref":"#/components/schemas/SignatureType"
          },
         "hex_bytes": {
           "type":"string"
          }
        }
      },
     "SignatureType": {
       "description":"SignatureType is the type of a cryptographic signature. * ecdsa: `r (32-bytes) || s (32-bytes)` - `64 bytes` * ecdsa_recovery: `r (32-bytes) || s (32-bytes) || v (1-byte)` - `65 bytes` * ed25519: `R (32-byte) || s (32-bytes)` - `64 bytes` * schnorr_1: `r (32-bytes) || s (32-bytes)` - `64 bytes`  (schnorr signature implemented by Zilliqa where both `r` and `s` are scalars encoded as `32-bytes` values, most significant byte first.) * schnorr_poseidon: `r (32-bytes) || s (32-bytes)` where s = Hash(1st pk || 2nd pk || r) - `64 bytes`  (schnorr signature w/ Poseidon hash function implemented by O(1) Labs where both `r` and `s` are scalars encoded as `32-bytes` values, least significant byte first. https://github.com/CodaProtocol/signer-reference/blob/master/schnorr.ml )",
       "type":"string",
       "enum": [
         "ecdsa",
         "ecdsa_recovery",
         "ed25519",
         "schnorr_1",
         "schnorr_poseidon"
        ]
      },
     "CoinAction": {
       "description":"CoinActions are different state changes that a Coin can undergo. When a Coin is created, it is coin_created. When a Coin is spent, it is coin_spent. It is assumed that a single Coin cannot be created or spent more than once.",
       "type":"string",
       "enum": [
         "coin_created",
         "coin_spent"
        ]
      },
     "CoinIdentifier": {
       "description":"CoinIdentifier uniquely identifies a Coin.",
       "type":"object",
       "required": [
         "identifier"
        ],
       "properties": {
         "identifier": {
           "description":"Identifier should be populated with a globally unique identifier of a Coin. In Bitcoin, this identifier would be transaction_hash:index.",
           "type":"string",
           "example":"0x2f23fd8cca835af21f3ac375bac601f97ead75f2e79143bdf71fe2c4be043e8f:1"
          }
        }
      },
     "CoinChange": {
       "description":"CoinChange is used to represent a change in state of a some coin identified by a coin_identifier. This object is part of the Operation model and must be populated for UTXO-based blockchains. Coincidentally, this abstraction of UTXOs allows for supporting both account-based transfers and UTXO-based transfers on the same blockchain (when a transfer is account-based, don't populate this model).",
       "type":"object",
       "required": [
         "coin_identifier",
         "coin_action"
        ],
       "properties": {
         "coin_identifier": {
           "$ref":"#/components/schemas/CoinIdentifier"
          },
         "coin_action": {
           "$ref":"#/components/schemas/CoinAction"
          }
        }
      },
     "Coin": {
       "description":"Coin contains its unique identifier and the amount it represents.",
       "type":"object",
       "required": [
         "coin_identifier",
         "amount"
        ],
       "properties": {
         "coin_identifier": {
           "$ref":"#/components/schemas/CoinIdentifier"
          },
         "amount": {
           "$ref":"#/components/schemas/Amount"
          }
        }
      },
     "BalanceExemption": {
       "description":"BalanceExemption indicates that the balance for an exempt account could change without a corresponding Operation. This typically occurs with staking rewards, vesting balances, and Currencies with a dynamic supply. Currently, it is possible to exempt an account from strict reconciliation by SubAccountIdentifier.Address or by Currency. This means that any account with SubAccountIdentifier.Address would be exempt or any balance of a particular Currency would be exempt, respectively. BalanceExemptions should be used sparingly as they may introduce significant complexity for integrators that attempt to reconcile all account balance changes. If your implementation relies on any BalanceExemptions, you MUST implement historical balance lookup (the ability to query an account balance at any BlockIdentifier).",
       "type":"object",
       "properties": {
         "sub_account_address": {
           "description":"SubAccountAddress is the SubAccountIdentifier.Address that the BalanceExemption applies to (regardless of the value of SubAccountIdentifier.Metadata).",
           "type":"string",
           "example":"staking"
          },
         "currency": {
           "$ref":"#/components/schemas/Currency"
          },
         "exemption_type": {
           "$ref":"#/components/schemas/ExemptionType"
          }
        }
      },
     "ExemptionType": {
       "description":"ExemptionType is used to indicate if the live balance for an account subject to a BalanceExemption could increase above, decrease below, or equal the computed balance. * greater_or_equal: The live balance may increase above or equal the computed balance. This typically   occurs with staking rewards that accrue on each block. * less_or_equal: The live balance may decrease below or equal the computed balance. This typically   occurs as balance moves from locked to spendable on a vesting account. * dynamic: The live balance may increase above, decrease below, or equal the computed balance. This   typically occurs with tokens that have a dynamic supply.",
       "type":"string",
       "enum": [
         "greater_or_equal",
         "less_or_equal",
         "dynamic"
        ]
      },
     "BlockEvent": {
       "description":"BlockEvent represents the addition or removal of a BlockIdentifier from storage. Streaming BlockEvents allows lightweight clients to update their own state without needing to implement their own syncing logic.",
       "type":"object",
       "required": [
         "sequence",
         "block_identifier",
         "type"
        ],
       "properties": {
         "sequence": {
           "description":"sequence is the unique identifier of a BlockEvent within the context of a NetworkIdentifier.",
           "type":"integer",
           "format":"int64",
           "minimum": 0,
           "example": 5
          },
         "block_identifier": {
           "$ref":"#/components/schemas/BlockIdentifier"
          },
         "type": {
           "$ref":"#/components/schemas/BlockEventType"
          }
        }
      },
     "BlockEventType": {
       "description":"BlockEventType determines if a BlockEvent represents the addition or removal of a block.",
       "type":"string",
       "enum": [
         "block_added",
         "block_removed"
        ]
      },
     "Operator": {
       "description":"Operator is used by query-related endpoints to determine how to apply conditions. If this field is not populated, the default `and` value will be used.",
       "type":"string",
       "enum": [
         "or",
         "and"
        ]
      },
     "BlockTransaction": {
       "description":"BlockTransaction contains a populated Transaction and the BlockIdentifier that contains it.",
       "type":"object",
       "required": [
         "block_identifier",
         "transaction"
        ],
       "properties": {
         "block_identifier": {
           "$ref":"#/components/schemas/BlockIdentifier"
          },
         "transaction": {
           "$ref":"#/components/schemas/Transaction"
          }
        }
      },
     "RelatedTransaction": {
       "description":"The related_transaction allows implementations to link together multiple transactions. An unpopulated network identifier indicates that the related transaction is on the same network.",
       "type":"object",
       "required": [
         "transaction_identifier",
         "direction"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "transaction_identifier": {
           "$ref":"#/components/schemas/TransactionIdentifier"
          },
         "direction": {
           "$ref":"#/components/schemas/Direction"
          }
        }
      },
     "Direction": {
       "description":"Used by RelatedTransaction to indicate the direction of the relation (i.e. cross-shard/cross-network sends may reference `backward` to an earlier transaction and async execution may reference `forward`). Can be used to indicate if a transaction relation is from child to parent or the reverse.",
       "type":"string",
       "enum": [
         "forward",
         "backward"
        ]
      },
     "Case": {
       "description":"Case specifies the expected case for strings and hashes.",
       "type":"string",
       "nullable": true,
       "enum": [
         "upper_case",
         "lower_case",
         "case_sensitive",
          null
        ],
       "default":"case_sensitive"
      },
     "AccountBalanceRequest": {
       "description":"An AccountBalanceRequest is utilized to make a balance request on the /account/balance endpoint. If the block_identifier is populated, a historical balance query should be performed.",
       "type":"object",
       "required": [
         "network_identifier",
         "account_identifier"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "account_identifier": {
           "$ref":"#/components/schemas/AccountIdentifier"
          },
         "block_identifier": {
           "$ref":"#/components/schemas/PartialBlockIdentifier"
          },
         "currencies": {
           "type":"array",
           "description":"In some cases, the caller may not want to retrieve all available balances for an AccountIdentifier. If the currencies field is populated, only balances for the specified currencies will be returned. If not populated, all available balances will be returned.",
           "items": {
             "$ref":"#/components/schemas/Currency"
            }
          }
        }
      },
     "AccountBalanceResponse": {
       "description":"An AccountBalanceResponse is returned on the /account/balance endpoint. If an account has a balance for each AccountIdentifier describing it (ex: an ERC-20 token balance on a few smart contracts), an account balance request must be made with each AccountIdentifier. The `coins` field was removed and replaced by by `/account/coins` in `v1.4.7`.",
       "type":"object",
       "required": [
         "block_identifier",
         "balances"
        ],
       "properties": {
         "block_identifier": {
           "$ref":"#/components/schemas/BlockIdentifier"
          },
         "balances": {
           "type":"array",
           "description":"A single account may have a balance in multiple currencies.",
           "items": {
             "$ref":"#/components/schemas/Amount"
            }
          },
         "metadata": {
           "description":"Account-based blockchains that utilize a nonce or sequence number should include that number in the metadata. This number could be unique to the identifier or global across the account address.",
           "type":"object",
           "example": {
             "sequence_number": 23
            }
          }
        }
      },
     "AccountCoinsRequest": {
       "description":"AccountCoinsRequest is utilized to make a request on the /account/coins endpoint.",
       "type":"object",
       "required": [
         "network_identifier",
         "account_identifier",
         "include_mempool"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "account_identifier": {
           "$ref":"#/components/schemas/AccountIdentifier"
          },
         "include_mempool": {
           "type":"boolean",
           "description":"Include state from the mempool when looking up an account's unspent coins. Note, using this functionality breaks any guarantee of idempotency."
          },
         "currencies": {
           "type":"array",
           "description":"In some cases, the caller may not want to retrieve coins for all currencies for an AccountIdentifier. If the currencies field is populated, only coins for the specified currencies will be returned. If not populated, all unspent coins will be returned.",
           "items": {
             "$ref":"#/components/schemas/Currency"
            }
          }
        }
      },
     "AccountCoinsResponse": {
       "description":"AccountCoinsResponse is returned on the /account/coins endpoint and includes all unspent Coins owned by an AccountIdentifier.",
       "type":"object",
       "required": [
         "block_identifier",
         "coins"
        ],
       "properties": {
         "block_identifier": {
           "$ref":"#/components/schemas/BlockIdentifier"
          },
         "coins": {
           "type":"array",
           "description":"If a blockchain is UTXO-based, all unspent Coins owned by an account_identifier should be returned alongside the balance. It is highly recommended to populate this field so that users of the Rosetta API implementation don't need to maintain their own indexer to track their UTXOs.",
           "items": {
             "$ref":"#/components/schemas/Coin"
            }
          },
         "metadata": {
           "description":"Account-based blockchains that utilize a nonce or sequence number should include that number in the metadata. This number could be unique to the identifier or global across the account address.",
           "type":"object",
           "example": {
             "sequence_number": 23
            }
          }
        }
      },
     "BlockRequest": {
       "description":"A BlockRequest is utilized to make a block request on the /block endpoint.",
       "type":"object",
       "required": [
         "network_identifier",
         "block_identifier"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "block_identifier": {
           "$ref":"#/components/schemas/PartialBlockIdentifier"
          }
        }
      },
     "BlockResponse": {
       "description":"A BlockResponse includes a fully-populated block or a partially-populated block with a list of other transactions to fetch (other_transactions). As a result of the consensus algorithm of some blockchains, blocks can be omitted (i.e. certain block indices can be skipped). If a query for one of these omitted indices is made, the response should not include a `Block` object. It is VERY important to note that blocks MUST still form a canonical, connected chain of blocks where each block has a unique index. In other words, the `PartialBlockIdentifier` of a block after an omitted block should reference the last non-omitted block.",
       "type":"object",
       "properties": {
         "block": {
           "$ref":"#/components/schemas/Block"
          },
         "other_transactions": {
           "description":"Some blockchains may require additional transactions to be fetched that weren't returned in the block response (ex: block only returns transaction hashes). For blockchains with a lot of transactions in each block, this can be very useful as consumers can concurrently fetch all transactions returned.",
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/TransactionIdentifier"
            }
          }
        }
      },
     "BlockTransactionRequest": {
       "description":"A BlockTransactionRequest is used to fetch a Transaction included in a block that is not returned in a BlockResponse.",
       "type":"object",
       "required": [
         "network_identifier",
         "block_identifier",
         "transaction_identifier"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "block_identifier": {
           "$ref":"#/components/schemas/BlockIdentifier"
          },
         "transaction_identifier": {
           "$ref":"#/components/schemas/TransactionIdentifier"
          }
        }
      },
     "BlockTransactionResponse": {
       "description":"A BlockTransactionResponse contains information about a block transaction.",
       "type":"object",
       "required": [
         "transaction"
        ],
       "properties": {
         "transaction": {
           "$ref":"#/components/schemas/Transaction"
          }
        }
      },
     "MempoolResponse": {
       "description":"A MempoolResponse contains all transaction identifiers in the mempool for a particular network_identifier.",
       "type":"object",
       "required": [
         "transaction_identifiers"
        ],
       "properties": {
         "transaction_identifiers": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/TransactionIdentifier"
            }
          }
        }
      },
     "MempoolTransactionRequest": {
       "description":"A MempoolTransactionRequest is utilized to retrieve a transaction from the mempool.",
       "type":"object",
       "required": [
         "network_identifier",
         "transaction_identifier"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "transaction_identifier": {
           "$ref":"#/components/schemas/TransactionIdentifier"
          }
        }
      },
     "MempoolTransactionResponse": {
       "description":"A MempoolTransactionResponse contains an estimate of a mempool transaction. It may not be possible to know the full impact of a transaction in the mempool (ex: fee paid).",
       "type":"object",
       "required": [
         "transaction"
        ],
       "properties": {
         "transaction": {
           "$ref":"#/components/schemas/Transaction"
          },
         "metadata": {
           "type":"object",
           "example": {
             "descendant_fees": 123923,
             "ancestor_count": 2
            }
          }
        }
      },
     "MetadataRequest": {
       "description":"A MetadataRequest is utilized in any request where the only argument is optional metadata.",
       "type":"object",
       "properties": {
         "metadata": {
           "type":"object"
          }
        }
      },
     "NetworkListResponse": {
       "description":"A NetworkListResponse contains all NetworkIdentifiers that the node can serve information for.",
       "type":"object",
       "required": [
         "network_identifiers"
        ],
       "properties": {
         "network_identifiers": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/NetworkIdentifier"
            }
          }
        }
      },
     "NetworkRequest": {
       "description":"A NetworkRequest is utilized to retrieve some data specific exclusively to a NetworkIdentifier.",
       "type":"object",
       "required": [
         "network_identifier"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "metadata": {
           "type":"object"
          }
        }
      },
     "NetworkStatusResponse": {
       "description":"NetworkStatusResponse contains basic information about the node's view of a blockchain network. It is assumed that any BlockIdentifier.Index less than or equal to CurrentBlockIdentifier.Index can be queried. If a Rosetta implementation prunes historical state, it should populate the optional `oldest_block_identifier` field with the oldest block available to query. If this is not populated, it is assumed that the `genesis_block_identifier` is the oldest queryable block. If a Rosetta implementation performs some pre-sync before it is possible to query blocks, sync_status should be populated so that clients can still monitor healthiness. Without this field, it may appear that the implementation is stuck syncing and needs to be terminated.",
       "type":"object",
       "required": [
         "current_block_identifier",
         "current_block_timestamp",
         "genesis_block_identifier",
         "peers"
        ],
       "properties": {
         "current_block_identifier": {
           "$ref":"#/components/schemas/BlockIdentifier"
          },
         "current_block_timestamp": {
           "$ref":"#/components/schemas/Timestamp"
          },
         "genesis_block_identifier": {
           "$ref":"#/components/schemas/BlockIdentifier"
          },
         "oldest_block_identifier": {
           "$ref":"#/components/schemas/BlockIdentifier"
          },
         "sync_status": {
           "$ref":"#/components/schemas/SyncStatus"
          },
         "peers": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/Peer"
            }
          }
        }
      },
     "NetworkOptionsResponse": {
       "description":"NetworkOptionsResponse contains information about the versioning of the node and the allowed operation statuses, operation types, and errors.",
       "type":"object",
       "required": [
         "version",
         "allow"
        ],
       "properties": {
         "version": {
           "$ref":"#/components/schemas/Version"
          },
         "allow": {
           "$ref":"#/components/schemas/Allow"
          }
        }
      },
     "ConstructionMetadataRequest": {
       "description":"A ConstructionMetadataRequest is utilized to get information required to construct a transaction. The Options object used to specify which metadata to return is left purposely unstructured to allow flexibility for implementers. Options is not required in the case that there is network-wide metadata of interest. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse.",
       "type":"object",
       "required": [
         "network_identifier"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "options": {
           "description":"Some blockchains require different metadata for different types of transaction construction (ex: delegation versus a transfer). Instead of requiring a blockchain node to return all possible types of metadata for construction (which may require multiple node fetches), the client can populate an options object to limit the metadata returned to only the subset required.",
           "type":"object"
          },
         "public_keys": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/PublicKey"
            }
          }
        }
      },
     "ConstructionMetadataResponse": {
       "description":"The ConstructionMetadataResponse returns network-specific metadata used for transaction construction. Optionally, the implementer can return the suggested fee associated with the transaction being constructed. The caller may use this info to adjust the intent of the transaction or to create a transaction with a different account that can pay the suggested fee. Suggested fee is an array in case fee payment must occur in multiple currencies.",
       "type":"object",
       "required": [
         "metadata"
        ],
       "properties": {
         "metadata": {
           "type":"object",
           "example": {
             "account_sequence": 23,
             "recent_block_hash":"0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
            }
          },
         "suggested_fee": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/Amount"
            }
          }
        }
      },
     "ConstructionDeriveRequest": {
       "description":"ConstructionDeriveRequest is passed to the `/construction/derive` endpoint. Network is provided in the request because some blockchains have different address formats for different networks. Metadata is provided in the request because some blockchains allow for multiple address types (i.e. different address for validators vs normal accounts).",
       "type":"object",
       "required": [
         "network_identifier",
         "public_key"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "public_key": {
           "$ref":"#/components/schemas/PublicKey"
          },
         "metadata": {
           "type":"object"
          }
        }
      },
     "ConstructionDeriveResponse": {
       "description":"ConstructionDeriveResponse is returned by the `/construction/derive` endpoint.",
       "type":"object",
       "properties": {
         "address": {
           "type":"string",
           "description":"[DEPRECATED by `account_identifier` in `v1.4.4`] Address in network-specific format."
          },
         "account_identifier": {
           "$ref":"#/components/schemas/AccountIdentifier"
          },
         "metadata": {
           "type":"object"
          }
        }
      },
     "ConstructionPreprocessRequest": {
       "description":"ConstructionPreprocessRequest is passed to the `/construction/preprocess` endpoint so that a Rosetta implementation can determine which metadata it needs to request for construction. Metadata provided in this object should NEVER be a product of live data (i.e. the caller must follow some network-specific data fetching strategy outside of the Construction API to populate required Metadata). If live data is required for construction, it MUST be fetched in the call to `/construction/metadata`. The caller can provide a max fee they are willing to pay for a transaction. This is an array in the case fees must be paid in multiple currencies. The caller can also provide a suggested fee multiplier to indicate that the suggested fee should be scaled. This may be used to set higher fees for urgent transactions or to pay lower fees when there is less urgency. It is assumed that providing a very low multiplier (like 0.0001) will never lead to a transaction being created with a fee less than the minimum network fee (if applicable). In the case that the caller provides both a max fee and a suggested fee multiplier, the max fee will set an upper bound on the suggested fee (regardless of the multiplier provided).",
       "type":"object",
       "required": [
         "network_identifier",
         "operations"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "operations": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/Operation"
            }
          },
         "metadata": {
           "type":"object"
          },
         "max_fee": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/Amount"
            }
          },
         "suggested_fee_multiplier": {
           "type":"number",
           "format":"double",
           "minimum": 0
          }
        }
      },
     "ConstructionPreprocessResponse": {
       "description":"ConstructionPreprocessResponse contains `options` that will be sent unmodified to `/construction/metadata`. If it is not necessary to make a request to `/construction/metadata`, `options` should be omitted.  Some blockchains require the PublicKey of particular AccountIdentifiers to construct a valid transaction. To fetch these PublicKeys, populate `required_public_keys` with the AccountIdentifiers associated with the desired PublicKeys. If it is not necessary to retrieve any PublicKeys for construction, `required_public_keys` should be omitted.",
       "type":"object",
       "properties": {
         "options": {
           "type":"object",
           "description":"The options that will be sent directly to `/construction/metadata` by the caller."
          },
         "required_public_keys": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/AccountIdentifier"
            }
          }
        }
      },
     "ConstructionPayloadsRequest": {
       "description":"ConstructionPayloadsRequest is the request to `/construction/payloads`. It contains the network, a slice of operations, and arbitrary metadata that was returned by the call to `/construction/metadata`. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse.",
       "type":"object",
       "required": [
         "network_identifier",
         "operations"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "operations": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/Operation"
            }
          },
         "metadata": {
           "type":"object"
          },
         "public_keys": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/PublicKey"
            }
          }
        }
      },
     "ConstructionPayloadsResponse": {
       "description":"ConstructionTransactionResponse is returned by `/construction/payloads`. It contains an unsigned transaction blob (that is usually needed to construct the a network transaction from a collection of signatures) and an array of payloads that must be signed by the caller.",
       "type":"object",
       "required": [
         "unsigned_transaction",
         "payloads"
        ],
       "properties": {
         "unsigned_transaction": {
           "type":"string"
          },
         "payloads": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/SigningPayload"
            }
          }
        }
      },
     "ConstructionCombineRequest": {
       "description":"ConstructionCombineRequest is the input to the `/construction/combine` endpoint. It contains the unsigned transaction blob returned by `/construction/payloads` and all required signatures to create a network transaction.",
       "type":"object",
       "required": [
         "network_identifier",
         "unsigned_transaction",
         "signatures"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "unsigned_transaction": {
           "type":"string"
          },
         "signatures": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/Signature"
            }
          }
        }
      },
     "ConstructionCombineResponse": {
       "description":"ConstructionCombineResponse is returned by `/construction/combine`. The network payload will be sent directly to the `construction/submit` endpoint.",
       "type":"object",
       "required": [
         "signed_transaction"
        ],
       "properties": {
         "signed_transaction": {
           "type":"string"
          }
        }
      },
     "ConstructionParseRequest": {
       "description":"ConstructionParseRequest is the input to the `/construction/parse` endpoint. It allows the caller to parse either an unsigned or signed transaction.",
       "type":"object",
       "required": [
         "network_identifier",
         "signed",
         "transaction"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "signed": {
           "type":"boolean",
           "description":"Signed is a boolean indicating whether the transaction is signed."
          },
         "transaction": {
           "type":"string",
           "description":"This must be either the unsigned transaction blob returned by `/construction/payloads` or the signed transaction blob returned by `/construction/combine`."
          }
        }
      },
     "ConstructionParseResponse": {
       "description":"ConstructionParseResponse contains an array of operations that occur in a transaction blob. This should match the array of operations provided to `/construction/preprocess` and `/construction/payloads`.",
       "type":"object",
       "required": [
         "operations"
        ],
       "properties": {
         "operations": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/Operation"
            }
          },
         "signers": {
           "description":"[DEPRECATED by `account_identifier_signers` in `v1.4.4`] All signers (addresses) of a particular transaction. If the transaction is unsigned, it should be empty.",
           "type":"array",
           "items": {
             "type":"string"
            }
          },
         "account_identifier_signers": {
           "type":"array",
           "items": {
             "$ref":"#/components/schemas/AccountIdentifier"
            }
          },
         "metadata": {
           "type":"object"
          }
        }
      },
     "ConstructionHashRequest": {
       "description":"ConstructionHashRequest is the input to the `/construction/hash` endpoint.",
       "type":"object",
       "required": [
         "network_identifier",
         "signed_transaction"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "signed_transaction": {
           "type":"string"
          }
        }
      },
     "ConstructionSubmitRequest": {
       "description":"The transaction submission request includes a signed transaction.",
       "type":"object",
       "required": [
         "network_identifier",
         "signed_transaction"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "signed_transaction": {
           "type":"string"
          }
        }
      },
     "TransactionIdentifierResponse": {
       "description":"TransactionIdentifierResponse contains the transaction_identifier of a transaction that was submitted to either `/construction/hash` or `/construction/submit`.",
       "type":"object",
       "required": [
         "transaction_identifier"
        ],
       "properties": {
         "transaction_identifier": {
           "$ref":"#/components/schemas/TransactionIdentifier"
          },
         "metadata": {
           "type":"object"
          }
        }
      },
     "CallRequest": {
       "description":"CallRequest is the input to the `/call` endpoint.",
       "type":"object",
       "required": [
         "network_identifier",
         "method",
         "parameters"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "method": {
           "type":"string",
           "description":"Method is some network-specific procedure call. This method could map to a network-specific RPC endpoint, a method in an SDK generated from a smart contract, or some hybrid of the two. The implementation must define all available methods in the Allow object. However, it is up to the caller to determine which parameters to provide when invoking `/call`.",
           "example":"eth_call"
          },
         "parameters": {
           "type":"object",
           "description":"Parameters is some network-specific argument for a method. It is up to the caller to determine which parameters to provide when invoking `/call`.",
           "example": {
             "block_number": 23,
             "address":"0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
            }
          }
        }
      },
     "CallResponse": {
       "description":"CallResponse contains the result of a `/call` invocation.",
       "type":"object",
       "required": [
         "result",
         "idempotent"
        ],
       "properties": {
         "result": {
           "type":"object",
           "description":"Result contains the result of the `/call` invocation. This result will not be inspected or interpreted by Rosetta tooling and is left to the caller to decode.",
           "example": {
             "count": 1000
            }
          },
         "idempotent": {
           "type":"boolean",
           "description":"Idempotent indicates that if `/call` is invoked with the same CallRequest again, at any point in time, it will return the same CallResponse. Integrators may cache the CallResponse if this is set to true to avoid making unnecessary calls to the Rosetta implementation. For this reason, implementers should be very conservative about returning true here or they could cause issues for the caller."
          }
        }
      },
     "EventsBlocksRequest": {
       "description":"EventsBlocksRequest is utilized to fetch a sequence of BlockEvents indicating which blocks were added and removed from storage to reach the current state.",
       "type":"object",
       "required": [
         "network_identifier"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "offset": {
           "description":"offset is the offset into the event stream to sync events from. If this field is not populated, we return the limit events backwards from tip. If this is set to 0, we start from the beginning.",
           "type":"integer",
           "format":"int64",
           "minimum": 0,
           "example": 5
          },
         "limit": {
           "description":"limit is the maximum number of events to fetch in one call. The implementation may return <= limit events.",
           "type":"integer",
           "format":"int64",
           "minimum": 0,
           "example": 5
          }
        }
      },
     "EventsBlocksResponse": {
       "description":"EventsBlocksResponse contains an ordered collection of BlockEvents and the max retrievable sequence.",
       "type":"object",
       "required": [
         "max_sequence",
         "events"
        ],
       "properties": {
         "max_sequence": {
           "description":"max_sequence is the maximum available sequence number to fetch.",
           "type":"integer",
           "format":"int64",
           "minimum": 0,
           "example": 5
          },
         "events": {
           "type":"array",
           "description":"events is an array of BlockEvents indicating the order to add and remove blocks to maintain a canonical view of blockchain state. Lightweight clients can use this event stream to update state without implementing their own block syncing logic.",
           "items": {
             "$ref":"#/components/schemas/BlockEvent"
            }
          }
        }
      },
     "SearchTransactionsRequest": {
       "description":"SearchTransactionsRequest is used to search for transactions matching a set of provided conditions in canonical blocks.",
       "type":"object",
       "required": [
         "network_identifier"
        ],
       "properties": {
         "network_identifier": {
           "$ref":"#/components/schemas/NetworkIdentifier"
          },
         "operator": {
           "$ref":"#/components/schemas/Operator"
          },
         "max_block": {
           "description":"max_block is the largest block index to consider when searching for transactions. If this field is not populated, the current block is considered the max_block. If you do not specify a max_block, it is possible a newly synced block will interfere with paginated transaction queries (as the offset could become invalid with newly added rows).",
           "type":"integer",
           "format":"int64",
           "minimum": 0,
           "example": 5
          },
         "offset": {
           "description":"offset is the offset into the query result to start returning transactions. If any search conditions are changed, the query offset will change and you must restart your search iteration.",
           "type":"integer",
           "format":"int64",
           "minimum": 0,
           "example": 5
          },
         "limit": {
           "description":"limit is the maximum number of transactions to return in one call. The implementation may return <= limit transactions.",
           "type":"integer",
           "format":"int64",
           "minimum": 0,
           "example": 5
          },
         "transaction_identifier": {
           "$ref":"#/components/schemas/TransactionIdentifier"
          },
         "account_identifier": {
           "$ref":"#/components/schemas/AccountIdentifier"
          },
         "coin_identifier": {
           "$ref":"#/components/schemas/CoinIdentifier"
          },
         "currency": {
           "$ref":"#/components/schemas/Currency"
          },
         "status": {
           "type":"string",
           "description":"status is the network-specific operation type.",
           "example":"reverted"
          },
         "type": {
           "type":"string",
           "description":"type is the network-specific operation type.",
           "example":"transfer"
          },
         "address": {
           "type":"string",
           "description":"address is AccountIdentifier.Address. This is used to get all transactions related to an AccountIdentifier.Address, regardless of SubAccountIdentifier.",
           "example":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
          },
         "success": {
           "type":"boolean",
           "description":"success is a synthetic condition populated by parsing network-specific operation statuses (using the mapping provided in `/network/options`)."
          }
        }
      },
     "SearchTransactionsResponse": {
       "description":"SearchTransactionsResponse contains an ordered collection of BlockTransactions that match the query in SearchTransactionsRequest. These BlockTransactions are sorted from most recent block to oldest block.",
       "type":"object",
       "required": [
         "transactions",
         "total_count"
        ],
       "properties": {
         "transactions": {
           "type":"array",
           "description":"transactions is an array of BlockTransactions sorted by most recent BlockIdentifier (meaning that transactions in recent blocks appear first). If there are many transactions for a particular search, transactions may not contain all matching transactions. It is up to the caller to paginate these transactions using the max_block field.",
           "items": {
             "$ref":"#/components/schemas/BlockTransaction"
            }
          },
         "total_count": {
           "description":"total_count is the number of results for a given search. Callers typically use this value to concurrently fetch results by offset or to display a virtual page number associated with results.",
           "type":"integer",
           "format":"int64",
           "minimum": 0,
           "example": 5
          },
         "next_offset": {
           "description":"next_offset is the next offset to use when paginating through transaction results. If this field is not populated, there are no more transactions to query.",
           "type":"integer",
           "format":"int64",
           "minimum": 0,
           "example": 5
          }
        }
      },
     "Error": {
       "description":"Instead of utilizing HTTP status codes to describe node errors (which often do not have a good analog), rich errors are returned using this object. Both the code and message fields can be individually used to correctly identify an error. Implementations MUST use unique values for both fields.",
       "type":"object",
       "required": [
         "code",
         "message",
         "retriable"
        ],
       "properties": {
         "code": {
           "description":"Code is a network-specific error code. If desired, this code can be equivalent to an HTTP status code.",
           "type":"integer",
           "format":"int32",
           "minimum": 0,
           "example": 12
          },
         "message": {
           "description":"Message is a network-specific error message. The message MUST NOT change for a given code. In particular, this means that any contextual information should be included in the details field.",
           "type":"string",
           "example":"Invalid account format"
          },
         "description": {
           "description":"Description allows the implementer to optionally provide additional information about an error. In many cases, the content of this field will be a copy-and-paste from existing developer documentation. Description can ONLY be populated with generic information about a particular type of error. It MUST NOT be populated with information about a particular instantiation of an error (use `details` for this). Whereas the content of Error.Message should stay stable across releases, the content of Error.Description will likely change across releases (as implementers improve error documentation). For this reason, the content in this field is not part of any type assertion (unlike Error.Message).",
           "type":"string",
           "example":"This error is returned when the requested AccountIdentifier is improperly formatted."
          },
         "retriable": {
           "description":"An error is retriable if the same request may succeed if submitted again.",
           "type":"boolean"
          },
         "details": {
           "type":"object",
           "description":"Often times it is useful to return context specific to the request that caused the error (i.e. a sample of the stack trace or impacted account) in addition to the standard error message.",
           "example": {
             "address":"0x1dcc4de8dec75d7aab85b567b6",
             "error":"not base64"
            }
          }
        }
      }
    }
  }
}