Class SignedNostrEvent
java.lang.Object
org.ngengine.nostr4j.proto.NostrMessageFragment
org.ngengine.nostr4j.proto.NostrMessage
org.ngengine.nostr4j.event.SignedNostrEvent
- All Implemented Interfaces:
Serializable, Cloneable, NostrEvent
- Direct Known Subclasses:
SignedNostrEvent.ReceivedSignedNostrEvent, ZapReceipt, ZapRequest
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface NostrEvent
NostrEvent.Coordinates, NostrEvent.TagValue -
Constructor Summary
ConstructorsConstructorDescriptionSignedNostrEvent(String id, NostrPublicKey pubkey, int kind, String content, Instant created_at, String signature, List<List<String>> tags) SignedNostrEvent(Map<String, Object> map) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckPow(int difficulty) clone()booleanDeprecated.use getPubkey insteadGet coordinates to this event.getFirstTag(String key) protected Collection<Object> getId()intgetKind()intgetPow()protected StringinthashCode()booleantoMap()booleanverify()org.ngengine.platform.AsyncTask<Boolean> Methods inherited from interface NostrEvent
getFirstTagFirstValue, getFirstTagSecondValue, getFirstTagThirdValue, isAddressable, isEphemeral, isExpired, isRegular, isReplaceable
-
Constructor Details
-
SignedNostrEvent
-
SignedNostrEvent
-
-
Method Details
-
getCreatedAt
- Specified by:
getCreatedAtin interfaceNostrEvent
-
getKind
public int getKind()- Specified by:
getKindin interfaceNostrEvent
-
getContent
- Specified by:
getContentin interfaceNostrEvent
-
getSignature
-
getId
-
getPubkey
-
getAuthor
Deprecated.use getPubkey instead -
toMap
- Overrides:
toMapin classNostrMessage
-
equals
- Overrides:
equalsin classNostrMessage
-
hashCode
public int hashCode()- Overrides:
hashCodein classNostrMessage
-
clone
-
verify
-
verifyAsync
-
getIdBech32
-
getIdentifier
-
getPrefix
- Specified by:
getPrefixin classNostrMessage
-
getFragments
- Specified by:
getFragmentsin classNostrMessage
-
parse
-
getExpiration
- Specified by:
getExpirationin interfaceNostrEvent
-
hasTag
- Specified by:
hasTagin interfaceNostrEvent
-
getTag
- Specified by:
getTagin interfaceNostrEvent
-
getFirstTag
- Specified by:
getFirstTagin interfaceNostrEvent
-
listTagKeys
- Specified by:
listTagKeysin interfaceNostrEvent
-
getTagRows
- Specified by:
getTagRowsin interfaceNostrEvent
-
getCoordinates
Get coordinates to this event.If the event is addressable or replaceable, it returns a coordinates object with type "a". If the event is not addressable or replaceable, it returns a coordinates object with type "e". Type matches the tag key used to refer to this event as detailed in NIP-01
- Returns:
-
getPow
public int getPow() -
checkPow
public boolean checkPow(int difficulty)
-