···11+MIT License
22+33+Copyright (c) 2025 nate nowack
44+55+Permission is hereby granted, free of charge, to any person obtaining a copy
66+of this software and associated documentation files (the "Software"), to deal
77+in the Software without restriction, including without limitation the rights
88+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99+copies of the Software, and to permit persons to whom the Software is
1010+furnished to do so, subject to the following conditions:
1111+1212+The above copyright notice and this permission notice shall be included in all
1313+copies or substantial portions of the Software.
1414+1515+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121+SOFTWARE.
+27-16
README.md
···55## install
6677```bash
88-zig fetch --save https://tangled.org/zzstoatzz.io/zat/archive/main
88+zig fetch --save https://tangled.sh/zzstoatzz.io/zat/archive/main
99```
10101111then in `build.zig`:
···17171818## what's here
19192020-### string primitives
2121-2222-parsing and validation for atproto string identifiers:
2020+<details>
2121+<summary><strong>string primitives</strong> - parsing and validation for atproto identifiers</summary>
23222423- **Tid** - timestamp identifiers (base32-sortable)
2524- **Did** - decentralized identifiers
···3837}
3938```
40394141-### did resolution
4040+</details>
42414343-resolve `did:plc` and `did:web` identifiers to their documents:
4242+<details>
4343+<summary><strong>did resolution</strong> - resolve did:plc and did:web to documents</summary>
44444545```zig
4646var resolver = zat.DidResolver.init(allocator);
···5555const key = doc.signingKey(); // verification method
5656```
57575858-### handle resolution
5858+</details>
59596060-resolve handles to DIDs via HTTP well-known:
6060+<details>
6161+<summary><strong>handle resolution</strong> - resolve handles to DIDs via HTTP well-known</summary>
61626263```zig
6364var resolver = zat.HandleResolver.init(allocator);
···6970// did = "did:plc:z72i7hdynmk6r22z27h6tvur"
7071```
71727272-### xrpc client
7373+</details>
73747474-call AT Protocol endpoints:
7575+<details>
7676+<summary><strong>xrpc client</strong> - call AT Protocol endpoints</summary>
75777678```zig
7779var client = zat.XrpcClient.init(allocator, "https://bsky.social");
···8890}
8991```
90929191-### json helpers
9393+</details>
92949393-navigate nested json without verbose if-chains:
9595+<details>
9696+<summary><strong>json helpers</strong> - navigate nested json without verbose if-chains</summary>
94979598```zig
9699// runtime paths for one-offs:
···108111const post = try zat.json.extractAt(FeedPost, allocator, value, .{"post"});
109112```
110113111111-### jwt verification
114114+</details>
112115113113-verify service auth tokens:
116116+<details>
117117+<summary><strong>jwt verification</strong> - verify service auth tokens</summary>
114118115119```zig
116120var jwt = try zat.Jwt.parse(allocator, token_string);
···126130127131supports ES256 (P-256) and ES256K (secp256k1) signing algorithms.
128132129129-### multibase decoding
133133+</details>
130134131131-decode public keys from DID documents:
135135+<details>
136136+<summary><strong>multibase decoding</strong> - decode public keys from DID documents</summary>
132137133138```zig
134139const key_bytes = try zat.multibase.decode(allocator, "zQ3sh...");
···139144// parsed.raw: 33-byte compressed public key
140145```
141146147147+</details>
148148+142149## specs
143150144151validation follows [atproto.com/specs](https://atproto.com/specs/atp).
152152+153153+## license
154154+155155+MIT