PHPackages                             nostriphant/nip-59 - 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-59

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

nostriphant/nip-59
==================

Nostr NIP-59 implementation in PHP

3.0.1(1mo ago)01.8k2MITPHPPHP ^8.3CI failing

Since Nov 20Pushed 1mo ago1 watchersCompare

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

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

nip-59
======

[](#nip-59)

Nostr NIP-59 implementation in PHP

Usage
-----

[](#usage)

```
use nostriphant\NIP01\Key;
use nostriphant\NIP59\Gift;
use nostriphant\NIP59\Seal;
use nostriphant\NIP59\Rumor;

$sender_key = Key::fromHex('a71a415936f2dd70b777e5204c57e0df9a6dffef91b3c78c1aa24e54772e33c3');
$sender_pubkey = $sender_key(Key::public());
$recipient_key = Key::fromHex('6eeb5ad99e47115467d096e07c1c9b8b41768ab53465703f78017204adc5b0cc');
$recipient_pubkey = $recipient_key(Key::public());

// Message can be any event, using NIP-17 private direct message as an example
$message = new Rumor(
    pubkey: $sender_pubkey,
    created_at: time(),
    kind: 14,
    content: 'Hello!!',
    tags: [['p', $recipient_pubkey]]
);
$seal = Seal::close($sender_key, $recipient_pubkey, $message);
$gift = Gift::wrap($recipient_pubkey, $seal);

// sending ...

$seal = Gift::unwrap($recipient_key, $gift);
$private_message = Seal::open($recipient_key, $seal);

assert($private_message->content === 'Hello!!');

```

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance92

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

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 ~98 days

Recently: every ~65 days

Total

7

Last Release

37d ago

Major Versions

1.0 → 2.02025-10-15

2.1.0 → 3.0.02026-07-02

### 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 (14 commits)")

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[datacreativa/laravel-presentable

Create presenters for Eloquent Models

7226.0k](/packages/datacreativa-laravel-presentable)

PHPackages © 2026

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