Class SignedNostrEvent

    • Constructor Detail

      • SignedNostrEvent

        public SignedNostrEvent​(java.lang.String id,
                                NostrPublicKey pubkey,
                                int kind,
                                java.lang.String content,
                                java.time.Instant created_at,
                                java.lang.String signature,
                                java.util.List<java.util.List<java.lang.String>> tags)
      • SignedNostrEvent

        public SignedNostrEvent​(java.util.Map<java.lang.String,​java.lang.Object> map)
    • Method Detail

      • getContent

        public java.lang.String getContent()
        Specified by:
        getContent in interface NostrEvent
      • getSignature

        public java.lang.String getSignature()
      • getId

        public java.lang.String getId()
      • getAuthor

        @Deprecated
        public NostrPublicKey getAuthor()
        Deprecated.
        use getPubkey instead
      • toMap

        public java.util.Map<java.lang.String,​java.lang.Object> toMap()
        Overrides:
        toMap in class NostrMessage
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class NostrMessage
      • clone

        public SignedNostrEvent clone()
        Overrides:
        clone in class java.lang.Object
      • verify

        public boolean verify()
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • verifyAsync

        public org.ngengine.platform.AsyncTask<java.lang.Boolean> verifyAsync()
      • getIdBech32

        public java.lang.String getIdBech32()
      • getFragments

        protected java.util.Collection<java.lang.Object> getFragments()
        Specified by:
        getFragments in class NostrMessage
      • hasTag

        public boolean hasTag​(java.lang.String tag)
        Specified by:
        hasTag in interface NostrEvent
      • listTagKeys

        public java.util.Set<java.lang.String> listTagKeys()
        Specified by:
        listTagKeys in interface NostrEvent
      • getTagRows

        public java.util.List<java.util.List<java.lang.String>> getTagRows()
        Specified by:
        getTagRows in interface NostrEvent
      • getCoordinates

        public NostrEvent.Coordinates 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)