
Security News
Insecure Agents Podcast: How to Keep AI Agents From Bypassing Security Controls
Socket CTO Ahmad Nassri discusses how to keep AI agents from bypassing package blocks, limit credential access, and monitor their actions.
@peac/adapter-core
Advanced tools
Shared utilities for PEAC payment rail adapters and commerce mappings (Result types, validators, payment-proof contracts, mapper-boundary finality guard)
Shared utilities for PEAC payment rail adapters and commerce mappings:
Result types, validators, payment-proof contracts, and the mapper-boundary
finality-synthesis guard. The package historically served only payment
rail adapters; commerce mappings (@peac/mappings-paymentauth,
@peac/mappings-acp, @peac/mappings-ucp) now also depend on it for the
finality guard, which lives here so a single tracked module enforces the
no-finality-synthesis rule consistently across rails and mappings.
pnpm add @peac/adapter-core
@peac/adapter-core provides the foundational utilities that all PEAC adapters build on. It enforces a "never throws" convention where all adapter functions return explicit Result<T> values instead of throwing exceptions. It also provides input validators for common fields (amounts, currencies, networks, timestamps) and defines the PaymentProofAdapter interface that payment-focused adapters implement.
import { ok, adapterErr, isOk, type Result, type AdapterError } from '@peac/adapter-core';
function parseEvent(input: unknown): Result<{ id: string }, AdapterError> {
if (!input) {
return adapterErr('input is required', 'missing_required_field');
}
return ok({ id: 'parsed-event' });
}
const result = parseEvent(data);
if (isOk(result)) {
console.log(result.value.id);
} else {
console.error(result.error.code, result.error.message);
}
import { requireString, requireAmount, requireCurrency, requireObject } from '@peac/adapter-core';
function parseWebhook(event: unknown) {
const objResult = requireObject(event);
if (!objResult.ok) return objResult;
const amountResult = requireAmount(objResult.value.amount);
if (!amountResult.ok) return amountResult;
const currencyResult = requireCurrency(objResult.value.currency);
if (!currencyResult.ok) return currencyResult;
return ok({ amount: amountResult.value, currency: currencyResult.value });
}
import type { JsonObject, JsonValue } from '@peac/adapter-core';
interface PaymentEvidence {
rail: string;
evidence: JsonObject;
}
@peac/kernel (Layer 0): JSON types re-exported for convenience@peac/adapter-x402 (Layer 4): Uses Result types and validators@peac/adapter-openclaw (Layer 4): Uses Result types@peac/adapter-* and @peac/mappings-* packagesIf you are building a custom PEAC adapter for a new payment rail or protocol:
Result, ok, err, and adapterErr to follow the "never throws" conventionrequireAmount, requireCurrency, requireString) for input parsingPaymentProofAdapter interface for payment-focused adaptersApache-2.0
PEAC Protocol is an open source project stewarded by Originary and community contributors.
FAQs
Shared utilities for PEAC payment rail adapters and commerce mappings (Result types, validators, payment-proof contracts, mapper-boundary finality guard)
The npm package @peac/adapter-core receives a total of 19 weekly downloads. As such, @peac/adapter-core popularity was classified as not popular.
We found that @peac/adapter-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Socket CTO Ahmad Nassri discusses how to keep AI agents from bypassing package blocks, limit credential access, and monitor their actions.

Security News
GPT-6 Astra tried to plant malicious code in simulated open source projects using fake GitHub accounts and deceptive PRs during an assigned CTF challenge.

Security News
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.