dostr_nip01 0.1.1
dostr_nip01: ^0.1.1 copied to clipboard
The NIP-01 Nostr event with its JSON form and its id, the Filter of a REQ, the kind ranges, and the EventVerifier interface that signature verifiers implement.
0.1.1 #
Filter.matches, which tells whether an event meets every condition of a filter, itssearchaside, for a client to check what a relay sent.
0.1.0 #
- Initial release, moved out of the
ndkpackage. isLowercaseHex, inpackage:dostr_nip01/hex.dart, for event verifiers to check that an id, a pubkey or a sig is the lowercase hex NIP-01 requires, withbytesToHexandhexToBytes, which convert between bytes and hex.EventKindClassification, which tells regular, replaceable, addressable and ephemeral kinds apart, moved here fromndk, anddostr_coreexports it too. The deep importpackage:ndk/shared/nips/nip01/event_kind_classification.dartis nowpackage:dostr_nip01/dostr_nip01.dart. Unlike inndk, kind 41 (NIP-28 channel metadata) is not replaceable, since NIP-01 makes kinds 4 to 44 regular, andisParameterizedReplaceableKind,isRegularReplaceableKindandlegacyReplaceableKindsare gone: useisAddressableKindandisReplaceableKind.Filter, the NIP-01 filter of a REQ, moved here fromndk, anddostr_coreexports it too. The deep importpackage:ndk/domain_layer/entities/filter.dartis nowpackage:dostr_nip01/dostr_nip01.dart. Unlike inndk,toMapandfromMapare nowtoJsonandfromJson,fromJsonthrows aFormatExceptionfor a malformed filter, wheretryFromJsonreturns null, a tag name of any length is kept, andtTags,mTags,cloneWithAuthors,cloneWithPTagsandmergeAuthorsare gone.pubKeyofNip01Event, in its constructor andcopyWithtoo, is nowpubkey, the name NIP-01 gives the field.