Laravel AT Protocol Client (alpha & unstable)
1<?php
2
3namespace SocialDept\AtpClient\Data\Responses\Atproto\Identity;
4
5use Illuminate\Contracts\Support\Arrayable;
6
7/**
8 * @implements Arrayable<string, string>
9 */
10class ResolveHandleResponse implements Arrayable
11{
12 public function __construct(
13 public readonly string $did,
14 ) {}
15
16 public static function fromArray(array $data): self
17 {
18 return new self(
19 did: $data['did'],
20 );
21 }
22
23 public function toArray(): array
24 {
25 return [
26 'did' => $this->did,
27 ];
28 }
29}