> For the complete documentation index, see [llms.txt](https://docs.okkult.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.okkult.io/developers/sdk-installation.md).

# SDK installation

## SDK installation

Install the SDK in any TypeScript project that targets Okkult flows.

### Requirements

* Node.js `>= 18`
* `npm`, `pnpm`, or `yarn`
* Ethereum wallet and RPC URL

### Installation

#### npm

```bash
npm install @okkult/sdk
```

#### pnpm

```bash
pnpm add @okkult/sdk
```

#### yarn

```bash
yarn add @okkult/sdk
```

### Basic initialization

```typescript
import { OkkultSDK } from '@okkult/sdk'

const okkult = new OkkultSDK({
  chain: 'ethereum',
  rpcUrl: 'YOUR_ALCHEMY_OR_INFURA_URL'
})
```

### Core methods

#### 1. `okkult.checkCompliance(address)`

Use this method to check whether an address is compliant before starting a proof flow.

```typescript
const address = '0xYourAddress'

const result = await okkult.checkCompliance(address)

console.log(result)
```

#### 2. `okkult.generateProof(address, secret)`

Use this method to generate a proof from an address and secret.

```typescript
const address = '0xYourAddress'
const secret = 'YOUR_SECRET'

const proof = await okkult.generateProof(address, secret)

console.log(proof)
```

#### 3. `okkult.submitProof(proof, signer)`

Use this method to submit an existing proof on-chain with a signer.

```typescript
const tx = await okkult.submitProof(proof, signer)

console.log(tx)
```

#### 4. `okkult.proveAndSubmit(address, secret, signer)`

Use this method when you want one call to handle the full flow.

```typescript
const address = '0xYourAddress'
const secret = 'YOUR_SECRET'

const tx = await okkult.proveAndSubmit(address, secret, signer)

console.log(tx)
```

{% hint style="success" %}
Use `proveAndSubmit()` for the simplest integration.

It checks compliance, generates proof, and submits in a single call.
{% endhint %}

#### 5. `okkult.shield({ token, amount }, walletClient, publicClient)`

Use this method to shield a supported asset into the private pool.

```typescript
const tx = await okkult.shield(
  { token: 'USDC', amount: '100' },
  walletClient,
  publicClient
)

console.log(tx)
```

### Notes

* Use Ethereum Mainnet RPC infrastructure.
* Keep your signer connected to the same chain as the SDK client.
* Use `walletClient` and `publicClient` types that match your app stack.

### Next Steps

* [SDK reference](/developers/sdk-reference.md)
* [Compliance gate](/developers/compliance-gate.md)
* [Smart contracts](/developers/smart-contracts.md)


---

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

```
GET https://docs.okkult.io/developers/sdk-installation.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.
