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)

Other surface

  • getDeployment(chainId) / listDeployments() — per-chain Sherwood addresses + token table.
  • SYNDICATE_VAULT_ABI, SYNDICATE_GOVERNOR_ABI, SYNDICATE_FACTORY_ABI, GUARDIAN_REGISTRY_ABI, ERC20_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_L2 (46630), Sherwood’s current deployment target. Additional chain ids will be added as Sherwood expands.
  • PROPOSAL_STATES and VOTE_TYPES enum 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 until the protocol mainnet GA. Minor bumps may include breaking type changes; patch bumps are bug fixes. Pin a specific version (npm i @sherwoodagent/sdk@0.1.x) if you want reproducible installs. The SDK and the HTTP API ship from the same monorepo and use the same encoders — they cannot drift.