From e1042d3bc75db5c9a0ab1f33fae0d09bcbce125c Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Fri, 27 Sep 2024 09:05:16 -0500 Subject: [PATCH 1/7] update references from pox3 to pox4 --- content/docs/stacks/api/stacking-pool/members.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/docs/stacks/api/stacking-pool/members.mdx b/content/docs/stacks/api/stacking-pool/members.mdx index 562d2643..059889ea 100644 --- a/content/docs/stacks/api/stacking-pool/members.mdx +++ b/content/docs/stacks/api/stacking-pool/members.mdx @@ -24,7 +24,7 @@ import { - + ## Stacking pool members @@ -80,7 +80,7 @@ number of items to skip | :------ | :------ | | `200` | Success | - + @@ -93,7 +93,7 @@ number of items to skip ```bash -curl -X GET "https://api.hiro.so/extended/v1/pox3/SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP/delegations?unanchored=false&limit=5" +curl -X GET "https://api.hiro.so/extended/v1/pox4/SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP/delegations?unanchored=false&limit=5" ``` @@ -101,7 +101,7 @@ curl -X GET "https://api.hiro.so/extended/v1/pox3/SP21YTSM60CAY6D011EZVEVNKXVW8F ```js -fetch("https://api.hiro.so/extended/v1/pox3/SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP/delegations?after_block=0&unanchored=true&limit=100&offset=300", { +fetch("https://api.hiro.so/extended/v1/pox4/SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP/delegations?after_block=0&unanchored=true&limit=100&offset=300", { method: "GET" }); ``` From 8ff9cf99228e751e0d54aaff206c65310499b262 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Mon, 30 Sep 2024 20:36:38 -0500 Subject: [PATCH 2/7] update copy and responses --- .../info/total-and-unlocked-stx-supply.mdx | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/content/docs/stacks/api/info/total-and-unlocked-stx-supply.mdx b/content/docs/stacks/api/info/total-and-unlocked-stx-supply.mdx index 446120e4..0927e344 100644 --- a/content/docs/stacks/api/info/total-and-unlocked-stx-supply.mdx +++ b/content/docs/stacks/api/info/total-and-unlocked-stx-supply.mdx @@ -28,27 +28,31 @@ import { ## Get total and unlocked STX supply -Retrieves the total and unlocked STX supply. More information on Stacking can be found [here] (https://docs.stacks.co/understand-stacks/stacking). - - -This uses the estimated future total supply for the year 2050. - +Retrieves the total and unlocked STX supply. ### Query Parameters - + Supply details are queried from specified block height. If the block height is not specified, the latest block height is taken as default value. Note that the `block height` is referred to the stacks blockchain. -Example: `200` +Minimum: `0` + + + + + +Include data from unanchored (i.e. unconfirmed) microblocks + +Default: `false` | Status code | Description | -| :------ | :------ | -| `200` | Success | +| :----------- | :----------- | +| `200` | GET request that returns total and unlocked STX supply | - + @@ -61,7 +65,7 @@ Supply details are queried from specified block height. If the block height is n ```bash -curl -X GET "https://api.hiro.so/extended/v1/stx_supply?height=200" +curl -X GET "https://api.hiro.so/extended/v1/stx_supply/?height=0&unanchored=false" ``` @@ -69,7 +73,7 @@ curl -X GET "https://api.hiro.so/extended/v1/stx_supply?height=200" ```js -fetch("https://api.hiro.so/extended/v1/stx_supply?height=200", { +fetch("https://api.hiro.so/extended/v1/stx_supply/?height=0&unanchored=false", { method: "GET" }); ``` @@ -92,6 +96,7 @@ GET request that returns network target block times { "unlocked_percent": "string", "total_stx": "string", + "total_stx_year_2050": "string", "unlocked_stx": "string", "block_height": 0 } @@ -111,9 +116,13 @@ export interface GetStxSupplyResponse { */ unlocked_percent: string; /** - * String quoted decimal number of the total possible number of STX + * String quoted decimal number of the total circulating number of STX (at the input block height if provided, otherwise the current block height) */ total_stx: string; + /** + * String quoted decimal number of total circulating STX supply in year 2050. STX supply grows approx 0.3% annually thereafter in perpetuity. + */ + total_stx_year_2050: string; /** * String quoted decimal number of the STX that have been mined or unlocked */ From 99414d27ffcccad55136a0fec3a03d3556421625 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Mon, 30 Sep 2024 21:03:44 -0500 Subject: [PATCH 3/7] update v2 endpoints --- content/docs/stacks/api/info/core-api.mdx | 16 ++++++++-------- .../stacks/api/smart-contracts/interface.mdx | 4 +++- content/docs/stacks/api/usage.mdx | 4 ++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/content/docs/stacks/api/info/core-api.mdx b/content/docs/stacks/api/info/core-api.mdx index 3e6575b8..5cfb370d 100644 --- a/content/docs/stacks/api/info/core-api.mdx +++ b/content/docs/stacks/api/info/core-api.mdx @@ -76,19 +76,19 @@ GET request that core node information ```json { - "peer_version": 0, + "peer_version": 402653194, "pox_consensus": "string", - "burn_block_height": 0, + "burn_block_height": 863576, "stable_pox_consensus": "string", - "stable_burn_block_height": 0, + "stable_burn_block_height": 863569, "server_version": "string", - "network_id": 0, - "parent_network_id": 0, - "stacks_tip_height": 0, + "network_id": 1, + "parent_network_id": 3652501241, + "stacks_tip_height": 167976, "stacks_tip": "string", "stacks_tip_consensus_hash": "string", - "unanchored_tip": "string", - "exit_at_block_height": 0 + "unanchored_tip": null, + "exit_at_block_height": null } ``` diff --git a/content/docs/stacks/api/smart-contracts/interface.mdx b/content/docs/stacks/api/smart-contracts/interface.mdx index 25fe4db8..d1aea4b1 100644 --- a/content/docs/stacks/api/smart-contracts/interface.mdx +++ b/content/docs/stacks/api/smart-contracts/interface.mdx @@ -90,7 +90,9 @@ GET request to get contract interface ], "non_fungible_tokens": [ {} - ] + ], + "epoch": "string", + "clarity_version": "string" } ``` diff --git a/content/docs/stacks/api/usage.mdx b/content/docs/stacks/api/usage.mdx index 40363e12..f9410d50 100644 --- a/content/docs/stacks/api/usage.mdx +++ b/content/docs/stacks/api/usage.mdx @@ -16,7 +16,7 @@ https://api.mainnet.hiro.so To make a request to the Stacks API, you can paste the `curl` command below in your terminal. ```bash title="Terminal" -curl -L 'https://api.hiro.so/v2/info' \ +curl -L 'https://api.hiro.so/extended' \ -H 'Accept: application/json' ``` @@ -25,7 +25,7 @@ curl -L 'https://api.hiro.so/v2/info' \ If you are using an `api-key`, you will need to replace `$HIRO_API_KEY` with your secret API key. ```bash title="Terminal" -curl -L 'https://api.hiro.so/v2/info' \ +curl -L 'https://api.hiro.so/extended' \ -H 'Accept: application/json' \ -H 'X-API-Key: $HIRO_API_KEY' # [!code highlight] ``` From 2180ebfcaf81fc358e09411bcdd3b4c45741b100 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Mon, 30 Sep 2024 21:32:50 -0500 Subject: [PATCH 4/7] update curl command --- content/docs/stacks/api/transactions/get-transaction.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/docs/stacks/api/transactions/get-transaction.mdx b/content/docs/stacks/api/transactions/get-transaction.mdx index 6b582aca..b3036981 100644 --- a/content/docs/stacks/api/transactions/get-transaction.mdx +++ b/content/docs/stacks/api/transactions/get-transaction.mdx @@ -60,7 +60,7 @@ Transaction ID ```bash -curl -X GET "https://api.hiro.so/extended/v1/tx/%7Btx_id%7D" +curl -X GET "https://api.hiro.so/extended/v1/tx/{tx_id}" ``` @@ -68,7 +68,7 @@ curl -X GET "https://api.hiro.so/extended/v1/tx/%7Btx_id%7D" ```js -fetch("https://api.hiro.so/extended/v1/tx/%7Btx_id%7D", { +fetch("https://api.hiro.so/extended/v1/tx/{tx_id}", { method: "GET" }); ``` @@ -81,7 +81,7 @@ fetch("https://api.hiro.so/extended/v1/tx/%7Btx_id%7D", { -Describes all transaction types on Stacks 2.0 blockchain +Fetches transaction details for a given transaction ID From 490164a00c16a1793fec304a50c519310a3e3661 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Tue, 1 Oct 2024 10:42:51 -0500 Subject: [PATCH 5/7] remove optional params and mentions of microblocks --- .../api/info/total-and-unlocked-stx-supply.mdx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/content/docs/stacks/api/info/total-and-unlocked-stx-supply.mdx b/content/docs/stacks/api/info/total-and-unlocked-stx-supply.mdx index 0927e344..363a0f79 100644 --- a/content/docs/stacks/api/info/total-and-unlocked-stx-supply.mdx +++ b/content/docs/stacks/api/info/total-and-unlocked-stx-supply.mdx @@ -40,19 +40,11 @@ Supply details are queried from specified block height. If the block height is n - - -Include data from unanchored (i.e. unconfirmed) microblocks - -Default: `false` - - - | Status code | Description | | :----------- | :----------- | | `200` | GET request that returns total and unlocked STX supply | - + @@ -65,7 +57,7 @@ Include data from unanchored (i.e. unconfirmed) microblocks ```bash -curl -X GET "https://api.hiro.so/extended/v1/stx_supply/?height=0&unanchored=false" +curl -X GET "https://api.hiro.so/extended/v1/stx_supply" ``` @@ -73,7 +65,7 @@ curl -X GET "https://api.hiro.so/extended/v1/stx_supply/?height=0&unanchored=fal ```js -fetch("https://api.hiro.so/extended/v1/stx_supply/?height=0&unanchored=false", { +fetch("https://api.hiro.so/extended/v1/stx_supply", { method: "GET" }); ``` From 0665ee75ee895080caef721685e79966392c93a5 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Tue, 1 Oct 2024 15:04:16 -0500 Subject: [PATCH 6/7] add callout regarding rpc endpoints --- content/docs/stacks/api/index.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/docs/stacks/api/index.mdx b/content/docs/stacks/api/index.mdx index 1d3a4ffe..b32f83af 100644 --- a/content/docs/stacks/api/index.mdx +++ b/content/docs/stacks/api/index.mdx @@ -10,6 +10,10 @@ The Stacks Blockchain API expands the intentionally minimal RPC endpoints availa ## Popular endpoints + +For access to the RPC endpoints, use the `/v2` endpoint that forwards requests to the Stacks API node. For more information, see the [Stacks Node RPC API endpoints](https://docs.stacks.co/reference/api#stacks-node-rpc-api-endpoints) documentation. + + Date: Tue, 1 Oct 2024 15:10:26 -0500 Subject: [PATCH 7/7] update copy --- content/docs/stacks/api/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/stacks/api/index.mdx b/content/docs/stacks/api/index.mdx index b32f83af..8dedf3e5 100644 --- a/content/docs/stacks/api/index.mdx +++ b/content/docs/stacks/api/index.mdx @@ -11,7 +11,7 @@ The Stacks Blockchain API expands the intentionally minimal RPC endpoints availa ## Popular endpoints -For access to the RPC endpoints, use the `/v2` endpoint that forwards requests to the Stacks API node. For more information, see the [Stacks Node RPC API endpoints](https://docs.stacks.co/reference/api#stacks-node-rpc-api-endpoints) documentation. +Use our `/v2` route to access the Stacks API node endpoints. For more information, see the [Stacks Node RPC API](https://docs.stacks.co/reference/api#stacks-node-rpc-api-endpoints) documentation.