> For the complete documentation index, see [llms.txt](https://docs.obol.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.obol.org/next/sdk/classes/incentives.md).

# Incentives

Defined in: [incentives/incentives.ts:24](https://github.com/ObolNetwork/obol-sdk/blob/5137bd5c4ded55a50234f19135ea3a5bfeab4d47/src/incentives/incentives.ts#L24)

**`Internal`**

Incentives can be used for fetching and claiming Obol incentives.

Access it through Client.incentives.

## Example

```ts
const obolClient = new Client(config);
await obolClient.incentives.claimIncentives(address);
```

## Methods

### claimIncentives()

> **claimIncentives**(`address`): `Promise`<[`ClaimIncentivesResponse`](/next/sdk/type-aliases/claimincentivesresponse.md)>

Defined in: [incentives/incentives.ts:65](https://github.com/ObolNetwork/obol-sdk/blob/5137bd5c4ded55a50234f19135ea3a5bfeab4d47/src/incentives/incentives.ts#L65)

Claims Obol incentives from a Merkle Distributor contract using an address.

This method automatically fetches incentive data and verifies whether the incentives have already been claimed. If `txHash` is `null`, it indicates that the incentives were already claimed.

Note: This method is not yet enabled and will throw an error if called.

#### Parameters

| Parameter | Type     | Description                         |
| --------- | -------- | ----------------------------------- |
| `address` | `string` | The address to claim incentives for |

#### Returns

`Promise`<[`ClaimIncentivesResponse`](/next/sdk/type-aliases/claimincentivesresponse.md)>

The transaction hash or already claimed status

#### Remarks

**⚠️ Important:** If you're storing the private key in an `.env` file, ensure it is securely managed and not pushed to version control.

#### Throws

Will throw an error if the incentives data is not found or the claim fails

An example of how to use claimIncentives: [obolClient](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L281)

***

### isClaimed()

> **isClaimed**(`contractAddress`, `index`): `Promise`<`boolean`>

Defined in: [incentives/incentives.ts:124](https://github.com/ObolNetwork/obol-sdk/blob/5137bd5c4ded55a50234f19135ea3a5bfeab4d47/src/incentives/incentives.ts#L124)

Read isClaimed.

#### Parameters

| Parameter         | Type     | Description                                |
| ----------------- | -------- | ------------------------------------------ |
| `contractAddress` | `string` | Address of the Merkle Distributor Contract |
| `index`           | `number` | operator index in merkle tree              |

#### Returns

`Promise`<`boolean`>

true if incentives are already claime

An example of how to use isClaimed: [obolClient](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L266)

***

### getIncentivesByAddress()

> **getIncentivesByAddress**(`address`): `Promise`<[`ClaimableIncentives`](/next/sdk/type-aliases/claimableincentives.md)>

Defined in: [incentives/incentives.ts:143](https://github.com/ObolNetwork/obol-sdk/blob/5137bd5c4ded55a50234f19135ea3a5bfeab4d47/src/incentives/incentives.ts#L143)

#### Parameters

| Parameter | Type     | Description      |
| --------- | -------- | ---------------- |
| `address` | `string` | Operator address |

#### Returns

`Promise`<[`ClaimableIncentives`](/next/sdk/type-aliases/claimableincentives.md)>

The matched incentives from DB

#### Throws

On not found if address not found.

An example of how to use getIncentivesByAddress: [obolClient](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L250)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.obol.org/next/sdk/classes/incentives.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
