npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ophis/sdk

v0.2.2

Published

Integration helpers for Ophis (a CoW Protocol fork): correct orderbook hosts, the CIP-75 partner-fee appData fragment, the per-chain EIP-712 signing domain, and order receiver-safety guards.

Downloads

1,059

Readme

@ophis/sdk

Integration helpers for Ophis — a CoW Protocol fork with a natural-language intent layer.

Non-custodial. These helpers build and guard order parameters. They never hold keys or sign on your behalf. See Security before wiring up an automated signer.

Install

npm install @ophis/sdk

What's in it

  • getOphisOrderbookUrl(chainId) — the correct orderbook host per chain. Optimism is self-hosted at optimism-mainnet.ophis.fi, not api.cow.fi; getting this wrong silently bypasses the Ophis solver and partner fee.
  • getOphisOrderDomain(chainId) / getOphisSettlementAddress(chainId) — the EIP-712 signing domain with the correct per-chain verifyingContract (the OP settlement is non-canonical, so the cow-sdk default is wrong there).
  • buildOphisAppDataPartnerFee(chainId) — the exact CIP-75 volume-fee fragment ({ volumeBps, recipient }) for appData.metadata.partnerFee.
  • ophisOrderReceiver / assertReceiverIsOwner — pin a CoW order's receiver to the owner. An unpinned receiver is the #1 drain vector for an automated signer.
  • buildOphisOrderMetadata / enrollOphisTrader / buildOphisOrderCreation — the high-level order-flow helpers that collapse the integration footguns into one call each: appCode is always 'ophis' (a custom one silently forfeits the rebate), each trader wallet is enrolled with the rebate indexer, the receiver is asserted, and the sendOrder wire shape (full appData string + appDataHash) is correct.
  • getOphisVaultRelayer(chainId) — the correct approve spender for the one-time sell-token approval. On Optimism the Ophis relayer is not cow-sdk's canonical one, so resolve it here.
  • buildOphisEthFlowOrder / getOphisEthFlowAddress / isOphisEthFlowChain — sell native ETH through Ophis via the on-chain eth-flow createOrder, with the Ophis partner-fee appData embedded. Without this an integrator has to wrap to WETH first and Ophis is unavailable on native-ETH sells. The builder pins the receiver to the taker, hardcodes the eth-flow feeAmount/msg.value correctly, and (optionally) verifies the committed appData hash binds to the JSON you upload.
  • assignTier, ophisDefaults, and the partner-fee constants.

Example

import {
  getOphisOrderbookUrl,
  getOphisOrderDomain,
  buildOphisAppDataPartnerFee,
  assertReceiverIsOwner,
} from '@ophis/sdk';

const orderbook = getOphisOrderbookUrl(10);          // https://optimism-mainnet.ophis.fi
const domain = getOphisOrderDomain(10);               // { name, version, chainId, verifyingContract }
const partnerFee = buildOphisAppDataPartnerFee(10);   // { volumeBps, recipient }

assertReceiverIsOwner(owner, order.receiver);         // throws if proceeds would leave the account

Security

These are off-chain misuse guards, not an authorization boundary — they make the safe path the easy path, but a caller can ignore them. For an agent that signs without a human in the loop, enforce policy on-chain (a Safe + an EIP-1271 policy validator: pinned receiver, pinned appData/hooks, an oracle-bounded limit price, spend caps, and a guardian). See the AI agent integration guide.

License

GPL-3.0-or-later