diff --git a/src/includes/different_apis.md b/src/includes/different_apis.md new file mode 100644 index 00000000..7739505b --- /dev/null +++ b/src/includes/different_apis.md @@ -0,0 +1,5 @@ +### Difference between Blockchain API and Stacks Node RPC API + +The [Stacks 2.0 Blockchain API](/references/stacks-blockchain) is a centrally-hosted API that is accessible via the internet and enables interactions with the publicly-viewable state of the Stacks 2.0 blockchain, including transaction, account, and smart contract data. + +The [Node RPC API](/references/stacks-rpc-api) is locally-hosted and runs on Stacks 2.0 Blockchain nodes, providing similar functionality but in a way that is scoped to that specific node, giving access to raw transaction data as the node sees it. diff --git a/src/pages/references/stacks-blockchain.md b/src/pages/references/stacks-blockchain.md index 22b22e0d..0cf13477 100644 --- a/src/pages/references/stacks-blockchain.md +++ b/src/pages/references/stacks-blockchain.md @@ -3,8 +3,14 @@ title: Stacks Blockchain API description: Interacting with the Stacks 2.0 Blockchain via API --- -The Stacks Blockchain API was built to maintain pageable materialized views of the Stacks 2.0 Blockchain. It is a server that exposes a RESTful JSON API, hosted by PBC. It introduces aidditonal functionality (e.g. get all transactions), as well as proxies calls directly to Stacks Node. [You can find the OpenAPI specification and documentation here](https://blockstack.github.io/stacks-blockchain-api/). +## Introduction + +The Stacks 2.0 Blockchain API was built to maintain pageable materialized views of the Stacks 2.0 Blockchain. It is a server that exposes a RESTful JSON API, hosted by PBC. It introduces aidditonal functionality (e.g. get all transactions), as well as proxies calls directly to Stacks Node. [You can find the OpenAPI specification and documentation here](https://blockstack.github.io/stacks-blockchain-api/). ~> Note: Using this API requires you to trust the server, but provides a faster onboarding experience. It also addresses performance issues for which querying a node itself would be too slow or difficult +@include "different_apis.md" + +## Legacy API + -> If you are looking for the Stacks 1.0 RPC endpoint references, please follow [this link](https://core.blockstack.org/). diff --git a/src/pages/references/stacks-rpc-api.md b/src/pages/references/stacks-rpc-api.md index 2a537877..7a949913 100644 --- a/src/pages/references/stacks-rpc-api.md +++ b/src/pages/references/stacks-rpc-api.md @@ -7,6 +7,8 @@ description: Every running Stacks node exposes an RPC API, which allows you to i Every running Stacks node exposes an RPC API, which allows you to interact with the underlying blockchain. +@include "different_apis.md" + ### POST /v2/transactions This endpoint is for posting _raw_ transaction data to the node's mempool.