create-agent 0.0.19 → 0.0.20

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/.nojekyll ADDED
File without changes
package/README.md CHANGED
@@ -46,6 +46,7 @@ The tool outputs a spec-compliant DID document to `stdout`:
46
46
  ```json
47
47
  {
48
48
  "@context": [
49
+ "https://www.w3.org/ns/did/v1",
49
50
  "https://www.w3.org/ns/cid/v1",
50
51
  "https://w3id.org/nostr/context"
51
52
  ],
package/SKILL.md CHANGED
@@ -52,7 +52,7 @@ layers.
52
52
 
53
53
  ```json
54
54
  {
55
- "@context": ["https://www.w3.org/ns/cid/v1", "https://w3id.org/nostr/context"],
55
+ "@context": ["https://www.w3.org/ns/did/v1", "https://www.w3.org/ns/cid/v1", "https://w3id.org/nostr/context"],
56
56
  "id": "did:nostr:dd82687ee5a352c6d6de337bce53f150ca1567f3861475c74e7da62695931d23",
57
57
  "type": "DIDNostr",
58
58
  "seeAlso": "https://init-agent.com/SKILL.md",
@@ -82,11 +82,12 @@ layers.
82
82
 
83
83
  ## Current spec facts (verify; do not recall from memory)
84
84
 
85
- did:nostr is a young, evolving method. As of **2026-06-29** the canonical
85
+ did:nostr is a young, evolving method. As of **2026-07-26** (spec 0.1.1) the canonical
86
86
  shape is:
87
87
 
88
- - `@context`: `["https://www.w3.org/ns/cid/v1", "https://w3id.org/nostr/context"]`
89
- — note **CID v1**, not the older DID v1 context.
88
+ - `@context`: `["https://www.w3.org/ns/did/v1", "https://www.w3.org/ns/cid/v1", "https://w3id.org/nostr/context"]`
89
+ — note it leads with **DID v1** (required by DID Core), followed by **CID v1**, which
90
+ defines the `Multikey` terms.
90
91
  - `type`: `DIDNostr`; verification method `type`: `Multikey`.
91
92
  - `publicKeyMultibase`: `fe70102` + lowercase-hex pubkey.
92
93
  - `authentication` and `assertionMethod`: `["#key1"]`.
package/index.js CHANGED
@@ -25,6 +25,7 @@ export function generateAgent() {
25
25
  // Create DID document per https://nostrcg.github.io/did-nostr/
26
26
  const did = {
27
27
  "@context": [
28
+ "https://www.w3.org/ns/did/v1",
28
29
  "https://www.w3.org/ns/cid/v1",
29
30
  "https://w3id.org/nostr/context"
30
31
  ],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-agent",
3
3
  "type": "module",
4
- "version": "0.0.19",
4
+ "version": "0.0.20",
5
5
  "description": "create an agent",
6
6
  "scripts": {
7
7
  "test": "node --test"
@@ -43,6 +43,7 @@ describe('generateAgent', () => {
43
43
  const { did, pubkey } = generateAgent()
44
44
 
45
45
  assert.deepStrictEqual(did['@context'], [
46
+ 'https://www.w3.org/ns/did/v1',
46
47
  'https://www.w3.org/ns/cid/v1',
47
48
  'https://w3id.org/nostr/context'
48
49
  ])
@@ -1,34 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "WebFetch(domain:did-nostr.com)",
5
- "WebFetch(domain:nostrcg.github.io)",
6
- "Bash(npm test *)",
7
- "Bash(gh repo *)",
8
- "Bash(gh issue *)",
9
- "Bash(git push *)",
10
- "Bash(gh pr create --base gh-pages --title 'Update DID document to latest did:nostr spec \\(DID → CID context\\)' --body ' *)",
11
- "Bash(gh pr *)",
12
- "Bash(gh api *)",
13
- "Bash(git checkout *)",
14
- "Bash(git pull *)",
15
- "Bash(npm install *)",
16
- "WebFetch(domain:github.com)",
17
- "Bash(curl -sL \"https://www.w3.org/ns/cid/v1\")",
18
- "Bash(curl -sL \"https://w3id.org/nostr/context\")",
19
- "Bash(python3 -c \"import json;d=json.load\\(open\\('vocab.jsonld'\\)\\);print\\(json.dumps\\(d['@context']\\)[:600]\\)\")",
20
- "Bash(python3 -c \"import json;d=json.load\\(open\\('vocab.json'\\)\\);print\\(json.dumps\\(d['@context']\\)[:600]\\)\")",
21
- "Bash(node -e \"import\\('./index.js'\\).then\\(m=>{const a=m.generateAgent\\(\\);console.log\\('seeAlso:',a.did.seeAlso\\)}\\)\")",
22
- "WebFetch(domain:blocktrails.com)",
23
- "WebFetch(domain:aam.wtf)",
24
- "WebFetch(domain:www.npmjs.com)",
25
- "Bash(npm view *)",
26
- "Bash(python3 -c \"import json,sys; d=json.load\\(sys.stdin\\); print\\('name:',d.get\\('name'\\)\\); print\\('version:',d.get\\('version'\\)\\); print\\('description:',d.get\\('description'\\)\\); print\\('keywords:',d.get\\('keywords'\\)\\); print\\('homepage:',d.get\\('homepage'\\)\\); print\\('author:',d.get\\('author'\\)\\); print\\('bin:',d.get\\('bin'\\)\\); print\\('repository:',d.get\\('repository'\\)\\)\")",
27
- "WebFetch(domain:www.blocktrails.com)",
28
- "WebFetch(domain:blocktrails.org)",
29
- "Bash(git add *)",
30
- "Bash(git commit -q -m ' *)",
31
- "Bash(python3 -c \"import json;print\\(json.load\\(open\\('package.json'\\)\\)['version']\\)\")"
32
- ]
33
- }
34
- }