Newer
Older
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
- name: constantItemId
in: path
description: Id of the const item to query for.
required: true
schema:
type: string
- name: at
in: query
description: Block at which to query the const item at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
- name: metadata
in: query
description: Include the const items metadata (including documentation)
if set to true.
required: false
schema:
default: false
type: boolean
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/PalletConstantsItem'
"400":
description: invalid blockId supplied for at query param
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: could not find resource with with id
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/pallets/nomination-pools/{poolId}:
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
get:
tags:
- pallets
summary: Get information and metadata associated with a nomination pool.
description: Returns information associated with a nomination pool which includes
the nomination pools' `bondedPool`, `rewardPool` and `metadata`.
operationId: getNominationPoolById
parameters:
- name: poolId
in: path
description: The unsignedInteger Id of a nomination pool.
required: true
schema:
type: string
format: unsignedInteger
- name: at
in: query
description: Block at which to retrieve the nomination pool.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/PalletsNominationPool'
/pallets/nomination-pools/info:
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
get:
tags:
- pallets
summary: Get information associated with nomination pools.
description: Returns information and metadata for nomination pools including pool counters and limits.
operationId: getNominationPoolInfo
parameters:
- name: at
in: query
description: Block at which to retrieve the nomination pool info.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/PalletsNominationPoolsInfo'
/pallets/staking/progress:
get:
tags:
- staking
summary: Get progress on the general Staking pallet system.
description: Returns information on the progress of key components of the
staking system and estimates of future points of interest. Replaces
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
`/staking-info` from versions < v1.0.0.
operationId: getStakingProgress
parameters:
- name: at
in: query
description: Block at which to retrieve a staking progress report.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/StakingProgress'
"400":
description: invalid blockId supplied for at query param
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/pallets/staking/validators:
get:
tags:
- staking
- pallets
summary: Get all validators (active/waiting) of a specific chain.
description: Returns a list of all validators addresses and their
corresponding status which can be either active or waiting. It will also return
a list of active validators that will not be part of the next era for staking. They will
be under the key "validatorsToBeChilled". It's important to note, that addresses can be present in both
the "validators" key, and "validatorsToBeChilled".
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
operationId: getStakingValidators
parameters:
- name: at
in: query
description: Block at which to retrieve the list of validators.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/StakingValidators'
"400":
description: invalid blockId supplied for at query param
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/pallets/{palletId}/dispatchables:
get:
tags:
- pallets
summary: Get a list of dispatchables for a pallet.
description: Returns a list of dispatchable item metadata for distpachable items of the
specified palletId.
parameters:
- name: palletId
in: path
description: 'Name or index of the pallet to read dispatchable metadata for. Note: the pallet name must match what is
specified in the runtime metadata.'
required: true
schema:
type: string
- name: onlyIds
in: query
description: Only return the names (IDs) of the dispatchable items instead of every dispatchable's metadata.
required: false
schema:
type: boolean
responses:
"200":
description: successful operation
content:
application/json:
schema:
type: array
description: Pallet info and Array of dispatchableItemIds.
$ref: '#/components/schemas/PalletDispatchables'
"400":
description: invalid blockId supplied for at query param
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: could not find pallet with palletId
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/pallets/{palletId}/dispatchables/{dispatchableItemId}:
get:
tags:
- pallets
summary: Get the value of a dispatchable item.
description: Returns the value stored under the dispatchableItemId.
parameters:
- name: palletId
in: path
description: 'Name or index of the pallet to read dispatchable metadata for. Note: the pallet name must match what is
specified in the runtime metadata.'
required: true
schema:
type: string
- name: dispatchableItemId
description: Id of the dispatchable item to query for.
required: true
schema:
type: string
- name: metadata
in: query
description: Include the dispatchable items metadata (including documentation)
if set to true.
required: false
schema:
default: false
type: boolean
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/PalletDispatchablesItem'
"400":
description: invalid blockId supplied for at query param
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: could not find resource with with id
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
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
/pallets/{palletId}/errors:
get:
tags:
- pallets
summary: Get a list of errors for a pallet.
description: Returns a list of error item metadata for error items of the
specified palletId.
parameters:
- name: palletId
in: path
description: 'Name or index of the pallet to read error metadata for. Note: the pallet name must match what is
specified in the runtime metadata.'
required: true
schema:
type: string
- name: onlyIds
in: query
description: Only return the names (IDs) of the error items instead of every error's metadata.
required: false
schema:
type: boolean
- name: at
in: query
description: Block at which to retrieve a list of
the pallet's error items.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
type: array
description: Pallet info and Array of errorItemIds.
items:
$ref: '#/components/schemas/PalletErrors'
"400":
description: invalid blockId supplied for at query param
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: could not find pallet with palletId
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/pallets/{palletId}/errors/{errorItemId}:
get:
tags:
- pallets
summary: Get the value of an error item.
description: Returns the value stored under the errorItemId.
parameters:
- name: palletId
in: path
description: 'Name or index of the pallet to read error metadata for. Note: the pallet name must match what is
specified in the runtime metadata.'
required: true
schema:
type: string
- name: errorItemId
in: path
description: Id of the error item to query for.
required: true
schema:
type: string
- name: at
in: query
description: Block at which to query the error item at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
- name: metadata
in: query
description: Include the error items metadata (including documentation)
if set to true.
required: false
schema:
default: false
type: boolean
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/PalletErrorsItem'
"400":
description: invalid blockId supplied for at query param
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: could not find resource with with id
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
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
/pallets/{palletId}/events:
get:
tags:
- pallets
summary: Get a list of events for a pallet.
description: Returns a list of event item metadata for event items of the
specified palletId.
parameters:
- name: palletId
in: path
description: 'Name or index of the pallet to read event metadata for. Note: the pallet name must match what is
specified in the runtime metadata.'
required: true
schema:
type: string
- name: onlyIds
in: query
description: Only return the names (IDs) of the event items instead of every event's metadata.
required: false
schema:
type: boolean
- name: at
in: query
description: Block at which to retrieve a list of
the pallet's event items.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
type: array
description: Pallet info and Array of eventItemIds.
items:
$ref: '#/components/schemas/PalletEvents'
"400":
description: invalid blockId supplied for at query param
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: could not find pallet with palletId
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/pallets/{palletId}/events/{eventItemId}:
get:
tags:
- pallets
summary: Get the value of an event item.
description: Returns the value stored under the eventItemId.
parameters:
- name: palletId
in: path
description: 'Name or index of the pallet to read event metadata for. Note: the pallet name must match what is
specified in the runtime metadata.'
required: true
schema:
type: string
- name: eventItemId
in: path
description: Id of the event item to query for.
required: true
schema:
type: string
- name: at
in: query
description: Block at which to query the event item at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
- name: metadata
in: query
description: Include the event items metadata (including documentation)
if set to true.
required: false
schema:
default: false
type: boolean
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/PalletEventsItem'
"400":
description: invalid blockId supplied for at query param
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: could not find resource with with id
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/runtime/metadata:
get:
tags:
- runtime
summary: Get the runtime metadata in decoded, JSON form.
description: >-
Returns the runtime metadata as a JSON object.
Substrate Reference:
- FRAME Support: https://crates.parity.io/frame_support/metadata/index.html
- Knowledge Base: https://substrate.dev/docs/en/knowledgebase/runtime/metadata
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
parameters:
- name: at
in: query
description: Block at which to retrieve the metadata at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
type: object
description: Response is dependent on the runtime metadata contents.
/runtime/code:
get:
tags:
- runtime
summary: Get the runtime wasm blob.
description: Returns the runtime Wasm blob in hex format.
parameters:
- name: at
in: query
description: Block at which to retrieve the runtime wasm blob at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/RuntimeCode'
/runtime/spec:
get:
tags:
- runtime
summary: Get version information of the Substrate runtime.
description: Returns version information related to the runtime.
parameters:
- name: at
in: query
description: Block at which to retrieve runtime version information at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/RuntimeSpec'
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
/pallets/{palletId}/storage:
get:
tags:
- pallets
summary: Get a list of storage items for a pallet.
description: Returns a list of storage item metadata for storage items of the
specified palletId.
parameters:
- name: palletId
in: path
description: 'Name or index of the pallet to query the storage of. Note: the pallet name must match what is
specified in the runtime metadata.'
required: true
schema:
type: string
- name: onlyIds
in: query
description: Only return the names (IDs) of the storage items instead of all of each storage
item's metadata.
required: false
schema:
type: boolean
- name: at
in: query
description: Block at which to retrieve a list of
the pallet's storage items.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
type: array
description: Pallet info and Array of storageItemIds.
items:
$ref: '#/components/schemas/PalletStorage'
"400":
description: invalid blockId supplied for at query param
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: could not find pallet with palletId
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/pallets/{palletId}/storage/{storageItemId}:
get:
tags:
- pallets
summary: Get the value of a storage item.
description: Returns the value stored under the storageItemId. If it is a
map, query param key1 is required. If the storage item is double map
query params key1 and key2 are required.
parameters:
- name: palletId
in: path
description: 'Name or index of the pallet to query the storage of. Note: pallet name aligns with
pallet name as specified in runtime metadata.'
required: true
schema:
type: string
- name: storageItemId
in: path
description: Id of the storage item to query for.
required: true
schema:
type: string
description: Set of N keys used for querying a storage map. It should be queried using the
following format - ?keys[]=key1&keys[]=key2. Order matters, as it will determine the
order the keys are passed into the storage calls.
required: false
schema:
type: array
items:
type: string
description: An array of storage keys.
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
- name: at
in: query
description: Block at which to query the storage item at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
- name: metadata
in: query
description: Include the storage items metadata (including documentation)
if set to true.
required: false
schema:
default: false
type: boolean
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/PalletStorageItem'
"400":
description: invalid blockId supplied for at query param
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: could not find resource with with id
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
tags:
- paras
summary: |
List all registered paras (parathreads & parachains).
description: Returns all registered parachains and parathreads with lifecycle info.
parameters:
- name: at
in: query
description: Block at which to retrieve paras list at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Paras'
/paras/leases/current:
get:
tags:
- paras
summary: |
Get general information about the current lease period.
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
description: |
Returns an overview of the current lease period, including lease holders.
parameters:
- name: at
in: query
description: Block at which to retrieve current lease period info at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
- name: currentLeaseHolders
in: query
description: |
Wether or not to include the `currentLeaseHolders` property. Inclusion
of the property will likely result in a larger payload and increased
response time.
required: false
schema:
type: boolean
default: true
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ParasLeasesCurrent'
/paras/auctions/current:
get:
tags:
- paras
summary: |
Get the status of the current auction.
Returns an overview of the current auction. There is only one auction
at a time. If there is no auction most fields will be `null`. If the current
auction phase is in `vrfDelay` and you are looking to retrieve the latest winning
bids, it is advised to query one block before `finishEnd` in the `endingPeriod` phase
for that auction as there technically are no winners during the `vrfDelay` and thus
the field is `null`.
parameters:
- name: at
in: query
description: Block at which to retrieve auction progress at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ParasAuctionsCurrent'
get:
tags:
- paras
summary: |
List all stored crowdloans.
description: |
Returns a list of all the crowdloans and their associated paraIds.
parameters:
- name: at
in: query
description: Block at which to retrieve the list of paraIds that have crowdloans at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ParasCrowdloans'
/paras/{paraId}/crowdloan-info:
Get crowdloan information for a `paraId`.
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
description: |
Returns crowdloan's `fundInfo` and the set of `leasePeriods` the crowdloan`
covers.
parameters:
- name: paraId
in: path
description: paraId to query the crowdloan information of.
required: true
schema:
type: number
- name: at
in: query
description: Block at which to retrieve info at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ParasCrowdloanInfo'
/paras/{paraId}/lease-info:
get:
tags:
- paras
summary: |
Get current and future leases as well as the lifecycle stage for a given `paraId`.
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
description: |
Returns a list of leases that belong to the `paraId` as well as the
`paraId`'s current lifecycle stage.
parameters:
- name: paraId
in: path
description: paraId to query the crowdloan information of.
required: true
schema:
type: number
- name: at
in: query
description: Block at which to retrieve para's leases at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ParasLeaseInfo'
Tarik Gul
committed
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
/paras/head/included-candidates:
get:
tags:
- paras
summary: |
Get the heads of the included (backed and considered available) parachain candidates at the
specified block height or at the most recent finalized head otherwise.
description: |
Returns an object with all the parachain id's as keys, and their headers as values.
parameters:
- name: at
in: query
description: Block at which to retrieve para's heads at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ParasHeaders'
/paras/head/backed-candidates:
get:
tags:
- paras
summary: |
Get the heads of the backed parachain candidates at the specified block height or at the most recent finalized head otherwise.
description: |
Returns an object with all the parachain id's as keys, and their headers as values.
parameters:
- name: at
in: query
description: Block at which to retrieve para's heads at.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ParasHeaders'
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
/experimental/blocks/head/traces:
get:
tags:
- trace
summary: |
[Experimental - subject to breaking change.] Get traces for the most
recently finalized block.
description: |
Returns traces (spans and events) of the most recently finalized block from
RPC `state_straceBlock`. Consult the [RPC docs](https://github.com/paritytech/substrate/blob/aba876001651506f85c14baf26e006b36092e1a0/client/rpc-api/src/state/mod.rs#L140)
for conceptual info.
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/BlocksTrace'
/experimental/blocks/{blockId}/traces:
get:
tags:
- trace
summary: |
[Experimental - subject to breaking change.] Get traces for the given `blockId`.
description: |
Returns traces (spans and events) of the specified block from
RPC `state_straceBlock`. Consult the [RPC docs](https://github.com/paritytech/substrate/blob/aba876001651506f85c14baf26e006b36092e1a0/client/rpc-api/src/state/mod.rs#L140) for conceptual info.
parameters:
- name: blockId
in: path
description: Block identifier, as the block height or block hash.
required: true
schema:
pattern: 'a-km-zA-HJ-NP-Z1-9{8,64}'
type: string
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/BlocksTrace'
/experimental/blocks/head/traces/operations:
get:
tags:
- trace
summary: |
[Experimental - subject to breaking change.] Get the operations from the
most recently finalized block.
description: |
Returns the operations from the most recently finalized block. Operations
represent one side of a balance change. For example if Alice transfers
100unit to Bob there will be two operations; 1) Alice - 100 2) Bob + 100.
Given account A and A's balance at block k0 (Ak0), if we sum all the
operations for A from block k1 through kn against Ak0, we will end up
with A's balance at block kn (Akn). Thus, operations can be used to audit
that balances change as expected.
This is useful for Substrate based chains because the advanced business
logic can make it difficult to ensure auditable balance reconciliation
based purely on events. Instead of using events one can use the
operations given from this endpoint.
Note - each operation corresponds to a delta of a single field of the
`system::AccountData` storage item (i.e `free`, `reserved`, `misc_frozen`
and `fee_frozen`).
Note - operations are assigned a block execution phase (and extrinsic index
for those in the apply extrinsic phase) based on an "action group". For
example all the operations for 1 extrinsic will be in the same action group.
The action groups can optionally be fetched with the `action` query param
for closer auditing.
Note - There are no 0 value operations (e.g. a transfer of 0, or a
transfer to itself)
To learn more about operation and action group creation please consult
[this diagram](https://docs.google.com/drawings/d/1vZoJo9jaXlz0LmrdTOgHck9_1LsfuQPRmTr-5g1tOis/edit?usp=sharing)
parameters:
- name: actions
in: query
description: Whether or not to include action groups.
required: false
schema:
type: boolean
default: false
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/BlocksTraceOperations'
/experimental/blocks/{blockId}/traces/operations:
get:
tags:
- trace
summary: |
[Experimental - subject to breaking change.] Get the operations from the
specified block.
description: |
Returns the operations from the most recently finalized block. Operations
represent one side of a balance change. For example if Alice transfers
100unit to Bob there will be two operations; 1) Alice - 100 2) Bob + 100.
Given account A and A's balance at block k0 (Ak0), if we sum all the
operations for A from block k1 through kn against Ak0, we will end up
with A's balance at block kn (Akn). Thus, operations can be used to audit
that balances change as expected.
This is useful for Substrate based chains because the advanced business
logic can make it difficult to ensure auditable balance reconciliation
based purely on events. Instead of using events one can use the
operations given from this endpoint.
Note - each operation corresponds to a delta of a single field of the
`system::AccountData` storage item (i.e `free`, `reserved`, `misc_frozen`
and `fee_frozen`).
Note - operations are assigned a block execution phase (and extrinsic index
for those in the apply extrinsic phase) based on an "action group". For
example all the operations for 1 extrinsic will be in the same action group.
The action groups can optionally be fetched with the `action` query param
for closer auditing.