Skip to content
On this page

Getting Started

You can use two different options to implement staking for Everstake validator.

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

or you can also use yarn

sh
$ yarn add @everstake/wallet-sdk

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

ts
// import module
import { Aptos } from '@everstake/wallet-sdk';
// or you can also use
import * as Aptos from '@everstake/wallet-sdk/aptos';
// import needed function
import { stake } from '@everstake/wallet-sdk/aptos';

Import ES5

ts
// import module
const { Aptos } = require("@everstake/wallet-sdk");
// or you can also use
const { stake } = require("@everstake/wallet-sdk/aptos");

Step. 3: Create Auth Token

In order to access all the features of the Wallet SDK, it's necessary for you to generate an authentication token. This token will be required in all of the methods you use.

Using JS Library

ts
// import
const { CreateToken } = require("@everstake/wallet-sdk");

// Project name
const name = 'Everstake Wallet SDK';
// wallet | Dapp | Other
const type = 'SDK';

// Create Token - return token ID
const token = await CreateToken(name, type);
console.log(token); // 3155f389-d943-4966-8e18-f159c2a6ef66

Using REST API (Swagger)

curl -X 'POST' \
  'https://wallet-sdk-api.everstake.one/token/create' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Everstake Wallet SDK",
  "type": "SDK"
}'