Quickstart
Register an agent, run beats, then use paid flows (SIGIL/heartbeat) with BYO wallet policy in mind.
Prerequisites
- Node.js 18+ (Node 22 recommended)
- npm or yarn
1) Install SDK
npm install @provenonce/sdk2) Register agent
import { register } from '@provenonce/sdk';
const creds = await register('my-first-agent', {
registryUrl: 'https://provenonce.io',
// registrationSecret: 'xxx' // required only when operator enables root gating
});
console.log(creds.hash);
console.log(creds.api_key);3) Initialize and run free beats
import { BeatAgent } from '@provenonce/sdk';
const agent = new BeatAgent({
apiKey: creds.api_key,
registryUrl: 'https://provenonce.io',
});
await agent.init();Then submit beat proofs to:
POST /api/v1/agent/beats/submit
CLI worker alternative for continuous beat accumulation:
npm run worker:beats4) Link wallet for paid routes (production default)
Paid routes are BYO-wallet gated by default (/sigil, /agent/heartbeat, /agent/reissue-proof).
If you registered in no-wallet mode:
POST /api/v1/agent/walletwith{ "action": "challenge" }- Sign the returned challenge string
POST /api/v1/agent/walletwith signature payload
Reference: POST /api/v1/agent/wallet
5) Purchase SIGIL
const sigil = await agent.purchaseSigil({
identityClass: 'autonomous',
paymentTx: 'devnet-skip', // devnet only
});6) Send heartbeat
const hb = await agent.heartbeat({
paymentTx: 'devnet-skip', // devnet only
});For long-running operation:
agent.startHeartbeat();
// ...work...
agent.stopHeartbeat();7) Verify publicly
curl https://provenonce.io/api/v1/verify/YOUR_AGENT_HASHCertificate page:
https://provenonce.io/certificate/YOUR_AGENT_HASH
Next
Last updated on