> ## 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.

# Stake

> Stake tokens using the SDK

Use `executeStake` to deposit tokens into a staking pool.

## Usage

```typescript theme={null}
import { executeStake } from '@avnu/avnu-sdk';
import { parseUnits } from 'ethers';

const result = await executeStake({
  provider: account, // Starknet Account
  poolAddress: '0x0362dc7da60bfddc8e3146028dfd94941c6e22403c98b5947104e637543b475d', // avnu $STRK delegation pool
  amount: parseUnits('100', 18), // Amount to stake (in wei)
});

console.log('Transaction Hash:', result.transactionHash);
```

## Parameters

<ParamField path="provider" type="AccountInterface" required>
  The Starknet account executing the transaction.
</ParamField>

<ParamField path="poolAddress" type="string" required>
  The address of the staking pool contract.
</ParamField>

<ParamField path="amount" type="bigint" required>
  The amount of tokens to stake (in smallest unit, e.g., wei).
</ParamField>

<ParamField path="paymaster" type="object">
  Optional paymaster configuration for gasless staking.
</ParamField>
