Introducing the nostr-java library, a solution written in java for generating, signing, and publishing nostr events to relays.
- Maven
- Java 19+
To use the library in your project, add the following dependency to your pom.xml file:
<dependency>
<groupId>com.github.tcheeric.nostr-java</groupId>
<artifactId>nostr-java-api</artifactId>
<version>${nostr.java.version}</version>
</dependency>
I recommend having a look at:
- nostr-example module
- SuperConductor nostr relay
for simple examples on how to use the library.
The following NIPs are supported by the API out-of-the-box:
- NIP-1
- NIP-2
- NIP-3
- NIP-4
- NIP-5
- NIP-8
- NIP-9
- NIP-12
- NIP-14
- NIP-15
- NIP-20
- NIP-23
- NIP-25
- NIP-28
- NIP-30
- NIP-32
- NIP-40
- NIP-42
- NIP-44
- NIP-46
- NIP-57
- NIP-99
- Nostr Public Channel: nostr:nevent1qqszqdmxg26sehmnyrcu2ler8azz6wyj6fh0qg3ad5fnnm6xfqqvhzcppamhxue69uhkummnw3ezumt0d5pzpl7nwh45p66gvet2q28dhjpcyh6clux4cjsm5gh7waza9pzjnmgglv06ew