PHPackages                             nostriphant/nip-19 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nostriphant/nip-19

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nostriphant/nip-19
==================

Nostr NIP-19 bech32-encoded entities in PHP

2.0(1y ago)22.8k↑43.3%2MITPHPPHP ^8.3

Since Nov 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/nostriphant/nip-19)[ Packagist](https://packagist.org/packages/nostriphant/nip-19)[ RSS](/packages/nostriphant-nip-19/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (1)Versions (4)Used By (2)

nip19
=====

[](#nip19)

Bech32 implementation in PHP

Usage
-----

[](#usage)

```
use nostriphant\NIP19\Bech32;

$bech32 = new Bech32('npub10elfcs4fr0l0r8af98jlmgdh9c8tcxjvz9qkw038js35mp4dma8qzvjptg');
$public_key_hex = $bech32();
$public_key_bech32 = (string) (Bech32::npub($public_key_hex));

$bech32 = new Bech32('nsec1vl029mgpspedva04g90vltkh6fvh240zqtv9k0t9af8935ke9laqsnlfe5');
$private_key_hex = $bech32();
$private_key_bech32 = (string) (Bech32::nsec($private_key_hex));

$public_key_hex = '7e7e9c42a91bfef19fa929e5fda1b72e0ebc1a4c1141673e2794234d86addf4e';
$relays = ['wss://relay.nostr.example.mydomain.example.com', 'wss://nostr.banana.com'];

$bech32 = Bech32::nprofile(pubkey: $public_key_hex, relays: $relays);

$bech32 = Bech32::naddr(
        pubkey: $public_key_hex,
        relays: $relays,
        kind: 30023,
        identifier: 'banana'
);

$bech32 = Bech32::nevent(
        id: $public_key_hex,
        relays: $relays,
        kind: 30023,
);

```

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

3

Last Release

575d ago

Major Versions

1.1 → 2.02024-11-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/448159?v=4)[Rik Meijer](/maintainers/rikmeijer)[@rikmeijer](https://github.com/rikmeijer)

---

Top Contributors

[![rikmeijer](https://avatars.githubusercontent.com/u/448159?v=4)](https://github.com/rikmeijer "rikmeijer (32 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/nostriphant-nip-19/health.svg)

```
[![Health](https://phpackages.com/badges/nostriphant-nip-19/health.svg)](https://phpackages.com/packages/nostriphant-nip-19)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
