Skip to content

SDKs

Willow has official, open-source SDKs in six languages, plus a LangChain integration. Every one verifies cryptographic proofs for you, so the data your code receives is already Willow verified.

LanguagePackageRepository
TypeScript / JavaScript@willow-network/sdkwillow-sdk-typescript
Pythonwillow-sdkwillow-sdk-python
Rustwillow-sdkwillow-sdk-rust
Gogithub.com/willow-network/willow-gowillow-sdk-go
SwiftWillowwillow-sdk-swift
React Hooks@willow-network/react-hookswillow-sdk-react-hooks
LangChainwillow-langchainwillow-sdk-langchain
Terminal window
# TypeScript / JavaScript
npm install @willow-network/sdk
# Python
pip install willow-sdk
# Go
go get github.com/willow-network/willow-go
# Rust — Cargo.toml
[dependencies]
willow-sdk = "0.1"
import { WillowClient, generateWallet, createDidFromWallet } from '@willow-network/sdk';
const wallet = generateWallet();
const did = createDidFromWallet(wallet);
const client = new WillowClient({
apiUrl: 'https://api.willow.tech',
did: did.id,
privateKey: wallet.privateKey,
});
await client.init();
// Store and read back — the read is proof-verified locally.
await client.store('my-subgrove', 'users', 'user-1', { name: 'Alice' });
const data = await client.get('my-subgrove', 'users', 'user-1');
from willow import WillowClient, generate_did
async with WillowClient("https://api.willow.tech") as client:
did_info = generate_did()
await client.register_did(did_info["did_document"])
await client.authenticate(
did_info["did"], did_info["private_key"], did_info["public_key_id"]
)
await client.data.store("my-subgrove", "users", "user-1", {"name": "Alice"})
result = await client.data.get("my-subgrove", "users", "user-1")
use willow_sdk::{WillowClient, auth::generate_did, types::SignatureAlgorithm};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = WillowClient::new("https://api.willow.tech").await?;
let did = generate_did(SignatureAlgorithm::Ed25519)?;
client.register_did(&did.did_document).await?;
client
.authenticate(&did.did, &did.private_key_hex(), &did.public_key_id)
.await?;
Ok(())
}
  • Reads are checked against Merkle proofs over Willow’s committed state.
  • If a proof fails, the SDK errors instead of returning the data.
  • The TypeScript SDK verifies in pure TypeScript — no WASM — so it runs in the browser and in Node. Other SDKs verify natively.

For how the proofs work, see Verification.