Skip to content
On this page

Undelegate Polygon

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

undelegate(address, amount, isPOL = false): Undelegate user's tokens.

Undelegate Code Example

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

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

// The amount that the user undelegates.
const amountUndelegate = 5;

// Undelegate user's tokens - return transaction
const undelegateResp = await Polygon.undelegate(address, amountUndelegate, false);
console.log(undelegateResp); // Raw Transaction