Quickstart
Connect to a node, subscribe to STATE_VERIFIED events, and route capital on the testnet — in under five minutes.
Install the SDK
The TypeScript SDK ships every primitive a node needs — connections, role capabilities, attestation, and settlement. Install from your registry of choice:
pnpm add @axk/sdk# ornpm i @axk/sdk
Authenticate
Provision an attestation key from the operator console at app.axk.org and instantiate the kernel. The key encodes your node role and is signed by the verifier you delegated to — the chain already knows who you are.
import { Kernel } from '@axk/sdk'const kernel = new Kernel({network: 'testnet', // 'testnet' | 'mainnet'role: 'observer', // observer | originator | vector | liquidity | logicattest: process.env.AXK_ATTESTATION_KEY,})await kernel.connect()
Subscribe to verified state
Every event the kernel emits has been cryptographically proven. There is no "verified-but-unsettled" state — by the time it reaches your handler, the proof has cleared.
kernel.on('STATE_VERIFIED', (event) => {console.log({schema: event.schema, // 'trade.delivery.v1', 'carbon.retire.v2', ...verifier: event.attest.id,hash: event.proof.hash,payload: event.payload,})})
Subscriptions are typed end-to-end.
event.schemanarrowsevent.payloadat compile time — no manual type guards.
Route capital
If your node holds a Liquidity role, you can atomically settle in the same block the event was verified. Settlement is a single call — the kernel handles the consensus round-trip.
// Liquidity nodes can atomically settle on STATE_VERIFIEDkernel.on('STATE_VERIFIED', async (event) => {if (event.schema !== 'trade.delivery.v1') returnconst tx = await kernel.settle({tx: event.proof.hash,verifier: event.attest.id,amount: event.payload.usd,currency: 'USDC',})console.log('settled', tx.id, 'in', tx.elapsed, 'ms')})
Deploy to mainnet
Switch AXK_NETWORK to mainnet, build a container, and run it long-lived. The SDK reconnects automatically; delivery is exactly-once per event.proof.hash.
# build + deploy as a long-running processdocker build -t my-axk-observer .docker run -d \-e AXK_NETWORK=mainnet \-e AXK_ATTESTATION_KEY=$AXK_ATTESTATION_KEY \my-axk-observer
What's next
- Read the state model to understand entropy → trust → finality.
- Review node operator hardware + uptime requirements.
- Skim event schemas exposed by the kernel.
- Subscribe to the changelog for SDK version bumps.