Getting Started
You can use this library to implement Berrachain staking for Everstake validator. Berrachain has EVM, so it works the same way as ethereum and you can use the same libraries for signing and sending tx. Also, you can use API for building transactions or fetching info.
Option 1: REST API
You can use REST API to call methods which are described in Swagger with detailed examples
https://wallet-sdk-api.everstake.one
Option 2: JavaScript library
You can install and import Wallet SDK for Javascript.
Step. 1: Installing the Library
Install the npm library by copying the code below.
sh
$ npm install @everstake/wallet-sdk-berrachain
or you can also use yarn
sh
$ yarn add @everstake/wallet-sdk-berrachain
Step. 2: Import Wallet SDK
After installing the app, you can import module of needed blockchain (Ethereum, Aptos, Solana, Cosmos, Polygon are available) and use the SDK:
Import ES6
js
// or you can also use
import * as Berrachain from '@everstake/wallet-sdk-berrachain';
// import needed class
import { Berrachain } from '@everstake/wallet-sdk-berrachain';
Import ES5
js
// import module
const { Berrachain } = require("@everstake/wallet-sdk-berrachain");
// or you can also use
const { Berrachain } = require("@everstake/wallet-sdk-berrachain");
Step. 3: Create Berrachain instance
js
const { Berrachain } = require("@everstake/wallet-sdk-berrachain");
// signet or mainnet
const network = 'testnet'
// public key from KeyPair. Buffer type
const publicKey = keyPair.publicKey
// rpc url
const rpc = 'https://some-berrachain-rpc.com'
const berrachain = new Berrachain(network, rpc);