diff --git a/Frameworks/Bindings.txt b/Frameworks/Bindings.txt index 3a8cba407a495f4cd0879163424354ad892288a8..0ba5eba4c0b5434051e4b97bc071beaaf4bbee30 100644 --- a/Frameworks/Bindings.txt +++ b/Frameworks/Bindings.txt @@ -1,4 +1,4 @@ -https://git.xx.network/elixxir/client/-/commit/bb287e20aef30c7e9714696dd69ca735a56409da +https://git.xx.network/elixxir/client/-/commit/6bfab4444984a061837f4f2132cef11412a50d97 go version go1.19.3 darwin/arm64 Xcode 14.1 Build version 14B47b gomobile bind target: ios,iossimulator,macos diff --git a/Frameworks/Bindings.xcframework/Info.plist b/Frameworks/Bindings.xcframework/Info.plist index 43fe32dad94767ae305b61db56f5604f8612617e..3d81013ba0ba606da4b42b6f3119f688c6d9b97d 100644 --- a/Frameworks/Bindings.xcframework/Info.plist +++ b/Frameworks/Bindings.xcframework/Info.plist @@ -6,7 +6,7 @@ <array> <dict> <key>LibraryIdentifier</key> - <string>macos-arm64_x86_64</string> + <string>ios-arm64_x86_64-simulator</string> <key>LibraryPath</key> <string>Bindings.framework</string> <key>SupportedArchitectures</key> @@ -15,11 +15,13 @@ <string>x86_64</string> </array> <key>SupportedPlatform</key> - <string>macos</string> + <string>ios</string> + <key>SupportedPlatformVariant</key> + <string>simulator</string> </dict> <dict> <key>LibraryIdentifier</key> - <string>ios-arm64_x86_64-simulator</string> + <string>macos-arm64_x86_64</string> <key>LibraryPath</key> <string>Bindings.framework</string> <key>SupportedArchitectures</key> @@ -28,9 +30,7 @@ <string>x86_64</string> </array> <key>SupportedPlatform</key> - <string>ios</string> - <key>SupportedPlatformVariant</key> - <string>simulator</string> + <string>macos</string> </dict> <dict> <key>LibraryIdentifier</key> 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 8cdc2383f845d819e27a1ed7588b996dc86a8394..3b0ce816d035f24824aaafc849e1a6c1c7156163 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 0870dbbbb626c1dc4c5e030f6fec29a9e363c6cb..1961b0441d97c40e5a243f09d0db45a24090008f 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 @@ -862,9 +862,9 @@ health changes. Returns a registration ID that can be used to unregister. registrations up to the initialized maximum. Parameters: - - toRun - The number of parallel node registrations. - - timeoutMS - The timeout, in milliseconds, to wait when changing node - registrations before failing. + - toRun - The number of parallel node registrations. + - timeoutMS - The timeout, in milliseconds, to wait when changing node + registrations before failing. */ - (BOOL)changeNumberOfNodeRegistrations:(long)toRun timeoutMS:(long)timeoutMS error:(NSError* _Nullable* _Nullable)error; /** @@ -889,11 +889,11 @@ Parameters: * GetNodeRegistrationStatus returns the current state of node registration. Returns: - - []byte - A marshalled NodeRegistrationReport containing the number of - nodes the user is registered with and the number of nodes present in the - NDF. - - An error if it cannot get the node registration status. The most likely - cause is that the network is unhealthy. + - []byte - A marshalled NodeRegistrationReport containing the number of + nodes the user is registered with and the number of nodes present in the + NDF. + - An error if it cannot get the node registration status. The most likely + cause is that the network is unhealthy. */ - (NSData* _Nullable)getNodeRegistrationStatus:(NSError* _Nullable* _Nullable)error; /** @@ -907,13 +907,14 @@ of this call. Note that this list may change and is subject to race conditions if multiple threads are in the process of starting or stopping. Returns: - - []byte - A JSON marshalled list of all running processes. + - []byte - A JSON marshalled list of all running processes. JSON Example: - { - "FileTransfer{BatchBuilderThread, FilePartSendingThread#0, FilePartSendingThread#1, FilePartSendingThread#2, FilePartSendingThread#3}", - "MessageReception Worker 0" - } + + { + "FileTransfer{BatchBuilderThread, FilePartSendingThread#0, FilePartSendingThread#1, FilePartSendingThread#2, FilePartSendingThread#3}", + "MessageReception Worker 0" + } */ - (NSData* _Nullable)getRunningProcesses:(NSError* _Nullable* _Nullable)error; /** @@ -936,11 +937,11 @@ completed. If not all have completed, then it returns false and howClose will be a percent (0-1) of node registrations completed. Parameters: - - percentReady - The percentage of nodes required to be registered with to - be ready. This is a number between 0 and 1. + - percentReady - The percentage of nodes required to be registered with to + be ready. This is a number between 0 and 1. Returns: - - JSON of [IsReadyInfo]. + - JSON of [IsReadyInfo]. */ - (NSData* _Nullable)isReady:(double)percentReady error:(NSError* _Nullable* _Nullable)error; /** @@ -957,9 +958,10 @@ messages. /** * NetworkFollowerStatus gets the state of the network follower. It returns a status with the following values: - Stopped - 0 - Running - 2000 - Stopping - 3000 + + Stopped - 0 + Running - 2000 + Stopping - 3000 */ - (long)networkFollowerStatus; /** @@ -967,8 +969,8 @@ status with the following values: resume them. Parameters: - - timeoutMS - The timeout, in milliseconds, to wait when stopping threads - before failing. + - timeoutMS - The timeout, in milliseconds, to wait when stopping threads + before failing. */ - (BOOL)pauseNodeRegistrations:(long)timeoutMS error:(NSError* _Nullable* _Nullable)error; /** @@ -998,28 +1000,28 @@ These threads may become a significant drain on battery when offline, ensure they are stopped if there is no internet access. Threads Started: - - Network Follower (/network/follow.go) - tracks the network events and hands them off to workers for handling. - - Historical Round Retrieval (/network/rounds/historical.go) - retrieves data about rounds that are too old to be stored by the client. - - Message Retrieval Worker Group (/network/rounds/retrieve.go) - requests all messages in a given round from the gateway of the last nodes. - - Message Handling Worker Group (/network/message/handle.go) - decrypts and partitions messages when signals via the Switchboard. - - Health Tracker (/network/health), - via the network instance, tracks the state of the network. - - Garbled Messages (/network/message/garbled.go) - can be signaled to check all recent messages that could be decoded. It - uses a message store on disk for persistence. - - Critical Messages (/network/message/critical.go) - ensures all protocol layer mandatory messages are sent. It uses a message - store on disk for persistence. - - KeyExchange Trigger (/keyExchange/trigger.go) - responds to sent rekeys and executes them. - - KeyExchange Confirm (/keyExchange/confirm.go) - responds to confirmations of successful rekey operations. - - Auth Callback (/auth/callback.go) - handles both auth confirm and requests. + - Network Follower (/network/follow.go) + tracks the network events and hands them off to workers for handling. + - Historical Round Retrieval (/network/rounds/historical.go) + retrieves data about rounds that are too old to be stored by the client. + - Message Retrieval Worker Group (/network/rounds/retrieve.go) + requests all messages in a given round from the gateway of the last nodes. + - Message Handling Worker Group (/network/message/handle.go) + decrypts and partitions messages when signals via the Switchboard. + - Health Tracker (/network/health), + via the network instance, tracks the state of the network. + - Garbled Messages (/network/message/garbled.go) + can be signaled to check all recent messages that could be decoded. It + uses a message store on disk for persistence. + - Critical Messages (/network/message/critical.go) + ensures all protocol layer mandatory messages are sent. It uses a message + store on disk for persistence. + - KeyExchange Trigger (/keyExchange/trigger.go) + responds to sent rekeys and executes them. + - KeyExchange Confirm (/keyExchange/confirm.go) + responds to confirmations of successful rekey operations. + - Auth Callback (/auth/callback.go) + handles both auth confirm and requests. */ - (BOOL)startNetworkFollower:(long)timeoutMS error:(NSError* _Nullable* _Nullable)error; /** @@ -1035,11 +1037,14 @@ most likely be in an unrecoverable state and need to be trashed. * TrackServices will return via a callback the list of services the backend keeps track of, which is formally referred to as a [message.ServiceList]. This may be passed into other bindings call which -may need context on the available services for this client. +may need context on the available services for this client. This is the equivalent +of GetPreimages in APIv0. The callback will be called every time a new service +is added or an existing service is deleted. This serves as a way for +the caller to have the most up-to-date list of existing services. Parameters: - - cb - A TrackServicesCallback, which will be passed the marshalled - message.ServiceList. + - cb - A TrackServicesCallback, which will be passed the marshalled + message.ServiceList. */ - (void)trackServices:(id<BindingsTrackServicesCallback> _Nullable)cb; /** @@ -1970,10 +1975,11 @@ Example GroupSendReport JSON: is to being ready. Example JSON: - { - "IsReady": true, - "HowClose": 0.534 - } + + { + "IsReady": true, + "HowClose": 0.534 + } */ @interface BindingsIsReadyInfo : NSObject <goSeqRefInterface> { } @@ -2037,27 +2043,28 @@ Cmix.GetNodeRegistrationStatus returns JSON marshalled. this user. Example NotificationReport JSON: - { - "ForMe": true, - "Type": "e2e", - "Source": "dGVzdGVyMTIzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } + + { + "ForMe": true, + "Type": "e2e", + "Source": "dGVzdGVyMTIzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } Given the Type, the Source value will have specific contextual meanings. Below is a table that will define the contextual meaning of the Source field given all possible Type fields. - TYPE | SOURCE | DESCRIPTION - ----------+--------------------+-------------------------------------------------------- - "default" | recipient user ID | A message with no association. - "request" | sender user ID | A channel request has been received, from Source. - "reset" | sender user ID | A channel reset has been received. - "confirm" | sender user ID | A channel request has been accepted. - "silent" | sender user ID | A message where the user should not be notified. - "e2e" | sender user ID | A reception of an E2E message. - "group" | group ID | A reception of a group chat message. - "endFT" | sender user ID | The last message sent confirming end of file transfer. - "groupRQ" | sender user ID | A request from Source to join a group chat. + TYPE | SOURCE | DESCRIPTION + ----------+--------------------+-------------------------------------------------------- + "default" | recipient user ID | A message with no association. + "request" | sender user ID | A channel request has been received, from Source. + "reset" | sender user ID | A channel reset has been received. + "confirm" | sender user ID | A channel request has been accepted. + "silent" | sender user ID | A message where the user should not be notified. + "e2e" | sender user ID | A reception of an E2E message. + "group" | group ID | A reception of a group chat message. + "endFT" | sender user ID | The last message sent confirming end of file transfer. + "groupRQ" | sender user ID | A request from Source to join a group chat. */ @interface BindingsNotificationReport : NSObject <goSeqRefInterface> { } @@ -2715,16 +2722,17 @@ notifications are for this user. // This returns the JSON-marshalled NotificationReports. Parameters: - - e2eID - e2e object ID in the tracker - - notificationCSV - the notification data received from the - notifications' server. - - marshalledServices - the JSON-marshalled list of services the backend - keeps track of. Refer to Cmix.TrackServices for information about this. + - e2eID - e2e object ID in the tracker + - notificationCSV - the notification data received from the + notifications' server. + - marshalledServices - the JSON-marshalled list of services the backend + keeps track of. Refer to Cmix.TrackServices for information about this. This + is the equivalent to preimages in APIv0. Returns: - - []byte - A JSON marshalled NotificationReports. Some NotificationReport's - within in this structure may have their NotificationReport.ForMe - set to false. These may be ignored. + - []byte - A JSON marshalled NotificationReports. Some NotificationReport's + within in this structure may have their NotificationReport.ForMe + set to false. These may be ignored. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetNotificationsReport(long e2eId, NSString* _Nullable notificationCSV, NSData* _Nullable marshalledServices, NSError* _Nullable* _Nullable error); @@ -3164,7 +3172,7 @@ FOUNDATION_EXPORT BindingsUserDiscovery* _Nullable BindingsNewUdManagerFromBacku The token is a firebase messaging token. Parameters: - - e2eId - ID of the E2E object in the E2E tracker + - e2eId - ID of the E2E object in the E2E tracker */ FOUNDATION_EXPORT BOOL BindingsRegisterForNotifications(long e2eId, NSString* _Nullable token, NSError* _Nullable* _Nullable error); @@ -3320,7 +3328,7 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsTransmitSingleUse(long e2eID, NSData * UnregisterForNotifications turns off notifications for this client. Parameters: - - e2eId - ID of the E2E object in the E2E tracker + - e2eId - ID of the E2E object in the E2E tracker */ FOUNDATION_EXPORT BOOL BindingsUnregisterForNotifications(long e2eId, NSError* _Nullable* _Nullable error); @@ -3833,33 +3841,34 @@ If there was an error retrieving or marshalling the service list, there is an error for the second parameter which will be non-null. Parameters: - - marshalData - JSON marshalled bytes of [message.ServiceList], which is an - array of [id.ID] and [message.Service]. - - err - JSON unmarshalling error + - marshalData - JSON marshalled bytes of [message.ServiceList], which is an + array of [id.ID] and [message.Service]. + - err - JSON unmarshalling error Example JSON: - [ - { - "Id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD", // bytes of id.ID encoded as base64 string - "Services": [ - { - "Identifier": "AQID", // bytes encoded as base64 string - "Tag": "TestTag 1", // string - "Metadata": "BAUG" // bytes encoded as base64 string - } - ] - }, - { - "Id": "AAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD", - "Services": [ - { - "Identifier": "AQID", - "Tag": "TestTag 2", - "Metadata": "BAUG" - } - ] - }, - ] + + [ + { + "Id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD", // bytes of id.ID encoded as base64 string + "Services": [ + { + "Identifier": "AQID", // bytes encoded as base64 string + "Tag": "TestTag 1", // string + "Metadata": "BAUG" // bytes encoded as base64 string + } + ] + }, + { + "Id": "AAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD", + "Services": [ + { + "Identifier": "AQID", + "Tag": "TestTag 2", + "Metadata": "BAUG" + } + ] + }, + ] */ @interface BindingsTrackServicesCallback : NSObject <goSeqRefInterface, BindingsTrackServicesCallback> { } 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 25b137a68d2fd1b803cb59e53c6ea09a4e4554d2..fb5914ba4565ef2ef60df876c2851eb851b5100c 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 0870dbbbb626c1dc4c5e030f6fec29a9e363c6cb..1961b0441d97c40e5a243f09d0db45a24090008f 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 @@ -862,9 +862,9 @@ health changes. Returns a registration ID that can be used to unregister. registrations up to the initialized maximum. Parameters: - - toRun - The number of parallel node registrations. - - timeoutMS - The timeout, in milliseconds, to wait when changing node - registrations before failing. + - toRun - The number of parallel node registrations. + - timeoutMS - The timeout, in milliseconds, to wait when changing node + registrations before failing. */ - (BOOL)changeNumberOfNodeRegistrations:(long)toRun timeoutMS:(long)timeoutMS error:(NSError* _Nullable* _Nullable)error; /** @@ -889,11 +889,11 @@ Parameters: * GetNodeRegistrationStatus returns the current state of node registration. Returns: - - []byte - A marshalled NodeRegistrationReport containing the number of - nodes the user is registered with and the number of nodes present in the - NDF. - - An error if it cannot get the node registration status. The most likely - cause is that the network is unhealthy. + - []byte - A marshalled NodeRegistrationReport containing the number of + nodes the user is registered with and the number of nodes present in the + NDF. + - An error if it cannot get the node registration status. The most likely + cause is that the network is unhealthy. */ - (NSData* _Nullable)getNodeRegistrationStatus:(NSError* _Nullable* _Nullable)error; /** @@ -907,13 +907,14 @@ of this call. Note that this list may change and is subject to race conditions if multiple threads are in the process of starting or stopping. Returns: - - []byte - A JSON marshalled list of all running processes. + - []byte - A JSON marshalled list of all running processes. JSON Example: - { - "FileTransfer{BatchBuilderThread, FilePartSendingThread#0, FilePartSendingThread#1, FilePartSendingThread#2, FilePartSendingThread#3}", - "MessageReception Worker 0" - } + + { + "FileTransfer{BatchBuilderThread, FilePartSendingThread#0, FilePartSendingThread#1, FilePartSendingThread#2, FilePartSendingThread#3}", + "MessageReception Worker 0" + } */ - (NSData* _Nullable)getRunningProcesses:(NSError* _Nullable* _Nullable)error; /** @@ -936,11 +937,11 @@ completed. If not all have completed, then it returns false and howClose will be a percent (0-1) of node registrations completed. Parameters: - - percentReady - The percentage of nodes required to be registered with to - be ready. This is a number between 0 and 1. + - percentReady - The percentage of nodes required to be registered with to + be ready. This is a number between 0 and 1. Returns: - - JSON of [IsReadyInfo]. + - JSON of [IsReadyInfo]. */ - (NSData* _Nullable)isReady:(double)percentReady error:(NSError* _Nullable* _Nullable)error; /** @@ -957,9 +958,10 @@ messages. /** * NetworkFollowerStatus gets the state of the network follower. It returns a status with the following values: - Stopped - 0 - Running - 2000 - Stopping - 3000 + + Stopped - 0 + Running - 2000 + Stopping - 3000 */ - (long)networkFollowerStatus; /** @@ -967,8 +969,8 @@ status with the following values: resume them. Parameters: - - timeoutMS - The timeout, in milliseconds, to wait when stopping threads - before failing. + - timeoutMS - The timeout, in milliseconds, to wait when stopping threads + before failing. */ - (BOOL)pauseNodeRegistrations:(long)timeoutMS error:(NSError* _Nullable* _Nullable)error; /** @@ -998,28 +1000,28 @@ These threads may become a significant drain on battery when offline, ensure they are stopped if there is no internet access. Threads Started: - - Network Follower (/network/follow.go) - tracks the network events and hands them off to workers for handling. - - Historical Round Retrieval (/network/rounds/historical.go) - retrieves data about rounds that are too old to be stored by the client. - - Message Retrieval Worker Group (/network/rounds/retrieve.go) - requests all messages in a given round from the gateway of the last nodes. - - Message Handling Worker Group (/network/message/handle.go) - decrypts and partitions messages when signals via the Switchboard. - - Health Tracker (/network/health), - via the network instance, tracks the state of the network. - - Garbled Messages (/network/message/garbled.go) - can be signaled to check all recent messages that could be decoded. It - uses a message store on disk for persistence. - - Critical Messages (/network/message/critical.go) - ensures all protocol layer mandatory messages are sent. It uses a message - store on disk for persistence. - - KeyExchange Trigger (/keyExchange/trigger.go) - responds to sent rekeys and executes them. - - KeyExchange Confirm (/keyExchange/confirm.go) - responds to confirmations of successful rekey operations. - - Auth Callback (/auth/callback.go) - handles both auth confirm and requests. + - Network Follower (/network/follow.go) + tracks the network events and hands them off to workers for handling. + - Historical Round Retrieval (/network/rounds/historical.go) + retrieves data about rounds that are too old to be stored by the client. + - Message Retrieval Worker Group (/network/rounds/retrieve.go) + requests all messages in a given round from the gateway of the last nodes. + - Message Handling Worker Group (/network/message/handle.go) + decrypts and partitions messages when signals via the Switchboard. + - Health Tracker (/network/health), + via the network instance, tracks the state of the network. + - Garbled Messages (/network/message/garbled.go) + can be signaled to check all recent messages that could be decoded. It + uses a message store on disk for persistence. + - Critical Messages (/network/message/critical.go) + ensures all protocol layer mandatory messages are sent. It uses a message + store on disk for persistence. + - KeyExchange Trigger (/keyExchange/trigger.go) + responds to sent rekeys and executes them. + - KeyExchange Confirm (/keyExchange/confirm.go) + responds to confirmations of successful rekey operations. + - Auth Callback (/auth/callback.go) + handles both auth confirm and requests. */ - (BOOL)startNetworkFollower:(long)timeoutMS error:(NSError* _Nullable* _Nullable)error; /** @@ -1035,11 +1037,14 @@ most likely be in an unrecoverable state and need to be trashed. * TrackServices will return via a callback the list of services the backend keeps track of, which is formally referred to as a [message.ServiceList]. This may be passed into other bindings call which -may need context on the available services for this client. +may need context on the available services for this client. This is the equivalent +of GetPreimages in APIv0. The callback will be called every time a new service +is added or an existing service is deleted. This serves as a way for +the caller to have the most up-to-date list of existing services. Parameters: - - cb - A TrackServicesCallback, which will be passed the marshalled - message.ServiceList. + - cb - A TrackServicesCallback, which will be passed the marshalled + message.ServiceList. */ - (void)trackServices:(id<BindingsTrackServicesCallback> _Nullable)cb; /** @@ -1970,10 +1975,11 @@ Example GroupSendReport JSON: is to being ready. Example JSON: - { - "IsReady": true, - "HowClose": 0.534 - } + + { + "IsReady": true, + "HowClose": 0.534 + } */ @interface BindingsIsReadyInfo : NSObject <goSeqRefInterface> { } @@ -2037,27 +2043,28 @@ Cmix.GetNodeRegistrationStatus returns JSON marshalled. this user. Example NotificationReport JSON: - { - "ForMe": true, - "Type": "e2e", - "Source": "dGVzdGVyMTIzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } + + { + "ForMe": true, + "Type": "e2e", + "Source": "dGVzdGVyMTIzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } Given the Type, the Source value will have specific contextual meanings. Below is a table that will define the contextual meaning of the Source field given all possible Type fields. - TYPE | SOURCE | DESCRIPTION - ----------+--------------------+-------------------------------------------------------- - "default" | recipient user ID | A message with no association. - "request" | sender user ID | A channel request has been received, from Source. - "reset" | sender user ID | A channel reset has been received. - "confirm" | sender user ID | A channel request has been accepted. - "silent" | sender user ID | A message where the user should not be notified. - "e2e" | sender user ID | A reception of an E2E message. - "group" | group ID | A reception of a group chat message. - "endFT" | sender user ID | The last message sent confirming end of file transfer. - "groupRQ" | sender user ID | A request from Source to join a group chat. + TYPE | SOURCE | DESCRIPTION + ----------+--------------------+-------------------------------------------------------- + "default" | recipient user ID | A message with no association. + "request" | sender user ID | A channel request has been received, from Source. + "reset" | sender user ID | A channel reset has been received. + "confirm" | sender user ID | A channel request has been accepted. + "silent" | sender user ID | A message where the user should not be notified. + "e2e" | sender user ID | A reception of an E2E message. + "group" | group ID | A reception of a group chat message. + "endFT" | sender user ID | The last message sent confirming end of file transfer. + "groupRQ" | sender user ID | A request from Source to join a group chat. */ @interface BindingsNotificationReport : NSObject <goSeqRefInterface> { } @@ -2715,16 +2722,17 @@ notifications are for this user. // This returns the JSON-marshalled NotificationReports. Parameters: - - e2eID - e2e object ID in the tracker - - notificationCSV - the notification data received from the - notifications' server. - - marshalledServices - the JSON-marshalled list of services the backend - keeps track of. Refer to Cmix.TrackServices for information about this. + - e2eID - e2e object ID in the tracker + - notificationCSV - the notification data received from the + notifications' server. + - marshalledServices - the JSON-marshalled list of services the backend + keeps track of. Refer to Cmix.TrackServices for information about this. This + is the equivalent to preimages in APIv0. Returns: - - []byte - A JSON marshalled NotificationReports. Some NotificationReport's - within in this structure may have their NotificationReport.ForMe - set to false. These may be ignored. + - []byte - A JSON marshalled NotificationReports. Some NotificationReport's + within in this structure may have their NotificationReport.ForMe + set to false. These may be ignored. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetNotificationsReport(long e2eId, NSString* _Nullable notificationCSV, NSData* _Nullable marshalledServices, NSError* _Nullable* _Nullable error); @@ -3164,7 +3172,7 @@ FOUNDATION_EXPORT BindingsUserDiscovery* _Nullable BindingsNewUdManagerFromBacku The token is a firebase messaging token. Parameters: - - e2eId - ID of the E2E object in the E2E tracker + - e2eId - ID of the E2E object in the E2E tracker */ FOUNDATION_EXPORT BOOL BindingsRegisterForNotifications(long e2eId, NSString* _Nullable token, NSError* _Nullable* _Nullable error); @@ -3320,7 +3328,7 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsTransmitSingleUse(long e2eID, NSData * UnregisterForNotifications turns off notifications for this client. Parameters: - - e2eId - ID of the E2E object in the E2E tracker + - e2eId - ID of the E2E object in the E2E tracker */ FOUNDATION_EXPORT BOOL BindingsUnregisterForNotifications(long e2eId, NSError* _Nullable* _Nullable error); @@ -3833,33 +3841,34 @@ If there was an error retrieving or marshalling the service list, there is an error for the second parameter which will be non-null. Parameters: - - marshalData - JSON marshalled bytes of [message.ServiceList], which is an - array of [id.ID] and [message.Service]. - - err - JSON unmarshalling error + - marshalData - JSON marshalled bytes of [message.ServiceList], which is an + array of [id.ID] and [message.Service]. + - err - JSON unmarshalling error Example JSON: - [ - { - "Id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD", // bytes of id.ID encoded as base64 string - "Services": [ - { - "Identifier": "AQID", // bytes encoded as base64 string - "Tag": "TestTag 1", // string - "Metadata": "BAUG" // bytes encoded as base64 string - } - ] - }, - { - "Id": "AAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD", - "Services": [ - { - "Identifier": "AQID", - "Tag": "TestTag 2", - "Metadata": "BAUG" - } - ] - }, - ] + + [ + { + "Id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD", // bytes of id.ID encoded as base64 string + "Services": [ + { + "Identifier": "AQID", // bytes encoded as base64 string + "Tag": "TestTag 1", // string + "Metadata": "BAUG" // bytes encoded as base64 string + } + ] + }, + { + "Id": "AAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD", + "Services": [ + { + "Identifier": "AQID", + "Tag": "TestTag 2", + "Metadata": "BAUG" + } + ] + }, + ] */ @interface BindingsTrackServicesCallback : NSObject <goSeqRefInterface, BindingsTrackServicesCallback> { } diff --git a/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Bindings b/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Bindings index 69d5af972a3011bdbf304b29099ec4389fe5b765..a2c39858c2effaf8ff2e59657cb06ba5e7549f97 100644 Binary files a/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Bindings and b/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Bindings differ diff --git a/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Headers/Bindings.objc.h b/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Headers/Bindings.objc.h index 0870dbbbb626c1dc4c5e030f6fec29a9e363c6cb..1961b0441d97c40e5a243f09d0db45a24090008f 100644 --- a/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Headers/Bindings.objc.h +++ b/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Headers/Bindings.objc.h @@ -862,9 +862,9 @@ health changes. Returns a registration ID that can be used to unregister. registrations up to the initialized maximum. Parameters: - - toRun - The number of parallel node registrations. - - timeoutMS - The timeout, in milliseconds, to wait when changing node - registrations before failing. + - toRun - The number of parallel node registrations. + - timeoutMS - The timeout, in milliseconds, to wait when changing node + registrations before failing. */ - (BOOL)changeNumberOfNodeRegistrations:(long)toRun timeoutMS:(long)timeoutMS error:(NSError* _Nullable* _Nullable)error; /** @@ -889,11 +889,11 @@ Parameters: * GetNodeRegistrationStatus returns the current state of node registration. Returns: - - []byte - A marshalled NodeRegistrationReport containing the number of - nodes the user is registered with and the number of nodes present in the - NDF. - - An error if it cannot get the node registration status. The most likely - cause is that the network is unhealthy. + - []byte - A marshalled NodeRegistrationReport containing the number of + nodes the user is registered with and the number of nodes present in the + NDF. + - An error if it cannot get the node registration status. The most likely + cause is that the network is unhealthy. */ - (NSData* _Nullable)getNodeRegistrationStatus:(NSError* _Nullable* _Nullable)error; /** @@ -907,13 +907,14 @@ of this call. Note that this list may change and is subject to race conditions if multiple threads are in the process of starting or stopping. Returns: - - []byte - A JSON marshalled list of all running processes. + - []byte - A JSON marshalled list of all running processes. JSON Example: - { - "FileTransfer{BatchBuilderThread, FilePartSendingThread#0, FilePartSendingThread#1, FilePartSendingThread#2, FilePartSendingThread#3}", - "MessageReception Worker 0" - } + + { + "FileTransfer{BatchBuilderThread, FilePartSendingThread#0, FilePartSendingThread#1, FilePartSendingThread#2, FilePartSendingThread#3}", + "MessageReception Worker 0" + } */ - (NSData* _Nullable)getRunningProcesses:(NSError* _Nullable* _Nullable)error; /** @@ -936,11 +937,11 @@ completed. If not all have completed, then it returns false and howClose will be a percent (0-1) of node registrations completed. Parameters: - - percentReady - The percentage of nodes required to be registered with to - be ready. This is a number between 0 and 1. + - percentReady - The percentage of nodes required to be registered with to + be ready. This is a number between 0 and 1. Returns: - - JSON of [IsReadyInfo]. + - JSON of [IsReadyInfo]. */ - (NSData* _Nullable)isReady:(double)percentReady error:(NSError* _Nullable* _Nullable)error; /** @@ -957,9 +958,10 @@ messages. /** * NetworkFollowerStatus gets the state of the network follower. It returns a status with the following values: - Stopped - 0 - Running - 2000 - Stopping - 3000 + + Stopped - 0 + Running - 2000 + Stopping - 3000 */ - (long)networkFollowerStatus; /** @@ -967,8 +969,8 @@ status with the following values: resume them. Parameters: - - timeoutMS - The timeout, in milliseconds, to wait when stopping threads - before failing. + - timeoutMS - The timeout, in milliseconds, to wait when stopping threads + before failing. */ - (BOOL)pauseNodeRegistrations:(long)timeoutMS error:(NSError* _Nullable* _Nullable)error; /** @@ -998,28 +1000,28 @@ These threads may become a significant drain on battery when offline, ensure they are stopped if there is no internet access. Threads Started: - - Network Follower (/network/follow.go) - tracks the network events and hands them off to workers for handling. - - Historical Round Retrieval (/network/rounds/historical.go) - retrieves data about rounds that are too old to be stored by the client. - - Message Retrieval Worker Group (/network/rounds/retrieve.go) - requests all messages in a given round from the gateway of the last nodes. - - Message Handling Worker Group (/network/message/handle.go) - decrypts and partitions messages when signals via the Switchboard. - - Health Tracker (/network/health), - via the network instance, tracks the state of the network. - - Garbled Messages (/network/message/garbled.go) - can be signaled to check all recent messages that could be decoded. It - uses a message store on disk for persistence. - - Critical Messages (/network/message/critical.go) - ensures all protocol layer mandatory messages are sent. It uses a message - store on disk for persistence. - - KeyExchange Trigger (/keyExchange/trigger.go) - responds to sent rekeys and executes them. - - KeyExchange Confirm (/keyExchange/confirm.go) - responds to confirmations of successful rekey operations. - - Auth Callback (/auth/callback.go) - handles both auth confirm and requests. + - Network Follower (/network/follow.go) + tracks the network events and hands them off to workers for handling. + - Historical Round Retrieval (/network/rounds/historical.go) + retrieves data about rounds that are too old to be stored by the client. + - Message Retrieval Worker Group (/network/rounds/retrieve.go) + requests all messages in a given round from the gateway of the last nodes. + - Message Handling Worker Group (/network/message/handle.go) + decrypts and partitions messages when signals via the Switchboard. + - Health Tracker (/network/health), + via the network instance, tracks the state of the network. + - Garbled Messages (/network/message/garbled.go) + can be signaled to check all recent messages that could be decoded. It + uses a message store on disk for persistence. + - Critical Messages (/network/message/critical.go) + ensures all protocol layer mandatory messages are sent. It uses a message + store on disk for persistence. + - KeyExchange Trigger (/keyExchange/trigger.go) + responds to sent rekeys and executes them. + - KeyExchange Confirm (/keyExchange/confirm.go) + responds to confirmations of successful rekey operations. + - Auth Callback (/auth/callback.go) + handles both auth confirm and requests. */ - (BOOL)startNetworkFollower:(long)timeoutMS error:(NSError* _Nullable* _Nullable)error; /** @@ -1035,11 +1037,14 @@ most likely be in an unrecoverable state and need to be trashed. * TrackServices will return via a callback the list of services the backend keeps track of, which is formally referred to as a [message.ServiceList]. This may be passed into other bindings call which -may need context on the available services for this client. +may need context on the available services for this client. This is the equivalent +of GetPreimages in APIv0. The callback will be called every time a new service +is added or an existing service is deleted. This serves as a way for +the caller to have the most up-to-date list of existing services. Parameters: - - cb - A TrackServicesCallback, which will be passed the marshalled - message.ServiceList. + - cb - A TrackServicesCallback, which will be passed the marshalled + message.ServiceList. */ - (void)trackServices:(id<BindingsTrackServicesCallback> _Nullable)cb; /** @@ -1970,10 +1975,11 @@ Example GroupSendReport JSON: is to being ready. Example JSON: - { - "IsReady": true, - "HowClose": 0.534 - } + + { + "IsReady": true, + "HowClose": 0.534 + } */ @interface BindingsIsReadyInfo : NSObject <goSeqRefInterface> { } @@ -2037,27 +2043,28 @@ Cmix.GetNodeRegistrationStatus returns JSON marshalled. this user. Example NotificationReport JSON: - { - "ForMe": true, - "Type": "e2e", - "Source": "dGVzdGVyMTIzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } + + { + "ForMe": true, + "Type": "e2e", + "Source": "dGVzdGVyMTIzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } Given the Type, the Source value will have specific contextual meanings. Below is a table that will define the contextual meaning of the Source field given all possible Type fields. - TYPE | SOURCE | DESCRIPTION - ----------+--------------------+-------------------------------------------------------- - "default" | recipient user ID | A message with no association. - "request" | sender user ID | A channel request has been received, from Source. - "reset" | sender user ID | A channel reset has been received. - "confirm" | sender user ID | A channel request has been accepted. - "silent" | sender user ID | A message where the user should not be notified. - "e2e" | sender user ID | A reception of an E2E message. - "group" | group ID | A reception of a group chat message. - "endFT" | sender user ID | The last message sent confirming end of file transfer. - "groupRQ" | sender user ID | A request from Source to join a group chat. + TYPE | SOURCE | DESCRIPTION + ----------+--------------------+-------------------------------------------------------- + "default" | recipient user ID | A message with no association. + "request" | sender user ID | A channel request has been received, from Source. + "reset" | sender user ID | A channel reset has been received. + "confirm" | sender user ID | A channel request has been accepted. + "silent" | sender user ID | A message where the user should not be notified. + "e2e" | sender user ID | A reception of an E2E message. + "group" | group ID | A reception of a group chat message. + "endFT" | sender user ID | The last message sent confirming end of file transfer. + "groupRQ" | sender user ID | A request from Source to join a group chat. */ @interface BindingsNotificationReport : NSObject <goSeqRefInterface> { } @@ -2715,16 +2722,17 @@ notifications are for this user. // This returns the JSON-marshalled NotificationReports. Parameters: - - e2eID - e2e object ID in the tracker - - notificationCSV - the notification data received from the - notifications' server. - - marshalledServices - the JSON-marshalled list of services the backend - keeps track of. Refer to Cmix.TrackServices for information about this. + - e2eID - e2e object ID in the tracker + - notificationCSV - the notification data received from the + notifications' server. + - marshalledServices - the JSON-marshalled list of services the backend + keeps track of. Refer to Cmix.TrackServices for information about this. This + is the equivalent to preimages in APIv0. Returns: - - []byte - A JSON marshalled NotificationReports. Some NotificationReport's - within in this structure may have their NotificationReport.ForMe - set to false. These may be ignored. + - []byte - A JSON marshalled NotificationReports. Some NotificationReport's + within in this structure may have their NotificationReport.ForMe + set to false. These may be ignored. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetNotificationsReport(long e2eId, NSString* _Nullable notificationCSV, NSData* _Nullable marshalledServices, NSError* _Nullable* _Nullable error); @@ -3164,7 +3172,7 @@ FOUNDATION_EXPORT BindingsUserDiscovery* _Nullable BindingsNewUdManagerFromBacku The token is a firebase messaging token. Parameters: - - e2eId - ID of the E2E object in the E2E tracker + - e2eId - ID of the E2E object in the E2E tracker */ FOUNDATION_EXPORT BOOL BindingsRegisterForNotifications(long e2eId, NSString* _Nullable token, NSError* _Nullable* _Nullable error); @@ -3320,7 +3328,7 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsTransmitSingleUse(long e2eID, NSData * UnregisterForNotifications turns off notifications for this client. Parameters: - - e2eId - ID of the E2E object in the E2E tracker + - e2eId - ID of the E2E object in the E2E tracker */ FOUNDATION_EXPORT BOOL BindingsUnregisterForNotifications(long e2eId, NSError* _Nullable* _Nullable error); @@ -3833,33 +3841,34 @@ If there was an error retrieving or marshalling the service list, there is an error for the second parameter which will be non-null. Parameters: - - marshalData - JSON marshalled bytes of [message.ServiceList], which is an - array of [id.ID] and [message.Service]. - - err - JSON unmarshalling error + - marshalData - JSON marshalled bytes of [message.ServiceList], which is an + array of [id.ID] and [message.Service]. + - err - JSON unmarshalling error Example JSON: - [ - { - "Id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD", // bytes of id.ID encoded as base64 string - "Services": [ - { - "Identifier": "AQID", // bytes encoded as base64 string - "Tag": "TestTag 1", // string - "Metadata": "BAUG" // bytes encoded as base64 string - } - ] - }, - { - "Id": "AAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD", - "Services": [ - { - "Identifier": "AQID", - "Tag": "TestTag 2", - "Metadata": "BAUG" - } - ] - }, - ] + + [ + { + "Id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD", // bytes of id.ID encoded as base64 string + "Services": [ + { + "Identifier": "AQID", // bytes encoded as base64 string + "Tag": "TestTag 1", // string + "Metadata": "BAUG" // bytes encoded as base64 string + } + ] + }, + { + "Id": "AAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD", + "Services": [ + { + "Identifier": "AQID", + "Tag": "TestTag 2", + "Metadata": "BAUG" + } + ] + }, + ] */ @interface BindingsTrackServicesCallback : NSObject <goSeqRefInterface, BindingsTrackServicesCallback> { }