NostrUtils class
This class is responsible for handling some of the helper utils of the library.
Constructors
- NostrUtils.new({required NostrLogger logger})
- This class is responsible for handling some of the helper utils of the library.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- logger → NostrLogger
-
General utils to be used in a whole Nostr instance.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
consistent64HexChars(
String input) → String -
Generates a random 64 length hexadecimal string that is consistent with the given
input
. -
countDifficultyOfHex(
String hexString) → int -
Counts the difficulty of the given
hexString
, this wis intebded t be used in the NIP 13 with this package. -
hexEncodeString(
String input) → String -
Encodes the given
input
to hex format -
isValidNip05Identifier(
String identifier) → bool -
Wether the given
identifier
has a valid format. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pubKeyFromIdentifierNip05(
{required String internetIdentifier}) → Future< String> -
Return the public key found by the NIP05 implementation via the given for the given
internetIdentifier
-
random64HexChars(
) → String - Generates a randwom 64-length hexadecimal string.
-
toString(
) → String -
A string representation of this object.
inherited
-
verifyNip05(
{required String internetIdentifier, required String pubKey}) → Future< bool> -
This method will verify the
internetIdentifier
with apubKey
using the NIP05 implementation, and simply will return a Future with a bool that indicates if the verification was successful or not.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited