damus

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

NostrMetadata.swift (637B)


      1 //
      2 //  NostrMetadata.swift
      3 //  damus
      4 //
      5 //  Created by William Casarin on 2022-05-21.
      6 //
      7 
      8 import Foundation
      9 
     10 
     11 struct NostrMetadata: Codable {
     12     let display_name: String?
     13     let name: String?
     14     let about: String?
     15     let website: String?
     16     let nip05: String?
     17     let picture: String?
     18     let banner: String?
     19     let lud06: String?
     20     let lud16: String?
     21 }
     22 
     23 func create_account_to_metadata(_ model: CreateAccountModel) -> NostrMetadata {
     24     return NostrMetadata(display_name: model.real_name, name: model.nick_name, about: model.about, website: nil, nip05: nil, picture: model.profile_image, banner: nil, lud06: nil, lud16: nil)
     25 }