socialdept/atp-support
| 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 |
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
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v0.3.6 | ^8.3 | ^11.0| | MIT | |
| v0.3.5 | ^8.3 | ^11.0| | MIT | |
| v0.3.4 | ^8.3 | ^11.0| | MIT | |
| v0.3.3 | ^8.3 | ^11.0| | MIT | |
| v0.3.2 | ^8.3 | ^11.0| | MIT | |
| v0.3.1 | ^8.3 | ^11.0| | MIT | |
| v0.3.0 | ^8.2 | ^11.0| | MIT | |
| v0.2.0 | ^8.2 | ^11.0| | MIT | |
| v0.1.1 | ^8.2 | ^11.0| | MIT | |
| v0.1.0 | ^8.2 | ^11.0| | MIT |