@everstake/wallet-sdk-hysp
v1.2.0
Published
HYSP - Everstake Wallet SDK
Downloads
303
Readme
Everstake Wallet SDK - HYSP Vaults
Getting Started
Step 1: Installing the library
To use this module via SDK you need to install SDK:
$ npm install @everstake/wallet-sdk-hyspor you can also use yarn
$ yarn add @everstake/wallet-sdk-hyspor you can use pnpm
$ pnpm add @everstake/wallet-sdk-hyspStep 2: Importing The library
After installing the package, you can import the Hysp module and use the SDK:
Import ES6
// import module
import { Hysp } from '@everstake/wallet-sdk-hysp';
// or you can also use
import * as Hysp from '@everstake/wallet-sdk-hysp';Import ES5
// import module
const { Hysp } = require("@everstake/wallet-sdk-hysp");Step 3: Using the library
Initialize Hysp object this way:
const hysp = new Hysp();
await hysp.init();3.1 Depositing to Issuance Vault
- Increase allowance on supported token by calling
approveToIssuanceVault - Deposit using
depositInstant
3.2 Redeeming from Redemption Vault
- Increase collateral token allowance to redemption vault by calling
approveToRedemptionVault - Withdraw using
redeemInstantorredeemRequest
Note: instant redeem upholds fee and is limited. To get fee percent call getInstantRedeemFee, and to get assets accessible for instant redeem use getRedeemLiquidity
