TAIFOONDOCUMENTATION · 07
07TAIFOON SDK
Taifoon SDK
Package Overview
TL;DR
@taifoon/sdk is the unified package for interacting with the Taifoon verification layer. TypeScript and Rust clients for V5 proofs, gas oracle, signal streaming, order execution, and API key management. Forge interfaces for on-chain verification. One install, sub-path imports for each module.
07.1INSTALLATION
Installation
TypeScript + Rust + Solidity
TypeScript
npm install @taifoon/sdk
Node.js 20+. Works with Next.js, Express, Bun, Deno.
Rust
[dependencies] taifoon-sdk = "0.1"
Requires tokio runtime. gRPC via tonic.
Solidity (Forge)
forge install taifoon/taifoon-sdk
Interfaces: IV5ProofVerifier, ILWC, IFOON, IStaking.
07.2MODULES
Modules
Sub-path Imports
Each module is importable via a sub-path. Use only what you need — tree-shaking removes unused modules from your bundle.
| MODULE | IMPORT | USE CASE | STATUS |
|---|---|---|---|
| proof | @taifoon/sdk/proof | V5 proof blobs — blocks, transactions, events | LIVE |
| gas | @taifoon/sdk/gas | Multi-chain gas prices (REST + gRPC) | LIVE |
| signals | @taifoon/sdk/signals | Token launches, arbitrage, market signals (SSE) | LIVE |
| executor | @taifoon/sdk/executor | Cross-chain order tracking and proof bundles | LIVE |
| registry | @taifoon/sdk/registry | API key registration, usage tracking, payments | LIVE |
07.3QUICK START
Quick Start
By Integration Path
PROTOCOLS — Proof Verification
full guide →import { ProofClient } from '@taifoon/sdk/proof';
const client = new ProofClient({
baseUrl: 'https://scanner.taifoon.dev',
apiKey: process.env.TAIFOON_API_KEY // optional for Explorer tier
});
// Fetch V5 proof for Ethereum block 19,876,543
const proof = await client.getBlockProof(1, 19876543);
console.log(`L1 Superroot: ${proof.l1_superroot}`);
console.log(`L3 siblings: ${proof.l3_superroot_proof.length}`);TRADERS — Signal Streaming
full guide →import { SignalClient } from '@taifoon/sdk/signals';
const client = new SignalClient({
baseUrl: 'https://scanner.taifoon.dev'
});
for await (const signal of client.streamArbitrage()) {
console.log(`Arb: ${signal.data.pair} ${signal.data.spreadBps}bps`);
}INFRASTRUCTURE — Gas Oracle
full guide →import { GasOracleClient } from '@taifoon/sdk/gas';
const client = new GasOracleClient({
baseUrl: 'https://scanner.taifoon.dev',
pollingIntervalMs: 5000
});
const prices = await client.getMultiChainGas([1, 42161, 8453]);
for (const p of prices) {
console.log(`Chain ${p.chain_id}: ${p.standard.max_fee_per_gas} wei`);
}07.4ON-CHAIN
On-Chain
Forge Interfaces
Deploy against the Taifoon SDK contract interfaces. All deployed on Arbitrum Sepolia with production addresses ready.
| CONTRACT | ADDRESS (ARB SEPOLIA) | GAS |
|---|---|---|
| FOON Token | 0x7EbD02ab3236DA856B4D0289A2CAd3E5b4BDBEA0 | ERC-20 |
| Staking | 0x26bB2de46AFd5C242Ca2F4200E81bE1df52659Dc | ~65k |
| RewardDistributor | 0x2d70a5Fb7f9190eF8D56304FC4C68535d2b8BC4B | ~80k |
| LWC (Arbitrum) | 0x3F305740E3f7650cA3EaD2597fEB785fa07d621F | ~45k verify |
// Solidity — import from taifoon-sdk
import {IV5ProofVerifier} from "@taifoon/sdk/contracts/src/interfaces/IV5ProofVerifier.sol";
import {ILWC} from "@taifoon/sdk/contracts/src/interfaces/ILWC.sol";
// Verify a block proof (~45k gas)
bool valid = verifier.verifyBlockProof(chainId, blockNumber, proofBlob);
// Verify and fill in one tx (~52k gas)
lwc.instantFillAndClaim(orderId, fillTxHash, proofBlob);07.5RESOURCES