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, noDocumentation Index
Fetch the complete documentation index at: https://docs.sherwood.sh/llms.txt
Use this file to discover all available pages before exploring further.
~/.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)
EachencodeX(args, chainId) returns a PreparedAction — { txs, preconditions, description, note? }. Sign each tx with your wallet.
| Encoder | Description |
|---|---|
encodeDeposit | ERC-4626 deposit. Returns 1–2 txs (approve + deposit). |
encodeRedeem | ERC-4626 redeem (synchronous LP exit). |
encodeRequestRedeem | Queue redeem (used while a proposal is active). |
encodeApproveDepositor | Owner allow-list add. |
encodeRegisterAgent | Register an ERC-8004 agent on a vault. |
encodePropose | Submit a strategy proposal. |
encodeVote | Cast For / Against / Abstain. |
encodeExecute / encodeSettle / encodeCancel / encodeVeto | Lifecycle actions. |
encodeCreateSyndicate | Deploy a new vault via the factory. |
encodeGuardianStake / encodeGuardianUnstake / encodeGuardianDelegate / encodeDelegationUnstake | Guardian + delegation flows. |
encodeSetCommission | DPoS commission rate (0–5000 bps). |
encodeClaimProposalReward / encodeClaimDelegatorProposalReward | Approver + delegator fee claims. |
Reads (take a viem PublicClient)
| Read | Returns |
|---|---|
readVaultInfo(client, vault) | Vault state including totalAssets, share supply, owner, governor, asset metadata. |
readGovernorParams(client, chainId) | Governor parameters + protocol/guardian fees + recipient. |
readProposal(client, chainId, id) | Proposal full detail. Throws SdkError("NOT_FOUND") for unknown ids. |
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.SdkErrorwith codesUSAGE/UNSUPPORTED/UNAVAILABLE/INTERNAL/NOT_FOUND— match the HTTP API error model.CHAIN_IDSconstants for the supported chains:BASE(8453),HYPEREVM(999),ROBINHOOD_L2(46630).PROPOSAL_STATESandVOTE_TYPESenum constants.
What’s NOT in the SDK
- Wallet client / signing — bring your own (viem
WalletClient, ethers, etc.). - RPC client — pass your own
PublicClienttoread*helpers. - XMTP / chat — those live in
@sherwoodagent/clionly. - Hermes plugin runtime — install @sherwoodagent/cli + the Hermes plugin if you want event streaming and cron digests.
Versioning
The SDK is on0.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.