New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

socialdept/atp-support

Foundational utilities for AT Protocol packages in Laravel
2,789
Install
composer require socialdept/atp-support
Latest Version:v0.3.6
PHP:^8.3
Laravel:11 · 12 · 13
License:MIT
Last Updated:Nov 7, 2026
Links: GitHub  ·  Packagist
Maintainer: socialdept

ATP Support

Resolve DIDs, handles, and identities for AT Protocol in Laravel.



This Laravel package holds the shared AT Protocol plumbing that atp-client, atp-schema, atp-appview and other atp-* packages build on. It resolves DIDs and handles to DID documents and PDS endpoints with caching, validates DIDs, handles and NSIDs, parses AT-URIs, finds lexicons published through DNS, checks signatures against published keys, and talks to the Microcosm services Constellation and Slingshot. To learn all about it, head over to the documentation.

Here are a few short examples of what you can do.

Resolve a handle to a DID, or any actor to its PDS:

use SocialDept\AtpSupport\Facades\Resolver;

$did = Resolver::handleToDid('alice.bsky.social');
$pds = Resolver::resolvePds('alice.bsky.social');

Validate identifiers:

use SocialDept\AtpSupport\Identity;
use SocialDept\AtpSupport\Nsid;

Identity::isDid('did:plc:abc123');        // true
Identity::isHandle('alice.bsky.social');  // true
Nsid::isValid('app.bsky.feed.post');      // true

Parse an AT-URI:

use SocialDept\AtpSupport\AtUri;

$uri = AtUri::parse('at://did:plc:xyz/app.bsky.feed.post/3k4abc');

$uri->collection; // app.bsky.feed.post
$uri->rkey;       // 3k4abc

Count the likes on a post through Constellation:

use SocialDept\AtpSupport\Facades\Microcosm;

$likes = Microcosm::constellation()->getBacklinksCount(
    subject: 'at://did:plc:abc/app.bsky.feed.post/rk1',
    source: 'app.bsky.feed.like:subject.uri',
);

Documentation

You'll find the documentation on https://socialde.pt/docs/atp-support.

Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving it? Feel free to create an issue on GitHub.

Testing

vendor/bin/phpunit

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see LICENSE for more information.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

660,512,042 9,702
laravel/framework

The Laravel Framework.

617,629,957 34,997
laravel/tinker

Powerful REPL for the Laravel framework.

524,145,802 7,444
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

442,489,569 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

418,503,470 4,663

Version History

Version Released PHP Laravel License
v0.3.6 ^8.3 ^11.0|^12.0|^13.0 MIT
v0.3.5 ^8.3 ^11.0|^12.0|^13.0 MIT
v0.3.4 ^8.3 ^11.0|^12.0|^13.0 MIT
v0.3.3 ^8.3 ^11.0|^12.0|^13.0 MIT
v0.3.2 ^8.3 ^11.0|^12.0|^13.0 MIT