Skip to content

Get started

Get started with Cive.

Overview

Cive is a Typescript interface for the Conflux Core Space. It is built on viem. If you are working with Conflux eSpace, we recommended to use viem.

Quick start

1. Set up your Client & Transport

import { createPublicClient, http } from "cive";
import { mainnet } from "cive/chains";
const client = createPublicClient({

  chain: mainnet, 
  transport: http(), 
}); 

2. Consume Actions

Now that you have a Client set up, you can now interact with Conflux core space and consume Actions!

import { createPublicClient, http } from "cive";
import { mainnet } from "cive/chains";
 
const client = createPublicClient({
  chain: mainnet,
  transport: http(),
});
 
const block = await client.getBlock();