diff --git a/api/admin/service.md b/api/admin/service.md
index 4a2a97c29e13..3ad579921863 100644
--- a/api/admin/service.md
+++ b/api/admin/service.md
@@ -1,29 +1,18 @@
----
-tags: [AvalancheGo APIs]
-description: This page is an overview of the Admin API associated with AvalancheGo.
-sidebar_label: Admin API
-pagination_label: Admin API
----
+The Admin API can be used for measuring node health and debugging.
-# Admin API
+
+The Admin API is disabled by default for security reasons. To run a node with the Admin API enabled, use [`config flag --api-admin-enabled=true`](/nodes/configure/configs-flags#--api-admin-enabled-boolean).
-This API can be used for measuring node health and debugging.
-
-:::info
-The Admin API is disabled by default for security reasons. To run a node with the Admin API
-enabled, use [config flag `--api-admin-enabled=true`](/nodes/configure/avalanchego-config-flags.md#--api-admin-enabled-boolean).
-
-This API set is for a specific node, it is unavailable on the [public server](/tooling/rpc-providers.md).
-
-:::
+This API set is for a specific node, it is unavailable on the [public server](/tooling/rpc-providers).
+
## Format
-This API uses the `json 2.0` RPC format. For details, see [here](/reference/standards/guides/issuing-api-calls.md).
+This API uses the `json 2.0` RPC format. For details, see [here](/api-reference/standards/guides/issuing-api-calls).
## Endpoint
-```text
+```
/ext/admin
```
@@ -31,23 +20,21 @@ This API uses the `json 2.0` RPC format. For details, see [here](/reference/stan
### `admin.alias`
-Assign an API endpoint an alias, a different endpoint for the API. The original endpoint will still
-work. This change only affects this node; other nodes will not know about this alias.
+Assign an API endpoint an alias, a different endpoint for the API. The original endpoint will still work. This change only affects this node; other nodes will not know about this alias.
-**Signature:**
+**Signature**:
-```text
+```
admin.alias({endpoint:string, alias:string}) -> {}
```
-- `endpoint` is the original endpoint of the API. `endpoint` should only include the part of the
- endpoint after `/ext/`.
+- `endpoint` is the original endpoint of the API. `endpoint` should only include the part of the endpoint after `/ext/`.
- The API being aliased can now be called at `ext/alias`.
- `alias` can be at most 512 characters.
-**Example Call:**
+**Example Call**:
-```bash
+```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
@@ -59,7 +46,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/admin
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -73,18 +60,17 @@ Now, calls to the X-Chain can be made to either `/ext/bc/X` or, equivalently, to
### `admin.aliasChain`
-Give a blockchain an alias, a different name that can be used any place the blockchain’s ID is used.
+Give a blockchain an alias, a different name that can be used any place the blockchain's ID is used.
-:::note Aliasing a chain can also be done via the [Node API](/nodes/configure/avalanchego-config-flags.md#--chain-aliases-file-string).
-Note that the alias is set for each chain on each node individually. In a multi-node Subnet, the
-same alias should be configured on each node to use an alias across a Subnet successfully. Setting
-an alias for a chain on one node does not register that alias with other nodes automatically.
+
+Aliasing a chain can also be done via the [Node API](/nodes/configure/configs-flags#--chain-aliases-file-string).
-:::
+Note that the alias is set for each chain on each node individually. In a multi-node Avalanche L1, the same alias should be configured on each node to use an alias across an Avalanche L1 successfully. Setting an alias for a chain on one node does not register that alias with other nodes automatically.
+
-**Signature:**
+**Signature**:
-```text
+```
admin.aliasChain(
{
chain:string,
@@ -93,12 +79,12 @@ admin.aliasChain(
) -> {}
```
-- `chain` is the blockchain’s ID.
-- `alias` can now be used in place of the blockchain’s ID (in API endpoints, for example.)
+- `chain` is the blockchain's ID.
+- `alias` can now be used in place of the blockchain's ID (in API endpoints, for example.)
-**Example Call:**
+**Example Call**:
-```bash
+```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
@@ -110,7 +96,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/admin
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -120,30 +106,27 @@ curl -X POST --data '{
}
```
-Now, instead of interacting with the blockchain whose ID is
-`sV6o671RtkGBcno1FiaDbVcFv2sG5aVXMZYzKdP4VQAWmJQnM` by making API calls to
-`/ext/bc/sV6o671RtkGBcno1FiaDbVcFv2sG5aVXMZYzKdP4VQAWmJQnM`, one can also make calls to
-`ext/bc/myBlockchainAlias`.
+Now, instead of interacting with the blockchain whose ID is `sV6o671RtkGBcno1FiaDbVcFv2sG5aVXMZYzKdP4VQAWmJQnM` by making API calls to `/ext/bc/sV6o671RtkGBcno1FiaDbVcFv2sG5aVXMZYzKdP4VQAWmJQnM`, one can also make calls to `ext/bc/myBlockchainAlias`.
### `admin.getChainAliases`
Returns the aliases of the chain
-**Signature:**
+**Signature**:
-```text
+```
admin.getChainAliases(
- {
- chain:string
- }
+ {
+ chain:string
+ }
) -> {aliases:string[]}
```
-- `chain` is the blockchain’s ID.
+- `chain` is the blockchain's ID.
-**Example Call:**
+**Example Call**:
-```bash
+```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
@@ -154,7 +137,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/admin
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -174,29 +157,28 @@ curl -X POST --data '{
Returns log and display levels of loggers.
-**Signature:**
+**Signature**:
-```text
+```
admin.getLoggerLevel(
- {
- loggerName:string // optional
- }
+ {
+ loggerName:string // optional
+ }
) -> {
loggerLevels: {
- loggerName: {
- logLevel: string,
- displayLevel: string
- }
+ loggerName: {
+ logLevel: string,
+ displayLevel: string
+ }
}
}
```
-- `loggerName` is the name of the logger to be returned. This is an optional argument. If not
- specified, it returns all possible loggers.
+- `loggerName` is the name of the logger to be returned. This is an optional argument. If not specified, it returns all possible loggers.
-**Example Call:**
+**Example Call**:
-```bash
+```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
@@ -207,7 +189,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/admin
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -226,24 +208,22 @@ curl -X POST --data '{
### `admin.loadVMs`
-Dynamically loads any virtual machines installed on the node as plugins. See
-[here](/build/vm/intro#installing-a-vm) for more information on how to install a
-virtual machine on a node.
+Dynamically loads any virtual machines installed on the node as plugins. See [here](/virtual-machines#installing-a-vm) for more information on how to install a virtual machine on a node.
-**Signature:**
+**Signature**:
-```sh
+```
admin.loadVMs() -> {
- newVMs: map[string][]string
- failedVMs: map[string]string,
+ newVMs: map[string][]string
+ failedVMs: map[string]string,
}
```
- `failedVMs` is only included in the response if at least one virtual machine fails to be loaded.
-**Example Call:**
+**Example Call**:
-```bash
+```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
@@ -252,7 +232,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/admin
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -273,15 +253,15 @@ curl -X POST --data '{
Writes a profile of mutex statistics to `lock.profile`.
-**Signature:**
+**Signature**:
-```text
+```
admin.lockProfile() -> {}
```
-**Example Call:**
+**Example Call**:
-```bash
+```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
@@ -290,7 +270,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/admin
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -304,15 +284,15 @@ curl -X POST --data '{
Writes a memory profile of the to `mem.profile`.
-**Signature:**
+**Signature**:
-```text
+```
admin.memoryProfile() -> {}
```
-**Example Call:**
+**Example Call**:
-```bash
+```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
@@ -321,7 +301,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/admin
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -335,28 +315,27 @@ curl -X POST --data '{
Sets log and display levels of loggers.
-**Signature:**
+**Signature**:
-```text
+```
admin.setLoggerLevel(
- {
- loggerName: string, // optional
- logLevel: string, // optional
- displayLevel: string, // optional
- }
+ {
+ loggerName: string, // optional
+ logLevel: string, // optional
+ displayLevel: string, // optional
+ }
) -> {}
```
-- `loggerName` is the logger's name to be changed. This is an optional parameter. If not specified,
- it changes all possible loggers.
+- `loggerName` is the logger's name to be changed. This is an optional parameter. If not specified, it changes all possible loggers.
- `logLevel` is the log level of written logs, can be omitted.
- `displayLevel` is the log level of displayed logs, can be omitted.
`logLevel` and `displayLevel` cannot be omitted at the same time.
-**Example Call:**
+**Example Call**:
-```bash
+```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
@@ -369,7 +348,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/admin
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -381,18 +360,17 @@ curl -X POST --data '{
### `admin.startCPUProfiler`
-Start profiling the CPU utilization of the node. To stop, call `admin.stopCPUProfiler`. On stop,
-writes the profile to `cpu.profile`.
+Start profiling the CPU utilization of the node. To stop, call `admin.stopCPUProfiler`. On stop, writes the profile to `cpu.profile`.
-**Signature:**
+**Signature**:
-```text
+```
admin.startCPUProfiler() -> {}
```
-**Example Call:**
+**Example Call**:
-```bash
+```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
@@ -401,7 +379,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/admin
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -415,15 +393,15 @@ curl -X POST --data '{
Stop the CPU profile that was previously started.
-**Signature:**
+**Signature**:
-```text
+```
admin.stopCPUProfiler() -> {}
```
-**Example Call:**
+**Example Call**:
-```bash
+```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
@@ -431,7 +409,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/admin
```
-**Example Response:**
+**Example Response**:
```json
{
diff --git a/api/health/service.md b/api/health/service.md
index 7f6a787f44fe..44fce27f49c8 100644
--- a/api/health/service.md
+++ b/api/health/service.md
@@ -1,62 +1,36 @@
----
-tags: [AvalancheGo APIs]
-description: This page is an overview of the Health API associated with AvalancheGo. This API can be used for measuring node health.
-sidebar_label: Health API
-pagination_label: Health API
----
+The Health API can be used for measuring node health.
-# Health API
-
-This API can be used for measuring node health.
-
-:::info
-
-This API set is for a specific node; it is unavailable on the [public server](/tooling/rpc-providers.md).
-
-:::
+
+This API set is for a specific node; it is unavailable on the [public server](/tooling/rpc-providers).
+
## Health Checks
The node periodically runs all health checks, including health checks for each chain.
-The frequency at which health checks are run can be specified with the [--health-check-frequency](/nodes/configure/avalanchego-config-flags.md) flag.
+The frequency at which health checks are run can be specified with the [\--health-check-frequency](/nodes/configure/configs-flags) flag.
## Filterable Health Checks
-The health checks that are run by the node are filterable. You can specify which health checks
-you want to see by using `tags` filters. Returned results will only include health checks that
-match the specified tags and global health checks like `network`, `database` etc.
-When filtered, the returned results will not show the full node health,
-but only a subset of filtered health checks.
-This means the node can still be unhealthy in unfiltered checks, even if the returned results show that the node is healthy.
-AvalancheGo supports using subnetIDs as tags.
+The health checks that are run by the node are filterable. You can specify which health checks you want to see by using `tags` filters. Returned results will only include health checks that match the specified tags and global health checks like `network`, `database` etc. When filtered, the returned results will not show the full node health, but only a subset of filtered health checks. This means the node can still be unhealthy in unfiltered checks, even if the returned results show that the node is healthy. AvalancheGo supports using subnetIDs as tags.
## GET Request
-To get an HTTP status code response that indicates the node’s health, make a `GET` request.
-If the node is healthy, it will return a `200` status code.
-If the node is unhealthy, it will return a `503` status code.
-In-depth information about the node's health is included in the response body.
+To get an HTTP status code response that indicates the node's health, make a `GET` request. If the node is healthy, it will return a `200` status code. If the node is unhealthy, it will return a `503` status code. In-depth information about the node's health is included in the response body.
### Filtering
-To filter GET health checks, add a `tag` query parameter to the request.
-The `tag` parameter is a string.
-For example, to filter health results by subnetID `29uVeLPJB1eQJkzRemU8g8wZDw5uJRqpab5U2mX9euieVwiEbL`,
-use the following query:
+To filter GET health checks, add a `tag` query parameter to the request. The `tag` parameter is a string. For example, to filter health results by subnetID `29uVeLPJB1eQJkzRemU8g8wZDw5uJRqpab5U2mX9euieVwiEbL`, use the following query:
```sh
curl 'http://localhost:9650/ext/health?tag=29uVeLPJB1eQJkzRemU8g8wZDw5uJRqpab5U2mX9euieVwiEbL'
```
-In this example returned results will contain global health checks and health checks that are
-related to subnetID `29uVeLPJB1eQJkzRemU8g8wZDw5uJRqpab5U2mX9euieVwiEbL`.
+In this example returned results will contain global health checks and health checks that are related to subnetID `29uVeLPJB1eQJkzRemU8g8wZDw5uJRqpab5U2mX9euieVwiEbL`.
-**Note:** This filtering can show healthy results even if the node is unhealthy in other Chains/Subnets.
+**Note**: This filtering can show healthy results even if the node is unhealthy in other Chains/Avalanche L1s.
-In order to filter results by multiple tags, use multiple `tag` query parameters.
-For example, to filter health results by subnetID `29uVeLPJB1eQJkzRemU8g8wZDw5uJRqpab5U2mX9euieVwiEbL` and
-`28nrH5T2BMvNrWecFcV3mfccjs6axM1TVyqe79MCv2Mhs8kxiY` use the following query:
+In order to filter results by multiple tags, use multiple `tag` query parameters. For example, to filter health results by subnetID `29uVeLPJB1eQJkzRemU8g8wZDw5uJRqpab5U2mX9euieVwiEbL` and `28nrH5T2BMvNrWecFcV3mfccjs6axM1TVyqe79MCv2Mhs8kxiY` use the following query:
```sh
curl 'http://localhost:9650/ext/health?tag=29uVeLPJB1eQJkzRemU8g8wZDw5uJRqpab5U2mX9euieVwiEbL&tag=28nrH5T2BMvNrWecFcV3mfccjs6axM1TVyqe79MCv2Mhs8kxiY'
@@ -68,8 +42,7 @@ The returned results will include health checks for both subnetIDs as well as gl
The available endpoints for GET requests are:
-- `/ext/health` returns a holistic report of the status of the node.
- **Most operators should monitor this status.**
+- `/ext/health` returns a holistic report of the status of the node. **Most operators should monitor this status.**
- `/ext/health/health` is the same as `/ext/health`.
- `/ext/health/readiness` returns healthy once the node has finished initializing.
- `/ext/health/liveness` returns healthy once the endpoint is available.
@@ -78,22 +51,17 @@ The available endpoints for GET requests are:
### Format
-This API uses the `json 2.0` RPC format. For more information on making JSON RPC calls, see
-[here](/reference/standards/guides/issuing-api-calls.md).
+This API uses the `json 2.0` RPC format. For more information on making JSON RPC calls, see [here](/api-reference/standards/guides/issuing-api-calls).
### Endpoint
-```text
-/ext/health
-```
-
### Methods
#### `health.health`
This method returns the last set of health check results.
-**Example Call:**
+**Example Call**:
```sh
curl -H 'Content-Type: application/json' --data '{
@@ -106,7 +74,7 @@ curl -H 'Content-Type: application/json' --data '{
}' 'http://localhost:9650/ext/health'
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -210,22 +178,22 @@ curl -H 'Content-Type: application/json' --data '{
In this example response, every check has passed. So, the node is healthy.
-**Response Explanation:**
+**Response Explanation**:
- `checks` is a list of health check responses.
- - A check response may include a `message` with additional context.
- - A check response may include an `error` describing why the check failed.
- - `timestamp` is the timestamp of the last health check.
- - `duration` is the execution duration of the last health check, in nanoseconds.
- - `contiguousFailures` is the number of times in a row this check failed.
- - `timeOfFirstFailure` is the time this check first failed.
+ - A check response may include a `message` with additional context.
+ - A check response may include an `error` describing why the check failed.
+ - `timestamp` is the timestamp of the last health check.
+ - `duration` is the execution duration of the last health check, in nanoseconds.
+ - `contiguousFailures` is the number of times in a row this check failed.
+ - `timeOfFirstFailure` is the time this check first failed.
- `healthy` is true all the health checks are passing.
#### `health.readiness`
This method returns the last evaluation of the startup health check results.
-**Example Call:**
+**Example Call**:
```sh
curl -H 'Content-Type: application/json' --data '{
@@ -238,7 +206,7 @@ curl -H 'Content-Type: application/json' --data '{
}' 'http://localhost:9650/ext/health'
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -259,22 +227,22 @@ curl -H 'Content-Type: application/json' --data '{
In this example response, every check has passed. So, the node has finished the startup process.
-**Response Explanation:**
+**Response Explanation**:
- `checks` is a list of health check responses.
- - A check response may include a `message` with additional context.
- - A check response may include an `error` describing why the check failed.
- - `timestamp` is the timestamp of the last health check.
- - `duration` is the execution duration of the last health check, in nanoseconds.
- - `contiguousFailures` is the number of times in a row this check failed.
- - `timeOfFirstFailure` is the time this check first failed.
+ - A check response may include a `message` with additional context.
+ - A check response may include an `error` describing why the check failed.
+ - `timestamp` is the timestamp of the last health check.
+ - `duration` is the execution duration of the last health check, in nanoseconds.
+ - `contiguousFailures` is the number of times in a row this check failed.
+ - `timeOfFirstFailure` is the time this check first failed.
- `healthy` is true all the health checks are passing.
#### `health.liveness`
This method returns healthy.
-**Example Call:**
+**Example Call**:
```sh
curl -H 'Content-Type: application/json' --data '{
@@ -284,7 +252,7 @@ curl -H 'Content-Type: application/json' --data '{
}' 'http://localhost:9650/ext/health'
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -299,7 +267,7 @@ curl -H 'Content-Type: application/json' --data '{
In this example response, the node was able to handle the request and mark the service as healthy.
-**Response Explanation:**
+**Response Explanation**:
- `checks` is an empty list.
- `healthy` is true.
diff --git a/api/info/service.md b/api/info/service.md
index 9beaabdf217d..e2ee8380d0c8 100644
--- a/api/info/service.md
+++ b/api/info/service.md
@@ -1,22 +1,12 @@
----
-tags: [AvalancheGo APIs]
-description: This page is an overview of the Info API associated with AvalancheGo.
-sidebar_label: Info API
-pagination_label: Info API
----
-
-# Info API
-
-This API can be used to access basic information about the node.
+The Info API can be used to access basic information about an Avalanche node.
## Format
-This API uses the `json 2.0` RPC format. For more information on making JSON RPC calls, see
-[here](/reference/standards/guides/issuing-api-calls.md).
+This API uses the `json 2.0` RPC format. For more information on making JSON RPC calls, see [here](/api-reference/standards/guides/issuing-api-calls).
## Endpoint
-```text
+```
/ext/info
```
@@ -26,21 +16,21 @@ This API uses the `json 2.0` RPC format. For more information on making JSON RPC
Returns peer preferences for Avalanche Community Proposals (ACPs)
-**Signature:**
+**Signature**:
-```go
+```
info.acps() -> {
- acps: map[uint32]{
- supportWeight: uint64
- supporters: set[string]
- objectWeight: uint64
- objectors: set[string]
- abstainWeight: uint64
- }
+ acps: map[uint32]{
+ supportWeight: uint64
+ supporters: set[string]
+ objectWeight: uint64
+ objectors: set[string]
+ abstainWeight: uint64
+ }
}
```
-**Example Call:**
+**Example Call**:
```sh
curl -sX POST --data '{
@@ -51,7 +41,7 @@ curl -sX POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -117,15 +107,15 @@ curl -sX POST --data '{
Check whether a given chain is done bootstrapping
-**Signature:**
+**Signature**:
-```sh
+```
info.isBootstrapped({chain: string}) -> {isBootstrapped: bool}
```
`chain` is the ID or alias of a chain.
-**Example Call:**
+**Example Call**:
```sh
curl -X POST --data '{
@@ -138,7 +128,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -152,15 +142,15 @@ curl -X POST --data '{
### `info.getBlockchainID`
-Given a blockchain’s alias, get its ID. (See [`admin.aliasChain`](/reference/avalanchego/admin-api.md#adminaliaschain).)
+Given a blockchain's alias, get its ID. (See [`admin.aliasChain`](/api-reference/admin-api#adminaliaschain).)
-**Signature:**
+**Signature**:
-```sh
+```
info.getBlockchainID({alias:string}) -> {blockchainID:string}
```
-**Example Call:**
+**Example Call**:
```sh
curl -X POST --data '{
@@ -173,7 +163,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -189,13 +179,13 @@ curl -X POST --data '{
Get the ID of the network this node is participating in.
-**Signature:**
+**Signature**:
-```sh
-info.getNetworkID() -> {networkID:int}
+```
+info.getNetworkID() -> { networkID: int }
```
-**Example Call:**
+**Example Call**:
```sh
curl -X POST --data '{
@@ -205,7 +195,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -217,20 +207,19 @@ curl -X POST --data '{
}
```
-Network ID of 1 = Mainnet
-Network ID of 5 = Fuji (testnet)
+Network ID of 1 = Mainnet Network ID of 5 = Fuji (testnet)
### `info.getNetworkName`
Get the name of the network this node is participating in.
-**Signature:**
+**Signature**:
-```sh
-info.getNetworkName() -> {networkName:string}
+```
+info.getNetworkName() -> { networkName:string }
```
-**Example Call:**
+**Example Call**:
```sh
curl -X POST --data '{
@@ -240,7 +229,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -256,13 +245,13 @@ curl -X POST --data '{
Get the ID, the BLS key, and the proof of possession(BLS signature) of this node.
-:::info
-This endpoint set is for a specific node, it is unavailable on the [public server](/tooling/rpc-providers.md).
-:::
+
+This endpoint set is for a specific node, it is unavailable on the [public server](/tooling/rpc-providers).
+
-**Signature:**
+**Signature**:
-```sh
+```
info.getNodeID() -> {
nodeID: string,
nodePOP: {
@@ -272,14 +261,12 @@ info.getNodeID() -> {
}
```
-- `nodeID` Node ID is the unique identifier of the node that you set to act as a validator on the
- Primary Network.
-- `nodePOP` is this node's BLS key and proof of possession. Nodes must register a BLS key to act as
- a validator on the Primary Network. Your node's POP is logged on startup and is accessible over this endpoint.
- - `publicKey` is the 48 byte hex representation of the BLS key.
- - `proofOfPossession` is the 96 byte hex representation of the BLS signature.
+- `nodeID` Node ID is the unique identifier of the node that you set to act as a validator on the Primary Network.
+- `nodePOP` is this node's BLS key and proof of possession. Nodes must register a BLS key to act as a validator on the Primary Network. Your node's POP is logged on startup and is accessible over this endpoint.
+ - `publicKey` is the 48 byte hex representation of the BLS key.
+ - `proofOfPossession` is the 96 byte hex representation of the BLS signature.
-**Example Call:**
+**Example Call**:
```sh
curl -X POST --data '{
@@ -289,7 +276,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -309,17 +296,17 @@ curl -X POST --data '{
Get the IP of this node.
-:::info
-This endpoint set is for a specific node, it is unavailable on the [public server](/tooling/rpc-providers.md).
-:::
+
+This endpoint set is for a specific node, it is unavailable on the [public server](/tooling/rpc-providers).
+
-**Signature:**
+**Signature**:
-```text
+```
info.getNodeIP() -> {ip: string}
```
-**Example Call:**
+**Example Call**:
```sh
curl -X POST --data '{
@@ -329,7 +316,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -345,15 +332,15 @@ curl -X POST --data '{
Get the version of this node.
-**Signature:**
+**Signature**:
-```sh
+```
info.getNodeVersion() -> {
- version: string,
- databaseVersion: string,
- gitCommit: string,
- vmVersions: map[string]string,
- rpcProtocolVersion: string,
+ version: string,
+ databaseVersion: string,
+ gitCommit: string,
+ vmVersions: map[string]string,
+ rpcProtocolVersion: string,
}
```
@@ -362,11 +349,10 @@ where:
- `version` is this node's version
- `databaseVersion` is the version of the database this node is using
- `gitCommit` is the Git commit that this node was built from
-- `vmVersions` is map where each key/value pair is the name of a VM, and the version of that VM this
- node runs
+- `vmVersions` is map where each key/value pair is the name of a VM, and the version of that VM this node runs
- `rpcProtocolVersion` is the RPCChainVM protocol version
-**Example Call:**
+**Example Call**:
```sh
curl -X POST --data '{
@@ -376,7 +362,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -400,36 +386,36 @@ curl -X POST --data '{
Get the fees of the network.
-**Signature:**
+**Signature**:
-```sh
+```
info.getTxFee() ->
{
- txFee: uint64,
- createAssetTxFee: uint64,
- createSubnetTxFee: uint64,
- transformSubnetTxFee: uint64,
- createBlockchainTxFee: uint64,
- addPrimaryNetworkValidatorFee: uint64,
- addPrimaryNetworkDelegatorFee: uint64,
- addSubnetValidatorFee: uint64,
- addSubnetDelegatorFee: uint64
+ txFee: uint64,
+ createAssetTxFee: uint64,
+ createSubnetTxFee: uint64,
+ transformSubnetTxFee: uint64,
+ createBlockchainTxFee: uint64,
+ addPrimaryNetworkValidatorFee: uint64,
+ addPrimaryNetworkDelegatorFee: uint64,
+ addSubnetValidatorFee: uint64,
+ addSubnetDelegatorFee: uint64
}
```
- `txFee` is the default fee for making transactions.
- `createAssetTxFee` is the fee for creating a new asset.
-- `createSubnetTxFee` is the fee for creating a new Subnet.
-- `transformSubnetTxFee` is the fee for converting a PoA Subnet into a PoS Subnet.
+- `createSubnetTxFee` is the fee for creating a new Avalanche L1.
+- `transformSubnetTxFee` is the fee for converting a PoA Avalanche L1 into a PoS Avalanche L1.
- `createBlockchainTxFee` is the fee for creating a new blockchain.
- `addPrimaryNetworkValidatorFee` is the fee for adding a new primary network validator.
- `addPrimaryNetworkDelegatorFee` is the fee for adding a new primary network delegator.
-- `addSubnetValidatorFee` is the fee for adding a new Subnet validator.
-- `addSubnetDelegatorFee` is the fee for adding a new Subnet delegator.
+- `addSubnetValidatorFee` is the fee for adding a new Avalanche L1 validator.
+- `addSubnetDelegatorFee` is the fee for adding a new Avalanche L1 delegator.
All fees are denominated in nAVAX.
-**Example Call:**
+**Example Call**:
```sh
curl -X POST --data '{
@@ -439,7 +425,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -463,21 +449,21 @@ curl -X POST --data '{
Get the virtual machines installed on this node.
-:::info
-This endpoint set is for a specific node, it is unavailable on the [public server](/tooling/rpc-providers.md).
-:::
+
+This endpoint set is for a specific node, it is unavailable on the [public server](/tooling/rpc-providers).
+
-**Signature:**
+**Signature**:
-```sh
+```
info.getVMs() -> {
- vms: map[string][]string
+ vms: map[string][]string
}
```
-**Example Call:**
+**Example Call**:
-```bash
+```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
@@ -486,7 +472,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -509,30 +495,29 @@ curl -X POST --data '{
Get a description of peer connections.
-**Signature:**
+**Signature**:
-```sh
+```
info.peers({
- nodeIDs: string[] // optional
+ nodeIDs: string[] // optional
}) ->
{
- numPeers: int,
- peers:[]{
- ip: string,
- publicIP: string,
- nodeID: string,
- version: string,
- lastSent: string,
- lastReceived: string,
- benched: string[],
- observedUptime: int,
- }
+ numPeers: int,
+ peers:[]{
+ ip: string,
+ publicIP: string,
+ nodeID: string,
+ version: string,
+ lastSent: string,
+ lastReceived: string,
+ benched: string[],
+ observedUptime: int,
+ observedSubnetUptime: map[string]int,
+ }
}
```
-- `nodeIDs` is an optional parameter to specify what NodeID's descriptions should be returned. If
- this parameter is left empty, descriptions for all active connections will be returned. If the
- node is not connected to a specified NodeID, it will be omitted from the response.
+- `nodeIDs` is an optional parameter to specify what NodeID's descriptions should be returned. If this parameter is left empty, descriptions for all active connections will be returned. If the node is not connected to a specified NodeID, it will be omitted from the response.
- `ip` is the remote IP of the peer.
- `publicIP` is the public IP of the peer.
- `nodeID` is the prefixed Node ID of the peer.
@@ -542,7 +527,7 @@ info.peers({
- `benched` shows chain IDs that the peer is currently benched on.
- `observedUptime` is this node's primary network uptime, observed by the peer.
-**Example Call:**
+**Example Call**:
```sh
curl -X POST --data '{
@@ -555,7 +540,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -573,6 +558,7 @@ curl -X POST --data '{
"lastReceived": "2020-06-01T15:22:57Z",
"benched": [],
"observedUptime": "99",
+ "observedSubnetUptimes": {},
"trackedSubnets": [],
"benched": []
},
@@ -609,25 +595,22 @@ curl -X POST --data '{
### `info.uptime`
-Returns the network's observed uptime of this node.
-This is the only reliable source of data for your node's uptime.
-Other sources may be using data gathered with incomplete (limited) information.
+Returns the network's observed uptime of this node. This is the only reliable source of data for your node's uptime. Other sources may be using data gathered with incomplete (limited) information.
-**Signature:**
+**Signature**:
-```sh
+```
info.uptime() ->
{
- rewardingStakePercentage: float64,
- weightedAveragePercentage: float64
+ rewardingStakePercentage: float64,
+ weightedAveragePercentage: float64
}
```
-- `rewardingStakePercentage` is the percent of stake which thinks this node is above the uptime
- requirement.
+- `rewardingStakePercentage` is the percent of stake which thinks this node is above the uptime requirement.
- `weightedAveragePercentage` is the stake-weighted average of all observed uptimes for this node.
-
-**Example Call:**
+
+**Example Call**:
```sh
curl -X POST --data '{
@@ -637,7 +620,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -650,7 +633,7 @@ curl -X POST --data '{
}
```
-#### **Example Subnet Call**
+#### Example Avalanche L1 Call
```sh
curl -X POST --data '{
@@ -663,7 +646,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
```
-#### **Example Subnet Response**
+#### Example Avalanche L1 Response
```json
{
@@ -675,3 +658,42 @@ curl -X POST --data '{
}
}
```
+
+### `info.upgrades`
+
+Returns the upgrade history and configuration of the network.
+
+**Example Call**:
+
+```sh
+curl -X POST --data '{
+ "jsonrpc":"2.0",
+ "id" :1,
+ "method" :"info.upgrades"
+}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
+```
+
+**Example Response**:
+
+```json
+{
+ "jsonrpc": "2.0",
+ "result": {
+ "apricotPhase1Time": "2020-12-05T05:00:00Z",
+ "apricotPhase2Time": "2020-12-05T05:00:00Z",
+ "apricotPhase3Time": "2020-12-05T05:00:00Z",
+ "apricotPhase4Time": "2020-12-05T05:00:00Z",
+ "apricotPhase4MinPChainHeight": 0,
+ "apricotPhase5Time": "2020-12-05T05:00:00Z",
+ "apricotPhasePre6Time": "2020-12-05T05:00:00Z",
+ "apricotPhase6Time": "2020-12-05T05:00:00Z",
+ "apricotPhasePost6Time": "2020-12-05T05:00:00Z",
+ "banffTime": "2020-12-05T05:00:00Z",
+ "cortinaTime": "2020-12-05T05:00:00Z",
+ "cortinaXChainStopVertexID": "11111111111111111111111111111111LpoYY",
+ "durangoTime": "2020-12-05T05:00:00Z",
+ "etnaTime": "2024-10-09T20:00:00Z"
+ },
+ "id": 1
+}
+```
diff --git a/api/keystore/service.md b/api/keystore/service.md
index 76cc2ce69a56..62c593e26d47 100644
--- a/api/keystore/service.md
+++ b/api/keystore/service.md
@@ -1,84 +1,52 @@
----
-tags: [AvalancheGo APIs]
-description: This page is an overview of the Keystore API associated with AvalancheGo.
-sidebar_label: Keystore API
-pagination_label: Keystore API
----
+
+Because the node operator has access to your plain-text password, you should only create a keystore user on a node that you operate. If that node is breached, you could lose all your tokens. Keystore APIs are not recommended for use on Mainnet.
+
-# Keystore API
+Every node has a built-in keystore. Clients create users on the keystore, which act as identities to be used when interacting with blockchains. A keystore exists at the node level, so if you create a user on a node it exists _only_ on that node. However, users may be imported and exported using this API.
-:::warning
-Because the node operator has access to your plain-text password, you should only create a
-keystore user on a node that you operate. If that node is breached, you could lose all your tokens.
-Keystore APIs are not recommended for use on Mainnet.
-:::
+For validation and cross-chain transfer on the Mainnet, you should issue transactions through [AvalancheJS](/tooling/avalanche-js). That way control keys for your funds won't be stored on the node, which significantly lowers the risk should a computer running a node be compromised. See following docs for details:
-Every node has a built-in keystore. Clients create users on the keystore, which act as identities to
-be used when interacting with blockchains. A keystore exists at the node level, so if you create a
-user on a node it exists _only_ on that node. However, users may be imported and exported using this
-API.
-
-For validation and cross-chain transfer on the Mainnet, you should issue transactions through
-[AvalancheJS](/tooling/avalanchejs-overview). That way control keys for your funds won't be stored on
-the node, which significantly lowers the risk should a computer running a node be compromised. See
-following docs for details:
-
-- Transfer AVAX Tokens Between Chains:
-
- - C-Chain: [export](https://github.com/ava-labs/avalanchejs/blob/master/examples/c-chain/export.ts) and
- [import](https://github.com/ava-labs/avalanchejs/blob/master/examples/c-chain/import.ts)
- - P-Chain: [export](https://github.com/ava-labs/avalanchejs/blob/master/examples/p-chain/export.ts) and
- [import](https://github.com/ava-labs/avalanchejs/blob/master/examples/p-chain/import.ts)
- - X-Chain: [export](https://github.com/ava-labs/avalanchejs/blob/master/examples/x-chain/export.ts) and
- [import](https://github.com/ava-labs/avalanchejs/blob/master/examples/x-chain/import.ts)
-
-- [Add a Node to the Validator Set](/nodes/validate/add-a-validator)
-
-:::info
-
-This API set is for a specific node, it is unavailable on the [public server](/tooling/rpc-providers.md).
-
-:::
+1. Transfer AVAX Tokens Between Chains:
+ - C-Chain: [export](https://github.com/ava-labs/avalanchejs/blob/master/examples/c-chain/export.ts) and [import](https://github.com/ava-labs/avalanchejs/blob/master/examples/c-chain/import.ts)
+ - P-Chain: [export](https://github.com/ava-labs/avalanchejs/blob/master/examples/p-chain/export.ts) and [import](https://github.com/ava-labs/avalanchejs/blob/master/examples/p-chain/import.ts)
+ - X-Chain: [export](https://github.com/ava-labs/avalanchejs/blob/master/examples/x-chain/export.ts) and [import](https://github.com/ava-labs/avalanchejs/blob/master/examples/x-chain/import.ts)
+2. [Add a Node to the Validator Set](/nodes/validate/node-validator)
+
+
+This API set is for a specific node, it is unavailable on the [public server](/tooling/rpc-providers).
+
## Format
-This API uses the `json 2.0` API format. For more information on making JSON RPC calls, see
-[here](/reference/standards/guides/issuing-api-calls.md).
+This API uses the `json 2.0` API format. For more information on making JSON RPC calls, see [here](/api-reference/standards/guides/issuing-api-calls).
## Endpoint
-```text
+```
/ext/keystore
```
## Methods
-### keystore.createUser
-
-:::caution
-
-Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
-
-:::
+### `keystore.createUser`
Create a new user with the specified username and password.
-**Signature:**
+**Signature**:
-```sh
+```
keystore.createUser(
- {
- username:string,
- password:string
- }
+{
+ username:string,
+ password:string
+}
) -> {}
```
- `username` and `password` can be at most 1024 characters.
-- Your request will be rejected if `password` is too weak. `password` should be at least 8
- characters and contain upper and lower case letters as well as numbers and symbols.
+- Your request will be rejected if `password` is too weak. `password` should be at least 8 characters and contain upper and lower case letters as well as numbers and symbols.
-**Example Call:**
+**Example Call**:
```sh
curl -X POST --data '{
@@ -92,7 +60,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/keystore
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -102,23 +70,21 @@ curl -X POST --data '{
}
```
-### keystore.deleteUser
-
-:::caution
-
-Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
+### `keystore.deleteUser`
-:::
+
+Deprecated as of [v1.9.12](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
+
Delete a user.
-**Signature:**
+**Signature**:
-```sh
-keystore.deleteUser({username: string, password:string}) -> {}
+```
+keystore.deleteUser({ username: string, password:string }) -> {}
```
-**Example Call:**
+**Example Call**:
```sh
curl -X POST --data '{
@@ -132,7 +98,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/keystore
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -142,37 +108,32 @@ curl -X POST --data '{
}
```
-### keystore.exportUser
+### `keystore.exportUser`
-:::caution
+
+Deprecated as of [v1.9.12](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
+
-Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
+Export a user. The user can be imported to another node with [`keystore.importUser`](/api-reference/keystore-api#keystoreimportuser). The user's password remains encrypted.
-:::
+**Signature**:
-Export a user. The user can be imported to another node with
-[`keystore.importUser`](/reference/avalanchego/keystore-api.md#keystoreimportuser). The user’s password
-remains encrypted.
-
-**Signature:**
-
-```sh
+```
keystore.exportUser(
- {
- username:string,
- password:string,
- encoding:string //optional
- }
+{
+ username:string,
+ password:string,
+ encoding:string //optional
+}
) -> {
user:string,
encoding:string
}
```
-`encoding` specifies the format of the string encoding user data. Can only be `hex` when a value is
-provided.
+`encoding` specifies the format of the string encoding user data. Can only be `hex` when a value is provided.
-**Example Call:**
+**Example Call**:
```sh
curl -X POST --data '{
@@ -186,7 +147,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/keystore
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -199,34 +160,30 @@ curl -X POST --data '{
}
```
-### keystore.importUser
-
-:::caution
+### `keystore.importUser`
-Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
+
+Deprecated as of [v1.9.12](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
+
-:::
+Import a user. `password` must match the user's password. `username` doesn't have to match the username `user` had when it was exported.
-Import a user. `password` must match the user’s password. `username` doesn’t have to match the
-username `user` had when it was exported.
+**Signature**:
-**Signature:**
-
-```sh
+```
keystore.importUser(
- {
- username:string,
- password:string,
- user:string,
- encoding:string //optional
- }
+{
+ username:string,
+ password:string,
+ user:string,
+ encoding:string //optional
+}
) -> {}
```
-`encoding` specifies the format of the string encoding user data. Can only be `hex` when a value is
-provided.
+`encoding` specifies the format of the string encoding user data. Can only be `hex` when a value is provided.
-**Example Call:**
+**Example Call**:
```sh
curl -X POST --data '{
@@ -241,7 +198,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/keystore
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -251,23 +208,21 @@ curl -X POST --data '{
}
```
-### keystore.listUsers
+### `keystore.listUsers`
-:::caution
-
-Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
-
-:::
+
+Deprecated as of [v1.9.12](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
+
List the users in this keystore.
-**Signature:**
+**Signature**:
-```sh
-keystore.ListUsers() -> {users:[]string}
+```
+keystore.ListUsers() -> { users: []string }
```
-**Example Call:**
+**Example Call**:
```sh
curl -X POST --data '{
@@ -277,7 +232,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/keystore
```
-**Example Response:**
+**Example Response**:
```json
{
diff --git a/api/metrics/service.md b/api/metrics/service.md
index 08b211d33dde..03a4ab8bc65b 100644
--- a/api/metrics/service.md
+++ b/api/metrics/service.md
@@ -1,23 +1,12 @@
----
-tags: [AvalancheGo APIs]
-description: This page is an overview of the Metrics API associated with AvalancheGo.
-sidebar_label: Metrics API
-pagination_label: Metrics API
----
+The Metrics API allows clients to get statistics about a node's health and performance.
-# Metrics API
-
-The API allows clients to get statistics about a node’s health and performance.
-
-:::info
-
-This API set is for a specific node, it is unavailable on the [public server](/tooling/rpc-providers.md).
-
-:::
+
+This API set is for a specific node, it is unavailable on the [public server](/tooling/rpc-providers).
+
## Endpoint
-```text
+```
/ext/metrics
```
@@ -31,10 +20,6 @@ curl -X POST 127.0.0.1:9650/ext/metrics
## Format
-This API produces Prometheus compatible metrics. See
-[here](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md)
-for information on Prometheus’ formatting.
+This API produces Prometheus compatible metrics. See [here](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md) for information on Prometheus' formatting.
-[Here](/nodes/maintain/setting-up-node-monitoring) is a tutorial that
-shows how to set up Prometheus and Grafana to monitor AvalancheGo node using the
-Metrics API.
+[Here](/nodes/maintain/monitoring) is a tutorial that shows how to set up Prometheus and Grafana to monitor AvalancheGo node using the Metrics API.
diff --git a/indexer/service.md b/indexer/service.md
index 416cc4e2055b..afd31b6597aa 100644
--- a/indexer/service.md
+++ b/indexer/service.md
@@ -1,87 +1,54 @@
----
-tags: [AvalancheGo APIs]
-description: This page is an overview of the Index API associated with AvalancheGo.
-sidebar_label: Index API
-pagination_label: Index API
----
-
-# Index API
-
-AvalancheGo can be configured to run with an indexer. That is, it saves (indexes) every container (a
-block, vertex or transaction) it accepts on the X-Chain, P-Chain and C-Chain. To run AvalancheGo
-with indexing enabled, set command line flag
-[--index-enabled](/nodes/configure/avalanchego-config-flags.md#apis) to true. **AvalancheGo
-will only index containers that are accepted when running with `--index-enabled` set to true.** To
-ensure your node has a complete index, run a node with a fresh database and `--index-enabled` set to
-true. The node will accept every block, vertex and transaction in the network history during
-bootstrapping, ensuring your index is complete. It is OK to turn off your node if it is running with
-indexing enabled. If it restarts with indexing still enabled, it will accept all containers that
-were accepted while it was offline. The indexer should never fail to index an accepted block, vertex
-or transaction.
-
-Indexed containers (that is, accepted blocks, vertices and transactions) are timestamped with the
-time at which the node accepted that container. Note that if the container was indexed during
-bootstrapping, other nodes may have accepted the container much earlier. Every container indexed
-during bootstrapping will be timestamped with the time at which the node bootstrapped, not when it
-was first accepted by the network.
-
-If `--index-enabled` is changed to `false` from `true`, AvalancheGo won't start as doing so would
-cause a previously complete index to become incomplete, unless the user explicitly says to do so
-with `--index-allow-incomplete`. This protects you from accidentally running with indexing disabled,
-after previously running with it enabled, which would result in an incomplete index.
-
-This document shows how to query data from AvalancheGo's Index API. The Index API is only available
-when running with `--index-enabled`.
+AvalancheGo can be configured to run with an indexer. That is, it saves (indexes) every container (a block, vertex or transaction) it accepts on the X-Chain, P-Chain and C-Chain. To run AvalancheGo with indexing enabled, set command line flag [\--index-enabled](/nodes/configure/configs-flags#apis) to true.
+
+**AvalancheGo will only index containers that are accepted when running with `--index-enabled` set to true.** To ensure your node has a complete index, run a node with a fresh database and `--index-enabled` set to true. The node will accept every block, vertex and transaction in the network history during bootstrapping, ensuring your index is complete.
+
+It is OK to turn off your node if it is running with indexing enabled. If it restarts with indexing still enabled, it will accept all containers that were accepted while it was offline. The indexer should never fail to index an accepted block, vertex or transaction.
+
+Indexed containers (that is, accepted blocks, vertices and transactions) are timestamped with the time at which the node accepted that container. Note that if the container was indexed during bootstrapping, other nodes may have accepted the container much earlier. Every container indexed during bootstrapping will be timestamped with the time at which the node bootstrapped, not when it was first accepted by the network.
+
+If `--index-enabled` is changed to `false` from `true`, AvalancheGo won't start as doing so would cause a previously complete index to become incomplete, unless the user explicitly says to do so with `--index-allow-incomplete`. This protects you from accidentally running with indexing disabled, after previously running with it enabled, which would result in an incomplete index.
+
+This document shows how to query data from AvalancheGo's Index API. The Index API is only available when running with `--index-enabled`.
## Go Client
-There is a Go implementation of an Index API client. See documentation
-[here](https://pkg.go.dev/github.com/ava-labs/avalanchego/indexer#Client). This client can be used
-inside a Go program to connect to an AvalancheGo node that is running with the Index API enabled and
-make calls to the Index API.
+There is a Go implementation of an Index API client. See documentation [here](https://pkg.go.dev/github.com/ava-labs/avalanchego/indexer#Client). This client can be used inside a Go program to connect to an AvalancheGo node that is running with the Index API enabled and make calls to the Index API.
## Format
-This API uses the `json 2.0` RPC format. For more information on making JSON RPC calls, see
-[here](/reference/standards/guides/issuing-api-calls.md).
+This API uses the `json 2.0` RPC format. For more information on making JSON RPC calls, see [here](/api-reference/standards/guides/issuing-api-calls).
## Endpoints
-Each chain has one or more index. To see if a C-Chain block is accepted, for example, send an API
-call to the C-Chain block index. To see if an X-Chain vertex is accepted, for example, send an API
-call to the X-Chain vertex index.
+Each chain has one or more index. To see if a C-Chain block is accepted, for example, send an API call to the C-Chain block index. To see if an X-Chain vertex is accepted, for example, send an API call to the X-Chain vertex index.
### C-Chain Blocks
-```text
+```
/ext/index/C/block
```
### P-Chain Blocks
-```text
+```
/ext/index/P/block
```
### X-Chain Transactions
-```text
+```
/ext/index/X/tx
```
### X-Chain Blocks
-```text
+```
/ext/index/X/block
```
-:::caution
-
-To ensure historical data can be accessed, the `/ext/index/X/vtx` is still accessible,
-even though it is no longer populated with chain data since the Cortina activation.
-If you are using `V1.10.0` or higher, you need to migrate to using the `/ext/index/X/block` endpoint.
-
-:::
+
+To ensure historical data can be accessed, the `/ext/index/X/vtx` is still accessible, even though it is no longer populated with chain data since the Cortina activation. If you are using `V1.10.0` or higher, you need to migrate to using the `/ext/index/X/block` endpoint.
+
## Methods
@@ -89,9 +56,9 @@ If you are using `V1.10.0` or higher, you need to migrate to using the `/ext/ind
Get container by ID.
-**Signature:**
+**Signature**:
-```sh
+```
index.getContainerByID({
id: string,
encoding: string
@@ -104,12 +71,12 @@ index.getContainerByID({
}
```
-**Request:**
+**Request**:
- `id` is the container's ID
- `encoding` is `"hex"` only.
-**Response:**
+**Response**:
- `id` is the container's ID
- `bytes` is the byte representation of the container
@@ -117,7 +84,7 @@ index.getContainerByID({
- `encoding` is `"hex"` only.
- `index` is how many containers were accepted in this index before this one
-**Example Call:**
+**Example Call**:
```sh
curl --location --request POST 'localhost:9650/ext/index/X/tx' \
@@ -133,7 +100,7 @@ curl --location --request POST 'localhost:9650/ext/index/X/tx' \
}'
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -153,9 +120,9 @@ curl --location --request POST 'localhost:9650/ext/index/X/tx' \
Get container by index. The first container accepted is at index 0, the second is at index 1, etc.
-**Signature:**
+**Signature**:
-```sh
+```
index.getContainerByIndex({
index: uint64,
encoding: string
@@ -168,12 +135,12 @@ index.getContainerByIndex({
}
```
-**Request:**
+**Request**:
- `index` is how many containers were accepted in this index before this one
- `encoding` is `"hex"` only.
-**Response:**
+**Response**:
- `id` is the container's ID
- `bytes` is the byte representation of the container
@@ -181,7 +148,7 @@ index.getContainerByIndex({
- `index` is how many containers were accepted in this index before this one
- `encoding` is `"hex"` only.
-**Example Call:**
+**Example Call**:
```sh
curl --location --request POST 'localhost:9650/ext/index/X/tx' \
@@ -197,7 +164,7 @@ curl --location --request POST 'localhost:9650/ext/index/X/tx' \
}'
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -215,17 +182,17 @@ curl --location --request POST 'localhost:9650/ext/index/X/tx' \
### `index.getContainerRange`
-Returns the transactions at index [`startIndex`], [`startIndex+1`], ... , [`startIndex+n-1`]
+Returns the transactions at index \[`startIndex`\], \[`startIndex+1`\], ... , \[`startIndex+n-1`\]
-- If [`n`] == 0, returns an empty response (for example: null).
-- If [`startIndex`] > the last accepted index, returns an error (unless the above apply.)
-- If [`n`] > [`MaxFetchedByRange`], returns an error.
+- If \[`n`\] == 0, returns an empty response (for example: null).
+- If \[`startIndex`\] > the last accepted index, returns an error (unless the above apply.)
+- If \[`n`\] > \[`MaxFetchedByRange`\], returns an error.
- If we run out of transactions, returns the ones fetched before running out.
- `numToFetch` must be in `[0,1024]`.
-**Signature:**
+**Signature**:
-```sh
+```
index.getContainerRange({
startIndex: uint64,
numToFetch: uint64,
@@ -239,13 +206,13 @@ index.getContainerRange({
}
```
-**Request:**
+**Request**:
- `startIndex` is the beginning index
- `numToFetch` is the number of containers to fetch
- `encoding` is `"hex"` only.
-**Response:**
+**Response**:
- `id` is the container's ID
- `bytes` is the byte representation of the container
@@ -253,7 +220,7 @@ index.getContainerRange({
- `encoding` is `"hex"` only.
- `index` is how many containers were accepted in this index before this one
-**Example Call:**
+**Example Call**:
```sh
curl --location --request POST 'localhost:9650/ext/index/X/tx' \
@@ -270,7 +237,7 @@ curl --location --request POST 'localhost:9650/ext/index/X/tx' \
}'
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -292,9 +259,9 @@ curl --location --request POST 'localhost:9650/ext/index/X/tx' \
Get a container's index.
-**Signature:**
+**Signature**:
-```sh
+```
index.getIndex({
id: string,
encoding: string
@@ -303,16 +270,16 @@ index.getIndex({
}
```
-**Request:**
+**Request**:
- `id` is the ID of the container to fetch
- `encoding` is `"hex"` only.
-**Response:**
+**Response**:
- `index` is how many containers were accepted in this index before this one
-**Example Call:**
+**Example Call**:
```sh
curl --location --request POST 'localhost:9650/ext/index/X/tx' \
@@ -328,7 +295,7 @@ curl --location --request POST 'localhost:9650/ext/index/X/tx' \
}'
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -344,9 +311,9 @@ curl --location --request POST 'localhost:9650/ext/index/X/tx' \
Get the most recently accepted container.
-**Signature:**
+**Signature**:
-```sh
+```
index.getLastAccepted({
encoding:string
}) -> {
@@ -358,18 +325,18 @@ index.getLastAccepted({
}
```
-**Request:**
+**Request**:
- `encoding` is `"hex"` only.
-**Response:**
+**Response**:
- `id` is the container's ID
- `bytes` is the byte representation of the container
- `timestamp` is the time at which this node accepted the container
- `encoding` is `"hex"` only.
-**Example Call:**
+**Example Call**:
```sh
curl --location --request POST 'localhost:9650/ext/index/X/tx' \
@@ -384,7 +351,7 @@ curl --location --request POST 'localhost:9650/ext/index/X/tx' \
}'
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -404,9 +371,9 @@ curl --location --request POST 'localhost:9650/ext/index/X/tx' \
Returns true if the container is in this index.
-**Signature:**
+**Signature**:
-```sh
+```
index.isAccepted({
id: string,
encoding: string
@@ -415,16 +382,16 @@ index.isAccepted({
}
```
-**Request:**
+**Request**:
- `id` is the ID of the container to fetch
- `encoding` is `"hex"` only.
-**Response:**
+**Response**:
- `isAccepted` displays if the container has been accepted
-**Example Call:**
+**Example Call**:
```sh
curl --location --request POST 'localhost:9650/ext/index/X/tx' \
@@ -440,7 +407,7 @@ curl --location --request POST 'localhost:9650/ext/index/X/tx' \
}'
```
-**Example Response:**
+**Example Response**:
```json
{
@@ -456,20 +423,11 @@ curl --location --request POST 'localhost:9650/ext/index/X/tx' \
Here is an example of how to iterate through all transactions on the X-Chain.
-:::warning
-To help users to try out this example and other index APIs, we have set up a testing
-indexer node located at [https://indexer-demo.avax.network](https://indexer-demo.avax.network). This
-indexer node is not for production use. We may change or shut it down at any time without notice.
-:::
-
-You can use the Index API to get the ID of every transaction that has been accepted on the X-Chain,
-and use the X-Chain API method `avm.getTx` to get a human-readable representation of the
-transaction.
+You can use the Index API to get the ID of every transaction that has been accepted on the X-Chain, and use the X-Chain API method `avm.getTx` to get a human-readable representation of the transaction.
-To get an X-Chain transaction by its index (the order it was accepted in), use Index API method
-[index.getlastaccepted](#indexgetlastaccepted).
+To get an X-Chain transaction by its index (the order it was accepted in), use Index API method [index.getlastaccepted](#indexgetlastaccepted).
-For example, to get the _second_ transaction (note that `"index":1`) accepted on the X-Chain, do:
+For example, to get the second transaction (note that `"index":1`) accepted on the X-Chain, do:
```sh
curl --location --request POST 'https://indexer-demo.avax.network/ext/index/X/tx' \
@@ -485,8 +443,7 @@ curl --location --request POST 'https://indexer-demo.avax.network/ext/index/X/tx
}'
```
-This returns the ID of the second transaction accepted in the X-Chain's history. To get the third
-transaction on the X-Chain, use `"index":2`, and so on.
+This returns the ID of the second transaction accepted in the X-Chain's history. To get the third transaction on the X-Chain, use `"index":2`, and so on.
The above API call gives the response below:
@@ -520,7 +477,7 @@ curl -X POST --data '{
}' -H 'content-type:application/json;' https://api.avax.network/ext/bc/X
```
-Response:
+**Response**:
```json
{
diff --git a/vms/platformvm/service.md b/vms/platformvm/service.md
index 1d803744bda6..4bb04e11099c 100644
--- a/vms/platformvm/service.md
+++ b/vms/platformvm/service.md
@@ -1,20 +1,8 @@
----
-tags: [P-Chain, Platform Chain, AvalancheGo APIs]
-description: This page is an overview of the P-Chain API associated with AvalancheGo.
-sidebar_label: API
-pagination_label: P-Chain Transaction Format
----
-
-# Platform Chain API
-
-This API allows clients to interact with the
-[P-Chain](/learn/avalanche/avalanche-platform.md#p-chain), which
-maintains Avalanche’s [validator](/nodes/validate/how-to-stake#validators) set and handles
-blockchain creation.
+The P-Chain API allows clients to interact with the [P-Chain](/learn/avalanche/avalanche-platform.md#p-chain), which maintains Avalanche’s validator set and handles blockchain creation.
## Endpoint
-```sh
+```
/ext/bc/P
```
@@ -26,23 +14,23 @@ This API uses the `json 2.0` RPC format.
### `platform.exportKey`
-:::caution
+
Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
-:::
+
-:::warning
+
-Not recommended for use on Mainnet. See warning notice in [Keystore API](/reference/avalanchego/keystore-api.md).
+Not recommended for use on Mainnet. See warning notice in [Keystore API](/api-reference/keystore-api).
-:::
+
Get the private key that controls a given address.
**Signature:**
-```sh
+```
platform.exportKey({
username: string,
password: string,
@@ -83,17 +71,17 @@ curl -X POST --data '{
### `platform.getBalance`
-:::caution
+
Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
-:::
+
Get the balance of AVAX controlled by a given address.
**Signature:**
-```sh
+```
platform.getBalance({
addresses: []string
}) -> {
@@ -169,7 +157,7 @@ Get a block by its ID.
**Signature:**
-```sh
+```
platform.getBlock({
blockID: string
encoding: string // optional
@@ -302,7 +290,7 @@ Get a block by its height.
**Signature:**
-```sh
+```
platform.getBlockByHeight({
height: int
encoding: string // optional
@@ -431,25 +419,25 @@ curl -X POST --data '{
### `platform.getBlockchains`
-:::caution
+
Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
-:::
+
Get all the blockchains that exist (excluding the P-Chain).
**Signature:**
-```sh
+```
platform.getBlockchains() ->
{
- blockchains: []{
- id: string,
- name:string,
- subnetID: string,
- vmID: string
- }
+ blockchains: []{
+ id: string,
+ name: string,
+ subnetID: string,
+ vmID: string
+ }
}
```
@@ -531,11 +519,11 @@ Get the status of a blockchain.
**Signature:**
-```sh
+```
platform.getBlockchainStatus(
- {
- blockchainID: string
- }
+ {
+ blockchainID: string
+ }
) -> {status: string}
```
@@ -581,10 +569,10 @@ an upper bound because it does not account for burnt tokens, including transacti
**Signature:**
-```sh
-platform.getCurrentSupply({
- subnetID: string // optional
-}) -> {supply: int}
+```
+platform.getCurrentSupply ({
+ subnetID: string // optional
+}) -> { supply: int }
```
- `supply` is an upper bound on the number of tokens that exist.
@@ -622,10 +610,10 @@ List the current validators of the given Subnet.
**Signature:**
-```sh
+```
platform.getCurrentValidators({
- subnetID: string, // optional
- nodeIDs: string[], // optional
+ subnetID: string, // optional
+ nodeIDs: string[], // optional
}) -> {
validators: []{
txID: string,
@@ -780,13 +768,108 @@ curl -X POST --data '{
}
```
+### `platform.getFeeConfig`
+
+Returns the dynamic fees configuration of the P-chain.
+
+**Signature:**
+
+```
+platform.getFeeConfig() -> {
+ weights: []uint64,
+ maxCapacity: uint64,
+ maxPerSecond: uint64,
+ targetPerSecond: uint64,
+ minPrice: uint64,
+ excessConversionConstant: uint64
+}
+```
+
+- `weights` to merge fee dimensions into a single gas value
+- `maxCapacity` is the amount of gas the chain is allowed to store for future use
+- `maxPerSecond` is the amount of gas the chain is allowed to consume per second
+- `targetPerSecond` is the target amount of gas the chain should consume per second to keep fees stable
+- `minPrice` is the minimum price per unit of gas
+- `excessConversionConstant` is used to convert excess gas to a gas price
+
+**Example Call:**
+
+```sh
+curl -X POST --data '{
+ "jsonrpc": "2.0",
+ "method": "platform.getFeeConfig",
+ "params": {},
+ "id": 1
+}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/P
+```
+
+**Example Response:**
+
+```json
+{
+ "jsonrpc": "2.0",
+ "result": {
+ "weights": [1,1000,1000,4],
+ "maxCapacity": 1000000,
+ "maxPerSecond": 100000,
+ "targetPerSecond": 50000,
+ "minPrice": 1,
+ "excessConversionConstant": 2164043
+ },
+ "id": 1
+}
+```
+
+### `platform.getFeeState`
+
+Returns the current fee state of the P-chain.
+
+**Signature:**
+
+```
+platform.getFeeState() -> {
+ capacity: uint64,
+ excess: uint64,
+ price: uint64,
+ timestamp: string
+}
+```
+
+**Example Call:**
+
+```sh
+curl -X POST --data '{
+ "jsonrpc": "2.0",
+ "method": "platform.getFeeConfig",
+ "params": {},
+ "id": 1
+}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/P
+```
+
+**Example Response:**
+
+```json
+{
+ "jsonrpc": "2.0",
+ "result": {
+ "weights": [1,1000,1000,4],
+ "maxCapacity": 1000000,
+ "maxPerSecond": 100000,
+ "targetPerSecond": 50000,
+ "minPrice": 1,
+ "excessConversionConstant": 2164043
+ },
+ "id": 1
+}
+```
+
### `platform.getL1Validator`
Returns a current L1 validator.
**Signature:**
-```sh
+```
platform.getL1Validator({
validationID: string,
}) -> {
@@ -870,10 +953,10 @@ Returns the height of the last accepted block.
**Signature:**
-```sh
+```
platform.getHeight() ->
{
- height: int,
+ height: int,
}
```
@@ -906,10 +989,10 @@ Returns this node's current proposer VM height
**Signature:**
-```sh
+```
platform.getProposedHeight() ->
{
- height: int,
+ height: int,
}
```
@@ -938,28 +1021,24 @@ curl -X POST --data '{
### `platform.getMaxStakeAmount`
-:::caution
+
Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
-:::
+
Returns the maximum amount of nAVAX staking to the named node during a particular time period.
**Signature:**
-```sh
-platform.getMaxStakeAmount(
- {
- subnetID: string,
- nodeID: string,
- startTime: int,
- endTime: int
- }
-) ->
+```
+platform.getMaxStakeAmount (
{
- amount: uint64
-}
+ subnetID: string,
+ nodeID: string,
+ startTime: int,
+ endTime: int
+}) -> { amount: uint64 }
```
- `subnetID` is a Buffer or cb58 string representing Subnet
@@ -1005,13 +1084,13 @@ tokens that can be delegated.
**Signature:**
-```sh
+```
platform.getMinStake({
- subnetID: string // optional
+ subnetID: string // optional
}) ->
{
- minValidatorStake : uint64,
- minDelegatorStake : uint64
+ minValidatorStake : uint64,
+ minDelegatorStake : uint64
}
```
@@ -1048,10 +1127,10 @@ currently validating the Subnet but will in the future.
**Signature:**
-```sh
+```
platform.getPendingValidators({
- subnetID: string, // optional
- nodeIDs: string[], // optional
+ subnetID: string, // optional
+ nodeIDs: string[], // optional
}) -> {
validators: []{
txID: string,
@@ -1145,18 +1224,18 @@ curl -X POST --data '{
### `platform.getRewardUTXOs`
-:::caution
+
Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
-:::
+
Returns the UTXOs that were rewarded after the provided transaction's staking or delegation period
ended.
**Signature:**
-```sh
+```
platform.getRewardUTXOs({
txID: string,
encoding: string // optional
@@ -1205,18 +1284,18 @@ curl -X POST --data '{
### `platform.getStake`
-:::caution
+
Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
-:::
+
Get the amount of nAVAX staked by a set of addresses. The amount returned does not include staking
rewards.
**Signature:**
-```sh
+```
platform.getStake({
addresses: []string,
validatorsOnly: true or false
@@ -1276,7 +1355,7 @@ Retrieve an assetID for a Subnet’s staking asset.
**Signature:**
-```sh
+```
platform.getStakingAssetID({
subnetID: string // optional
}) -> {
@@ -1312,7 +1391,7 @@ curl -X POST --data '{
}
```
-:::note
+
The AssetID for AVAX differs depending on the network you are on.
@@ -1320,7 +1399,7 @@ Mainnet: FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z
Testnet: U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK
-:::
+
### `platform.getSubnet`
@@ -1328,7 +1407,7 @@ Get owners and info about the Subnet or L1.
**Signature:**
-```sh
+```
platform.getSubnet({
subnetID: string
}) ->
@@ -1386,17 +1465,17 @@ curl -X POST --data '{
### `platform.getSubnets`
-:::caution
+
Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
-:::
+
Get info about the Subnets.
**Signature:**
-```sh
+```
platform.getSubnets({
ids: []string
}) ->
@@ -1457,7 +1536,7 @@ Get the current P-Chain timestamp.
**Signature:**
-```sh
+```
platform.getTimestamp() -> {time: string}
```
@@ -1491,7 +1570,7 @@ Get the total amount of tokens staked on the requested Subnet.
**Signature:**
-```sh
+```
platform.getTotalStake({
subnetID: string
}) -> {
@@ -1566,7 +1645,7 @@ Optional `encoding` parameter to specify the format for the returned transaction
**Signature:**
-```sh
+```
platform.getTx({
txID: string,
encoding: string // optional
@@ -1675,10 +1754,10 @@ Gets a transaction’s status by its ID. If the transaction was dropped, respons
**Signature:**
-```sh
+```
platform.getTxStatus({
- txID: string
-}) -> {status: string}
+ txID: string
+}) -> { status: string }
```
`status` is one of:
@@ -1720,7 +1799,7 @@ Gets the UTXOs that reference a given set of addresses.
**Signature:**
-```sh
+```
platform.getUTXOs(
{
addresses: []string,
@@ -1888,7 +1967,7 @@ Get the validators and their weights of a Subnet or the Primary Network at a giv
**Signature:**
-```sh
+```
platform.getValidatorsAt(
{
height: [int|string],
@@ -1939,11 +2018,11 @@ Issue a transaction to the Platform Chain.
**Signature:**
-```sh
+```
platform.issueTx({
tx: string,
encoding: string, // optional
-}) -> {txID: string}
+}) -> { txID: string }
```
- `tx` is the byte representation of a transaction.
@@ -1979,27 +2058,27 @@ curl -X POST --data '{
### `platform.listAddresses`
-:::caution
+
Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
-:::
+
-:::warning
+
-Not recommended for use on Mainnet. See warning notice in [Keystore API](/reference/avalanchego/keystore-api.md).
+Not recommended for use on Mainnet. See warning notice in [Keystore API](/api-reference/keystore-api).
-:::
+
List addresses controlled by the given user.
**Signature:**
-```sh
+```
platform.listAddresses({
username: string,
password: string
-}) -> {addresses: []string}
+}) -> { addresses: []string }
```
**Example Call:**
@@ -2034,7 +2113,7 @@ Sample validators from the specified Subnet.
**Signature:**
-```sh
+```
platform.sampleValidators(
{
size: int,
@@ -2084,12 +2163,12 @@ Get the Subnet that validates a given blockchain.
**Signature:**
-```sh
+```
platform.validatedBy(
{
blockchainID: string
}
-) -> {subnetID: string}
+) -> { subnetID: string }
```
- `blockchainID` is the blockchain’s ID.
@@ -2126,12 +2205,12 @@ Get the IDs of the blockchains a Subnet validates.
**Signature:**
-```sh
+```
platform.validates(
{
subnetID: string
}
-) -> {blockchainIDs: []string}
+) -> { blockchainIDs: []string }
```
- `subnetID` is the Subnet’s ID.