diff --git a/Frameworks/Bindings.xcframework/Info.plist b/Frameworks/Bindings.xcframework/Info.plist index 3c96df61083ca794226526858401b4539235d6ba..5da456bbdabbf3d610daca4ce17734b523413a53 100644 --- a/Frameworks/Bindings.xcframework/Info.plist +++ b/Frameworks/Bindings.xcframework/Info.plist @@ -6,30 +6,30 @@ <array> <dict> <key>LibraryIdentifier</key> - <string>ios-arm64_x86_64-simulator</string> + <string>ios-arm64</string> <key>LibraryPath</key> <string>Bindings.framework</string> <key>SupportedArchitectures</key> <array> <string>arm64</string> - <string>x86_64</string> </array> <key>SupportedPlatform</key> <string>ios</string> - <key>SupportedPlatformVariant</key> - <string>simulator</string> </dict> <dict> <key>LibraryIdentifier</key> - <string>ios-arm64</string> + <string>ios-arm64_x86_64-simulator</string> <key>LibraryPath</key> <string>Bindings.framework</string> <key>SupportedArchitectures</key> <array> <string>arm64</string> + <string>x86_64</string> </array> <key>SupportedPlatform</key> <string>ios</string> + <key>SupportedPlatformVariant</key> + <string>simulator</string> </dict> </array> <key>CFBundlePackageType</key> diff --git a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Bindings b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Bindings index 528df5fe985f3cf811249d0fe523f999a90b7f5a..551a016dc73fb80d2f4599f71f9741105273633e 100644 Binary files a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Bindings and b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Bindings differ diff --git a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Headers/Bindings.objc.h b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Headers/Bindings.objc.h index 31a22fa5f38ab6e18e6f5e71a5417163f2bb746f..a56558d0ae166ee09f92bcb66c592ff5fae5c131 100644 --- a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Headers/Bindings.objc.h +++ b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Headers/Bindings.objc.h @@ -70,8 +70,12 @@ @class BindingsSingleUseResponse; @protocol BindingsStopper; @class BindingsStopper; +@protocol BindingsUdLookupCallback; +@class BindingsUdLookupCallback; @protocol BindingsUdNetworkStatus; @class BindingsUdNetworkStatus; +@protocol BindingsUdSearchCallback; +@class BindingsUdSearchCallback; @protocol BindingsUpdateBackupFunc; @class BindingsUpdateBackupFunc; @@ -175,6 +179,10 @@ Parameters: - (void)stop; @end +@protocol BindingsUdLookupCallback <NSObject> +- (void)callback:(NSData* _Nullable)contactBytes err:(NSError* _Nullable)err; +@end + @protocol BindingsUdNetworkStatus <NSObject> /** * UdNetworkStatus returns: @@ -183,6 +191,10 @@ Parameters: - (long)udNetworkStatus; @end +@protocol BindingsUdSearchCallback <NSObject> +- (void)callback:(NSData* _Nullable)contactListJSON err:(NSError* _Nullable)err; +@end + @protocol BindingsUpdateBackupFunc <NSObject> - (void)updateBackup:(NSData* _Nullable)encryptedBackup; @end @@ -237,7 +249,7 @@ storage. To enable backups again, call InitializeBackup. NewCmixFromBackup. Example BackupReport: -{"BackupIdListJson":"WyJPRHRRTTA4ZERpV3lXaE0wWUhjanRHWnZQcHRSa1JOZ1pHR2FkTG10dE9BRCJd","BackupParams":""} +{"RestoredContacts":["0AeVYBe87SV45A2UI4AtIe6H4AIyZSLPBPrT6eTBLycD"],"Params":""} */ @interface BindingsBackupReport : NSObject <goSeqRefInterface> { } @@ -245,14 +257,12 @@ Example BackupReport: - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (nonnull instancetype)init; -/** - * The JSON encoded list of E2E partner IDs - */ -@property (nonatomic) NSData* _Nullable backupIdListJson; +// skipped field BackupReport.RestoredContacts with unsupported type: gitlab.com/elixxir/client/bindings.IdList + /** * The backup parameters found within the backup file */ -@property (nonatomic) NSData* _Nullable backupParams; +@property (nonatomic) NSString* _Nonnull params; @end /** @@ -1441,10 +1451,10 @@ FOUNDATION_EXPORT BindingsFileTransfer* _Nullable BindingsInitFileTransfer(long Params - e2eID - ID of the E2e object in the e2e tracker. - udID - ID of the UserDiscovery object in the ud tracker. - - password - password used in LoadCmix. + - backupPassPhrase - backup passphrase provided by the user. Used to decrypt backup. - cb - the callback to be called when a backup is triggered. */ -FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsInitializeBackup(long e2eID, long udID, NSString* _Nullable password, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); +FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsInitializeBackup(long e2eID, long udID, NSString* _Nullable backupPassPhrase, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); /** * Listen starts a single-use listener on a given tag using the passed in e2e object @@ -1521,6 +1531,22 @@ here. If callbacks is left nil, a default auth.Callbacks will be used. */ FOUNDATION_EXPORT BindingsE2e* _Nullable BindingsLoginEphemeral(long cmixId, id<BindingsAuthCallbacks> _Nullable callbacks, NSData* _Nullable identity, NSData* _Nullable e2eParamsJSON, NSError* _Nullable* _Nullable error); +/** + * LookupUD returns the public key of the passed ID as known by the user +discovery system or returns by the timeout. + +Parameters: + - e2eID - e2e object ID in the tracker + - udContact - the marshalled bytes of the contact.Contact object + - udIdBytes - the marshalled bytes of the id.ID object for the user + discovery server + - singleRequestParams - the JSON marshalled bytes of single.RequestParams + +Returns: + - []byte - the JSON marshalled bytes of SingleUseSendReport + */ +FOUNDATION_EXPORT NSData* _Nullable BindingsLookupUD(long e2eID, NSData* _Nullable udContact, id<BindingsUdLookupCallback> _Nullable cb, NSData* _Nullable udIdBytes, NSData* _Nullable singleRequestParamsJSON, NSError* _Nullable* _Nullable error); + /** * NewBroadcastChannel creates a bindings-layer broadcast channel & starts listening for new messages @@ -1555,7 +1581,7 @@ Params Returns: - []byte - the JSON marshalled bytes of the BackupReport object. */ -FOUNDATION_EXPORT NSData* _Nullable BindingsNewCmixFromBackup(NSString* _Nullable ndfJSON, NSString* _Nullable storageDir, NSData* _Nullable sessionPassword, NSData* _Nullable backupPassphrase, NSData* _Nullable backupFileContents, NSError* _Nullable* _Nullable error); +FOUNDATION_EXPORT NSData* _Nullable BindingsNewCmixFromBackup(NSString* _Nullable ndfJSON, NSString* _Nullable storageDir, NSString* _Nullable backupPassphrase, NSData* _Nullable sessionPassword, NSData* _Nullable backupFileContents, NSError* _Nullable* _Nullable error); /** * NewUdManagerFromBackup builds a new user discover manager from a backup. It @@ -1632,6 +1658,25 @@ Params */ FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsResumeBackup(long e2eID, long udID, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); +/** + * SearchUD searches user discovery for the passed Facts. The searchCallback +will return a list of contacts, each having the facts it hit against. This is +NOT intended to be used to search for multiple users at once; that can have a +privacy reduction. Instead, it is intended to be used to search for a user +where multiple pieces of information is known. + +Parameters: + - e2eID - e2e object ID in the tracker + - udContact - the marshalled bytes of the contact.Contact for the user + discovery server + - factListJSON - the JSON marshalled bytes of fact.FactList + - singleRequestParams - the JSON marshalled bytes of single.RequestParams + +Returns: + - []byte - the JSON marshalled bytes of SingleUseSendReport + */ +FOUNDATION_EXPORT NSData* _Nullable BindingsSearchUD(long e2eID, NSData* _Nullable udContact, id<BindingsUdSearchCallback> _Nullable cb, NSData* _Nullable factListJSON, NSData* _Nullable singleRequestParamsJSON, NSError* _Nullable* _Nullable error); + /** * SetFactsOnContact replaces the facts on the contact with the passed in facts pass in empty facts in order to clear the facts. @@ -1698,8 +1743,12 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsTransmitSingleUse(long e2eID, NSData @class BindingsStopper; +@class BindingsUdLookupCallback; + @class BindingsUdNetworkStatus; +@class BindingsUdSearchCallback; + @class BindingsUpdateBackupFunc; /** @@ -1940,6 +1989,23 @@ Parameters: - (void)stop; @end +/** + * UdLookupCallback contains the callback called by LookupUD that returns the +contact that matches the passed in ID. + +Parameters: + - contactBytes - the marshalled bytes of contact.Contact returned from the + lookup, or nil if an error occurs + - err - any errors that occurred in the lookup + */ +@interface BindingsUdLookupCallback : NSObject <goSeqRefInterface, BindingsUdLookupCallback> { +} +@property(strong, readonly) _Nonnull id _ref; + +- (nonnull instancetype)initWithRef:(_Nonnull id)ref; +- (void)callback:(NSData* _Nullable)contactBytes err:(NSError* _Nullable)err; +@end + /** * UdNetworkStatus contains the UdNetworkStatus, which is a bindings-level interface for ud.udNetworkStatus. @@ -1956,6 +2022,24 @@ interface for ud.udNetworkStatus. - (long)udNetworkStatus; @end +/** + * UdSearchCallback contains the callback called by SearchUD that returns a list +of contact.Contact objects that match the list of facts passed into +SearchUD. + +Parameters: + - contactListJSON - the JSON marshalled bytes of []contact.Contact, or nil + if an error occurs + - err - any errors that occurred in the search + */ +@interface BindingsUdSearchCallback : NSObject <goSeqRefInterface, BindingsUdSearchCallback> { +} +@property(strong, readonly) _Nonnull id _ref; + +- (nonnull instancetype)initWithRef:(_Nonnull id)ref; +- (void)callback:(NSData* _Nullable)contactListJSON err:(NSError* _Nullable)err; +@end + /** * UpdateBackupFunc contains a function callback that returns new backups. */ diff --git a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Bindings b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Bindings index 528df5fe985f3cf811249d0fe523f999a90b7f5a..551a016dc73fb80d2f4599f71f9741105273633e 100644 Binary files a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Bindings and b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Bindings differ diff --git a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Headers/Bindings.objc.h b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Headers/Bindings.objc.h index 31a22fa5f38ab6e18e6f5e71a5417163f2bb746f..a56558d0ae166ee09f92bcb66c592ff5fae5c131 100644 --- a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Headers/Bindings.objc.h +++ b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Headers/Bindings.objc.h @@ -70,8 +70,12 @@ @class BindingsSingleUseResponse; @protocol BindingsStopper; @class BindingsStopper; +@protocol BindingsUdLookupCallback; +@class BindingsUdLookupCallback; @protocol BindingsUdNetworkStatus; @class BindingsUdNetworkStatus; +@protocol BindingsUdSearchCallback; +@class BindingsUdSearchCallback; @protocol BindingsUpdateBackupFunc; @class BindingsUpdateBackupFunc; @@ -175,6 +179,10 @@ Parameters: - (void)stop; @end +@protocol BindingsUdLookupCallback <NSObject> +- (void)callback:(NSData* _Nullable)contactBytes err:(NSError* _Nullable)err; +@end + @protocol BindingsUdNetworkStatus <NSObject> /** * UdNetworkStatus returns: @@ -183,6 +191,10 @@ Parameters: - (long)udNetworkStatus; @end +@protocol BindingsUdSearchCallback <NSObject> +- (void)callback:(NSData* _Nullable)contactListJSON err:(NSError* _Nullable)err; +@end + @protocol BindingsUpdateBackupFunc <NSObject> - (void)updateBackup:(NSData* _Nullable)encryptedBackup; @end @@ -237,7 +249,7 @@ storage. To enable backups again, call InitializeBackup. NewCmixFromBackup. Example BackupReport: -{"BackupIdListJson":"WyJPRHRRTTA4ZERpV3lXaE0wWUhjanRHWnZQcHRSa1JOZ1pHR2FkTG10dE9BRCJd","BackupParams":""} +{"RestoredContacts":["0AeVYBe87SV45A2UI4AtIe6H4AIyZSLPBPrT6eTBLycD"],"Params":""} */ @interface BindingsBackupReport : NSObject <goSeqRefInterface> { } @@ -245,14 +257,12 @@ Example BackupReport: - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (nonnull instancetype)init; -/** - * The JSON encoded list of E2E partner IDs - */ -@property (nonatomic) NSData* _Nullable backupIdListJson; +// skipped field BackupReport.RestoredContacts with unsupported type: gitlab.com/elixxir/client/bindings.IdList + /** * The backup parameters found within the backup file */ -@property (nonatomic) NSData* _Nullable backupParams; +@property (nonatomic) NSString* _Nonnull params; @end /** @@ -1441,10 +1451,10 @@ FOUNDATION_EXPORT BindingsFileTransfer* _Nullable BindingsInitFileTransfer(long Params - e2eID - ID of the E2e object in the e2e tracker. - udID - ID of the UserDiscovery object in the ud tracker. - - password - password used in LoadCmix. + - backupPassPhrase - backup passphrase provided by the user. Used to decrypt backup. - cb - the callback to be called when a backup is triggered. */ -FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsInitializeBackup(long e2eID, long udID, NSString* _Nullable password, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); +FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsInitializeBackup(long e2eID, long udID, NSString* _Nullable backupPassPhrase, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); /** * Listen starts a single-use listener on a given tag using the passed in e2e object @@ -1521,6 +1531,22 @@ here. If callbacks is left nil, a default auth.Callbacks will be used. */ FOUNDATION_EXPORT BindingsE2e* _Nullable BindingsLoginEphemeral(long cmixId, id<BindingsAuthCallbacks> _Nullable callbacks, NSData* _Nullable identity, NSData* _Nullable e2eParamsJSON, NSError* _Nullable* _Nullable error); +/** + * LookupUD returns the public key of the passed ID as known by the user +discovery system or returns by the timeout. + +Parameters: + - e2eID - e2e object ID in the tracker + - udContact - the marshalled bytes of the contact.Contact object + - udIdBytes - the marshalled bytes of the id.ID object for the user + discovery server + - singleRequestParams - the JSON marshalled bytes of single.RequestParams + +Returns: + - []byte - the JSON marshalled bytes of SingleUseSendReport + */ +FOUNDATION_EXPORT NSData* _Nullable BindingsLookupUD(long e2eID, NSData* _Nullable udContact, id<BindingsUdLookupCallback> _Nullable cb, NSData* _Nullable udIdBytes, NSData* _Nullable singleRequestParamsJSON, NSError* _Nullable* _Nullable error); + /** * NewBroadcastChannel creates a bindings-layer broadcast channel & starts listening for new messages @@ -1555,7 +1581,7 @@ Params Returns: - []byte - the JSON marshalled bytes of the BackupReport object. */ -FOUNDATION_EXPORT NSData* _Nullable BindingsNewCmixFromBackup(NSString* _Nullable ndfJSON, NSString* _Nullable storageDir, NSData* _Nullable sessionPassword, NSData* _Nullable backupPassphrase, NSData* _Nullable backupFileContents, NSError* _Nullable* _Nullable error); +FOUNDATION_EXPORT NSData* _Nullable BindingsNewCmixFromBackup(NSString* _Nullable ndfJSON, NSString* _Nullable storageDir, NSString* _Nullable backupPassphrase, NSData* _Nullable sessionPassword, NSData* _Nullable backupFileContents, NSError* _Nullable* _Nullable error); /** * NewUdManagerFromBackup builds a new user discover manager from a backup. It @@ -1632,6 +1658,25 @@ Params */ FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsResumeBackup(long e2eID, long udID, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); +/** + * SearchUD searches user discovery for the passed Facts. The searchCallback +will return a list of contacts, each having the facts it hit against. This is +NOT intended to be used to search for multiple users at once; that can have a +privacy reduction. Instead, it is intended to be used to search for a user +where multiple pieces of information is known. + +Parameters: + - e2eID - e2e object ID in the tracker + - udContact - the marshalled bytes of the contact.Contact for the user + discovery server + - factListJSON - the JSON marshalled bytes of fact.FactList + - singleRequestParams - the JSON marshalled bytes of single.RequestParams + +Returns: + - []byte - the JSON marshalled bytes of SingleUseSendReport + */ +FOUNDATION_EXPORT NSData* _Nullable BindingsSearchUD(long e2eID, NSData* _Nullable udContact, id<BindingsUdSearchCallback> _Nullable cb, NSData* _Nullable factListJSON, NSData* _Nullable singleRequestParamsJSON, NSError* _Nullable* _Nullable error); + /** * SetFactsOnContact replaces the facts on the contact with the passed in facts pass in empty facts in order to clear the facts. @@ -1698,8 +1743,12 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsTransmitSingleUse(long e2eID, NSData @class BindingsStopper; +@class BindingsUdLookupCallback; + @class BindingsUdNetworkStatus; +@class BindingsUdSearchCallback; + @class BindingsUpdateBackupFunc; /** @@ -1940,6 +1989,23 @@ Parameters: - (void)stop; @end +/** + * UdLookupCallback contains the callback called by LookupUD that returns the +contact that matches the passed in ID. + +Parameters: + - contactBytes - the marshalled bytes of contact.Contact returned from the + lookup, or nil if an error occurs + - err - any errors that occurred in the lookup + */ +@interface BindingsUdLookupCallback : NSObject <goSeqRefInterface, BindingsUdLookupCallback> { +} +@property(strong, readonly) _Nonnull id _ref; + +- (nonnull instancetype)initWithRef:(_Nonnull id)ref; +- (void)callback:(NSData* _Nullable)contactBytes err:(NSError* _Nullable)err; +@end + /** * UdNetworkStatus contains the UdNetworkStatus, which is a bindings-level interface for ud.udNetworkStatus. @@ -1956,6 +2022,24 @@ interface for ud.udNetworkStatus. - (long)udNetworkStatus; @end +/** + * UdSearchCallback contains the callback called by SearchUD that returns a list +of contact.Contact objects that match the list of facts passed into +SearchUD. + +Parameters: + - contactListJSON - the JSON marshalled bytes of []contact.Contact, or nil + if an error occurs + - err - any errors that occurred in the search + */ +@interface BindingsUdSearchCallback : NSObject <goSeqRefInterface, BindingsUdSearchCallback> { +} +@property(strong, readonly) _Nonnull id _ref; + +- (nonnull instancetype)initWithRef:(_Nonnull id)ref; +- (void)callback:(NSData* _Nullable)contactListJSON err:(NSError* _Nullable)err; +@end + /** * UpdateBackupFunc contains a function callback that returns new backups. */ diff --git a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/Current/Bindings b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/Current/Bindings index 528df5fe985f3cf811249d0fe523f999a90b7f5a..551a016dc73fb80d2f4599f71f9741105273633e 100644 Binary files a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/Current/Bindings and b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/Current/Bindings differ diff --git a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/Current/Headers/Bindings.objc.h b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/Current/Headers/Bindings.objc.h index 31a22fa5f38ab6e18e6f5e71a5417163f2bb746f..a56558d0ae166ee09f92bcb66c592ff5fae5c131 100644 --- a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/Current/Headers/Bindings.objc.h +++ b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/Current/Headers/Bindings.objc.h @@ -70,8 +70,12 @@ @class BindingsSingleUseResponse; @protocol BindingsStopper; @class BindingsStopper; +@protocol BindingsUdLookupCallback; +@class BindingsUdLookupCallback; @protocol BindingsUdNetworkStatus; @class BindingsUdNetworkStatus; +@protocol BindingsUdSearchCallback; +@class BindingsUdSearchCallback; @protocol BindingsUpdateBackupFunc; @class BindingsUpdateBackupFunc; @@ -175,6 +179,10 @@ Parameters: - (void)stop; @end +@protocol BindingsUdLookupCallback <NSObject> +- (void)callback:(NSData* _Nullable)contactBytes err:(NSError* _Nullable)err; +@end + @protocol BindingsUdNetworkStatus <NSObject> /** * UdNetworkStatus returns: @@ -183,6 +191,10 @@ Parameters: - (long)udNetworkStatus; @end +@protocol BindingsUdSearchCallback <NSObject> +- (void)callback:(NSData* _Nullable)contactListJSON err:(NSError* _Nullable)err; +@end + @protocol BindingsUpdateBackupFunc <NSObject> - (void)updateBackup:(NSData* _Nullable)encryptedBackup; @end @@ -237,7 +249,7 @@ storage. To enable backups again, call InitializeBackup. NewCmixFromBackup. Example BackupReport: -{"BackupIdListJson":"WyJPRHRRTTA4ZERpV3lXaE0wWUhjanRHWnZQcHRSa1JOZ1pHR2FkTG10dE9BRCJd","BackupParams":""} +{"RestoredContacts":["0AeVYBe87SV45A2UI4AtIe6H4AIyZSLPBPrT6eTBLycD"],"Params":""} */ @interface BindingsBackupReport : NSObject <goSeqRefInterface> { } @@ -245,14 +257,12 @@ Example BackupReport: - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (nonnull instancetype)init; -/** - * The JSON encoded list of E2E partner IDs - */ -@property (nonatomic) NSData* _Nullable backupIdListJson; +// skipped field BackupReport.RestoredContacts with unsupported type: gitlab.com/elixxir/client/bindings.IdList + /** * The backup parameters found within the backup file */ -@property (nonatomic) NSData* _Nullable backupParams; +@property (nonatomic) NSString* _Nonnull params; @end /** @@ -1441,10 +1451,10 @@ FOUNDATION_EXPORT BindingsFileTransfer* _Nullable BindingsInitFileTransfer(long Params - e2eID - ID of the E2e object in the e2e tracker. - udID - ID of the UserDiscovery object in the ud tracker. - - password - password used in LoadCmix. + - backupPassPhrase - backup passphrase provided by the user. Used to decrypt backup. - cb - the callback to be called when a backup is triggered. */ -FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsInitializeBackup(long e2eID, long udID, NSString* _Nullable password, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); +FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsInitializeBackup(long e2eID, long udID, NSString* _Nullable backupPassPhrase, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); /** * Listen starts a single-use listener on a given tag using the passed in e2e object @@ -1521,6 +1531,22 @@ here. If callbacks is left nil, a default auth.Callbacks will be used. */ FOUNDATION_EXPORT BindingsE2e* _Nullable BindingsLoginEphemeral(long cmixId, id<BindingsAuthCallbacks> _Nullable callbacks, NSData* _Nullable identity, NSData* _Nullable e2eParamsJSON, NSError* _Nullable* _Nullable error); +/** + * LookupUD returns the public key of the passed ID as known by the user +discovery system or returns by the timeout. + +Parameters: + - e2eID - e2e object ID in the tracker + - udContact - the marshalled bytes of the contact.Contact object + - udIdBytes - the marshalled bytes of the id.ID object for the user + discovery server + - singleRequestParams - the JSON marshalled bytes of single.RequestParams + +Returns: + - []byte - the JSON marshalled bytes of SingleUseSendReport + */ +FOUNDATION_EXPORT NSData* _Nullable BindingsLookupUD(long e2eID, NSData* _Nullable udContact, id<BindingsUdLookupCallback> _Nullable cb, NSData* _Nullable udIdBytes, NSData* _Nullable singleRequestParamsJSON, NSError* _Nullable* _Nullable error); + /** * NewBroadcastChannel creates a bindings-layer broadcast channel & starts listening for new messages @@ -1555,7 +1581,7 @@ Params Returns: - []byte - the JSON marshalled bytes of the BackupReport object. */ -FOUNDATION_EXPORT NSData* _Nullable BindingsNewCmixFromBackup(NSString* _Nullable ndfJSON, NSString* _Nullable storageDir, NSData* _Nullable sessionPassword, NSData* _Nullable backupPassphrase, NSData* _Nullable backupFileContents, NSError* _Nullable* _Nullable error); +FOUNDATION_EXPORT NSData* _Nullable BindingsNewCmixFromBackup(NSString* _Nullable ndfJSON, NSString* _Nullable storageDir, NSString* _Nullable backupPassphrase, NSData* _Nullable sessionPassword, NSData* _Nullable backupFileContents, NSError* _Nullable* _Nullable error); /** * NewUdManagerFromBackup builds a new user discover manager from a backup. It @@ -1632,6 +1658,25 @@ Params */ FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsResumeBackup(long e2eID, long udID, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); +/** + * SearchUD searches user discovery for the passed Facts. The searchCallback +will return a list of contacts, each having the facts it hit against. This is +NOT intended to be used to search for multiple users at once; that can have a +privacy reduction. Instead, it is intended to be used to search for a user +where multiple pieces of information is known. + +Parameters: + - e2eID - e2e object ID in the tracker + - udContact - the marshalled bytes of the contact.Contact for the user + discovery server + - factListJSON - the JSON marshalled bytes of fact.FactList + - singleRequestParams - the JSON marshalled bytes of single.RequestParams + +Returns: + - []byte - the JSON marshalled bytes of SingleUseSendReport + */ +FOUNDATION_EXPORT NSData* _Nullable BindingsSearchUD(long e2eID, NSData* _Nullable udContact, id<BindingsUdSearchCallback> _Nullable cb, NSData* _Nullable factListJSON, NSData* _Nullable singleRequestParamsJSON, NSError* _Nullable* _Nullable error); + /** * SetFactsOnContact replaces the facts on the contact with the passed in facts pass in empty facts in order to clear the facts. @@ -1698,8 +1743,12 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsTransmitSingleUse(long e2eID, NSData @class BindingsStopper; +@class BindingsUdLookupCallback; + @class BindingsUdNetworkStatus; +@class BindingsUdSearchCallback; + @class BindingsUpdateBackupFunc; /** @@ -1940,6 +1989,23 @@ Parameters: - (void)stop; @end +/** + * UdLookupCallback contains the callback called by LookupUD that returns the +contact that matches the passed in ID. + +Parameters: + - contactBytes - the marshalled bytes of contact.Contact returned from the + lookup, or nil if an error occurs + - err - any errors that occurred in the lookup + */ +@interface BindingsUdLookupCallback : NSObject <goSeqRefInterface, BindingsUdLookupCallback> { +} +@property(strong, readonly) _Nonnull id _ref; + +- (nonnull instancetype)initWithRef:(_Nonnull id)ref; +- (void)callback:(NSData* _Nullable)contactBytes err:(NSError* _Nullable)err; +@end + /** * UdNetworkStatus contains the UdNetworkStatus, which is a bindings-level interface for ud.udNetworkStatus. @@ -1956,6 +2022,24 @@ interface for ud.udNetworkStatus. - (long)udNetworkStatus; @end +/** + * UdSearchCallback contains the callback called by SearchUD that returns a list +of contact.Contact objects that match the list of facts passed into +SearchUD. + +Parameters: + - contactListJSON - the JSON marshalled bytes of []contact.Contact, or nil + if an error occurs + - err - any errors that occurred in the search + */ +@interface BindingsUdSearchCallback : NSObject <goSeqRefInterface, BindingsUdSearchCallback> { +} +@property(strong, readonly) _Nonnull id _ref; + +- (nonnull instancetype)initWithRef:(_Nonnull id)ref; +- (void)callback:(NSData* _Nullable)contactListJSON err:(NSError* _Nullable)err; +@end + /** * UpdateBackupFunc contains a function callback that returns new backups. */ diff --git a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Bindings b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Bindings index f7ce222ffba175522c761fca3b7a412511ac4ed9..7463bb58b196e6187b4aee07f15acd218a1e7c6c 100644 Binary files a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Bindings and b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Bindings differ diff --git a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Headers/Bindings.objc.h b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Headers/Bindings.objc.h index 31a22fa5f38ab6e18e6f5e71a5417163f2bb746f..a56558d0ae166ee09f92bcb66c592ff5fae5c131 100644 --- a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Headers/Bindings.objc.h +++ b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Headers/Bindings.objc.h @@ -70,8 +70,12 @@ @class BindingsSingleUseResponse; @protocol BindingsStopper; @class BindingsStopper; +@protocol BindingsUdLookupCallback; +@class BindingsUdLookupCallback; @protocol BindingsUdNetworkStatus; @class BindingsUdNetworkStatus; +@protocol BindingsUdSearchCallback; +@class BindingsUdSearchCallback; @protocol BindingsUpdateBackupFunc; @class BindingsUpdateBackupFunc; @@ -175,6 +179,10 @@ Parameters: - (void)stop; @end +@protocol BindingsUdLookupCallback <NSObject> +- (void)callback:(NSData* _Nullable)contactBytes err:(NSError* _Nullable)err; +@end + @protocol BindingsUdNetworkStatus <NSObject> /** * UdNetworkStatus returns: @@ -183,6 +191,10 @@ Parameters: - (long)udNetworkStatus; @end +@protocol BindingsUdSearchCallback <NSObject> +- (void)callback:(NSData* _Nullable)contactListJSON err:(NSError* _Nullable)err; +@end + @protocol BindingsUpdateBackupFunc <NSObject> - (void)updateBackup:(NSData* _Nullable)encryptedBackup; @end @@ -237,7 +249,7 @@ storage. To enable backups again, call InitializeBackup. NewCmixFromBackup. Example BackupReport: -{"BackupIdListJson":"WyJPRHRRTTA4ZERpV3lXaE0wWUhjanRHWnZQcHRSa1JOZ1pHR2FkTG10dE9BRCJd","BackupParams":""} +{"RestoredContacts":["0AeVYBe87SV45A2UI4AtIe6H4AIyZSLPBPrT6eTBLycD"],"Params":""} */ @interface BindingsBackupReport : NSObject <goSeqRefInterface> { } @@ -245,14 +257,12 @@ Example BackupReport: - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (nonnull instancetype)init; -/** - * The JSON encoded list of E2E partner IDs - */ -@property (nonatomic) NSData* _Nullable backupIdListJson; +// skipped field BackupReport.RestoredContacts with unsupported type: gitlab.com/elixxir/client/bindings.IdList + /** * The backup parameters found within the backup file */ -@property (nonatomic) NSData* _Nullable backupParams; +@property (nonatomic) NSString* _Nonnull params; @end /** @@ -1441,10 +1451,10 @@ FOUNDATION_EXPORT BindingsFileTransfer* _Nullable BindingsInitFileTransfer(long Params - e2eID - ID of the E2e object in the e2e tracker. - udID - ID of the UserDiscovery object in the ud tracker. - - password - password used in LoadCmix. + - backupPassPhrase - backup passphrase provided by the user. Used to decrypt backup. - cb - the callback to be called when a backup is triggered. */ -FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsInitializeBackup(long e2eID, long udID, NSString* _Nullable password, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); +FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsInitializeBackup(long e2eID, long udID, NSString* _Nullable backupPassPhrase, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); /** * Listen starts a single-use listener on a given tag using the passed in e2e object @@ -1521,6 +1531,22 @@ here. If callbacks is left nil, a default auth.Callbacks will be used. */ FOUNDATION_EXPORT BindingsE2e* _Nullable BindingsLoginEphemeral(long cmixId, id<BindingsAuthCallbacks> _Nullable callbacks, NSData* _Nullable identity, NSData* _Nullable e2eParamsJSON, NSError* _Nullable* _Nullable error); +/** + * LookupUD returns the public key of the passed ID as known by the user +discovery system or returns by the timeout. + +Parameters: + - e2eID - e2e object ID in the tracker + - udContact - the marshalled bytes of the contact.Contact object + - udIdBytes - the marshalled bytes of the id.ID object for the user + discovery server + - singleRequestParams - the JSON marshalled bytes of single.RequestParams + +Returns: + - []byte - the JSON marshalled bytes of SingleUseSendReport + */ +FOUNDATION_EXPORT NSData* _Nullable BindingsLookupUD(long e2eID, NSData* _Nullable udContact, id<BindingsUdLookupCallback> _Nullable cb, NSData* _Nullable udIdBytes, NSData* _Nullable singleRequestParamsJSON, NSError* _Nullable* _Nullable error); + /** * NewBroadcastChannel creates a bindings-layer broadcast channel & starts listening for new messages @@ -1555,7 +1581,7 @@ Params Returns: - []byte - the JSON marshalled bytes of the BackupReport object. */ -FOUNDATION_EXPORT NSData* _Nullable BindingsNewCmixFromBackup(NSString* _Nullable ndfJSON, NSString* _Nullable storageDir, NSData* _Nullable sessionPassword, NSData* _Nullable backupPassphrase, NSData* _Nullable backupFileContents, NSError* _Nullable* _Nullable error); +FOUNDATION_EXPORT NSData* _Nullable BindingsNewCmixFromBackup(NSString* _Nullable ndfJSON, NSString* _Nullable storageDir, NSString* _Nullable backupPassphrase, NSData* _Nullable sessionPassword, NSData* _Nullable backupFileContents, NSError* _Nullable* _Nullable error); /** * NewUdManagerFromBackup builds a new user discover manager from a backup. It @@ -1632,6 +1658,25 @@ Params */ FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsResumeBackup(long e2eID, long udID, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); +/** + * SearchUD searches user discovery for the passed Facts. The searchCallback +will return a list of contacts, each having the facts it hit against. This is +NOT intended to be used to search for multiple users at once; that can have a +privacy reduction. Instead, it is intended to be used to search for a user +where multiple pieces of information is known. + +Parameters: + - e2eID - e2e object ID in the tracker + - udContact - the marshalled bytes of the contact.Contact for the user + discovery server + - factListJSON - the JSON marshalled bytes of fact.FactList + - singleRequestParams - the JSON marshalled bytes of single.RequestParams + +Returns: + - []byte - the JSON marshalled bytes of SingleUseSendReport + */ +FOUNDATION_EXPORT NSData* _Nullable BindingsSearchUD(long e2eID, NSData* _Nullable udContact, id<BindingsUdSearchCallback> _Nullable cb, NSData* _Nullable factListJSON, NSData* _Nullable singleRequestParamsJSON, NSError* _Nullable* _Nullable error); + /** * SetFactsOnContact replaces the facts on the contact with the passed in facts pass in empty facts in order to clear the facts. @@ -1698,8 +1743,12 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsTransmitSingleUse(long e2eID, NSData @class BindingsStopper; +@class BindingsUdLookupCallback; + @class BindingsUdNetworkStatus; +@class BindingsUdSearchCallback; + @class BindingsUpdateBackupFunc; /** @@ -1940,6 +1989,23 @@ Parameters: - (void)stop; @end +/** + * UdLookupCallback contains the callback called by LookupUD that returns the +contact that matches the passed in ID. + +Parameters: + - contactBytes - the marshalled bytes of contact.Contact returned from the + lookup, or nil if an error occurs + - err - any errors that occurred in the lookup + */ +@interface BindingsUdLookupCallback : NSObject <goSeqRefInterface, BindingsUdLookupCallback> { +} +@property(strong, readonly) _Nonnull id _ref; + +- (nonnull instancetype)initWithRef:(_Nonnull id)ref; +- (void)callback:(NSData* _Nullable)contactBytes err:(NSError* _Nullable)err; +@end + /** * UdNetworkStatus contains the UdNetworkStatus, which is a bindings-level interface for ud.udNetworkStatus. @@ -1956,6 +2022,24 @@ interface for ud.udNetworkStatus. - (long)udNetworkStatus; @end +/** + * UdSearchCallback contains the callback called by SearchUD that returns a list +of contact.Contact objects that match the list of facts passed into +SearchUD. + +Parameters: + - contactListJSON - the JSON marshalled bytes of []contact.Contact, or nil + if an error occurs + - err - any errors that occurred in the search + */ +@interface BindingsUdSearchCallback : NSObject <goSeqRefInterface, BindingsUdSearchCallback> { +} +@property(strong, readonly) _Nonnull id _ref; + +- (nonnull instancetype)initWithRef:(_Nonnull id)ref; +- (void)callback:(NSData* _Nullable)contactListJSON err:(NSError* _Nullable)err; +@end + /** * UpdateBackupFunc contains a function callback that returns new backups. */ diff --git a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Bindings b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Bindings index f7ce222ffba175522c761fca3b7a412511ac4ed9..7463bb58b196e6187b4aee07f15acd218a1e7c6c 100644 Binary files a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Bindings and b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Bindings differ diff --git a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Headers/Bindings.objc.h b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Headers/Bindings.objc.h index 31a22fa5f38ab6e18e6f5e71a5417163f2bb746f..a56558d0ae166ee09f92bcb66c592ff5fae5c131 100644 --- a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Headers/Bindings.objc.h +++ b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Headers/Bindings.objc.h @@ -70,8 +70,12 @@ @class BindingsSingleUseResponse; @protocol BindingsStopper; @class BindingsStopper; +@protocol BindingsUdLookupCallback; +@class BindingsUdLookupCallback; @protocol BindingsUdNetworkStatus; @class BindingsUdNetworkStatus; +@protocol BindingsUdSearchCallback; +@class BindingsUdSearchCallback; @protocol BindingsUpdateBackupFunc; @class BindingsUpdateBackupFunc; @@ -175,6 +179,10 @@ Parameters: - (void)stop; @end +@protocol BindingsUdLookupCallback <NSObject> +- (void)callback:(NSData* _Nullable)contactBytes err:(NSError* _Nullable)err; +@end + @protocol BindingsUdNetworkStatus <NSObject> /** * UdNetworkStatus returns: @@ -183,6 +191,10 @@ Parameters: - (long)udNetworkStatus; @end +@protocol BindingsUdSearchCallback <NSObject> +- (void)callback:(NSData* _Nullable)contactListJSON err:(NSError* _Nullable)err; +@end + @protocol BindingsUpdateBackupFunc <NSObject> - (void)updateBackup:(NSData* _Nullable)encryptedBackup; @end @@ -237,7 +249,7 @@ storage. To enable backups again, call InitializeBackup. NewCmixFromBackup. Example BackupReport: -{"BackupIdListJson":"WyJPRHRRTTA4ZERpV3lXaE0wWUhjanRHWnZQcHRSa1JOZ1pHR2FkTG10dE9BRCJd","BackupParams":""} +{"RestoredContacts":["0AeVYBe87SV45A2UI4AtIe6H4AIyZSLPBPrT6eTBLycD"],"Params":""} */ @interface BindingsBackupReport : NSObject <goSeqRefInterface> { } @@ -245,14 +257,12 @@ Example BackupReport: - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (nonnull instancetype)init; -/** - * The JSON encoded list of E2E partner IDs - */ -@property (nonatomic) NSData* _Nullable backupIdListJson; +// skipped field BackupReport.RestoredContacts with unsupported type: gitlab.com/elixxir/client/bindings.IdList + /** * The backup parameters found within the backup file */ -@property (nonatomic) NSData* _Nullable backupParams; +@property (nonatomic) NSString* _Nonnull params; @end /** @@ -1441,10 +1451,10 @@ FOUNDATION_EXPORT BindingsFileTransfer* _Nullable BindingsInitFileTransfer(long Params - e2eID - ID of the E2e object in the e2e tracker. - udID - ID of the UserDiscovery object in the ud tracker. - - password - password used in LoadCmix. + - backupPassPhrase - backup passphrase provided by the user. Used to decrypt backup. - cb - the callback to be called when a backup is triggered. */ -FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsInitializeBackup(long e2eID, long udID, NSString* _Nullable password, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); +FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsInitializeBackup(long e2eID, long udID, NSString* _Nullable backupPassPhrase, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); /** * Listen starts a single-use listener on a given tag using the passed in e2e object @@ -1521,6 +1531,22 @@ here. If callbacks is left nil, a default auth.Callbacks will be used. */ FOUNDATION_EXPORT BindingsE2e* _Nullable BindingsLoginEphemeral(long cmixId, id<BindingsAuthCallbacks> _Nullable callbacks, NSData* _Nullable identity, NSData* _Nullable e2eParamsJSON, NSError* _Nullable* _Nullable error); +/** + * LookupUD returns the public key of the passed ID as known by the user +discovery system or returns by the timeout. + +Parameters: + - e2eID - e2e object ID in the tracker + - udContact - the marshalled bytes of the contact.Contact object + - udIdBytes - the marshalled bytes of the id.ID object for the user + discovery server + - singleRequestParams - the JSON marshalled bytes of single.RequestParams + +Returns: + - []byte - the JSON marshalled bytes of SingleUseSendReport + */ +FOUNDATION_EXPORT NSData* _Nullable BindingsLookupUD(long e2eID, NSData* _Nullable udContact, id<BindingsUdLookupCallback> _Nullable cb, NSData* _Nullable udIdBytes, NSData* _Nullable singleRequestParamsJSON, NSError* _Nullable* _Nullable error); + /** * NewBroadcastChannel creates a bindings-layer broadcast channel & starts listening for new messages @@ -1555,7 +1581,7 @@ Params Returns: - []byte - the JSON marshalled bytes of the BackupReport object. */ -FOUNDATION_EXPORT NSData* _Nullable BindingsNewCmixFromBackup(NSString* _Nullable ndfJSON, NSString* _Nullable storageDir, NSData* _Nullable sessionPassword, NSData* _Nullable backupPassphrase, NSData* _Nullable backupFileContents, NSError* _Nullable* _Nullable error); +FOUNDATION_EXPORT NSData* _Nullable BindingsNewCmixFromBackup(NSString* _Nullable ndfJSON, NSString* _Nullable storageDir, NSString* _Nullable backupPassphrase, NSData* _Nullable sessionPassword, NSData* _Nullable backupFileContents, NSError* _Nullable* _Nullable error); /** * NewUdManagerFromBackup builds a new user discover manager from a backup. It @@ -1632,6 +1658,25 @@ Params */ FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsResumeBackup(long e2eID, long udID, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); +/** + * SearchUD searches user discovery for the passed Facts. The searchCallback +will return a list of contacts, each having the facts it hit against. This is +NOT intended to be used to search for multiple users at once; that can have a +privacy reduction. Instead, it is intended to be used to search for a user +where multiple pieces of information is known. + +Parameters: + - e2eID - e2e object ID in the tracker + - udContact - the marshalled bytes of the contact.Contact for the user + discovery server + - factListJSON - the JSON marshalled bytes of fact.FactList + - singleRequestParams - the JSON marshalled bytes of single.RequestParams + +Returns: + - []byte - the JSON marshalled bytes of SingleUseSendReport + */ +FOUNDATION_EXPORT NSData* _Nullable BindingsSearchUD(long e2eID, NSData* _Nullable udContact, id<BindingsUdSearchCallback> _Nullable cb, NSData* _Nullable factListJSON, NSData* _Nullable singleRequestParamsJSON, NSError* _Nullable* _Nullable error); + /** * SetFactsOnContact replaces the facts on the contact with the passed in facts pass in empty facts in order to clear the facts. @@ -1698,8 +1743,12 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsTransmitSingleUse(long e2eID, NSData @class BindingsStopper; +@class BindingsUdLookupCallback; + @class BindingsUdNetworkStatus; +@class BindingsUdSearchCallback; + @class BindingsUpdateBackupFunc; /** @@ -1940,6 +1989,23 @@ Parameters: - (void)stop; @end +/** + * UdLookupCallback contains the callback called by LookupUD that returns the +contact that matches the passed in ID. + +Parameters: + - contactBytes - the marshalled bytes of contact.Contact returned from the + lookup, or nil if an error occurs + - err - any errors that occurred in the lookup + */ +@interface BindingsUdLookupCallback : NSObject <goSeqRefInterface, BindingsUdLookupCallback> { +} +@property(strong, readonly) _Nonnull id _ref; + +- (nonnull instancetype)initWithRef:(_Nonnull id)ref; +- (void)callback:(NSData* _Nullable)contactBytes err:(NSError* _Nullable)err; +@end + /** * UdNetworkStatus contains the UdNetworkStatus, which is a bindings-level interface for ud.udNetworkStatus. @@ -1956,6 +2022,24 @@ interface for ud.udNetworkStatus. - (long)udNetworkStatus; @end +/** + * UdSearchCallback contains the callback called by SearchUD that returns a list +of contact.Contact objects that match the list of facts passed into +SearchUD. + +Parameters: + - contactListJSON - the JSON marshalled bytes of []contact.Contact, or nil + if an error occurs + - err - any errors that occurred in the search + */ +@interface BindingsUdSearchCallback : NSObject <goSeqRefInterface, BindingsUdSearchCallback> { +} +@property(strong, readonly) _Nonnull id _ref; + +- (nonnull instancetype)initWithRef:(_Nonnull id)ref; +- (void)callback:(NSData* _Nullable)contactListJSON err:(NSError* _Nullable)err; +@end + /** * UpdateBackupFunc contains a function callback that returns new backups. */ diff --git a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/Current/Bindings b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/Current/Bindings index f7ce222ffba175522c761fca3b7a412511ac4ed9..7463bb58b196e6187b4aee07f15acd218a1e7c6c 100644 Binary files a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/Current/Bindings and b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/Current/Bindings differ diff --git a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/Current/Headers/Bindings.objc.h b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/Current/Headers/Bindings.objc.h index 31a22fa5f38ab6e18e6f5e71a5417163f2bb746f..a56558d0ae166ee09f92bcb66c592ff5fae5c131 100644 --- a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/Current/Headers/Bindings.objc.h +++ b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/Current/Headers/Bindings.objc.h @@ -70,8 +70,12 @@ @class BindingsSingleUseResponse; @protocol BindingsStopper; @class BindingsStopper; +@protocol BindingsUdLookupCallback; +@class BindingsUdLookupCallback; @protocol BindingsUdNetworkStatus; @class BindingsUdNetworkStatus; +@protocol BindingsUdSearchCallback; +@class BindingsUdSearchCallback; @protocol BindingsUpdateBackupFunc; @class BindingsUpdateBackupFunc; @@ -175,6 +179,10 @@ Parameters: - (void)stop; @end +@protocol BindingsUdLookupCallback <NSObject> +- (void)callback:(NSData* _Nullable)contactBytes err:(NSError* _Nullable)err; +@end + @protocol BindingsUdNetworkStatus <NSObject> /** * UdNetworkStatus returns: @@ -183,6 +191,10 @@ Parameters: - (long)udNetworkStatus; @end +@protocol BindingsUdSearchCallback <NSObject> +- (void)callback:(NSData* _Nullable)contactListJSON err:(NSError* _Nullable)err; +@end + @protocol BindingsUpdateBackupFunc <NSObject> - (void)updateBackup:(NSData* _Nullable)encryptedBackup; @end @@ -237,7 +249,7 @@ storage. To enable backups again, call InitializeBackup. NewCmixFromBackup. Example BackupReport: -{"BackupIdListJson":"WyJPRHRRTTA4ZERpV3lXaE0wWUhjanRHWnZQcHRSa1JOZ1pHR2FkTG10dE9BRCJd","BackupParams":""} +{"RestoredContacts":["0AeVYBe87SV45A2UI4AtIe6H4AIyZSLPBPrT6eTBLycD"],"Params":""} */ @interface BindingsBackupReport : NSObject <goSeqRefInterface> { } @@ -245,14 +257,12 @@ Example BackupReport: - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (nonnull instancetype)init; -/** - * The JSON encoded list of E2E partner IDs - */ -@property (nonatomic) NSData* _Nullable backupIdListJson; +// skipped field BackupReport.RestoredContacts with unsupported type: gitlab.com/elixxir/client/bindings.IdList + /** * The backup parameters found within the backup file */ -@property (nonatomic) NSData* _Nullable backupParams; +@property (nonatomic) NSString* _Nonnull params; @end /** @@ -1441,10 +1451,10 @@ FOUNDATION_EXPORT BindingsFileTransfer* _Nullable BindingsInitFileTransfer(long Params - e2eID - ID of the E2e object in the e2e tracker. - udID - ID of the UserDiscovery object in the ud tracker. - - password - password used in LoadCmix. + - backupPassPhrase - backup passphrase provided by the user. Used to decrypt backup. - cb - the callback to be called when a backup is triggered. */ -FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsInitializeBackup(long e2eID, long udID, NSString* _Nullable password, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); +FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsInitializeBackup(long e2eID, long udID, NSString* _Nullable backupPassPhrase, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); /** * Listen starts a single-use listener on a given tag using the passed in e2e object @@ -1521,6 +1531,22 @@ here. If callbacks is left nil, a default auth.Callbacks will be used. */ FOUNDATION_EXPORT BindingsE2e* _Nullable BindingsLoginEphemeral(long cmixId, id<BindingsAuthCallbacks> _Nullable callbacks, NSData* _Nullable identity, NSData* _Nullable e2eParamsJSON, NSError* _Nullable* _Nullable error); +/** + * LookupUD returns the public key of the passed ID as known by the user +discovery system or returns by the timeout. + +Parameters: + - e2eID - e2e object ID in the tracker + - udContact - the marshalled bytes of the contact.Contact object + - udIdBytes - the marshalled bytes of the id.ID object for the user + discovery server + - singleRequestParams - the JSON marshalled bytes of single.RequestParams + +Returns: + - []byte - the JSON marshalled bytes of SingleUseSendReport + */ +FOUNDATION_EXPORT NSData* _Nullable BindingsLookupUD(long e2eID, NSData* _Nullable udContact, id<BindingsUdLookupCallback> _Nullable cb, NSData* _Nullable udIdBytes, NSData* _Nullable singleRequestParamsJSON, NSError* _Nullable* _Nullable error); + /** * NewBroadcastChannel creates a bindings-layer broadcast channel & starts listening for new messages @@ -1555,7 +1581,7 @@ Params Returns: - []byte - the JSON marshalled bytes of the BackupReport object. */ -FOUNDATION_EXPORT NSData* _Nullable BindingsNewCmixFromBackup(NSString* _Nullable ndfJSON, NSString* _Nullable storageDir, NSData* _Nullable sessionPassword, NSData* _Nullable backupPassphrase, NSData* _Nullable backupFileContents, NSError* _Nullable* _Nullable error); +FOUNDATION_EXPORT NSData* _Nullable BindingsNewCmixFromBackup(NSString* _Nullable ndfJSON, NSString* _Nullable storageDir, NSString* _Nullable backupPassphrase, NSData* _Nullable sessionPassword, NSData* _Nullable backupFileContents, NSError* _Nullable* _Nullable error); /** * NewUdManagerFromBackup builds a new user discover manager from a backup. It @@ -1632,6 +1658,25 @@ Params */ FOUNDATION_EXPORT BindingsBackup* _Nullable BindingsResumeBackup(long e2eID, long udID, id<BindingsUpdateBackupFunc> _Nullable cb, NSError* _Nullable* _Nullable error); +/** + * SearchUD searches user discovery for the passed Facts. The searchCallback +will return a list of contacts, each having the facts it hit against. This is +NOT intended to be used to search for multiple users at once; that can have a +privacy reduction. Instead, it is intended to be used to search for a user +where multiple pieces of information is known. + +Parameters: + - e2eID - e2e object ID in the tracker + - udContact - the marshalled bytes of the contact.Contact for the user + discovery server + - factListJSON - the JSON marshalled bytes of fact.FactList + - singleRequestParams - the JSON marshalled bytes of single.RequestParams + +Returns: + - []byte - the JSON marshalled bytes of SingleUseSendReport + */ +FOUNDATION_EXPORT NSData* _Nullable BindingsSearchUD(long e2eID, NSData* _Nullable udContact, id<BindingsUdSearchCallback> _Nullable cb, NSData* _Nullable factListJSON, NSData* _Nullable singleRequestParamsJSON, NSError* _Nullable* _Nullable error); + /** * SetFactsOnContact replaces the facts on the contact with the passed in facts pass in empty facts in order to clear the facts. @@ -1698,8 +1743,12 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsTransmitSingleUse(long e2eID, NSData @class BindingsStopper; +@class BindingsUdLookupCallback; + @class BindingsUdNetworkStatus; +@class BindingsUdSearchCallback; + @class BindingsUpdateBackupFunc; /** @@ -1940,6 +1989,23 @@ Parameters: - (void)stop; @end +/** + * UdLookupCallback contains the callback called by LookupUD that returns the +contact that matches the passed in ID. + +Parameters: + - contactBytes - the marshalled bytes of contact.Contact returned from the + lookup, or nil if an error occurs + - err - any errors that occurred in the lookup + */ +@interface BindingsUdLookupCallback : NSObject <goSeqRefInterface, BindingsUdLookupCallback> { +} +@property(strong, readonly) _Nonnull id _ref; + +- (nonnull instancetype)initWithRef:(_Nonnull id)ref; +- (void)callback:(NSData* _Nullable)contactBytes err:(NSError* _Nullable)err; +@end + /** * UdNetworkStatus contains the UdNetworkStatus, which is a bindings-level interface for ud.udNetworkStatus. @@ -1956,6 +2022,24 @@ interface for ud.udNetworkStatus. - (long)udNetworkStatus; @end +/** + * UdSearchCallback contains the callback called by SearchUD that returns a list +of contact.Contact objects that match the list of facts passed into +SearchUD. + +Parameters: + - contactListJSON - the JSON marshalled bytes of []contact.Contact, or nil + if an error occurs + - err - any errors that occurred in the search + */ +@interface BindingsUdSearchCallback : NSObject <goSeqRefInterface, BindingsUdSearchCallback> { +} +@property(strong, readonly) _Nonnull id _ref; + +- (nonnull instancetype)initWithRef:(_Nonnull id)ref; +- (void)callback:(NSData* _Nullable)contactListJSON err:(NSError* _Nullable)err; +@end + /** * UpdateBackupFunc contains a function callback that returns new backups. */