Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.avnu.fi/llms.txt

Use this file to discover all available pages before exploring further.

Unstaking is a two-step process:
  1. Initiate Unstake: Request to withdraw funds. This starts the 7-day unbonding period.
  2. Unstake: Claim the funds after the 7-day unbonding period has passed.

1. Initiate Unstake

import { executeInitiateUnstake } from '@avnu/avnu-sdk';
import { parseUnits } from 'ethers';

const result = await executeInitiateUnstake({
  provider: account,
  poolAddress: '0x...',
  amount: parseUnits('50', 18),
});

2. Claim Unstaked Funds

import { executeUnstake } from '@avnu/avnu-sdk';

const result = await executeUnstake({
  provider: account,
  poolAddress: '0x...',
});

Parameters

Initiate Unstake

amount
bigint
required
Amount to withdraw.

Common Parameters

provider
AccountInterface
required
The Starknet account.
poolAddress
string
required
The staking pool address.
paymaster
object
Optional paymaster configuration for gasless staking.