Conversation
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR releases version 0.2.1 of Bottin, a NIP-05 registry service for Nostr. The primary change is the removal of the nostr-java dependency, replacing Identity.generateRandomIdentity() with Java's built-in SecureRandom and HexFormat for generating random public key placeholders.
Changes:
- Removed nostr-java dependency from all module POMs, eliminating an external dependency
- Updated random pubkey generation in
PersistentNip05Managerto useSecureRandom+HexFormatinstead of nostr-java'sIdentity.generateRandomIdentity() - Bumped version from 0.2.0 to 0.2.1 across all modules and updated CHANGELOG
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Removed nostr-java dependency declarations and version property; bumped parent version to 0.2.1 |
| bottin-web/pom.xml | Updated parent version to 0.2.1 |
| bottin-verification/pom.xml | Updated parent version to 0.2.1 |
| bottin-tests/pom.xml | Updated parent version to 0.2.1 |
| bottin-tests/bottin-it/pom.xml | Updated parent version to 0.2.1 |
| bottin-tests/bottin-e2e/pom.xml | Updated parent version to 0.2.1 |
| bottin-spring-boot-starter/src/main/java/xyz/tcheeric/bottin/starter/PersistentNip05Manager.java | Replaced nostr-java Identity usage with SecureRandom + HexFormat for generating 64-char hex pubkeys |
| bottin-spring-boot-starter/src/main/java/xyz/tcheeric/bottin/starter/PersistentAccountManager.java | Removed outdated comment referencing nostr-java |
| bottin-spring-boot-starter/pom.xml | Removed nostr-java-id dependency; updated parent version to 0.2.1 |
| bottin-service/pom.xml | Updated parent version to 0.2.1 |
| bottin-persistence/pom.xml | Updated parent version to 0.2.1 |
| bottin-core/pom.xml | Removed nostr-java-id dependency; updated parent version to 0.2.1 |
| bottin-admin-ui/pom.xml | Updated parent version to 0.2.1 |
| CHANGELOG.md | Added v0.2.1 entry documenting nostr-java removal; updated version comparison links |
Comments suppressed due to low confidence (1)
bottin-spring-boot-starter/src/main/java/xyz/tcheeric/bottin/starter/PersistentNip05Manager.java:66
- Creating a new SecureRandom instance on every call to setupNip05 is inefficient. SecureRandom initialization can be expensive. The codebase pattern (see VerificationTokenGenerator) is to declare SecureRandom as a private final field initialized once in the constructor, then reuse it across multiple calls. This would improve performance when multiple NIP-05 records are created.
new SecureRandom().nextBytes(randomBytes);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Release develop into main, covering all changes from v0.1.0 through v0.2.1.
What changed?
Identity.generateRandomIdentity()withSecureRandom+HexFormatfor pubkey placeholder generation_nostr-verificationnaming and supports both DNS and Well-Known methods automaticallyBreaking changes
Review focus
PersistentNip05Manager.java— now usesSecureRandom+HexFormatChecklist
mvn -q verifypassesmvn -q verifyoutputBuild passes with exit code 0. All unit tests pass.
🤖 Generated with Claude Code