xDai

The xDai chain is a stable payments blockchain designed for fast and inexpensive transactions.

Introduction

The xDai chain is a stable payments blockchain designed for fast and inexpensive transactions. The chain uses a unique dual-token model; xDai is a stable token used for transactions, payments, and fees, and STAKE, which provides Proof-of-Stake security and supports the underlying POSDAO consensus. STAKE also serves in a governance capacity.

Querying the xDai Chain

Example: eth_blockNumber query

This example uses token authentication with the copied API endpoint, so no need to specify username/password. We query the latest block number using the eth_blockNumber method and no parameters.

Example Query:

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "eth_blockNumber","params": []}' your-copied-api-endpoint

Example Response:

The query returns a hexadecimal response equal to the latest block number. We get 0xeb48e3equal to 15419619.

{"jsonrpc":"2.0","result":"0xeb48e3","id":1}

JSON-RPC methods

Additional info on methods: