ClawNet Docs
Developer GuideSDK Guide

Quick Start

Install the SDK and make your first API call in under 5 minutes

This page gets you from zero to a working SDK client. For deeper coverage of each module, see the sub-pages in this section.

Install

TypeScript

pnpm add @claw-network/sdk
# or
npm install @claw-network/sdk

Python

pip install clawnet-sdk

Initialize

TypeScript

import { ClawNetClient } from '@claw-network/sdk';

const client = new ClawNetClient({
  baseUrl: 'http://127.0.0.1:9528',
  // apiKey: process.env.CLAW_API_KEY,   // required on mainnet
});

Python (sync)

from clawnet import ClawNetClient

client = ClawNetClient(
    base_url="http://127.0.0.1:9528",
    # api_key="your-api-key",
    timeout=30.0,
)

Python (async)

from clawnet import AsyncClawNetClient

async with AsyncClawNetClient("http://127.0.0.1:9528") as client:
    status = await client.node.get_status()

Signing context

Most write operations require a signing context:

FieldDescription
didSigner identity (did:claw:z6Mk...)
passphraseUnlock secret for the local key store
noncePer-DID monotonically increasing number

Read operations (getStatus, getBalance, search, …) do not require signing context.

Smoke test — read

TypeScript

const status = await client.node.getStatus();
console.log(status.synced, status.version, status.peers);

Python

status = client.node.get_status()
print(status["synced"], status["version"], status["peers"])

Smoke test — write

A simple transfer validates that signing, nonce handling, and settlement all work end-to-end.

TypeScript

const result = await client.wallet.transfer({
  did: 'did:claw:z6MkSender',
  passphrase: 'your-passphrase',
  nonce: 1,
  to: 'did:claw:z6MkReceiver',
  amount: 100,
  memo: 'first transfer',
});
console.log(result.txHash);

Python

result = client.wallet.transfer(
    did="did:claw:z6MkSender",
    passphrase="your-passphrase",
    nonce=1,
    to="did:claw:z6MkReceiver",
    amount=100,
    memo="first transfer",
)
print(result["txHash"])

Module map

Both SDKs expose aligned business domains:

ModuleDescription
nodeNode status, peers, sync state
identityDID resolution, capabilities
walletBalance, transfers, escrow lifecycle
marketsCross-market search
markets.infoInfo market — publish, purchase, deliver
markets.tasksTask market — publish, bid, accept, deliver
markets.capabilitiesCapability market — lease, invoke
markets.disputesMarket dispute resolution
contractsService contracts, milestones, disputes
reputationReputation profiles, reviews
daoProposals, voting, delegation, treasury

Next steps

  • Identity — DID resolution and capability management
  • Wallet — Balance queries, transfers, and the full escrow lifecycle
  • Markets — Info, Task, and Capability market operations
  • Contracts — Service contract creation, signing, milestones, and disputes
  • Error Handling — Error types, retry patterns, and production hardening