
Research
/Security News
737 Chrome VPN Extensions Linked to Brand Impersonation and Browser Traffic Redirection
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.
@bolyra/receipts
Advanced tools
Signed auth receipts for Bolyra ZKP verification decisions — canonical JSON, secp256k1 sign/verify, EVM-compatible r||s||v signatures.
Tamper-evident signed receipts for Bolyra ZKP verification decisions — secp256k1 / ES256K signatures, canonical JSON, EVM-compatible r‖s‖v encoding.
npm install @bolyra/receipts
import { createAuthReceipt, signReceipt, verifyReceipt } from '@bolyra/receipts';
// 1. Build a receipt from a verification result
const payload = createAuthReceipt(
{
rootDid: 'did:bolyra:0xabc…',
actingDid: 'did:bolyra:0xdef…',
credentialCommitment: '0x1234…',
effectiveCommitment: '0x1234…',
humanProof: verifiedBundle.humanProof,
agentProof: verifiedBundle.agentProof,
humanPublicSignals: verifiedBundle.humanPublicSignals,
agentPublicSignals: verifiedBundle.agentPublicSignals,
allowed: true,
score: 95,
permissionBitmask: 3n,
chainDepth: 0,
bundleVersion: 1,
nonce: '0xdeadbeef',
},
{ issuer: 'https://gateway.example.com', keyId: 'k1' },
);
// 2. Sign it with your secp256k1 private key
const signed = signReceipt(payload, {
privateKey: process.env.RECEIPT_SIGNING_KEY!,
keyId: 'k1',
});
// 3. Verify later (or on another service)
const ok = verifyReceipt(signed, '0xYourExpectedSignerAddress');
console.log(ok); // true
The signed object is JSON-serializable and can be stored in a database, forwarded to an audit log, or returned to the caller as proof of the verification decision.
A signature makes each receipt tamper-evident; it does not make a log of
receipts tamper-evident — deleting or reordering whole entries leaves every
remaining signature valid. ReceiptChain closes that gap:
import { ReceiptChain, verifyReceiptChain, GENESIS_PREV_RECEIPT_HASH } from '@bolyra/receipts';
// Writer side: one chain per log. Each signed payload gains
// chain: { seq, prevReceiptHash } — the fields are INSIDE the signed payload,
// so they cannot be rewritten without breaking the signature.
const chain = new ReceiptChain();
const first = chain.sign(payload1, signerConfig); // seq 0, prevReceiptHash = genesis sentinel
const second = chain.sign(payload2, signerConfig); // seq 1, prevReceiptHash = first.receiptHash
// Verifier side: every signature AND the chain links.
const result = verifyReceiptChain([first, second], { expectedSigner: '0x…' });
result.ok; // true
result.headHash; // pin this externally to detect tail truncation later
Details:
seq: 0 and
prevReceiptHash: GENESIS_PREV_RECEIPT_HASH (0x + 64 zeros).receiptHash (envelope field) is computeReceiptHash(receipt):
keccak256 over the canonical { payload, signature } — it commits to the
exact signature bytes and excludes id and itself. Verifiers recompute it;
the stored copy is a convenience for linking and anchoring.verifyReceipt(), and
chain verification is a separate step. Logs that START with pre-chaining
receipts verify with { allowUnchained: true } (deletions among that
unchained prefix are, unavoidably, not detectable). Only a prefix is
tolerated: a chain-less receipt after any chained receipt always fails
(unchained-after-chained) — otherwise a validly signed chain-less receipt
could be spliced in undetected.expectedCount and/or
expectedHeadHash (e.g. from a periodically anchored checkpoint). The
anchoring mechanism and checkpoint cadence are deployment policy —
enterprise-configurable, not fixed by this library.CLI: bolyra receipt verify-chain audit-log.jsonl (from
@bolyra/cli) runs the same verification over a JSONL
file, with --signer, --expect-count, --expect-head, and
--allow-unchained.
Apache-2.0
FAQs
Signed auth receipts for Bolyra ZKP verification decisions — canonical JSON, secp256k1 sign/verify, EVM-compatible r||s||v signatures.
The npm package @bolyra/receipts receives a total of 61 weekly downloads. As such, @bolyra/receipts popularity was classified as not popular.
We found that @bolyra/receipts 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.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.