Skip to content

Commit

Permalink
Update Identity.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kawax committed Nov 22, 2024
1 parent 2705b06 commit 2c18687
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Support/Identity.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function resolveHandle(?string $handle): ?string
}

// check DND TXT record
$record = app(DNS::class)->record('_atproto.'.$handle);
$record = DNS::record('_atproto.'.$handle);

$did = collect($record)->pluck('txt')->first(function ($txt) {
return Str::startsWith($txt, 'did=did:');
Expand All @@ -89,6 +89,10 @@ public function resolveHandle(?string $handle): ?string
}

/**
* ```
* $didDoc = Bluesky::identity()->resolveDID('did:plc:***')->json();
* ```
*
* @param string|null $did e.g. "did:plc:1234..." "did:web:alice.test"
* @return Response{id: string, alsoKnownAs: array, verificationMethod: array, service: array} didDoc
* @link https://plc.directory/did:plc:ewvi7nxzyoun6zhxrhs64oiz
Expand Down

0 comments on commit 2c18687

Please sign in to comment.