Cive is an interface for the Conflux Core Space, built on Viem.
Use npm
npm install cive
Or pnpm
pnpm add cive
Or yarn
yarn add cive
// 1. Import modules
import { createPublicClient, http } from "cive";
import { mainnet } from "cive/chains";
// 2. Set up client
const publicClient = createPublicClient({
chain: mainnet,
transport: http(),
});
// 3. consume an action
const block = await publicClient.getBlock();
Head to the documentation to read and learn more about cive.