Skip to content

A nostr library, written in java, for generating, signing and publishing events.

License

Notifications You must be signed in to change notification settings

tcheeric/nostr-java

Repository files navigation

nostr-java

CI codecov GitHub release License: MIT

nostr-java is a Java SDK for the Nostr protocol. It provides utilities for creating, signing and publishing Nostr events to relays.

Requirements

  • Maven
  • Java 21+

Getting Started

Clone the repository and build the modules. Installing them locally allows you to add the artifacts as dependencies in your own projects:

$ git clone https://github.com/tcheeric/nostr-java.git
$ cd nostr-java
$ ./mvnw clean install

You can also consume published artifacts from our Maven repository instead of building from source.

Maven

<repositories>
  <repository>
    <id>nostr-java</id>
    <url>https://maven.398ja.xyz/releases</url>
  </repository>
</repositories>

<dependency>
  <groupId>xyz.tcheeric</groupId>
  <artifactId>nostr-java-api</artifactId>
  <version>[VERSION]</version>
</dependency>

Snapshot builds are available at https://maven.398ja.xyz/snapshots.

Gradle

repositories {
    maven { url 'https://maven.398ja.xyz/releases' }
}

dependencies {
    implementation 'xyz.tcheeric:nostr-java-api:[VERSION]'
}

Replace [VERSION] with the latest release number from the releases page.

See docs/CODEBASE_OVERVIEW.md for details about running tests and contributing.

Examples

Example usages are located in the nostr-java-examples module. Additional demonstrations can be found in nostr-client and SuperConductor.

Supported NIPs

The API currently implements the following NIPs:

About

A nostr library, written in java, for generating, signing and publishing events.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 14