Browse Source

feat: add info about api client lib

feat/emotion-core-ui
Alexander Graebe 5 years ago
committed by Alexander Graebe
parent
commit
b40540a894
  1. 4
      src/includes/different_apis.md
  2. 6
      src/pages/references/stacks-blockchain.md

4
src/includes/different_apis.md

@ -1,5 +1,5 @@
### Difference between Blockchain API and Stacks Node RPC API
## 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 Stacks 2.0 Blockchain API 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.

6
src/pages/references/stacks-blockchain.md

@ -5,10 +5,14 @@ description: Interacting with the Stacks 2.0 Blockchain via 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/).
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 and WebSockets, 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
## Client library
A generated JS Client is available for consumption of this API. The client library enables typesafe REST and WebSocket communication. [Please review the client documentation for more details](https://blockstack.github.io/stacks-blockchain-api/client/index.html).
@include "different_apis.md"
## Legacy API

Loading…
Cancel
Save