Skip to main content
Cloak ships two first-party SDKs targeting the same on-chain protocol. Pick the one that matches your stack:

TypeScript SDK

@cloak.dev/sdk — browser + Node.js SDK with a high-level CloakSDK class, wallet-adapter integration, built-in scanner and note storage. Integrates with @solana/web3.js and @solana/kit.

Rust SDK

cloak-sdk — engine-first Rust crate. One transact() entrypoint, one TransactOptions struct, full protocol pipeline end-to-end.

Which one should I use?

Both SDKs speak the same protocol and produce the same 264-byte public inputs. Migrating between them is straightforward once you understand the shared primitives.

Shared runtime defaults

The relay URL points at Cloak’s hosted submission endpoint that the SDK uses to land transactions on-chain. The default is correct for mainnet — only override relayUrl if you’re targeting a different deployment (e.g. devnet).

Shared concepts

Before you write code, skim the language-agnostic primer:

TypeScript SDK

Start here for web3.js and Solana Kit integrations: Install:

Rust SDK

Start here for server-side and CLI integrations: Install: