Parse and validate AT Protocol Lexicons with DTO generation for Laravel
1<?php
2
3namespace SocialDept\AtpSchema\Contracts;
4
5use SocialDept\AtpSchema\Data\LexiconDocument;
6
7interface LexiconResolver
8{
9 /**
10 * Resolve NSID to Lexicon schema via DNS and XRPC.
11 */
12 public function resolve(string $nsid): LexiconDocument;
13
14 /**
15 * Perform DNS TXT lookup for _lexicon.{authority}.
16 */
17 public function lookupDns(string $authority): ?string;
18
19 /**
20 * Retrieve schema via XRPC from PDS.
21 */
22 public function retrieveSchema(string $pdsEndpoint, string $did, string $nsid): array;
23
24 /**
25 * Check if DNS resolution is enabled.
26 */
27 public function isEnabled(): bool;
28}