Skip to content
On this page

Unstake Polygon

The transaction namespace contains methods used for sending transactions. The unique method to the transaction namespace is:

unstake(address, amount): Unstake user's tokens.

Unstake Code Example

ts
// Import SDK
import { Polygon } from '@everstake/wallet-sdk';

const address = '2f92e...6761b'

// The amount that the user unstakes.
const amountUnstake = 5;

// Unstake user's tokens - return transaction
const unstakeResp = await Polygon.unstake(address, amountUnstake);
console.log(unstakeResp); // Raw Transaction