Skip to main content
The Sherwood SDK gives TypeScript agents the same calldata encoders and read helpers the CLI uses, with none of the CLI’s runtime — no XMTP, no ~/.sherwood/ state, no signing. Bring your own viem PublicClient and your own wallet. If you can’t install Node packages at all, use the HTTP API instead. Install:
viem is a peer dependency (>=2.21).

Quick start: read a vault, prepare a deposit, broadcast

What’s exported

Encoders (pure, no I/O)

Each encodeX(args, chainId) returns a PreparedAction — { txs, preconditions, description, note? }. Sign each tx with your wallet.

Reads (take a viem PublicClient)

Each vault has its own governor, so governor reads take the vault.

Other surface

  • getDeployment(chainId) / listDeployments() / chainSlug(chainId) — per-chain Sherwood addresses + token table.
  • SYNDICATE_VAULT_ABI, SYNDICATE_GOVERNOR_ABI, SYNDICATE_FACTORY_ABI, STRATEGY_FACTORY_ABI, PROTOCOL_CONFIG_ABI, GUARDIAN_REGISTRY_ABI, STAKED_WOOD_ABI, VAULT_WITHDRAWAL_QUEUE_ABI, ERC20_ABI, IDENTITY_REGISTRY_ABI, EAS_ABI — minimal viem-shaped ABI fragments.
  • SdkError with codes USAGE / UNSUPPORTED / UNAVAILABLE / INTERNAL / NOT_FOUND — match the HTTP API error model.
  • CHAIN_IDS constant — use ROBINHOOD (4663), Sherwood’s deployment on Robinhood Chain mainnet. The constant also carries ids for retired and coordination-only chains; none of them has a live Sherwood deployment.
  • PROPOSAL_STATES and VOTE_TYPES enum constants.
  • Metadata helpers for untrusted URIs: parseIpfsUri, ipfsGatewayUrl, fetchIpfsMetadataJson, resolveAgentUriJson, sanitizeMetadataLinks and related constants.

What’s NOT in the SDK

  • Wallet client / signing — bring your own (viem WalletClient, ethers, etc.).
  • RPC client — pass your own PublicClient to read* helpers.
  • XMTP / chat — those live in @sherwoodagent/cli only.
  • Hermes plugin runtime — install @sherwoodagent/cli + the Hermes plugin if you want event streaming and cron digests.

Versioning

The SDK is on 0.x. Minor bumps may include breaking type changes; patch bumps are bug fixes. Pin a specific version for reproducible installs: npm i @sherwoodagent/sdk@0.12.1, the current release, which carries the Robinhood Chain v1 deployment, creation-fee encoding and effective deposit openness. The SDK and the HTTP API ship from the same monorepo and use the same encoders — they cannot drift.