npm.io
0.5.3 • Published 3d ago

@stellar-agent/ledger-logger

Licence
MIT
Version
0.5.3
Deps
1
Size
21 kB
Vulns
0
Weekly
0

@stellar-agent/ledger-logger

Receipt and JSONL event logging for Stellar Agent operations.

This package writes structured receipts for submitted payments and operations, reads the latest receipt, derives spend history for policy evaluation, and verifies that receipt payloads do not contain secret keys.

Install

npm install @stellar-agent/ledger-logger

Example

import { latestReceipt, spendHistoryFromReceipts } from "@stellar-agent/ledger-logger";

const latest = await latestReceipt("~/.stellar-agent/receipts");
const spend = await spendHistoryFromReceipts("~/.stellar-agent/receipts");

Safety

  • Receipts are designed for public transaction metadata, not secret custody.
  • Secret-like values are rejected by receipt verification.
  • Payment commands use receipt history when evaluating daily and monthly policy limits.