JSPM

@devvmichael/paystream-client

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q64415F
  • License MIT

PayStream x402 client — automatic micropayments and AgentWallet for AI on Stacks

Package Exports

  • @devvmichael/paystream-client

Readme

@devvmichael/paystream-client

PayStream x402 client — automatic micropayments and AgentWallet for AI on Stacks.

Installation

npm install @devvmichael/paystream-client

Quick Start

Pay automatically (client / AI agent)

import { AgentWallet } from '@devvmichael/paystream-client';

const agent = new AgentWallet({
  key: process.env.STX_PRIVATE_KEY,
  network: 'testnet',
  budget: { perTx: 50_000n, perDay: 1_000_000n },
});

const res = await agent.fetch('https://your-api.com/api/data');
const data = await res.json();

Features

  • AgentWallet: Automatic payment handling for AI agents.
  • HTTP Interceptor: Intercepts 402 responses and retries with payment.
  • Micropayment Streaming: Support for continuous x402 payments.

License

MIT