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

eep-sdk

v0.1.0

Published

Official TypeScript SDK for the Ethereum Escrow Protocol — ethers.js v6 wrapper with full type coverage

Downloads

20

Readme

eep-sdk

Official TypeScript SDK for the Ethereum Escrow Protocol.

Thin ethers.js v6 wrapper around the EEPEscrow contract — full type coverage, zero config.

Install

npm install eep-sdk ethers

Quick start

import { ethers } from "ethers";
import { EEPClient, ethAsset, singleMilestone } from "eep-sdk";

const provider = new ethers.BrowserProvider(window.ethereum);
const signer   = await provider.getSigner();
const eep      = new EEPClient(signer, "0xYOUR_CONTRACT_ADDRESS");

// 1. Create
const id = await eep.createEscrow({
  recipient: "0xRecipient",
  asset: ethAsset(ethers.parseEther("1.0")),
  milestones: singleMilestone("On delivery"),
});

// 2. Fund
await eep.deposit(id, ethers.parseEther("1.0"));

// 3. Release
await eep.release(id);

API

new EEPClient(signerOrProvider, contractAddress)

| Parameter | Type | Description | |--------------------|------------------------|--------------------------------------| | signerOrProvider | Signer \| Provider | ethers Signer (writes) or Provider (reads) | | contractAddress | string | Deployed EEPEscrow address |

Read methods

| Method | Returns | Description | |---|---|---| | getEscrow(id) | EscrowData | Full escrow struct | | getMilestones(id) | Milestone[] | All milestones | | getState(id) | number | 0–5 state index | | totalEscrows() | bigint | Count of all escrows |

Write methods

| Method | Description | |---|---| | createEscrow(params) | Create escrow → returns bigint escrow ID | | deposit(id, ethAmount?) | Fund the escrow | | release(id) | Release all funds to recipient | | releaseMilestone(id, index) | Release one milestone | | dispute(id, reason) | Raise a dispute | | refund(id) | Refund to depositor | | executeDisputeOutcome(id) | Execute resolved dispute |

Event subscriptions

All return an unsubscribe function.

const unsub = eep.onEscrowCreated((id, depositor, recipient) => { ... });
const unsub = eep.onMilestoneReleased(id, (index, amount, recipient) => { ... });
const unsub = eep.onEscrowCompleted(id, (recipient, fee) => { ... });
const unsub = eep.onEscrowDisputed(id, (raisedBy) => { ... });

Asset helpers

import { ethAsset, erc20Asset, nftAsset } from "eep-sdk";

ethAsset(ethers.parseEther("1.0"))
erc20Asset("0xTokenAddress", 1000n * 10n ** 6n)  // 1 000 USDC
nftAsset("0xNFTAddress", 42n)

Milestone helpers

import { singleMilestone, milestonesFromPcts } from "eep-sdk";

singleMilestone("Full payment")

milestonesFromPcts([
  { pct: 30, description: "Upfront" },
  { pct: 70, description: "On delivery" },
])

Condition encoders

import { encodeTimeLock, encodeMultiSig, encodeOracleCondition, encodeNFTGated, daysFromNow } from "eep-sdk";

encodeTimeLock(daysFromNow(30))
encodeMultiSig(["0xAlice", "0xBob", "0xCarol"], 2)
encodeOracleCondition("0xPriceFeed", 200000000000n, true)  // price > $2 000
encodeNFTGated("0xNFT", 1n, false)

Utility functions

import { escrowStateName, daysFromNow, netAfterFee, allMilestonesReleased } from "eep-sdk";

escrowStateName(1)              // "ACTIVE"
daysFromNow(30)                 // bigint unix timestamp 30 days out
netAfterFee(ethers.parseEther("1.0"))  // after 0.25% fee
allMilestonesReleased(escrow)   // boolean

Escrow states

| Value | Label | |---|---| | 0 | PENDING | | 1 | ACTIVE | | 2 | DISPUTED | | 3 | COMPLETED | | 4 | REFUNDED | | 5 | EXPIRED |

License

MIT