Advertisement
Guest User

Untitled

a guest
Mar 8th, 2022
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. type RelayURL = Text
  2.  
  3. data Tag
  4.     = ETag (EventId, RelayURL)
  5.     | PTag (XOnlyPubKey, RelayURL)
  6.     deriving (Eq, Show)
  7.  
  8. -- note: I have FromJSON for EventId and XOnlyPubKey already, they are hex-encoded in the json value
  9.  
  10. -- the json array looks like this:
  11. -- [ "e", "063df25d22738a838cbbdc3dee470e0c58284954", "http://www.google.com"] -- for E-Tag
  12. -- [ "p", "063df25d22738a838cbbdc3dee470e0c58284954", "http://www.gmail.com"] -- for P-Tag
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement