Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Get Started with D_D Cloud RPC

Welcome to D_D Cloud RPC! This guide will get you up and running in under 5 minutes. Follow along to make your first blockchain request and start building amazing dApps.

Making Your First Request

Prerequisites

Before you begin, make sure you have:

  • A D_D Cloud account (free signup)
  • Basic knowledge of your preferred programming language
  • Internet connection for API requests

Step 1: Get Your API Key

If you already created an API key, you should find it here. Otherwise, proceed to the sub-section below.

Create Your API Key

  1. Sign in to your D_D Cloud Account
  2. Navigate to Manage API Keys in the center of the dashboard page
  3. Click Generate New Key
  4. Copy and securely store your API key

Caution

Take the pledge by Patrick Collins
  • do not hardcode secrets into your code
  • do not store secrets in plaintext

Step 2: Install Dependencies

Choose your preferred language and install the required packages:

npm install ethers

Step 3: Make Your First Request

Now let’s fetch the latest finalized block from Ethereum. Replace YOUR_API_KEY_GOES_HERE with your actual API key:

import { ethers } from "ethers";

async function main() {
  const provider = new ethers.JsonRpcProvider(
    `https://api.cloud.developerdao.com/rpc/eth/YOUR_API_KEY_GOES_HERE`
  );

  try {
    // Get the most recent finalized block
    const block = await provider.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("❌ Error fetching block:", error.message);
  }
}

main();

What’s Next?

  • Deploy Your First dApp: Learn to build and deploy a complete decentralized application using D_D Cloud RPC. Start Building →
  • Explore All Networks: Discover 50+ supported blockchain networks including Ethereum, Polygon, Arbitrum, and more. View Networks →
  • Advanced Features: WebSockets, batch requests, archive data, and performance optimization techniques. Learn More →
  • API Reference: Complete documentation of all available RPC methods and parameters. View Docs →
  • Join Community: Connect with other developers, get help, and share your projects with the D_D community. Join Discord →
  • Monitor Usage: Track your API usage, set up alerts, and optimize your applications for better performance. View Dashboard →