Skip to content

IntentProof/intentproof-sdk-node

Repository files navigation

intentproof-sdk-node

CI

Node.js SDK for signing IntentProof ExecutionEvent records locally.

Use

  • wrap(intent, action, fn) instrumentation
  • Ed25519 signing and JCS canonicalization
  • SQLite outbox for durable local capture
  • Export events to your app or bundle pipeline

Install

npm install @intentproof/sdk

Development in this repo:

npm install
npm run build
npm test

Conformance vectors live in intentproof-spec.

Quick start

import { configure, wrap, flush } from '@intentproof/sdk';

configure({
  dbPath: './intentproof-outbox.db',
  dataDir: './.intentproof-sdk',
});

const refund = wrap(
  'Return funds to the customer',
  'payments.refund.execute',
  async (input) => ({ id: 're_123' }),
);

await refund({ amount_cents: 4999 });
await flush();

Signing keys default to ~/.intentproof/sdk-node/keypair.json when dataDir is omitted. Delete that directory to reset the local identity.

Optional: run intentproof local from intentproof-tools for a loopback dev ingest — not required for offline verification.

Support

GitHub Issues — see CONTRIBUTING.md. Security reports: security@intentproof.io or a private GitHub Security Advisory.

License

MIT — see LICENSE.

About

Node.js SDK to sign IntentProof execution events locally (wrap/outbox). MIT.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors