EspaceClient
Explore the full EspaceClient read API. EVM_TESTNET ships with @cfxdevkit/core — no separate network config file needed.
How it works
EVM_TESTNETis exported by@cfxdevkit/core—{ id: 71, rpcUrls, blockExplorers }. No config file needed.new EspaceClient({ chainId, rpcUrl })wraps viem’sPublicClientwith a simpler typed API.isConnected,getBlockNumber,getChainId,getGasPriceall run in parallel viaPromise.all.client.publicClientgives raw viem access forgetBlock,getLogs,simulateContract, and anything else not wrapped.
import { EspaceClient, EVM_TESTNET } from '@cfxdevkit/core'
const client = new EspaceClient({
chainId: EVM_TESTNET.id,
rpcUrl: EVM_TESTNET.rpcUrls.default.http[0],
})Last updated on