damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

Pubkey.swift (476B)


      1 //
      2 //  Pubkey.swift
      3 //  damus
      4 //
      5 //  Created by William Casarin on 2023-07-30.
      6 //
      7 
      8 import Foundation
      9 
     10 // prepare a more gradual transition to the ndb branch
     11 typealias FollowRef = ReferencedId
     12 typealias Pubkey = String
     13 typealias NoteId = String
     14 typealias Privkey = String
     15 
     16 extension String {
     17     // Id constructors
     18     init?(hex: String) {
     19         self = hex
     20     }
     21 
     22     static var empty: String {
     23         return ""
     24     }
     25 
     26     func hex() -> String {
     27         return self
     28     }
     29 }