
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/delegation
Advanced tools
Verifiable delegated authority for agent actions. Human signs a scoped receipt; middleware verifies it before the agent calls a tool. SD-JWT/EdDSA today, ZKP upgrade path tomorrow.
SD-JWT (draft-20) + KB-JWT delegation receipts with IETF status-list (draft-20) revocation.
@bolyra/delegation is the lightweight on-ramp into the Bolyra protocol. A human (or upstream agent) issues a scoped, holder-bound receipt; the holder presents it with a fresh key-binding JWT; middleware verifies before the agent calls a tool. Standards-aligned wire format means downstream verifiers can audit the receipt with off-the-shelf SD-JWT tooling.
<issuer-jws>~~<kb-jwt>
typ: "bolyra-delegation+sd-jwt", alg: "EdDSA", _sd_alg: "sha-256". Payload includes cnf.jwk (holder pubkey) and _sd: [] (zero disclosures in v0.2).typ: "kb+jwt", signed by the holder. Payload {aud, nonce, sd_hash, iat} per SD-JWT draft-20 §4.3.~ separators is the zero-disclosure slot mandated by draft-ietf-oauth-selective-disclosure-jwt-20.npm install @bolyra/delegation
import {
allow,
present,
verify,
staticIssuerResolver,
fetchStatusList,
} from "@bolyra/delegation";
// Issuer signs a scoped, holder-bound receipt.
const receipt = await allow(
{
iss: "https://issuer.example",
sub: "did:bolyra:holder",
aud: "https://merchant.example",
act: "spend",
perm: "FINANCIAL_SMALL",
agentPubKey: holderPublicKey,
ttlSeconds: 3600,
max: { amount: 5000, currency: "USD" },
},
{ privateKey: issuerPrivateKey, kid: "k1" },
);
// Holder produces a presentation with a fresh KB-JWT.
const presented = await present(receipt, holderPrivateKey, {
audience: "https://merchant.example",
nonce: "fresh-server-nonce",
});
// Verifier validates the receipt + KB-JWT + (optionally) status-list.
const trustedIssuers = staticIssuerResolver({
"https://issuer.example": { k1: issuerPublicKey },
});
const result = await verify(presented, {
audience: "https://merchant.example",
action: "spend",
perm: "FINANCIAL_SMALL",
kbNonce: "fresh-server-nonce",
amount: 1000,
currency: "USD",
trustedIssuers,
// Optional: revocation via IETF status-list draft-20.
checkStatus: (uri, idx, expectedIss) =>
fetchStatusList(uri, idx, expectedIss, { verifyKey: trustedIssuers }),
});
if (!result.ok) throw new Error(`delegation rejected: ${result.reason}`);
// proceed with the call
The 8-bit cumulative encoding mirrors circuits/Delegation.circom so receipts are upgrade-compatible with full ZKP delegation later.
| Bit | Permission | Notes |
|---|---|---|
| 0 | READ_DATA | |
| 1 | WRITE_DATA | |
| 2 | FINANCIAL_SMALL | < $100 |
| 3 | FINANCIAL_MEDIUM | < $10K (implies bit 2) |
| 4 | FINANCIAL_UNLIMITED | implies bits 2 + 3 |
| 5 | SIGN_ON_BEHALF | |
| 6 | SUB_DELEGATE | |
| 7 | ACCESS_PII |
In v0.2, perm is passed as the string label (e.g. "FINANCIAL_SMALL"); the verifier expands cumulative implication internally.
acceptLegacyV01: true to verify(). The result includes legacyV01: true.allow() (v0.2 only — produces SD-JWT issuer form).cnf.jwk in the receipt.claims.status.status_list = { uri, idx } at issuance and pass checkStatus to verify().VerifyFailureReason is a discriminated union of 51 enumerated reasons (plus "UNKNOWN" as a catch-all default). Every enumerated reason is exercised by at least one test under test/conformance/. The negative-space gate (test/conformance/negative-space.test.ts) enforces full coverage in CI.
Reasons partition into five families:
BAD_FORMAT, INVALID_SIGNATURE, UNSUPPORTED_ALG, TYP_MISMATCH, KID_MISSING, KID_RESOLVER_ERROR, UNKNOWN_ISSUER_KID, LEGACY_V01_REJECTEDEXPIRED, FUTURE_NBF, WRONG_ISSUER, WRONG_AUDIENCE, WRONG_SUBJECT, WRONG_ACTION, MISSING_CLAIM, PARENT_NOT_FOUND, DELEGATION_LOOP, PERMISSION_VIOLATION, AMOUNT_EXCEEDS_CAP, CURRENCY_MISMATCHDISCLOSURE_TAMPERED, DISCLOSURE_HASH_MISMATCH, UNDISCLOSED_CLAIM_REQUIRED, DUPLICATE_DISCLOSURE, MALFORMED_DISCLOSURE, SD_ALG_UNSUPPORTED, SD_JWT_MALFORMEDCNF_MISSING, CNF_KEY_MISMATCH, CNF_JWK_INVALID, KB_MISSING, KB_NONCE_REQUIRED, KB_BAD_FORMAT, KB_INVALID_SIGNATURE, KB_WRONG_NONCE, KB_WRONG_AUDIENCE, KB_WRONG_SD_HASH, KB_TYP_INVALID, KB_ALG_UNSUPPORTED, KB_IAT_FUTURE, KB_IAT_TOO_OLD, KB_BINDING_MISMATCHSTATUS_REVOKED, STATUS_SUSPENDED, STATUS_CHECK_UNCONFIGURED, STATUS_LIST_INVALID, STATUS_LIST_SIG_INVALID, STATUS_LIST_ISSUER_MISMATCH, STATUS_LIST_UNREACHABLE, STATUS_INDEX_OUT_OF_RANGEdraft-ietf-oauth-selective-disclosure-jwt-20draft-ietf-oauth-status-list-20 (2-bit slots, zlib RFC 1950, base64url)application/bolyra-delegation+sd-jwt, application/statuslist+jwt, application/kb+jwt@bolyra/sdk + Circom Delegation circuit). Privacy-preserving issuer + agent identity.Apache-2.0. Patent grant per Apache 2.0 §3 (US provisional 64/043,898 filed 2026-04-20). DCO sign-off required for contributions (see CONTRIBUTING.md in repo root).
FAQs
Verifiable delegated authority for agent actions. Human signs a scoped receipt; middleware verifies it before the agent calls a tool. SD-JWT/EdDSA today, ZKP upgrade path tomorrow.
The npm package @bolyra/delegation receives a total of 10 weekly downloads. As such, @bolyra/delegation popularity was classified as not popular.
We found that @bolyra/delegation 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.