nostr-veil 0.19.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/dist/profiles/issues.d.ts +10 -0
- package/dist/profiles/issues.d.ts.map +1 -1
- package/dist/profiles/issues.js +60 -0
- package/dist/profiles/issues.js.map +1 -1
- package/llms-full.txt +8 -1
- package/llms.txt +6 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -173,6 +173,7 @@ The resulting `assertion` is a plain `EventTemplate` you sign and publish like a
|
|
|
173
173
|
| `verifyDeploymentBundle(events, bundle, options?)` | Verify a signed bundle from trusted publishers, then verify the bundled deployment policy |
|
|
174
174
|
| `verifyProductionDeployment(events, bundle, options?)` | One-call production gate that also requires an expiring bundle and signed relay-fetched events by default |
|
|
175
175
|
| `VerificationIssue`, `VerificationIssueCode` | Stable machine-readable issue codes returned alongside human-readable errors |
|
|
176
|
+
| `explainVerificationIssue(issueOrCode)`, `remediationForIssue(issueOrCode)` | Turn stable issue codes into concrete operator or verifier remediation guidance |
|
|
176
177
|
| `canonicalRelaySubject`, `canonicalNip05Subject`, `canonicalDomainSubject`, `canonicalNpmPackageSubject` | Canonical subject helpers for common real-world identifiers |
|
|
177
178
|
| `canonicalPubkeySubject`, `canonicalEventSubject`, `canonicalAddressSubject` | Canonical subject helpers for Nostr-native subjects |
|
|
178
179
|
|
|
@@ -267,7 +268,9 @@ and rotated.
|
|
|
267
268
|
Production verifiers should prefer `verifyProductionDeployment()` over manually
|
|
268
269
|
composing lower-level checks. It returns the existing human-readable `errors`
|
|
269
270
|
plus stable `issues[].code` values such as `bundle.signer_untrusted`,
|
|
270
|
-
`event.signature_invalid`, `circle.unaccepted`, and `metric.below_min`.
|
|
271
|
+
`event.signature_invalid`, `circle.unaccepted`, and `metric.below_min`. Use
|
|
272
|
+
`explainVerificationIssue()` or `remediationForIssue()` to show the exact
|
|
273
|
+
operator action for each failure.
|
|
271
274
|
|
|
272
275
|
---
|
|
273
276
|
|
|
@@ -4,7 +4,17 @@ export interface VerificationIssue {
|
|
|
4
4
|
message: string;
|
|
5
5
|
path?: string;
|
|
6
6
|
}
|
|
7
|
+
export type VerificationIssueAction = 'reject' | 'manual-review' | 'operator-action' | 'refresh-and-retry';
|
|
8
|
+
export interface VerificationIssueExplanation {
|
|
9
|
+
code: VerificationIssueCode;
|
|
10
|
+
summary: string;
|
|
11
|
+
remediation: string;
|
|
12
|
+
action: VerificationIssueAction;
|
|
13
|
+
}
|
|
14
|
+
export declare const VERIFICATION_ISSUE_EXPLANATIONS: Readonly<Record<VerificationIssueCode, VerificationIssueExplanation>>;
|
|
7
15
|
export declare function verificationIssue(code: VerificationIssueCode, message: string, path?: string): VerificationIssue;
|
|
8
16
|
export declare function classifyVerificationError(message: string): VerificationIssue;
|
|
9
17
|
export declare function issuesFromErrors(errors: readonly string[]): VerificationIssue[];
|
|
18
|
+
export declare function explainVerificationIssue(issueOrCode: VerificationIssue | VerificationIssueCode): VerificationIssueExplanation;
|
|
19
|
+
export declare function remediationForIssue(issueOrCode: VerificationIssue | VerificationIssueCode): string;
|
|
10
20
|
//# sourceMappingURL=issues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issues.d.ts","sourceRoot":"","sources":["../../src/profiles/issues.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B,8BAA8B,GAC9B,iBAAiB,GACjB,gBAAgB,GAChB,2BAA2B,GAC3B,wBAAwB,GACxB,mBAAmB,GACnB,yBAAyB,GACzB,0BAA0B,GAC1B,0BAA0B,GAC1B,4BAA4B,GAC5B,uBAAuB,GACvB,yBAAyB,GACzB,kCAAkC,GAClC,mCAAmC,GACnC,qBAAqB,GACrB,wBAAwB,GACxB,yBAAyB,GACzB,yBAAyB,GACzB,yBAAyB,GACzB,yBAAyB,GACzB,4BAA4B,GAC5B,gBAAgB,GAChB,mBAAmB,GACnB,mBAAmB,GACnB,yBA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 'reject') {
|
|
2
|
+
return { summary, remediation, action };
|
|
3
|
+
}
|
|
4
|
+
const VERIFICATION_ISSUE_EXPLANATION_INPUTS = {
|
|
5
|
+
'assertion.created_at_missing': explanation('The assertion has no Nostr created_at timestamp.', 'Fetch or publish a complete signed Nostr event with created_at before applying freshness policy.'),
|
|
6
|
+
'assertion.stale': explanation('The assertion is outside the deployment freshness window.', 'Fetch a newer assertion, shorten cache lifetime, or change maxAgeSeconds only if the deployment policy intentionally accepts older evidence.', 'refresh-and-retry'),
|
|
7
|
+
'bundle.expired': explanation('The signed deployment bundle has expired.', 'Fetch the current signed bundle from the trusted publisher or rotate the bundle before accepting assertions.', 'refresh-and-retry'),
|
|
8
|
+
'bundle.expires_at_invalid': explanation('The bundle expiresAt field is malformed.', 'Re-issue the bundle with expiresAt as a Unix timestamp later than issuedAt.', 'operator-action'),
|
|
9
|
+
'bundle.expiry_required': explanation('The production verifier requires signed bundles to expire.', 'Set expiresAt when calling createSignedDeploymentBundle(), then publish the replacement bundle.', 'operator-action'),
|
|
10
|
+
'bundle.id_invalid': explanation('The bundle id is missing or malformed.', 'Use a stable non-empty deployment id when creating the signed bundle.', 'operator-action'),
|
|
11
|
+
'bundle.issued_at_future': explanation('The bundle issuedAt timestamp is in the future for this verifier.', 'Check verifier clock skew, then re-issue or retry once the bundle is valid.', 'refresh-and-retry'),
|
|
12
|
+
'bundle.issued_at_invalid': explanation('The bundle issuedAt field is malformed.', 'Re-issue the bundle with issuedAt as a valid Unix timestamp.', 'operator-action'),
|
|
13
|
+
'bundle.signature_invalid': explanation('The signed deployment bundle was changed after signing or signed with the wrong key.', 'Reject the bundle and fetch a fresh copy from the trusted publisher; rotate keys if compromise is suspected.'),
|
|
14
|
+
'bundle.signature_malformed': explanation('The bundle signature is not a valid Schnorr signature encoding.', 'Re-issue the bundle with createSignedDeploymentBundle() and reject the malformed bundle.', 'operator-action'),
|
|
15
|
+
'bundle.signer_invalid': explanation('The bundle signer pubkey is malformed.', 'Re-issue the bundle with a valid 32-byte hex publisher key.', 'operator-action'),
|
|
16
|
+
'bundle.signer_untrusted': explanation('The bundle signer is not in the trusted publisher set.', 'Reject the bundle unless governance has explicitly added this publisher key to trustedPublishers.'),
|
|
17
|
+
'bundle.trusted_publisher_invalid': explanation('A configured trusted publisher key is malformed.', 'Fix the trustedPublishers configuration so every entry is a valid 32-byte hex pubkey.', 'operator-action'),
|
|
18
|
+
'bundle.trusted_publishers_missing': explanation('No trusted bundle publisher keys were configured.', 'Pass trustedPublishers to the verifier and pin the operator keys your deployment actually trusts.', 'operator-action'),
|
|
19
|
+
'bundle.type_invalid': explanation('The bundle type field is not recognised.', 'Fetch or generate a deployment-policy bundle with createSignedDeploymentBundle().', 'operator-action'),
|
|
20
|
+
'bundle.version_invalid': explanation('The bundle version is not supported by this verifier.', 'Upgrade the verifier or publish a bundle version supported by this deployment.', 'operator-action'),
|
|
21
|
+
'circle.accepted_invalid': explanation('An accepted circle id in verifier configuration is malformed.', 'Use createCircleManifest() or a valid 64-character circle id from the reviewed member list.', 'operator-action'),
|
|
22
|
+
'circle.accepted_missing': explanation('The deployment has no accepted circles configured.', 'Configure reviewed circle manifests or acceptedCircleIds before acting on assertions.', 'operator-action'),
|
|
23
|
+
'circle.manifest_expired': explanation('A circle manifest used by the deployment has expired.', 'Rotate the circle manifest, publish a replacement, and verify the assertion against the current manifest.', 'refresh-and-retry'),
|
|
24
|
+
'circle.manifest_invalid': explanation('A circle manifest does not match the expected shape or member-derived circle id.', 'Recreate the manifest with createCircleManifest() from the exact reviewed member pubkeys.', 'operator-action'),
|
|
25
|
+
'circle.profile_not_allowed': explanation('The circle manifest does not allow this use-case profile.', 'Use a circle manifest whose profileIds includes this profile, or route the assertion to a policy that accepts the circle for this use case.', 'operator-action'),
|
|
26
|
+
'circle.revoked': explanation('The assertion uses a circle that the deployment has revoked.', 'Reject the assertion and require a fresh assertion from an active, non-revoked circle.'),
|
|
27
|
+
'circle.superseded': explanation('The assertion uses a circle superseded by a newer manifest.', 'Fetch an assertion from the replacement circle, or explicitly allow superseded circles only for historical verification.', 'refresh-and-retry'),
|
|
28
|
+
'circle.unaccepted': explanation('The assertion was produced by a circle this deployment does not accept.', 'Reject it unless governance reviews the circle and adds its manifest or circle id to the deployment policy.'),
|
|
29
|
+
'event.signature_invalid': explanation('The fetched Nostr event id or signature is invalid.', 'Reject the event, fetch it again from another relay if useful, and do not verify or act on mutated event data.'),
|
|
30
|
+
'event.signature_missing': explanation('The verifier expected a fully signed Nostr event but received an unsigned template.', 'Sign assertions before publishing and require relay-fetched events to include id, pubkey, created_at, and sig.'),
|
|
31
|
+
'federation.invalid': explanation('The federated proof set failed federation validation.', 'Ensure all events share the expected subject and scope, then verify only complete events from accepted circles.'),
|
|
32
|
+
'federation.threshold_not_met': explanation('The federation has too few accepted circles or distinct signers.', 'Collect more valid assertions from accepted circles or lower the threshold only through an explicit policy change.', 'manual-review'),
|
|
33
|
+
'metric.above_max': explanation('A metric is above the deployment maximum.', 'Reject or manually review the assertion; update metric bounds only if the profile definition has changed.', 'manual-review'),
|
|
34
|
+
'metric.below_min': explanation('A metric is below the deployment minimum.', 'Treat the score as failing the gate, or route it to the fallback/manual-review path defined by the application.', 'manual-review'),
|
|
35
|
+
'metric.integer_required': explanation('A metric must be an integer for this deployment.', 'Publish integer metric values or relax the metric policy only if fractional values are intentionally supported.', 'operator-action'),
|
|
36
|
+
'metric.invalid_value': explanation('A metric value is not a finite number.', 'Reject the assertion and require the publisher to emit numeric NIP-85 metric tags.'),
|
|
37
|
+
'metric.required_missing': explanation('A required metric is missing from the assertion.', 'Require the aggregate assertion to include the metric named in the deployment policy before acting on it.', 'manual-review'),
|
|
38
|
+
'metric.unknown': explanation('The assertion contains a metric not allowed by the deployment policy.', 'Reject unknown metrics or update the policy after reviewing the metric meaning and bounds.', 'manual-review'),
|
|
39
|
+
'nip85.syntax_invalid': explanation('The event does not pass NIP-85 syntax validation.', 'Reject the event and publish it again with the correct kind, tags, subject hint, and metric tag shape.'),
|
|
40
|
+
'policy.nostr_signature_not_required': explanation('The production bundle policy would allow unsigned relay events.', 'Set requireNostrSignature: true in createDeploymentPolicy() for production relay-fetched assertions.', 'operator-action'),
|
|
41
|
+
'profile.event_count_invalid': explanation('The number of events does not match the selected profile.', 'Pass exactly one event for single-assertion profiles, or the complete scoped event set for federation profiles.', 'operator-action'),
|
|
42
|
+
'profile.kind_mismatch': explanation('The event kind does not match the selected profile.', 'Route the event to the matching NIP-85 profile, or rebuild the assertion with the profile-required kind.'),
|
|
43
|
+
'profile.subject_format_invalid': explanation('The subject string does not match the profile subject format.', 'Canonicalise the subject with the profile helper before contribution and verification.', 'operator-action'),
|
|
44
|
+
'profile.subject_hint_mismatch': explanation('The subject hint tag value does not match the profile policy.', 'Use the expected p, e, a, or k tag value and require proof v2 for workflows that rely on subject binding.'),
|
|
45
|
+
'profile.subject_mismatch': explanation('The assertion is about a different subject than the deployment expected.', 'Reject it and verify only assertions whose subject equals the canonical expectedSubject.'),
|
|
46
|
+
'proof.invalid': explanation('The nostr-veil ring proof is invalid.', 'Reject the assertion; collect a new aggregate from the circle rather than trying to repair proof tags.'),
|
|
47
|
+
'proof.threshold_not_met': explanation('The proof has fewer distinct signers than the deployment requires.', 'Collect more valid contributions from the circle or change the threshold only through explicit governance.', 'manual-review'),
|
|
48
|
+
'verification.failed': explanation('Verification failed with an unclassified error.', 'Reject by default, inspect result.errors, and add a more specific issue mapping if this becomes a supported failure mode.', 'manual-review'),
|
|
49
|
+
};
|
|
50
|
+
export const VERIFICATION_ISSUE_EXPLANATIONS = Object.freeze(Object.fromEntries(Object.entries(VERIFICATION_ISSUE_EXPLANATION_INPUTS).map(([code, value]) => [
|
|
51
|
+
code,
|
|
52
|
+
Object.freeze({ code: code, ...value }),
|
|
53
|
+
])));
|
|
1
54
|
export function verificationIssue(code, message, path) {
|
|
2
55
|
return Object.freeze({
|
|
3
56
|
code,
|
|
@@ -113,4 +166,11 @@ export function classifyVerificationError(message) {
|
|
|
113
166
|
export function issuesFromErrors(errors) {
|
|
114
167
|
return errors.map(error => classifyVerificationError(error));
|
|
115
168
|
}
|
|
169
|
+
export function explainVerificationIssue(issueOrCode) {
|
|
170
|
+
const code = typeof issueOrCode === 'string' ? issueOrCode : issueOrCode.code;
|
|
171
|
+
return VERIFICATION_ISSUE_EXPLANATIONS[code];
|
|
172
|
+
}
|
|
173
|
+
export function remediationForIssue(issueOrCode) {
|
|
174
|
+
return explainVerificationIssue(issueOrCode).remediation;
|
|
175
|
+
}
|
|
116
176
|
//# sourceMappingURL=issues.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issues.js","sourceRoot":"","sources":["../../src/profiles/issues.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"issues.js","sourceRoot":"","sources":["../../src/profiles/issues.ts"],"names":[],"mappings":"AAmEA,SAAS,WAAW,CAClB,OAAe,EACf,WAAmB,EACnB,SAAkC,QAAQ;IAE1C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,CAAA;AACzC,CAAC;AAED,MAAM,qCAAqC,GAAG;IAC5C,8BAA8B,EAAE,WAAW,CACzC,kDAAkD,EAClD,kGAAkG,CACnG;IACD,iBAAiB,EAAE,WAAW,CAC5B,2DAA2D,EAC3D,8IAA8I,EAC9I,mBAAmB,CACpB;IACD,gBAAgB,EAAE,WAAW,CAC3B,2CAA2C,EAC3C,8GAA8G,EAC9G,mBAAmB,CACpB;IACD,2BAA2B,EAAE,WAAW,CACtC,0CAA0C,EAC1C,6EAA6E,EAC7E,iBAAiB,CAClB;IACD,wBAAwB,EAAE,WAAW,CACnC,4DAA4D,EAC5D,iGAAiG,EACjG,iBAAiB,CAClB;IACD,mBAAmB,EAAE,WAAW,CAC9B,wCAAwC,EACxC,uEAAuE,EACvE,iBAAiB,CAClB;IACD,yBAAyB,EAAE,WAAW,CACpC,mEAAmE,EACnE,6EAA6E,EAC7E,mBAAmB,CACpB;IACD,0BAA0B,EAAE,WAAW,C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CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,OAAe;IACvD,OAAO,iBAAiB,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,CAAA;AACrF,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAAyB;IACxD,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAA;AAC9D,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,WAAsD;IAEtD,MAAM,IAAI,GAAG,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAA;IAC7E,OAAO,+BAA+B,CAAC,IAAI,CAAC,CAAA;AAC9C,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,WAAsD;IACxF,OAAO,wBAAwB,CAAC,WAAW,CAAC,CAAC,WAAW,CAAA;AAC1D,CAAC"}
|
package/llms-full.txt
CHANGED
|
@@ -161,7 +161,9 @@ interface VerificationIssue {
|
|
|
161
161
|
|
|
162
162
|
Deployment/profile verifiers keep human-readable `errors` for compatibility and
|
|
163
163
|
also return stable `issues[].code` values for application policy, logging, and
|
|
164
|
-
alerts.
|
|
164
|
+
alerts. Use `explainVerificationIssue(issueOrCode)` or
|
|
165
|
+
`remediationForIssue(issueOrCode)` to turn a stable code into the concrete next
|
|
166
|
+
operator or verifier action.
|
|
165
167
|
|
|
166
168
|
### `EventTemplate`
|
|
167
169
|
|
|
@@ -676,6 +678,11 @@ const result = verifyProductionDeployment(assertionFromRelay, bundle, {
|
|
|
676
678
|
if (!result.valid) audit(result.issues.map(issue => issue.code))
|
|
677
679
|
```
|
|
678
680
|
|
|
681
|
+
Use `explainVerificationIssue(issue)` when presenting failures to an operator.
|
|
682
|
+
For example, `bundle.trusted_publishers_missing` means the verifier has no
|
|
683
|
+
pinned publisher keys, while `event.signature_invalid` means the fetched event
|
|
684
|
+
must be rejected and can optionally be retried from another relay.
|
|
685
|
+
|
|
679
686
|
---
|
|
680
687
|
|
|
681
688
|
### `nostr-veil` root export -- Signing Utilities
|
package/llms.txt
CHANGED
|
@@ -63,10 +63,12 @@ Two subpath exports, plus a root that re-exports everything:
|
|
|
63
63
|
`createCircleManifest`, `verifyCircleManifest`, `createDeploymentPolicy`,
|
|
64
64
|
`verifyDeploymentPolicy`, `createSignedDeploymentBundle`,
|
|
65
65
|
`verifyDeploymentBundle`, `verifyProductionDeployment`, `VerificationIssue`,
|
|
66
|
-
`VerificationIssueCode`,
|
|
67
|
-
`verifyProductionDeployment` with pinned trusted
|
|
68
|
-
production relay-fetched assertions; it also requires
|
|
69
|
-
signed events by default.
|
|
66
|
+
`VerificationIssueCode`, `explainVerificationIssue`, `remediationForIssue`, and
|
|
67
|
+
canonical subject helpers. Use `verifyProductionDeployment` with pinned trusted
|
|
68
|
+
publisher pubkeys for production relay-fetched assertions; it also requires
|
|
69
|
+
expiring bundles and signed events by default. Use issue explanations to turn
|
|
70
|
+
failures into concrete operator actions instead of only showing negative
|
|
71
|
+
results.
|
|
70
72
|
|
|
71
73
|
## Limits
|
|
72
74
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nostr-veil",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Privacy layer for Nostr reputation systems. Groups collectively score trustworthiness using ring signatures -- scores are verifiable but contributors are unidentifiable.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|