JavaScript/TypeScript
Installation
npm install @corpus-core/colibri-statelessUsing Colibri as RPC Provider
import { BrowserProvider } from "ethers";
import Colibri from "@corpus-core/colibri-stateless";
async function main() {
// Initialize the client with the default configuration and RPCs
const client = new Colibri({prover:['https://mainnet.colibri-proof.tech']});
// Use Colibri client as the EIP-1193 provider for ethers (v6)
const provider = new BrowserProvider(client);
// Fetch the latest block using the ethers provider
const block = await provider.getBlock('latest');
console.log("Block fetched via ethers:", block);
}
main().catch(console.error);import * as ethers from "ethers";
import Colibri from "@corpus-core/colibri-stateless";
async function main() {
// Initialize the client with the default configuration and RPCs
const client = new Colibri({prover:['https://mainnet.colibri-proof.tech']});
// Use Colibri client as the EIP-1193 provider for ethers (v6)
const provider = new ethers.providers.Web3Provider(client);
// Fetch the latest block using the ethers provider
const block = await provider.getBlock('latest');
console.log("Block fetched via ethers:", block);
}
main().catch(console.error);Secure Transaction Verification
How it works
Example
Building proofs in you app.
Configuration
Building
CMake Presets (Recommended)
emcmake
Last updated