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

@gistplus/core

v0.1.0

Published

Core protocol schemas, types, and signature verification for Gist Plus

Downloads

187

Readme

@gistplus/core

Twitter Follow

Core protocol schemas, types, and cryptography for the Gist Plus programmable commerce protocol.

Installation

npm install @gistplus/core

What is Gist Plus?

Gist Plus is a protocol for programmable commerce between AI agents and services, built on Solana. It enables autonomous negotiation, payment, and verification with cryptographic guarantees.

What's in This Package?

This is the core foundation that all other Gist Plus packages depend on. It provides:

  • Type Definitions - Complete TypeScript types for Intent, Offer, Session, Receipt
  • Cryptography - Ed25519 signature generation and verification
  • Serialization - Canonical JSON and SHA-256 hashing
  • Validation - Input validation for all protocol objects
  • Constants - Protocol constants, HTTP status codes, token definitions

Usage

Creating an Intent

import { createIntent, Intent } from '@gistplus/core';

const intent: Intent = createIntent({
  capability: 'gpt-4-inference',
  maxPricePerRequest: 0.01,
  token: 'USDC',
  agentPubkey: myKeypair.publicKey,
  sla: {
    maxLatencyMs: 2000,
    minUptimePercent: 99.0
  }
});

Creating and Verifying an Offer

import { createOffer, verifyOffer } from '@gistplus/core';

// Provider creates offer
const offer = createOffer({
  intent,
  providerPubkey: providerKeypair.publicKey,
  pricePerRequest: 0.008,
  sla: { maxLatencyMs: 1500 },
  sessionDurationMs: 600000,
  endpoint: 'https://api.provider.com'
}, providerKeypair);

// Agent verifies offer
verifyOffer(offer); // Throws if invalid or expired

Creating a Receipt

import { createReceipt } from '@gistplus/core';

const receipt = createReceipt({
  session,
  requestNumber: 1,
  inputData: { prompt: 'Hello' },
  outputData: { response: 'Hi there!' },
  requestStartedAt: startTime,
  requestCompletedAt: Date.now(),
  amountCharged: session.pricePerRequest
}, providerKeypair);

Verifying Signatures

import { verifySignature } from '@gistplus/core';

// Verify offer signature
const message = createSignableMessage(offer);
verifySignature(message, offer.signature, offer.providerPubkey);

// Verify receipt signature
const receiptMessage = createSignableMessage(receipt);
verifySignature(receiptMessage, receipt.signature, receipt.providerPubkey);

Types

Intent

Agent's expression of demand with price constraints and SLA requirements.

Offer

Provider's signed quote in response to an Intent.

Session

Prepaid channel for multiple requests with balance tracking.

Receipt

Cryptographic proof of completed work with SLA verification.

Constants

import { 
  HTTP_STATUS,
  SUPPORTED_TOKENS,
  TOKEN_MINTS 
} from '@gistplus/core';

console.log(HTTP_STATUS.PAYMENT_REQUIRED); // 402
console.log(SUPPORTED_TOKENS); // ['SOL', 'USDC', 'USDT', 'BONK']

API Reference

See the full documentation for complete API reference.

Related Packages

License

Apache 2.0

Links