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.
D_D Cloud CLI
The Cloud CLI lets you manage API keys, track service usage, and view account balances all from your terminal.
Prerequisites
- A D_D Cloud account (sign up is free!)
- The email address and password you used to sign up for D_D Cloud.
Installing the Cloud CLI
Choose your operating system and run the install command.
Note
You can find the current version of the Cloud CLI and the supported architectures on GitHub.
Linux and MacOS
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Developer-DAO/cloud-cli/releases/download/v0.1.0/dd-cloud-installer.sh | sh
Windows
powershell -ExecutionPolicy Bypass -c "irm https://github.com/Developer-DAO/cloud-cli/releases/download/v0.1.0/dd-cloud-installer.ps1 | iex"
Updating the Cloud CLI
You can update the Cloud CLI with the following command.
dd-cloud-update
Using the Cloud CLI
The Cloud CLI commands have the following structure.
dd-cloud <COMMAND> <FLAGS>
Retrieving an API key
This command copies an API endpoint URL with a specific API key into your clipboard.
dd-cloud get-api-key
Flags
--unsafe-printflushesstdoutbefore printing the API key, so you can pipe it into other commands.--helpexplains the command and its flags.
Deleting an API key
This command deletes a specific API key.
dd-cloud delete-api-key
Flags
--helpexplains the command and its flags.
Generating an API key
This command generates a new API key and will copy it into your clipboard.
dd-cloud new-api-key
Flags
--helpexplains the command and its flags.
Viewing your RPC usage
This command displays the number of calls you made.
dd-cloud track-usage
Flags
--helpexplains the command and its flags.
Viewing your account balance
This command displays the remaining funds in your account.
dd-cloud balance
Flags
--helpexplains the command and its flags.
Viewing the CLI help
This command explains available commands.
dd-cloud help
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