Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.

docs(readme): clarify signer compatibility (ethers v5 vs v6, viem)#349

Open
skyc1e wants to merge 1 commit into
Polymarket:mainfrom
skyc1e:docs/signer-compatibility-note
Open

docs(readme): clarify signer compatibility (ethers v5 vs v6, viem)#349
skyc1e wants to merge 1 commit into
Polymarket:mainfrom
skyc1e:docs/signer-compatibility-note

Conversation

@skyc1e
Copy link
Copy Markdown

@skyc1e skyc1e commented Apr 16, 2026

Closes #256.

What changed

Adds a short Signer compatibility section to README.md that states explicitly which signers ClobClient accepts.

Why

The original example imports @ethersproject/wallet (ethers v5) without telling the reader that the library does not require ethers at all, and without flagging the ethers v6 mismatch.

src/signer.ts currently accepts:

interface EthersSigner {
    _signTypedData(domain, types, value): Promise<string>;
    getAddress(): Promise<string>;
}
export type ClobSigner = EthersSigner | WalletClient;

ethers v6 renamed _signTypedDatasignTypedData, so an ethers v6 Wallet fails the isEthersTypedDataSigner check and, if it falls through to the viem path via isWalletClientSigner, its call signature does not match what signTypedDataWithSigner invokes. That is what issue #256 is describing.

The new section:

  • Points new users to viem as the recommended path.
  • Documents that ethers v5 (ethers@^5 or @ethersproject/wallet) works.
  • States ethers v6 is not directly supported and explains why, with the recommended workaround.
  • Notes that ethers is not a runtime dependency of this package.

Scope


Note

Low Risk
Documentation-only change with no runtime or behavioral impact.

Overview
Adds a new Signer compatibility section to README.md that explicitly documents supported signer types for ClobClient (recommended viem WalletClient, ethers v5-compatible signers) and calls out that ethers v6 is not directly supported due to the _signTypedData rename.

Also clarifies that ethers is not a runtime dependency and only needs to be installed when using an ethers-based signer.

Reviewed by Cursor Bugbot for commit b8bd4be. Bugbot is set up for automated code reviews on this repo. Configure here.

@skyc1e skyc1e requested a review from a team as a code owner April 16, 2026 15:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ethers v5 compatibility note to docs

1 participant