mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			35 lines
		
	
	
		
			991 B
		
	
	
	
		
			Swift
		
	
			
		
		
	
	
			35 lines
		
	
	
		
			991 B
		
	
	
	
		
			Swift
		
	
| // Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
 | |
| 
 | |
| import Foundation
 | |
| import SessionUtilitiesKit
 | |
| 
 | |
| extension SnodeAPI {
 | |
|     public class ONSResolveResponse: SnodeResponse {
 | |
|         internal struct Result: Codable {
 | |
|             enum CodingKeys: String, CodingKey {
 | |
|                 case nonce
 | |
|                 case encryptedValue = "encrypted_value"
 | |
|             }
 | |
|             
 | |
|             internal let nonce: String?
 | |
|             internal let encryptedValue: String
 | |
|         }
 | |
|         
 | |
|         enum CodingKeys: String, CodingKey {
 | |
|             case result
 | |
|         }
 | |
|         
 | |
|         internal let result: Result
 | |
|         
 | |
|         // MARK: - Initialization
 | |
|         
 | |
|         required init(from decoder: Decoder) throws {
 | |
|             let container: KeyedDecodingContainer<CodingKeys> = try decoder.container(keyedBy: CodingKeys.self)
 | |
|             
 | |
|             result = try container.decode(Result.self, forKey: .result)
 | |
|             
 | |
|             try super.init(from: decoder)
 | |
|         }
 | |
|     }
 | |
| }
 |