-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
New client library: drand-client-php
- Repository: https://github.com/dev404ai/drand-client-php
- Package:
dev404ai/drand-client-php
(Composer) - Language / Runtime: PHP ≥ 8.2
- License: This project is dual-licensed under the MIT and Apache 2.0 licenses
- Maintainer: @dev404ai ([email protected])
Key features
- Pure-PHP HTTP client (no native extensions)
- Verifies BLS12-381 signatures against chain-hash
- Automatic fail-over & racing across League-of-Entropy endpoints
- PSR-18 HTTP client / PSR-17 factory agnostic
- Optional PSR-6 / PSR-16 caching layer
- 100 % PHPUnit coverage, PHPStan level max
use Drand\Client\Http\DrandHttpClient;
$drand = new DrandHttpClient(
'https://api.drand.sh',
// League-of-Entropy default chain hash
'8990e7a9aaed2ffed73dbd7092123d6f289930540d7651336225dc172e51b2ce'
);
$latest = $drand->latest();
printf("Round %d – %s\n", $latest->round, $latest->randomness);
We’d love to have this library listed under Developer → Client Libraries on docs.drand.love.
Happy to open a follow-up PR adding a row to developer/clients.md once approved.
Thanks for your time!
Metadata
Metadata
Assignees
Labels
No labels