Skip to content

elizaOS Plugin

`prova-plugin-eliza` is the official plugin to connect Prova with elizaOS agents. Every action executed by your character gets a verifiable, Ed25519-signed receipt on Solana without touching your agent logic.

How it works

  • On initialization, the plugin intercepts the handler of every registered character action and hooks the runtime actions pipeline.
  • After each handler resolves, the plugin hashes the action name, message content, and result (SHA-256) and queues the attestation.
  • Attestations are automatically batched using a debouncer, writing up to 100 receipts in a single transaction to eliminate rent costs.
  • The plugin works off-chain with structural typing, ensuring it never imports @elizaos/core directly to stay lightweight and compatible across versions.

Install

npm install prova-plugin-eliza prova-agent-sdk

Quick start

import { provaPlugin, attesterFromProvaClient } from 'prova-plugin-eliza';
import { ProvaClient } from 'prova-agent-sdk';
import { Keypair } from '@solana/web3.js';

const prova = new ProvaClient({
  rpcUrl: process.env.PROVA_RPC_URL!,
  agentKeypair: Keypair.fromSecretKey(agentSecretKey),
});

const attester = attesterFromProvaClient(
  prova,
  ProvaClient.hashAction,
  operatorKeypair,
);

// Add to your runtime's plugins:
const runtime = new AgentRuntime({
  plugins: [provaPlugin({ attester })],
  // ...other character configuration...
});

Shutdown control

import { createProvaPlugin } from 'prova-plugin-eliza';

const { plugin, flush, stop } = createProvaPlugin({ attester });
// plugins: [plugin] ...
await stop(); // guaranteed final flush when the agent shuts down

Options

OptionDefaultDescription
attesterBridge to Prova. Build it with attesterFromProvaClient(client, hashAction, operatorKeypair).
rulesattest allPredicate filter by action name — return false to skip attesting that action.
batch.maxSize25Flushes immediately when the queue reaches N items (1–100).
batch.flushDelayMs1000Debounce time in milliseconds. Buffers bursts of actions into a single transaction.
onErrorconsole warnFallback hook on attestation failure; the agent's action itself is unaffected.