Getting Started
Welcome! This guide will get you up and running with the D_D Cloud RPC in under five minutes.
Follow along to make your first RPC request and start building amazing DApps.
Prerequisites
Before you begin, make sure you have:
- A D_D Cloud account (sign up is free!)
- Basic knowledge of a programming language like JavaScript, TypeScript, Python, Rust, or Bash Script.
- Internet connection for API requests.
Getting an API key
If you already created an API key, you can find it in your D_D Cloud Dashboard; otherwise, you must create a new one.
- Open your D_D Cloud Dashboard.
- Click the Generate New API Key button.
- Copy the new API key and store it in a secure location.
Take The .env Pledge
The .env Pledge outlines best practices for handling crypto keys. Taking it is a fun way to remind yourself about safe key management.
Installing Dependencies
Choose your preferred language and install the required packages.
npm install ethers
Sending the first request
Now that you set everything up, let’s fetch the latest finalized block from Ethereum.
Replace YOUR_API_KEY with your actual API key.
import { ethers } from "ethers"
async function main() {
const rpcClient = new ethers.JsonRpcProvider(
"https://api.cloud.developerdao.com/rpc/eth/YOUR_API_KEY"
)
try {
// Get the most recent finalized block
const block = await rpcClient.getBlock("finalized")
// Log the block details
console.log("✅ Most recent, finalized block:", {
number: block.number,
hash: block.hash,
timestamp: new Date(block.timestamp * 1000).toISOString(),
transactions: block.transactions.length
})
} catch (error) {
console.error("❌ Failed to fetch block:", error.message)
}
}
main()
Next Steps
After getting your first connection up and running, check out what D_D Cloud has to offer.
- Discover supported networks, including Ethereum, Base, Solana, and more.
- Check out the API reference of all available RPC methods and parameters.
Supported Blockchain Networks
You can find all networks supported by D_D Cloud RPC in the following table.
| Name | Chain ID | HTTP Support | WebSocket Support |
|---|---|---|---|
| Ethereum | eth |
✅ | ❌ |
| Base | base |
✅ | ✅ |
| Arbitrum One | arb-one |
✅ | ❌ |
| Solana | solana |
✅ | ❌ |
| Sui | sui |
✅ | ❌ |
| Binance Smart Chain | bsc |
✅ | ✅ |
| Polygon | poly |
✅ | ❌ |
| Optimism | op |
✅ | ❌ |
Note
The Chain ID in this context refers to the path of the RPC endpoint, not the ID defined by EIP-155.
API Reference
This reference contains the supported API endpoints for the D_D Cloud RPC.
Note
The Chain ID in the context of D_D Cloud RPC refers to the path of the RPC endpoint URL, not the ID defined by EIP-155.
HTTP Endpoint
Makes a JSON-RPC request to network specified by CHAIN_ID.
https://api.cloud.developerdao.com/rpc/{CHAIN_ID}/{API_KEY}
You can find a list of supported RPC CHAIN_ID values
in the docs and get your API key in
the D_D Cloud Dashboard.
Example
https://api.cloud.developerdao.com/rpc/eth/abcdef123456
WebSockets Endpoint
Initiates a WebSockets connection to network specified by CHAIN_ID.
wss://api.cloud.developerdao.com/ws/{CHAIN_ID}/{API_KEY}
You can find a list of supported RPC CHAIN_ID values
in the docs and get your API key in
the D_D Cloud Dashboard.
Example
wss://api.cloud.developerdao.com/ws/base/abcdef123456