@seams/sayso-client
v0.2.0
Published
SaySo streaming WebSocket & HTTP client SDK with AudioWorklet PCM capture and local Ed25519 verdict verification.
Readme
@seams/sayso-client
The browser client of the SaySo verifier. It records 16 kHz PCM with an AudioWorklet, streams it to wss://…/v1/stream or sends one WAV to POST /v1/verify, and checks the signed verdict with @seams/sayso-verdict.
npm install @seams/sayso-clientimport { SaySoClient } from '@seams/sayso-client';
import { createIntent } from '@seams/sayso-verdict';
const client = new SaySoClient({
baseUrl: 'https://sayso.example.com',
verifierPublicKey: SAYSO_PUBLIC_KEY_HEX,
});
const built = await createIntent({ userId, action, payload, sentence });
const { wire, checked } = await client.verifyBatch({
intent: built.intent,
wav,
expectedIntentDigest: built.intentDigest,
verifyToken, // from your backend: createVerifyToken in @seams/sayso-verdict
});Check the verdict again on your backend before you act on it. The SaySo README describes the verifier and its routes.
