$ npm install @tetra-hq/sdk

Build Unstoppable
Applications

Stop fighting the chain. Start building the product.

// The Experience

Don't Learn a
New Language

If you can write a Node.js function, you can write a smart contract.
Tetra runs a deterministic JavaScript runtime. Access the full power of the NPM ecosystem without the steep learning curve of Rust.

17M+
Devs
100%
NPM
Token.ts
TypeScript
1 import { Contract, State } from '@tetra-hq/sdk';
2
3 export default class Token extends Contract {
4
5   // 1. Automatic Persistence
6   @State balances = new Map<string, number>();
7
8   transfer(to: string, amount: number) {
9     // 2. Standard Syntax & Safety
10     if (this.balances.get(this.sender) < amount)
11       throw new Error("Insufficient funds");
12
13     // 3. No manual storage slots
14     this.balances.set(to, (this.balances.get(to) || 0) + amount);
15  }
16}
1

Automatic Persistence

Use @State decorators to automatically persist data to the chain. Data structures hydrate instantly when called.

2

Standard Syntax

Uses standard ES6+ classes, Maps, Sets, and arrow functions. No custom types to learn. Your existing logic transfers 1:1.

3

Runtime Safety

Tetra VM sandboxes every execution. Re-entrancy attacks, integer overflows, and infinite loops are prevented at the engine level.

Instant Finality

Transactions are irreversible in 100ms, not 60 minutes. Powered by Rapidcast, the first 2-round BFT consensus engine.

True Interoperability

Validators POST directly to websites, and smart contracts can fetch from URLs. No bridges, no wrapped assets, no hacks.

NPM Ecosystem

Import lodash, moment, or your own private enterprise packages. If it runs in Node, it runs on Tetra.

Federated Ownership Your Domain. Your Data. Your Rules.

Stop renting space on a global computer. Tetra is a federation of Realms. By mapping a Realm to your DNS domain, you retain cryptographic ownership of your application state, user data, and smart contract logic.

The Realm Model

Instead of a monolithic state trie, Tetra shards state by domain.

  • Legacy: Your contract is 0x71C... living on someone else's server.
  • Tetra: Your contract is tetra://api.yourcompany.com.

Sovereign vs. Custodial

Define your ownership model at genesis:

  • Sovereign Mode: Users own their keys via rotation proofs. You cannot seize assets.
  • Custodial Mode: You act as the Domain Authority (DA). Ideal for Enterprise/Fintech apps requiring KYC.

Data Portability

Your data isn't locked inside a proprietary client. All state is stored in standard Merkle Search Trees (MST). Self-host or delegate to the dCDN.

realm.config.ts
// Define your Realm's sovereignty programmatically
export class MyRealm extends Realm {
  @Config mode = RealmMode.Sovereign;
  @Config storage = "https://cdn.example.com";
}
DNS
Mapped Routing
MST
Standard Storage

Production Tooling

Everything you need to ship, debug, and scale.

$_

Tetra CLI

Your Local Command Center

Scaffold projects, run local simulation nodes, and deploy contracts with a single command. Includes hot-reloading for instant feedback.

$ tetra dev --network local

Deep-State Explorer

Debug Logic, Not Bytecode

Visualize state changes, trace transaction flows, and verify contract code in real-time. Natively decodes complex JS data structures so you can inspect Maps and Objects in memory.

explorer.tetra.cash

Client SDK

End-to-End Type Safety

A lightweight library for interacting with the chain. The SDK auto-generates TypeScript definitions from your smart contract code for perfect frontend autocomplete.

import { Client } from '@tetra-hq/client'
import { Contract } from '@tetra-hq/core';
export class Token extends Contract {
  transfer(to: string, amount: number) {
    this.balances[this.sender] -= amount;
    this.balances[to] += amount;
  }
}

Get Started

Ready to ship?

tetra@mainnet ~ _

Build the
Impossible

Join the pioneers shipping on infrastructure that doesn't compromise. 100ms finality. Zero excuses.

Accepting Early Access
No spam, ever
Priority access
Developer first

You're on the list

We'll reach out when it's your turn. Keep building.

Infrastructure for the next billion users