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

@nibblelayer/apex-contracts

v0.1.1

Published

Public Apex contracts, schemas, and transport-facing types.

Readme

@nibblelayer/apex-contracts

Shared Zod schemas and TypeScript types for the Apex x402 payment protocol.

Purpose

This is the source of truth for all public API contracts in the Apex ecosystem. Every request shape, response type, manifest structure, and event payload used by the API, SDK, and dashboard is defined, validated, and exported from this package.

Install

pnpm add @nibblelayer/apex-contracts

Exports

| Entry Point | Description | |---|---| | @nibblelayer/apex-contracts | TypeScript type definitions | | @nibblelayer/apex-contracts/schemas | Zod validation schemas |

Types

Exported from @nibblelayer/apex-contracts.

| Type | Description | |---|---| | Organization | Organization entity (id, name, slug, createdAt) | | Service | Service entity scoped to an organization (id, organizationId, name, slug, createdAt) | | Environment | Environment configuration (id, serviceId, mode, network, facilitatorUrl, walletId, eventsEndpoint, idempotencyEnabled, refreshIntervalMs, createdAt) | | EnvironmentMode | 'test' \| 'prod' — environment mode literal | | WalletDestination | Wallet address for receiving payments (id, organizationId, label, address, token, network, active, createdAt) | | Route | API route definition (id, serviceId, method, path, description, enabled) | | HttpMethod | HTTP method literal ('GET', 'POST', 'PUT', 'DELETE', 'PATCH', etc.) | | PriceRule | Pricing rule linking a route to an environment (id, routeId, environmentId, scheme, amount, token, network, active, createdAt) | | PaymentScheme | Payment scheme literal ('exact', etc.) | | DiscoveryMetadata | Route discoverability metadata (id, routeId, environmentId, discoverable, category, tags, inputSchema, outputSchema, published, createdAt) | | Settlement | Settlement record (id, serviceId, routeId, type, status, amount, token, network, txHash, createdAt, settledAt) | | SettlementStatus | Settlement status literal | | PaymentEvent | Payment lifecycle event envelope | | PaymentEventType | Event type literal ('required', 'verified', 'settled', 'failed', 'replay') | | PaymentEventPayload | Payload structure for payment events | | ApexManifest | Complete x402 manifest structure | | ManifestRoute | Route entry within a manifest | | ManifestRouteAccepts | Accepted payment configuration for a manifest route | | ManifestRouteExtensions | Extensions applied to a manifest route | | ManifestWallet | Wallet configuration within a manifest |

Schemas

Exported from @nibblelayer/apex-contracts/schemas.

| Schema | Description | |---|---| | caip2Network | CAIP-2 network identifier validator | | organizationSchema | Full Organization validator | | createOrganizationSchema | Organization creation payload validator | | serviceSchema | Full Service validator | | createServiceSchema | Service creation payload validator | | environmentSchema | Full Environment validator | | createEnvironmentSchema | Environment creation payload validator | | walletSchema | Full WalletDestination validator | | createWalletSchema | Wallet creation payload validator | | routeSchema | Full Route validator | | createRouteSchema | Route creation payload validator | | priceRuleSchema | Full PriceRule validator | | createPriceRuleSchema | Price rule creation payload validator | | discoverySchema | Full DiscoveryMetadata validator | | createDiscoverySchema | Discovery creation payload validator | | createWebhookSchema | Webhook creation payload validator | | settlementSchema | Full Settlement validator | | paymentEventSchema | Full PaymentEvent validator | | paymentEventPayloadSchema | Payment event payload validator | | paymentEventTypeSchema | Payment event type enum validator | | apexManifestSchema | Complete x402 manifest validation schema |

Usage

// Types
import type {
  Organization,
  Service,
  Environment,
  Route,
  ApexManifest,
} from '@nibblelayer/apex-contracts';

// Schemas
import {
  apexManifestSchema,
  createServiceSchema,
  priceRuleSchema,
} from '@nibblelayer/apex-contracts/schemas';

// Validate at runtime
const result = apexManifestSchema.safeParse(payload);
if (!result.success) {
  console.error(result.error.issues);
}

// Parse and type-narrow
const parsed = createServiceSchema.parse(input);
// parsed is now typed as the creation payload

License

Apache-2.0