Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/rpc endpoints #783

Merged
merged 12 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/(docs)/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default function Page({ params }: { params: Param }): JSX.Element {
hacks: "Hiro Hacks",
"clarinet-js-sdk": "Clarinet JS SDK",
"platform-api": "Platform API",
"rpc-api": "Stacks Node RPC",
};

if (page.file?.name === "index" && page.slugs[1]) {
Expand All @@ -51,11 +52,16 @@ export default function Page({ params }: { params: Param }): JSX.Element {
prefix = "Token Metadata API";
}

if (page.slugs[1].toLowerCase() === "rpc-api") {
prefix = "Stacks Node RPC API";
}

return prefix;
} else if (["overview", "index"].includes(page.file?.name)) {
const pathSegments = page.file.dirname.split("/");
if (pathSegments.length >= 2) {
const relevantSegments = pathSegments.slice(-2); // Get the last two segments

return relevantSegments
.map(
(segment: string) =>
Expand Down
169 changes: 0 additions & 169 deletions content/docs/stacks/api/fees/estimate.mdx

This file was deleted.

18 changes: 9 additions & 9 deletions content/docs/stacks/api/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Overview
description: Query the Stacks blockchain, interact with smart contracts, and broadcast transactions with the Stacks Blockchain API, all via a familiar REST interface.
description: Query the Stacks blockchain with the Stacks Blockchain API.
toc: false
---

Expand All @@ -11,7 +11,7 @@ The Stacks Blockchain API expands the intentionally minimal RPC endpoints availa
## Popular endpoints

<Callout title="RPC endpoints" type="info">
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.
If you're looking for direct access to the Stacks node, including the ability to broadcast transactions and interact with smart contracts, check out our [Stacks Node RPC](/stacks/rpc-api) documentation.
</Callout>

<Cards>
Expand All @@ -21,21 +21,21 @@ Use our `/v2` route to access the Stacks API node endpoints. For more informatio
description="Retrieve data about transactions on Stacks."
/>
<SecondaryCard
href="/stacks/api/smart-contracts/read-only"
title="Call smart contracts"
description="Call a read-only public function on a smart contract."
href="/stacks/api/smart-contracts/events"
title="Get contract events"
description="Retrieves a list of events that have been triggered by a given smart contract."
/>
<SecondaryCard
href="/stacks/api/accounts/info"
title="Retrieve user information"
description="Get information about a user, their account balance, transaction history, and more."
href="/stacks/api/blocks/get-block"
title="Get data from a block"
description="Retrieves a block by its height or hash."
/>

</Cards>

## Related tools

- **[Hiro Archive](/stacks/archive)**: Bootstrap your own instance of the Stacks Blockchain API with the Hiro Archive and save days of setup time.
- **[Stacks Node RPC](/stacks/rpc-api)**: Fetch data and broadcast transactions from the Stacks Node RPC API.
- **[Token Metadata API](/stacks/token-metadata-api)**: Fetch fungible and non-fungible token data on the Stacks blockchain.
- **[Stacks Explorer](https://explorer.hiro.so)**: Looking for a front end to verify activity on the Stacks blockchain? Try the Stacks Explorer.

Expand Down
124 changes: 0 additions & 124 deletions content/docs/stacks/api/info/pox-details.mdx

This file was deleted.

1 change: 1 addition & 0 deletions content/docs/stacks/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"api",
"token-metadata-api",
"platform-api",
"rpc-api",
"api-keys",
"rate-limiting",
"------",
Expand Down
6 changes: 6 additions & 0 deletions content/docs/stacks/rpc-api/accounts/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Accounts
index: true
toc: false
description: Get account information.
---
Loading
Loading