Skip to content

Add drand-client-php (PHP) to Client Libraries list #21

@dev404ai

Description

@dev404ai

New client library: drand-client-php

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!

/cc @nikkolasg @alanshaw @anorth

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions