JSPM

aegis-ledger-sdk

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

TypeScript SDK for Aegis Ledger — tamper-evident execution logging for AI agents on ICP

Package Exports

  • aegis-ledger-sdk

Readme

aegis-ledger-sdk (TypeScript)

Tamper-evident execution logging for AI agents — TypeScript SDK for Aegis Protocol on the Internet Computer.

Install

npm install aegis-ledger-sdk @dfinity/agent @dfinity/principal @dfinity/candid

Quick Start

import { AegisClient } from 'aegis-ledger-sdk';

const client = new AegisClient({
  canisterId: 'toqqq-lqaaa-aaaae-afc2a-cai',
  apiKeyId: 'ak_your_key',
  pemPath: './agent_key.pem',
  agentId: 'my-agent',
});

// Log a tool call
await client.logToolCall({
  tool: 'web_search',
  input: { query: 'AI safety' },
  output: { results: ['...'] },
  durationMs: 150,
});

// Verify an entry
const result = await client.verify('act_abc123');
console.log(result.valid); // true

Browser Usage

<script src="https://unpkg.com/aegis-ledger-sdk/dist/widget.global.js"></script>
<script>
  AegisWidget.renderBadge('act_abc123', document.getElementById('badge'));
</script>

Features

  • Ed25519 signatures (Post-Quantum coming soon)
  • Isomorphic: works in Node.js and browsers
  • Hash-chain verification
  • Embeddable verification widget