Skip to content

Commit

Permalink
api format (#1972)
Browse files Browse the repository at this point in the history
* formatting

* nit

* nit
  • Loading branch information
meaghanfitzgerald authored Dec 17, 2024
1 parent 4e2c9be commit 65ec0bc
Show file tree
Hide file tree
Showing 10 changed files with 154 additions and 107 deletions.
216 changes: 136 additions & 80 deletions app/(home)/page.tsx

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion content/docs/api-reference/c-chain/api.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Contract Chain API
title: C-Chain API
description: "This page is an overview of the C-Chain API associated with AvalancheGo.",
---

<Callout title="Note">
Expand Down
10 changes: 3 additions & 7 deletions content/docs/api-reference/c-chain/meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"title": "Contract Chain",
"pages": [
"api",
"txn-format",
"configs"
]
}
"title": "C-Chain",
"pages": ["api", "txn-format", "configs"]
}
3 changes: 2 additions & 1 deletion content/docs/api-reference/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ description: Comprehensive reference documentation for Avalanche APIs.
---

<Cards>
<Card title="P-Chain APIs" description="Core APIs for the Platform chain." href="/api-reference/p-chain/api" />
<Card title="P-Chain API" description="API methods for the Platform Chain (P-Chain)." href="/api-reference/p-chain/api" />
<Card title="C-Chain API" description="API methods for the Contract Chain (C-Chain)." href="/api-reference/c-chain/api" />
<Card title="X-Chain API" description="API methods for the Exchange Chain (X-Chain)." href="/api-reference/x-chain/api" />
<Card title="Subnet-EVM APIs" description="APIs specific to Subnet-EVM functionality." href="/api-reference/subnet-evm-api" />
<Card title="Node Configs & Flags" description="AvalancheGo node configurations and command flags." href="/api-reference/avalanche-go-configs-flags" />
</Cards>
10 changes: 3 additions & 7 deletions content/docs/api-reference/p-chain/meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"title": "Platform Chain",
"pages": [
"api",
"txn-format",
"configs"
]
}
"title": "P-Chain",
"pages": ["api", "txn-format", "configs"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Avalanche does not rely on any centralized third-parties, and in particular, it

### TLS Addresses

To avoid posting the full TLS certificate to the Platform chain, the certificate is first hashed. For consistency, Avalanche employs the same hashing mechanism for the TLS certificates as is used in Bitcoin. Namely, the DER representation of the certificate is hashed with sha256, and the result is then hashed with ripemd160 to yield a 20-byte identifier for stakers.
To avoid posting the full TLS certificate to the P-Chain, the certificate is first hashed. For consistency, Avalanche employs the same hashing mechanism for the TLS certificates as is used in Bitcoin. Namely, the DER representation of the certificate is hashed with sha256, and the result is then hashed with ripemd160 to yield a 20-byte identifier for stakers.

This 20-byte identifier is represented by "NodeID-" followed by the data's [CB58](https://support.avalabs.org/en/articles/4587395-what-is-cb58) encoded string.

Expand Down
3 changes: 2 additions & 1 deletion content/docs/api-reference/x-chain/api.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: API
title: X-Chain API
description: "This page is an overview of the X-Chain API associated with AvalancheGo.",
---

<Callout title="Tip" icon = {<BadgeCheck className="size-5 text-card" fill="green" />} >
Expand Down
10 changes: 3 additions & 7 deletions content/docs/api-reference/x-chain/meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"title": "Exchange Chain",
"pages": [
"api",
"txn-format",
"configs"
]
}
"title": "X-Chain",
"pages": ["api", "txn-format", "configs"]
}
2 changes: 1 addition & 1 deletion content/docs/protocol/primary-network.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Avalanche is a heterogeneous network of blockchains. As opposed to homogeneous n

The Primary Network is a special [Avalanche L1](/learn/avalanche-l1s) that runs three blockchains:

- The Contract Chain [(C-Chain)](/learn/primary-network#c-chain)
- The Platform Chain [(P-Chain)](/learn/primary-network#p-chain)
- The Contract Chain [(C-Chain)](/learn/primary-network#c-chain)
- The Exchange Chain [(X-Chain)](/learn/primary-network#x-chain)

<Callout title="Note">
Expand Down
2 changes: 1 addition & 1 deletion utils/remote-content.mts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ async function main(): Promise<void> {
{
sourceUrl: "https://raw.githubusercontent.com/ava-labs/avalanchego/master/vms/platformvm/service.md",
outputPath: "content/docs/api-reference/p-chain/api.mdx",
title: "API",
title: "P-Chain API",
description: "This page is an overview of the P-Chain API associated with AvalancheGo.",
contentUrl: "https://github.com/ava-labs/avalanchego/blob/master/vms/platformvm/",
},
Expand Down

0 comments on commit 65ec0bc

Please sign in to comment.