diff --git a/Sources/XMTPiOS/PrivatePreferences.swift b/Sources/XMTPiOS/PrivatePreferences.swift index c8980f3d..703c54e5 100644 --- a/Sources/XMTPiOS/PrivatePreferences.swift +++ b/Sources/XMTPiOS/PrivatePreferences.swift @@ -9,6 +9,12 @@ public enum EntryType: String, Codable { } public struct ConsentListEntry: Codable, Hashable { + public init(value: String, entryType: EntryType, consentType: ConsentState) { + self.value = value + self.entryType = entryType + self.consentType = consentType + } + static func address(_ address: String, type: ConsentState = .unknown) -> ConsentListEntry { @@ -65,25 +71,25 @@ public class ConsentList { self.ffiClient = ffiClient } - func setConsentState(entries: [ConsentListEntry]) async throws { + public func setConsentState(entries: [ConsentListEntry]) async throws { try await ffiClient.setConsentStates(records: entries.map(\.toFFI)) } - func addressState(address: String) async throws -> ConsentState { + public func addressState(address: String) async throws -> ConsentState { return try await ffiClient.getConsentState( entityType: .address, entity: address ).fromFFI } - func conversationState(conversationId: String) async throws -> ConsentState { + public func conversationState(conversationId: String) async throws -> ConsentState { return try await ffiClient.getConsentState( entityType: .conversationId, entity: conversationId ).fromFFI } - func inboxIdState(inboxId: String) async throws -> ConsentState { + public func inboxIdState(inboxId: String) async throws -> ConsentState { return try await ffiClient.getConsentState( entityType: .inboxId, entity: inboxId diff --git a/XMTP.podspec b/XMTP.podspec index 947da570..db313f6b 100644 --- a/XMTP.podspec +++ b/XMTP.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "XMTP" - spec.version = "3.0.1" + spec.version = "3.0.2" spec.summary = "XMTP SDK Cocoapod" # This description is used to generate tags and improve search results.