ozvault home

SDK

Use the OzVault JavaScript SDK

Typed helpers for private buckets, encrypted file transfer, object listings, deletion and quota usage.

Install the package

#

@ozvault/sdk is not yet published on npm. Install the tarball from ozvault.lol, or use the copy that `ozvault init nextjs` and `ozvault init discord-js` include. It supports TypeScript, modern browsers with Web Crypto, and Node.js 22+, and has no runtime dependencies. Python and Go SDKs use the same encryption format.

TypeScript
npm install https://ozvault.lol/sdk/ozvault-sdk-0.1.0.tgz

Create a client

#

A trusted backend can authenticate with a scoped API key. The OzVault dashboard uses its same-origin JSON bridge for account operations and direct upload capabilities for file bytes.

TypeScript
import { OzVault } from '@ozvault/sdk';
const vault = new OzVault({
  baseUrl: process.env.OZVAULT_API_ORIGIN!,
  apiKey: process.env.OZVAULT_API_KEY
});
const { items, nextCursor } = await vault.listObjects({ bucketId });
const usage = await vault.usage();

Handle failures explicitly

#

OzVaultError exposes status, code, message and requestId. Upload accepts an AbortSignal, progress callback and resume ticket. Browser downloads currently assemble a bounded object in memory; the configurable upload limit should account for client memory.

Clear documentation is part of the product.