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

@problee/trading-sdk

v0.2.8

Published

Trading-only SDK for Problee prediction markets. Quotes, simulation, calldata preparation, checkout sessions, status, balances, positions, and builder metrics.

Readme

@problee/trading-sdk

Trading-only SDK for Problee markets and Builder hosted checkout.

The canonical Builder Trading contract is the generated OpenAPI document at https://api.problee.com/api/builder/v1/openapi.json. Treat the TypeScript types in this package as generated OpenAPI 3.1 mirrors with hand-authored ergonomic wrappers. Agent/server trading remains separate at https://api.problee.com/api/agent/v1/openapi.json. Hosted checkout can trade both auto-priced markets and order book markets; it does not create markets.

Registry status: @problee/trading-sdk releases with the lockstep SDK surface. Install the package or integrate directly against the Builder OpenAPI contract.

import { createTradingClient } from "@problee/trading-sdk";

const client = createTradingClient({ apiKey: process.env.PROBLEE_API_KEY! });

const quote = await client.quote({
  chainId: 480,
  marketAddress: "0x...",
  tradeType: "buy",
  side: 0,
  amountWei: "1000000000000000000",
  collateralToken: "PRB",
});

Builder setup and hosted checkout are also exposed without market creation or admin surfaces:

const integration = await client.integrations.create({
  name: "Partner app",
  environment: "production",
  allowedOrigins: ["https://partner.example"],
  allowedChains: [480],
  allowedCollaterals: ["PRB", "WLD", "USDC"],
});

await client.integrations.verifyOrigin(integration.publicIntegrationId, "https://partner.example");

const walletProfile = await client.integrations.createWalletAuthProfile(
  integration.publicIntegrationId,
  {
    name: "Partner Web3Auth",
    provider: "web3auth",
    web3AuthClientId: "YOUR_WEB3AUTH_CLIENT_ID",
    web3AuthNetwork: "sapphire_mainnet",
    allowedCheckoutOrigins: ["https://problee.com"],
    loginMode: "custom_jwt",
    allowedAuthConnectionIds: ["partner-jwt"],
    jwt: {
      issuer: "https://issuer.partner.example",
      audience: "web3auth-audience",
      jwksUrl: "https://issuer.partner.example/.well-known/jwks.json",
      subjectClaim: "sub",
      verifierIdField: "sub",
    },
  },
);

const session = await client.builder.createCheckoutSession({
  publicIntegrationId: integration.publicIntegrationId,
  chainId: 480,
  marketAddress: "0x...",
  tradeType: "buy",
  side: 0,
  amountWei: "1000000000000000000",
  collateralToken: "PRB",
  expectedWalletAddress: "0xuser...",
  walletProviderHint: "web3auth",
  walletAuthProfileId: walletProfile.walletAuthProfileId,
});

Read metrics from the Builder contract:

const metrics = await client.builder.metrics({
  from: "2026-05-01T00:00:00.000Z",
});

console.log(metrics.checkout.sessionsCreated);

This package does not create markets, resolve markets, or expose consumer-only endpoints. API keys are server-only. Browser trading should use @problee/widget or /v3/embed.js, which launch hosted checkout with public integration IDs and short-lived trade tokens. For Web3Auth/Gmail users, same-wallet checkout requires the partner's Web3Auth client/config/network/ connection profile; Problee blocks execution when the connected wallet does not match expectedWalletAddress. Wallet signing remains user-controlled unless an agent uses its own wallet.