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

prmission-sdk-marcos

v0.1.0

Published

Prmission Protocol SDK — consent-gated data exchange & creator economy for AI agents

Downloads

109

Readme

Prmission TypeScript SDK

TypeScript/JavaScript SDK for Prmission Protocol on Base.

Install

npm install @prmission/sdk ethers

Quickstart

import { ethers } from "ethers";
import { PrmissionClient } from "@prmission/sdk";

const provider = new ethers.JsonRpcProvider("https://mainnet.base.org");
const signer = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);

const client = new PrmissionClient({ signer });

const { permissionId } = await client.grantPermission({
  agent: "0xAgentAddress",
  dataType: "creator_content",
  compensationPercent: 20,
  durationSeconds: 30 * 24 * 60 * 60,
  upfrontFee: 5,
});

const { escrowId } = await client.depositEscrow({
  permissionId: permissionId!,
  amount: 100,
});

await client.reportOutcome(escrowId!, 80);
const settlement = await client.settle(escrowId!);

Exports

  • PrmissionClient (permission/escrow/settlement flow)
  • PrmissionRegistry (creator registry)
  • PrmissionCampaigns (campaign extension)
  • NETWORKS, PROTOCOL, PRMISSION_V2_ABI, ERC20_ABI
  • PrmissionError (typed error with stable code)

Builder Examples

  • Backend agent service: [/Users/marcosbenaim/Documents/New project/repo/sdk/examples/backend-agent-service.js](/Users/marcosbenaim/Documents/New project/repo/sdk/examples/backend-agent-service.js)
  • Frontend creator app starter: [/Users/marcosbenaim/Documents/New project/repo/sdk/examples/frontend-creator-app.js](/Users/marcosbenaim/Documents/New project/repo/sdk/examples/frontend-creator-app.js)

Build

npm install
npm run build

Verify (Step 1 + Step 2)

npm run check

This runs:

  • TypeScript compile
  • SDK tests

Integration Test (Step 2, onchain flow)

This test runs the full flow: grantPermission -> depositEscrow -> reportOutcome -> settle

Enable only when you have test wallets + RPC:

PRMISSION_INTEGRATION=1 \
PRMISSION_RPC_URL=http://127.0.0.1:8545 \
PRMISSION_USER_PRIVATE_KEY=0x... \
PRMISSION_AGENT_PRIVATE_KEY=0x... \
npm run test:integration

Notes:

  • Recommended on a local Base fork/anvil endpoint.
  • Provider must support evm_increaseTime for dispute-window settlement.
  • You can override contract address with PRMISSION_CONTRACT_ADDRESS.

Publish Dry Run (Step 3)

npm run release:check

This verifies build + tests, creates a tarball, and runs npm publish --dry-run.

CI (Step 3)

GitHub Actions workflow: [/Users/marcosbenaim/Documents/New project/repo/.github/workflows/sdk-ci.yml](/Users/marcosbenaim/Documents/New project/repo/.github/workflows/sdk-ci.yml)

  • sdk-check: always runs build + unit tests on SDK changes.
  • sdk-integration: runs only when integration secrets are configured:
    • PRMISSION_RPC_URL
    • PRMISSION_USER_PRIVATE_KEY
    • PRMISSION_AGENT_PRIVATE_KEY
    • optional PRMISSION_CONTRACT_ADDRESS

API Stability + Versioning

  • Public SDK exports are locked by test: test/export-surface.test.js.
  • Semver + release process docs:
    • [/Users/marcosbenaim/Documents/New project/repo/sdk/CHANGELOG.md](/Users/marcosbenaim/Documents/New project/repo/sdk/CHANGELOG.md)
    • [/Users/marcosbenaim/Documents/New project/repo/sdk/RELEASING.md](/Users/marcosbenaim/Documents/New project/repo/sdk/RELEASING.md)

Links

  • Website: https://prmission.com
  • Repo: https://github.com/marcosbenaim-hub/Prmission-Protocol