diff --git a/fern/api-reference/abstract/abstract-api-quickstart.mdx b/fern/api-reference/abstract/abstract-api-quickstart.mdx
index 35e386db8..38304a3a3 100644
--- a/fern/api-reference/abstract/abstract-api-quickstart.mdx
+++ b/fern/api-reference/abstract/abstract-api-quickstart.mdx
@@ -1,101 +1,98 @@
---
title: Abstract API Quickstart
-description: Get started building on Abstract and using the JSON-RPC API
-subtitle: Get started building on Abstract and using the JSON-RPC API
+description: How to get started building on Abstract using Alchemy
+subtitle: How to get started building on Abstract using Alchemy
slug: reference/abstract-api-quickstart
---
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Abstract is a Layer 2 (L2) network built on top of Ethereum, designed to securely power consumer-facing blockchain applications at scale with low fees and fast transaction speeds.
-## What is the Abstract API?
-
The Abstract API allows interaction with the Abstract network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+## Send Your First Request on Alchemy
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Abstract client connected to Alchemy and fetch the latest block number!
-### 2. Set Up Your Project
+
+ ```text npm
+ npm install --save viem
+ ```
-Open your terminal and execute the following commands to create and initialize your project:
+ ```text yarn
+ yarn add viem
+ ```
+
-```shell
-mkdir abstract-api-quickstart
-cd abstract-api-quickstart
-npm init --yes
-```
+## Create Client Connected to Alchemy
-```shell
-mkdir abstract-api-quickstart
-cd abstract-api-quickstart
-yarn init --yes
+
+```js
+import { createPublicClient, http } from "viem";
+import { abstract } from "viem/chains";
+
+const client = createPublicClient({
+ chain: abstract,
+ transport: http("https://abstract-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
```
+
-This creates a new directory named `abstract-api-quickstart` and initializes a Node.js project within it.
-
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://abstract-mainnet.g.alchemy.com/v2/${your-api-key}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Abstract mainnet:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Abstract's mainnet outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Latest Block: 0x...
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Abstract APIs
-Congratulations! You've made your first request to the Abstract network. You can now explore the various [JSON-RPC methods available on Abstract](/reference/abstract-api-endpoints) and start building your dApps on this innovative platform.
+For the full list of Abstract APIs, see the [Abstract API Endpoints](/docs/chains#abstract-apis).
diff --git a/fern/api-reference/adi/adi-api-faq.mdx b/fern/api-reference/adi/adi-api-faq.mdx
index 5280005d8..3f90a29fd 100644
--- a/fern/api-reference/adi/adi-api-faq.mdx
+++ b/fern/api-reference/adi/adi-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, ADI is EVM compatible.
ADI uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the ADI network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on ADI?
-ADI supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the ADI API endpoints documentation for a complete list.
+ADI supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [ADI API Endpoints](/docs/chains#adi-apis) for a complete list.
## What is an ADI API key?
When accessing the ADI network via a node provider like Alchemy, ADI developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/adi/adi-api-quickstart.mdx b/fern/api-reference/adi/adi-api-quickstart.mdx
index 27b838bc1..b9d168cb2 100644
--- a/fern/api-reference/adi/adi-api-quickstart.mdx
+++ b/fern/api-reference/adi/adi-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: ADI API Quickstart
-description: How to get started building on ADI and using the JSON-RPC API
-subtitle: How to get started building on ADI and using the JSON-RPC API
+description: How to get started building on ADI using Alchemy
+subtitle: How to get started building on ADI using Alchemy
slug: reference/adi-api-quickstart
---
-*To use the ADI API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
ADI Network is an EVM-compatible Layer 2 that leverages cryptographic Zero-Knowledge validity proofs (ZKPs) to ensure both security and efficiency in transaction processing. ADI is enabling seamless integration between traditional finance, crypto ecosystems, and regulated markets.
-## What is the ADI API?
-
The ADI API allows interaction with the ADI network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an ADI client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir adi-api-quickstart
- cd adi-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir adi-api-quickstart
- cd adi-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const adiTestnet = defineChain({
+ id: 12227332,
+ name: "ADI Testnet",
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://adi-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: adiTestnet,
+ transport: http("https://adi-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `adi-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://adi-testnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the ADI network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from ADI's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# ADI APIs
-Congratulations! You've made your first request to the ADI network. You can now explore the various JSON-RPC methods available on ADI and start building your dApps on this innovative platform.
+For the full list of ADI APIs, see the [ADI API Endpoints](/docs/chains#adi-apis).
diff --git a/fern/api-reference/anime/anime-api-faq.mdx b/fern/api-reference/anime/anime-api-faq.mdx
index 1afecc368..0fa101a90 100644
--- a/fern/api-reference/anime/anime-api-faq.mdx
+++ b/fern/api-reference/anime/anime-api-faq.mdx
@@ -48,7 +48,7 @@ Developers should use the **Anime Sepolia** testnet for Anime. This testnet prov
## What methods does Alchemy support for the Anime API?
-You can find the list of all the methods Alchemy support for the Anime API on Anime API Endpoints page.
+You can find the list of all the methods Alchemy supports for the Anime API on the [Anime API Endpoints](/docs/chains#anime-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/anime/anime-api-quickstart.mdx b/fern/api-reference/anime/anime-api-quickstart.mdx
index c3dd20f6a..517502c2a 100644
--- a/fern/api-reference/anime/anime-api-quickstart.mdx
+++ b/fern/api-reference/anime/anime-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: Anime API Quickstart
-description: How to get started building on Anime and using the JSON-RPC API
-subtitle: How to get started building on Anime and using the JSON-RPC API
+description: How to get started building on Anime using Alchemy
+subtitle: How to get started building on Anime using Alchemy
slug: reference/anime-api-quickstart
---
-*To use the Anime API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Animechain is a fast and secure blockchain built on Arbitrum, designed to support anime content and digital assets.
-## What is the Anime API?
-
The Anime API allows interaction with the Anime network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Anime client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir anime-api-quickstart
- cd anime-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir anime-api-quickstart
- cd anime-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const anime = defineChain({
+ id: 69000,
+ name: "Anime",
+ nativeCurrency: { name: "Anime", symbol: "ANIME", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://anime-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: anime,
+ transport: http("https://anime-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `anime-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://anime-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ANIME):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Anime network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Anime's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Anime APIs
-Congratulations! You've made your first request to the Anime network. You can now explore the various JSON-RPC methods available on Anime and start building your dApps on this innovative platform.
+For the full list of Anime APIs, see the [Anime API Endpoints](/docs/chains#anime-apis).
diff --git a/fern/api-reference/apechain/apechain-api-quickstart.mdx b/fern/api-reference/apechain/apechain-api-quickstart.mdx
index 7343e9775..64684d195 100644
--- a/fern/api-reference/apechain/apechain-api-quickstart.mdx
+++ b/fern/api-reference/apechain/apechain-api-quickstart.mdx
@@ -1,101 +1,98 @@
---
title: ApeChain API Quickstart
-description: Get started building on ApeChain and using the JSON-RPC API
-subtitle: Get started building on ApeChain and using the JSON-RPC API
+description: How to get started building on ApeChain using Alchemy
+subtitle: How to get started building on ApeChain using Alchemy
slug: reference/apechain-api-quickstart
---
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
ApeChain is a dedicated infrastructure layer designed to power the ApeCoin ecosystem. It's an Arbitrum chain that utilizes `$APE` as its native gas token, significantly enhancing `$APE`'s utility and fostering a robust, dynamic economy. ApeChain focuses on ecosystem discovery, unique web3 rails, and top-of-funnel exposure to provide developers and users with the best possible blockchain experience.
-## What is the ApeChain API?
-
The ApeChain API allows interaction with the ApeChain network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+## Send Your First Request on Alchemy
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an ApeChain client connected to Alchemy and fetch the latest block number!
-### 2. Set Up Your Project
+
+ ```text npm
+ npm install --save viem
+ ```
-Open your terminal and execute the following commands to create and initialize your project:
+ ```text yarn
+ yarn add viem
+ ```
+
-```shell
-mkdir apechain-api-quickstart
-cd apechain-api-quickstart
-npm init --yes
-```
+## Create Client Connected to Alchemy
-```shell
-mkdir apechain-api-quickstart
-cd apechain-api-quickstart
-yarn init --yes
+
+```js
+import { createPublicClient, http } from "viem";
+import { apeChain } from "viem/chains";
+
+const client = createPublicClient({
+ chain: apeChain,
+ transport: http("https://apechain-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
```
+
-This creates a new directory named `apechain-api-quickstart` and initializes a Node.js project within it.
-
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```jsx jsx
- const axios = require('axios');
-
- const url = '';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (APE):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the ApeChain mainnet:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from ApeChain's mainnet outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Latest Block: 0x...
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# ApeChain APIs
-Congratulations! You've made your first request to the ApeChain API on the mainnet. You can now explore the various [JSON-RPC methods available on ApeChain](/reference/apechain-api-endpoints) and start building your dApps on this innovative platform designed for the ApeCoin ecosystem.
+For the full list of ApeChain APIs, see the [ApeChain API Endpoints](/docs/chains#apechain-apis).
diff --git a/fern/api-reference/arbitrum-nova/arbitrum-nova-api-quickstart.mdx b/fern/api-reference/arbitrum-nova/arbitrum-nova-api-quickstart.mdx
index d4c4d2e8c..dd01698f3 100644
--- a/fern/api-reference/arbitrum-nova/arbitrum-nova-api-quickstart.mdx
+++ b/fern/api-reference/arbitrum-nova/arbitrum-nova-api-quickstart.mdx
@@ -1,109 +1,98 @@
---
title: Arbitrum Nova Chain API Quickstart
-description: Get started building on Arbitrum Nova and using the JSON-RPC API
-subtitle: Get started building on Arbitrum Nova and using the JSON-RPC API
+description: How to get started building on Arbitrum Nova using Alchemy
+subtitle: How to get started building on Arbitrum Nova using Alchemy
slug: reference/arbitrum-nova-api-quickstart
---
-# Arbitrum Nova Quickstart
-
-*To use the Arbitrum Nova API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first.
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Arbitrum Nova is a layer 2 scaling solution for Ethereum that leverages optimistic rollups to provide fast and low-cost transactions. Designed to support the needs of decentralized applications (dApps), Arbitrum Nova enhances the scalability and efficiency of Ethereum-based applications.
-***
-
-## What is the Arbitrum Nova API?
-
The Arbitrum Nova API facilitates interaction with the Arbitrum Nova network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Arbitrum Nova both intuitive and straightforward.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
+## Send Your First Request on Alchemy
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
-
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Arbitrum Nova client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir arbitrum-nova-api-quickstart
- cd arbitrum-nova-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir arbitrum-nova-api-quickstart
- cd arbitrum-nova-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `arbitrum-nova-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { arbitrumNova } from "viem/chains";
+
+const client = createPublicClient({
+ chain: arbitrumNova,
+ transport: http("https://arbnova-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the Arbitrum Nova network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://arbnova-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the Arbitrum Nova Chain, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on Arbitrum Nova Chain (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Block Number: 0x6d68e
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Arbitrum Nova APIs
-Well done! You've just made your first request to the Arbitrum Nova API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on Arbitrum Nova Chain](/reference/arbitrum-nova-chain-api-endpoints) and start building your dApps on it!
+For the full list of Arbitrum Nova APIs, see the [Arbitrum Nova API Endpoints](/docs/chains#arbitrum-nova-apis).
diff --git a/fern/api-reference/arbitrum-nova/arbitrum-nova-chain-api-faq.mdx b/fern/api-reference/arbitrum-nova/arbitrum-nova-chain-api-faq.mdx
index 099bc0f99..2367b8fce 100644
--- a/fern/api-reference/arbitrum-nova/arbitrum-nova-chain-api-faq.mdx
+++ b/fern/api-reference/arbitrum-nova/arbitrum-nova-chain-api-faq.mdx
@@ -45,7 +45,7 @@ Arbitrum Nova uses ETH, Ethereum's native cryptocurrency, for transaction fees,
## What methods does Alchemy support for the Arbitrum Nova API?
-You can find the list of all the methods Alchemy supports for the Arbitrum Nova API on [Arbitrum Nova API Endpoints](/reference/arbitrum-nova-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Arbitrum Nova API on the [Arbitrum Nova API Endpoints](/docs/chains#arbitrum-nova-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/arbitrum/arbitrum-api-faq/arbitrum-api-faq.mdx b/fern/api-reference/arbitrum/arbitrum-api-faq/arbitrum-api-faq.mdx
index 4a45a8937..41766260d 100644
--- a/fern/api-reference/arbitrum/arbitrum-api-faq/arbitrum-api-faq.mdx
+++ b/fern/api-reference/arbitrum/arbitrum-api-faq/arbitrum-api-faq.mdx
@@ -90,7 +90,7 @@ Many programming languages work with Arbitrum, including Solidity, Vyper, and Fl
## What methods does Alchemy support for the Arbitrum API?
-You can find the list of all the methods Alchemy support for the Arbitrum API on the [Arbitrum API Endpoints](/reference/arbitrum-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Arbitrum API on the [Arbitrum API Endpoints](/docs/chains#arbitrum-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/arbitrum/arbitrum-api-quickstart.mdx b/fern/api-reference/arbitrum/arbitrum-api-quickstart.mdx
index e4bae2cca..3c0cc9e65 100644
--- a/fern/api-reference/arbitrum/arbitrum-api-quickstart.mdx
+++ b/fern/api-reference/arbitrum/arbitrum-api-quickstart.mdx
@@ -1,124 +1,98 @@
---
title: Arbitrum API Quickstart
-description: How to get started building on Arbitrum and use the JSON-RPC API
-subtitle: How to get started building on Arbitrum and use the JSON-RPC API
+description: How to get started building on Arbitrum using Alchemy
+subtitle: How to get started building on Arbitrum using Alchemy
slug: reference/arbitrum-api-quickstart
---
-
- Sign up to start building on Arbitrum. [Get started for free](https://dashboard.alchemy.com/signup)
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
-# Getting Started Instructions
+Arbitrum is a Layer 2 scaling solution for Ethereum that leverages optimistic rollups to provide fast and low-cost transactions. Designed to support the needs of decentralized applications (dApps), Arbitrum enhances the scalability and efficiency of Ethereum-based applications while maintaining full EVM compatibility.
-## 1. Choose a package manager (npm or yarn)
+The Arbitrum API facilitates interaction with the Arbitrum network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Arbitrum both intuitive and straightforward.
-For this guide, we will be using npm or yarn as our package manager to install Viem or Ethers.js.
+## Send Your First Request on Alchemy
-### npm
-
-To get started with `npm`, follow the documentation to install Node.js and `npm` for your operating system: [https://docs.npmjs.com/downloading-and-installing-node-js-and-npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
-
-### yarn
-
-To get started with `yarn`, follow these steps: [https://classic.yarnpkg.com/lang/en/docs/install](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable)
-
-## 2. Set up your project (npm or yarn)
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Arbitrum client connected to Alchemy and fetch the latest block number!
- ```text Shell (npm)
- mkdir alchemy-arbitrum-api
- cd alchemy-arbitrum-api
- npm init --yes
+ ```text npm
+ npm install --save viem
```
- ```text Shell (yarn)
- mkdir alchemy-arbitrum-api
- cd alchemy-arbitrum-api
- yarn init --yes
+ ```text yarn
+ yarn add viem
```
-## 3. Install Web3 Library
-
-Run the following command to install Viem or Ethers.js with npm or yarn.
+## Create Client Connected to Alchemy
- ```text Viem (npm)
- npm install viem
- ```
-
- ```text Viem (yarn)
- yarn add viem
- ```
-
- ```text Ethers.js (npm)
- npm install ethers
- ```
-
- ```text Ethers.js (yarn)
- yarn add ethers
- ```
+```js
+import { createPublicClient, http } from "viem";
+import { arbitrum } from "viem/chains";
+
+const client = createPublicClient({
+ chain: arbitrum,
+ transport: http("https://arb-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-## 4. Make your first request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-You are all set now to use Arbitrum API and make your first request. For instance, lets make a request to `get latest block`. Create an `index.js` file and paste one of the following code snippets into the file.
+## Get Latest Block Number
- ```javascript Viem
- import { createPublicClient, http } from 'viem'
- import { arbitrum } from 'viem/chains'
-
- const client = createPublicClient({
- chain: arbitrum,
- transport: http('https://arb-mainnet.g.alchemy.com/v2/demo') // Replace 'demo' with your API Key
- })
-
- async function main() {
- const latestBlock = await client.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- import { JsonRpcProvider } from 'ethers'
-
- const provider = new JsonRpcProvider('https://arb-mainnet.g.alchemy.com/v2/demo') // Replace 'demo' with your API Key
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
+
- async function main() {
- const latestBlock = await provider.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
+## Get an Address Balance
- main()
- ```
+
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-## 5. Run script
-
-To run the above node script, use cmd `node index.js`, and you should see the output.
+## Read Block Data
- ```text shell
- The latest block number is 42421188n
- ```
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
-***
-
-# Arbitrum Tutorials
+## Fetch a Transaction by Hash
-You must not stop here! Want to build your first Dapp on Arbitrum and use Arbitrum APIs?
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
+
-Check out the following tutorials to learn how to build on Arbitrum:
+## Fetch Transaction Receipt
-* [Arbitrum SDK Examples](/reference/arbitrum-sdk-examples)
-* [Arbitrum API FAQ](/reference/arbitrum-api-faq)
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
+
-For full documentation on Web3 libraries, check out the official documentation:
+# Arbitrum APIs
-* [Viem Documentation](https://viem.sh) - Modern TypeScript interface for Ethereum
-* [Ethers.js Documentation](https://docs.ethers.org) - Complete Ethereum wallet implementation
+For the full list of Arbitrum APIs, see the [Arbitrum API Endpoints](/docs/chains#arbitrum-apis).
diff --git a/fern/api-reference/arbitrum/arbitrum-api-quickstart/arbitrum-sdk-examples.mdx b/fern/api-reference/arbitrum/arbitrum-api-quickstart/arbitrum-sdk-examples.mdx
deleted file mode 100644
index 1eb98f5f7..000000000
--- a/fern/api-reference/arbitrum/arbitrum-api-quickstart/arbitrum-sdk-examples.mdx
+++ /dev/null
@@ -1,479 +0,0 @@
----
-title: Arbitrum API Examples
-description: Real-world examples on how to query information from Arbitrum using modern Web3 libraries.
-subtitle: Real-world examples on how to query information from Arbitrum using modern Web3 libraries.
-slug: reference/arbitrum-sdk-examples
----
-
-If you're looking to start querying Arbitrum blockchain data, here's the place to start! We'll walk you through setting up Viem and Ethers.js with Alchemy and show you common use cases.
-
-# Getting Started with Arbitrum
-
-This guide assumes you already have an [Alchemy account](https://alchemy.com/?r=e68b2f77-7fc7-4ef7-8e9c-cdfea869b9b5) and access to our [Dashboard](https://dashboard.alchemyapi.io).
-
-## 1. Create an Alchemy Key
-
-To access Alchemy's free node infrastructure, you need an API key to authenticate your requests.
-
-You can [create API keys from the dashboard](http://dashboard.alchemyapi.io). Check out this video on how to create an app, replacing the chain "Ethereum" with "Arbitrum".
-
-Or follow the written steps below:
-
-First, navigate to the "create app" button in the "Apps" tab.
-
-
-
-Fill in the details under "Create App" to get your new key. You can also see apps you previously made and those made by your team here. Make sure to select the Arbitrum Stack.
-
-Pull existing keys by clicking on "View Key" for any app.
-
-
-
-You can also pull existing API keys by hovering over "Apps" and selecting one. You can "View Key" here, as well as "Edit App" to whitelist specific domains, see several developer tools, and view analytics.
-
-## 2. Install and set up Web3 libraries
-
-To get started with Arbitrum, you can use either Viem or Ethers.js. Create a project and install your preferred library:
-
-
- ```shell Viem
- mkdir your-project-name
- cd your-project-name
- npm init -y
- npm install viem
- ```
-
- ```shell Ethers.js
- mkdir your-project-name
- cd your-project-name
- npm init -y
- npm install ethers
- ```
-
-
-Next, create a file named `index.js` and add the following contents:
-
-
- Replace `demo` with your Alchemy API key from the dashboard.
-
-
-
- ```javascript Viem
- import { createPublicClient, http } from 'viem'
- import { arbitrum } from 'viem/chains'
-
- const client = createPublicClient({
- chain: arbitrum,
- transport: http('https://arb-mainnet.g.alchemy.com/v2/demo') // Replace 'demo' with your API key
- })
-
- async function main() {
- const latestBlock = await client.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- import { JsonRpcProvider } from 'ethers'
-
- const provider = new JsonRpcProvider('https://arb-mainnet.g.alchemy.com/v2/demo') // Replace 'demo' with your API key
-
- async function main() {
- const latestBlock = await provider.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
-
- main()
- ```
-
-
-Unfamiliar with the async stuff? Check out this [Medium post](https://betterprogramming.pub/understanding-async-await-in-javascript-1d81bb079b2c).
-
-## 3. Run your dApp using Node
-
-
- ```shell shell
- node index.js
- ```
-
-
-You should now see the latest block number output in your console!
-
-
- ```shell shell
- The latest block number is 11043912
- ```
-
-
-Below, we'll list a number of examples on how to make common requests on Arbitrum or EVM blockchains.
-
-# [How to Get the Latest Block Number on Arbitrum](/reference/eth-blocknumber-arbitrum)
-
-If you're looking for the latest block on Arbitrum, you can use the following:
-
-
- ```javascript Viem
- async function main() {
- const latestBlock = await client.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const latestBlock = await provider.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
-
- main()
- ```
-
-
-# [How to Get a Block By Its Block Hash on Arbitrum](/reference/eth-getblockbyhash-arbitrum)
-
-Every block on Arbitrum corresponds to a specific hash. If you'd like to look up a block by its hash, you can use the following code:
-
-
- ```javascript Viem
- async function main() {
- const block = await client.getBlock({
- blockHash: '0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3'
- })
- console.log(block)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const block = await provider.getBlock(
- '0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3'
- )
- console.log(block)
- }
-
- main()
- ```
-
-
-# [How to Get a Block By Its Block Number on Arbitrum](/reference/eth-getblockbynumber-arbitrum)
-
-Every block on Arbitrum corresponds to a specific number. If you'd like to look up a block by its number, you can use the following code:
-
-
- ```javascript Viem
- async function main() {
- const block = await client.getBlock({
- blockNumber: 15221026n
- })
- console.log(block)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const block = await provider.getBlock(15221026)
- console.log(block)
- }
-
- main()
- ```
-
-
-# [How to Get Logs for an Arbitrum Transaction](/reference/eth-getlogs-arbitrum)
-
-Logs are essentially a published list of user-defined events that have happened on the blockchain during an Arbitrum transaction. You can learn more about them in [Understanding Logs: Deep Dive into eth\_getLogs](/docs/deep-dive-into-eth_getlogs).
-
-Here's an example on how to write a getLogs query on Arbitrum:
-
-
- ```javascript Viem
- async function main() {
- const logs = await client.getLogs({
- address: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
- topics: [
- '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
- ],
- blockHash: '0x49664d1de6b3915d7e6fa297ff4b3d1c5328b8ecf2ff0eefb912a4dc5f6ad4a0',
- })
- console.log(logs)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const logs = await provider.getLogs({
- address: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
- topics: [
- '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
- ],
- blockHash: '0x49664d1de6b3915d7e6fa297ff4b3d1c5328b8ecf2ff0eefb912a4dc5f6ad4a0',
- })
- console.log(logs)
- }
-
- main()
- ```
-
-
-# [How to Make an Eth\_Call on Arbitrum](/reference/eth-call-arbitrum)
-
-An eth\_call in Arbitrum is essentially a way to execute a message call immediately without creating a transaction on the blockchain. It can be used to query internal contract state, to execute validations coded into a contract or even to test what the effect of a transaction would be without running it live.
-
-Here's an example on how to write a call query on Arbitrum:
-
-
- ```javascript Viem
- async function main() {
- const result = await client.call({
- to: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
- gas: 0x76c0n,
- gasPrice: 0x9184e72a000n,
- data: '0x3b3b57debf074faa138b72c65adbdcfb329847e4f2c04bde7f7dd7fcad5a52d2f395a558',
- })
- console.log(result)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const result = await provider.call({
- to: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
- gasLimit: '0x76c0',
- gasPrice: '0x9184e72a000',
- data: '0x3b3b57debf074faa138b72c65adbdcfb329847e4f2c04bde7f7dd7fcad5a52d2f395a558',
- })
- console.log(result)
- }
-
- main()
- ```
-
-
-# [How to Get a Transaction by Its Hash on Arbitrum](/reference/eth-gettransactionbyhash-arbitrum)
-
-Every transaction on Arbitrum corresponds to a specific hash. If you'd like to look up a transaction by its hash, you can use the following code:
-
-
- ```javascript Viem
- async function main() {
- const tx = await client.getTransaction({
- hash: '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b'
- })
- console.log(tx)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const tx = await provider.getTransaction(
- '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b'
- )
- console.log(tx)
- }
-
- main()
- ```
-
-
-# [How to Get a Transaction Receipt on Arbitrum](/reference/eth-gettransactionreceipt-arbitrum)
-
-Every transaction on Arbitrum has an associated receipt with metadata about the transaction, such as the gas used and logs printed during the transaction. If you'd like to look up a transaction's receipt, you can use the following code:
-
-
- ```javascript Viem
- async function main() {
- const txReceipt = await client.getTransactionReceipt({
- hash: '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b'
- })
- console.log(txReceipt)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const txReceipt = await provider.getTransactionReceipt(
- '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b'
- )
- console.log(txReceipt)
- }
-
- main()
- ```
-
-
-# [How to get a User's Transaction Count on Arbitrum](/reference/eth-gettransactioncount-arbitrum)
-
-The number of transactions a user has sent is particularly important when it comes to calculating the [nonce for sending new transactions on Arbitrum](/docs/ethereum-transactions-pending-mined-dropped-replaced). Without it, you'll be unable to send new transactions because your nonce won't be set correctly.
-
-
- ```javascript Viem
- async function main() {
- const txCount = await client.getTransactionCount({
- address: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
- })
- console.log(txCount)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const txCount = await provider.getTransactionCount(
- '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
- )
- console.log(txCount)
- }
-
- main()
- ```
-
-
-# [How to Fetch Historical Transactions on Arbitrum](/reference/alchemy-getassettransfers)
-
-Oftentimes, you'll want to look up a set of transactions on Arbitrum between a set of blocks, corresponding to a set of token types such as ERC20 or ERC721, or with certain attributes. Alchemy's proprietary Transfers API allows you to do so in milliseconds, rather than searching every block on the blockchain.
-
-
- ```javascript Fetch
- async function main() {
- const response = await fetch('https://arb-mainnet.g.alchemy.com/v2/demo', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({
- jsonrpc: '2.0',
- id: 0,
- method: 'alchemy_getAssetTransfers',
- params: [{
- fromBlock: '0x0',
- toBlock: 'latest',
- contractAddresses: ['0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d'],
- excludeZeroValue: true,
- category: ['erc721'],
- }]
- })
- })
- const data = await response.json()
- console.log(data.result)
- }
-
- main()
- ```
-
-
-# [How to Subscribe to New Blocks on Arbitrum](/reference/subscription-api)
-
-If you'd like to open a WebSocket subscription to send you a JSON object whenever a new block is published to the blockchain, you can set one up using the following syntax.
-
-
- ```javascript Viem
- import { createPublicClient, webSocket } from 'viem'
- import { arbitrum } from 'viem/chains'
-
- const client = createPublicClient({
- chain: arbitrum,
- transport: webSocket('wss://arb-mainnet.g.alchemy.com/v2/demo')
- })
-
- // Subscription for new blocks on Arbitrum
- const unsubscribe = client.watchBlocks({
- onBlock: (block) => {
- console.log('The latest block number is', block.number)
- }
- })
- ```
-
- ```javascript Ethers.js
- import { WebSocketProvider } from 'ethers'
-
- const provider = new WebSocketProvider('wss://arb-mainnet.g.alchemy.com/v2/demo')
-
- // Subscription for new blocks on Arbitrum
- provider.on('block', (blockNumber) => {
- console.log('The latest block number is', blockNumber)
- })
- ```
-
-
-# [How to Estimate the Gas of a Transaction on Arbitrum](/reference/eth-estimategas-arbitrum)
-
-Oftentimes, you'll need to calculate how much gas a particular transaction will use on the blockchain to understand the maximum amount that you'll pay on that transaction. This example will return the gas used by the specified transaction:
-
-
- ```javascript Viem
- import { parseEther } from 'viem'
-
- async function main() {
- const gasEstimate = await client.estimateGas({
- // Wrapped ETH address (adjust for Arbitrum if needed)
- to: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
- // `function deposit() payable`
- data: '0xd0e30db0',
- // 1 ether
- value: parseEther('1.0'),
- })
- console.log(gasEstimate)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- import { parseEther } from 'ethers'
-
- async function main() {
- const gasEstimate = await provider.estimateGas({
- // Wrapped ETH address (adjust for Arbitrum if needed)
- to: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
- // `function deposit() payable`
- data: '0xd0e30db0',
- // 1 ether
- value: parseEther('1.0'),
- })
- console.log(gasEstimate)
- }
-
- main()
- ```
-
-
-# [How to Get the Current Gas Price in Arbitrum](/reference/eth-gasprice-arbitrum)
-
-You can retrieve the current gas price in wei using this method:
-
-
- ```javascript Viem
- async function main() {
- const gasPrice = await client.getGasPrice()
- console.log(gasPrice)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const gasPrice = await provider.getGasPrice()
- console.log(gasPrice)
- }
-
- main()
- ```
-
diff --git a/fern/api-reference/astar/astar-api-faq.mdx b/fern/api-reference/astar/astar-api-faq.mdx
index f18cd2cb6..5528abbcc 100644
--- a/fern/api-reference/astar/astar-api-faq.mdx
+++ b/fern/api-reference/astar/astar-api-faq.mdx
@@ -113,7 +113,7 @@ Since Astar is EVM-compatible, it is possible to use Solidity and Vyper to build
## What methods does Alchemy support for the Astar API?
-You can find the list of all the methods Alchemy support for the Astar API on the [Astar API Endpoints](/reference/astar-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Astar API on the [Astar API Endpoints](/docs/chains#astar-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/astar/astar-api-quickstart.mdx b/fern/api-reference/astar/astar-api-quickstart.mdx
index 405ae983a..507324924 100644
--- a/fern/api-reference/astar/astar-api-quickstart.mdx
+++ b/fern/api-reference/astar/astar-api-quickstart.mdx
@@ -1,118 +1,98 @@
---
title: Astar API Quickstart
-description: How to get started building on Astar and use the JSON-RPC API
-subtitle: How to get started building on Astar and use the JSON-RPC API
+description: How to get started building on Astar using Alchemy
+subtitle: How to get started building on Astar using Alchemy
slug: reference/astar-api-quickstart
---
-
- Sign up to start building on Astar. [Get started for free](https://dashboard.alchemy.com/signup)
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
-# Getting Started Instructions
+Astar Network is a multi-chain smart contract platform that supports both EVM and WebAssembly (Wasm) smart contracts. As a Polkadot parachain, Astar offers cross-chain interoperability and a scalable environment for building decentralized applications.
-## 1. Choose a package manager (npm or yarn)
+The Astar API allows interaction with the Astar network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-For this guide, we will be using npm or yarn as our package manager to install Viem or Ethers.js.
+## Send Your First Request on Alchemy
-### npm
-
-To get started with `npm`, follow the documentation to install Node.js and `npm` for your operating system: [https://docs.npmjs.com/downloading-and-installing-node-js-and-npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
-
-### yarn
-
-To get started with `yarn`, follow these steps: [https://classic.yarnpkg.com/lang/en/docs/install](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable)
-
-## 2. Set up your project (npm or yarn)
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Astar client connected to Alchemy and fetch the latest block number!
- ```text Shell (npm)
- mkdir alchemy-astar-api
- cd alchemy-astar-api
- npm init --yes
+ ```text npm
+ npm install --save viem
```
- ```text Shell (yarn)
- mkdir alchemy-astar-api
- cd alchemy-astar-api
- yarn init --yes
+ ```text yarn
+ yarn add viem
```
-## 3. Install Web3 Library
-
-Run the following command to install Viem or Ethers.js with npm or yarn.
+## Create Client Connected to Alchemy
- ```text Viem (npm)
- npm install viem
- ```
+```js
+import { createPublicClient, http } from "viem";
+import { astar } from "viem/chains";
+
+const client = createPublicClient({
+ chain: astar,
+ transport: http("https://astar-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
- ```text Viem (yarn)
- yarn add viem
- ```
+Now that you've created a client connected to Alchemy, you can continue with some basics:
- ```text Ethers.js (npm)
- npm install ethers
- ```
+## Get Latest Block Number
- ```text Ethers.js (yarn)
- yarn add ethers
- ```
+
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-## 4. Make your first request
-
-You are all set now to use Astar API and make your first request. For instance, lets make a request to `get latest block`. Create an `index.js` file and paste the following code snippet into the file.
+## Get an Address Balance
- ```javascript index.js
- import { createPublicClient, http } from 'viem'
- // Note: Astar chain config may need custom setup
- import { mainnet } from 'viem/chains'
-
- const client = createPublicClient({
- chain: {
- ...mainnet,
- id: 592, // Astar network ID
- name: 'Astar',
- rpcUrls: {
- default: { http: ['https://astar-mainnet.g.alchemy.com/v2/demo'] } // Replace 'demo' with your API Key
- }
- },
- transport: http('https://astar-mainnet.g.alchemy.com/v2/demo')
- })
-
- async function main() {
- const latestBlock = await client.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
-
- main()
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ASTR):", Number(balance) / 1e18);
+```
-## 5. Run script
-
-To run the above node script, use cmd `node index.js`, and you should see the output.
+## Read Block Data
- ```text shell
- The latest block number is 2404244
- ```
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
-***
-
-# Astar Tutorials
+## Fetch a Transaction by Hash
-You must not stop here! Want to build your first Dapp on Astar and use Astar APIs?
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
+
-Head towards Alchemy Tutorials.
+## Fetch Transaction Receipt
-[**View**: /docs](/docs)
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
+
-For full documentation on modern Web3 libraries:
+# Astar APIs
-* **Viem**: [https://viem.sh](https://viem.sh) - TypeScript Interface for Ethereum
-* **Ethers.js**: [https://docs.ethers.org](https://docs.ethers.org) - Complete Ethereum library
+For the full list of Astar APIs, see the [Astar API Endpoints](/docs/chains#astar-apis).
diff --git a/fern/api-reference/avalanche/avalanche-api-faq.mdx b/fern/api-reference/avalanche/avalanche-api-faq.mdx
index df38b565a..24224c2f7 100644
--- a/fern/api-reference/avalanche/avalanche-api-faq.mdx
+++ b/fern/api-reference/avalanche/avalanche-api-faq.mdx
@@ -45,7 +45,7 @@ Avalanche uses AVAX, its native cryptocurrency, for transaction fees, gas, and o
## What methods does Alchemy support for the Avalanche API?
-You can find the list of all the methods Alchemy supports for the Avalanche API on [Avalanche Chain API Endpoints](/reference/avalanche-chain-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Avalanche API on the [Avalanche API Endpoints](/docs/chains#avalanche-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/avalanche/avalanche-api-quickstart.mdx b/fern/api-reference/avalanche/avalanche-api-quickstart.mdx
index 67e092ea4..90243eaff 100644
--- a/fern/api-reference/avalanche/avalanche-api-quickstart.mdx
+++ b/fern/api-reference/avalanche/avalanche-api-quickstart.mdx
@@ -1,107 +1,98 @@
---
title: Avalanche C-Chain API Quickstart
-description: Get started building on Avalanche Chain and using the JSON-RPC API
-subtitle: Get started building on Avalanche Chain and using the JSON-RPC API
+description: How to get started building on Avalanche using Alchemy
+subtitle: How to get started building on Avalanche using Alchemy
slug: reference/avalanche-api-quickstart
---
-*To use the Avalanche C-Chain API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Avalanche is an EVM-compatible blockchain known for its high throughput and low latency. Designed to support the needs of decentralized applications (dApps), Avalanche provides a scalable and efficient environment for deploying Ethereum-based applications with near-instant finality.
-***
-
-## What is the Avalanche C-Chain API?
-
The Avalanche C-Chain API facilitates interaction with the Avalanche network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Avalanche both intuitive and straightforward.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
-
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+## Send Your First Request on Alchemy
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Avalanche client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir avalanche-api-quickstart
- cd avalanche-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir avalanche-api-quickstart
- cd avalanche-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `avalanche-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { avalanche } from "viem/chains";
+
+const client = createPublicClient({
+ chain: avalanche,
+ transport: http("https://avax-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the Avalanche network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://avax-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (AVAX):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the Avalanche Chain, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on Avalanche Chain (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Block Number: 0x6d68e
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Avalanche APIs
-Well done! You've just made your first request to the Avalanche C-Chain API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on Avalanche Chain](/reference/avalanche-chain-api-endpoints) and start building your dApps on it!
+For the full list of Avalanche APIs, see the [Avalanche API Endpoints](/docs/chains#avalanche-apis).
diff --git a/fern/api-reference/base/base-api-faq.mdx b/fern/api-reference/base/base-api-faq.mdx
index e8ae011ca..447f08d3c 100644
--- a/fern/api-reference/base/base-api-faq.mdx
+++ b/fern/api-reference/base/base-api-faq.mdx
@@ -49,7 +49,7 @@ Developers should use the **Base Goerli** testnet for Base. This testnet provide
## What methods does Alchemy support for the Base API?
-You can find the list of all the methods Alchemy support for the Base API on [Base API Endpoints](/reference/base-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Base API on the [Base API Endpoints](/docs/chains#base-apis) page.
## How can I bridge assets between Ethereum and Base?
diff --git a/fern/api-reference/base/base-api-quickstart.mdx b/fern/api-reference/base/base-api-quickstart.mdx
index 7571ebfb7..952b20f5c 100644
--- a/fern/api-reference/base/base-api-quickstart.mdx
+++ b/fern/api-reference/base/base-api-quickstart.mdx
@@ -1,112 +1,98 @@
---
title: Base API Quickstart
-description: Get started building on Base and using the JSON-RPC API
-subtitle: Get started building on Base and using the JSON-RPC API
+description: How to get started building on Base using Alchemy
+subtitle: How to get started building on Base using Alchemy
slug: reference/base-api-quickstart
---
-*To use the Base API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
-## Introduction
-
-Base offers a secure, affordable, and developer-centric Ethereum L2 solution. Designed with the vision of making blockchain more accessible, Base emerges from Coinbase's incubation, with clear intentions to move towards increased decentralization in the future. Its goal is to establish an inclusive, global cryptoeconomy. Notably, Base is developed with Optimism, leveraging the MIT-licensed OP Stack. This collaboration higlights Base's commitment to open-source principles and being in sync with the developer community's needs and aspirations.
-
-***
-
-## What is Base API?
+Base offers a secure, affordable, and developer-centric Ethereum L2 solution. Designed with the vision of making blockchain more accessible, Base emerges from Coinbase's incubation, with clear intentions to move towards increased decentralization in the future. Its goal is to establish an inclusive, global cryptoeconomy. Notably, Base is developed with Optimism, leveraging the MIT-licensed OP Stack. This collaboration highlights Base's commitment to open-source principles and being in sync with the developer community's needs and aspirations.
The Base API is a collection of JSON-RPC methods that enable developers to interact with the Base network. Notably, it shares the same set of JSON-RPC methods as Optimism. For those already acquainted with [Optimism's API](/reference/optimism-api-endpoints), diving into Base will feel both familiar and effortless.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Before you begin, you'll need to choose a package manager to manage dependencies in your project. The two most popular package managers for Node.js are `npm` and `yarn`. You can choose the one you're most comfortable with.
+## Send Your First Request on Alchemy
-| npm | yarn |
-| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| To get started with `npm`, follow the [documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) to install Node.js and `npm` for your operating system. | To get started with `yarn`, follow [these steps](https://classic.yarnpkg.com/lang/en/docs/install). |
-
-### 2. Set up your project
-
-Let's start by setting up a simple Node.js project. Open your terminal and run the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Base client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir alchemy-base-api
- cd alchemy-base-api
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir alchemy-base-api
- cd alchemy-base-api
- yarn init --yes
+ yarn add viem
```
-This will create a new directory called `alchemy-base-api` and initialize a new Node.js project in it.
+## Create Client Connected to Alchemy
-## 3. Make Your First Request
+
+```js
+import { createPublicClient, http } from "viem";
+import { base } from "viem/chains";
+
+const client = createPublicClient({
+ chain: base,
+ transport: http("https://base-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-To make requests to the Base API, you'll need to use an HTTP client. In this guide, we'll use Axios, a popular HTTP client for Node.js. Install Axios as a dependency in your project with the command below:
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-
- ```shell npm
- npm install axios
- ```
+## Get Latest Block Number
- ```shell yarn
- yarn add axios
- ```
+
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, let's create a script that will make a request to the `eth_blockNumber` JSON-RPC method on Base. Create a new file called `index.js` in your project directory and add the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const apiKey = 'YOUR_API_KEY'; // Replace with your Alchemy API key
- const url = `https://base-mainnet.g.alchemy.com/v2/${apiKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `YOUR_API_KEY` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-## 4. Run Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To run the script and make request to the Base API, execute the following command in your terminal:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-As a result, should see the current block number on Base (in hex format) printed to the console:
+## Fetch Transaction Receipt
- ```shell shell
- Block Number: 0x6d68e
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Base APIs
-Congratulations! You've successfully made your first request to the Base API using Alchemy. From here, you can explore the various [JSON-RPC methods available on Base](/reference/base-api-endpoints) and start building your decentralized applications on it!
+For the full list of Base APIs, see the [Base API Endpoints](/docs/chains#base-apis).
diff --git a/fern/api-reference/berachain/berachain-api-faq.mdx b/fern/api-reference/berachain/berachain-api-faq.mdx
index 6968a631c..6f6412e38 100644
--- a/fern/api-reference/berachain/berachain-api-faq.mdx
+++ b/fern/api-reference/berachain/berachain-api-faq.mdx
@@ -45,7 +45,7 @@ Berachain uses BERA, its native cryptocurrency, for transaction fees, gas, and o
## What methods does Alchemy support for the Berachain API?
-You can find the list of all the methods Alchemy supports for the Berachain API on [Berachain API Endpoints](/reference/berachain-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Berachain API on the [Berachain API Endpoints](/docs/chains#berachain-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/berachain/berachain-api-quickstart.mdx b/fern/api-reference/berachain/berachain-api-quickstart.mdx
index 21cbc6fea..8bd1dbabe 100644
--- a/fern/api-reference/berachain/berachain-api-quickstart.mdx
+++ b/fern/api-reference/berachain/berachain-api-quickstart.mdx
@@ -1,107 +1,98 @@
---
title: Berachain API Quickstart
-description: Get started building on Berachain and using the JSON-RPC API
-subtitle: Get started building on Berachain and using the JSON-RPC API
+description: How to get started building on Berachain using Alchemy
+subtitle: How to get started building on Berachain using Alchemy
slug: reference/berachain-api-quickstart
---
-*To use the Berachain App API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Berachain is an EVM-compatible blockchain designed to provide high performance, scalability, and security for decentralized applications (dApps). Known for its innovative features and efficient transaction processing, Berachain offers a robust environment for deploying Ethereum-based applications.
-***
-
-## What is the Berachain App API?
-
-The Berachain App API facilitates interaction with the Berachain network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Berachain both intuitive and straightforward.
-
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
+The Berachain API facilitates interaction with the Berachain network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Berachain both intuitive and straightforward.
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+## Send Your First Request on Alchemy
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Berachain client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir berachain-api-quickstart
- cd berachain-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir berachain-api-quickstart
- cd berachain-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `berachain-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { berachainTestnetbArtio } from "viem/chains";
+
+const client = createPublicClient({
+ chain: berachainTestnetbArtio,
+ transport: http("https://berachain-bartio.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the Berachain network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://berachain-bartio.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (BERA):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the Berachain App, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on Berachain App (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Block Number: 0x6d68e
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Berachain APIs
-Well done! You've just made your first request to the Berachain App API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on Berachain App](/reference/berachain-api-endpoints) and start building your dApps on it!
+For the full list of Berachain APIs, see the [Berachain API Endpoints](/docs/chains#berachain-apis).
diff --git a/fern/api-reference/bitcoin/bitcoin-api-faq.mdx b/fern/api-reference/bitcoin/bitcoin-api-faq.mdx
index 54cfa2632..d4ef88128 100644
--- a/fern/api-reference/bitcoin/bitcoin-api-faq.mdx
+++ b/fern/api-reference/bitcoin/bitcoin-api-faq.mdx
@@ -42,7 +42,7 @@ Bitcoin transaction fees are paid in BTC. They are calculated per virtual byte (
## What methods does Alchemy support for the Bitcoin API?
-You can find a full list of supported JSON-RPC methods on the [Bitcoin API Endpoints](/node/bitcoin/bitcoin-api-endpoints) page.
+You can find a full list of supported JSON-RPC methods on the [Bitcoin API Endpoints](/docs/chains#bitcoin-apis) page.
## My question isn't listed here — where can I get help?
diff --git a/fern/api-reference/blast/blast-api-faq.mdx b/fern/api-reference/blast/blast-api-faq.mdx
index c089c6034..d81c7c014 100644
--- a/fern/api-reference/blast/blast-api-faq.mdx
+++ b/fern/api-reference/blast/blast-api-faq.mdx
@@ -45,7 +45,7 @@ Blast Chain uses BLAST, its native cryptocurrency, for transaction fees, gas, an
## What methods does Alchemy support for the Blast Chain API?
-You can find the list of all the methods Alchemy supports for the Blast Chain API on [Blast Chain API Endpoints](/reference/blast-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Blast Chain API on the [Blast API Endpoints](/docs/chains#blast-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/blast/blast-api-quickstart.mdx b/fern/api-reference/blast/blast-api-quickstart.mdx
index 5deba64b8..adea26a86 100644
--- a/fern/api-reference/blast/blast-api-quickstart.mdx
+++ b/fern/api-reference/blast/blast-api-quickstart.mdx
@@ -1,107 +1,98 @@
---
title: Blast Chain API Quickstart
-description: Get started building on Blast and using the JSON-RPC API
-subtitle: Get started building on Blast and using the JSON-RPC API
+description: How to get started building on Blast using Alchemy
+subtitle: How to get started building on Blast using Alchemy
slug: reference/blast-api-quickstart
---
-*To use the Blast Chain API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Blast is an EVM-compatible blockchain designed to provide high performance and scalability for decentralized applications (dApps). Known for its efficient and secure transaction processing, Blast offers a robust environment for deploying Ethereum-based applications.
-***
-
-## What is the Blast Chain API?
-
The Blast Chain API facilitates interaction with the Blast network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Blast both intuitive and straightforward.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
-
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+## Send Your First Request on Alchemy
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Blast client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir blast-api-quickstart
- cd blast-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir blast-api-quickstart
- cd blast-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `blast-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { blast } from "viem/chains";
+
+const client = createPublicClient({
+ chain: blast,
+ transport: http("https://blast-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the Blast network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://blast-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the Blast Chain, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on Blast Chain (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Block Number: 0x6d68e
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Blast APIs
-Well done! You've just made your first request to the Blast Chain API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on Blast Chain](/reference/blast-api-endpoints) and start building your dApps on it!
+For the full list of Blast APIs, see the [Blast API Endpoints](/docs/chains#blast-apis).
diff --git a/fern/api-reference/bnb-smart-chain/bnb-smart-chain-api-quickstart.mdx b/fern/api-reference/bnb-smart-chain/bnb-smart-chain-api-quickstart.mdx
index 0fe45010c..904630373 100644
--- a/fern/api-reference/bnb-smart-chain/bnb-smart-chain-api-quickstart.mdx
+++ b/fern/api-reference/bnb-smart-chain/bnb-smart-chain-api-quickstart.mdx
@@ -1,109 +1,98 @@
---
title: BNB Smart Chain Quickstart
-description: Get started building on BNB Smart Chain and using the JSON-RPC API
-subtitle: Get started building on BNB Smart Chain and using the JSON-RPC API
+description: How to get started building on BNB Smart Chain using Alchemy
+subtitle: How to get started building on BNB Smart Chain using Alchemy
slug: reference/bnb-smart-chain-api-quickstart
---
-*To use the BNB Smart Chain API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
The BNB Smart Chain (BSC) is a high-performance blockchain developed by Binance, designed to offer developers low transaction costs and fast execution times. It is Ethereum Virtual Machine (EVM) compatible which enables developers to deploy Ethereum-based applications seamlessly on it!
-***
-
-## What is the BNB Smart Chain API?
-
The BNB Smart Chain API facilitates interaction with the BSC network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with BSC both intuitive and straightforward.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
+## Send Your First Request on Alchemy
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
-
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a BNB Smart Chain client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir bsc-api-quickstart
- cd bsc-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir bsc-api-quickstart
- cd bsc-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `bsc-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
-### 3. Make Your First Request
+
+```js
+import { createPublicClient, http } from "viem";
+import { bsc } from "viem/chains";
+
+const client = createPublicClient({
+ chain: bsc,
+ transport: http("https://bnb-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+Now that you've created a client connected to Alchemy, you can continue with some basics:
+
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the BSC network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://bnb-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (BNB):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the BNB Smart Chain, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on BSC (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Block Number: 0x6d68e
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# BNB Smart Chain APIs
-Well done! You've just made your first request to the BNB Smart Chain API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on BSC](/reference/bnb-smart-chain-endpoints) and start building your dApps on it!
+For the full list of BNB Smart Chain APIs, see the [BNB Smart Chain API Endpoints](/docs/chains#bnb-smart-chain-apis).
diff --git a/fern/api-reference/bob/bob-api-faq.mdx b/fern/api-reference/bob/bob-api-faq.mdx
index 76f27540d..daf185730 100644
--- a/fern/api-reference/bob/bob-api-faq.mdx
+++ b/fern/api-reference/bob/bob-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Bob is EVM compatible.
Bob uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Bob network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Bob?
-Bob supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Bob API endpoints documentation for a complete list.
+BOB supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [BOB API Endpoints](/docs/chains#bob-apis) for a complete list.
## What is a Bob API key?
When accessing the Bob network via a node provider like Alchemy, Bob developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/bob/bob-api-quickstart.mdx b/fern/api-reference/bob/bob-api-quickstart.mdx
index 6b2b8c797..2ccdff056 100644
--- a/fern/api-reference/bob/bob-api-quickstart.mdx
+++ b/fern/api-reference/bob/bob-api-quickstart.mdx
@@ -1,117 +1,98 @@
---
-title: Bob API Quickstart
-description: How to get started building on Bob and using the JSON-RPC API
-subtitle: How to get started building on Bob and using the JSON-RPC API
+title: BOB API Quickstart
+description: How to get started building on BOB using Alchemy
+subtitle: How to get started building on BOB using Alchemy
slug: reference/bob-api-quickstart
---
-*To use the Bob API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
BOB (Build on Bitcoin) is a hybrid OP Stack Layer-2 that runs full-EVM apps while anchoring finality to Bitcoin and enabling trust-minimized BTC bridging for Bitcoin-native DeFi.
-## What is the Bob API?
-
-The Bob API allows interaction with the Bob network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-
-## Getting Started Instructions
+The BOB API allows interaction with the BOB network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a BOB client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir bob-api-quickstart
- cd bob-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir bob-api-quickstart
- cd bob-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http } from "viem";
+import { bob } from "viem/chains";
+
+const client = createPublicClient({
+ chain: bob,
+ transport: http("https://bob-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `bob-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://bob-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Bob network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Bob's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# BOB APIs
-Congratulations! You've made your first request to the Bob network. You can now explore the various JSON-RPC methods available on Bob and start building your dApps on this innovative platform.
+For the full list of BOB APIs, see the [BOB API Endpoints](/docs/chains#bob-apis).
diff --git a/fern/api-reference/botanix/botanix-api-faq.mdx b/fern/api-reference/botanix/botanix-api-faq.mdx
index 3997041eb..7ef07981e 100644
--- a/fern/api-reference/botanix/botanix-api-faq.mdx
+++ b/fern/api-reference/botanix/botanix-api-faq.mdx
@@ -45,7 +45,7 @@ The native currency of the Botanix blockchain is Bitcoin (BTC). Unlike other Lay
## What methods does Alchemy support for the Botanix API?
-You can find the list of all the methods Alchemy support for the Botanix API on Botanix API Endpoints page.
+You can find the list of all the methods Alchemy supports for the Botanix API on the [Botanix API Endpoints](/docs/chains#botanix-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/botanix/botanix-api-quickstart.mdx b/fern/api-reference/botanix/botanix-api-quickstart.mdx
index a5e9afc64..9d0e8ec6d 100644
--- a/fern/api-reference/botanix/botanix-api-quickstart.mdx
+++ b/fern/api-reference/botanix/botanix-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: Botanix API Quickstart
-description: How to get started building on Botanix and using the JSON-RPC API
-subtitle: How to get started building on Botanix and using the JSON-RPC API
+description: How to get started building on Botanix using Alchemy
+subtitle: How to get started building on Botanix using Alchemy
slug: reference/botanix-api-quickstart
---
-*To use the Botanix API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Botanix is a Bitcoin-native, EVM-compatible Layer 2 that makes it easy to build and run smart contracts using Bitcoin as the native asset.
-## What is the Botanix API?
-
The Botanix API allows interaction with the Botanix network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Botanix client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir botanix-api-quickstart
- cd botanix-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir botanix-api-quickstart
- cd botanix-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const botanix = defineChain({
+ id: 3636,
+ name: "Botanix",
+ nativeCurrency: { name: "Bitcoin", symbol: "BTC", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://botanix-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: botanix,
+ transport: http("https://botanix-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `botanix-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://botanix-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (BTC):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Botanix network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Botanix's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Botanix APIs
-Congratulations! You've made your first request to the Botanix network. You can now explore the various JSON-RPC methods available on Botanix and start building your dApps on this innovative platform.
+For the full list of Botanix APIs, see the [Botanix API Endpoints](/docs/chains#botanix-apis).
diff --git a/fern/api-reference/celo/celo-chain-api-faq.mdx b/fern/api-reference/celo/celo-chain-api-faq.mdx
index a732aabeb..d1e833694 100644
--- a/fern/api-reference/celo/celo-chain-api-faq.mdx
+++ b/fern/api-reference/celo/celo-chain-api-faq.mdx
@@ -48,7 +48,7 @@ Celo Chain uses CELO, its native cryptocurrency, for transaction fees, gas, and
## What methods does Alchemy support for the Celo Chain API?
-You can find the list of all the methods Alchemy supports for the Celo Chain API on [Celo Chain API Endpoints](/reference/celo-chain-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Celo Chain API on the [Celo API Endpoints](/docs/chains#celo-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/celo/celo-chain-api-quickstart.mdx b/fern/api-reference/celo/celo-chain-api-quickstart.mdx
index cca0ba1ce..6c7f30a5b 100644
--- a/fern/api-reference/celo/celo-chain-api-quickstart.mdx
+++ b/fern/api-reference/celo/celo-chain-api-quickstart.mdx
@@ -1,107 +1,98 @@
---
title: Celo Chain API Quickstart
-description: Get started building on Celo and using the JSON-RPC API
-subtitle: Get started building on Celo and using the JSON-RPC API
+description: How to get started building on Celo using Alchemy
+subtitle: How to get started building on Celo using Alchemy
slug: reference/celo-api-quickstart
---
-*To use the Celo Chain API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Celo is an EVM-compatible blockchain designed to provide financial tools and services to anyone with a mobile phone. Known for its focus on usability and inclusive finance, Celo offers a robust environment for deploying Ethereum-based applications with an emphasis on mobile-first experiences.
-***
-
-## What is the Celo Chain API?
-
-The Celo Chain API facilitates interaction with the Celo network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Celo both intuitive and straightforward.
-
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
+The Celo API facilitates interaction with the Celo network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Celo both intuitive and straightforward.
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+## Send Your First Request on Alchemy
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Celo client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir celo-api-quickstart
- cd celo-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir celo-api-quickstart
- cd celo-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `celo-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { celo } from "viem/chains";
+
+const client = createPublicClient({
+ chain: celo,
+ transport: http("https://celo-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the Celo network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://celo-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (CELO):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the Celo Chain, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on Celo Chain (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Block Number: 0x6d68e
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Celo APIs
-Well done! You've just made your first request to the Celo Chain API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on Celo Chain](/reference/celo-chain-api-endpoints) and start building your dApps on it!
+For the full list of Celo APIs, see the [Celo API Endpoints](/docs/chains#celo-apis).
diff --git a/fern/api-reference/citrea/citrea-api-faq.mdx b/fern/api-reference/citrea/citrea-api-faq.mdx
index 6e57e2e46..118533257 100644
--- a/fern/api-reference/citrea/citrea-api-faq.mdx
+++ b/fern/api-reference/citrea/citrea-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Citrea is EVM compatible.
Citrea uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Citrea network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Citrea?
-Citrea supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Citrea API endpoints documentation for a complete list.
+Citrea supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Citrea API Endpoints](/docs/chains#citrea-apis) for a complete list.
## What is a Citrea API key?
When accessing the Citrea network via a node provider like Alchemy, Citrea developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/citrea/citrea-api-quickstart.mdx b/fern/api-reference/citrea/citrea-api-quickstart.mdx
index a962b9512..36f52c39a 100644
--- a/fern/api-reference/citrea/citrea-api-quickstart.mdx
+++ b/fern/api-reference/citrea/citrea-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: Citrea API Quickstart
-description: How to get started building on Citrea and using the JSON-RPC API
-subtitle: How to get started building on Citrea and using the JSON-RPC API
+description: How to get started building on Citrea using Alchemy
+subtitle: How to get started building on Citrea using Alchemy
slug: reference/citrea-api-quickstart
---
-*To use the Citrea API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
-## Introduction
-
-Citrea is a Bitcoin L2 zk-rollup with a Type-2 zkEVM that keeps data availability and settlement on Bitcoin—via its BitVM-based “Clementine” two-way peg—bringing full EVM compatibility to BTC.
-
-## What is the Citrea API?
+Citrea is a Bitcoin L2 zk-rollup with a Type-2 zkEVM that keeps data availability and settlement on Bitcoin—via its BitVM-based "Clementine" two-way peg—bringing full EVM compatibility to BTC.
The Citrea API allows interaction with the Citrea network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Citrea client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir citrea-api-quickstart
- cd citrea-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir citrea-api-quickstart
- cd citrea-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const citrea = defineChain({
+ id: 5115,
+ name: "Citrea",
+ nativeCurrency: { name: "cBTC", symbol: "cBTC", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://citrea-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: citrea,
+ transport: http("https://citrea-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `citrea-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://citrea-testnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (cBTC):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Citrea network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Citrea's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Citrea APIs
-Congratulations! You've made your first request to the Citrea network. You can now explore the various JSON-RPC methods available on Citrea and start building your dApps on this innovative platform.
+For the full list of Citrea APIs, see the [Citrea API Endpoints](/docs/chains#citrea-apis).
diff --git a/fern/api-reference/clankermon/clankermon-api-faq.mdx b/fern/api-reference/clankermon/clankermon-api-faq.mdx
index 20d9c1607..708d830ac 100644
--- a/fern/api-reference/clankermon/clankermon-api-faq.mdx
+++ b/fern/api-reference/clankermon/clankermon-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Clankermon is EVM compatible.
Clankermon uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Clankermon network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Clankermon?
-Clankermon supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Clankermon API endpoints documentation for a complete list.
+Clankermon supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Clankermon API Endpoints](/docs/chains#clankermon-apis) for a complete list.
## What is a Clankermon API key?
When accessing the Clankermon network via a node provider like Alchemy, Clankermon developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/clankermon/clankermon-api-quickstart.mdx b/fern/api-reference/clankermon/clankermon-api-quickstart.mdx
index d4c9b2e7d..ffc073249 100644
--- a/fern/api-reference/clankermon/clankermon-api-quickstart.mdx
+++ b/fern/api-reference/clankermon/clankermon-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: Clankermon API Quickstart
-description: How to get started building on Clankermon and using the JSON-RPC API
-subtitle: How to get started building on Clankermon and using the JSON-RPC API
+description: How to get started building on Clankermon using Alchemy
+subtitle: How to get started building on Clankermon using Alchemy
slug: reference/clankermon-api-quickstart
---
-*To use the Clankermon API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Clankermon is a Base-aligned gaming appchain that makes fully onchain gameplay fast and cheap using a Smart Sequencer.
-## What is the Clankermon API?
-
The Clankermon API allows interaction with the Clankermon network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Clankermon client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir clankermon-api-quickstart
- cd clankermon-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir clankermon-api-quickstart
- cd clankermon-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const clankermon = defineChain({
+ id: 80085,
+ name: "Clankermon",
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://clankermon-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: clankermon,
+ transport: http("https://clankermon-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `clankermon-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://clankermon-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Clankermon network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Clankermon's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Clankermon APIs
-Congratulations! You've made your first request to the Clankermon network. You can now explore the various JSON-RPC methods available on Clankermon and start building your dApps on this innovative platform.
+For the full list of Clankermon APIs, see the [Clankermon API Endpoints](/docs/chains#clankermon-apis).
diff --git a/fern/api-reference/crossfi/crossfi-api-faq.mdx b/fern/api-reference/crossfi/crossfi-api-faq.mdx
index e71b6d75f..f4aa00d70 100644
--- a/fern/api-reference/crossfi/crossfi-api-faq.mdx
+++ b/fern/api-reference/crossfi/crossfi-api-faq.mdx
@@ -45,7 +45,7 @@ CrossFi uses its native token, XFI, to pay for transaction fees, gas, and other
## What methods does Alchemy support for the CrossFi API?
-You can find the full list of methods supported by Alchemy for the CrossFi API on the [CrossFi API Endpoints](/reference/crossfi-api-endpoints) page.
+You can find the full list of methods supported by Alchemy for the CrossFi API on the [CrossFi API Endpoints](/docs/chains#crossfi-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/crossfi/crossfi-api-quickstart.mdx b/fern/api-reference/crossfi/crossfi-api-quickstart.mdx
index e7dfee7e8..ced37cc7d 100644
--- a/fern/api-reference/crossfi/crossfi-api-quickstart.mdx
+++ b/fern/api-reference/crossfi/crossfi-api-quickstart.mdx
@@ -1,107 +1,106 @@
---
title: CrossFi API Quickstart
-description: Get started building on CrossFi and using the JSON-RPC API
-subtitle: Get started building on CrossFi and using the JSON-RPC API
+description: How to get started building on CrossFi using Alchemy
+subtitle: How to get started building on CrossFi using Alchemy
slug: reference/crossfi-api-quickstart
---
-*To use the CrossFi API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
CrossFi is a blockchain platform built to enable seamless cross-chain asset transfers and decentralized finance (DeFi) applications. With a focus on interoperability, security, and scalability, CrossFi provides developers and users with a powerful ecosystem for deploying decentralized applications (dApps) that can operate across multiple blockchain networks.
-***
-
-## What is the CrossFi API?
-
The CrossFi API facilitates interaction with the CrossFi network through a collection of JSON-RPC methods. Given its developer-friendly design, those familiar with Ethereum's JSON-RPC APIs will find working with CrossFi intuitive and straightforward.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
-
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+## Send Your First Request on Alchemy
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a CrossFi client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir crossfi-api-quickstart
- cd crossfi-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir flow-api-quickstart
- cd flow-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `crossfi-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const crossfi = defineChain({
+ id: 4158,
+ name: "CrossFi",
+ nativeCurrency: { name: "XFI", symbol: "XFI", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://crossfi-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: crossfi,
+ transport: http("https://crossfi-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the CrossFi network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://crossfi-testnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (XFI):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the CrossFi network, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from CrossFi's blockchain outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Latest Block: { ... }
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# CrossFi APIs
-Well done! You've just made your first request to the CrossFi API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on CrossFi](/reference/crossfi-api-endpoints) and start building your dApps on it!
+For the full list of CrossFi APIs, see the [CrossFi API Endpoints](/docs/chains#crossfi-apis).
diff --git a/fern/api-reference/degen/degen-api-faq.mdx b/fern/api-reference/degen/degen-api-faq.mdx
index bdf108202..51fecc4fe 100644
--- a/fern/api-reference/degen/degen-api-faq.mdx
+++ b/fern/api-reference/degen/degen-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Degen is EVM compatible.
Degen uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Degen network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Degen?
-Degen supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Degen API endpoints documentation for a complete list.
+Degen supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Degen API Endpoints](/docs/chains#degen-apis) for a complete list.
## What is a Degen API key?
When accessing the Degen network via a node provider like Alchemy, Degen developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/degen/degen-api-quickstart.mdx b/fern/api-reference/degen/degen-api-quickstart.mdx
index edfda4c81..0b9fb06d4 100644
--- a/fern/api-reference/degen/degen-api-quickstart.mdx
+++ b/fern/api-reference/degen/degen-api-quickstart.mdx
@@ -1,117 +1,98 @@
---
title: Degen API Quickstart
-description: How to get started building on Degen and using the JSON-RPC API
-subtitle: How to get started building on Degen and using the JSON-RPC API
+description: How to get started building on Degen using Alchemy
+subtitle: How to get started building on Degen using Alchemy
slug: reference/degen-api-quickstart
---
-*To use the Degen API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Degen Chain is an Arbitrum–based Layer-3 that settles on Base and uses DEGEN as gas, delivering ultra-low-cost transactions for Farcaster mini-apps and trading-style apps.
-## What is the Degen API?
-
The Degen API allows interaction with the Degen network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Degen client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir degen-api-quickstart
- cd degen-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir degen-api-quickstart
- cd degen-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http } from "viem";
+import { degen } from "viem/chains";
+
+const client = createPublicClient({
+ chain: degen,
+ transport: http("https://degen-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `degen-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://degen-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (DEGEN):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Degen network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Degen's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Degen APIs
-Congratulations! You've made your first request to the Degen network. You can now explore the various JSON-RPC methods available on Degen and start building your dApps on this innovative platform.
+For the full list of Degen APIs, see the [Degen API Endpoints](/docs/chains#degen-apis).
diff --git a/fern/api-reference/flow/flow-api-faq.mdx b/fern/api-reference/flow/flow-api-faq.mdx
index 4470dcae7..f5d5b889e 100644
--- a/fern/api-reference/flow/flow-api-faq.mdx
+++ b/fern/api-reference/flow/flow-api-faq.mdx
@@ -45,7 +45,7 @@ $FLOW, the native cryptocurrency, is used for transaction fees and gas.
## What methods does Alchemy support for the Flow API?
-Refer to the [Flow API Endpoints page](/reference/flow-api-endpoints) for a complete list of Alchemy-supported methods.
+Refer to the [Flow API Endpoints](/docs/chains#flow-apis) for a complete list of Alchemy-supported methods.
## Where can I get additional help?
diff --git a/fern/api-reference/flow/flow-api-quickstart.mdx b/fern/api-reference/flow/flow-api-quickstart.mdx
index 2cc854180..83da03c2d 100644
--- a/fern/api-reference/flow/flow-api-quickstart.mdx
+++ b/fern/api-reference/flow/flow-api-quickstart.mdx
@@ -1,107 +1,98 @@
---
-title: Flow API Quickstart
-description: Get started building on Flow and using the JSON-RPC API
-subtitle: Get started building on Flow and using the JSON-RPC API
+title: Flow EVM API Quickstart
+description: How to get started building on Flow EVM using Alchemy
+subtitle: How to get started building on Flow EVM using Alchemy
slug: reference/flow-evm-api-quickstart
---
-*To use the Flow API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Flow is a blockchain designed for the next generation of apps, games, and digital assets. Known for its high performance, scalability, and developer-friendly features, Flow offers a robust environment for deploying decentralized applications (dApps).
-***
-
-## What is the Flow API?
-
The Flow API facilitates interaction with the Flow network through a collection of JSON-RPC methods. Given its developer-friendly design, those familiar with Ethereum's JSON-RPC APIs will find working with Flow intuitive and straightforward.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
-
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+## Send Your First Request on Alchemy
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Flow EVM client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir flow-api-quickstart
- cd flow-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir flow-api-quickstart
- cd flow-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `flow-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { flowTestnet } from "viem/chains";
+
+const client = createPublicClient({
+ chain: flowTestnet,
+ transport: http("https://flow-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the Flow network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://flow-testnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (FLOW):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the Flow network, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Flow's blockchain outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Latest Block: { ... }
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Flow EVM APIs
-Well done! You've just made your first request to the Flow API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on Flow](/reference/flow-api-endpoints) and start building your dApps on it!
+For the full list of Flow EVM APIs, see the [Flow EVM API Endpoints](/docs/chains#flow-apis).
diff --git a/fern/api-reference/frax/frax-api-faq.mdx b/fern/api-reference/frax/frax-api-faq.mdx
index 4fabdbcea..4d12e7db4 100644
--- a/fern/api-reference/frax/frax-api-faq.mdx
+++ b/fern/api-reference/frax/frax-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Frax is EVM compatible.
Frax uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Frax network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Frax?
-Frax supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Frax API endpoints documentation for a complete list.
+Fraxtal supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Fraxtal API Endpoints](/docs/chains#fraxtal-apis) for a complete list.
## What is a Frax API key?
When accessing the Frax network via a node provider like Alchemy, Frax developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/frax/frax-api-quickstart.mdx b/fern/api-reference/frax/frax-api-quickstart.mdx
index af8b3391f..88b3a3d6a 100644
--- a/fern/api-reference/frax/frax-api-quickstart.mdx
+++ b/fern/api-reference/frax/frax-api-quickstart.mdx
@@ -1,117 +1,98 @@
---
-title: Frax API Quickstart
-description: How to get started building on Frax and using the JSON-RPC API
-subtitle: How to get started building on Frax and using the JSON-RPC API
+title: Fraxtal API Quickstart
+description: How to get started building on Fraxtal using Alchemy
+subtitle: How to get started building on Fraxtal using Alchemy
slug: reference/frax-api-quickstart
---
-*To use the Frax API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
-## Introduction
+Fraxtal (Frax Chain) is an EVM-equivalent Layer-2 built on Optimism's OP Stack that uses FRAX as gas and rewards on-chain activity via Flox/FXTL to scale the Frax ecosystem.
-Fraxtal (Frax Chain) is an EVM-equivalent Layer-2 built on Optimism’s OP Stack that uses FRAX as gas and rewards on-chain activity via Flox/FXTL to scale the Frax ecosystem.
+The Fraxtal API allows interaction with the Fraxtal network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## What is the Frax API?
+## Send Your First Request on Alchemy
-The Frax API allows interaction with the Frax network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Fraxtal client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir frax-api-quickstart
- cd frax-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir frax-api-quickstart
- cd frax-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http } from "viem";
+import { fraxtal } from "viem/chains";
+
+const client = createPublicClient({
+ chain: fraxtal,
+ transport: http("https://frax-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `frax-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://frax-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (frxETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Frax network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Frax's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Fraxtal APIs
-Congratulations! You've made your first request to the Frax network. You can now explore the various JSON-RPC methods available on Frax and start building your dApps on this innovative platform.
+For the full list of Fraxtal APIs, see the [Fraxtal API Endpoints](/docs/chains#fraxtal-apis).
diff --git a/fern/api-reference/gensyn/gensyn-api-faq.mdx b/fern/api-reference/gensyn/gensyn-api-faq.mdx
index 66fcfce05..4c33dbd43 100644
--- a/fern/api-reference/gensyn/gensyn-api-faq.mdx
+++ b/fern/api-reference/gensyn/gensyn-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Gensyn is EVM compatible.
Gensyn uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Gensyn network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Gensyn?
-Gensyn supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Gensyn API endpoints documentation for a complete list.
+Gensyn supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Gensyn API Endpoints](/docs/chains#gensyn-apis) for a complete list.
## What is a Gensyn API key?
When accessing the Gensyn network via a node provider like Alchemy, Gensyn developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/gensyn/gensyn-api-quickstart.mdx b/fern/api-reference/gensyn/gensyn-api-quickstart.mdx
index be5bd81f6..580dc1ed1 100644
--- a/fern/api-reference/gensyn/gensyn-api-quickstart.mdx
+++ b/fern/api-reference/gensyn/gensyn-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: Gensyn API Quickstart
-description: How to get started building on Gensyn and using the JSON-RPC API
-subtitle: How to get started building on Gensyn and using the JSON-RPC API
+description: How to get started building on Gensyn using Alchemy
+subtitle: How to get started building on Gensyn using Alchemy
slug: reference/gensyn-api-quickstart
---
-*To use the Gensyn API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Gensyn Chain is an EVM-compatible custom Ethereum rollup purpose-built for machine learning—coordinating jobs, verifying training, and paying compute providers on-chain.
-## What is the Gensyn API?
-
The Gensyn API allows interaction with the Gensyn network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Gensyn client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir gensyn-api-quickstart
- cd gensyn-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir gensyn-api-quickstart
- cd gensyn-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const gensyn = defineChain({
+ id: 685685,
+ name: "Gensyn",
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://gensyn-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: gensyn,
+ transport: http("https://gensyn-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `gensyn-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://gensyn-testnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Gensyn network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Gensyn's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Gensyn APIs
-Congratulations! You've made your first request to the Gensyn network. You can now explore the various JSON-RPC methods available on Gensyn and start building your dApps on this innovative platform.
+For the full list of Gensyn APIs, see the [Gensyn API Endpoints](/docs/chains#gensyn-apis).
diff --git a/fern/api-reference/gnosis/gnosis-chain-api-quickstart.mdx b/fern/api-reference/gnosis/gnosis-chain-api-quickstart.mdx
index 4ed039165..026cce862 100644
--- a/fern/api-reference/gnosis/gnosis-chain-api-quickstart.mdx
+++ b/fern/api-reference/gnosis/gnosis-chain-api-quickstart.mdx
@@ -1,109 +1,98 @@
---
title: Gnosis Chain API Quickstart
-description: Get started building on Gnosis Chain and using the JSON-RPC API
-subtitle: Get started building on Gnosis Chain and using the JSON-RPC API
+description: How to get started building on Gnosis Chain using Alchemy
+subtitle: How to get started building on Gnosis Chain using Alchemy
slug: reference/gnosis-api-quickstart
---
-# Gnosis Chain Quickstart
-
-*To use the Gnosis Chain API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Gnosis Chain (formerly xDai) is an EVM-compatible blockchain known for its stable and low-cost transactions. Designed to support the needs of decentralized applications (dApps), Gnosis Chain provides a reliable and efficient environment for deploying Ethereum-based applications.
-***
-
-## What is the Gnosis Chain API?
-
The Gnosis Chain API facilitates interaction with the Gnosis Chain network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Gnosis Chain both intuitive and straightforward.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
+## Send Your First Request on Alchemy
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
-
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Gnosis Chain client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir gnosis-api-quickstart
- cd gnosis-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir gnosis-api-quickstart
- cd gnosis-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `gnosis-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { gnosis } from "viem/chains";
+
+const client = createPublicClient({
+ chain: gnosis,
+ transport: http("https://gnosis-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the Gnosis Chain network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://gnosis-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (xDAI):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the Gnosis Chain, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on Gnosis Chain (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Block Number: 0x6d68e
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Gnosis Chain APIs
-Well done! You've just made your first request to the Gnosis Chain API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on Gnosis Chain](/reference/gnosis-chain-api-endpoints) and start building your dApps on it!
+For the full list of Gnosis Chain APIs, see the [Gnosis Chain API Endpoints](/docs/chains#gnosis-apis).
diff --git a/fern/api-reference/humanity/humanity-api-faq.mdx b/fern/api-reference/humanity/humanity-api-faq.mdx
index c8a8dc36b..8cec7b92c 100644
--- a/fern/api-reference/humanity/humanity-api-faq.mdx
+++ b/fern/api-reference/humanity/humanity-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Humanity is EVM compatible.
Humanity uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Humanity network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Humanity?
-Humanity supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Humanity API endpoints documentation for a complete list.
+Humanity supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Humanity API Endpoints](/docs/chains#humanity-apis) for a complete list.
## What is a Humanity API key?
When accessing the Humanity network via a node provider like Alchemy, Humanity developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/humanity/humanity-api-quickstart.mdx b/fern/api-reference/humanity/humanity-api-quickstart.mdx
index c1e6bfe34..360cd18c1 100644
--- a/fern/api-reference/humanity/humanity-api-quickstart.mdx
+++ b/fern/api-reference/humanity/humanity-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: Humanity API Quickstart
-description: How to get started building on Humanity and using the JSON-RPC API
-subtitle: How to get started building on Humanity and using the JSON-RPC API
+description: How to get started building on Humanity using Alchemy
+subtitle: How to get started building on Humanity using Alchemy
slug: reference/humanity-api-quickstart
---
-*To use the Humanity API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Humanity Protocol is a zkEVM Layer-2 for decentralized identity that uses palm-biometric Proof-of-Humanity and zero-knowledge proofs to issue privacy-preserving, Sybil-resistant credentials.
-## What is the Humanity API?
-
The Humanity API allows interaction with the Humanity network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Humanity client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir humanity-api-quickstart
- cd humanity-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir humanity-api-quickstart
- cd humanity-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const humanity = defineChain({
+ id: 1942999413,
+ name: "Humanity",
+ nativeCurrency: { name: "HMT", symbol: "HMT", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://humanity-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: humanity,
+ transport: http("https://humanity-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `humanity-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://humanity-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (HMT):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Humanity network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Humanity's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Humanity APIs
-Congratulations! You've made your first request to the Humanity network. You can now explore the various JSON-RPC methods available on Humanity and start building your dApps on this innovative platform.
+For the full list of Humanity APIs, see the [Humanity API Endpoints](/docs/chains#humanity-apis).
diff --git a/fern/api-reference/hyperliquid/hyperliquid-api-faq.mdx b/fern/api-reference/hyperliquid/hyperliquid-api-faq.mdx
index 6fa0f7eb8..4ea33e0c0 100644
--- a/fern/api-reference/hyperliquid/hyperliquid-api-faq.mdx
+++ b/fern/api-reference/hyperliquid/hyperliquid-api-faq.mdx
@@ -45,7 +45,7 @@ The native currency of the HyperEVM blockchain is HYPE. It serves as the primary
## What methods does Alchemy support for the HyperEVM API?
-You can find the list of all the methods Alchemy support for the HyperEVM API on HyperEVM API Endpoints page.
+You can find the list of all the methods Alchemy supports for the HyperEVM API on the [HyperEVM API Endpoints](/docs/chains#hyperliquid-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/hyperliquid/hyperliquid-api-quickstart.mdx b/fern/api-reference/hyperliquid/hyperliquid-api-quickstart.mdx
index 30723687c..1aaf5b059 100644
--- a/fern/api-reference/hyperliquid/hyperliquid-api-quickstart.mdx
+++ b/fern/api-reference/hyperliquid/hyperliquid-api-quickstart.mdx
@@ -1,119 +1,100 @@
---
-title: Hyperevm API Quickstart
-description: How to get started building on Hyperevm and using the JSON-RPC API
-subtitle: How to get started building on Hyperevm and using the JSON-RPC API
+title: HyperEVM API Quickstart
+description: How to get started building on HyperEVM using Alchemy
+subtitle: How to get started building on HyperEVM using Alchemy
slug: reference/hyperliquid-api-quickstart
---
-*To use the Hyperevm API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Checkout the [Hyperliquid Alchemy Wallets Guide](https://www.alchemy.com/docs/wallets/recipes/hyperliquid-wallets) for enabling email and social login for user authentication, and the ability to sign and send transactions seamlessly.
-## Introduction
-
HyperEVM is a high-performance, Ethereum-compatible execution layer developed by HyperLiquid that enables smart contracts to run natively alongside its decentralized trading engine, combining low-latency performance with full EVM compatibility.
-## What is the Hyperevm API?
-
-The Hyperevm API allows interaction with the Hyperevm network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-
-## Getting Started Instructions
+The HyperEVM API allows interaction with the HyperEVM network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a HyperEVM client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir hyperevm-api-quickstart
- cd hyperevm-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir hyperevm-api-quickstart
- cd hyperevm-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http } from "viem";
+import { hyperliquid } from "viem/chains";
+
+const client = createPublicClient({
+ chain: hyperliquid,
+ transport: http("https://hyperliquid-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `hyperevm-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://hyperliquid-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (HYPE):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Hyperevm network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Hyperevm's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# HyperEVM APIs
-Congratulations! You've made your first request to the Hyperevm network. You can now explore the various JSON-RPC methods available on Hyperevm and start building your dApps on this innovative platform.
+For the full list of HyperEVM APIs, see the [HyperEVM API Endpoints](/docs/chains#hyperliquid-apis).
diff --git a/fern/api-reference/ink/ink-api-faq.mdx b/fern/api-reference/ink/ink-api-faq.mdx
index a919fcc24..065f9cb6e 100644
--- a/fern/api-reference/ink/ink-api-faq.mdx
+++ b/fern/api-reference/ink/ink-api-faq.mdx
@@ -45,7 +45,7 @@ Ink uses ETH for transaction fees and gas, similar to other Layer 2 solutions bu
## What methods does Kraken support for the Ink API?
-You can find the list of all the methods Kraken supports for the Ink API on the [Ink API Endpoints](/reference/ink-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Ink API on the [Ink API Endpoints](/docs/chains#ink-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/ink/ink-api-quickstart.mdx b/fern/api-reference/ink/ink-api-quickstart.mdx
index 63b191a2f..61fb5caa3 100644
--- a/fern/api-reference/ink/ink-api-quickstart.mdx
+++ b/fern/api-reference/ink/ink-api-quickstart.mdx
@@ -1,101 +1,98 @@
---
title: Ink API Quickstart
-description: Get started building on Ink and using the JSON-RPC API
-subtitle: Get started building on Ink and using the JSON-RPC API
+description: How to get started building on Ink using Alchemy
+subtitle: How to get started building on Ink using Alchemy
slug: reference/ink-api-quickstart
---
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Ink is a cutting-edge Layer 2 blockchain solution developed by Kraken, designed to bridge centralized and decentralized finance. Built on the OP Stack within the Optimism Superchain ecosystem, Ink offers sub-second block times, optimized gas fees, and high performance. It aims to simplify DeFi access, leveraging Kraken's established infrastructure while inheriting Ethereum's robust security.
-## What is the Ink API?
-
The Ink API allows interaction with the Ink network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+## Send Your First Request on Alchemy
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Ink client connected to Alchemy and fetch the latest block number!
-### 2. Set Up Your Project
+
+ ```text npm
+ npm install --save viem
+ ```
-Open your terminal and execute the following commands to create and initialize your project:
+ ```text yarn
+ yarn add viem
+ ```
+
-```shell
-mkdir ink-api-quickstart
-cd ink-api-quickstart
-npm init --yes
-```
+## Create Client Connected to Alchemy
-```shell
-mkdir ink-api-quickstart
-cd ink-api-quickstart
-yarn init --yes
+
+```js
+import { createPublicClient, http } from "viem";
+import { ink } from "viem/chains";
+
+const client = createPublicClient({
+ chain: ink,
+ transport: http("https://ink-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
```
+
-This creates a new directory named `ink-api-quickstart` and initializes a Node.js project within it.
-
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = 'https://ink-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Ink mainnet:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Ink's mainnet outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Latest Block: 0x...
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Ink APIs
-Congratulations! You've made your first request to the Ink network. You can now explore the various [JSON-RPC methods available on Ink](/reference/ink-api-endpoints) and start building your dApps on this innovative platform.
+For the full list of Ink APIs, see the [Ink API Endpoints](/docs/chains#ink-apis).
diff --git a/fern/api-reference/lens/lens-api-quickstart.mdx b/fern/api-reference/lens/lens-api-quickstart.mdx
index bd5d85251..f46c090cf 100644
--- a/fern/api-reference/lens/lens-api-quickstart.mdx
+++ b/fern/api-reference/lens/lens-api-quickstart.mdx
@@ -1,11 +1,14 @@
---
title: Lens API Quickstart
-description: Get started building on Lens and using the JSON-RPC API
-subtitle: Get started building on Lens and using the JSON-RPC API
+description: How to get started building on Lens using Alchemy
+subtitle: How to get started building on Lens using Alchemy
slug: reference/lens-api-quickstart
---
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Lens Network is a decentralized social media infrastructure built on Ethereum using zkSync's technology. It aims to create open and fair social spaces by leveraging hybrid scaling solutions for high-throughput, low-cost transactions. Lens empowers users with control over their social identity and connections, enabling seamless movement across applications and fostering an environment with reduced censorship and enhanced freedom of expression.
@@ -13,93 +16,95 @@ Lens Network is a decentralized social media infrastructure built on Ethereum us
Please note that we currently only support Lens Sepolia Testnet
-## What is the Lens API?
-
The Lens API allows interaction with the Lens network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+## Send Your First Request on Alchemy
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Lens client connected to Alchemy and fetch the latest block number!
-### 2. Set Up Your Project
+
+ ```text npm
+ npm install --save viem
+ ```
-Open your terminal and execute the following commands to create and initialize your project:
+ ```text yarn
+ yarn add viem
+ ```
+
-```shell
-mkdir lens-api-quickstart
-cd lens-api-quickstart
-npm init --yes
-```
+## Create Client Connected to Alchemy
-```shell
-mkdir lens-api-quickstart
-cd lens-api-quickstart
-yarn init --yes
+
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const lensTestnet = defineChain({
+ id: 37111,
+ name: "Lens Sepolia Testnet",
+ nativeCurrency: { name: "GRASS", symbol: "GRASS", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://lens-sepolia.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: lensTestnet,
+ transport: http("https://lens-sepolia.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
```
+
-This creates a new directory named `lens-api-quickstart` and initializes a Node.js project within it.
-
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = 'https://lens-sepolia.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (GRASS):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Lens mainnet:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Lens's mainnet outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Latest Block: 0x...
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Lens APIs
-Congratulations! You've made your first request to the Lens network. You can now explore the various [JSON-RPC methods available on Lens](/reference/lens-api-endpoints) and start building your dApps on this innovative platform.
+For the full list of Lens APIs, see the [Lens API Endpoints](/docs/chains#lens-apis).
diff --git a/fern/api-reference/linea/linea-chain-api-faq.mdx b/fern/api-reference/linea/linea-chain-api-faq.mdx
index 9ce21a1d5..a40320927 100644
--- a/fern/api-reference/linea/linea-chain-api-faq.mdx
+++ b/fern/api-reference/linea/linea-chain-api-faq.mdx
@@ -45,7 +45,7 @@ Linea Chain uses LINEA, its native cryptocurrency, for transaction fees, gas, an
## What methods does Alchemy support for the Linea Chain API?
-You can find the list of all the methods Alchemy supports for the Linea Chain API on [Linea Chain API Endpoints](/reference/linea-chain-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Linea Chain API on the [Linea API Endpoints](/docs/chains#linea-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/linea/linea-chain-api-quickstart.mdx b/fern/api-reference/linea/linea-chain-api-quickstart.mdx
index 942e26e42..887640726 100644
--- a/fern/api-reference/linea/linea-chain-api-quickstart.mdx
+++ b/fern/api-reference/linea/linea-chain-api-quickstart.mdx
@@ -1,107 +1,98 @@
---
title: Linea Chain API Quickstart
-description: Get started building on Linea Chain and using the JSON-RPC API
-subtitle: Get started building on Linea Chain and using the JSON-RPC API
+description: How to get started building on Linea using Alchemy
+subtitle: How to get started building on Linea using Alchemy
slug: reference/linea-api-quickstart
---
-\_To use the Linea Chain API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first.
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Linea is an EVM-compatible blockchain designed to provide scalability and efficiency for decentralized applications (dApps). Known for its high throughput and low transaction costs, Linea offers a robust environment for deploying Ethereum-based applications.
-***
-
-## What is the Linea Chain API?
-
-The Linea Chain API facilitates interaction with the Linea network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Linea both intuitive and straightforward.
-
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
+The Linea API facilitates interaction with the Linea network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Linea both intuitive and straightforward.
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+## Send Your First Request on Alchemy
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Linea client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir linea-api-quickstart
- cd linea-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir linea-api-quickstart
- cd linea-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `linea-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { linea } from "viem/chains";
+
+const client = createPublicClient({
+ chain: linea,
+ transport: http("https://linea-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the Linea network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://linea-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the Linea Chain, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on Linea Chain (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Block Number: 0x6d68e
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Linea APIs
-Well done! You've just made your first request to the Linea Chain API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on Linea Chain](/reference/linea-chain-api-endpoints) and start building your dApps on it!
+For the full list of Linea APIs, see the [Linea API Endpoints](/docs/chains#linea-apis).
diff --git a/fern/api-reference/lumia/lumia-api-quickstart.mdx b/fern/api-reference/lumia/lumia-api-quickstart.mdx
index e789ae5b6..35b7c1dfe 100644
--- a/fern/api-reference/lumia/lumia-api-quickstart.mdx
+++ b/fern/api-reference/lumia/lumia-api-quickstart.mdx
@@ -1,101 +1,106 @@
---
title: Lumia API Quickstart
-description: Get started building on Lumia and using the JSON-RPC API
-subtitle: Get started building on Lumia and using the JSON-RPC API
+description: How to get started building on Lumia using Alchemy
+subtitle: How to get started building on Lumia using Alchemy
slug: reference/lumia-api-quickstart
---
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Lumia is the first next-gen, ultra capital efficient, hyper-liquid zkEVM utilising cutting edge tech stack: PolygonCDK, AvailDA and (redundancy) private DAC, Polygon AggLayer, Gevolut, custom AVS', Chain Abstraction, Account Abstraction and more, thanks to co-development efforts between GatewayFM (RaaS) and Lumia's tech team.
-## What is the Lumia API?
-
The Lumia API allows interaction with the Lumia network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+## Send Your First Request on Alchemy
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Lumia client connected to Alchemy and fetch the latest block number!
-### 2. Set Up Your Project
+
+ ```text npm
+ npm install --save viem
+ ```
-Open your terminal and execute the following commands to create and initialize your project:
+ ```text yarn
+ yarn add viem
+ ```
+
-```shell
-mkdir lumia-api-quickstart
-cd lumia-api-quickstart
-npm init --yes
-```
+## Create Client Connected to Alchemy
-```shell
-mkdir lumia-api-quickstart
-cd lumia-api-quickstart
-yarn init --yes
+
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const lumia = defineChain({
+ id: 994873017,
+ name: "Lumia",
+ nativeCurrency: { name: "LUMIA", symbol: "LUMIA", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://lumia-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: lumia,
+ transport: http("https://lumia-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
```
+
-This creates a new directory named `lumia-api-quickstart` and initializes a Node.js project within it.
-
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = 'https://lumia-prism.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (LUMIA):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Lumia mainnet:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Lumia's mainnet outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Latest Block: 0x...
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Lumia APIs
-Congratulations! You've made your first request to the Lumia network. You can now explore the various [JSON-RPC methods available on Lumia](/reference/lumia-api-endpoints) and start building your dApps on this innovative platform.
+For the full list of Lumia APIs, see the [Lumia API Endpoints](/docs/chains#lumia-apis).
diff --git a/fern/api-reference/mantle/mantle-chain-api-faq.mdx b/fern/api-reference/mantle/mantle-chain-api-faq.mdx
index 8f8ee0e9d..64fc2843d 100644
--- a/fern/api-reference/mantle/mantle-chain-api-faq.mdx
+++ b/fern/api-reference/mantle/mantle-chain-api-faq.mdx
@@ -45,7 +45,7 @@ Mantle Chain uses MNTL, its native cryptocurrency, for transaction fees, gas, an
## What methods does Alchemy support for the Mantle Chain API?
-You can find the list of all the methods Alchemy supports for the Mantle Chain API on [Mantle Chain API Endpoints](/reference/mantle-chain-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Mantle Chain API on the [Mantle API Endpoints](/docs/chains#mantle-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/mantle/mantle-chain-api-quickstart.mdx b/fern/api-reference/mantle/mantle-chain-api-quickstart.mdx
index 311040490..ff6fe579e 100644
--- a/fern/api-reference/mantle/mantle-chain-api-quickstart.mdx
+++ b/fern/api-reference/mantle/mantle-chain-api-quickstart.mdx
@@ -1,107 +1,98 @@
---
title: Mantle Chain API Quickstart
-description: Get started building on Mantle and using the JSON-RPC API
-subtitle: Get started building on Mantle and using the JSON-RPC API
+description: How to get started building on Mantle using Alchemy
+subtitle: How to get started building on Mantle using Alchemy
slug: reference/mantle-api-quickstart
---
-*To use the Mantle Chain API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Mantle is an EVM-compatible blockchain designed to provide high performance, scalability, and security for decentralized applications (dApps). Known for its fast and low-cost transactions, Mantle offers a robust environment for deploying Ethereum-based applications.
-***
-
-## What is the Mantle Chain API?
-
-The Mantle Chain API facilitates interaction with the Mantle network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Mantle both intuitive and straightforward.
-
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
+The Mantle API facilitates interaction with the Mantle network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Mantle both intuitive and straightforward.
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+## Send Your First Request on Alchemy
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Mantle client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir mantle-api-quickstart
- cd mantle-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir mantle-api-quickstart
- cd mantle-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `mantle-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { mantle } from "viem/chains";
+
+const client = createPublicClient({
+ chain: mantle,
+ transport: http("https://mantle-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the Mantle network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://mantle-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (MNT):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the Mantle Chain, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on Mantle Chain (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Block Number: 0x6d68e
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Mantle APIs
-Well done! You've just made your first request to the Mantle Chain API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on Mantle Chain](/reference/mantle-chain-api-endpoints) and start building your dApps on it!
+For the full list of Mantle APIs, see the [Mantle API Endpoints](/docs/chains#mantle-apis).
diff --git a/fern/api-reference/megaeth/megaeth-api-faq.mdx b/fern/api-reference/megaeth/megaeth-api-faq.mdx
index bb4ba02f9..303846064 100644
--- a/fern/api-reference/megaeth/megaeth-api-faq.mdx
+++ b/fern/api-reference/megaeth/megaeth-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, MegaETH is EVM compatible.
MegaETH uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the MegaETH network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on MegaETH?
-MegaETH supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the MegaETH API endpoints documentation for a complete list.
+MegaETH supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [MegaETH API Endpoints](/docs/chains#megaeth-apis) for a complete list.
## What is a MegaETH API key?
When accessing the MegaETH network via a node provider like Alchemy, MegaETH developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/megaeth/megaeth-api-quickstart.mdx b/fern/api-reference/megaeth/megaeth-api-quickstart.mdx
index ead879261..ce4274cf7 100644
--- a/fern/api-reference/megaeth/megaeth-api-quickstart.mdx
+++ b/fern/api-reference/megaeth/megaeth-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: MegaETH API Quickstart
-description: How to get started building on MegaETH and using the JSON-RPC API
-subtitle: How to get started building on MegaETH and using the JSON-RPC API
+description: How to get started building on MegaETH using Alchemy
+subtitle: How to get started building on MegaETH using Alchemy
slug: reference/megaeth-api-quickstart
---
-*To use the MegaETH API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
MegaETH is a high-performance Ethereum Layer 2 blockchain designed to achieve real-time transaction processing with sub-millisecond latency and extremely high throughput.
-## What is the MegaETH API?
-
The MegaETH API allows interaction with the MegaETH network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a MegaETH client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir megaeth-api-quickstart
- cd megaeth-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir megaeth-api-quickstart
- cd megaeth-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const megaeth = defineChain({
+ id: 6342,
+ name: "MegaETH",
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://megaeth-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: megaeth,
+ transport: http("https://megaeth-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `megaeth-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://megaeth-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the MegaETH network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from MegaETH's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# MegaETH APIs
-Congratulations! You've made your first request to the MegaETH network. You can now explore the various JSON-RPC methods available on MegaETH and start building your dApps on this innovative platform.
+For the full list of MegaETH APIs, see the [MegaETH API Endpoints](/docs/chains#megaeth-apis).
diff --git a/fern/api-reference/metis/metis-chain-api-faq.mdx b/fern/api-reference/metis/metis-chain-api-faq.mdx
index ccd6ba7b2..5c0564683 100644
--- a/fern/api-reference/metis/metis-chain-api-faq.mdx
+++ b/fern/api-reference/metis/metis-chain-api-faq.mdx
@@ -49,7 +49,7 @@ Metis Chain uses METIS, its native cryptocurrency, for transaction fees, gas, an
## What methods does Alchemy support for the Metis Chain API?
-You can find the list of all the methods Alchemy supports for the Metis Chain API on [Metis Chain API Endpoints](/reference/metis-chain-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Metis Chain API on the [Metis API Endpoints](/docs/chains#metis-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/metis/metis-chain-api-quickstart.mdx b/fern/api-reference/metis/metis-chain-api-quickstart.mdx
index b4157fab4..aef60dd1c 100644
--- a/fern/api-reference/metis/metis-chain-api-quickstart.mdx
+++ b/fern/api-reference/metis/metis-chain-api-quickstart.mdx
@@ -1,107 +1,98 @@
---
title: Metis Chain API Quickstart
-description: Get started building on Metis chain and using the JSON-RPC API
-subtitle: Get started building on Metis chain and using the JSON-RPC API
+description: How to get started building on Metis using Alchemy
+subtitle: How to get started building on Metis using Alchemy
slug: reference/metis-api-quickstart
---
-*To use the Metis Chain API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Metis is an EVM-compatible blockchain designed to provide high performance, scalability, and security for decentralized applications (dApps). Known for its fast and low-cost transactions, Metis offers a robust environment for deploying Ethereum-based applications with enhanced scalability and performance.
-***
-
-## What is the Metis Chain API?
-
-The Metis Chain API facilitates interaction with the Metis network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Metis both intuitive and straightforward.
-
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
+The Metis API facilitates interaction with the Metis network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Metis both intuitive and straightforward.
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+## Send Your First Request on Alchemy
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Metis client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir metis-api-quickstart
- cd metis-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir metis-api-quickstart
- cd metis-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `metis-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { metis } from "viem/chains";
+
+const client = createPublicClient({
+ chain: metis,
+ transport: http("https://metis-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the Metis network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://metis-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (METIS):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the Metis Chain, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on Metis Chain (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Block Number: 0x6d68e
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Metis APIs
-Well done! You've just made your first request to the Metis Chain API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on Metis Chain](/reference/metis-chain-api-endpoints) and start building your dApps on it!
+For the full list of Metis APIs, see the [Metis API Endpoints](/docs/chains#metis-apis).
diff --git a/fern/api-reference/mode/mode-api-faq.mdx b/fern/api-reference/mode/mode-api-faq.mdx
index 7ebbe84a4..9d5b61040 100644
--- a/fern/api-reference/mode/mode-api-faq.mdx
+++ b/fern/api-reference/mode/mode-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Mode is EVM compatible.
Mode uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Mode network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Mode?
-Mode supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Mode API endpoints documentation for a complete list.
+Mode supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Mode API Endpoints](/docs/chains#mode-apis) for a complete list.
## What is a Mode API key?
When accessing the Mode network via a node provider like Alchemy, Mode developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/mode/mode-api-quickstart.mdx b/fern/api-reference/mode/mode-api-quickstart.mdx
index c7ab1cc83..e7caf0f19 100644
--- a/fern/api-reference/mode/mode-api-quickstart.mdx
+++ b/fern/api-reference/mode/mode-api-quickstart.mdx
@@ -1,117 +1,98 @@
---
title: Mode API Quickstart
-description: How to get started building on Mode and using the JSON-RPC API
-subtitle: How to get started building on Mode and using the JSON-RPC API
+description: How to get started building on Mode using Alchemy
+subtitle: How to get started building on Mode using Alchemy
slug: reference/mode-api-quickstart
---
-*To use the Mode API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
-## Introduction
-
-Mode is an OP Stack–based, EVM-equivalent Ethereum Layer-2 that’s growth-focused—sharing sequencer fees with developers (SFS) and rewarding users to power DeFi/AiFi apps.
-
-## What is the Mode API?
+Mode is an OP Stack–based, EVM-equivalent Ethereum Layer-2 that's growth-focused—sharing sequencer fees with developers (SFS) and rewarding users to power DeFi/AiFi apps.
The Mode API allows interaction with the Mode network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Mode client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir mode-api-quickstart
- cd mode-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir mode-api-quickstart
- cd mode-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http } from "viem";
+import { mode } from "viem/chains";
+
+const client = createPublicClient({
+ chain: mode,
+ transport: http("https://mode-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `mode-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://mode-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Mode network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Mode's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Mode APIs
-Congratulations! You've made your first request to the Mode network. You can now explore the various JSON-RPC methods available on Mode and start building your dApps on this innovative platform.
+For the full list of Mode APIs, see the [Mode API Endpoints](/docs/chains#mode-apis).
diff --git a/fern/api-reference/monad/monad-api-faq.mdx b/fern/api-reference/monad/monad-api-faq.mdx
index 002b4e7f9..8d509a19c 100644
--- a/fern/api-reference/monad/monad-api-faq.mdx
+++ b/fern/api-reference/monad/monad-api-faq.mdx
@@ -45,7 +45,7 @@ The native token, MONAD, is used for transaction fees. The network implements an
## What methods does Alchemy support for the Monad Chain API?
-You can find the list of all the methods Alchemy supports for the Monad Chain API on [Monad Chain API Endpoints](/reference/monad-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Monad Chain API on the [Monad API Endpoints](/docs/chains#monad-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/monad/monad-api-quickstart.mdx b/fern/api-reference/monad/monad-api-quickstart.mdx
index 76c0bf31a..f0f7bcbc3 100644
--- a/fern/api-reference/monad/monad-api-quickstart.mdx
+++ b/fern/api-reference/monad/monad-api-quickstart.mdx
@@ -1,11 +1,14 @@
---
title: Monad API Quickstart
-description: Get started building on Monad and using the JSON-RPC API
-subtitle: Get started building on Monad and using the JSON-RPC API
+description: How to get started building on Monad using Alchemy
+subtitle: How to get started building on Monad using Alchemy
slug: reference/monad-api-quickstart
---
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Monad is a high-performance Ethereum-compatible L1. Monad materially advances the efficient frontier in the balance between decentralization and scalability.
@@ -13,93 +16,95 @@ Monad is a high-performance Ethereum-compatible L1. Monad materially advances th
Please note that we currently only support the Monad testnet
-## What is the Monad API?
-
The Monad API allows interaction with the Monad network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+## Send Your First Request on Alchemy
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Monad client connected to Alchemy and fetch the latest block number!
-### 2. Set Up Your Project
+
+ ```text npm
+ npm install --save viem
+ ```
-Open your terminal and execute the following commands to create and initialize your project:
+ ```text yarn
+ yarn add viem
+ ```
+
-```shell
-mkdir monad-api-quickstart
-cd monad-api-quickstart
-npm init --yes
-```
+## Create Client Connected to Alchemy
-```shell
-mkdir monad-api-quickstart
-cd monad-api-quickstart
-yarn init --yes
+
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const monadTestnet = defineChain({
+ id: 10143,
+ name: "Monad Testnet",
+ nativeCurrency: { name: "MON", symbol: "MON", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://monad-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: monadTestnet,
+ transport: http("https://monad-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
```
+
-This creates a new directory named `monad-api-quickstart` and initializes a Node.js project within it.
-
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = 'https://monad-testnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (MON):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Monad mainnet:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Monad's mainnet outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Latest Block: 0x...
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Monad APIs
-Congratulations! You've made your first request to the Monad network. You can now explore the various [JSON-RPC methods available on Monad](/reference/monad-api-endpoints) and start building your dApps on this innovative platform.
+For the full list of Monad APIs, see the [Monad API Endpoints](/docs/chains#monad-apis).
diff --git a/fern/api-reference/moonbeam/moonbeam-api-faq.mdx b/fern/api-reference/moonbeam/moonbeam-api-faq.mdx
index 098b68fb9..ee0acfd7b 100644
--- a/fern/api-reference/moonbeam/moonbeam-api-faq.mdx
+++ b/fern/api-reference/moonbeam/moonbeam-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Moonbeam is EVM compatible.
Moonbeam uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Moonbeam network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Moonbeam?
-Moonbeam supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Moonbeam API endpoints documentation for a complete list.
+Moonbeam supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Moonbeam API Endpoints](/docs/chains#moonbeam-apis) for a complete list.
## What is a Moonbeam API key?
When accessing the Moonbeam network via a node provider like Alchemy, Moonbeam developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/moonbeam/moonbeam-api-quickstart.mdx b/fern/api-reference/moonbeam/moonbeam-api-quickstart.mdx
index 0e562b93c..052383118 100644
--- a/fern/api-reference/moonbeam/moonbeam-api-quickstart.mdx
+++ b/fern/api-reference/moonbeam/moonbeam-api-quickstart.mdx
@@ -1,117 +1,98 @@
---
title: Moonbeam API Quickstart
-description: How to get started building on Moonbeam and using the JSON-RPC API
-subtitle: How to get started building on Moonbeam and using the JSON-RPC API
+description: How to get started building on Moonbeam using Alchemy
+subtitle: How to get started building on Moonbeam using Alchemy
slug: reference/moonbeam-api-quickstart
---
-*To use the Moonbeam API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Moonbeam is an Ethereum-compatible smart-contract parachain on Polkadot that pairs full EVM tooling with native cross-chain interoperability (XCM/XC-20) for building connected dapps.
-## What is the Moonbeam API?
-
The Moonbeam API allows interaction with the Moonbeam network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Moonbeam client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir moonbeam-api-quickstart
- cd moonbeam-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir moonbeam-api-quickstart
- cd moonbeam-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http } from "viem";
+import { moonbeam } from "viem/chains";
+
+const client = createPublicClient({
+ chain: moonbeam,
+ transport: http("https://moonbeam-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `moonbeam-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://moonbeam-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (GLMR):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Moonbeam network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Moonbeam's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Moonbeam APIs
-Congratulations! You've made your first request to the Moonbeam network. You can now explore the various JSON-RPC methods available on Moonbeam and start building your dApps on this innovative platform.
+For the full list of Moonbeam APIs, see the [Moonbeam API Endpoints](/docs/chains#moonbeam-apis).
diff --git a/fern/api-reference/op-mainnet/op-mainnet-api-faq/op-mainnet-api-faq.mdx b/fern/api-reference/op-mainnet/op-mainnet-api-faq/op-mainnet-api-faq.mdx
index 639d235c9..e78e42de6 100644
--- a/fern/api-reference/op-mainnet/op-mainnet-api-faq/op-mainnet-api-faq.mdx
+++ b/fern/api-reference/op-mainnet/op-mainnet-api-faq/op-mainnet-api-faq.mdx
@@ -96,7 +96,7 @@ Before you get started, update your Optimism RPC URL to Alchemy.
## What methods does Alchemy support for the Optimism API?
-You can find the list of all the methods Alchemy support for the Ethereum API on the [Optimism API Endpoints](/reference/optimism-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the OP Mainnet API on the [OP Mainnet API Endpoints](/docs/chains#op-mainnet-apis) page.
## What is the transaction throughput on Optimism?
diff --git a/fern/api-reference/op-mainnet/op-mainnet-api-quickstart.mdx b/fern/api-reference/op-mainnet/op-mainnet-api-quickstart.mdx
index 392c379de..910ded271 100644
--- a/fern/api-reference/op-mainnet/op-mainnet-api-quickstart.mdx
+++ b/fern/api-reference/op-mainnet/op-mainnet-api-quickstart.mdx
@@ -1,111 +1,98 @@
---
title: OP Mainnet API Quickstart
-description: How to get started building on Optimism and use the JSON-RPC API
-subtitle: How to get started building on Optimism and use the JSON-RPC API
+description: How to get started building on OP Mainnet using Alchemy
+subtitle: How to get started building on OP Mainnet using Alchemy
slug: reference/op-mainnet-api-quickstart
---
-
- Sign up to start building on Optimism. [Get started for free](https://dashboard.alchemy.com/signup)
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
-# Getting Started Instructions
+OP Mainnet (Optimism) is a Layer 2 scaling solution for Ethereum that leverages optimistic rollups to provide fast and low-cost transactions. As the foundation of the Optimism Superchain, OP Mainnet offers a secure and scalable environment for deploying Ethereum-based applications.
-## 1. Choose a package manager (npm or yarn)
+The OP Mainnet API facilitates interaction with the OP Mainnet network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with OP Mainnet both intuitive and straightforward.
-For this guide, we will be using npm or yarn as our package manager to install Viem or Ethers.js.
+## Send Your First Request on Alchemy
-### npm
-
-To get started with `npm`, follow the documentation to install Node.js and `npm` for your operating system: [https://docs.npmjs.com/downloading-and-installing-node-js-and-npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
-
-### yarn
-
-To get started with `yarn`, follow these steps: [https://classic.yarnpkg.com/lang/en/docs/install](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable)
-
-## 2. Set up your project (npm or yarn)
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an OP Mainnet client connected to Alchemy and fetch the latest block number!
- ```text Shell (npm)
- mkdir alchemy-optimism-api
- cd alchemy-optimism-api
- npm init --yes
+ ```text npm
+ npm install --save viem
```
- ```text Shell (yarn)
- mkdir alchemy-optimism-api
- cd alchemy-optimism-api
- yarn init --yes
+ ```text yarn
+ yarn add viem
```
-## 3. Install Web3 Library
-
-Run the following command to install Viem or Ethers.js with npm or yarn.
+## Create Client Connected to Alchemy
- ```text Viem (npm)
- npm install viem
- ```
-
- ```text Viem (yarn)
- yarn add viem
- ```
-
- ```text Ethers.js (npm)
- npm install ethers
- ```
-
- ```text Ethers.js (yarn)
- yarn add ethers
- ```
+```js
+import { createPublicClient, http } from "viem";
+import { optimism } from "viem/chains";
+
+const client = createPublicClient({
+ chain: optimism,
+ transport: http("https://opt-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-## 4. Make your first request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-You are all set now to use Optimism API and make your first request. For instance, lets make a request to `get latest block`. Create an `index.js` file and paste the following code snippet into the file.
+## Get Latest Block Number
- ```javascript index.js
- import { createPublicClient, http } from 'viem'
- import { optimism } from 'viem/chains'
-
- const client = createPublicClient({
- chain: optimism,
- transport: http('https://opt-mainnet.g.alchemy.com/v2/demo') // Replace 'demo' with your API Key
- })
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
+
- async function main() {
- const latestBlock = await client.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
+## Get an Address Balance
- main()
- ```
+
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-## 5. Run script
-
-To run the above node script, use cmd `node index.js`, and you should see the output.
+## Read Block Data
- ```text shell
- The latest block number is 43869847
- ```
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
-***
-
-# Optimism Tutorials
+## Fetch a Transaction by Hash
-You must not stop here! Want to build your first Dapp on Optimism and use Optimism APIs?
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
+
-Check out the following tutorials to learn how to build on Optimism:
+## Fetch Transaction Receipt
-* [Optimism SDK Examples](/reference/optimism-sdk-examples)
-* [Optimism API FAQ](/reference/optimism-api-faq)
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
+
-For full documentation on modern Web3 libraries:
+# OP Mainnet APIs
-* **Viem**: [https://viem.sh](https://viem.sh) - TypeScript Interface for Ethereum
-* **Ethers.js**: [https://docs.ethers.org](https://docs.ethers.org) - Complete Ethereum library
+For the full list of OP Mainnet APIs, see the [OP Mainnet API Endpoints](/docs/chains#op-mainnet-apis).
diff --git a/fern/api-reference/op-mainnet/op-mainnet-api-quickstart/op-mainnet-sdk-examples.mdx b/fern/api-reference/op-mainnet/op-mainnet-api-quickstart/op-mainnet-sdk-examples.mdx
deleted file mode 100644
index 020bd6837..000000000
--- a/fern/api-reference/op-mainnet/op-mainnet-api-quickstart/op-mainnet-sdk-examples.mdx
+++ /dev/null
@@ -1,479 +0,0 @@
----
-title: Optimism API Examples
-description: Real-world examples on how to query information from Optimism using modern Web3 libraries.
-subtitle: Real-world examples on how to query information from Optimism using modern Web3 libraries.
-slug: reference/optimism-sdk-examples
----
-
-If you're looking to start querying Optimism blockchain data, here's the place to start! We'll walk you through setting up Viem and Ethers.js with Alchemy and show you common use cases.
-
-# Getting Started with Optimism
-
-This guide assumes you already have an [Alchemy account](https://alchemy.com/?r=e68b2f77-7fc7-4ef7-8e9c-cdfea869b9b5) and access to our [Dashboard](https://dashboard.alchemyapi.io).
-
-## 1. Create an Alchemy Key
-
-To access Alchemy's free node infrastructure, you need an API key to authenticate your requests.
-
-You can [create API keys from the dashboard](http://dashboard.alchemyapi.io). Check out this video on how to create an app, replacing the chain "Ethereum" with "Optimism".
-
-Or follow the written steps below:
-
-First, navigate to the "create app" button in the "Apps" tab.
-
-
-
-Fill in the details under "Create App" to get your new key. You can also see apps you previously made and those made by your team here. Make sure to select the Optimism chain.
-
-Pull existing keys by clicking on "View Key" for any app.
-
-
-
-You can also pull existing API keys by hovering over "Apps" and selecting one. You can "View Key" here, as well as "Edit App" to whitelist specific domains, see several developer tools, and view analytics.
-
-## 2. Install and set up Web3 libraries
-
-To get started with Optimism, you can use either Viem or Ethers.js. Create a project and install your preferred library:
-
-
- ```shell Viem
- mkdir your-project-name
- cd your-project-name
- npm init -y
- npm install viem
- ```
-
- ```shell Ethers.js
- mkdir your-project-name
- cd your-project-name
- npm init -y
- npm install ethers
- ```
-
-
-Next, create a file named `index.js` and add the following contents:
-
-
- Replace `demo` with your Alchemy API key from the dashboard.
-
-
-
- ```javascript Viem
- import { createPublicClient, http } from 'viem'
- import { optimism } from 'viem/chains'
-
- const client = createPublicClient({
- chain: optimism,
- transport: http('https://opt-mainnet.g.alchemy.com/v2/demo') // Replace 'demo' with your API key
- })
-
- async function main() {
- const latestBlock = await client.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- import { JsonRpcProvider } from 'ethers'
-
- const provider = new JsonRpcProvider('https://opt-mainnet.g.alchemy.com/v2/demo') // Replace 'demo' with your API key
-
- async function main() {
- const latestBlock = await provider.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
-
- main()
- ```
-
-
-Unfamiliar with the async stuff? Check out this [Medium post](https://betterprogramming.pub/understanding-async-await-in-javascript-1d81bb079b2c).
-
-## 3. Run your dApp using Node
-
-
- ```shell shell
- node index.js
- ```
-
-
-You should now see the latest block number output in your console!
-
-
- ```shell shell
- The latest block number is 11043912
- ```
-
-
-Below, we'll list a number of examples on how to make common requests on Optimism or EVM blockchains.
-
-# [How to Get the Latest Block Number on Optimism](/reference/eth-blocknumber-optimism)
-
-If you're looking for the latest block on Optimism, you can use the following:
-
-
- ```javascript Viem
- async function main() {
- const latestBlock = await client.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const latestBlock = await provider.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
-
- main()
- ```
-
-
-# [How to Get a Block By Its Block Hash on Optimism](/reference/eth-getblockbyhash-optimism)
-
-Every block on Optimism corresponds to a specific hash. If you'd like to look up a block by its hash, you can use the following code:
-
-
- ```javascript Viem
- async function main() {
- const block = await client.getBlock({
- blockHash: '0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3'
- })
- console.log(block)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const block = await provider.getBlock(
- '0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3'
- )
- console.log(block)
- }
-
- main()
- ```
-
-
-# [How to Get a Block By Its Block Number on Optimism](/reference/eth-getblockbynumber-optimism)
-
-Every block on Optimism corresponds to a specific number. If you'd like to look up a block by its number, you can use the following code:
-
-
- ```javascript Viem
- async function main() {
- const block = await client.getBlock({
- blockNumber: 15221026n
- })
- console.log(block)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const block = await provider.getBlock(15221026)
- console.log(block)
- }
-
- main()
- ```
-
-
-# [How to Get Logs for an Optimism Transaction](/reference/eth-getlogs-optimism)
-
-Logs are essentially a published list of user-defined events that have happened on the blockchain during an Optimism transaction. You can learn more about them in [Understanding Logs: Deep Dive into eth\_getLogs](/docs/deep-dive-into-eth_getlogs).
-
-Here's an example on how to write a getLogs query on Optimism:
-
-
- ```javascript Viem
- async function main() {
- const logs = await client.getLogs({
- address: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
- topics: [
- '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
- ],
- blockHash: '0x49664d1de6b3915d7e6fa297ff4b3d1c5328b8ecf2ff0eefb912a4dc5f6ad4a0',
- })
- console.log(logs)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const logs = await provider.getLogs({
- address: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
- topics: [
- '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
- ],
- blockHash: '0x49664d1de6b3915d7e6fa297ff4b3d1c5328b8ecf2ff0eefb912a4dc5f6ad4a0',
- })
- console.log(logs)
- }
-
- main()
- ```
-
-
-# [How to Make an Eth\_Call on Optimism](/reference/eth-call-optimism)
-
-An eth\_call in Optimism is essentially a way to execute a message call immediately without creating a transaction on the blockchain. It can be used to query internal contract state, to execute validations coded into a contract or even to test what the effect of a transaction would be without running it live.
-
-Here's an example on how to write a call query on Optimism:
-
-
- ```javascript Viem
- async function main() {
- const result = await client.call({
- to: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
- gas: 0x76c0n,
- gasPrice: 0x9184e72a000n,
- data: '0x3b3b57debf074faa138b72c65adbdcfb329847e4f2c04bde7f7dd7fcad5a52d2f395a558',
- })
- console.log(result)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const result = await provider.call({
- to: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
- gasLimit: '0x76c0',
- gasPrice: '0x9184e72a000',
- data: '0x3b3b57debf074faa138b72c65adbdcfb329847e4f2c04bde7f7dd7fcad5a52d2f395a558',
- })
- console.log(result)
- }
-
- main()
- ```
-
-
-# [How to Get a Transaction by Its Hash on Optimism](/reference/eth-gettransactionbyhash-optimism)
-
-Every transaction on Optimism corresponds to a specific hash. If you'd like to look up a transaction by its hash, you can use the following code:
-
-
- ```javascript Viem
- async function main() {
- const tx = await client.getTransaction({
- hash: '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b'
- })
- console.log(tx)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const tx = await provider.getTransaction(
- '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b'
- )
- console.log(tx)
- }
-
- main()
- ```
-
-
-# [How to Get a Transaction Receipt on Optimism](/reference/eth-gettransactionreceipt-optimism)
-
-Every transaction on Optimism has an associated receipt with metadata about the transaction, such as the gas used and logs printed during the transaction. If you'd like to look up a transaction's receipt, you can use the following code:
-
-
- ```javascript Viem
- async function main() {
- const txReceipt = await client.getTransactionReceipt({
- hash: '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b'
- })
- console.log(txReceipt)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const txReceipt = await provider.getTransactionReceipt(
- '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b'
- )
- console.log(txReceipt)
- }
-
- main()
- ```
-
-
-# [How to get a User's Transaction Count on Optimism](/reference/eth-gettransactioncount-optimism)
-
-The number of transactions a user has sent is particularly important when it comes to calculating the [nonce for sending new transactions on Optimism](/docs/ethereum-transactions-pending-mined-dropped-replaced). Without it, you'll be unable to send new transactions because your nonce won't be set correctly.
-
-
- ```javascript Viem
- async function main() {
- const txCount = await client.getTransactionCount({
- address: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
- })
- console.log(txCount)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const txCount = await provider.getTransactionCount(
- '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
- )
- console.log(txCount)
- }
-
- main()
- ```
-
-
-# [How to Fetch Historical Transactions on Optimism](/reference/alchemy-getassettransfers)
-
-Oftentimes, you'll want to look up a set of transactions on Optimism between a set of blocks, corresponding to a set of token types such as ERC20 or ERC721, or with certain attributes. Alchemy's proprietary Transfers API allows you to do so in milliseconds, rather than searching every block on the blockchain.
-
-
- ```javascript Fetch
- async function main() {
- const response = await fetch('https://opt-mainnet.g.alchemy.com/v2/demo', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({
- jsonrpc: '2.0',
- id: 0,
- method: 'alchemy_getAssetTransfers',
- params: [{
- fromBlock: '0x0',
- toBlock: 'latest',
- contractAddresses: ['0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d'],
- excludeZeroValue: true,
- category: ['erc721'],
- }]
- })
- })
- const data = await response.json()
- console.log(data.result)
- }
-
- main()
- ```
-
-
-# [How to Subscribe to New Blocks on Optimism](/reference/subscription-api)
-
-If you'd like to open a WebSocket subscription to send you a JSON object whenever a new block is published to the blockchain, you can set one up using the following syntax.
-
-
- ```javascript Viem
- import { createPublicClient, webSocket } from 'viem'
- import { optimism } from 'viem/chains'
-
- const client = createPublicClient({
- chain: optimism,
- transport: webSocket('wss://opt-mainnet.g.alchemy.com/v2/demo')
- })
-
- // Subscription for new blocks on Optimism
- const unsubscribe = client.watchBlocks({
- onBlock: (block) => {
- console.log('The latest block number is', block.number)
- }
- })
- ```
-
- ```javascript Ethers.js
- import { WebSocketProvider } from 'ethers'
-
- const provider = new WebSocketProvider('wss://opt-mainnet.g.alchemy.com/v2/demo')
-
- // Subscription for new blocks on Optimism
- provider.on('block', (blockNumber) => {
- console.log('The latest block number is', blockNumber)
- })
- ```
-
-
-# [How to Estimate the Gas of a Transaction on Optimism](/reference/eth-estimategas-optimism)
-
-Oftentimes, you'll need to calculate how much gas a particular transaction will use on the blockchain to understand the maximum amount that you'll pay on that transaction. This example will return the gas used by the specified transaction:
-
-
- ```javascript Viem
- import { parseEther } from 'viem'
-
- async function main() {
- const gasEstimate = await client.estimateGas({
- // Wrapped ETH address on Optimism
- to: '0x4200000000000000000000000000000000000006',
- // `function deposit() payable`
- data: '0xd0e30db0',
- // 1 ether
- value: parseEther('1.0'),
- })
- console.log(gasEstimate)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- import { parseEther } from 'ethers'
-
- async function main() {
- const gasEstimate = await provider.estimateGas({
- // Wrapped ETH address on Optimism
- to: '0x4200000000000000000000000000000000000006',
- // `function deposit() payable`
- data: '0xd0e30db0',
- // 1 ether
- value: parseEther('1.0'),
- })
- console.log(gasEstimate)
- }
-
- main()
- ```
-
-
-# [How to Get the Current Gas Price in Optimism](/reference/eth-gasprice-optimism)
-
-You can retrieve the current gas price in wei using this method:
-
-
- ```javascript Viem
- async function main() {
- const gasPrice = await client.getGasPrice()
- console.log(gasPrice)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const gasPrice = await provider.getGasPrice()
- console.log(gasPrice)
- }
-
- main()
- ```
-
diff --git a/fern/api-reference/opbnb-paid-tier/opbnb-chain-api-faq.mdx b/fern/api-reference/opbnb-paid-tier/opbnb-chain-api-faq.mdx
index b79001fab..b983bd896 100644
--- a/fern/api-reference/opbnb-paid-tier/opbnb-chain-api-faq.mdx
+++ b/fern/api-reference/opbnb-paid-tier/opbnb-chain-api-faq.mdx
@@ -49,7 +49,7 @@ opBNB uses BNB, Binance Smart Chain's native cryptocurrency, for transaction fee
## What methods does Alchemy support for the opBNB API?
-You can find the list of all the methods Alchemy supports for the opBNB API on [opBNB API Endpoints](/reference/opbnb-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the opBNB API on the [opBNB API Endpoints](/docs/chains#opbnb-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/opbnb-paid-tier/opbnb-chain-api-quickstart.mdx b/fern/api-reference/opbnb-paid-tier/opbnb-chain-api-quickstart.mdx
index 38f8da468..eeee042e8 100644
--- a/fern/api-reference/opbnb-paid-tier/opbnb-chain-api-quickstart.mdx
+++ b/fern/api-reference/opbnb-paid-tier/opbnb-chain-api-quickstart.mdx
@@ -1,107 +1,98 @@
---
title: opBNB Chain API Quickstart
-description: Get started building on opBNB chain and using the JSON-RPC API
-subtitle: Get started building on opBNB chain and using the JSON-RPC API
+description: How to get started building on opBNB using Alchemy
+subtitle: How to get started building on opBNB using Alchemy
slug: reference/opbnb-chain-api-quickstart
---
-*To use the opBNB Chain API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
opBNB is an EVM-compatible blockchain designed to provide high performance, scalability, and security for decentralized applications (dApps). Known for its efficient transaction processing and low costs, opBNB offers a robust environment for deploying Ethereum-based applications.
-***
-
-## What is the opBNB Chain API?
-
-The opBNB Chain API facilitates interaction with the opBNB network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with opBNB both intuitive and straightforward.
-
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
+The opBNB API facilitates interaction with the opBNB network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with opBNB both intuitive and straightforward.
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+## Send Your First Request on Alchemy
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an opBNB client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir opbnb-api-quickstart
- cd opbnb-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir opbnb-api-quickstart
- cd opbnb-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `opbnb-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { opBNB } from "viem/chains";
+
+const client = createPublicClient({
+ chain: opBNB,
+ transport: http("https://opbnb-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the opBNB network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://opbnb-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (BNB):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the opBNB Chain, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on opBNB Chain (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Block Number: 0x6d68e
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# opBNB APIs
-Well done! You've just made your first request to the opBNB Chain API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on opBNB Chain](/reference/opbnb-api-endpoints) and start building your dApps on it!
+For the full list of opBNB APIs, see the [opBNB API Endpoints](/docs/chains#opbnb-apis).
diff --git a/fern/api-reference/plasma/plasma-api-faq.mdx b/fern/api-reference/plasma/plasma-api-faq.mdx
index 6dcfcd237..bc8d61ed2 100644
--- a/fern/api-reference/plasma/plasma-api-faq.mdx
+++ b/fern/api-reference/plasma/plasma-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Plasma is EVM compatible.
Plasma uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Plasma network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Plasma?
-Plasma supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Plasma API endpoints documentation for a complete list.
+Plasma supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Plasma API Endpoints](/docs/chains#plasma-apis) for a complete list.
## What is a Plasma API key?
When accessing the Plasma network via a node provider like Alchemy, Plasma developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/plasma/plasma-api-quickstart.mdx b/fern/api-reference/plasma/plasma-api-quickstart.mdx
index 2b54e309f..0ddb82065 100644
--- a/fern/api-reference/plasma/plasma-api-quickstart.mdx
+++ b/fern/api-reference/plasma/plasma-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: Plasma API Quickstart
-description: How to get started building on Plasma and using the JSON-RPC API
-subtitle: How to get started building on Plasma and using the JSON-RPC API
+description: How to get started building on Plasma using Alchemy
+subtitle: How to get started building on Plasma using Alchemy
slug: reference/plasma-api-quickstart
---
-*To use the Plasma API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Plasma is an EVM-compatible Layer-1 purpose-built for stablecoins, using PlasmaBFT (Fast HotStuff) and a native Bitcoin bridge to enable near-instant, zero-fee USD₮ transfers and confidential payments.
-## What is the Plasma API?
-
The Plasma API allows interaction with the Plasma network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Plasma client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir plasma-api-quickstart
- cd plasma-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir plasma-api-quickstart
- cd plasma-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const plasma = defineChain({
+ id: 3338,
+ name: "Plasma",
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://plasma-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: plasma,
+ transport: http("https://plasma-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `plasma-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://plasma-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Plasma network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Plasma's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Plasma APIs
-Congratulations! You've made your first request to the Plasma network. You can now explore the various JSON-RPC methods available on Plasma and start building your dApps on this innovative platform.
+For the full list of Plasma APIs, see the [Plasma API Endpoints](/docs/chains#plasma-apis).
diff --git a/fern/api-reference/polygon-pos/polygon-api-faq.mdx b/fern/api-reference/polygon-pos/polygon-api-faq.mdx
index 08d2ec48c..228fd5fd8 100644
--- a/fern/api-reference/polygon-pos/polygon-api-faq.mdx
+++ b/fern/api-reference/polygon-pos/polygon-api-faq.mdx
@@ -87,7 +87,7 @@ Some of the most popular dApps on Polygon include KyberSwap, QuickSwap, ZED RUN,
## What methods does Alchemy support for the Polygon API?
-You can find the list of all the methods Alchemy support for the Polygon API on the [Polygon API Endpoints](/reference/polygon-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Polygon API on the [Polygon API Endpoints](/docs/chains#polygon-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/polygon-pos/polygon-pos-api-quickstart/polygon-sdk-examples.mdx b/fern/api-reference/polygon-pos/polygon-pos-api-quickstart/polygon-sdk-examples.mdx
deleted file mode 100644
index 8031e14b4..000000000
--- a/fern/api-reference/polygon-pos/polygon-pos-api-quickstart/polygon-sdk-examples.mdx
+++ /dev/null
@@ -1,479 +0,0 @@
----
-title: Polygon API Examples
-description: Real-world examples on how to query information from Polygon using modern Web3 libraries.
-subtitle: Real-world examples on how to query information from Polygon using modern Web3 libraries.
-slug: reference/polygon-sdk-examples
----
-
-If you're looking to start querying Polygon blockchain data, here's the place to start! We'll walk you through setting up Viem and Ethers.js with Alchemy and show you common use cases.
-
-# Getting Started with Polygon
-
-This guide assumes you already have an [Alchemy account](https://alchemy.com/?r=e68b2f77-7fc7-4ef7-8e9c-cdfea869b9b5) and access to our [Dashboard](https://dashboard.alchemyapi.io).
-
-## 1. Create an Alchemy Key
-
-To access Alchemy's free node infrastructure, you need an API key to authenticate your requests.
-
-You can [create API keys from the dashboard](http://dashboard.alchemyapi.io). Check out this video on how to create an app, replacing the chain "Ethereum" with "Polygon".
-
-Or follow the written steps below:
-
-First, navigate to the "create app" button in the "Apps" tab.
-
-
-
-Fill in the details under "Create App" to get your new key. You can also see apps you previously made and those made by your team here. Make sure to select the Polygon chain.
-
-Pull existing keys by clicking on "View Key" for any app.
-
-
-
-You can also pull existing API keys by hovering over "Apps" and selecting one. You can "View Key" here, as well as "Edit App" to whitelist specific domains, see several developer tools, and view analytics.
-
-## 2. Install and set up Web3 libraries
-
-To get started with Polygon, you can use either Viem or Ethers.js. Create a project and install your preferred library:
-
-
- ```shell Viem
- mkdir your-project-name
- cd your-project-name
- npm init -y
- npm install viem
- ```
-
- ```shell Ethers.js
- mkdir your-project-name
- cd your-project-name
- npm init -y
- npm install ethers
- ```
-
-
-Next, create a file named `index.js` and add the following contents:
-
-
- Replace `demo` with your Alchemy API key from the dashboard.
-
-
-
- ```javascript Viem
- import { createPublicClient, http } from 'viem'
- import { polygon } from 'viem/chains'
-
- const client = createPublicClient({
- chain: polygon,
- transport: http('https://polygon-mainnet.g.alchemy.com/v2/demo') // Replace 'demo' with your API key
- })
-
- async function main() {
- const latestBlock = await client.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- import { JsonRpcProvider } from 'ethers'
-
- const provider = new JsonRpcProvider('https://polygon-mainnet.g.alchemy.com/v2/demo') // Replace 'demo' with your API key
-
- async function main() {
- const latestBlock = await provider.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
-
- main()
- ```
-
-
-Unfamiliar with the async stuff? Check out this [Medium post](https://betterprogramming.pub/understanding-async-await-in-javascript-1d81bb079b2c).
-
-## 3. Run your dApp using Node
-
-
- ```shell shell
- node index.js
- ```
-
-
-You should now see the latest block number output in your console!
-
-
- ```shell shell
- The latest block number is 11043912
- ```
-
-
-Below, we'll list a number of examples on how to make common requests on Polygon or EVM blockchains.
-
-# [How to Get the Latest Block Number on Polygon](/reference/eth-blocknumber-polygon)
-
-If you're looking for the latest block on Polygon, you can use the following:
-
-
- ```javascript Viem
- async function main() {
- const latestBlock = await client.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const latestBlock = await provider.getBlockNumber()
- console.log('The latest block number is', latestBlock)
- }
-
- main()
- ```
-
-
-# [How to Get a Block By Its Block Hash on Polygon](/reference/eth-getblockbyhash-polygon)
-
-Every block on Polygon corresponds to a specific hash. If you'd like to look up a block by its hash, you can use the following code:
-
-
- ```javascript Viem
- async function main() {
- const block = await client.getBlock({
- blockHash: '0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3'
- })
- console.log(block)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const block = await provider.getBlock(
- '0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3'
- )
- console.log(block)
- }
-
- main()
- ```
-
-
-# [How to Get a Block By Its Block Number on Polygon](/reference/eth-getblockbynumber-polygon)
-
-Every block on Polygon corresponds to a specific number. If you'd like to look up a block by its number, you can use the following code:
-
-
- ```javascript Viem
- async function main() {
- const block = await client.getBlock({
- blockNumber: 15221026n
- })
- console.log(block)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const block = await provider.getBlock(15221026)
- console.log(block)
- }
-
- main()
- ```
-
-
-# [How to Get Logs for a Polygon Transaction](/reference/eth-getlogs-polygon)
-
-Logs are essentially a published list of user-defined events that have happened on the blockchain during a Polygon transaction. You can learn more about them in [Understanding Logs: Deep Dive into eth\_getLogs](/docs/deep-dive-into-eth_getlogs).
-
-Here's an example on how to write a getLogs query on Polygon:
-
-
- ```javascript Viem
- async function main() {
- const logs = await client.getLogs({
- address: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
- topics: [
- '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
- ],
- blockHash: '0x49664d1de6b3915d7e6fa297ff4b3d1c5328b8ecf2ff0eefb912a4dc5f6ad4a0',
- })
- console.log(logs)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const logs = await provider.getLogs({
- address: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
- topics: [
- '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
- ],
- blockHash: '0x49664d1de6b3915d7e6fa297ff4b3d1c5328b8ecf2ff0eefb912a4dc5f6ad4a0',
- })
- console.log(logs)
- }
-
- main()
- ```
-
-
-# [How to Make an Eth\_Call on Polygon](/reference/eth-call-polygon)
-
-An eth\_call in Polygon is essentially a way to execute a message call immediately without creating a transaction on the blockchain. It can be used to query internal contract state, to execute validations coded into a contract or even to test what the effect of a transaction would be without running it live.
-
-Here's an example on how to write a call query on Polygon:
-
-
- ```javascript Viem
- async function main() {
- const result = await client.call({
- to: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
- gas: 0x76c0n,
- gasPrice: 0x9184e72a000n,
- data: '0x3b3b57debf074faa138b72c65adbdcfb329847e4f2c04bde7f7dd7fcad5a52d2f395a558',
- })
- console.log(result)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const result = await provider.call({
- to: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
- gasLimit: '0x76c0',
- gasPrice: '0x9184e72a000',
- data: '0x3b3b57debf074faa138b72c65adbdcfb329847e4f2c04bde7f7dd7fcad5a52d2f395a558',
- })
- console.log(result)
- }
-
- main()
- ```
-
-
-# [How to Get a Transaction by Its Hash on Polygon](/reference/eth-gettransactionbyhash-polygon)
-
-Every transaction on Polygon corresponds to a specific hash. If you'd like to look up a transaction by its hash, you can use the following code:
-
-
- ```javascript Viem
- async function main() {
- const tx = await client.getTransaction({
- hash: '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b'
- })
- console.log(tx)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const tx = await provider.getTransaction(
- '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b'
- )
- console.log(tx)
- }
-
- main()
- ```
-
-
-# [How to Get a Transaction Receipt on Polygon](/reference/eth-gettransactionreceipt-polygon)
-
-Every transaction on Polygon has an associated receipt with metadata about the transaction, such as the gas used and logs printed during the transaction. If you'd like to look up a transaction's receipt, you can use the following code:
-
-
- ```javascript Viem
- async function main() {
- const txReceipt = await client.getTransactionReceipt({
- hash: '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b'
- })
- console.log(txReceipt)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const txReceipt = await provider.getTransactionReceipt(
- '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b'
- )
- console.log(txReceipt)
- }
-
- main()
- ```
-
-
-# [How to get a User's Transaction Count on Polygon](/reference/eth-gettransactioncount-polygon)
-
-The number of transactions a user has sent is particularly important when it comes to calculating the [nonce for sending new transactions on Polygon](/docs/ethereum-transactions-pending-mined-dropped-replaced). Without it, you'll be unable to send new transactions because your nonce won't be set correctly.
-
-
- ```javascript Viem
- async function main() {
- const txCount = await client.getTransactionCount({
- address: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
- })
- console.log(txCount)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const txCount = await provider.getTransactionCount(
- '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
- )
- console.log(txCount)
- }
-
- main()
- ```
-
-
-# [How to Fetch Historical Transactions on Polygon](/reference/alchemy-getassettransfers)
-
-Oftentimes, you'll want to look up a set of transactions on Polygon between a set of blocks, corresponding to a set of token types such as ERC20 or ERC721, or with certain attributes. Alchemy's proprietary Transfers API allows you to do so in milliseconds, rather than searching every block on the blockchain.
-
-
- ```javascript Fetch
- async function main() {
- const response = await fetch('https://polygon-mainnet.g.alchemy.com/v2/demo', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({
- jsonrpc: '2.0',
- id: 0,
- method: 'alchemy_getAssetTransfers',
- params: [{
- fromBlock: '0x0',
- toBlock: 'latest',
- contractAddresses: ['0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d'],
- excludeZeroValue: true,
- category: ['erc721'],
- }]
- })
- })
- const data = await response.json()
- console.log(data.result)
- }
-
- main()
- ```
-
-
-# [How to Subscribe to New Blocks on Polygon](/reference/subscription-api)
-
-If you'd like to open a WebSocket subscription to send you a JSON object whenever a new block is published to the blockchain, you can set one up using the following syntax.
-
-
- ```javascript Viem
- import { createPublicClient, webSocket } from 'viem'
- import { polygon } from 'viem/chains'
-
- const client = createPublicClient({
- chain: polygon,
- transport: webSocket('wss://polygon-mainnet.g.alchemy.com/v2/demo')
- })
-
- // Subscription for new blocks on Polygon
- const unsubscribe = client.watchBlocks({
- onBlock: (block) => {
- console.log('The latest block number is', block.number)
- }
- })
- ```
-
- ```javascript Ethers.js
- import { WebSocketProvider } from 'ethers'
-
- const provider = new WebSocketProvider('wss://polygon-mainnet.g.alchemy.com/v2/demo')
-
- // Subscription for new blocks on Polygon
- provider.on('block', (blockNumber) => {
- console.log('The latest block number is', blockNumber)
- })
- ```
-
-
-# [How to Estimate the Gas of a Transaction on Polygon](/reference/eth-estimategas-polygon)
-
-Oftentimes, you'll need to calculate how much gas a particular transaction will use on the blockchain to understand the maximum amount that you'll pay on that transaction. This example will return the gas used by the specified transaction:
-
-
- ```javascript Viem
- import { parseEther } from 'viem'
-
- async function main() {
- const gasEstimate = await client.estimateGas({
- // Wrapped MATIC address on Polygon
- to: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',
- // `function deposit() payable`
- data: '0xd0e30db0',
- // 1 MATIC
- value: parseEther('1.0'),
- })
- console.log(gasEstimate)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- import { parseEther } from 'ethers'
-
- async function main() {
- const gasEstimate = await provider.estimateGas({
- // Wrapped MATIC address on Polygon
- to: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',
- // `function deposit() payable`
- data: '0xd0e30db0',
- // 1 MATIC
- value: parseEther('1.0'),
- })
- console.log(gasEstimate)
- }
-
- main()
- ```
-
-
-# [How to Get the Current Gas Price in Polygon](/reference/eth-gasprice-polygon)
-
-You can retrieve the current gas price in wei using this method:
-
-
- ```javascript Viem
- async function main() {
- const gasPrice = await client.getGasPrice()
- console.log(gasPrice)
- }
-
- main()
- ```
-
- ```javascript Ethers.js
- async function main() {
- const gasPrice = await provider.getGasPrice()
- console.log(gasPrice)
- }
-
- main()
- ```
-
diff --git a/fern/api-reference/polygon-zkevm/polygon-zkevm-api-faq/polygon-zkevm-api-faq.mdx b/fern/api-reference/polygon-zkevm/polygon-zkevm-api-faq/polygon-zkevm-api-faq.mdx
index cfb7fb339..11eaf0ef3 100644
--- a/fern/api-reference/polygon-zkevm/polygon-zkevm-api-faq/polygon-zkevm-api-faq.mdx
+++ b/fern/api-reference/polygon-zkevm/polygon-zkevm-api-faq/polygon-zkevm-api-faq.mdx
@@ -51,7 +51,7 @@ The testnet you should use for Polygon zkEVM is the zkEVM Public Testnet. By con
## What methods does Alchemy support for the Polygon zkEVM API?
-You can find the list of all the methods Alchemy support for the Polygon zkEVM API on the [Polygon zkEVM API Endpoints](/reference/polygon-zkevm-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Polygon zkEVM API on the [Polygon zkEVM API Endpoints](/docs/chains#polygon-zkevm-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/polygon-zkevm/polygon-zkevm-api-quickstart.mdx b/fern/api-reference/polygon-zkevm/polygon-zkevm-api-quickstart.mdx
index b471b0d9e..2a8a4bb68 100644
--- a/fern/api-reference/polygon-zkevm/polygon-zkevm-api-quickstart.mdx
+++ b/fern/api-reference/polygon-zkevm/polygon-zkevm-api-quickstart.mdx
@@ -1,114 +1,98 @@
---
title: Polygon zkEVM API Quickstart
-description: How to get started building on Polygon zkEVM and using the JSON-RPC API
-subtitle: How to get started building on Polygon zkEVM and using the JSON-RPC API
+description: How to get started building on Polygon zkEVM using Alchemy
+subtitle: How to get started building on Polygon zkEVM using Alchemy
slug: reference/polygon-zkevm-api-quickstart
---
-*To use the Polygon zkEVM API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-# Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Polygon zkEVM is a decentralized Ethereum Layer 2 network that uses cryptographic zero-knowledge proofs to offer validity and quick finality to off-chain transactions. Emulating the Ethereum Virtual Machine (EVM), zkEVM allows for transparent deployment of existing Ethereum smart contracts while enhancing scalability, security, and transaction throughput. By utilizing zkEVM, developers can build decentralized applications with quick finality and improved performance, all within the Ethereum ecosystem.
-# What is Polygon zkEVM API?
-
The Polygon zkEVM API is a collection of JSON-RPC methods that enable developers to interact with the Polygon zkEVM network. Using the endpoints provided by the API, developers can access up-to-date network data and submit transactions to it.
-# Getting Started Instructions
-
-## 1. Choose a Package Manager (npm or yarn)
-
-Before you begin, you'll need to choose a package manager to manage dependencies in your project. The two most popular package managers for Node.js are `npm` and `yarn`. You can choose the one you're most comfortable with.
-
-### npm
-
-To get started with `npm`, follow the documentation to install Node.js and `npm` for your operating system: [https://docs.npmjs.com/downloading-and-installing-node-js-and-npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
+## Send Your First Request on Alchemy
-### yarn
-
-To get started with `yarn`, follow these steps: [https://classic.yarnpkg.com/lang/en/docs/install](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable)
-
-## 2. Set up your project (npm or yarn)
-
-Let's start by setting up a simple Node.js project. Open your terminal and run the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Polygon zkEVM client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir alchemy-polygon-zkevm-api
- cd alchemy-polygon-zkevm-api
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir alchemy-polygon-zkevm-api
- cd alchemy-polygon-zkevm-api
- yarn init --yes
+ yarn add viem
```
-This will create a new directory called `alchemy-polygon-zkevm-api` and initialize a new Node.js project in it.
+## Create Client Connected to Alchemy
-## 3. Make Your First Request
+
+```js
+import { createPublicClient, http } from "viem";
+import { polygonZkEvm } from "viem/chains";
+
+const client = createPublicClient({
+ chain: polygonZkEvm,
+ transport: http("https://polygonzkevm-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-To make requests to the Polygon zkEVM API, you'll need to use an HTTP client. In this guide, we'll use Axios, a popular HTTP client for Node.js. Install Axios as a dependency in your project with the command below:
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-
- ```shell npm
- npm install axios
- ```
+## Get Latest Block Number
- ```shell yarn
- yarn add axios
- ```
+
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, let's create a script that will make a request to the `eth_blockNumber` JSON-RPC method on Polygon zkEVM. Create a new file called `index.js` in your project directory and add the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const apiKey = 'YOUR_API_KEY'; // Replace with your Alchemy API key
- const url = `https://polygonzkevm-mainnet.g.alchemy.com/v2/${apiKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `YOUR_API_KEY` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-## 4. Run Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To run the script and make the request to the Polygon zkEVM API, execute the following command in your terminal:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-As a result, should see the current block number on Polygon zkEVM (in hex format) printed to the console:
+## Fetch Transaction Receipt
- ```shell shell
- Block Number: 0x6d68e
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-# Next Steps
+# Polygon zkEVM APIs
-Congratulations! You've successfully made your first request to the Polygon zkEVM API using Alchemy. From here, you can explore the various [JSON-RPC methods available on Polygon zkEVM](/reference/polygon-api-endpoints) and start building your decentralized applications on it!
+For the full list of Polygon zkEVM APIs, see the [Polygon zkEVM API Endpoints](/docs/chains#polygon-zkevm-apis).
diff --git a/fern/api-reference/rise/rise-api-faq.mdx b/fern/api-reference/rise/rise-api-faq.mdx
index 9f295a3f3..65a760059 100644
--- a/fern/api-reference/rise/rise-api-faq.mdx
+++ b/fern/api-reference/rise/rise-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Rise is EVM compatible.
Rise uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Rise network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Rise?
-Rise supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Rise API endpoints documentation for a complete list.
+Rise supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Rise API Endpoints](/docs/chains#rise-apis) for a complete list.
## What is a Rise API key?
When accessing the Rise network via a node provider like Alchemy, Rise developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/rise/rise-api-quickstart.mdx b/fern/api-reference/rise/rise-api-quickstart.mdx
index bd580caae..ebc750598 100644
--- a/fern/api-reference/rise/rise-api-quickstart.mdx
+++ b/fern/api-reference/rise/rise-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: Rise API Quickstart
-description: How to get started building on Rise and using the JSON-RPC API
-subtitle: How to get started building on Rise and using the JSON-RPC API
+description: How to get started building on Rise using Alchemy
+subtitle: How to get started building on Rise using Alchemy
slug: reference/rise-api-quickstart
---
-*To use the Rise API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
-## Introduction
-
-RISE is an Ethereum Layer-2 with a parallel EVM and a “based” hybrid rollup design that targets sub-5 ms confirmations and 100k+ TPS.
-
-## What is the Rise API?
+RISE is an Ethereum Layer-2 with a parallel EVM and a "based" hybrid rollup design that targets sub-5 ms confirmations and 100k+ TPS.
The Rise API allows interaction with the Rise network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Rise client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir rise-api-quickstart
- cd rise-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir rise-api-quickstart
- cd rise-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const rise = defineChain({
+ id: 11155931,
+ name: "Rise",
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://rise-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: rise,
+ transport: http("https://rise-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `rise-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://rise-testnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Rise network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Rise's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Rise APIs
-Congratulations! You've made your first request to the Rise network. You can now explore the various JSON-RPC methods available on Rise and start building your dApps on this innovative platform.
+For the full list of Rise APIs, see the [Rise API Endpoints](/docs/chains#rise-apis).
diff --git a/fern/api-reference/ronin/ronin-api-faq.mdx b/fern/api-reference/ronin/ronin-api-faq.mdx
index 56be2fb6b..80b291200 100644
--- a/fern/api-reference/ronin/ronin-api-faq.mdx
+++ b/fern/api-reference/ronin/ronin-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Ronin is EVM compatible.
Ronin uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Ronin network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Ronin?
-Ronin supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Ronin API endpoints documentation for a complete list.
+Ronin supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Ronin API Endpoints](/docs/chains#ronin-apis) for a complete list.
## What is a Ronin API key?
When accessing the Ronin network via a node provider like Alchemy, Ronin developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/ronin/ronin-api-quickstart.mdx b/fern/api-reference/ronin/ronin-api-quickstart.mdx
index 99401aa67..edc9271cf 100644
--- a/fern/api-reference/ronin/ronin-api-quickstart.mdx
+++ b/fern/api-reference/ronin/ronin-api-quickstart.mdx
@@ -1,117 +1,98 @@
---
title: Ronin API Quickstart
-description: How to get started building on Ronin and using the JSON-RPC API
-subtitle: How to get started building on Ronin and using the JSON-RPC API
+description: How to get started building on Ronin using Alchemy
+subtitle: How to get started building on Ronin using Alchemy
slug: reference/ronin-api-quickstart
---
-*To use the Ronin API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Ronin is an EVM blockchain built for gaming, secured by Delegated Proof of Stake, and now adding Ronin zkEVM rollups so studios can launch low-fee L2s for their games.
-## What is the Ronin API?
-
The Ronin API allows interaction with the Ronin network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Ronin client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir ronin-api-quickstart
- cd ronin-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir ronin-api-quickstart
- cd ronin-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http } from "viem";
+import { ronin } from "viem/chains";
+
+const client = createPublicClient({
+ chain: ronin,
+ transport: http("https://ronin-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `ronin-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://ronin-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (RON):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Ronin network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Ronin's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Ronin APIs
-Congratulations! You've made your first request to the Ronin network. You can now explore the various JSON-RPC methods available on Ronin and start building your dApps on this innovative platform.
+For the full list of Ronin APIs, see the [Ronin API Endpoints](/docs/chains#ronin-apis).
diff --git a/fern/api-reference/rootstock/rootstock-api-quickstart.mdx b/fern/api-reference/rootstock/rootstock-api-quickstart.mdx
index 401ff9d39..a0cf7a3cd 100644
--- a/fern/api-reference/rootstock/rootstock-api-quickstart.mdx
+++ b/fern/api-reference/rootstock/rootstock-api-quickstart.mdx
@@ -1,101 +1,98 @@
---
title: Rootstock API Quickstart
-description: Get started building on Rootstock and using the JSON-RPC API
-subtitle: Get started building on Rootstock and using the JSON-RPC API
+description: How to get started building on Rootstock using Alchemy
+subtitle: How to get started building on Rootstock using Alchemy
slug: reference/rootstock-api-quickstart
---
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Rootstock is the first and longest-lasting Bitcoin sidechain, combining the security of Bitcoin's proof of work with Ethereum's smart contract capabilities. It's an open-source, EVM-compatible platform secured by over 60% of Bitcoin's hashing power, allowing developers to build trustless, innovative dApps within a thriving ecosystem.
-## What is the Rootstock API?
-
The Rootstock API allows interaction with the Rootstock network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+## Send Your First Request on Alchemy
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
-
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Rootstock client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir rootstock-api-quickstart
- cd rootstock-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir rootstock-api-quickstart
- cd rootstock-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `rootstock-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
-### 3. Make Your First Request
+
+```js
+import { createPublicClient, http } from "viem";
+import { rootstock } from "viem/chains";
+
+const client = createPublicClient({
+ chain: rootstock,
+ transport: http("https://rootstock-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
+
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://rootstock-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (RBTC):", Number(balance) / 1e18);
+```
-### 4. Run Your Script
-
-Execute your script to make a request to the Rootstock mainnet:
+## Read Block Data
- ```bash bash
- node index.js
- ```
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
-You should see the latest block information from Rootstock's mainnet outputted to your console:
+## Fetch a Transaction by Hash
-```shell
-Latest Block: 0x...
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
```
+
+
+## Fetch Transaction Receipt
+
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
+
-## Next Steps
+# Rootstock APIs
-Congratulations! You've made your first request to the Rootstock API on the mainnet. You can now explore the various [JSON-RPC methods available on Rootstock](/reference/rootstock-api-endpoints) and start building your dApps on this innovative platform.
+For the full list of Rootstock APIs, see the [Rootstock API Endpoints](/docs/chains#rootstock-apis).
diff --git a/fern/api-reference/scroll/scroll-chain-api-faq.mdx b/fern/api-reference/scroll/scroll-chain-api-faq.mdx
index 59d5fd87f..5cf6f1b51 100644
--- a/fern/api-reference/scroll/scroll-chain-api-faq.mdx
+++ b/fern/api-reference/scroll/scroll-chain-api-faq.mdx
@@ -45,7 +45,7 @@ Scroll Chain uses SCROLL, its native cryptocurrency, for transaction fees, gas,
## What methods does Alchemy support for the Scroll Chain API?
-You can find the list of all the methods Alchemy supports for the Scroll Chain API on [Scroll Chain API Endpoints](/reference/scroll-chain-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Scroll Chain API on the [Scroll API Endpoints](/docs/chains#scroll-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/scroll/scroll-chain-api-quickstart.mdx b/fern/api-reference/scroll/scroll-chain-api-quickstart.mdx
index b49687fa4..d1eca4a7e 100644
--- a/fern/api-reference/scroll/scroll-chain-api-quickstart.mdx
+++ b/fern/api-reference/scroll/scroll-chain-api-quickstart.mdx
@@ -1,107 +1,98 @@
---
title: Scroll Chain API Quickstart
-description: Get started building on Scroll and using the JSON-RPC API
-subtitle: Get started building on Scroll and using the JSON-RPC API
+description: How to get started building on Scroll using Alchemy
+subtitle: How to get started building on Scroll using Alchemy
slug: reference/scroll-api-quickstart
---
-*To use the Scroll Chain API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
-## Introduction
+Scroll is an EVM-compatible blockchain designed to provide scalability and efficiency for decentralized applications (dApps). Known for its high throughput and low transaction costs, Scroll offers a robust environment for deploying Ethereum-based applications.
-Scroll Chain is an EVM-compatible blockchain designed to provide scalability and efficiency for decentralized applications (dApps). Known for its high throughput and low transaction costs, Scroll Chain offers a robust environment for deploying Ethereum-based applications.
+The Scroll API facilitates interaction with the Scroll network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Scroll both intuitive and straightforward.
-***
+## Send Your First Request on Alchemy
-## What is the Scroll Chain API?
-
-The Scroll Chain API facilitates interaction with the Scroll network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Scroll Chain both intuitive and straightforward.
-
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
-
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
-
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Scroll client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir scroll-api-quickstart
- cd scroll-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir scroll-api-quickstart
- cd scroll-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `scroll-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { scroll } from "viem/chains";
+
+const client = createPublicClient({
+ chain: scroll,
+ transport: http("https://scroll-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the Scroll network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://scroll-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the Scroll Chain, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on Scroll Chain (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Block Number: 0x6d68e
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Scroll APIs
-Well done! You've just made your first request to the Scroll Chain API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on Scroll Chain](/reference/scroll-chain-api-endpoints) and start building your dApps on it!
+For the full list of Scroll APIs, see the [Scroll API Endpoints](/docs/chains#scroll-apis).
diff --git a/fern/api-reference/sei/sei-api-faq.mdx b/fern/api-reference/sei/sei-api-faq.mdx
index d146a414c..11de3f344 100644
--- a/fern/api-reference/sei/sei-api-faq.mdx
+++ b/fern/api-reference/sei/sei-api-faq.mdx
@@ -45,7 +45,7 @@ Sei uses SEI, its native cryptocurrency, for transaction fees, gas, and other ne
## What methods does Alchemy support for the Sei API?
-You can find the list of all the methods Alchemy supports for the Sei API on [Sei API Endpoints](/reference/sei-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Sei API on the [Sei API Endpoints](/docs/chains#sei-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/sei/sei-api-quickstart.mdx b/fern/api-reference/sei/sei-api-quickstart.mdx
index 12dd9756b..fc6628da7 100644
--- a/fern/api-reference/sei/sei-api-quickstart.mdx
+++ b/fern/api-reference/sei/sei-api-quickstart.mdx
@@ -1,107 +1,98 @@
---
title: Sei API Quickstart
-description: Get started building on Sei and using the JSON-RPC API
-subtitle: Get started building on Sei and using the JSON-RPC API
+description: How to get started building on Sei using Alchemy
+subtitle: How to get started building on Sei using Alchemy
slug: reference/sei-api-quickstart
---
-*To use the Sei API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Sei is a high-performance blockchain designed for decentralized finance (DeFi) applications. It offers fast transaction speeds, scalability, and a developer-friendly environment, making it an ideal platform for deploying DeFi applications and services.
-***
-
-## What is the Sei API?
-
The Sei API allows developers to interact with the Sei network through a collection of JSON-RPC methods. Given its compatibility with standard blockchain APIs, developers familiar with other blockchain JSON-RPC APIs will find working with Sei intuitive and straightforward.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
-
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+## Send Your First Request on Alchemy
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Sei client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir sei-api-quickstart
- cd sei-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir sei-api-quickstart
- cd sei-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `sei-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { sei } from "viem/chains";
+
+const client = createPublicClient({
+ chain: sei,
+ transport: http("https://sei-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the Sei network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://sei-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'sei_getBlockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (SEI):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the Sei network, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on Sei (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Block Number: 0x6d68e
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Sei APIs
-Well done! You've just made your first request to the Sei API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on Sei](/reference/sei-api-endpoints) and start building your dApps on it!
+For the full list of Sei APIs, see the [Sei API Endpoints](/docs/chains#sei-apis).
diff --git a/fern/api-reference/settlus/settlus-api-faq.mdx b/fern/api-reference/settlus/settlus-api-faq.mdx
index b576ccf40..eac896ad3 100644
--- a/fern/api-reference/settlus/settlus-api-faq.mdx
+++ b/fern/api-reference/settlus/settlus-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Settlus is EVM compatible.
Settlus uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Settlus network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Settlus?
-Settlus supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Settlus API endpoints documentation for a complete list.
+Settlus supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Settlus API Endpoints](/docs/chains#settlus-apis) for a complete list.
## What is a Settlus API key?
When accessing the Settlus network via a node provider like Alchemy, Settlus developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/settlus/settlus-api-quickstart.mdx b/fern/api-reference/settlus/settlus-api-quickstart.mdx
index ea60bb26f..c1c1586a9 100644
--- a/fern/api-reference/settlus/settlus-api-quickstart.mdx
+++ b/fern/api-reference/settlus/settlus-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: Settlus API Quickstart
-description: How to get started building on Settlus and using the JSON-RPC API
-subtitle: How to get started building on Settlus and using the JSON-RPC API
+description: How to get started building on Settlus using Alchemy
+subtitle: How to get started building on Settlus using Alchemy
slug: reference/settlus-api-quickstart
---
-*To use the Settlus API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Settlus is an OP Stack–based Ethereum Layer-2 for the creator economy, offering transparent settlement, programmable payouts, and on-chain royalty tools.
-## What is the Settlus API?
-
The Settlus API allows interaction with the Settlus network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Settlus client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir settlus-api-quickstart
- cd settlus-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir settlus-api-quickstart
- cd settlus-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const settlus = defineChain({
+ id: 5372,
+ name: "Settlus",
+ nativeCurrency: { name: "SETL", symbol: "SETL", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://settlus-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: settlus,
+ transport: http("https://settlus-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `settlus-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://settlus-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (SETL):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Settlus network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Settlus's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Settlus APIs
-Congratulations! You've made your first request to the Settlus network. You can now explore the various JSON-RPC methods available on Settlus and start building your dApps on this innovative platform.
+For the full list of Settlus APIs, see the [Settlus API Endpoints](/docs/chains#settlus-apis).
diff --git a/fern/api-reference/shape/shape-api-quickstart.mdx b/fern/api-reference/shape/shape-api-quickstart.mdx
index 18cef6833..086d012b1 100644
--- a/fern/api-reference/shape/shape-api-quickstart.mdx
+++ b/fern/api-reference/shape/shape-api-quickstart.mdx
@@ -1,101 +1,98 @@
---
title: Shape API Quickstart
-description: Get started building on Shape and using the JSON-RPC API
-subtitle: Get started building on Shape and using the JSON-RPC API
+description: How to get started building on Shape using Alchemy
+subtitle: How to get started building on Shape using Alchemy
slug: reference/shape-api-quickstart
---
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Shape is a chain for creators built on top of Ethereum. It's an open space where everyone is free to create, from fine art to experimental projects, fostering a unique cultural ecosystem. Shape offers creators the opportunity to claim back 80% of sequencer fees users spend interacting with their contracts, making it an attractive platform for innovative content creation.
-## What is the Shape API?
-
The Shape API allows interaction with the Shape network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+## Send Your First Request on Alchemy
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
-
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Shape client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir shape-api-quickstart
- cd shape-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir shape-api-quickstart
- cd shape-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `shape-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
-### 3. Make Your First Request
+
+```js
+import { createPublicClient, http } from "viem";
+import { shape } from "viem/chains";
+
+const client = createPublicClient({
+ chain: shape,
+ transport: http("https://shape-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
+
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://shape-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-### 4. Run Your Script
-
-Execute your script to make a request to the Shape mainnet:
+## Read Block Data
- ```bash bash
- node index.js
- ```
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
-You should see the latest block information from Shape's mainnet outputted to your console:
+## Fetch a Transaction by Hash
-```shell
-Latest Block: 0x...
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
```
+
+
+## Fetch Transaction Receipt
+
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
+
-## Next Steps
+# Shape APIs
-Congratulations! You've made your first request to the Shape API on the mainnet. You can now explore the various [JSON-RPC methods available on Shape](/reference/shape-api-endpoints) and start building your creative projects on this innovative platform.
+For the full list of Shape APIs, see the [Shape API Endpoints](/docs/chains#shape-apis).
diff --git a/fern/api-reference/solana/solana-api-faq.mdx b/fern/api-reference/solana/solana-api-faq.mdx
index 3ef1e1bcf..fbb6b0dd7 100644
--- a/fern/api-reference/solana/solana-api-faq.mdx
+++ b/fern/api-reference/solana/solana-api-faq.mdx
@@ -19,7 +19,7 @@ Explained in the [Solana API Quickstart Guide](/docs/solana).
## What methods does Alchemy support for the Solana API?
-You can find the list of all the methods Alchemy support for the Solana API on the [Solana API Endpoints](/reference/solana-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Solana API on the [Solana API Endpoints](/docs/chains#solana-apis) page.
## Can I see the Solana methods by category?
diff --git a/fern/api-reference/soneium/soneium-api-faq.mdx b/fern/api-reference/soneium/soneium-api-faq.mdx
index aff13d364..f34214942 100644
--- a/fern/api-reference/soneium/soneium-api-faq.mdx
+++ b/fern/api-reference/soneium/soneium-api-faq.mdx
@@ -11,7 +11,7 @@ Soneium is an innovative Ethereum Layer 2 blockchain platform developed by Sony
## What is the Soneium API?
-The Soneium API allows developers to interact with the Soneium network through a set of [JSON-RPC methods](/reference/soneium-api-endpoints) . It supports various operations such as smart contract deployment, transaction processing, and data retrieval, enabling developers to integrate Soneium's functionality into their applications.
+The Soneium API allows developers to interact with the Soneium network through a set of [JSON-RPC methods](/docs/chains#soneium-apis). It supports various operations such as smart contract deployment, transaction processing, and data retrieval, enabling developers to integrate Soneium's functionality into their applications.
## How can I get started using the Soneium API?
@@ -45,7 +45,7 @@ Soneium, as an Ethereum Layer 2 solution, uses ETH (Ethereum) for gas fees. This
## What methods does Alchemy support for the Soneium API?
-For a comprehensive list of methods supported by Alchemy for the Soneium API, please refer to the [Soneium API Endpoints](/reference/soneium-api-endpoints) documentation.
+For a comprehensive list of methods supported by Alchemy for the Soneium API, please refer to the [Soneium API Endpoints](/docs/chains#soneium-apis) documentation.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/soneium/soneium-api-quickstart.mdx b/fern/api-reference/soneium/soneium-api-quickstart.mdx
index d2083909f..97a8dd723 100644
--- a/fern/api-reference/soneium/soneium-api-quickstart.mdx
+++ b/fern/api-reference/soneium/soneium-api-quickstart.mdx
@@ -1,107 +1,98 @@
---
title: Soneium API Quickstart
-description: Get started building on Soneium and using the JSON-RPC API
-subtitle: Get started building on Soneium and using the JSON-RPC API
+description: How to get started building on Soneium using Alchemy
+subtitle: How to get started building on Soneium using Alchemy
slug: reference/soneium-api-quickstart
---
-*To use the Soneium API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Soneium is an innovative Ethereum Layer 2 blockchain platform developed by Sony Block Solutions Labs. It aims to integrate Web3 technologies into everyday life, creating an inclusive digital world where everyone can be a creator and innovator. Soneium offers a robust infrastructure for developers to build impactful decentralized applications (dApps) and digital assets, while providing users with a secure and user-friendly environment for interacting with blockchain technology.
-***
-
-## What is the Soneium API?
-
The Soneium API allows interaction with the Soneium network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
-
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+## Send Your First Request on Alchemy
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Soneium client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir soneium-api-quickstart
- cd soneium-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir soneium-api-quickstart
- cd soneium-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `soneium-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { soneium } from "viem/chains";
+
+const client = createPublicClient({
+ chain: soneium,
+ transport: http("https://soneium-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://soneium-minato.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Replace `yourAPIKey` with your actual Alchemy API key from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Soneium network:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Soneium's blockchain outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Latest Block: 0x...
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Soneium APIs
-Congratulations! You've made your first request to the Soneium API. You can now explore the various [JSON-RPC methods available on Soneium](/reference/soneium-api-endpoints) and start building your dApps on this innovative platform.
+For the full list of Soneium APIs, see the [Soneium API Endpoints](/docs/chains#soneium-apis).
diff --git a/fern/api-reference/sonic/sonic-api-faq.mdx b/fern/api-reference/sonic/sonic-api-faq.mdx
index d2b7e0976..a37ecc8a4 100644
--- a/fern/api-reference/sonic/sonic-api-faq.mdx
+++ b/fern/api-reference/sonic/sonic-api-faq.mdx
@@ -45,7 +45,7 @@ Sonic Chain uses the S Token, its native cryptocurrency, for transaction fees, g
## What methods does Alchemy support for the Sonic Chain API?
-You can find the list of all the methods Alchemy supports for the Sonic Chain API on [Sonic Chain API Endpoints](/reference/sonic-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the Sonic Chain API on the [Sonic API Endpoints](/docs/chains#sonic-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/sonic/sonic-api-quickstart.mdx b/fern/api-reference/sonic/sonic-api-quickstart.mdx
index 29b22f51e..d2c6cf271 100644
--- a/fern/api-reference/sonic/sonic-api-quickstart.mdx
+++ b/fern/api-reference/sonic/sonic-api-quickstart.mdx
@@ -1,103 +1,98 @@
---
title: Sonic Chain API Quickstart
-description: Get started building on Sonic and using the JSON-RPC API
-subtitle: Get started building on Sonic and using the JSON-RPC API
+description: How to get started building on Sonic using Alchemy
+subtitle: How to get started building on Sonic using Alchemy
slug: reference/sonic-api-quickstart
---
-*To use the Sonic Chain API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
-## Introduction
-
-Sonic Chain is an EVM-compatible, high-performance, scalable, and secure layer-1 blockchain. With over 10,000 TPS, one-second confirmation times, and low-cost transactions, it provides a robust platform for decentralized applications (dApps) and Ethereum-based deployments.
-
-## What is the Sonic API?
+Sonic is an EVM-compatible, high-performance, scalable, and secure layer-1 blockchain. With over 10,000 TPS, one-second confirmation times, and low-cost transactions, it provides a robust platform for decentralized applications (dApps) and Ethereum-based deployments.
The Sonic API allows interaction with the Sonic network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Sonic client connected to Alchemy and fetch the latest block number!
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
-
-### 2. Set Up Your Project
+
+ ```text npm
+ npm install --save viem
+ ```
-Open your terminal and execute the following commands to create and initialize your project:
+ ```text yarn
+ yarn add viem
+ ```
+
-```shell
-mkdir sonic-api-quickstart
-cd sonic-api-quickstart
-npm init --yes
-```
+## Create Client Connected to Alchemy
-```shell
-mkdir sonic-api-quickstart
-cd sonic-api-quickstart
-yarn init --yes
+
+```js
+import { createPublicClient, http } from "viem";
+import { sonic } from "viem/chains";
+
+const client = createPublicClient({
+ chain: sonic,
+ transport: http("https://sonic-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
```
+
-This creates a new directory named `sonic-api-quickstart` and initializes a Node.js project within it.
-
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = 'https://sonic-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (S):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Sonic mainnet:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Sonic's mainnet outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Latest Block: 0x...
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Sonic APIs
-Congratulations! You've made your first request to the Sonic network. You can now explore the various [JSON-RPC methods available on Sonic](/reference/sonic-api-endpoints) and start building your dApps on this innovative platform.
+For the full list of Sonic APIs, see the [Sonic API Endpoints](/docs/chains#sonic-apis).
diff --git a/fern/api-reference/stable/stable-api-faq.mdx b/fern/api-reference/stable/stable-api-faq.mdx
index f366f3906..d77ddbb9e 100644
--- a/fern/api-reference/stable/stable-api-faq.mdx
+++ b/fern/api-reference/stable/stable-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Stable is EVM compatible.
Stable uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Stable network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Stable?
-Stable supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Stable API endpoints documentation for a complete list.
+Stable supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Stable API Endpoints](/docs/chains#stable-apis) for a complete list.
## What is a Stable API key?
When accessing the Stable network via a node provider like Alchemy, Stable developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/stable/stable-api-quickstart.mdx b/fern/api-reference/stable/stable-api-quickstart.mdx
index 306920a79..a17950abf 100644
--- a/fern/api-reference/stable/stable-api-quickstart.mdx
+++ b/fern/api-reference/stable/stable-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: Stable API Quickstart
-description: How to get started building on Stable and using the JSON-RPC API
-subtitle: How to get started building on Stable and using the JSON-RPC API
+description: How to get started building on Stable using Alchemy
+subtitle: How to get started building on Stable using Alchemy
slug: reference/stable-api-quickstart
---
-*To use the Stable API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
-## Introduction
-
-Superseed is a high-performance, EVM-compatible blockchain designed for speed, scalability, and seamless developer experience. It allows for fast finality, low fees, and a familiar Ethereum-style interface — making it ideal for building smart contract-based applications.
-
-## What is the Stable API?
+Stable is a high-performance, EVM-compatible blockchain designed for speed, scalability, and seamless developer experience. It allows for fast finality, low fees, and a familiar Ethereum-style interface — making it ideal for building smart contract-based applications.
The Stable API allows interaction with the Stable network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Stable client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir stable-api-quickstart
- cd stable-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir stable-api-quickstart
- cd stable-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const stable = defineChain({
+ id: 101010,
+ name: "Stable",
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://stable-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: stable,
+ transport: http("https://stable-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `stable-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://stable-testnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Stable network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Stable's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Stable APIs
-Congratulations! You've made your first request to the Stable network. You can now explore the various JSON-RPC methods available on Stable and start building your dApps on this innovative platform.
+For the full list of Stable APIs, see the [Stable API Endpoints](/docs/chains#stable-apis).
diff --git a/fern/api-reference/starknet/starknet-api-faq.mdx b/fern/api-reference/starknet/starknet-api-faq.mdx
index 604b03f4f..ecd5e78c7 100644
--- a/fern/api-reference/starknet/starknet-api-faq.mdx
+++ b/fern/api-reference/starknet/starknet-api-faq.mdx
@@ -37,7 +37,7 @@ To access `v0_9` (**notice the underscore**) you can use the following URLs to m
* Mainnet: `https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/v0_9/{apiKey}`
* Testnet: `https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/v0_9/{apiKey}`
-You can also directly try these APIs from browser in our [API references for Starknet](/reference/starknet-api-endpoints)
+You can also directly try these APIs from browser in our [API references for Starknet](/docs/chains#starknet-apis)
## Is Starknet EVM compatible?
diff --git a/fern/api-reference/story/story-api-faq.mdx b/fern/api-reference/story/story-api-faq.mdx
index b624461af..ccfdbb9f3 100644
--- a/fern/api-reference/story/story-api-faq.mdx
+++ b/fern/api-reference/story/story-api-faq.mdx
@@ -44,7 +44,7 @@ The native currency for the Story blockchain is the IP token (ticker: IP), which
## What methods does Alchemy support for the Story API?
-You can find the list of all the methods Alchemy support for the Story API on Story API Endpoints page.
+You can find the list of all the methods Alchemy supports for the Story API on the [Story API Endpoints](/docs/chains#story-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/story/story-api-quickstart.mdx b/fern/api-reference/story/story-api-quickstart.mdx
index 7c79afb40..8c87fe863 100644
--- a/fern/api-reference/story/story-api-quickstart.mdx
+++ b/fern/api-reference/story/story-api-quickstart.mdx
@@ -1,117 +1,98 @@
---
title: Story API Quickstart
-description: How to get started building on Story and using the JSON-RPC API
-subtitle: How to get started building on Story and using the JSON-RPC API
+description: How to get started building on Story using Alchemy
+subtitle: How to get started building on Story using Alchemy
slug: reference/story-api-quickstart
---
-*To use the Story API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Story is a purpose-built EVM-compatible blockchain that enables fast, transparent, and programmable management, licensing, and monetization of intellectual property on-chain.
-## What is the Story API?
-
The Story API allows interaction with the Story network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Story client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir story-api-quickstart
- cd story-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir story-api-quickstart
- cd story-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http } from "viem";
+import { story } from "viem/chains";
+
+const client = createPublicClient({
+ chain: story,
+ transport: http("https://story-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `story-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://story-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (IP):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Story network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Story's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Story APIs
-Congratulations! You've made your first request to the Story network. You can now explore the various JSON-RPC methods available on Story and start building your dApps on this innovative platform.
+For the full list of Story APIs, see the [Story API Endpoints](/docs/chains#story-apis).
diff --git a/fern/api-reference/sui/sui-api-faq.mdx b/fern/api-reference/sui/sui-api-faq.mdx
index a8addd6ba..efa58ce5f 100644
--- a/fern/api-reference/sui/sui-api-faq.mdx
+++ b/fern/api-reference/sui/sui-api-faq.mdx
@@ -42,7 +42,7 @@ Transaction fees on Sui are paid in the network’s native token, SUI. Fees depe
## What methods does Alchemy support for the Sui API?
-You can find a full list of supported JSON-RPC methods on the [Sui API Endpoints](/node/sui/sui-api-endpoints) page.
+You can find a full list of supported JSON-RPC methods on the [Sui API Endpoints](/docs/chains#sui-apis) page.
## My question isn't listed here — where can I get help?
diff --git a/fern/api-reference/superseed/superseed-api-faq.mdx b/fern/api-reference/superseed/superseed-api-faq.mdx
index b0a6e5180..111a447ea 100644
--- a/fern/api-reference/superseed/superseed-api-faq.mdx
+++ b/fern/api-reference/superseed/superseed-api-faq.mdx
@@ -42,7 +42,7 @@ Transaction fees on Superseed are paid using the network's native token. The fee
## What methods does Alchemy support for the Superseed API?
-You can find a full list of supported JSON-RPC methods on the [Superseed API Endpoints](/node/superseed/superseed-api-endpoints) page.
+You can find a full list of supported JSON-RPC methods on the [Superseed API Endpoints](/docs/chains#superseed-apis) page.
## My question isn't listed here — where can I get help?
diff --git a/fern/api-reference/superseed/superseed-api-quickstart.mdx b/fern/api-reference/superseed/superseed-api-quickstart.mdx
index 6b5bc6374..9735f04c4 100644
--- a/fern/api-reference/superseed/superseed-api-quickstart.mdx
+++ b/fern/api-reference/superseed/superseed-api-quickstart.mdx
@@ -1,114 +1,106 @@
---
-title: "Superseed API Quickstart"
-description: "Get started building on Superseed and using the JSON-RPC API"
-slug: "reference/superseed-api-quickstart"
+title: Superseed API Quickstart
+description: How to get started building on Superseed using Alchemy
+subtitle: How to get started building on Superseed using Alchemy
+slug: reference/superseed-api-quickstart
---
-# Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
-The Superseed API allows developers to interact with the Superseed blockchain using standard JSON-RPC methods.
+The Superseed API allows developers to interact with the Superseed blockchain using standard JSON-RPC methods. With this API, you can retrieve block and transaction data, send transactions, and build applications powered by Superseed's high-throughput, EVM-compatible environment.
-With this API, you can retrieve block and transaction data, send transactions, and build applications powered by Superseed’s high-throughput, EVM-compatible environment.
+The Superseed Chain API facilitates interaction with the Superseed network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Superseed both intuitive and straightforward.
-***
+## Send Your First Request on Alchemy
-## What is the Superseed Chain API?
-
-The Superseed Chain API enables developers to communicate with the network through JSON-RPC — a widely adopted standard for blockchain interactions. If you’re familiar with Ethereum’s API structure, Superseed’s methods will feel intuitive.
-
-Using the API, developers can:
-
-* Fetch the latest blocks and transactions
-* Send signed transactions to the network
-* Query contract data
-* Estimate gas fees and more
-
-***
-
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
-
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
-
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Superseed client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir superseed-api-quickstart
- cd superseed-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir superseed-api-quickstart
- cd superseed-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `superseed-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const superseed = defineChain({
+ id: 5330,
+ name: "Superseed",
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://superseed-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: superseed,
+ transport: http("https://superseed-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://superseed-mainnet.alchemy-blast.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the Superseed App, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on Superseed App (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
-```shell
-Block Number: 0x6d68e
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# Superseed APIs
-Well done! You've just made your first request to the Superseed App API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on Superseed App](/node/superseed/superseed-api-endpoints) and start building your dApps on it!
+For the full list of Superseed APIs, see the [Superseed API Endpoints](/docs/chains#superseed-apis).
diff --git a/fern/api-reference/tea/tea-api-faq.mdx b/fern/api-reference/tea/tea-api-faq.mdx
index aedcb3df5..738177b8c 100644
--- a/fern/api-reference/tea/tea-api-faq.mdx
+++ b/fern/api-reference/tea/tea-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Tea is EVM compatible.
Tea uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Tea network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Tea?
-Tea supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Tea API endpoints documentation for a complete list.
+Tea supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Tea API Endpoints](/docs/chains#tea-apis) for a complete list.
## What is a Tea API key?
When accessing the Tea network via a node provider like Alchemy, Tea developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/tea/tea-api-quickstart.mdx b/fern/api-reference/tea/tea-api-quickstart.mdx
index 09f9d992c..60635bbc2 100644
--- a/fern/api-reference/tea/tea-api-quickstart.mdx
+++ b/fern/api-reference/tea/tea-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: Tea API Quickstart
-description: How to get started building on Tea and using the JSON-RPC API
-subtitle: How to get started building on Tea and using the JSON-RPC API
+description: How to get started building on Tea using Alchemy
+subtitle: How to get started building on Tea using Alchemy
slug: reference/tea-api-quickstart
---
-*To use the Tea API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
-## Introduction
-
-Tea Chain is an EVM-compatible Layer-2 built on Optimism’s OP Stack that powers the Tea Protocol’s on-chain registry and rewards for open-source software.
-
-## What is the Tea API?
+Tea Chain is an EVM-compatible Layer-2 built on Optimism's OP Stack that powers the Tea Protocol's on-chain registry and rewards for open-source software.
The Tea API allows interaction with the Tea network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Tea client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir tea-api-quickstart
- cd tea-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir tea-api-quickstart
- cd tea-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const tea = defineChain({
+ id: 93384,
+ name: "Tea",
+ nativeCurrency: { name: "TEA", symbol: "TEA", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://tea-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: tea,
+ transport: http("https://tea-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `tea-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://tea-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (TEA):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Tea network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Tea's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Tea APIs
-Congratulations! You've made your first request to the Tea network. You can now explore the various JSON-RPC methods available on Tea and start building your dApps on this innovative platform.
+For the full list of Tea APIs, see the [Tea API Endpoints](/docs/chains#tea-apis).
diff --git a/fern/api-reference/tempo/tempo-api-faq.mdx b/fern/api-reference/tempo/tempo-api-faq.mdx
index 37091dc43..a709e7a10 100644
--- a/fern/api-reference/tempo/tempo-api-faq.mdx
+++ b/fern/api-reference/tempo/tempo-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Tempo is EVM compatible.
Tempo uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Tempo network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Tempo?
-Tempo supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Tempo API endpoints documentation for a complete list.
+Tempo supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Tempo API Endpoints](/docs/chains#tempo-apis) for a complete list.
## What is a Tempo API key?
When accessing the Tempo network via a node provider like Alchemy, Tempo developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/tempo/tempo-api-quickstart.mdx b/fern/api-reference/tempo/tempo-api-quickstart.mdx
index 5f2b0805a..4991f543b 100644
--- a/fern/api-reference/tempo/tempo-api-quickstart.mdx
+++ b/fern/api-reference/tempo/tempo-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: Tempo API Quickstart
-description: How to get started building on Tempo and using the JSON-RPC API
-subtitle: How to get started building on Tempo and using the JSON-RPC API
+description: How to get started building on Tempo using Alchemy
+subtitle: How to get started building on Tempo using Alchemy
slug: reference/tempo-api-quickstart
---
-*To use the Tempo API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Tempo is a general-purpose blockchain optimized for payments. Tempo is designed to be a low-cost, high-throughput blockchain with user and developer features core to a modern payment system.
-## What is the Tempo API?
-
The Tempo API allows interaction with the Tempo network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Tempo client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir tempo-api-quickstart
- cd tempo-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir tempo-api-quickstart
- cd tempo-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const tempo = defineChain({
+ id: 1001,
+ name: "Tempo Testnet",
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://tempo-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: tempo,
+ transport: http("https://tempo-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `tempo-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://tempo-testnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Tempo network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Tempo's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Tempo APIs
-Congratulations! You've made your first request to the Tempo network. You can now explore the various JSON-RPC methods available on Tempo and start building your dApps on this innovative platform.
+For the full list of Tempo APIs, see the [Tempo API Endpoints](/docs/chains#tempo-apis).
diff --git a/fern/api-reference/tron/tron-api-faq.mdx b/fern/api-reference/tron/tron-api-faq.mdx
index 7e04556c5..dadf116ec 100644
--- a/fern/api-reference/tron/tron-api-faq.mdx
+++ b/fern/api-reference/tron/tron-api-faq.mdx
@@ -42,7 +42,7 @@ Transaction fees on Tron are paid in TRX, the network’s native currency. Resou
## What methods does Alchemy support for the Tron API?
-You can find a full list of supported JSON-RPC methods on the [Tron API Endpoints](/reference/tron-api-endpoints) page.
+You can find a full list of supported JSON-RPC methods on the [Tron API Endpoints](/docs/chains#tron-apis) page.
## My question isn't listed here — where can I get help?
diff --git a/fern/api-reference/unichain/unichain-api-faq.mdx b/fern/api-reference/unichain/unichain-api-faq.mdx
index 92db190db..d5baf90a6 100644
--- a/fern/api-reference/unichain/unichain-api-faq.mdx
+++ b/fern/api-reference/unichain/unichain-api-faq.mdx
@@ -49,7 +49,7 @@ By reducing latency with faster block times, Unichain increases the frequency of
## What methods does Alchemy support for the Unichain API?
-Check out [Unichain API Endpoints](/reference/unichain-api-endpoints)
+Check out the [Unichain API Endpoints](/docs/chains#unichain-apis)
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/unichain/unichain-api-quickstart.mdx b/fern/api-reference/unichain/unichain-api-quickstart.mdx
index 052a90c10..acdb9f131 100644
--- a/fern/api-reference/unichain/unichain-api-quickstart.mdx
+++ b/fern/api-reference/unichain/unichain-api-quickstart.mdx
@@ -1,103 +1,98 @@
---
title: Unichain API Quickstart
-description: Get started building on Unichain and using the JSON-RPC API
-subtitle: Get started building on Unichain and using the JSON-RPC API
+description: How to get started building on Unichain using Alchemy
+subtitle: How to get started building on Unichain using Alchemy
slug: reference/unichain-api-quickstart
---
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Unichain is a DeFi-native Ethereum Layer 2 blockchain, designed to be the home for liquidity across chains. It offers faster and cheaper transactions while supporting cross-chain liquidity.
-***
-
-## What is the Unichain API?
-
The Unichain API allows interaction with the Unichain network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
-
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
-
-### 2. Set Up Your Project
+## Send Your First Request on Alchemy
-Open your terminal and execute the following commands to create and initialize your project:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Unichain client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir unichain-api-quickstart
- cd unichain-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir unichain-api-quickstart
- cd unichain-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `unichain-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
-### 3. Make Your First Request
+
+```js
+import { createPublicClient, http } from "viem";
+import { unichain } from "viem/chains";
+
+const client = createPublicClient({
+ chain: unichain,
+ transport: http("https://unichain-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-Install Axios, a popular HTTP client, to make API requests:
+Now that you've created a client connected to Alchemy, you can continue with some basics:
+
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = 'https://unichain-sepolia.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-### 4. Run Your Script
-
-Execute your script to make a request to the Unichain Sepolia testnet:
+## Read Block Data
- ```bash bash
- node index.js
- ```
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
-You should see the latest block information from Unichain's Sepolia testnet outputted to your console:
+## Fetch a Transaction by Hash
-```shell
-Latest Block: 0x...
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
```
+
+
+## Fetch Transaction Receipt
+
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
+
-## Next Steps
+# Unichain APIs
-Congratulations! You've made your first request to the Unichain API on the Sepolia testnet. You can now explore the various [JSON-RPC methods available on Unichain](/reference/unichain-api-endpoints) and start building your dApps on this innovative platform.
+For the full list of Unichain APIs, see the [Unichain API Endpoints](/docs/chains#unichain-apis).
diff --git a/fern/api-reference/world-chain/world-chain-api-quickstart.mdx b/fern/api-reference/world-chain/world-chain-api-quickstart.mdx
index 6afd4bc5f..e508e6b09 100644
--- a/fern/api-reference/world-chain/world-chain-api-quickstart.mdx
+++ b/fern/api-reference/world-chain/world-chain-api-quickstart.mdx
@@ -1,101 +1,98 @@
---
title: World Chain API Quickstart
-description: Get started building on World Chain and using the JSON-RPC API
-subtitle: Get started building on World Chain and using the JSON-RPC API
+description: How to get started building on World Chain using Alchemy
+subtitle: How to get started building on World Chain using Alchemy
slug: reference/world-chain-api-quickstart
---
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
World Chain is a blockchain designed for humans, created by World to accelerate the adoption of Proof of Personhood and decentralized finance. It offers priority blockspace for verified humans, a gas allowance for casual transactions, and deep integration with the World protocol.
-## What is the World Chain API?
-
The World Chain API allows interaction with the World Chain network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+## Send Your First Request on Alchemy
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
-
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a World Chain client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir worldchain-api-quickstart
- cd worldchain-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir worldchain-api-quickstart
- cd worldchain-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `worldchain-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
-### 3. Make Your First Request
+
+```js
+import { createPublicClient, http } from "viem";
+import { worldchain } from "viem/chains";
+
+const client = createPublicClient({
+ chain: worldchain,
+ transport: http("https://worldchain-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
+
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://worldchain-mainnet.g.alchemy.com/v2/${apiKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-### 4. Run Your Script
-
-Execute your script to make a request to the World Chain mainnet:
+## Read Block Data
- ```bash bash
- node index.js
- ```
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
-You should see the latest block information from World Chain's mainnet outputted to your console:
+## Fetch a Transaction by Hash
-```shell
-Latest Block: 0x...
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
```
+
+
+## Fetch Transaction Receipt
+
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
+
-## Next Steps
+# World Chain APIs
-Congratulations! You've made your first request to the World Chain API on the mainnet. You can now explore the various [JSON-RPC methods available on World Chain](/reference/world-chain-api-endpoints) and start building your dApps on this innovative platform designed for humans.
+For the full list of World Chain APIs, see the [World Chain API Endpoints](/docs/chains#world-chain-apis).
diff --git a/fern/api-reference/world-mobile-chain/world-mobile-chain-api-faq.mdx b/fern/api-reference/world-mobile-chain/world-mobile-chain-api-faq.mdx
index 56e7c6240..285a52524 100644
--- a/fern/api-reference/world-mobile-chain/world-mobile-chain-api-faq.mdx
+++ b/fern/api-reference/world-mobile-chain/world-mobile-chain-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, WorldMobileChain is EVM compatible.
WorldMobileChain uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the WorldMobileChain network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on WorldMobileChain?
-WorldMobileChain supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the WorldMobileChain API endpoints documentation for a complete list.
+World Mobile Chain supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [World Mobile Chain API Endpoints](/docs/chains#world-mobile-chain-apis) for a complete list.
## What is a WorldMobileChain API key?
When accessing the WorldMobileChain network via a node provider like Alchemy, WorldMobileChain developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/world-mobile-chain/world-mobile-chain-api-quickstart.mdx b/fern/api-reference/world-mobile-chain/world-mobile-chain-api-quickstart.mdx
index 6f1845d1a..0bc0c2ac6 100644
--- a/fern/api-reference/world-mobile-chain/world-mobile-chain-api-quickstart.mdx
+++ b/fern/api-reference/world-mobile-chain/world-mobile-chain-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
-title: WorldMobileChain API Quickstart
-description: How to get started building on WorldMobileChain and using the JSON-RPC API
-subtitle: How to get started building on WorldMobileChain and using the JSON-RPC API
+title: World Mobile Chain API Quickstart
+description: How to get started building on World Mobile Chain using Alchemy
+subtitle: How to get started building on World Mobile Chain using Alchemy
slug: reference/world-mobile-chain-api-quickstart
---
-*To use the WorldMobileChain API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
World Mobile Chain is an EVM-compatible Layer-3 built on Base for decentralized telecom (DePIN), where EarthNodes secure the network and process telco data to deliver fast, low-cost onchain services.
-## What is the WorldMobileChain API?
-
-The WorldMobileChain API allows interaction with the WorldMobileChain network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-
-## Getting Started Instructions
+The World Mobile Chain API allows interaction with the World Mobile Chain network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a World Mobile Chain client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir worldmobilechain-api-quickstart
- cd worldmobilechain-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir worldmobilechain-api-quickstart
- cd worldmobilechain-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const worldMobileChain = defineChain({
+ id: 2049,
+ name: "World Mobile Chain",
+ nativeCurrency: { name: "WMT", symbol: "WMT", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://worldmobilechain-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: worldMobileChain,
+ transport: http("https://worldmobilechain-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `worldmobilechain-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://worldmobilechain-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (WMT):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the WorldMobileChain network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from WorldMobileChain's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# World Mobile Chain APIs
-Congratulations! You've made your first request to the WorldMobileChain network. You can now explore the various JSON-RPC methods available on WorldMobileChain and start building your dApps on this innovative platform.
+For the full list of World Mobile Chain APIs, see the [World Mobile Chain API Endpoints](/docs/chains#world-mobile-chain-apis).
diff --git a/fern/api-reference/xmtp/xmtp-api-faq.mdx b/fern/api-reference/xmtp/xmtp-api-faq.mdx
index 76e0797f6..ccc61e1c3 100644
--- a/fern/api-reference/xmtp/xmtp-api-faq.mdx
+++ b/fern/api-reference/xmtp/xmtp-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, XMTP is EVM compatible.
XMTP uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the XMTP network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on XMTP?
-XMTP supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the XMTP API endpoints documentation for a complete list.
+XMTP supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [XMTP API Endpoints](/docs/chains#xmtp-apis) for a complete list.
## What is a XMTP API key?
When accessing the XMTP network via a node provider like Alchemy, XMTP developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/xmtp/xmtp-api-quickstart.mdx b/fern/api-reference/xmtp/xmtp-api-quickstart.mdx
index f1739b596..0d765eeea 100644
--- a/fern/api-reference/xmtp/xmtp-api-quickstart.mdx
+++ b/fern/api-reference/xmtp/xmtp-api-quickstart.mdx
@@ -1,117 +1,106 @@
---
title: XMTP API Quickstart
-description: How to get started building on XMTP and using the JSON-RPC API
-subtitle: How to get started building on XMTP and using the JSON-RPC API
+description: How to get started building on XMTP using Alchemy
+subtitle: How to get started building on XMTP using Alchemy
slug: reference/xmtp-api-quickstart
---
-*To use the XMTP API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
-## Introduction
-
-XMTP Chain is a Layer-3 appchain built with Arbitrum that settles to Base, providing a decentralized ledger to consistently order XMTP’s messaging metadata.
-
-## What is the XMTP API?
+XMTP Chain is a Layer-3 appchain built with Arbitrum that settles to Base, providing a decentralized ledger to consistently order XMTP's messaging metadata.
The XMTP API allows interaction with the XMTP network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an XMTP client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir xmtp-api-quickstart
- cd xmtp-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir xmtp-api-quickstart
- cd xmtp-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http, defineChain } from "viem";
+
+const xmtp = defineChain({
+ id: 2020,
+ name: "XMTP",
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
+ rpcUrls: {
+ default: { http: ["https://xmtp-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
+ },
+});
+
+const client = createPublicClient({
+ chain: xmtp,
+ transport: http("https://xmtp-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `xmtp-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://xmtp-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the XMTP network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from XMTP's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# XMTP APIs
-Congratulations! You've made your first request to the XMTP network. You can now explore the various JSON-RPC methods available on XMTP and start building your dApps on this innovative platform.
+For the full list of XMTP APIs, see the [XMTP API Endpoints](/docs/chains#xmtp-apis).
diff --git a/fern/api-reference/zetachain/zetachain-api-faq.mdx b/fern/api-reference/zetachain/zetachain-api-faq.mdx
index 88068c105..ecada8ab1 100644
--- a/fern/api-reference/zetachain/zetachain-api-faq.mdx
+++ b/fern/api-reference/zetachain/zetachain-api-faq.mdx
@@ -45,7 +45,7 @@ ZetaChain uses ZETA, its native cryptocurrency, for transaction fees, gas, and o
## What methods does Alchemy support for the ZetaChain API?
-You can find the list of all the methods Alchemy supports for the ZetaChain API on [ZetaChain API Endpoints](/reference/zetachain-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the ZetaChain API on the [ZetaChain API Endpoints](/docs/chains#zetachain-apis) page.
## My question isn't here, where can I get help?
diff --git a/fern/api-reference/zetachain/zetachain-api-quickstart.mdx b/fern/api-reference/zetachain/zetachain-api-quickstart.mdx
index 32f33c51f..344b1a596 100644
--- a/fern/api-reference/zetachain/zetachain-api-quickstart.mdx
+++ b/fern/api-reference/zetachain/zetachain-api-quickstart.mdx
@@ -1,107 +1,98 @@
---
title: ZetaChain API Quickstart
-description: Get started building on ZetaChain and using the JSON-RPC API
-subtitle: Get started building on ZetaChain and using the JSON-RPC API
+description: How to get started building on ZetaChain using Alchemy
+subtitle: How to get started building on ZetaChain using Alchemy
slug: reference/zetachain-api-quickstart
---
-*To use the ZetaChain API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first.
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
ZetaChain is an EVM-compatible Cosmos SDK-based L1 blockchain designed to enable Omnichain Smart Contracts and provide a unified application experience. Applications on ZetaChain can manage, read, and write state to/from any external chain - even non-smart chains such as Bitcoin network. Users can natively access these applications from any connected chain without requiring users to switch networks.
-***
-
-## What is the ZetaChain API?
-
The ZetaChain API facilitates interaction with the ZetaChain network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with ZetaChain both intuitive and straightforward.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
-
-Your first step involves selecting a package manager, which will be crucial for managing your project's dependencies. The choice between `npm` and `yarn` depends on your personal preference or project requirements.
-
-| npm | yarn |
-| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |
+## Send Your First Request on Alchemy
-### 2. Set Up Your Project
-
-To kickstart your project, open your terminal and execute the following commands:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a ZetaChain client connected to Alchemy and fetch the latest block number!
```text npm
- mkdir zetachain-api-quickstart
- cd zetachain-api-quickstart
- npm init --yes
+ npm install --save viem
```
```text yarn
- mkdir zetachain-api-quickstart
- cd zetachain-api-quickstart
- yarn init --yes
+ yarn add viem
```
-This creates a new directory named `zetachain-api-quickstart` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
+
+
+```js
+import { createPublicClient, http } from "viem";
+import { zetachain } from "viem/chains";
+
+const client = createPublicClient({
+ chain: zetachain,
+ transport: http("https://zetachain-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-### 3. Make Your First Request
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-For making API requests, we'll use Axios, a widely-used HTTP client. Install Axios with the following command:
+## Get Latest Block Number
- ```bash bash
- npm install axios
- # Or with yarn
- # yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create an `index.js` file in your project directory. Paste the following code to send a request to the ZetaChain network:
+## Get an Address Balance
- ```javascript javascript
- const axios = require('axios');
-
- const url = `https://zetachain-mainnet.g.alchemy.com/v2/${yourAPIKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Block Number:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ZETA):", Number(balance) / 1e18);
+```
-Remember to replace `yourAPIKey` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute your script and make a request to the ZetaChain, run:
+## Fetch a Transaction by Hash
-
- ```bash bash
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the current block number on ZetaChain (in hexadecimal format) outputted to your console:
+## Fetch Transaction Receipt
-```text
-Block Number: 0x6d68e
+
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
```
+
-## Next Steps
+# ZetaChain APIs
-Well done! You've just made your first request to the ZetaChain API. With this foundation, you can dive deeper into the array of [JSON-RPC methods available on ZetaChain](/reference/zetachain-api-endpoints) and start building your dApps on it!
+For the full list of ZetaChain APIs, see the [ZetaChain API Endpoints](/docs/chains#zetachain-apis).
diff --git a/fern/api-reference/zksync/zksync-api-faq.mdx b/fern/api-reference/zksync/zksync-api-faq.mdx
index ccd292afa..4ddb6975f 100644
--- a/fern/api-reference/zksync/zksync-api-faq.mdx
+++ b/fern/api-reference/zksync/zksync-api-faq.mdx
@@ -61,7 +61,7 @@ The testnet you should use for zkSync Era is the zkSync Era Sepolia testnet. By
## What methods does Alchemy support for the zkSync Era API?
-You can find the list of all the methods Alchemy support for the zkSync Era API on the [zkSync Era API Endpoints](/reference/zksync-api-endpoints) page.
+You can find the list of all the methods Alchemy supports for the zkSync Era API on the [zkSync Era API Endpoints](/docs/chains#zksync-apis) page.
## How do I request funds for the testnet?
diff --git a/fern/api-reference/zksync/zksync-api-quickstart.mdx b/fern/api-reference/zksync/zksync-api-quickstart.mdx
index 2afb6a4ef..62035ac57 100644
--- a/fern/api-reference/zksync/zksync-api-quickstart.mdx
+++ b/fern/api-reference/zksync/zksync-api-quickstart.mdx
@@ -1,120 +1,98 @@
---
title: zkSync Era API Quickstart
-description: How to get started building on zkSync Era and using the JSON-RPC API
-subtitle: How to get started building on zkSync Era and using the JSON-RPC API
+description: How to get started building on zkSync Era using Alchemy
+subtitle: How to get started building on zkSync Era using Alchemy
slug: reference/zksync-api-quickstart
---
-*To use the zkSync Era API, you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-# Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
zkSync is a Layer 2 scaling solution for Ethereum, leveraging zkRollup technology. It provides low gas fees, high throughput, and enhanced user privacy while maintaining a secure and decentralized architecture.
-# What is zkSync Era API?
-
The zkSync Era API enables developers to interact seamlessly with the zkSync Era network. Through the API, developers can submit transactions, query state changes, and more, all while benefiting from the scalability and security zkSync Era offers.
-# Getting Started Instructions
-
-## 1. Choose a Package Manager (npm or yarn)
-
-Start by selecting a package manager for managing your project's dependencies. The most commonly used package managers in the Node.js ecosystem are `npm` and `yarn`. Select according to your preference.
-
-### npm
-
-If you're using `npm`, begin by installing Node.js and `npm` by following the guide here: [https://docs.npmjs.com/downloading-and-installing-node-js-and-npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
+## Send Your First Request on Alchemy
-### yarn
-
-If you prefer `yarn`, follow these installation instructions: [https://classic.yarnpkg.com/lang/en/docs/install](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable)
-
-## 2. Set up your project (npm or yarn)
-
-To set up a Node.js project, open your terminal and execute the following:
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a zkSync Era client connected to Alchemy and fetch the latest block number!
- ```shell npm
- mkdir alchemy-zksync-api
- cd alchemy-zksync-api
- npm init --yes
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- mkdir alchemy-zksync-api
- cd alchemy-zksync-api
- yarn init --yes
+ ```text yarn
+ yarn add viem
```
-This creates a new directory named `alchemy-zksync-api` and initializes a Node.js project within it.
+## Create Client Connected to Alchemy
-## 3. Make Your First Request
+
+```js
+import { createPublicClient, http } from "viem";
+import { zkSync } from "viem/chains";
+
+const client = createPublicClient({
+ chain: zkSync,
+ transport: http("https://zksync-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
+
-For interacting with the zkSync Era API, you will use an HTTP client. This guide uses Axios, a well-regarded HTTP client for Node.js. Install Axios in your project as follows:
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-
- ```shell npm
- npm install axios
- ```
+## Get Latest Block Number
- ```Text yarn
- yarn add axios
- ```
+
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Next, create a script for sending a request to the `zks_getAllAccountBalances` JSON-RPC method on zkSync Era. This method retrieves the balances of all tokens for a specified account address. Create a file named `index.js` in your project directory and input this code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const apiKey = 'YOUR_API_KEY'; // Replace this with your Alchemy API key
- const url = `https://zksync-mainnet.g.alchemy.com/v2/${apiKey}`;
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'zks_getAllAccountBalances',
- params: ['YOUR_ACCOUNT_ADDRESS'] // Replace with your account address
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Account Balances:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Be sure to replace `YOUR_API_KEY` with your actual Alchemy API key, obtainable from your [Alchemy dashboard](https://dashboard.alchemy.com/signup), and `YOUR_ACCOUNT_ADDRESS` with the zkSync Era account address you want to query.
+## Read Block Data
-## 4. Run Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-To execute the script and send the request to the zkSync Era API, use this command:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the balances of all tokens owned by the specified zkSync Era account displayed in your console:
+## Fetch Transaction Receipt
- ```json Shell
- {
- "jsonrpc": "2.0",
- "result": {
- "0x0000000000000000000000000000000000000000": "0x2fbd72a1121b3100"
- },
- "id": 2
- }
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-# Next Steps
+# zkSync Era APIs
-Well done! You've now made your initial request to the zkSync Era API through Alchemy. Proceed to explore the various [JSON-RPC methods available on zkSync Era](/reference/zksync-api-endpoints) to develop your decentralized applications on this powerful Layer 2 platform!
+For the full list of zkSync Era APIs, see the [zkSync Era API Endpoints](/docs/chains#zksync-apis).
diff --git a/fern/api-reference/zora/zora-api-faq.mdx b/fern/api-reference/zora/zora-api-faq.mdx
index a375425da..dabd0211a 100644
--- a/fern/api-reference/zora/zora-api-faq.mdx
+++ b/fern/api-reference/zora/zora-api-faq.mdx
@@ -21,7 +21,7 @@ Yes, Zora is EVM compatible.
Zora uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Zora network, allowing users to read block/transaction data, query chain information, execute smart contracts, and store data on-chain.
## What methods are supported on Zora?
-Zora supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Zora API endpoints documentation for a complete list.
+Zora supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Zora API Endpoints](/docs/chains#zora-apis) for a complete list.
## What is a Zora API key?
When accessing the Zora network via a node provider like Alchemy, Zora developers use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!
diff --git a/fern/api-reference/zora/zora-api-quickstart.mdx b/fern/api-reference/zora/zora-api-quickstart.mdx
index d34ad4a2f..1024f8ff2 100644
--- a/fern/api-reference/zora/zora-api-quickstart.mdx
+++ b/fern/api-reference/zora/zora-api-quickstart.mdx
@@ -1,117 +1,98 @@
---
title: Zora API Quickstart
-description: How to get started building on Zora and using the JSON-RPC API
-subtitle: How to get started building on Zora and using the JSON-RPC API
+description: How to get started building on Zora using Alchemy
+subtitle: How to get started building on Zora using Alchemy
slug: reference/zora-api-quickstart
---
-*To use the Zora API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*
-
-## Introduction
+
+ Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
+ get started today.
+
Zora Network is an OP Stack–powered Ethereum Layer-2 focused on onchain media and NFTs, delivering fast, low-cost mints and creator-friendly tools.
-## What is the Zora API?
-
The Zora API allows interaction with the Zora network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.
-## Getting Started Instructions
-
-### 1. Choose a Package Manager (npm or yarn)
+## Send Your First Request on Alchemy
-Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.
+Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Zora client connected to Alchemy and fetch the latest block number!
- ```shell npm
- # Begin with npm by following the npm documentation
- # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
+ ```text npm
+ npm install --save viem
```
- ```shell yarn
- # For yarn, refer to yarn's installation guide
- # https://classic.yarnpkg.com/lang/en/docs/install
+ ```text yarn
+ yarn add viem
```
-### 2. Set Up Your Project
-
-Open your terminal and execute the following commands to create and initialize your project:
+## Create Client Connected to Alchemy
- ```shell npm
- mkdir zora-api-quickstart
- cd zora-api-quickstart
- npm init --yes
- ```
-
- ```shell yarn
- mkdir zora-api-quickstart
- cd zora-api-quickstart
- yarn init --yes
- ```
+```js
+import { createPublicClient, http } from "viem";
+import { zora } from "viem/chains";
+
+const client = createPublicClient({
+ chain: zora,
+ transport: http("https://zora-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
+});
+```
-This creates a new directory named `zora-api-quickstart` and initializes a Node.js project within it.
+Now that you've created a client connected to Alchemy, you can continue with some basics:
-### 3. Make Your First Request
-
-Install Axios, a popular HTTP client, to make API requests:
+## Get Latest Block Number
- ```shell npm
- npm install axios
- ```
-
- ```shell yarn
- yarn add axios
- ```
+```js
+const blockNumber = await client.getBlockNumber();
+console.log("Current block number:", blockNumber);
+```
-Create an `index.js` file in your project directory and paste the following code:
+## Get an Address Balance
- ```javascript index.js
- const axios = require('axios');
-
- const url = 'https://zora-mainnet.g.alchemy.com/v2/${your-api-key}';
-
- const payload = {
- jsonrpc: '2.0',
- id: 1,
- method: 'eth_blockNumber',
- params: []
- };
-
- axios.post(url, payload)
- .then(response => {
- console.log('Latest Block:', response.data.result);
- })
- .catch(error => {
- console.error(error);
- });
- ```
+```js
+const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
+console.log("Balance (ETH):", Number(balance) / 1e18);
+```
-Remember to replace `your-api-key` with your actual Alchemy API key that you can get from your [Alchemy dashboard](https://dashboard.alchemy.com/signup).
+## Read Block Data
-### 4. Run Your Script
+
+```js
+const block = await client.getBlock({
+ blockNumber: blockNumber, // from previous example
+});
+console.log(block);
+```
+
-Execute your script to make a request to the Zora network:
+## Fetch a Transaction by Hash
-
- ```shell shell
- node index.js
- ```
+
+```js
+const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
+console.log(tx);
+```
-You should see the latest block information from Zora's network outputted to your console:
+## Fetch Transaction Receipt
- ```shell shell
- Latest Block: 0x...
- ```
+```js
+const receipt = await client.getTransactionReceipt({
+ hash: "0xYOUR_TX_HASH"
+});
+console.log(receipt);
+```
-## Next Steps
+# Zora APIs
-Congratulations! You've made your first request to the Zora network. You can now explore the various JSON-RPC methods available on Zora and start building your dApps on this innovative platform.
+For the full list of Zora APIs, see the [Zora API Endpoints](/docs/chains#zora-apis).
diff --git a/fern/changelog/2025-12-11.md b/fern/changelog/2025-12-11.md
index 44213d355..a223a1633 100644
--- a/fern/changelog/2025-12-11.md
+++ b/fern/changelog/2025-12-11.md
@@ -1,6 +1,8 @@
We will be shutting down our legacy RPC endpoint `alchemyapi.io` on January 31, 2026. This endpoint was originally deprecated in 2021, and you are likely not impacted by this change. However, if your app is still making RPC requests to this legacy endpoint, please migrate to our current endpoint, `g.alchemy.com`, which offers significant latency improvements while maintaining the same authentication model and API functionality. No other changes are required beyond updating the endpoint URL in your calls.
+If you are using the Ethers.js package, please ensure you are running [v6.16.0](https://github.com/ethers-io/ethers.js/blob/main/CHANGELOG.md#ethersv6160-2025-12-02-1947) or later, which routes requests through the current `g.alchemy.com` domain.
+
After the shutdown date, all requests to `alchemyapi.io` will return HTTP 410 – Gone, and no Compute Units (CUs) will be billed for calls made to the deprecated endpoint.
diff --git a/fern/docs.yml b/fern/docs.yml
index 7697e9214..71fb36206 100644
--- a/fern/docs.yml
+++ b/fern/docs.yml
@@ -1016,14 +1016,8 @@ navigation:
slug: polygon-zkevm
- section: Arbitrum
contents:
- - section: Quickstart
- path: >-
- api-reference/arbitrum/arbitrum-api-quickstart.mdx
- contents:
- - page: Arbitrum SDK Examples
- path: >-
- api-reference/arbitrum/arbitrum-api-quickstart/arbitrum-sdk-examples.mdx
- slug: arbitrum-api-quickstart
+ - page: Quickstart
+ path: api-reference/arbitrum/arbitrum-api-quickstart.mdx
- section: FAQ
path: api-reference/arbitrum/arbitrum-api-faq/arbitrum-api-faq.mdx
contents:
@@ -1036,13 +1030,9 @@ navigation:
slug: arbitrum
- section: OP Mainnet
contents:
- - section: OP Mainnet API Quickstart
+ - page: Quickstart
path: api-reference/op-mainnet/op-mainnet-api-quickstart.mdx
- contents:
- - page: OP Mainnet SDK Examples
- path: api-reference/op-mainnet/op-mainnet-api-quickstart/op-mainnet-sdk-examples.mdx
- slug: op-mainnet-api-quickstart
- - section: OP Mainnet API FAQ
+ - section: FAQ
path: api-reference/op-mainnet/op-mainnet-api-faq/op-mainnet-api-faq.mdx
contents:
- page: OP Mainnet Error Codes
@@ -1055,9 +1045,9 @@ navigation:
slug: op-mainnet
- section: Base
contents:
- - page: Base API Quickstart
+ - page: Quickstart
path: api-reference/base/base-api-quickstart.mdx
- - page: Base API FAQ
+ - page: FAQ
path: api-reference/base/base-api-faq.mdx
- api: Base API Endpoints
api-name: base
@@ -1067,9 +1057,9 @@ navigation:
slug: base
- section: Astar
contents:
- - page: Astar API Quickstart
+ - page: Quickstart
path: api-reference/astar/astar-api-quickstart.mdx
- - page: Astar API FAQ
+ - page: FAQ
path: api-reference/astar/astar-api-faq.mdx
- api: Astar API Endpoints
api-name: astar
@@ -1077,171 +1067,171 @@ navigation:
slug: astar
- section: Starknet
contents:
- - page: Starknet API Quickstart
+ - page: Quickstart
path: api-reference/starknet/starknet-api-quickstart.mdx
- - page: Starknet API FAQ
+ - page: FAQ
path: api-reference/starknet/starknet-api-faq.mdx
- api: Starknet API Endpoints
api-name: starknet
slug: starknet
- section: zksync
contents:
- - page: zkSync Era API Quickstart
+ - page: Quickstart
path: api-reference/zksync/zksync-api-quickstart.mdx
- - page: zkSync Era API FAQ
+ - page: FAQ
path: api-reference/zksync/zksync-api-faq.mdx
- api: zkSync API Endpoints
api-name: zksync
slug: zksync
- section: Gnosis
contents:
- - page: Gnosis Chain API Quickstart
+ - page: Quickstart
path: api-reference/gnosis/gnosis-chain-api-quickstart.mdx
- - page: Gnosis Chain API FAQ
+ - page: FAQ
path: api-reference/gnosis/gnosis-chain-faq.mdx
- api: Gnosis API Endpoints
api-name: gnosis
slug: gnosis
- section: Avalanche C-Chain
contents:
- - page: Avalanche C-Chain API Quickstart
+ - page: Quickstart
path: api-reference/avalanche/avalanche-api-quickstart.mdx
- - page: Avalanche C-Chain API FAQ
+ - page: FAQ
path: api-reference/avalanche/avalanche-api-faq.mdx
- api: Avalanche API Endpoints
api-name: avalanche
slug: avalanche
- section: Arbitrum Nova
contents:
- - page: Arbitrum Nova Chain API Quickstart
+ - page: Quickstart
path: api-reference/arbitrum-nova/arbitrum-nova-api-quickstart.mdx
- - page: Arbitrum Nova Chain API FAQ
+ - page: FAQ
path: api-reference/arbitrum-nova/arbitrum-nova-chain-api-faq.mdx
- api: Arbitrum Nova API Endpoints
api-name: arbnova
slug: arbitrum-nova
- section: ZetaChain
contents:
- - page: ZetaChain API Quickstart
+ - page: Quickstart
path: api-reference/zetachain/zetachain-api-quickstart.mdx
- - page: ZetaChain API FAQ
+ - page: FAQ
path: api-reference/zetachain/zetachain-api-faq.mdx
- api: ZetaChain API Endpoints
api-name: zetachain
slug: zetachain
- section: Blast
contents:
- - page: Blast Chain API Quickstart
+ - page: Quickstart
path: api-reference/blast/blast-api-quickstart.mdx
- - page: Blast Chain API FAQ
+ - page: FAQ
path: api-reference/blast/blast-api-faq.mdx
- api: Blast API Endpoints
api-name: blast
slug: blast
- section: Scroll
contents:
- - page: Scroll Chain API Quickstart
+ - page: Quickstart
path: api-reference/scroll/scroll-chain-api-quickstart.mdx
- - page: Scroll Chain API FAQ
+ - page: FAQ
path: api-reference/scroll/scroll-chain-api-faq.mdx
- api: Scroll API Endpoints
api-name: scroll
slug: scroll
- section: Linea
contents:
- - page: Linea Chain API Quickstart
+ - page: Quickstart
path: api-reference/linea/linea-chain-api-quickstart.mdx
- - page: Linea Chain API FAQ
+ - page: FAQ
path: api-reference/linea/linea-chain-api-faq.mdx
- api: Linea API Endpoints
api-name: linea
slug: linea
- section: Mantle
contents:
- - page: Mantle Chain API Quickstart
+ - page: Quickstart
path: api-reference/mantle/mantle-chain-api-quickstart.mdx
- - page: Mantle Chain API FAQ
+ - page: FAQ
path: api-reference/mantle/mantle-chain-api-faq.mdx
- api: Mantle API Endpoints
api-name: mantle
slug: mantle
- section: Celo
contents:
- - page: Celo Chain API Quickstart
+ - page: Quickstart
path: api-reference/celo/celo-chain-api-quickstart.mdx
- - page: Celo Chain API FAQ
+ - page: FAQ
path: api-reference/celo/celo-chain-api-faq.mdx
- api: Celo API Endpoints
api-name: celo
slug: celo
- section: Berachain
contents:
- - page: Berachain API Quickstart
+ - page: Quickstart
path: api-reference/berachain/berachain-api-quickstart.mdx
- - page: Berachain API FAQ
+ - page: FAQ
path: api-reference/berachain/berachain-api-faq.mdx
- api: Berachain API Endpoints
api-name: berachain
slug: berachain
- section: Metis
contents:
- - page: Metis Chain API Quickstart
+ - page: Quickstart
path: api-reference/metis/metis-chain-api-quickstart.mdx
- - page: Metis Chain API FAQ
+ - page: FAQ
path: api-reference/metis/metis-chain-api-faq.mdx
- api: Metis API Endpoints
api-name: metis
slug: metis
- section: Sonic
contents:
- - page: Sonic Chain API Quickstart
+ - page: Quickstart
path: api-reference/sonic/sonic-api-quickstart.mdx
- - page: Sonic Chain API FAQ
+ - page: FAQ
path: api-reference/sonic/sonic-api-faq.mdx
- api: Sonic API Endpoints
api-name: sonic
slug: sonic
- section: Sei
contents:
- - page: Sei API Quickstart
+ - page: Quickstart
path: api-reference/sei/sei-api-quickstart.mdx
- - page: Sei API FAQ
+ - page: FAQ
path: api-reference/sei/sei-api-faq.mdx
- api: Sei API Endpoints
api-name: sei
slug: sei
- section: Flow
contents:
- - page: Flow API Quickstart
+ - page: Quickstart
path: api-reference/flow/flow-api-quickstart.mdx
- - page: Flow API FAQ
+ - page: FAQ
path: api-reference/flow/flow-api-faq.mdx
- api: Flow EVM API Endpoints
api-name: flow
slug: flow-evm
- section: CrossFi
contents:
- - page: CrossFi API Quickstart
+ - page: Quickstart
path: api-reference/crossfi/crossfi-api-quickstart.mdx
- - page: CrossFi API FAQ
+ - page: FAQ
path: api-reference/crossfi/crossfi-api-faq.mdx
- api: CrossFi API Endpoints
api-name: crossfi
slug: crossfi
- section: Soneium
contents:
- - page: Soneium API Quickstart
+ - page: Quickstart
path: api-reference/soneium/soneium-api-quickstart.mdx
- - page: Soneium API FAQ
+ - page: FAQ
path: api-reference/soneium/soneium-api-faq.mdx
- api: Soneium API Endpoints
api-name: soneium
slug: soneium
- section: Unichain
contents:
- - page: Unichain API Quickstart
+ - page: Quickstart
path: api-reference/unichain/unichain-api-quickstart.mdx
- - page: Unichain API FAQ
+ - page: FAQ
path: api-reference/unichain/unichain-api-faq.mdx
- api: Unichain API Endpoints
api-name: unichain
@@ -1250,36 +1240,36 @@ navigation:
slug: unichain
- section: World Chain
contents:
- - page: World Chain API Quickstart
+ - page: Quickstart
path: api-reference/world-chain/world-chain-api-quickstart.mdx
- - page: World Chain API FAQ
+ - page: FAQ
path: api-reference/world-chain/world-chain-api-faq.mdx
- api: World Chain API Endpoints
api-name: worldchain
slug: world-chain
- section: Rootstock
contents:
- - page: Rootstock API Quickstart
+ - page: Quickstart
path: api-reference/rootstock/rootstock-api-quickstart.mdx
- - page: Rootstock API FAQ
+ - page: FAQ
path: api-reference/rootstock/rootstock-api-faq.mdx
- api: Rootstock API Endpoints
api-name: rootstock
slug: rootstock
- section: Shape
contents:
- - page: Shape API Quickstart
+ - page: Quickstart
path: api-reference/shape/shape-api-quickstart.mdx
- - page: Shape API FAQ
+ - page: FAQ
path: api-reference/shape/shape-api-faq.mdx
- api: Shape API Endpoints
api-name: shape
slug: shape
- section: Apechain
contents:
- - page: ApeChain API Quickstart
+ - page: Quickstart
path: api-reference/apechain/apechain-api-quickstart.mdx
- - page: ApeChain API FAQ
+ - page: FAQ
path: api-reference/apechain/apechain-api-faq.mdx
- api: ApeChain API Endpoints
api-name: apechain
@@ -1291,27 +1281,27 @@ navigation:
slug: geist
- section: Lens
contents:
- - page: Lens API Quickstart
+ - page: Quickstart
path: api-reference/lens/lens-api-quickstart.mdx
- - page: Lens API FAQ
+ - page: FAQ
path: api-reference/lens/lens-api-faq.mdx
- api: Lens API Endpoints
api-name: lens
slug: lens
- section: Abstract
contents:
- - page: Abstract API Quickstart
+ - page: Quickstart
path: api-reference/abstract/abstract-api-quickstart.mdx
- - page: Abstract API FAQ
+ - page: FAQ
path: api-reference/abstract/abstract-api-faq.mdx
- api: Abstract API Endpoints
api-name: abstract
slug: abstract
- section: opBNB
contents:
- - page: opBNB Chain API Quickstart
+ - page: Quickstart
path: api-reference/opbnb-paid-tier/opbnb-chain-api-quickstart.mdx
- - page: opBNB Chain API FAQ
+ - page: FAQ
path: api-reference/opbnb-paid-tier/opbnb-chain-api-faq.mdx
- api: OpBNB API Endpoints
api-name: opbnb
@@ -1327,36 +1317,36 @@ navigation:
slug: bnb-smart-chain
- section: Ink
contents:
- - page: Ink API Quickstart
+ - page: Quickstart
path: api-reference/ink/ink-api-quickstart.mdx
- - page: Ink API FAQ
+ - page: FAQ
path: api-reference/ink/ink-api-faq.mdx
- api: Ink API Endpoints
api-name: ink
slug: ink
- section: Lumia
contents:
- - page: Lumia API Quickstart
+ - page: Quickstart
path: api-reference/lumia/lumia-api-quickstart.mdx
- - page: Lumia API FAQ
+ - page: FAQ
path: api-reference/lumia/lumia-api-faq.mdx
- api: Lumia API Endpoints
api-name: lumia
slug: lumia
- section: Monad
contents:
- - page: Monad API Quickstart
+ - page: Quickstart
path: api-reference/monad/monad-api-quickstart.mdx
- - page: Monad API FAQ
+ - page: FAQ
path: api-reference/monad/monad-api-faq.mdx
- api: Monad API Endpoints
api-name: monad
slug: monad
- section: Aptos
contents:
- - page: Aptos API Quickstart
+ - page: Quickstart
path: api-reference/aptos/aptos-api-quickstart.mdx
- - page: Aptos API FAQ
+ - page: FAQ
path: api-reference/aptos/aptos-api-faq.mdx
- api: Aptos API Endpoints
api-name: aptos
@@ -1364,9 +1354,9 @@ navigation:
slug: aptos
- section: Bitcoin
contents:
- - page: Bitcoin API Quickstart
+ - page: Quickstart
path: api-reference/bitcoin/bitcoin-api-quickstart.mdx
- - page: Bitcoin API FAQ
+ - page: FAQ
path: api-reference/bitcoin/bitcoin-api-faq.mdx
- api: Bitcoin API Endpoints
api-name: bitcoin
@@ -1374,10 +1364,10 @@ navigation:
- section: Sui
hidden: true
contents:
- - page: Sui API Quickstart
+ - page: Quickstart
path: api-reference/sui/sui-api-quickstart.mdx
hidden: true
- - page: Sui API FAQ
+ - page: FAQ
path: api-reference/sui/sui-api-faq.mdx
hidden: true
- api: Sui API Endpoints
@@ -1386,45 +1376,45 @@ navigation:
slug: sui
- section: Superseed
contents:
- - page: Superseed API Quickstart
+ - page: Quickstart
path: api-reference/superseed/superseed-api-quickstart.mdx
- - page: Superseed API FAQ
+ - page: FAQ
path: api-reference/superseed/superseed-api-faq.mdx
- api: Superseed API Endpoints
api-name: superseed
slug: superseed
- section: Anime
contents:
- - page: Anime API Quickstart
+ - page: Quickstart
path: api-reference/anime/anime-api-quickstart.mdx
- - page: Anime API FAQ
+ - page: FAQ
path: api-reference/anime/anime-api-faq.mdx
- api: Anime API Endpoints
api-name: anime
slug: anime
- section: Story
contents:
- - page: Story API Quickstart
+ - page: Quickstart
path: api-reference/story/story-api-quickstart.mdx
- - page: Story API FAQ
+ - page: FAQ
path: api-reference/story/story-api-faq.mdx
- api: Story API Endpoints
api-name: story
slug: story
- section: Botanix
contents:
- - page: Botanix API Quickstart
+ - page: Quickstart
path: api-reference/botanix/botanix-api-quickstart.mdx
- - page: Botanix API FAQ
+ - page: FAQ
path: api-reference/botanix/botanix-api-faq.mdx
- api: Botanix API Endpoints
api-name: botanix
slug: botanix
- section: Hyperliquid
contents:
- - page: Hyperliquid API Quickstart
+ - page: Quickstart
path: api-reference/hyperliquid/hyperliquid-api-quickstart.mdx
- - page: Hyperliquid API FAQ
+ - page: FAQ
path: api-reference/hyperliquid/hyperliquid-api-faq.mdx
- api: Hyperliquid EVM Endpoints
api-name: hyperliquid
@@ -1433,9 +1423,9 @@ navigation:
slug: hyperliquid
- section: XMTP
contents:
- - page: XMTP API Quickstart
+ - page: Quickstart
path: api-reference/xmtp/xmtp-api-quickstart.mdx
- - page: XMTP API FAQ
+ - page: FAQ
path: api-reference/xmtp/xmtp-api-faq.mdx
- api: XMTP API Endpoints
api-name: xmtp
@@ -1443,9 +1433,9 @@ navigation:
- section: Tea
contents:
- - page: Tea API Quickstart
+ - page: Quickstart
path: api-reference/tea/tea-api-quickstart.mdx
- - page: Tea API FAQ
+ - page: FAQ
path: api-reference/tea/tea-api-faq.mdx
- api: Tea API Endpoints
api-name: tea
@@ -1453,9 +1443,9 @@ navigation:
- section: Settlus
contents:
- - page: Settlus API Quickstart
+ - page: Quickstart
path: api-reference/settlus/settlus-api-quickstart.mdx
- - page: Settlus API FAQ
+ - page: FAQ
path: api-reference/settlus/settlus-api-faq.mdx
- api: Settlus API Endpoints
api-name: settlus
@@ -1463,9 +1453,9 @@ navigation:
- section: Ronin
contents:
- - page: Ronin API Quickstart
+ - page: Quickstart
path: api-reference/ronin/ronin-api-quickstart.mdx
- - page: Ronin API FAQ
+ - page: FAQ
path: api-reference/ronin/ronin-api-faq.mdx
- api: Ronin API Endpoints
api-name: ronin
@@ -1473,9 +1463,9 @@ navigation:
- section: Frax
contents:
- - page: Frax API Quickstart
+ - page: Quickstart
path: api-reference/frax/frax-api-quickstart.mdx
- - page: Frax API FAQ
+ - page: FAQ
path: api-reference/frax/frax-api-faq.mdx
- api: Frax API Endpoints
api-name: frax
@@ -1483,9 +1473,9 @@ navigation:
- section: Zora
contents:
- - page: Zora API Quickstart
+ - page: Quickstart
path: api-reference/zora/zora-api-quickstart.mdx
- - page: Zora API FAQ
+ - page: FAQ
path: api-reference/zora/zora-api-faq.mdx
- api: Zora API Endpoints
api-name: zora
@@ -1493,9 +1483,9 @@ navigation:
- section: Degen
contents:
- - page: Degen API Quickstart
+ - page: Quickstart
path: api-reference/degen/degen-api-quickstart.mdx
- - page: Degen API FAQ
+ - page: FAQ
path: api-reference/degen/degen-api-faq.mdx
- api: Degen API Endpoints
api-name: degen
@@ -1503,9 +1493,9 @@ navigation:
- section: Gensyn
contents:
- - page: Gensyn API Quickstart
+ - page: Quickstart
path: api-reference/gensyn/gensyn-api-quickstart.mdx
- - page: Gensyn API FAQ
+ - page: FAQ
path: api-reference/gensyn/gensyn-api-faq.mdx
- api: Gensyn API Endpoints
api-name: gensyn
@@ -1513,9 +1503,9 @@ navigation:
- section: Humanity
contents:
- - page: Humanity API Quickstart
+ - page: Quickstart
path: api-reference/humanity/humanity-api-quickstart.mdx
- - page: Humanity API FAQ
+ - page: FAQ
path: api-reference/humanity/humanity-api-faq.mdx
- api: Humanity API Endpoints
api-name: humanity
@@ -1523,9 +1513,9 @@ navigation:
- section: Rise
contents:
- - page: Rise API Quickstart
+ - page: Quickstart
path: api-reference/rise/rise-api-quickstart.mdx
- - page: Rise API FAQ
+ - page: FAQ
path: api-reference/rise/rise-api-faq.mdx
- api: Rise API Endpoints
api-name: rise
@@ -1533,9 +1523,9 @@ navigation:
- section: World Mobile Chain
contents:
- - page: World Mobile Chain API Quickstart
+ - page: Quickstart
path: api-reference/world-mobile-chain/world-mobile-chain-api-quickstart.mdx
- - page: World Mobile Chain API FAQ
+ - page: FAQ
path: api-reference/world-mobile-chain/world-mobile-chain-api-faq.mdx
- api: World Mobile Chain API Endpoints
api-name: worldmobilechain
@@ -1543,9 +1533,9 @@ navigation:
- section: ADI
contents:
- - page: ADI API Quickstart
+ - page: Quickstart
path: api-reference/adi/adi-api-quickstart.mdx
- - page: ADI API FAQ
+ - page: FAQ
path: api-reference/adi/adi-api-faq.mdx
- api: ADI API Endpoints
api-name: adi
@@ -1553,36 +1543,36 @@ navigation:
- section: BOB
contents:
- - page: BOB API Quickstart
+ - page: Quickstart
path: api-reference/bob/bob-api-quickstart.mdx
- - page: BOB API FAQ
+ - page: FAQ
path: api-reference/bob/bob-api-faq.mdx
- api: BOB API Endpoints
api-name: bob
slug: bob
- section: Mode
contents:
- - page: Mode API Quickstart
+ - page: Quickstart
path: api-reference/mode/mode-api-quickstart.mdx
- - page: Mode API FAQ
+ - page: FAQ
path: api-reference/mode/mode-api-faq.mdx
- api: Mode API Endpoints
api-name: mode
slug: mode
- section: Moonbeam
contents:
- - page: Moonbeam API Quickstart
+ - page: Quickstart
path: api-reference/moonbeam/moonbeam-api-quickstart.mdx
- - page: Moonbeam API FAQ
+ - page: FAQ
path: api-reference/moonbeam/moonbeam-api-faq.mdx
- api: Moonbeam API Endpoints
api-name: moonbeam
slug: moonbeam
- section: Plasma
contents:
- - page: Plasma API Quickstart
+ - page: Quickstart
path: api-reference/plasma/plasma-api-quickstart.mdx
- - page: Plasma API FAQ
+ - page: FAQ
path: api-reference/plasma/plasma-api-faq.mdx
- api: Plasma API Endpoints
api-name: plasma
@@ -1590,9 +1580,9 @@ navigation:
- section: Citrea
contents:
- - page: Citrea API Quickstart
+ - page: Quickstart
path: api-reference/citrea/citrea-api-quickstart.mdx
- - page: Citrea API FAQ
+ - page: FAQ
path: api-reference/citrea/citrea-api-faq.mdx
- api: Citrea API Endpoints
api-name: citrea
@@ -1606,9 +1596,9 @@ navigation:
- section: Clankermon
contents:
- - page: Clankermon API Quickstart
+ - page: Quickstart
path: api-reference/clankermon/clankermon-api-quickstart.mdx
- - page: Clankermon API FAQ
+ - page: FAQ
path: api-reference/clankermon/clankermon-api-faq.mdx
- api: Clankermon API Endpoints
api-name: clankermon
@@ -1621,9 +1611,9 @@ navigation:
slug: arc
- section: MegaETH
contents:
- - page: MegaETH API Quickstart
+ - page: Quickstart
path: api-reference/megaeth/megaeth-api-quickstart.mdx
- - page: MegaETH API FAQ
+ - page: FAQ
path: api-reference/megaeth/megaeth-api-faq.mdx
- api: MegaETH API Endpoints
api-name: megaeth
@@ -1635,9 +1625,9 @@ navigation:
slug: stable
- section: Tron
contents:
- - page: Tron API Quickstart
+ - page: Quickstart
path: api-reference/tron/tron-api-quickstart.mdx
- - page: Tron API FAQ
+ - page: FAQ
path: api-reference/tron/tron-api-faq.mdx
- api: Tron API Endpoints
api-name: tron
@@ -1651,9 +1641,9 @@ navigation:
- section: Tempo
contents:
- - page: Tempo API Quickstart
+ - page: Quickstart
path: api-reference/tempo/tempo-api-quickstart.mdx
- - page: Tempo API FAQ
+ - page: FAQ
path: api-reference/tempo/tempo-api-faq.mdx
- api: Tempo API Endpoints
api-name: tempo