@kleros/vea-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

Vea SDK npm

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);

Readme

Keywords

none

Package Sidebar

Install

npm i @kleros/vea-sdk

Homepage

vea.ninja

Weekly Downloads

1

Version

0.4.0

License

MIT

Unpacked Size

28.1 kB

Total Files

24

Last publish

Collaborators

  • greenlucid
  • jaybuidl
  • alcercu
  • clesaege
  • ferittuncer
  • danild