Skip to content
Alchemy Logo

Jovay API Quickstart

How to get started building on Jovay and using the JSON-RPC API

To use the Jovay API, you need an Alchemy account. Create a free account to get started.

Jovay is a high-performance Ethereum Layer 2 blockchain built by Ant Digital Technologies, designed for real-world asset (RWA) tokenization. It uses a dual-prover architecture combining Trusted Execution Environments (TEE) and Zero-Knowledge Proofs (ZKP) for cross-verified security, achieving sub-second response times and throughput of up to 22,000 TPS.

The Jovay API lets you interact with the Jovay network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the interface will be familiar.

Pick a package manager for your project's dependencies.

# Begin with npm by following the npm documentation
# https://docs.npmjs.com/downloading-and-installing-node-js-and-npm

Run the following commands to create and initialize your project:

mkdir jovay-api-quickstart
cd jovay-api-quickstart
npm init --yes

This creates a new directory named jovay-api-quickstart and initializes a Node.js project within it.

Install Axios to make API requests:

npm install axios

Create an index.js file in your project directory and paste the following code:

const axios = require('axios');
 
const url = 'https://jovay-mainnet.g.alchemy.com/v2/${your-api-key}';
 
const payload = {
  jsonrpc: '2.0',
  id: 1,
  method: 'eth_blockNumber',
  params: []
};
 
axios.post(url, payload)
  .then(response => {
    console.log('Latest Block:', response.data.result);
  })
  .catch(error => {
    console.error(error);
  });

Replace your-api-key with your actual Alchemy API key from the Alchemy Dashboard.

Run your script to make a request to the Jovay network:

node index.js

You should see the latest block number from Jovay in your console:

Latest Block: 0x...

You've made your first request to the Jovay network. Explore the JSON-RPC methods available on Jovay and start building your dApps.

Was this page helpful?