Download the PHP package socialdept/atp-cbor without Composer

On this page you can find all versions of the php package socialdept/atp-cbor. 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-cbor

CBOR, CAR, and CID binary encoding for AT Protocol in PHP.



What is ATP CBOR?

ATP CBOR is a standalone PHP library for decoding CBOR (Concise Binary Object Representation), CAR (Content Addressable aRchive), and CID (Content Identifier) binary data from the AT Protocol network. It powers the binary decoding layer used by firehose consumers and repository loaders across the Social Dept. AT Protocol packages.

No Laravel dependency required — this is a pure PHP package.

Quick Example

Installation

Requires the gmp PHP extension for large integer handling.

Usage

Decoding CBOR

The CBOR facade provides three methods for decoding binary CBOR data:

Supports all CBOR major types including unsigned/negative integers, byte strings, text strings, arrays, maps, tagged values (including DAG-CBOR tag 42 for CID links), and special values (booleans, null, floats).

Parsing CAR Archives

CAR (Content Addressable aRchive) files contain blocks of CBOR data indexed by CID:

For memory-efficient processing, use the BlockReader generator directly:

Working with CIDs

Content Identifiers can be parsed from strings or binary data:

Low-level Binary Reading

For custom binary parsing, use the Reader and Varint utilities:

API Reference

Core Facades

Class Method Description
CBOR decode(string $data) Decode complete CBOR data
CBOR decodeFirst(string $data) Decode first item, return remaining
CBOR decodeAll(string $data) Decode all sequential items
CAR blockMap(string $data, ?string $did) Parse CAR into CID => block map

Value Objects

Class Description
CID Immutable Content Identifier (v0 and v1)

Readers

Class Description
BlockReader Generator-based CAR block reader
RecordExtractor AT Protocol MST record walker
Decoder RFC 8949 CBOR decoder with DAG-CBOR
Reader Stream-style binary data reader
Varint Variable-length integer decoder

Supported Standards

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 CBOR is open-source software licensed under the MIT license.


Built for the Atmosphere • By Social Dept.


All versions of atp-cbor with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-gmp Version *
simplito/elliptic-php Version ^1.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-cbor contains the following files

Loading the files please wait ...