GitHub - Pier-Two/staking-ts: Typescript SDK for Staking Platform API

Piertwo Staking API SDK

A JS development kit with supported TypeScript typings.

Installation

yarn add @pier_two/staking-ts

Documentation

yarn or npm run install yarn build:docs or npm run build:docs npx serve ./docs

PierTwoStakingApi

The main class for interacting with the Pier Two staking platform. All endpoints in the Pier Two Staking Api are implemented. Read full documentation here.

import { URL, PierTwoStakingApi } from '@pier_two/staking-ts'

const piertwo = new PierTwoStakingApi({
  baseUrl: URL.MAINNET,
  apiKey: 'yourApiKey'
});

async function main() {
  const accountDetails = await piertwo.account.getAccount();

  console.log(accountDetails.data)
}

main()