Dark Forest Dev Guides
jacob/community
jacob/community
  • Developing for Dark Forest!
  • Connecting to the blockchain
    • What is an RPC endpoint?
    • Changing your RPC endpoint
    • Running your own xDAI node
  • Plugins
    • What is a plugin?
    • Writing your first plugin
    • Porting v0.5 plugins to v0.6
  • Mining
    • What is mining?
    • Sharing map data
    • Running a headless miner
    • Connecting to a remote (headless) miner
  • Developer resources
    • Running a custom client
    • Developing plugins locally
    • 3rd-party contract development
    • Dark Forest subgraph
    • How to query a subgraph
  • SNARKing
    • Running a remote SNARKer
  • Contributing
    • Contributing to this knowledge base
Powered by GitBook
On this page

Was this helpful?

  1. Connecting to the blockchain

What is an RPC endpoint?

PreviousDeveloping for Dark Forest!NextChanging your RPC endpoint

Last updated 3 years ago

Was this helpful?

As a decentralized game, Dark Forest stores all public game data on a blockchain. Currently, Dark Forest v0.6 is run on the --an EVM compatible sidechain.

To connect to and retrieve data from a blockchain, you'll need to connect to a node on the blockchain network. A node is a participant in the network that stores and serves the latest blockchain state. Users who wish to download blockchain data can either run a node themselves, or connect to a publicly-provided node via the node's RPC endpoint. An RPC (remote procedure call) endpoint is like a node's address: it's a URL which requests for blockchain data can be sent to.

The Ethereum defines the methods which you can use to retrieve data from a node. As a player or 3rd-party developer, you likely won't need to make RPC calls directly with this API--these calls are typically abstracted by web3 libraries like .

By default, the Dark Forest webclient will connect to , a public endpoint provided by the xDAI team. xDAI maintains a fleet of nodes which respond to requests made to this endpoint. There are other public endpoints you can connect to as well; if you'd like a dedicated node to serve your requests, you can also run your own xDAI node and connect to the endpoint it exposes.

xDAI blockchain
JSON-RPC spec
ethers.js
https://rpc-df.xdaichain.com/