# useHaven1SDK

## Function: useHaven1SDK()

> **useHaven1SDK**(): `Haven1SDK`

Custom hook to access the Haven1 SDK instance from the context.

### Returns

`Haven1SDK`

The Haven1 SDK instance.

### Throws

If the Haven1SDKProvider is missing in the component tree.

### Defined in

[packages/react/src/api/hook/useHaven1Sdk.tsx:35](https://github.com/haven1network/haven1-sdk/blob/7cd51fbeb78d9011a6b1c4b8e514287b0d830453/packages/react/src/api/hook/useHaven1Sdk.tsx#L35)


---

# Agent Instructions: 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:

```
GET https://docs.haven1.org/build/developer-tools/haven1-sdk/haven1-react-sdk/usehaven1sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
