Download the PHP package socialdept/atp-support without Composer

On this page you can find all versions of the php package socialdept/atp-support. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package atp-support

ATP Support

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



What is ATP Support?

ATP Support is the foundational Laravel package for the SocialDept AT Protocol ecosystem. It provides DID and handle resolution, identity validation, AT-URI parsing, NSID utilities, and shared configuration used by all other atp-* packages.

If you're building anything on AT Protocol with Laravel, this is your starting point.

Why use ATP Support?

Quick Example

Installation

Publish the configuration:

Configuration

All shared AT Protocol settings live in config/atp-support.php:

Resolution often runs while a user waits, for example verifying a service auth token or starting a login. timeout bounds a whole request and connect_timeout bounds connecting, so an unreachable host fails in two seconds rather than holding the request. Both apply to every DID and handle resolver and, for connecting, to the Microcosm clients.

Other atp-* packages read shared values like public_api directly from this config.

Usage

Resolving Identities

The Resolver facade is the main entry point for all resolution operations:

Caching

All resolutions are cached by default with configurable TTLs. You can bypass or clear the cache:

Validating Identities

The Identity class provides static validation methods:

Parsing AT-URIs

The AtUri value object parses the at:// URI format used throughout AT Protocol:

Working with NSIDs

Namespace Identifiers are the reversed-domain notation used for AT Protocol collections and methods:

DNS Lexicon Resolution

Discover lexicon schemas published via DNS TXT records:

fetch() and fetchFrom() answer null for a lexicon that is not published, and throw LexiconResolutionException when the authority cannot be read: its DID names no PDS, the PDS is down, or it returns something that is not a schema. Keep the two apart before acting on a missing schema.

Resolution is not hierarchical. Each authority needs its own TXT record, so com.example.feed.post is looked up at _lexicon.feed.example.com and is not covered by com.example's. Pass a dnsLookup callable to the constructor to replace dns_get_record in tests.

Microcosm

Microcosm.blue provides protocol-level content discovery APIs for AT Protocol. ATP Support includes HTTP clients for two Microcosm services:

Constellation (Backlinks)

The source parameter uses collection:path format, where the path is the dot-notation location of the linking field within the record.

Slingshot (Record Cache)

Errors

Both clients throw MicrocosmException. When the service answered with an XRPC error, error names it and status is the HTTP status, so a missing record is told apart from a service that is down:

Microcosm Facade

Access both clients through a single facade:

Microcosm Configuration

Add these environment variables to customize endpoints:

Custom DID Resolvers

Register custom resolvers for additional DID methods:

API Reference

Facade Methods

Method Description
Resolver::resolveDid($did) Resolve DID to DidDocument
Resolver::handleToDid($handle) Convert handle to DID string
Resolver::resolveHandle($handle) Resolve handle to DidDocument
Resolver::resolveIdentity($actor) Auto-detect and resolve DID or handle
Resolver::resolvePds($actor) Get PDS endpoint for DID or handle
Resolver::clearDidCache($did) Clear cached DID data
Resolver::clearHandleCache($handle) Clear cached handle data
Resolver::clearPdsCache($actor) Clear cached PDS data
Resolver::clearCache() Clear all cached data

Value Objects

Class Description
AtUri Immutable AT-URI parser (at://did/collection/rkey)
Nsid Immutable Namespace Identifier
DidDocument Resolved DID Document with PDS and handle access

Microcosm

Class Description
ConstellationClient Backlink discovery and link counting via Constellation
SlingshotClient Fast record and identity resolution via Slingshot
Microcosm Service class wrapping both clients
BacklinkReference Data object: did, collection, rkey, uri()
GetBacklinksResponse Data object: total, records, cursor
GetRecordResponse Data object: uri, cid, value
MiniDoc Data object: did, handle, pds, signingKey
LinkSummary Data object: links, forCollection(), total()
MicrocosmException Exception for Microcosm request failures

Validation

Method Description
Identity::isDid($value) Validate DID format
Identity::isHandle($value) Validate handle format
Identity::isPlcDid($did) Check for did:plc method
Identity::isWebDid($did) Check for did:web method
Identity::extractDidMethod($did) Get method from DID string
Nsid::isValid($nsid) Validate NSID format

Exceptions

Exception Description
ResolverException Base exception for all resolution errors
DidResolutionException DID resolution failures
HandleResolutionException Handle resolution failures

Requirements

Resources

Support & Contributing

Found a bug or have a feature request? Open an issue.

Want to contribute? We'd love your help! Check out the contribution guidelines.

Credits

License

ATP Support is open-source software licensed under the MIT license.


Built for the Atmosphere • By Social Dept.


All versions of atp-support with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/cache Version ^11.0|^12.0|^13.0
guzzlehttp/guzzle Version ^7.5|^8.0
phpseclib/phpseclib Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package socialdept/atp-support contains the following files

Loading the files please wait ...