Gist Plus // Protocol v0.1Solana · TypeScript · Apache-2.0

Commerceformachines

Gist Plus is a programmable payment protocol for autonomous AI. Prepaid sessions, signed receipts, and instant settlement on Solana — no API keys, no humans in the loop.

Agents that can
>
$ npm i @gistplus/client
3.5×
Cheaper
6×
Faster
50×
Fewer txs
100%
Autonomous
01
Intent
Agent states its needs
02
Offer
Provider signs a quote
03
Session
Prepaid channel opens
04
Receipt
Cryptographic proof
02 / 06 — Benchmark

100 calls.
two ways.

Legacy rails settle every request on-chain. Gist Plus settles a session once. Press start and watch the gap open up.

Legacy

Per request
Requests0/100
Blockchain txs0
Total fees$0.00
StatusIdle
Gist Plus

Sessions

Requests0/100
Blockchain txs0
Total fees$0.0000
StatusIdle
Modular by design

Five packages. One protocol.

Install only what you need. Every package is fully typed and ships with first-class TypeScript support.

@gistplus/core

Protocol foundation — types, signing, serialization

Popular
@gistplus/client

For AI agents — negotiate, transact, verify

Popular
@gistplus/server

For providers — monetize any endpoint

@gistplus/gateway

Independent receipt & SLA verification

@gistplus/indexer

Reputation scoring & market analytics

Install all
npm i @gistplus/core @gistplus/client @gistplus/server @gistplus/gateway @gistplus/indexer
Code examples

From intent to receipt in a few lines

import { GistClient } from '@gistplus/client';

const intent = client.createIntent({
  capability: 'gpt-4-inference',
  maxPricePerRequest: 0.01,
  token: 'USDC',
  sla: { maxLatencyMs: 2000 }
});
const offer = await client.negotiate(
  'https://api.provider.com',
  intent
);

// Returns:
// {
//   pricePerRequest: 0.008,  // 20% discount!
//   sla: { maxLatencyMs: 1500 },
//   signature: "..."  // Ed25519 signed
// }
const session = await client.createSession(offer, {
  depositAmount: 1.0  // 1 USDC
});

console.log(session.remainingBalance);  // 1.0 USDC
console.log(session.pricePerRequest);   // 0.008
// Can make 125 requests on one deposit!
const result = await client.executeRequest(
  session.sessionId,
  { prompt: 'Explain quantum computing' }
);

console.log(result.data);     // AI response
console.log(result.receipt);  // Cryptographic proof
import { verifyReceipt } from '@gistplus/core';

const receipt = result.receipt;
verifyReceipt(receipt); // Throws if invalid

if (receipt.slaVerification.met) {
  console.log('SLA met');
} else {
  console.log('Breached — refund:',
    receipt.slaVerification.refundAmount);
}
import { gistMiddleware } from '@gistplus/server';

app.use('/api/*', gistMiddleware({
  connection,
  wallet,
  endpoint: 'https://your-api.com',
  pricing: { basePrice: 0.01, token: 'USDC' },
  sla: { maxLatencyMs: 2000 }
}));

// Every /api/* route is now monetized.
app.post('/api/inference', async (req, res) => {
  const result = await runInference(req.body);

  // Middleware auto-signs the receipt
  return res.gistReceipt?.(result);

  // Receipt includes:
  // - Ed25519 signature
  // - SHA-256 input/output hashes
  // - SLA verification
});
import { LoadBasedPricingStrategy } from '@gistplus/server';

const pricing = new LoadBasedPricingStrategy(
  0.01,   // base price
  'USDC',
  () => getCurrentLoad()  // returns 0-1
);

// 0% load  -> $0.01
// 50% load -> $0.015
// 100% load -> $0.02
// Anchor a receipt to Solana
pub fn anchor_receipt(
    ctx: Context<AnchorReceipt>,
    receipt_id: String,
    session_id: String,
    input_hash: String,
    output_hash: String,
    sla_met: bool,
) -> Result<()> {
    let receipt = &mut ctx.accounts.receipt;
    receipt.receipt_id = receipt_id;
    receipt.session_id = session_id;
    receipt.sla_met = sla_met;
    Ok(())
}
// Get offers from multiple providers
const offers = await Promise.all(
  providers.map(p => client.negotiate(p, intent))
);

// Pick the cheapest
const best = offers.sort(
  (a, b) => a.pricePerRequest - b.pricePerRequest
)[0];

// Agent auto-routes to the best deal.

Click any example to expand, copy, and drop into your project.

Interactive playground

Run every package in your browser

Test each package interactively and watch the protocol work in real time.

Test parameters

Tests the Intent → Offer negotiation flow. Requires a running provider.

Console output
$ Ready. Select a package and click Run test →
Result
Results will appear here →
Documentation

Everything you need to ship

Complete guides with interactive examples and end-to-end walkthroughs.

𝕏