Skip to main content

JSON RPC API

The service offers an API that facilitates interaction with the MOI Network, enabling users to either submit interactions or retrieve state information.

1. Base Url

https://voyage-rpc.moi.technology/babylon/v2

2. Authentication

In order to utilize our API key, it is required that you pass the API KEY in a URL.

If you not have API key, we kindly direct you to our Getting Started guide. Here, you will find comprehensive instructions on how to generate a new API key, enabling you to utilize the JSON-RPC endpoint effectively.

3. Usage

Use HTTPS to call a JSON-RPC method. In this example we use curl to make the HTTPS request.

Note: Ensure that you replace YOUR-API-KEY with an API key from your Voyage dashboard.

curl --location 'https://voyage-rpc.moi.technology/babylon/v2/YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"method":"debug.Accounts",
"params":[{}],
"jsonrpc":"2.0",
"id":1
}'

Response

{
"id": 1,
"jsonrpc": "2.0",
"result": {
"data": [
"0xe05afbf6edab974e73459a688afa46ec7337b8d0a08020ff3e7996cc0827640a",
"0xd8213406d31788e6d0483d29bc4bc45ef5b218644b5be89efc9f910fc2669412",
"0x297f60c1296b963dd3f8cd82cb2b516b6f9b97d68060cdc47c4843ed436d9c18"
]
},
}

4. Supported JSON RPC Methods

Kindly refer to the JSON RPC Methods documentation for a comprehensive understanding of the supported methods within the MOI protocol.