create-agent 0.0.17 → 0.0.18

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.
@@ -0,0 +1,18 @@
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
+ ]
17
+ }
18
+ }
package/README.md CHANGED
@@ -46,7 +46,7 @@ The tool outputs a spec-compliant DID document to `stdout`:
46
46
  ```json
47
47
  {
48
48
  "@context": [
49
- "https://w3id.org/did",
49
+ "https://www.w3.org/ns/cid/v1",
50
50
  "https://w3id.org/nostr/context"
51
51
  ],
52
52
  "id": "did:nostr:dd82687ee5a352c6d6de337bce53f150ca1567f3861475c74e7da62695931d23",
package/index.js CHANGED
@@ -25,7 +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://w3id.org/did",
28
+ "https://www.w3.org/ns/cid/v1",
29
29
  "https://w3id.org/nostr/context"
30
30
  ],
31
31
  "id": `did:nostr:${pubkey}`,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-agent",
3
3
  "type": "module",
4
- "version": "0.0.17",
4
+ "version": "0.0.18",
5
5
  "description": "create an agent",
6
6
  "scripts": {
7
7
  "test": "node --test"
@@ -43,12 +43,12 @@ 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
+ 'https://www.w3.org/ns/cid/v1',
47
47
  'https://w3id.org/nostr/context'
48
48
  ])
49
49
  assert.strictEqual(did.id, `did:nostr:${pubkey}`)
50
50
  assert.ok(Array.isArray(did.verificationMethod))
51
- assert.strictEqual(did.verificationMethod[0].type, 'SchnorrVerification2025')
51
+ assert.strictEqual(did.verificationMethod[0].type, 'Multikey')
52
52
  assert.deepStrictEqual(did.authentication, ['#key1'])
53
53
  assert.deepStrictEqual(did.assertionMethod, ['#key1'])
54
54
  assert.deepStrictEqual(did.service, [])