From 60762a071ec41eb7980d52ad82bd2c70412ec994 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Mon, 18 Aug 2025 12:49:05 -0500 Subject: [PATCH 1/6] move rpc node to separate section --- .../reference/accounts/meta.json | 1 - .../reference/blocks/meta.json | 5 +- .../reference/fees/meta.json | 2 +- .../reference/info/meta.json | 2 - .../reference/nakamoto/meta.json | 5 -- .../reference/proof-of-transfer/meta.json | 5 +- .../reference/smart-contracts/meta.json | 10 +-- .../reference/transactions/meta.json | 4 +- .../en/apis/stacks-node-rpc-api/index.mdx | 33 ++++++++++ .../en/apis/stacks-node-rpc-api/meta.json | 11 ++++ .../reference/accounts/info.mdx | 0 .../reference/accounts/meta.json | 7 +++ .../reference/blocks/block-by-height-v3.mdx | 0 .../reference/blocks/block-proposal.mdx | 0 .../reference/blocks/meta.json | 9 +++ .../reference/blocks/upload-block.mdx | 0 .../reference/fees/estimate.mdx | 0 .../reference/fees/meta.json | 8 +++ .../reference/fees/transfer-estimate.mdx | 0 .../reference/info/core-api.mdx | 0 .../reference/info/health.mdx | 0 .../reference/info/meta.json | 8 +++ .../reference/nakamoto/meta.json | 11 ++++ .../reference/nakamoto/nakamoto-block.mdx | 0 .../reference/nakamoto/tenure-blocks.mdx | 0 .../reference/nakamoto/tenure-fork-info.mdx | 0 .../reference/nakamoto/tenure-metadata.mdx | 0 .../reference/nakamoto/tenure-tip.mdx | 0 .../reference/proof-of-transfer/meta.json | 9 +++ .../proof-of-transfer/pox-details.mdx | 0 .../proof-of-transfer/signer-details.mdx | 0 .../proof-of-transfer/stacker-set.mdx | 0 .../reference/smart-contracts/constants.mdx | 0 .../smart-contracts/fast-read-only.mdx | 0 .../reference/smart-contracts/interface.mdx | 0 .../reference/smart-contracts/map-entry.mdx | 0 .../reference/smart-contracts/meta.json | 14 +++++ .../reference/smart-contracts/read-only.mdx | 0 .../reference/smart-contracts/source.mdx | 0 .../reference/smart-contracts/traits.mdx | 0 .../reference/smart-contracts/variable.mdx | 0 .../reference/sortitions/get-sortitions.mdx | 0 .../sortitions/latest-and-last-sortitions.mdx | 0 .../reference/sortitions/meta.json | 6 +- .../sortitions/sortition-by-burn-hash.mdx | 0 .../sortitions/sortition-by-burn-height.mdx | 0 .../sortition-by-consensus-hash.mdx | 0 .../transactions/broadcast-transaction.mdx | 0 .../reference/transactions/meta.json | 8 +++ .../transactions/transaction-details-v3.mdx | 0 .../en/apis/stacks-node-rpc-api/usage.mdx | 63 +++++++++++++++++++ 51 files changed, 189 insertions(+), 32 deletions(-) delete mode 100644 content/docs/en/apis/stacks-blockchain-api/reference/nakamoto/meta.json create mode 100644 content/docs/en/apis/stacks-node-rpc-api/index.mdx create mode 100644 content/docs/en/apis/stacks-node-rpc-api/meta.json rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/accounts/info.mdx (100%) create mode 100644 content/docs/en/apis/stacks-node-rpc-api/reference/accounts/meta.json rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/blocks/block-by-height-v3.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/blocks/block-proposal.mdx (100%) create mode 100644 content/docs/en/apis/stacks-node-rpc-api/reference/blocks/meta.json rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/blocks/upload-block.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/fees/estimate.mdx (100%) create mode 100644 content/docs/en/apis/stacks-node-rpc-api/reference/fees/meta.json rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/fees/transfer-estimate.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/info/core-api.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/info/health.mdx (100%) create mode 100644 content/docs/en/apis/stacks-node-rpc-api/reference/info/meta.json create mode 100644 content/docs/en/apis/stacks-node-rpc-api/reference/nakamoto/meta.json rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/nakamoto/nakamoto-block.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/nakamoto/tenure-blocks.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/nakamoto/tenure-fork-info.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/nakamoto/tenure-metadata.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/nakamoto/tenure-tip.mdx (100%) create mode 100644 content/docs/en/apis/stacks-node-rpc-api/reference/proof-of-transfer/meta.json rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/proof-of-transfer/pox-details.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/proof-of-transfer/signer-details.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/proof-of-transfer/stacker-set.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/smart-contracts/constants.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/smart-contracts/fast-read-only.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/smart-contracts/interface.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/smart-contracts/map-entry.mdx (100%) create mode 100644 content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/meta.json rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/smart-contracts/read-only.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/smart-contracts/source.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/smart-contracts/traits.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/smart-contracts/variable.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/sortitions/get-sortitions.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/sortitions/latest-and-last-sortitions.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/sortitions/meta.json (68%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/sortitions/sortition-by-burn-hash.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/sortitions/sortition-by-burn-height.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/sortitions/sortition-by-consensus-hash.mdx (100%) rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/transactions/broadcast-transaction.mdx (100%) create mode 100644 content/docs/en/apis/stacks-node-rpc-api/reference/transactions/meta.json rename content/docs/en/apis/{stacks-blockchain-api => stacks-node-rpc-api}/reference/transactions/transaction-details-v3.mdx (100%) create mode 100644 content/docs/en/apis/stacks-node-rpc-api/usage.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/accounts/meta.json b/content/docs/en/apis/stacks-blockchain-api/reference/accounts/meta.json index 9cab8049c..ba89d31c7 100644 --- a/content/docs/en/apis/stacks-blockchain-api/reference/accounts/meta.json +++ b/content/docs/en/apis/stacks-blockchain-api/reference/accounts/meta.json @@ -1,7 +1,6 @@ { "title": "Accounts", "pages": [ - "info", "assets", "balances", "stx-balances", diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/blocks/meta.json b/content/docs/en/apis/stacks-blockchain-api/reference/blocks/meta.json index e32757d45..eb56eed30 100644 --- a/content/docs/en/apis/stacks-blockchain-api/reference/blocks/meta.json +++ b/content/docs/en/apis/stacks-blockchain-api/reference/blocks/meta.json @@ -8,11 +8,8 @@ "recent-blocks", "block-by-hash", "block-by-height", - "block-by-height-v3", "block-by-burn-block-hash", - "block-by-burn-block-height", - "block-proposal", - "upload-block" + "block-by-burn-block-height" ], "defaultOpen": false } diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/fees/meta.json b/content/docs/en/apis/stacks-blockchain-api/reference/fees/meta.json index 5e2525275..4dae7e68c 100644 --- a/content/docs/en/apis/stacks-blockchain-api/reference/fees/meta.json +++ b/content/docs/en/apis/stacks-blockchain-api/reference/fees/meta.json @@ -1,5 +1,5 @@ { "title": "Fees", - "pages": ["fee-rate", "estimate", "transfer-estimate"], + "pages": ["fee-rate"], "defaultOpen": false } diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/info/meta.json b/content/docs/en/apis/stacks-blockchain-api/reference/info/meta.json index 719c88059..00dc4199c 100644 --- a/content/docs/en/apis/stacks-blockchain-api/reference/info/meta.json +++ b/content/docs/en/apis/stacks-blockchain-api/reference/info/meta.json @@ -2,8 +2,6 @@ "title": "Info", "pages": [ "status", - "core-api", - "health", "network-block-time", "network-given-block-time", "total-and-unlocked-stx-supply", diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/nakamoto/meta.json b/content/docs/en/apis/stacks-blockchain-api/reference/nakamoto/meta.json deleted file mode 100644 index 7312774f5..000000000 --- a/content/docs/en/apis/stacks-blockchain-api/reference/nakamoto/meta.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "title": "Nakamoto", - "pages": ["nakamoto-block", "tenure-blocks", "tenure-metadata", "tenure-fork-info", "tenure-tip"], - "defaultOpen": false -} diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/proof-of-transfer/meta.json b/content/docs/en/apis/stacks-blockchain-api/reference/proof-of-transfer/meta.json index f5216f411..f62e46c27 100644 --- a/content/docs/en/apis/stacks-blockchain-api/reference/proof-of-transfer/meta.json +++ b/content/docs/en/apis/stacks-blockchain-api/reference/proof-of-transfer/meta.json @@ -5,10 +5,7 @@ "cycle", "signers-in-cycle", "signer-in-cycle", - "signer-details", - "stackers-for-signer-in-cycle", - "pox-details", - "stacker-set" + "stackers-for-signer-in-cycle" ], "defaultOpen": false } diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/meta.json b/content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/meta.json index 856c9a5e1..254725608 100644 --- a/content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/meta.json +++ b/content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/meta.json @@ -3,16 +3,8 @@ "pages": [ "status", "info", - "source", "by-trait", - "interface", - "map-entry", - "read-only", - "fast-read-only", - "events", - "variable", - "constants", - "traits" + "events" ], "defaultOpen": false } diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/transactions/meta.json b/content/docs/en/apis/stacks-blockchain-api/reference/transactions/meta.json index 13acd6526..59f10ae9b 100644 --- a/content/docs/en/apis/stacks-blockchain-api/reference/transactions/meta.json +++ b/content/docs/en/apis/stacks-blockchain-api/reference/transactions/meta.json @@ -4,7 +4,6 @@ "recent-transactions", "get-transaction", "get-raw-transaction", - "transaction-details-v3", "address-transactions", "transactions-by-block", "events-for-an-address-transaction", @@ -13,8 +12,7 @@ "mempool-transactions", "dropped-mempool-transactions", "statistics-for-mempool-transactions", - "details-for-transactions", - "broadcast-transaction" + "details-for-transactions" ], "defaultOpen": false } diff --git a/content/docs/en/apis/stacks-node-rpc-api/index.mdx b/content/docs/en/apis/stacks-node-rpc-api/index.mdx new file mode 100644 index 000000000..3e624c8f0 --- /dev/null +++ b/content/docs/en/apis/stacks-node-rpc-api/index.mdx @@ -0,0 +1,33 @@ +--- +title: Stacks Node RPC API +sidebarTitle: Overview +description: Direct RPC access to Stacks blockchain nodes for real-time data and operations. +llm: false +--- + +## Overview + +The Stacks Node RPC API provides direct access to Stacks blockchain nodes through RPC endpoints. These endpoints offer real-time access to blockchain state, smart contract execution, and node operations without intermediary caching layers. + +## Key features + +- **Direct node access** - Connect directly to Stacks nodes for real-time data +- **Smart contract interaction** - Execute read-only functions and retrieve contract state +- **Block and transaction data** - Access detailed block information and transaction details +- **Network operations** - Perform network-level operations like broadcasting transactions + +## Usage + +```terminal +$ curl -L 'https://api.hiro.so/v2/info' -H 'Accept: application/json' +``` + +For more usage examples, click [here](/apis/stacks-node-rpc-api/usage). + +:::callout +All Stacks Node RPC API responses provide direct access to blockchain data without caching, ensuring you receive the most current information available. +::: + +:::callout +The RPC endpoints are designed for applications that require real-time blockchain state and direct node interaction. For cached and optimized data access, consider using the [Stacks Blockchain API](/apis/stacks-blockchain-api). +::: \ No newline at end of file diff --git a/content/docs/en/apis/stacks-node-rpc-api/meta.json b/content/docs/en/apis/stacks-node-rpc-api/meta.json new file mode 100644 index 000000000..706436219 --- /dev/null +++ b/content/docs/en/apis/stacks-node-rpc-api/meta.json @@ -0,0 +1,11 @@ +{ + "title": "APIs", + "root": true, + "pages": [ + "---Stacks Node RPC API---", + "index", + "usage", + "---Reference---", + "...reference" + ] +} \ No newline at end of file diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/accounts/info.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/accounts/info.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/accounts/info.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/accounts/info.mdx diff --git a/content/docs/en/apis/stacks-node-rpc-api/reference/accounts/meta.json b/content/docs/en/apis/stacks-node-rpc-api/reference/accounts/meta.json new file mode 100644 index 000000000..d2bf1632c --- /dev/null +++ b/content/docs/en/apis/stacks-node-rpc-api/reference/accounts/meta.json @@ -0,0 +1,7 @@ +{ + "title": "Accounts", + "pages": [ + "info" + ], + "defaultOpen": false +} \ No newline at end of file diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/blocks/block-by-height-v3.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/blocks/block-by-height-v3.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/blocks/block-by-height-v3.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/blocks/block-by-height-v3.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/blocks/block-proposal.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/blocks/block-proposal.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/blocks/block-proposal.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/blocks/block-proposal.mdx diff --git a/content/docs/en/apis/stacks-node-rpc-api/reference/blocks/meta.json b/content/docs/en/apis/stacks-node-rpc-api/reference/blocks/meta.json new file mode 100644 index 000000000..282d373ed --- /dev/null +++ b/content/docs/en/apis/stacks-node-rpc-api/reference/blocks/meta.json @@ -0,0 +1,9 @@ +{ + "title": "Blocks", + "pages": [ + "block-by-height-v3", + "block-proposal", + "upload-block" + ], + "defaultOpen": false +} \ No newline at end of file diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/blocks/upload-block.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/blocks/upload-block.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/blocks/upload-block.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/blocks/upload-block.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/fees/estimate.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/fees/estimate.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/fees/estimate.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/fees/estimate.mdx diff --git a/content/docs/en/apis/stacks-node-rpc-api/reference/fees/meta.json b/content/docs/en/apis/stacks-node-rpc-api/reference/fees/meta.json new file mode 100644 index 000000000..8553c9cf0 --- /dev/null +++ b/content/docs/en/apis/stacks-node-rpc-api/reference/fees/meta.json @@ -0,0 +1,8 @@ +{ + "title": "Fees", + "pages": [ + "estimate", + "transfer-estimate" + ], + "defaultOpen": false +} \ No newline at end of file diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/fees/transfer-estimate.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/fees/transfer-estimate.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/fees/transfer-estimate.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/fees/transfer-estimate.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/info/core-api.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/info/core-api.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/info/core-api.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/info/core-api.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/info/health.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/info/health.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/info/health.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/info/health.mdx diff --git a/content/docs/en/apis/stacks-node-rpc-api/reference/info/meta.json b/content/docs/en/apis/stacks-node-rpc-api/reference/info/meta.json new file mode 100644 index 000000000..855dbecbf --- /dev/null +++ b/content/docs/en/apis/stacks-node-rpc-api/reference/info/meta.json @@ -0,0 +1,8 @@ +{ + "title": "Info", + "pages": [ + "core-api", + "health" + ], + "defaultOpen": false +} \ No newline at end of file diff --git a/content/docs/en/apis/stacks-node-rpc-api/reference/nakamoto/meta.json b/content/docs/en/apis/stacks-node-rpc-api/reference/nakamoto/meta.json new file mode 100644 index 000000000..d0feb50a0 --- /dev/null +++ b/content/docs/en/apis/stacks-node-rpc-api/reference/nakamoto/meta.json @@ -0,0 +1,11 @@ +{ + "title": "Nakamoto", + "pages": [ + "nakamoto-block", + "tenure-blocks", + "tenure-fork-info", + "tenure-metadata", + "tenure-tip" + ], + "defaultOpen": false +} \ No newline at end of file diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/nakamoto/nakamoto-block.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/nakamoto/nakamoto-block.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/nakamoto/nakamoto-block.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/nakamoto/nakamoto-block.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/nakamoto/tenure-blocks.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/nakamoto/tenure-blocks.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/nakamoto/tenure-blocks.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/nakamoto/tenure-blocks.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/nakamoto/tenure-fork-info.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/nakamoto/tenure-fork-info.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/nakamoto/tenure-fork-info.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/nakamoto/tenure-fork-info.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/nakamoto/tenure-metadata.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/nakamoto/tenure-metadata.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/nakamoto/tenure-metadata.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/nakamoto/tenure-metadata.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/nakamoto/tenure-tip.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/nakamoto/tenure-tip.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/nakamoto/tenure-tip.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/nakamoto/tenure-tip.mdx diff --git a/content/docs/en/apis/stacks-node-rpc-api/reference/proof-of-transfer/meta.json b/content/docs/en/apis/stacks-node-rpc-api/reference/proof-of-transfer/meta.json new file mode 100644 index 000000000..344f2651e --- /dev/null +++ b/content/docs/en/apis/stacks-node-rpc-api/reference/proof-of-transfer/meta.json @@ -0,0 +1,9 @@ +{ + "title": "Proof of Transfer", + "pages": [ + "pox-details", + "signer-details", + "stacker-set" + ], + "defaultOpen": false +} \ No newline at end of file diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/proof-of-transfer/pox-details.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/proof-of-transfer/pox-details.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/proof-of-transfer/pox-details.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/proof-of-transfer/pox-details.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/proof-of-transfer/signer-details.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/proof-of-transfer/signer-details.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/proof-of-transfer/signer-details.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/proof-of-transfer/signer-details.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/proof-of-transfer/stacker-set.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/proof-of-transfer/stacker-set.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/proof-of-transfer/stacker-set.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/proof-of-transfer/stacker-set.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/constants.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/constants.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/constants.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/constants.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/fast-read-only.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/fast-read-only.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/fast-read-only.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/fast-read-only.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/interface.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/interface.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/interface.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/interface.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/map-entry.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/map-entry.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/map-entry.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/map-entry.mdx diff --git a/content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/meta.json b/content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/meta.json new file mode 100644 index 000000000..4dde299b6 --- /dev/null +++ b/content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/meta.json @@ -0,0 +1,14 @@ +{ + "title": "Smart Contracts", + "pages": [ + "constants", + "fast-read-only", + "interface", + "map-entry", + "read-only", + "source", + "traits", + "variable" + ], + "defaultOpen": false +} \ No newline at end of file diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/read-only.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/read-only.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/read-only.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/read-only.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/source.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/source.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/source.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/source.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/traits.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/traits.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/traits.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/traits.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/variable.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/variable.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/smart-contracts/variable.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/smart-contracts/variable.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/sortitions/get-sortitions.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/sortitions/get-sortitions.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/sortitions/get-sortitions.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/sortitions/get-sortitions.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/sortitions/latest-and-last-sortitions.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/sortitions/latest-and-last-sortitions.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/sortitions/latest-and-last-sortitions.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/sortitions/latest-and-last-sortitions.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/sortitions/meta.json b/content/docs/en/apis/stacks-node-rpc-api/reference/sortitions/meta.json similarity index 68% rename from content/docs/en/apis/stacks-blockchain-api/reference/sortitions/meta.json rename to content/docs/en/apis/stacks-node-rpc-api/reference/sortitions/meta.json index 814398079..ae78bb606 100644 --- a/content/docs/en/apis/stacks-blockchain-api/reference/sortitions/meta.json +++ b/content/docs/en/apis/stacks-node-rpc-api/reference/sortitions/meta.json @@ -2,10 +2,10 @@ "title": "Sortitions", "pages": [ "get-sortitions", + "latest-and-last-sortitions", "sortition-by-burn-hash", "sortition-by-burn-height", - "sortition-by-consensus-hash", - "latest-and-last-sortitions" + "sortition-by-consensus-hash" ], "defaultOpen": false -} +} \ No newline at end of file diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/sortitions/sortition-by-burn-hash.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/sortitions/sortition-by-burn-hash.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/sortitions/sortition-by-burn-hash.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/sortitions/sortition-by-burn-hash.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/sortitions/sortition-by-burn-height.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/sortitions/sortition-by-burn-height.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/sortitions/sortition-by-burn-height.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/sortitions/sortition-by-burn-height.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/sortitions/sortition-by-consensus-hash.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/sortitions/sortition-by-consensus-hash.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/sortitions/sortition-by-consensus-hash.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/sortitions/sortition-by-consensus-hash.mdx diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/transactions/broadcast-transaction.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/transactions/broadcast-transaction.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/transactions/broadcast-transaction.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/transactions/broadcast-transaction.mdx diff --git a/content/docs/en/apis/stacks-node-rpc-api/reference/transactions/meta.json b/content/docs/en/apis/stacks-node-rpc-api/reference/transactions/meta.json new file mode 100644 index 000000000..b57242d9c --- /dev/null +++ b/content/docs/en/apis/stacks-node-rpc-api/reference/transactions/meta.json @@ -0,0 +1,8 @@ +{ + "title": "Transactions", + "pages": [ + "broadcast-transaction", + "transaction-details-v3" + ], + "defaultOpen": false +} \ No newline at end of file diff --git a/content/docs/en/apis/stacks-blockchain-api/reference/transactions/transaction-details-v3.mdx b/content/docs/en/apis/stacks-node-rpc-api/reference/transactions/transaction-details-v3.mdx similarity index 100% rename from content/docs/en/apis/stacks-blockchain-api/reference/transactions/transaction-details-v3.mdx rename to content/docs/en/apis/stacks-node-rpc-api/reference/transactions/transaction-details-v3.mdx diff --git a/content/docs/en/apis/stacks-node-rpc-api/usage.mdx b/content/docs/en/apis/stacks-node-rpc-api/usage.mdx new file mode 100644 index 000000000..6c618eee1 --- /dev/null +++ b/content/docs/en/apis/stacks-node-rpc-api/usage.mdx @@ -0,0 +1,63 @@ +--- +title: Basic usage +sidebarTitle: Usage +description: Learn the basics of using the Stacks Node RPC API. +--- + +## Usage + +The Stacks Node RPC API provides direct access to Stacks blockchain nodes through RPC endpoints, built on REST principles and enforcing HTTPS for all requests to ensure data security, integrity, and privacy. + +### Base URL + +```console -c +https://api.hiro.so +``` + +### Making requests + +To make a request to the Stacks Node RPC API, you can paste the curl command below in your terminal. + +```terminal +$ curl -L 'https://api.hiro.so/v2/info' \ + -H 'Accept: application/json' +``` + +### Authentication + +If you are using an api-key, replace `$HIRO_API_KEY` with your secret API key. + +```terminal +$ curl -L 'https://api.hiro.so/v2/info' \ + -H 'Accept: application/json' \ + -H 'x-api-key: $HIRO_API_KEY' +``` + +## Response codes + +The Stacks Node RPC API uses standard HTTP response codes to indicate request success or failure. + +| Code | Description | +|------|-------------| +| `200` | Successful request | +| `400` | Check that the parameters were correct | +| `401` | Missing API key | +| `403` | Invalid API key | +| `404` | Resource not found | +| `429` | Rate limit exceeded | +| `5xx` | Server errors | + +## Real-time data + +Unlike cached APIs, the RPC endpoints provide direct access to blockchain state: + +- Smart contract calls return current state +- Block data reflects the latest confirmed blocks +- Transaction details include real-time status + +## Common use cases + +- **Smart contract development** - Test and debug contract functions +- **Real-time monitoring** - Track blockchain state changes as they occur +- **Node operations** - Perform administrative and diagnostic operations +- **Transaction broadcasting** - Submit transactions directly to the network \ No newline at end of file From 9a589bc07ad50772e0efe1092b9751df51ee592a Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Mon, 18 Aug 2025 12:49:32 -0500 Subject: [PATCH 2/6] update apis page to include new rpc node section --- app/[locale]/(home)/apis/_pages/page.en.tsx | 6 + app/[locale]/(home)/apis/_pages/page.es.tsx | 31 +-- app/[locale]/[...slug]/page.tsx | 7 + app/layout.config.tsx | 6 + hooks/use-localized-navigation.tsx | 282 ++++++++++---------- lib/translations/en.ts | 5 + lib/translations/es.ts | 5 + 7 files changed, 190 insertions(+), 152 deletions(-) diff --git a/app/[locale]/(home)/apis/_pages/page.en.tsx b/app/[locale]/(home)/apis/_pages/page.en.tsx index ea6c64077..61fff8141 100644 --- a/app/[locale]/(home)/apis/_pages/page.en.tsx +++ b/app/[locale]/(home)/apis/_pages/page.en.tsx @@ -17,6 +17,12 @@ export default function APIsPage() { title="Stacks Blockchain API" description="Comprehensive REST API for interacting with the Stacks blockchain and network data." /> + } + href="/apis/stacks-node-rpc-api" + title="Stacks Node RPC API" + description="Raw blockchain node methods: submit txs, call read-only contracts, query mempool/state." + /> } href="/apis/token-metadata-api" diff --git a/app/[locale]/(home)/apis/_pages/page.es.tsx b/app/[locale]/(home)/apis/_pages/page.es.tsx index 438540684..db8878c9c 100644 --- a/app/[locale]/(home)/apis/_pages/page.es.tsx +++ b/app/[locale]/(home)/apis/_pages/page.es.tsx @@ -14,49 +14,50 @@ export default function APIsPage() { } href="/apis/stacks-blockchain-api" - title="API de Blockchain de Stacks" - description="API REST completa para interactuar con la cadena de bloques de Stacks y los datos de la red." - /> + title="API de la cadena de bloques Stacks" + description="API REST completa para interactuar con la cadena de bloques de Stacks y los datos de la red." /> + + } + href="/apis/stacks-node-rpc-api" + title="API RPC del Nodo Stacks" + description="Métodos de nodo de blockchain sin procesar: enviar transacciones, llamar contratos de solo lectura, consultar mempool/estado." /> } href="/apis/token-metadata-api" title="API de Metadatos de Tokens" - description="Metadatos rápidos y confiables para tokens fungibles y no fungibles en Stacks." - /> + description="Metadatos rápidos y confiables para tokens fungibles y no fungibles en Stacks." /> } href="/apis/platform-api" title="API de la plataforma" - description="Administre programáticamente devnets y chainhooks a través de la interfaz REST." - /> + description="Gestione programáticamente devnets y chainhooks a través de la interfaz REST." /> } href="/apis/ordinals-api" title="API de Ordinals" tag="Bitcoin L1" - description="Datos completos de ordinales de Bitcoin y tokens BRC-20 con optimización de caché." - /> + description="Datos completos de ordinales de Bitcoin y tokens BRC-20 con optimización de caché." /> } href="/apis/runes-api" title="API de Runas" tag="Bitcoin L1" - description="Datos rápidos y confiables para Bitcoin Runes a través de una interfaz REST fácil de usar." - /> + description="Datos rápidos y confiables para Bitcoin Runes a través de una interfaz REST fácil de usar." /> } href="/apis/signer-metrics-api" title="API de Métricas del Firmante" - description="Monitorear y analizar el comportamiento y rendimiento de los firmantes en la red Stacks." - /> + description="Monitorea y analiza el comportamiento y rendimiento de los firmantes en la red Stacks." /> + - - ); + ); + } diff --git a/app/[locale]/[...slug]/page.tsx b/app/[locale]/[...slug]/page.tsx index f9b87f4f5..845bf4735 100644 --- a/app/[locale]/[...slug]/page.tsx +++ b/app/[locale]/[...slug]/page.tsx @@ -213,6 +213,13 @@ export default async function Page(props: { + {/* RPC endpoint callout */} + {page.data.isRpc && ( + + These are served by Stacks nodes, not directly operated by Hiro. Availability and performance may vary depending on upstream node health. For guaranteed performance, run your own node or talk to us about dedicated options. + + )} + {/* Render TagFilterSystem if tags are present in frontmatter */} {page.data.tags && page.data.tags.length > 0 && ( [ - // Tools menu - { - type: 'menu' as const, - text: t.navigation.menus.tools, - items: [ - { - text: t.tools.clarinet.title, - description: t.tools.clarinet.description, - url: '/tools/clarinet', - }, - { - text: t.tools.chainhook.title, - description: t.tools.chainhook.description, - url: '/tools/chainhook', - }, - { - text: t.tools.contractMonitoring.title, - description: t.tools.contractMonitoring.description, - url: '/tools/contract-monitoring', - }, - { - text: t.tools.clarityVscode.title, - description: t.tools.clarityVscode.description, - url: '/tools/clarinet/vscode-extension', - }, - { - text: t.tools.bitcoinIndexer.title, - description: t.tools.bitcoinIndexer.description, - url: '/tools/bitcoin-indexer', - isNew: true, - }, - ], - }, - // APIs menu - { - type: 'menu' as const, - text: t.navigation.menus.apis, - items: [ - { - text: t.apis.apiKeys.title, - description: t.apis.apiKeys.description, - url: '/resources/guides/api-keys', - }, - { - text: t.apis.rateLimits.title, - description: t.apis.rateLimits.description, - url: '/resources/guides/rate-limits', - }, - { - text: t.apis.stacksApi.title, - description: t.apis.stacksApi.description, - url: '/apis/stacks-blockchain-api', - }, - { - text: t.apis.tokenMetadata.title, - description: t.apis.tokenMetadata.description, - url: '/apis/token-metadata-api', - }, - { - text: t.apis.platform.title, - description: t.apis.platform.description, - url: '/apis/platform-api', - }, - { - text: t.apis.ordinals.title, - description: t.apis.ordinals.description, - url: '/apis/ordinals-api', - }, - { - text: t.apis.runes.title, - description: t.apis.runes.description, - url: '/apis/runes-api', - }, - { - text: t.apis.signerMetrics.title, - description: t.apis.signerMetrics.description, - url: '/apis/signer-metrics-api', - }, - ], - }, - // Libraries & SDKs menu - { - type: 'menu' as const, - text: t.navigation.menus.libraries, - items: [ - { - text: t.libraries.stacksJs.title, - description: t.libraries.stacksJs.description, - url: '/reference/stacks.js', - }, - { - text: t.libraries.stacksConnect.title, - description: t.libraries.stacksConnect.description, - url: '/reference/stacks.js/connect-wallet', - }, - { - text: t.libraries.clarinetSdk.title, - description: t.libraries.clarinetSdk.description, - url: '/tools/clarinet/sdk-introduction', - }, - { - text: t.libraries.clarinetBrowserSdk.title, - description: t.libraries.clarinetBrowserSdk.description, - url: '/tools/clarinet/browser-sdk-reference', - }, - ], - }, - // Resources menu - { - type: 'menu' as const, - text: t.navigation.menus.resources, - items: [ - { - text: t.resources.clarityReference.title, - description: t.resources.clarityReference.description, - url: '/resources/clarity', - }, - { - text: t.resources.guides.title, - description: t.resources.guides.description, - url: '/resources/guides', - }, - { - text: t.resources.snippets.title, - description: t.resources.snippets.description, - url: '/resources/snippets', - }, - { - text: t.resources.archive.title, - description: t.resources.archive.description, - url: '/resources/archive', - }, - ], - }, - ], [t]); -} \ No newline at end of file + return useMemo( + () => [ + // Tools menu + { + type: 'menu' as const, + text: t.navigation.menus.tools, + items: [ + { + text: t.tools.clarinet.title, + description: t.tools.clarinet.description, + url: '/tools/clarinet', + }, + { + text: t.tools.chainhook.title, + description: t.tools.chainhook.description, + url: '/tools/chainhook', + }, + { + text: t.tools.contractMonitoring.title, + description: t.tools.contractMonitoring.description, + url: '/tools/contract-monitoring', + }, + { + text: t.tools.clarityVscode.title, + description: t.tools.clarityVscode.description, + url: '/tools/clarinet/vscode-extension', + }, + { + text: t.tools.bitcoinIndexer.title, + description: t.tools.bitcoinIndexer.description, + url: '/tools/bitcoin-indexer', + isNew: true, + }, + ], + }, + // APIs menu + { + type: 'menu' as const, + text: t.navigation.menus.apis, + items: [ + { + text: t.apis.apiKeys.title, + description: t.apis.apiKeys.description, + url: '/resources/guides/api-keys', + }, + { + text: t.apis.rateLimits.title, + description: t.apis.rateLimits.description, + url: '/resources/guides/rate-limits', + }, + { + text: t.apis.stacksApi.title, + description: t.apis.stacksApi.description, + url: '/apis/stacks-blockchain-api', + }, + { + text: t.apis.stacksNodeRpcApi.title, + description: t.apis.stacksNodeRpcApi.description, + url: '/apis/stacks-node-rpc-api', + }, + { + text: t.apis.tokenMetadata.title, + description: t.apis.tokenMetadata.description, + url: '/apis/token-metadata-api', + }, + { + text: t.apis.platform.title, + description: t.apis.platform.description, + url: '/apis/platform-api', + }, + { + text: t.apis.ordinals.title, + description: t.apis.ordinals.description, + url: '/apis/ordinals-api', + }, + { + text: t.apis.runes.title, + description: t.apis.runes.description, + url: '/apis/runes-api', + }, + { + text: t.apis.signerMetrics.title, + description: t.apis.signerMetrics.description, + url: '/apis/signer-metrics-api', + }, + ], + }, + // Libraries & SDKs menu + { + type: 'menu' as const, + text: t.navigation.menus.libraries, + items: [ + { + text: t.libraries.stacksJs.title, + description: t.libraries.stacksJs.description, + url: '/reference/stacks.js', + }, + { + text: t.libraries.stacksConnect.title, + description: t.libraries.stacksConnect.description, + url: '/reference/stacks.js/connect-wallet', + }, + { + text: t.libraries.clarinetSdk.title, + description: t.libraries.clarinetSdk.description, + url: '/tools/clarinet/sdk-introduction', + }, + { + text: t.libraries.clarinetBrowserSdk.title, + description: t.libraries.clarinetBrowserSdk.description, + url: '/tools/clarinet/browser-sdk-reference', + }, + ], + }, + // Resources menu + { + type: 'menu' as const, + text: t.navigation.menus.resources, + items: [ + { + text: t.resources.clarityReference.title, + description: t.resources.clarityReference.description, + url: '/resources/clarity', + }, + { + text: t.resources.guides.title, + description: t.resources.guides.description, + url: '/resources/guides', + }, + { + text: t.resources.snippets.title, + description: t.resources.snippets.description, + url: '/resources/snippets', + }, + { + text: t.resources.archive.title, + description: t.resources.archive.description, + url: '/resources/archive', + }, + ], + }, + ], + [t], + ); +} diff --git a/lib/translations/en.ts b/lib/translations/en.ts index ea3026ff1..18ebe5ab2 100644 --- a/lib/translations/en.ts +++ b/lib/translations/en.ts @@ -96,6 +96,11 @@ export const en: Translations = { title: 'Stacks API', description: 'RESTful API for accessing Stacks blockchain data and functionality.', }, + stacksNodeRpcApi: { + title: 'Stacks Node RPC API', + description: + 'Raw blockchain node methods: submit txs, call read-only contracts, query mempool/state.', + }, tokenMetadata: { title: 'Token Metadata API', description: 'API for retrieving NFT and fungible token metadata.', diff --git a/lib/translations/es.ts b/lib/translations/es.ts index a5ec20b68..e11be14f8 100644 --- a/lib/translations/es.ts +++ b/lib/translations/es.ts @@ -96,6 +96,11 @@ export const es: Translations = { title: 'API de Stacks', description: 'API RESTful para acceder a datos y funcionalidad de la blockchain Stacks.', }, + stacksNodeRpcApi: { + title: 'API de Nodo RPC de Stacks', + description: + 'Métodos de nodo blockchain sin procesar: enviar txs, llamar contratos de solo lectura, consultar mempool/estado.', + }, tokenMetadata: { title: 'API de Metadatos de Tokens', description: 'API para obtener metadatos de tokens NFT y fungibles.', From 8472b2a0267b40ae181825ce3eec766e130a4430 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Mon, 18 Aug 2025 13:07:23 -0500 Subject: [PATCH 3/6] clean up dead code --- app/(docs)/[...slug]/page.tsx | 296 ------------ app/(docs)/error.tsx | 60 --- app/(docs)/layout.tsx | 12 - app/(docs)/not-found.tsx | 29 -- app/(docs)/raw/[...slug]/route.ts | 80 --- app/(home)/components/interactive-badge.tsx | 26 - app/(home)/icons.tsx | 510 -------------------- app/(home)/layout.tsx | 7 - app/(home)/page.tsx | 194 -------- app/[locale]/(home)/apis/_pages/page.es.tsx | 26 +- app/[locale]/[...slug]/page.tsx | 4 +- app/apis/layout.tsx | 7 - app/apis/page.tsx | 57 --- app/reference/layout.tsx | 7 - app/reference/page.tsx | 43 -- app/resources/layout.tsx | 7 - app/resources/page.tsx | 50 -- app/tools/layout.tsx | 7 - app/tools/page.tsx | 45 -- 19 files changed, 19 insertions(+), 1448 deletions(-) delete mode 100644 app/(docs)/[...slug]/page.tsx delete mode 100644 app/(docs)/error.tsx delete mode 100644 app/(docs)/layout.tsx delete mode 100644 app/(docs)/not-found.tsx delete mode 100644 app/(docs)/raw/[...slug]/route.ts delete mode 100644 app/(home)/components/interactive-badge.tsx delete mode 100644 app/(home)/icons.tsx delete mode 100644 app/(home)/layout.tsx delete mode 100644 app/(home)/page.tsx delete mode 100644 app/apis/layout.tsx delete mode 100644 app/apis/page.tsx delete mode 100644 app/reference/layout.tsx delete mode 100644 app/reference/page.tsx delete mode 100644 app/resources/layout.tsx delete mode 100644 app/resources/page.tsx delete mode 100644 app/tools/layout.tsx delete mode 100644 app/tools/page.tsx diff --git a/app/(docs)/[...slug]/page.tsx b/app/(docs)/[...slug]/page.tsx deleted file mode 100644 index bce4398b3..000000000 --- a/app/(docs)/[...slug]/page.tsx +++ /dev/null @@ -1,296 +0,0 @@ -import fs from 'node:fs/promises'; -import defaultMdxComponents from 'fumadocs-ui/mdx'; -import matter from 'gray-matter'; -import * as lucideIcons from 'lucide-react'; -import { CheckIcon } from 'lucide-react'; -import { notFound } from 'next/navigation'; -import { Callout } from '@/components/callout'; -import { FeedbackWrapper } from '@/components/feedback/feedback-wrapper'; -import { InteractiveHeader, InteractiveLayout } from '@/components/layouts/interactive'; -import { - DocsPage, - DocsPageBreadcrumb, - DocsPageContent, - DocsPageContentWrapper, - DocsPageDescription, - DocsPageHeader, - DocsPageLayout, - DocsPageProse, - DocsPageTitle, -} from '@/components/layouts/page'; -import { LLMShare } from '@/components/llm-share'; -import { getMDXComponents } from '@/components/mdx'; -import { Mermaid } from '@/components/mdx/mermaid'; -import { APIPage } from '@/components/openapi/api-page'; -import { API } from '@/components/reference/api-page'; -import { Badge } from '@/components/ui/badge'; -import * as customIcons from '@/components/ui/icon'; -import { TagFilterSystem } from '@/components/ui/tag-filter-system'; -import { getAllFilterablePages, source } from '@/lib/source'; -import type { HeadingProps } from '@/types'; - -export default async function Page(props: { params: Promise<{ slug?: string[] }> }) { - const params = await props.params; - const page = source.getPage(params.slug); - if (!page) notFound(); - - const fileContent = await fs.readFile(page.data._file.absolutePath, 'utf-8'); - const { content: rawMarkdownContent } = matter(fileContent); - - const LLMContent = rawMarkdownContent - .split('\n') - .filter((line) => !line.trim().startsWith('import')) - .join('\n') - .trim(); - - const MDX = page.data.body; - - if (!MDX) { - console.error('MDX component is undefined for page:', page.url); - notFound(); - } - - // Get all filterable pages for tag filtering - const allFilterablePages = getAllFilterablePages(); - - // Extract section from current page URL for scoped filtering - const currentSection = page.url.split('/').filter(Boolean)[1] || 'general'; - - // Helper function to get icon component - const getIconComponent = (iconName: string) => { - const iconProps = { className: 'w-3 h-3 shrink-0' }; - - // Check custom icons first - const CustomIcon = (customIcons as any)[iconName]; - if (CustomIcon && typeof CustomIcon === 'function') { - return ; - } - - // Try with "Icon" suffix for custom icons - const CustomIconWithSuffix = (customIcons as any)[`${iconName}Icon`]; - if (CustomIconWithSuffix && typeof CustomIconWithSuffix === 'function') { - return ; - } - - // Check lucide icons - try multiple naming patterns - const lucidePatterns = [ - iconName, // exact name - `${iconName}Icon`, // with Icon suffix - iconName.charAt(0).toUpperCase() + iconName.slice(1), // capitalize first letter - `${iconName.charAt(0).toUpperCase() + iconName.slice(1)}Icon`, // capitalize + Icon - ]; - - for (const pattern of lucidePatterns) { - const LucideIcon = (lucideIcons as any)[pattern]; - if (LucideIcon && typeof LucideIcon === 'function') { - return ; - } - } - - return null; - }; - - // Convert icon names to React components - const interactiveLinks = page.data.interactiveLinks?.map((link) => ({ - ...link, - icon: link.icon ? getIconComponent(link.icon) : undefined, - })); - - // Prepare page data for context - only include serializable data - const pageData = { - toc: page.data.toc, - full: page.data.full, - interactive: page.data.interactive, - title: page.data.title, - description: page.data.description, - interactiveFeatures: page.data.interactiveFeatures, - interactiveLinks, // Use the processed links with React components - }; - - return ( - - {page.data.interactive ? ( - - - - - - -
- - - - - , - APIPage: (props) => ( - - ), - h1: ({ children, ...props }: HeadingProps) => { - const H1 = defaultMdxComponents.h1 as React.ComponentType; - const id = typeof children === 'string' ? children : undefined; - return ( -

- {children} -

- ); - }, - blockquote: (props) => {props.children}, - code: (props: React.PropsWithChildren) => ( - - ), - hr: (props: React.PropsWithChildren) => ( -
- ), - input: (props: React.InputHTMLAttributes) => { - if (props.type === 'checkbox') { - return ( -
- -
- {props.checked && } -
-
- ); - } - return ; - }, - Mermaid, - })} - /> -
-
- - - - - ) : ( - - - - -
-
- - {page.data.isRpc && ( - - RPC node - - )} -
- {page.data.llm !== false && } -
- - - {/* Render TagFilterSystem if tags are present in frontmatter */} - {page.data.tags && page.data.tags.length > 0 && ( - - )} - -
- - , - APIPage: (props) => ( - - ), - h1: ({ children, ...props }: HeadingProps) => { - const H1 = defaultMdxComponents.h1 as React.ComponentType; - const id = typeof children === 'string' ? children : undefined; - return ( -

- {children} -

- ); - }, - blockquote: (props) => {props.children}, - code: (props: React.PropsWithChildren) => ( - - ), - hr: (props: React.PropsWithChildren) => ( -
- ), - input: (props: React.InputHTMLAttributes) => { - if (props.type === 'checkbox') { - return ( -
- -
- {props.checked && } -
-
- ); - } - return ; - }, - Mermaid, - })} - /> -
-
- - - - - )} - - ); -} - -export async function generateStaticParams() { - return source.generateParams().filter( - (params) => - // Filter out empty slug arrays (root path) - params.slug && params.slug.length > 0, - ); -} - -export async function generateMetadata(props: { params: Promise<{ slug?: string[] }> }) { - const params = await props.params; - const page = source.getPage(params.slug); - if (!page) notFound(); - - return { - title: page.data.title, - description: page.data.description, - }; -} diff --git a/app/(docs)/error.tsx b/app/(docs)/error.tsx deleted file mode 100644 index 39a19cc5b..000000000 --- a/app/(docs)/error.tsx +++ /dev/null @@ -1,60 +0,0 @@ -'use client'; - -import Link from 'next/link'; -import React from 'react'; - -export default function ErrorBoundary({ - error, - reset, -}: { - error: Error & { digest?: string }; - reset: () => void; -}) { - React.useEffect(() => { - // Hide sidebar for errors (including 404s) - const aside = document.querySelector('aside'); - if (aside) { - aside.style.display = 'none'; - } - - return () => { - const asideCleanup = document.querySelector('aside'); - if (asideCleanup) { - asideCleanup.style.display = ''; - } - }; - }, []); - - // Check if this is likely a 404 error - const is404 = error.message?.includes('404') || error.message?.includes('not found'); - - return ( -
-

- {is404 ? 'Page not found' : 'Something went wrong'} -

-

- {is404 - ? "The documentation you are looking for doesn't exist or has been moved." - : 'An error occurred while loading this page.'} -

-
- - Back to homepage - - {!is404 && ( - - )} -
-
- ); -} diff --git a/app/(docs)/layout.tsx b/app/(docs)/layout.tsx deleted file mode 100644 index a5f895fb0..000000000 --- a/app/(docs)/layout.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import type { ReactNode } from 'react'; -import { baseOptions } from '@/app/layout.config'; -import { DocsLayout } from '@/components/layouts/docs'; -import { source } from '@/lib/source'; - -export default function Layout({ children }: { children: ReactNode }) { - return ( - - {children} - - ); -} diff --git a/app/(docs)/not-found.tsx b/app/(docs)/not-found.tsx deleted file mode 100644 index 8be677752..000000000 --- a/app/(docs)/not-found.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import Link from 'next/link'; - -export default function DocsNotFound() { - return ( - <> -