Skip to content

SDKs

One API. Three ways in.

The .NET SDK is the reference implementation. TypeScript mirrors it method for method, and everything they do is plain HTTPS if you'd rather call the REST API yourself.

Coming soon

.NET

The reference SDK: async end to end, a TimeSpan timeout on every wait, exceptions that carry the problem body.

Waridex.Client
Requires
.NET 8, 9 or 10
Package
Waridex.Client on NuGet, when it ships
Coming soon

TypeScript

A typed client for Node, ESM and CommonJS, with no runtime dependencies. Works in Playwright, Cypress, Jest and Vitest.

@waridex/client
Requires
Node, ESM or CommonJS
Package
@waridex/client on npm, when it ships
Available

REST API

JSON over HTTPS with bearer keys. Waiting is one long-poll call, so any HTTP client works.

curl -H "Authorization: Bearer $KEY" …
Requires
Any HTTP client
Package
v1, at api.waridex.com

Same test, two languages

Learn it once. The names don't change.

Create an inbox, wait for the one-time code, use it. Both SDKs expose the same operations and the same response schemas, in the casing your language expects.

SignupTests.cs
using Waridex.Client;

var client = new WaridexClient(Environment.GetEnvironmentVariable("WARIDEX_API_KEY")!);
var run = $"run-{Guid.NewGuid():N}"; // one tag per run, purged at the end
var inbox = await client.Inboxes.CreateAsync("signup", tags: [run]);
var address = inbox.AddressFor("user1");

await app.SignUpAsync(address);

var otp = await inbox.WaitForOtpAsync(
    to: address, timeout: TimeSpan.FromSeconds(30));
await app.VerifyAsync(otp);

await client.Inboxes.DeleteByTagAsync(run);
signup.spec.ts
import { Waridex } from '@waridex/client';

const waridex = new Waridex({ apiKey: process.env.WARIDEX_API_KEY! });
const run = `run-${crypto.randomUUID()}`; // one tag per run, purged at the end
const inbox = await waridex.inboxes.create({ name: 'signup', tags: [run] });
const address = inbox.addressFor('user1');

await app.signUp(address);

const otp = await inbox.waitForOtp({
  to: address, timeoutMs: 30_000 });
await app.verify(otp);

await waridex.inboxes.deleteByTag(run);
using Waridex.Client;

var client = new WaridexClient(Environment.GetEnvironmentVariable("WARIDEX_API_KEY")!);
var run = $"run-{Guid.NewGuid():N}"; // one tag per run, purged at the end
var inbox = await client.Inboxes.CreateAsync("signup", tags: [run]);
var address = inbox.AddressFor("user1");

await app.SignUpAsync(address);

var otp = await inbox.WaitForOtpAsync(
    to: address, timeout: TimeSpan.FromSeconds(30));
await app.VerifyAsync(otp);

await client.Inboxes.DeleteByTagAsync(run);

Test framework fixtures

Inboxes that create and clean up themselves.

The Playwright fixtures hand each test its own inbox under the worker's tag and purge the tag when the worker ends, so a failed run never leaves a mess behind and parallel tests never share an address.

  • @waridex/client/playwrightinbox, a fresh tagged inbox per test, and tag, one per worker, purged when the worker ends.
  • services.AddWaridex(...)Registers the .NET client with dependency injection, for xUnit and NUnit suites.
signup.spec.ts
import { test } from '@waridex/client/playwright';

test('a one-time code signs the user in', async ({ page, inbox }) => {
  const address = inbox.addressFor('user1');
  await page.goto('/signup');
  await page.fill('#email', address);
  await page.click('text=Send me a code');

  const otp = await inbox.waitForOtp({ to: address, timeoutMs: 30_000 });
  await page.fill('#otp', otp);
  // the worker's tag purges its inboxes when the worker ends
});

What every SDK gives you

Wait helpers

WaitForOtpAsync, WaitForLinkAsync and WaitForMessageAsync, and their TypeScript twins, loop the wait call for you, so a 30-second timeout is one line.

Timeouts you control

.NET takes a TimeSpan and throws WaridexTimeoutException or WaridexExtractionException with the problem body; TypeScript takes timeoutMs.

Generated from one document

Both cores are generated from the public OpenAPI document, so MessageResponse, CodeResponse and LinkResponse carry the same fields in each, in your language's casing.

Any environment

Both default to api.waridex.com and take a base URL for a staging stack or the local Compose stack.

Missing your language?

The REST API is small and documented. Tell us what you'd use and we'll prioritise the next client.