This package facilitates the interactions with the Vea protocol.
Getting Started
yarn add @kleros/vea-sdk
# or
npm install @kleros/vea-sdk
Example
import { Wallet } from "@ethersproject/wallet";
import VeaSdk from "../src/index";
// Create the Vea client
const vea = VeaSdk.ClientFactory.arbitrumGoerliToChiadoDevnet(
"https://rpc.goerli.eth.gateway.fm",
"https://rpc.chiado.gnosis.gateway.fm"
);
// Get the message info
const messageId = 42;
const messageInfo = await vea.getMessageInfo(messageId);
// Relay the message
const privateKey = process.env["PRIVATE_KEY"] ?? "";
const wallet = new Wallet(privateKey, vea.outboxProvider);
await vea.relay(messageInfo, wallet);