Skip to content

Commit c4a3176

Browse files
committed
fix: update README example with profile details.
1 parent a063a72 commit c4a3176

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const didResolution = await resolver.resolve('did:nostr:124c0fa99407182ece5a24fa
2626
Here is example of the output from the resolve function:
2727

2828
```json
29+
{
2930
{
3031
"didDocument": {
3132
"@context": [
@@ -83,10 +84,26 @@ Here is example of the output from the resolve function:
8384
},
8485
"didResolutionMetadata": {
8586
"contentType": "application/did+ld+json",
86-
"retrieved": "2025-04-06T00:43:38.633Z"
87+
"retrieved": "2025-04-06T12:14:21.770Z"
8788
},
8889
"didDocumentMetadata": {
89-
"deactivated": false
90+
"created": 1732224363,
91+
"updated": 1732224363,
92+
"deactivated": false,
93+
"profile": {
94+
"about": "Developer of Blockcore Notes and Blockcore Wallet (Nostr browser extension).\nVoluntaryism. Decentralize everything.",
95+
"banner": "https://nostr.build/i/nostr.build_74ee63e85287e5b3351d757724e57d53d17b9f029bfad7d77dcb913b325727bb.png",
96+
"display_name": "SondreB",
97+
"lud16": "[email protected]",
98+
"name": "sondreb",
99+
"nip05": "[email protected]",
100+
"picture": "https://m.primal.net/OJWl.jpg",
101+
"website": "https://sondreb.com",
102+
"displayName": "SondreB",
103+
"pubkey": "17e2889fba01021d048a13fd0ba108ad31c38326295460c21e69c43fa8fbe515",
104+
"npub": "npub1zl3g38a6qypp6py2z07shggg45cu8qex992xpss7d8zrl28mu52s4cjajh",
105+
"created_at": 1732224363
106+
}
90107
}
91108
}
92109
```

test/identity.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ test('Create the resolver', async t => {
2929
t.assert(didResolution.didDocumentMetadata.profile !== null);
3030
t.assert(didResolution.didDocumentMetadata.profile.name == 'sondreb');
3131

32+
// Used to generate README example:
33+
// console.log(JSON.stringify(didResolution, null, 2));
34+
3235
didResolution = await resolver.resolve('null');
3336
t.assert(didResolution.didResolutionMetadata.error == 'invalidDid');
3437

0 commit comments

Comments
 (0)