Skip to main content
This page gets you to one working, authenticated call — nothing else. No Rust, no WASM, no blockchain knowledge required for this part. Once this works, move on to Write your first TEE contract for the real thing.
1

Get your API key

Go to the claim page and sign in. You get an API key and test credits instantly — no approval wait.
Your key is shown once. Copy it somewhere safe before you navigate away — there’s no way to view it again.
2

Set up your project

Create a fresh project and install the SDK:
Then put the key from Step 1 into your shell’s environment — the code in the next step reads it from there, it isn’t written into any file:
A handful of teams have hit WASM-loading errors under Next.js/Turbopack, Vite, and older Webpack setups — the SDK loads a WASM component, and some bundlers try to process it in ways that break it. If you hit a WASM parse or module-loading error later in this guide and you’re in a bundled framework, try running the SDK code from a plain Node script or a server-only route first, to confirm your setup works before debugging the bundler. If you’re on Next.js specifically, adding your bundler’s equivalent of an external-packages/no-bundle exception for @terminal3/t3n-sdk is worth trying. We’re tracking this as a known rough edge — if you find a config that fixes it, tell us in the developer Telegram and we’ll document it here properly.
3

Connect and authenticate

Create a file named quickstart.ts in your project and paste this in — don’t run any of it in a terminal directly, it’s TypeScript, not shell commands:
Never hardcode or derive your tenant DID. It’s not related to your wallet address — it’s an opaque ID the platform assigns you the first time you sign in. Always read it back from the authenticated session, like tenantDid above — and keep both t3n (the client) and tenantDid (the value) around, since Set Up Dev Env and the rest of the walkthrough build directly on top of them.
“Reuse this variable” means literally keep coding in this same file. t3n and tenantDid are plain JavaScript variables — they only exist inside this one running script. The code samples on later pages (TenantClient, contract registration, invocation) assume t3n/tenantDid/tenant are already in scope, so append each new snippet to the bottom of this same quickstart.ts rather than starting a new file, unless you deliberately repeat the connect-and-authenticate block above at the top of it.
setEnvironment("testnet" | "production") tells the SDK which T3N cluster to resolve a node URL from for every client you create afterward — you never hardcode a node URL yourself. It defaults to "production", which is why setting it explicitly matters while you’re still building against testnet.
4

Run it

From the same directory as quickstart.ts:
If you see a did:t3n:... value printed, you’re connected.

What’s next

You now have two things every later page assumes you already have: an authenticated t3n client and its tenantDid. Keep both around (same variable names, same file) as you continue: