diff --git a/README.md b/README.md index 23abdfd43..0d5378b03 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,52 @@ Introducing the nostr-java library, a solution written in java for generating, s - Java 19+ ## Usage -To use the library in your project, add the following dependency to your pom.xml file: +To use the library in your project, add the following dependency to your pom.xml file. + +Define the value for the most recent version available: +```xml + + 0.6.1-SNAPSHOT + UTF-8 + +``` + +Add Jitpack to the repositories: +```xml + + + jitpack.io + https://jitpack.io + + +``` + +Finally add the dependencies: ```xml - - com.github.tcheeric.nostr-java - nostr-java-api - ${nostr.java.version} - + + nostr-java + nostr-java-api + ${nostr-java.version} + + + nostr-java + nostr-java-event + ${nostr-java.version} + + + nostr-java + nostr-java-id + ${nostr-java.version} + +``` + + +After this is possible to use the library. For example: +```java + Identity RECIPIENT = Identity.generateRandomIdentity(); + + System.out.println("NSEC: " + RECIPIENT.getPrivateKey().toBech32String()); + System.out.println("NPUB: " + RECIPIENT.getPublicKey().toBech32String()); ``` I recommend having a look at: