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

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

nostriphant/nip-01
==================

Nostr NIP-01 implementation in PHP

2.4.1(1mo ago)01.8k6MITPHPPHP ^8.4CI failing

Since Nov 19Pushed 6d ago1 watchersCompare

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

READMEChangelogDependencies (6)Versions (25)Used By (6)

nip01
=====

[](#nip01)

Nostr NIP-01 implementation in PHP, currently this contains only the private/public key related code. This package requires the [secp256k1-nostr-php](https://github.com/1ma/secp256k1-nostr-php) extension to be installed. Follow their installation instructions first.

Key usage
---------

[](#key-usage)

```
use nostriphant\NIP01\Key;

$private_key = Key::fromHex('435790f13406085d153b10bd9e00a9f977e637f10ce37db5ccfc5d3440c12d6c');

$public_key = $private_key(Key::public());

$hash = hash('sha256', 'Hello World');
$signature = $private_key(Key::signer($hash));

if (Key::verify($public_key, $signature, $hash)) {
    echo 'Signature belongs to hash';
}

```

Message usage
-------------

[](#message-usage)

```
use nostriphant\NIP01\Message;

$message = Message::count(1);
print $message; // prints "['COUNT',1]"

```

```
use nostriphant\NIP01\Message;
use nostriphant\NIP01\Event;

$rumor = new Rumor(
    pubkey: $sender_pubkey,
    created_at: time(),
    kind: 14,
    content: 'Hello!!',
    tags: [['p', $recipient_pubkey]]
);
$message = Message::event($rumor($private_key));
print $message; // prints "['EVENT',{...}]"

```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance95

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Recently: every ~50 days

Total

24

Last Release

50d ago

Major Versions

1.9.2 → 2.0.02025-10-15

PHP version history (2 changes)1.0PHP ^8.3

1.9.2PHP ^8.4

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

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[web3p/ethereum-tx

Ethereum transaction library in PHP.

193365.7k25](/packages/web3p-ethereum-tx)[web3p/ethereum-util

A collection of utility functions for Ethereum written in PHP.

29451.6k26](/packages/web3p-ethereum-util)[swentel/nostr-php

Nostr helper library for PHP

6728.9k4](/packages/swentel-nostr-php)[digitaldonkey/ecverify

A library integrating Ethereum with typed PHP.

14117.3k2](/packages/digitaldonkey-ecverify)[minter/minter-php-bip-44

2312.4k9](/packages/minter-minter-php-bip-44)

PHPackages © 2026

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