{"id":42816019,"url":"https://github.com/fedi-e2ee/pkd-client-php","last_synced_at":"2026-02-16T00:01:17.220Z","repository":{"id":319476187,"uuid":"1078560729","full_name":"fedi-e2ee/pkd-client-php","owner":"fedi-e2ee","description":"PHP Client for the Public Key Directory","archived":false,"fork":false,"pushed_at":"2026-02-13T02:19:09.000Z","size":241,"stargazers_count":8,"open_issues_count":2,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-13T06:32:45.102Z","etag":null,"topics":["client-side","fediverse","library","php","public-key-directory"],"latest_commit_sha":null,"homepage":"https://publickey.directory","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fedi-e2ee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-18T00:13:29.000Z","updated_at":"2026-02-13T02:18:31.000Z","dependencies_parsed_at":"2026-02-16T00:00:56.931Z","dependency_job_id":null,"html_url":"https://github.com/fedi-e2ee/pkd-client-php","commit_stats":null,"previous_names":["fedi-e2ee/pkd-client-php"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/fedi-e2ee/pkd-client-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedi-e2ee%2Fpkd-client-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedi-e2ee%2Fpkd-client-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedi-e2ee%2Fpkd-client-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedi-e2ee%2Fpkd-client-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fedi-e2ee","download_url":"https://codeload.github.com/fedi-e2ee/pkd-client-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedi-e2ee%2Fpkd-client-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29494175,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T00:00:57.352Z","status":"ssl_error","status_checked_at":"2026-02-15T23:56:34.338Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client-side","fediverse","library","php","public-key-directory"],"created_at":"2026-01-30T06:27:19.613Z","updated_at":"2026-02-16T00:01:17.183Z","avatar_url":"https://github.com/fedi-e2ee.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fediverse Public Key Directory PHP Client\n\n[![CI](https://github.com/fedi-e2ee/pkd-client-php/actions/workflows/ci.yml/badge.svg)](https://github.com/fedi-e2ee/pkd-client-php/actions/workflows/ci.yml)\n[![Psalm](https://github.com/fedi-e2ee/pkd-client-php/actions/workflows/psalm.yml/badge.svg)](https://github.com/fedi-e2ee/pkd-client-php/actions/workflows/psalm.yml)\n[![PHPStan](https://github.com/fedi-e2ee/pkd-client-php/actions/workflows/phpstan.yml/badge.svg)](https://github.com/fedi-e2ee/pkd-client-php/actions/workflows/phpstan.yml)\n[![Fuzzing](https://github.com/fedi-e2ee/pkd-client-php/actions/workflows/fuzz.yml/badge.svg)](https://github.com/fedi-e2ee/pkd-client-php/actions/workflows/fuzz.yml)\n[![Mutation](https://github.com/fedi-e2ee/pkd-client-php/actions/workflows/infection.yml/badge.svg)](https://github.com/fedi-e2ee/pkd-client-php/actions/workflows/infection.yml)\n[![Integration Tests](https://github.com/fedi-e2ee/pkd-client-php/actions/workflows/integration.yml/badge.svg)](https://github.com/fedi-e2ee/pkd-client-php/actions/workflows/integration.yml)\n[![Semgrep](https://github.com/fedi-e2ee/pkd-client-php/actions/workflows/semgrep.yml/badge.svg)](https://github.com/fedi-e2ee/pkd-client-php/actions/workflows/semgrep.yml)\n\nThis is an implementation of the client-side component of the\n[Public Key Directory specification](https://github.com/fedi-e2ee/public-key-directory-specification), written in PHP.\nSee [`fedi-e2ee/pkd-server-php`](https://github.com/fedi-e2ee/pkd-server-php) for the reference implementation of the\nserver-side component written in PHP.\n\n## Installation\n\n```terminal\ncomposer require fedi-e2ee/pkd-client\n```\n\n## Usage\n\n```php\n\u003c?php\nuse FediE2EE\\PKD\\ReadOnlyClient;\nuse FediE2EE\\PKD\\Crypto\\PublicKey;\n\n// Setup client\n$directoryPublicKey = new PublicKey('public key goes here', 'ed25519');\n$client = new ReadonlyClient('https://pkd.example.com', $directoryPublicKey);\n\n// Fetch public keys with Merkle proof verification (recommended)\n$publicKeys = $client-\u003efetchPublicKeys('soatok@furry.engineer');\nvar_dump($publicKeys); // array\u003cVerifiedPublicKey\u003e\n\n// Fetch auxiliary data with Merkle proof verification (recommended)\n// 'age' is an alias for the latest version; i.e., 'age-v1'.\n$auxData = $client-\u003efetchAuxData('soatok@furry.engineer', 'age');\nvar_dump($auxData); // array\u003cVerifiedAuxData\u003e\n```\n\n### Verified Methods (Recommended)\n\nThe `fetch*()` methods verify Merkle inclusion proofs, ensuring each key or auxiliary data item is properly committed to\nthe PKD's append-only Merkle tree:\n\n* `fetchPublicKeys(string $actor)` → `VerifiedPublicKey[]`\n* `fetchAuxData(string $actor, string $auxDataType)` → `VerifiedAuxData[]`\n\nThese methods throw `ClientException` if proof verification fails.\n\n### Unverified Methods (For Troubleshooting Only)\n\n\u003e [!WARNING]\n\u003e These APIs do not validate Merkle inclusion proofs. Use with caution!\n\nIf you need to fetch public keys or auxiliary data without verifying the Merkle inclusion proofs, these methods are \navailable too:\n\n* `fetchUnverifiedPublicKeys(string $actor)` → `PublicKey[]`\n* `fetchUnverifiedAuxData(string $actor, string $auxDataType)` → `AuxData[]`\n\n### Hash Function Validation\n\nThe verified methods accept an optional `$hashFunc` parameter (default: `'sha256'`). Only cryptographically secure hash\nfunctions are accepted: `sha256`, `sha384`, `sha512`, and `blake2b`.\n\nAttempting to use any other hash function will throw a `ClientException`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedi-e2ee%2Fpkd-client-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffedi-e2ee%2Fpkd-client-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedi-e2ee%2Fpkd-client-php/lists"}