feat(composable): add signer-aware Poller SDK - #966
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📦 GitHub Packages PublishedLast updated: Aug 7, 2026, 02:46:45 PM UTC The following packages have been published to GitHub Packages with pre-release version
InstallationThese packages require authentication to install from GitHub Packages. First, create a # Create .npmrc file in your project root
echo "@cowprotocol:registry=https://npm.pkg.github.com" > .npmrc
echo "//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN" >> .npmrcTo get your GitHub token:
Then install any of the packages above, either by exact version (i.e. # Yarn
yarn add npm:@cowprotocol/cow-sdk@pr-966
# pnpm
pnpm install npm:@cowprotocol/cow-sdk@pr-966
# NPM
npm install npm:@cowprotocol/cow-sdk@pr-966Update to the latest version (only if you used the tag)Every commit will publish a new package. To upgrade to the latest version, run: # Yarn
yarn upgrade @cowprotocol/cow-sdk
# pnpm
pnpm update @cowprotocol/cow-sdk
# NPM
npm update @cowprotocol/cow-sdkView PackagesYou can view the published packages at: https://github.com/cowprotocol/cow-sdk/packages |
Context
The SDK design thread agreed on the same two-layer approach used by
TradingSdk:ComposableCowPolleras the low-level API for state reads, typed data, and calldata encoding;This PR adds that high-level layer separately on top of #960.
What changed
ComposableCowPollerSdkfollows the applicableTradingSdkconventions: an optional constructor adapter, a default signer with per-call overrides, named parameter objects, and transaction methods that return the submitted hash.signRegisterandsignRevokeread the funder's current shared nonce, sign the generated EIP-712 payload, and return the exacttypedData,signature, and ready-to-submitcalldata.register,registerWithSignature,pollFunds,revoke, andrevokeWithSignaturesubmit their corresponding Poller transactions.pollerSdk.pollerretains access to every low-level read and encoding primitive, so integrations can still build hooks or relay calls without submitting a transaction through the SDK.Example
The same split applies to revocation through
signRevokeandrevokeWithSignature. Direct funder transactions remain available throughregisterandrevoke.Scope
This PR deliberately does not construct TWAP orders or order hooks. It provides generic Poller actions over
ComposableCowPollerSchedule; higher-level order composition can build on these primitives.Depends on #960.
Related: TWAP for EOAs
Test
pnpm --filter @cowprotocol/sdk-composable test