{"id":34702690,"url":"https://github.com/privkeyio/libnostr-c","last_synced_at":"2026-01-16T15:10:48.238Z","repository":{"id":308251133,"uuid":"1031589429","full_name":"privkeyio/libnostr-c","owner":"privkeyio","description":"Lightweight, portable C library for the Nostr protocol with native Lightning Network integration.","archived":false,"fork":false,"pushed_at":"2026-01-15T04:13:42.000Z","size":330,"stargazers_count":8,"open_issues_count":12,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-15T07:08:50.274Z","etag":null,"topics":["bitcoin","c","lightning-network","nostr"],"latest_commit_sha":null,"homepage":"https://privkey.substack.com/p/why-nostr-needs-a-c-library-lessons","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/privkeyio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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-08-04T03:22:35.000Z","updated_at":"2026-01-15T04:12:47.000Z","dependencies_parsed_at":"2026-01-15T02:06:30.106Z","dependency_job_id":null,"html_url":"https://github.com/privkeyio/libnostr-c","commit_stats":null,"previous_names":["privkeyio/libnostr-c"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/privkeyio/libnostr-c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privkeyio%2Flibnostr-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privkeyio%2Flibnostr-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privkeyio%2Flibnostr-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privkeyio%2Flibnostr-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/privkeyio","download_url":"https://codeload.github.com/privkeyio/libnostr-c/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privkeyio%2Flibnostr-c/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["bitcoin","c","lightning-network","nostr"],"created_at":"2025-12-24T22:55:15.965Z","updated_at":"2026-01-16T15:10:48.197Z","avatar_url":"https://github.com/privkeyio.png","language":"C","funding_links":[],"categories":["Libraries"],"sub_categories":["Client reviews and/or comparisons"],"readme":"# libnostr-c\n\n[![License: LGPL v2.1](https://img.shields.io/badge/License-LGPL%20v2.1-blue.svg)](https://www.gnu.org/licenses/lgpl-2.1)\n[![C99](https://img.shields.io/badge/C-99-blue.svg)](https://en.wikipedia.org/wiki/C99)\n\n*A lightweight, portable C library for the Nostr protocol with native Lightning Network integration*\n\n## What is libnostr-c?\nA high-performance C implementation of the Nostr protocol built for efficiency and minimal dependencies. libnostr-c provides core event management, modern NIP-44 encryption powered by noscrypt, Lightning zaps, WebSocket relay communication, and complete relay-side protocol support. Designed for both client applications and relay implementations, with a focus on security, portability, and embedded systems.\n\n## API Example\n```c\n// Client-side\nnostr_init();\nnostr_keypair_generate();\nnostr_event_create();\nnostr_event_sign();\nnostr_nip44_encrypt();\nnostr_relay_connect();\n\n// Relay-side (for relay implementations)\nnostr_client_msg_parse();\nnostr_filter_matches();\nnostr_event_validate_full();\nnostr_deletion_authorized();\nnostr_relay_msg_serialize();\nnostr_relay_info_serialize();\n```\n\n## Motivation\nBuilding nostr applications in C requires reliable, efficient cryptographic operations and protocol handling. libnostr-c provides a complete implementation with modern NIP-44 encryption, Lightning integration, and minimal resource requirements. Built with security-first design principles and optimized for both desktop and embedded systems.\n\n## Platform Support\nThe following table lists supported platforms and cryptographic backends:\n\n| Platform | Crypto Backend | Notes | CI Status |\n| -------- | -------------- | ----- | --------- |\n| Linux    | noscrypt, secp256k1 | GCC/Clang | ✅ Tested |\n| macOS    | noscrypt, secp256k1 | Clang | ✅ Tested |\n| Windows  | noscrypt, secp256k1 | MSVC | ✅ Tested |\n| ESP-IDF  | noscrypt, mbedtls | ESP32/S2/S3/C3/C6, v5.0+ | ✅ Tested |\n\n## Getting started\nPlease use the following links to obtain packages and extended documentation.\n\n[__Documentation__](docs/API.md)  \n[__Examples__](examples/)  \n[__Performance Analysis__](docs/PERFORMANCE.md)  \n\n### Super quick start\nPrerequisites:\n- CMake 3.16+, C99 compiler, OpenSSL\n- secp256k1, libcjson, libwebsockets (see [BUILDING.md](docs/BUILDING.md))\n\n```shell\ngit clone https://github.com/privkeyio/libnostr-c.git\ncd libnostr-c\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake -j$(nproc)\nsudo make install\n```\n\nFor detailed installation instructions, dependency management, and platform-specific setup, see [docs/BUILDING.md](docs/BUILDING.md).\n\n## Notes\n#### Builds\nAutomated builds and releases are available through GitHub Actions CI/CD.\n\n#### Features\nlibnostr-c supports modular compilation - build only what you need:\n- Core NIPs (01, 02, 13, 19, 57) enabled by default\n- Optional NIPs (04, 09, 11, 17, 40, 44, 46, 47, 59) via feature flags\n- NIP-11 relay information document for serving relay metadata\n- Relay protocol support for building relay implementations\n- Modern noscrypt backend provides NIP-44 encryption\n- Fallback to secp256k1 for basic operations\n\n## Projects Using libnostr-c\n\n- [keep-esp32](https://github.com/privkeyio/keep-esp32) - Air-gapped ESP32-S3 FROST threshold signing device with Nostr DKG coordination\n- [wisp-esp32](https://github.com/privkeyio/wisp-esp32) - Minimal ESP32-S3 Nostr relay with 21-day ephemeral storage\n- [whisper](https://github.com/privkeyio/whisper) - Encrypted DM pipe for Nostr using NIP-17 + NIP-44, Unix-style CLI\n- [vain](https://github.com/privkeyio/vain) - High-performance vanity Nostr public key miner\n\n## License\nThe software in this repository is licensed under MIT. See the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\nThis project is powered by [noscrypt](https://github.com/VnUgE/noscrypt) for high-performance cryptographic operations and NIP-44 encryption.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprivkeyio%2Flibnostr-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprivkeyio%2Flibnostr-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprivkeyio%2Flibnostr-c/lists"}