Move the PublicKey type into the core library#1305
Merged
robinlinden merged 1 commit intoevilcorpltd:masterfrom May 11, 2025
Merged
Move the PublicKey type into the core library#1305robinlinden merged 1 commit intoevilcorpltd:masterfrom
robinlinden merged 1 commit intoevilcorpltd:masterfrom
Conversation
| value class PublicKey(private val value: String) { | ||
| fun bytes() = hexToBytes(value) | ||
| fun string() = value | ||
| fun fingerprint() = value.take(8) |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
This is in preparation of using it in the database types now that that is a thing that's possible.
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.
This is in preparation of using it in the database types now that that is a thing that's possible.
This is the non-database part of #1291. Switching to using PublicKey in the database requires rules_kotlin changes due to not supporting passing arguments to ksp/kapt processors, and that's a later problem.