From 4cf9db28c7421320d549a9e6cf0eeaa67c5b0ba0 Mon Sep 17 00:00:00 2001 From: tcheeric Date: Tue, 24 Feb 2026 23:22:54 +0000 Subject: [PATCH 1/3] feat(deps): migrate nostr-java from 1.3.0 to 2.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update dependency artifacts to match nostr-java 2.0.0 module restructure: - nostr-java-api, nostr-java-id, nostr-java-crypto → nostr-java-identity, nostr-java-core Co-Authored-By: Claude Opus 4.6 --- bottin-core/pom.xml | 2 +- bottin-spring-boot-starter/pom.xml | 2 +- pom.xml | 11 +++-------- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/bottin-core/pom.xml b/bottin-core/pom.xml index 89d091c..664e59d 100644 --- a/bottin-core/pom.xml +++ b/bottin-core/pom.xml @@ -21,7 +21,7 @@ xyz.tcheeric - nostr-java-id + nostr-java-identity diff --git a/bottin-spring-boot-starter/pom.xml b/bottin-spring-boot-starter/pom.xml index 91313a1..42b11b2 100644 --- a/bottin-spring-boot-starter/pom.xml +++ b/bottin-spring-boot-starter/pom.xml @@ -48,7 +48,7 @@ xyz.tcheeric - nostr-java-id + nostr-java-identity diff --git a/pom.xml b/pom.xml index d6d81e6..cb25810 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ 0.1.0 - 1.3.0 + 2.0.0 10.10.0 @@ -171,17 +171,12 @@ xyz.tcheeric - nostr-java-api + nostr-java-identity ${nostr-java.version} xyz.tcheeric - nostr-java-id - ${nostr-java.version} - - - xyz.tcheeric - nostr-java-crypto + nostr-java-core ${nostr-java.version} From bc57ce3acdef97bd2a2d77e407c6ca120310f1d5 Mon Sep 17 00:00:00 2001 From: tcheeric Date: Wed, 25 Feb 2026 01:31:00 +0000 Subject: [PATCH 2/3] refactor(deps): remove nostr-java dependency Replace Identity.generateRandomIdentity() with SecureRandom + HexFormat for generating random 32-byte hex pubkey placeholders. The nostr-java dependency was heavyweight for what amounts to generating random bytes. Co-Authored-By: Claude Opus 4.6 --- bottin-core/pom.xml | 6 ------ bottin-spring-boot-starter/pom.xml | 6 ------ .../bottin/starter/PersistentAccountManager.java | 1 - .../bottin/starter/PersistentNip05Manager.java | 10 ++++++---- pom.xml | 14 -------------- 5 files changed, 6 insertions(+), 31 deletions(-) diff --git a/bottin-core/pom.xml b/bottin-core/pom.xml index 664e59d..b4cedec 100644 --- a/bottin-core/pom.xml +++ b/bottin-core/pom.xml @@ -18,12 +18,6 @@ Core domain models, interfaces, and exceptions for Bottin NIP-05 registry - - - xyz.tcheeric - nostr-java-identity - - com.fasterxml.jackson.core diff --git a/bottin-spring-boot-starter/pom.xml b/bottin-spring-boot-starter/pom.xml index 42b11b2..343cf63 100644 --- a/bottin-spring-boot-starter/pom.xml +++ b/bottin-spring-boot-starter/pom.xml @@ -45,12 +45,6 @@ ${nsecbunker-java.version} - - - xyz.tcheeric - nostr-java-identity - - org.springframework.boot diff --git a/bottin-spring-boot-starter/src/main/java/xyz/tcheeric/bottin/starter/PersistentAccountManager.java b/bottin-spring-boot-starter/src/main/java/xyz/tcheeric/bottin/starter/PersistentAccountManager.java index f0aa990..3e9da9d 100644 --- a/bottin-spring-boot-starter/src/main/java/xyz/tcheeric/bottin/starter/PersistentAccountManager.java +++ b/bottin-spring-boot-starter/src/main/java/xyz/tcheeric/bottin/starter/PersistentAccountManager.java @@ -45,7 +45,6 @@ public CompletableFuture registerAccount(String usern log.debug("persistent_account_register username={} domain={}", username, domain); // For bottin, registerAccount and createAccount are equivalent - // since key management is handled by nostr-java return createAccount(username, domain); } diff --git a/bottin-spring-boot-starter/src/main/java/xyz/tcheeric/bottin/starter/PersistentNip05Manager.java b/bottin-spring-boot-starter/src/main/java/xyz/tcheeric/bottin/starter/PersistentNip05Manager.java index 90003a3..034d58e 100644 --- a/bottin-spring-boot-starter/src/main/java/xyz/tcheeric/bottin/starter/PersistentNip05Manager.java +++ b/bottin-spring-boot-starter/src/main/java/xyz/tcheeric/bottin/starter/PersistentNip05Manager.java @@ -4,7 +4,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import nostr.id.Identity; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import xyz.tcheeric.bottin.core.exception.DomainNotFoundException; @@ -17,7 +16,9 @@ import xyz.tcheeric.nsecbunker.account.nip05.Nip05Manager; import xyz.tcheeric.nsecbunker.account.nip05.Nip05Record; +import java.security.SecureRandom; import java.util.HashMap; +import java.util.HexFormat; import java.util.List; import java.util.Map; import java.util.Optional; @@ -60,9 +61,10 @@ public CompletableFuture setupNip05(String username, String domain) throw new Nip05RecordExistsException(normalizedUsername + "@" + normalizedDomain); } - // Generate new identity using nostr-java - Identity identity = Identity.generateRandomIdentity(); - String pubkey = identity.getPublicKey().toString(); + // Generate a random 32-byte public key placeholder + byte[] randomBytes = new byte[32]; + new SecureRandom().nextBytes(randomBytes); + String pubkey = HexFormat.of().formatHex(randomBytes); // Create and persist record Nip05RecordEntity entity = Nip05RecordEntity.builder() diff --git a/pom.xml b/pom.xml index cb25810..a8088bc 100644 --- a/pom.xml +++ b/pom.xml @@ -57,8 +57,6 @@ 0.1.0 - 2.0.0 - 10.10.0 2.2.224 @@ -168,18 +166,6 @@ ${nsecbunker-java.version} - - - xyz.tcheeric - nostr-java-identity - ${nostr-java.version} - - - xyz.tcheeric - nostr-java-core - ${nostr-java.version} - - com.fasterxml.jackson From 123ea280954a5485bb764bd09ed7cd3d8db4d69f Mon Sep 17 00:00:00 2001 From: tcheeric Date: Wed, 25 Feb 2026 01:51:01 +0000 Subject: [PATCH 3/3] chore(release): bump version to 0.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Projects updated: - bottin (all modules): 0.2.0 → 0.2.1 (patch) Changes include: - Removed nostr-java dependency, replaced with SecureRandom + HexFormat Co-Authored-By: Claude Opus 4.6 --- CHANGELOG.md | 8 +++++++- bottin-admin-ui/pom.xml | 2 +- bottin-core/pom.xml | 2 +- bottin-persistence/pom.xml | 2 +- bottin-service/pom.xml | 2 +- bottin-spring-boot-starter/pom.xml | 2 +- bottin-tests/bottin-e2e/pom.xml | 2 +- bottin-tests/bottin-it/pom.xml | 2 +- bottin-tests/pom.xml | 2 +- bottin-verification/pom.xml | 2 +- bottin-web/pom.xml | 2 +- pom.xml | 2 +- 12 files changed, 18 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 776cc7d..4a58886 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.2.1] - 2026-02-25 + +### Removed +- Removed nostr-java dependency; replaced `Identity.generateRandomIdentity()` with `SecureRandom` + `HexFormat` + ## [0.2.0] - 2026-01-30 ### Added @@ -43,6 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Spring Boot starter for easy integration - Docker support with Jib -[Unreleased]: https://github.com/tcheeric/bottin/compare/v0.2.0...HEAD +[Unreleased]: https://github.com/tcheeric/bottin/compare/v0.2.1...HEAD +[0.2.1]: https://github.com/tcheeric/bottin/compare/v0.2.0...v0.2.1 [0.2.0]: https://github.com/tcheeric/bottin/compare/v0.1.0...v0.2.0 [0.1.0]: https://github.com/tcheeric/bottin/releases/tag/v0.1.0 diff --git a/bottin-admin-ui/pom.xml b/bottin-admin-ui/pom.xml index a8969f7..efa9356 100644 --- a/bottin-admin-ui/pom.xml +++ b/bottin-admin-ui/pom.xml @@ -8,7 +8,7 @@ xyz.tcheeric bottin - 0.2.0 + 0.2.1 bottin-admin-ui diff --git a/bottin-core/pom.xml b/bottin-core/pom.xml index b4cedec..73cd6d6 100644 --- a/bottin-core/pom.xml +++ b/bottin-core/pom.xml @@ -8,7 +8,7 @@ xyz.tcheeric bottin - 0.2.0 + 0.2.1 bottin-core diff --git a/bottin-persistence/pom.xml b/bottin-persistence/pom.xml index 1499f39..3450888 100644 --- a/bottin-persistence/pom.xml +++ b/bottin-persistence/pom.xml @@ -8,7 +8,7 @@ xyz.tcheeric bottin - 0.2.0 + 0.2.1 bottin-persistence diff --git a/bottin-service/pom.xml b/bottin-service/pom.xml index 3e55090..6774bbd 100644 --- a/bottin-service/pom.xml +++ b/bottin-service/pom.xml @@ -8,7 +8,7 @@ xyz.tcheeric bottin - 0.2.0 + 0.2.1 bottin-service diff --git a/bottin-spring-boot-starter/pom.xml b/bottin-spring-boot-starter/pom.xml index 343cf63..3af8469 100644 --- a/bottin-spring-boot-starter/pom.xml +++ b/bottin-spring-boot-starter/pom.xml @@ -8,7 +8,7 @@ xyz.tcheeric bottin - 0.2.0 + 0.2.1 bottin-spring-boot-starter diff --git a/bottin-tests/bottin-e2e/pom.xml b/bottin-tests/bottin-e2e/pom.xml index 209f3a9..7dd2c27 100644 --- a/bottin-tests/bottin-e2e/pom.xml +++ b/bottin-tests/bottin-e2e/pom.xml @@ -8,7 +8,7 @@ xyz.tcheeric bottin-tests - 0.2.0 + 0.2.1 bottin-e2e diff --git a/bottin-tests/bottin-it/pom.xml b/bottin-tests/bottin-it/pom.xml index b4206ed..6ca8076 100644 --- a/bottin-tests/bottin-it/pom.xml +++ b/bottin-tests/bottin-it/pom.xml @@ -8,7 +8,7 @@ xyz.tcheeric bottin-tests - 0.2.0 + 0.2.1 bottin-it diff --git a/bottin-tests/pom.xml b/bottin-tests/pom.xml index 22d9059..5ba87d6 100644 --- a/bottin-tests/pom.xml +++ b/bottin-tests/pom.xml @@ -8,7 +8,7 @@ xyz.tcheeric bottin - 0.2.0 + 0.2.1 bottin-tests diff --git a/bottin-verification/pom.xml b/bottin-verification/pom.xml index 4e76c81..7505899 100644 --- a/bottin-verification/pom.xml +++ b/bottin-verification/pom.xml @@ -8,7 +8,7 @@ xyz.tcheeric bottin - 0.2.0 + 0.2.1 bottin-verification diff --git a/bottin-web/pom.xml b/bottin-web/pom.xml index c23b81f..280f3fe 100644 --- a/bottin-web/pom.xml +++ b/bottin-web/pom.xml @@ -8,7 +8,7 @@ xyz.tcheeric bottin - 0.2.0 + 0.2.1 bottin-web diff --git a/pom.xml b/pom.xml index a8088bc..1a7b73a 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ xyz.tcheeric bottin - 0.2.0 + 0.2.1 pom Bottin - NIP-05 Registry Service