Search by

socialdept / atp-support

socialdept

Foundational utilities for AT Protocol packages in Laravel

Package info

github.com/socialdept/atp-support

pkg:composer/socialdept/atp-support

Statistics

Installs: 2 883

Dependents: 6

Suggesters: 0

Stars: 0

Open Issues: 0

v0.3.6 2026-10-21 13:06 UTC

This package is auto-updated.

Last update: 2026-11-07 08:20:16 UTC


README

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.