From 2b9750de9fd138baaf2de0e48b5fe589e87e0d3f Mon Sep 17 00:00:00 2001 From: brito Date: Mon, 26 Aug 2024 22:40:37 +0200 Subject: [PATCH] Update README.md Adding detailed instructions for pom.xml --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 6 deletions(-) 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: