signet-protocol 1.11.0 → 1.11.1

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.
Files changed (4) hide show
  1. package/README.md +15 -10
  2. package/llms-full.txt +3744 -0
  3. package/llms.txt +134 -0
  4. package/package.json +8 -3
package/README.md CHANGED
@@ -27,14 +27,16 @@ Signet solves this without centralised data collection. A professional verifies
27
27
  npm install signet-protocol
28
28
  ```
29
29
 
30
- Display a verification badge for any Nostr user (Level 1 — a weekend to integrate):
30
+ Requires Node ≥22. ESM only (no CommonJS `require` export).
31
+
32
+ Display a verification badge for any Nostr user (Level 1: a weekend to integrate):
31
33
 
32
34
  ```typescript
33
- import { computeBadge, buildBadgeFilters, meetsMinimumTier } from 'signet-protocol';
35
+ import { computeBadge, buildBadgeFilters, fetchFromRelay, meetsMinimumTier } from 'signet-protocol';
34
36
 
35
37
  const filters = buildBadgeFilters(['<hex-pubkey>']);
36
- const events = await fetchFromRelay(filters);
37
- const badge = computeBadge('<hex-pubkey>', events, { verifySignatures: true });
38
+ const events = await fetchFromRelay('wss://relay.example.com', filters);
39
+ const badge = await computeBadge('<hex-pubkey>', events, { verifySignatures: true });
38
40
 
39
41
  // badge.tier => 3, badge.score => 106, badge.displayLabel => "Verified (Tier 3)"
40
42
  if (meetsMinimumTier(badge, 2)) {
@@ -42,8 +44,12 @@ if (meetsMinimumTier(badge, 2)) {
42
44
  }
43
45
  ```
44
46
 
47
+ `fetchFromRelay(relayUrl, filters)` is the package's own minimal relay client and returns `Promise<NostrEvent[]>`. Any other Nostr client works too: pass `buildBadgeFilters` output as the REQ filters and hand the resulting events to `computeBadge`. `computeBadge` is async and returns `Promise<BadgeInfo>`.
48
+
45
49
  See [Signet in 5 Minutes](docs/signet-in-5-minutes.md) for a full developer overview, or the [full flow example](examples/full-flow.ts) for all 4 tiers, trust scoring, policies, and verifier lifecycle.
46
50
 
51
+ For LLM and agent tooling, [llms.txt](llms.txt) is a concise API overview and [llms-full.txt](llms-full.txt) adds the full protocol and voting specifications and the developer guides in one file. Both ship in the npm package.
52
+
47
53
  ## Protocol
48
54
 
49
55
  The full specification is at [`spec/protocol.md`](spec/protocol.md).
@@ -62,9 +68,8 @@ All identity attestations use a single NIP-VA kind (31000), differentiated by `t
62
68
  | 31000 | `revocation` | Verifier Revocation | Community confirms challenge, revokes verifier |
63
69
  | 31000 | `identity-bridge` | Identity Bridge | Link two keypairs via ring signature |
64
70
  | 31000 | `delegation` | Delegation | Guardian or agent delegation with scoped permission |
65
- | 30482 | — | Election | Voting extension: define an election |
66
- | 30483 | — | Ballot | Voting extension: cast an anonymous ballot |
67
- | 30484 | — | Election Result | Voting extension: publish tallied result |
71
+
72
+ Voting extension: kinds 30482 (election), 30483 (ballot) and 30484 (election result) are specified in [`spec/voting.md`](spec/voting.md) and implemented in the separate [`nostr-anon-vote`](https://github.com/forgesworn/nostr-anon-vote) package, not in `signet-protocol`.
68
73
 
69
74
  ### Crypto Stack
70
75
 
@@ -73,8 +78,8 @@ Layer 1: Schnorr (secp256k1) — zero new dependencies
73
78
  Credential signing, Merkle selective disclosure,
74
79
  ring signatures for issuer privacy, MuSig2
75
80
 
76
- Layer 2: Bulletproofs (secp256k1) — age range proofs
77
- ~700 byte proofs, no trusted setup
81
+ Layer 2: Pedersen range proofs (secp256k1): age range proofs
82
+ via @forgesworn/range-proof, no trusted setup
78
83
 
79
84
  Layer 3: General-purpose ZK (future, if needed)
80
85
  Complex threshold proofs, recursive composition
@@ -82,7 +87,7 @@ Layer 3: General-purpose ZK (future, if needed)
82
87
 
83
88
  ## Status
84
89
 
85
- **v1.0.0** — spec complete, TypeScript library implemented, reference apps functional. Seeking community feedback.
90
+ **Status:** spec complete, TypeScript library implemented, reference apps functional. Seeking community feedback.
86
91
 
87
92
  All identity attestations use kind 31000 (NIP-VA, Verifiable Attestations), differentiated by `type` tag.
88
93