diff --git a/Frameworks/Bindings.txt b/Frameworks/Bindings.txt index d38c6191e6b7efaeaefb18d4107cfdb300a18274..3e5d533ac45dc9ce1e158953db4c5e6a45bebfb0 100644 --- a/Frameworks/Bindings.txt +++ b/Frameworks/Bindings.txt @@ -1,4 +1,4 @@ -https://git.xx.network/elixxir/client/-/commit/7a48e9fb32831c90532d059148da03453a9093b7 +https://git.xx.network/elixxir/client/-/commit/118de443434478c16f16220858c54fb1237fc342 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 e66824e5243985b4ac053ef62aeaaf571fe03970..43fe32dad94767ae305b61db56f5604f8612617e 100644 --- a/Frameworks/Bindings.xcframework/Info.plist +++ b/Frameworks/Bindings.xcframework/Info.plist @@ -6,7 +6,7 @@ <array> <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> @@ -15,34 +15,34 @@ <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> - <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> <dict> <key>LibraryIdentifier</key> - <string>macos-arm64_x86_64</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>macos</string> + <string>ios</string> </dict> </array> <key>CFBundlePackageType</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 9523b4aac9e1c29073e98d8728546d947098e37a..4b0ee2902564f493694ba1b4e2b7441f4ff8b61a 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 dcf46cd4439785f4f904ea1f41277a66ed3e7db9..29b692cb622e84ca73a5d29b1f3954765ffb29db 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 @@ -470,7 +470,7 @@ be returned by this function. Any padding will be discarded within this function. Parameters: - - ciphertext - the encrypted data returned by [ChannelDbCipher.Encrypt]. + - ciphertext - the encrypted data returned by [ChannelDbCipher.Encrypt]. */ - (NSData* _Nullable)decrypt:(NSData* _Nullable)ciphertext error:(NSError* _Nullable* _Nullable)error; /** @@ -478,15 +478,28 @@ Parameters: done on the plaintext so all encrypted data looks uniform at rest. Parameters: - - plaintext - The data to be encrypted. This must be smaller than the block - size passed into [NewChannelsDatabaseCipher]. If it is larger, this will - return an error. + - plaintext - The data to be encrypted. This must be smaller than the block + size passed into [NewChannelsDatabaseCipher]. If it is larger, this will + return an error. */ - (NSData* _Nullable)encrypt:(NSData* _Nullable)plaintext error:(NSError* _Nullable* _Nullable)error; /** * GetID returns the ID for this ChannelDbCipher in the channelDbCipherTracker. */ - (long)getID; +/** + * MarshalJSON marshals the cipher into valid JSON. This function adheres to the +json.Marshaler interface. + */ +- (NSData* _Nullable)marshalJSON:(NSError* _Nullable* _Nullable)error; +/** + * UnmarshalJSON unmarshalls JSON into the cipher. This function adheres to the +json.Unmarshaler interface. + +Note that this function does not transfer the internal RNG. Use +NewCipherFromJSON to properly reconstruct a cipher from JSON. + */ +- (BOOL)unmarshalJSON:(NSData* _Nullable)data error:(NSError* _Nullable* _Nullable)error; @end /** @@ -495,10 +508,11 @@ contains the public channel info formatted in pretty print and the private key for the channel in PEM format. Example JSON: - { - "Channel": "\u003cSpeakeasy-v3:name|description:desc|level:Public|created:1665489600000000000|secrets:zjHmrPPMDQ0tNSANjAmQfKhRpJIdJMU+Hz5hsZ+fVpk=|qozRNkADprqb38lsnU7WxCtGCq9OChlySCEgl4NHjI4=|2|328|7aZQAtuVjE84q4Z09iGytTSXfZj9NyTa6qBp0ueKjCI=\u003e", - "PrivateKey": "-----BEGIN RSA PRIVATE KEY-----\nMCYCAQACAwDVywIDAQABAgMAlVECAgDvAgIA5QICAJECAgCVAgIA1w==\n-----END RSA PRIVATE KEY-----" - } + + { + "Channel": "\u003cSpeakeasy-v3:name|description:desc|level:Public|created:1665489600000000000|secrets:zjHmrPPMDQ0tNSANjAmQfKhRpJIdJMU+Hz5hsZ+fVpk=|qozRNkADprqb38lsnU7WxCtGCq9OChlySCEgl4NHjI4=|2|328|7aZQAtuVjE84q4Z09iGytTSXfZj9NyTa6qBp0ueKjCI=\u003e", + "PrivateKey": "-----BEGIN RSA PRIVATE KEY-----\nMCYCAQACAwDVywIDAQABAgMAlVECAgDvAgIA5QICAJECAgCVAgIA1w==\n-----END RSA PRIVATE KEY-----" + } */ @interface BindingsChannelGeneration : NSObject <goSeqRefInterface> { } @@ -514,11 +528,12 @@ Example JSON: * ChannelInfo contains information about a channel. Example of ChannelInfo JSON: - { - "Name": "Test Channel", - "Description": "This is a test channel", - "ChannelID": "RRnpRhmvXtW9ugS1nILJ3WfttdctDvC2jeuH43E0g/0D", - } + + { + "Name": "Test Channel", + "Description": "This is a test channel", + "ChannelID": "RRnpRhmvXtW9ugS1nILJ3WfttdctDvC2jeuH43E0g/0D", + } */ @interface BindingsChannelInfo : NSObject <goSeqRefInterface> { } @@ -536,11 +551,12 @@ Example of ChannelInfo JSON: ChannelsManager's Send operations. JSON Example: - { - "MessageId": "0kitNxoFdsF4q1VMSI/xPzfCnGB2l+ln2+7CTHjHbJw=", - "Rounds":[1,5,9], - "EphId": 0 - } + + { + "MessageId": "0kitNxoFdsF4q1VMSI/xPzfCnGB2l+ln2+7CTHjHbJw=", + "Rounds":[1,5,9], + "EphId": 0 + } */ @interface BindingsChannelSendReport : NSObject <goSeqRefInterface> { } @@ -574,12 +590,12 @@ reload this channel manager, use [LoadChannelsManager], passing in the storage tag retrieved by [ChannelsManager.GetStorageTag]. Parameters: - - cmixID - The tracked Cmix object ID. This can be retrieved using - [Cmix.GetID]. - - privateIdentity - Bytes of a private identity ([channel.PrivateIdentity]) - that is generated by [GenerateChannelIdentity]. - - event - An interface that contains a function that initialises and returns - the event model that is bindings-compatible. + - cmixID - The tracked Cmix object ID. This can be retrieved using + [Cmix.GetID]. + - privateIdentity - Bytes of a private identity ([channel.PrivateIdentity]) + that is generated by [GenerateChannelIdentity]. + - event - An interface that contains a function that initialises and returns + the event model that is bindings-compatible. */ - (nullable instancetype)init:(long)cmixID privateIdentity:(NSData* _Nullable)privateIdentity eventBuilder:(id<BindingsEventModelBuilder> _Nullable)eventBuilder; // skipped constructor ChannelsManager.NewChannelsManagerGoEventModel with unsupported parameter or return types @@ -597,13 +613,14 @@ string. * GetChannels returns the IDs of all channels that have been joined. Returns: - - []byte - A JSON marshalled list of IDs. + - []byte - A JSON marshalled list of IDs. JSON Example: - { - "U4x/lrFkvxuXu59LtHLon1sUhPJSCcnZND6SugndnVID", - "15tNdkKbYXoMn58NO6VbDMDWFEyIhTWEGsvgcJsHWAgD" - } + + { + "U4x/lrFkvxuXu59LtHLon1sUhPJSCcnZND6SugndnVID", + "15tNdkKbYXoMn58NO6VbDMDWFEyIhTWEGsvgcJsHWAgD" + } */ - (NSData* _Nullable)getChannels:(NSError* _Nullable* _Nullable)error; /** @@ -639,14 +656,14 @@ calling [ChannelsManager.JoinChannelFromURL]. There is no enforcement for public URLs. Parameters: - - cmixID - The tracked Cmix object ID. - - host - The URL to append the channel info to. - - maxUses - The maximum number of uses the link can be used (0 for - unlimited). - - marshalledChanId - A marshalled channel ID ([id.ID]). + - cmixID - The tracked Cmix object ID. + - host - The URL to append the channel info to. + - maxUses - The maximum number of uses the link can be used (0 for + unlimited). + - marshalledChanId - A marshalled channel ID ([id.ID]). Returns: - - JSON of ShareURL. + - JSON of ShareURL. */ - (NSData* _Nullable)getShareURL:(long)cmixID host:(NSString* _Nullable)host maxUses:(long)maxUses marshalledChanId:(NSData* _Nullable)marshalledChanId error:(NSError* _Nullable* _Nullable)error; /** @@ -658,14 +675,15 @@ Returns: been joined. Parameters: - - channelPretty - A portable channel string. Should be received from - another user or generated via GenerateChannel. + - channelPretty - A portable channel string. Should be received from + another user or generated via GenerateChannel. The pretty print will be of the format: - <Speakeasy-v3:Test_Channel|description:Channel description.|level:Public|created:1666718081766741100|secrets:+oHcqDbJPZaT3xD5NcdLY8OjOMtSQNKdKgLPmr7ugdU=|rCI0wr01dHFStjSFMvsBzFZClvDIrHLL5xbCOPaUOJ0=|493|1|7cBhJxVfQxWo+DypOISRpeWdQBhuQpAZtUbQHjBm8NQ=> + + <Speakeasy-v3:Test_Channel|description:Channel description.|level:Public|created:1666718081766741100|secrets:+oHcqDbJPZaT3xD5NcdLY8OjOMtSQNKdKgLPmr7ugdU=|rCI0wr01dHFStjSFMvsBzFZClvDIrHLL5xbCOPaUOJ0=|493|1|7cBhJxVfQxWo+DypOISRpeWdQBhuQpAZtUbQHjBm8NQ=> Returns: - - []byte - JSON of [ChannelInfo], which describes all relevant channel info. + - []byte - JSON of [ChannelInfo], which describes all relevant channel info. */ - (NSData* _Nullable)joinChannel:(NSString* _Nullable)channelPretty error:(NSError* _Nullable* _Nullable)error; /** @@ -673,7 +691,7 @@ Returns: channel was not previously joined. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). */ - (BOOL)leaveChannel:(NSData* _Nullable)marshalledChanId error:(NSError* _Nullable* _Nullable)error; /** @@ -685,10 +703,10 @@ There can only be one handler per [channels.MessageType], and this will return an error on any re-registration. Parameters: - - messageType - represents the [channels.MessageType] which will have a - registered listener. - - listenerCb - the callback which will be executed when a channel message - of messageType is received. + - messageType - represents the [channels.MessageType] which will have a + registered listener. + - listenerCb - the callback which will be executed when a channel message + of messageType is received. */ - (BOOL)registerReceiveHandler:(long)messageType listenerCb:(id<BindingsChannelMessageReceptionCallback> _Nullable)listenerCb error:(NSError* _Nullable* _Nullable)error; /** @@ -696,7 +714,7 @@ Parameters: memory (~3 weeks) over the event model. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). */ - (BOOL)replayChannel:(NSData* _Nullable)marshalledChanId error:(NSError* _Nullable* _Nullable)error; /** @@ -707,23 +725,23 @@ before being sent over the wire, is too long, this will return an error. The message must be at most 510 bytes long. Parameters: - - adminPrivateKey - The PEM-encoded admin RSA private key. - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - messageType - The message type of the message. This will be a valid - [channels.MessageType]. - - message - The contents of the message. The message should be at most 510 - bytes. This need not be of data type string, as the message could be a - specified format that the channel may recognize. - - leaseTimeMS - The lease of the message. This will be how long the message - is valid until, in milliseconds. As per the channels.Manager - documentation, this has different meanings depending on the use case. - These use cases may be generic enough that they will not be enumerated - here. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, - and GetDefaultCMixParams will be used internally. + - adminPrivateKey - The PEM-encoded admin RSA private key. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - messageType - The message type of the message. This will be a valid + [channels.MessageType]. + - message - The contents of the message. The message should be at most 510 + bytes. This need not be of data type string, as the message could be a + specified format that the channel may recognize. + - leaseTimeMS - The lease of the message. This will be how long the message + is valid until, in milliseconds. As per the channels.Manager + documentation, this has different meanings depending on the use case. + These use cases may be generic enough that they will not be enumerated + here. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, + and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport. + - []byte - A JSON marshalled ChannelSendReport. */ - (NSData* _Nullable)sendAdminGeneric:(NSData* _Nullable)adminPrivateKey marshalledChanId:(NSData* _Nullable)marshalledChanId messageType:(long)messageType message:(NSData* _Nullable)message leaseTimeMS:(int64_t)leaseTimeMS cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -736,22 +754,22 @@ to send a payload of 802 bytes at minimum. The meaning of validUntil depends on the use case. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - messageType - The message type of the message. This will be a valid - [channels.MessageType]. - - message - The contents of the message. This need not be of data type - string, as the message could be a specified format that the channel may - recognize. - - leaseTimeMS - The lease of the message. This will be how long the message - is valid until, in milliseconds. As per the channels.Manager - documentation, this has different meanings depending on the use case. - These use cases may be generic enough that they will not be enumerated - here. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, - and GetDefaultCMixParams will be used internally. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - messageType - The message type of the message. This will be a valid + [channels.MessageType]. + - message - The contents of the message. This need not be of data type + string, as the message could be a specified format that the channel may + recognize. + - leaseTimeMS - The lease of the message. This will be how long the message + is valid until, in milliseconds. As per the channels.Manager + documentation, this has different meanings depending on the use case. + These use cases may be generic enough that they will not be enumerated + here. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, + and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport. + - []byte - A JSON marshalled ChannelSendReport. */ - (NSData* _Nullable)sendGeneric:(NSData* _Nullable)marshalledChanId messageType:(long)messageType message:(NSData* _Nullable)message leaseTimeMS:(int64_t)leaseTimeMS cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -764,20 +782,20 @@ The message will auto delete validUntil after the round it is sent in, lasting forever if [channels.ValidForever] is used. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - message - The contents of the message. The message should be at most 510 - bytes. This is expected to be Unicode, and thus a string data type is - expected - - leaseTimeMS - The lease of the message. This will be how long the message - is valid until, in milliseconds. As per the channels.Manager - documentation, this has different meanings depending on the use case. - These use cases may be generic enough that they will not be enumerated - here. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be - empty, and GetDefaultCMixParams will be used internally. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - message - The contents of the message. The message should be at most 510 + bytes. This is expected to be Unicode, and thus a string data type is + expected + - leaseTimeMS - The lease of the message. This will be how long the message + is valid until, in milliseconds. As per the channels.Manager + documentation, this has different meanings depending on the use case. + These use cases may be generic enough that they will not be enumerated + here. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be + empty, and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport + - []byte - A JSON marshalled ChannelSendReport */ - (NSData* _Nullable)sendMessage:(NSData* _Nullable)marshalledChanId message:(NSString* _Nullable)message leaseTimeMS:(int64_t)leaseTimeMS cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -787,19 +805,19 @@ be rejected otherwise. Users will drop the reaction if they do not recognize the reactTo message. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - reaction - The user's reaction. This should be a single emoji with no - other characters. As such, a Unicode string is expected. - - messageToReactTo - The marshalled [channel.MessageID] of the message you - wish to reply to. This may be found in the ChannelSendReport if replying - to your own. Alternatively, if reacting to another user's message, you may - retrieve it via the ChannelMessageReceptionCallback registered using - RegisterReceiveHandler. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, - and GetDefaultCMixParams will be used internally. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - reaction - The user's reaction. This should be a single emoji with no + other characters. As such, a Unicode string is expected. + - messageToReactTo - The marshalled [channel.MessageID] of the message you + wish to reply to. This may be found in the ChannelSendReport if replying + to your own. Alternatively, if reacting to another user's message, you may + retrieve it via the ChannelMessageReceptionCallback registered using + RegisterReceiveHandler. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, + and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport. + - []byte - A JSON marshalled ChannelSendReport. */ - (NSData* _Nullable)sendReaction:(NSData* _Nullable)marshalledChanId reaction:(NSString* _Nullable)reaction messageToReactTo:(NSData* _Nullable)messageToReactTo cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -814,25 +832,25 @@ delete validUntil after the round it is sent in, lasting forever if [channels.ValidForever] is used. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - message - The contents of the message. The message should be at most 510 - bytes. This is expected to be Unicode, and thus a string data type is - expected. - - messageToReactTo - The marshalled [channel.MessageID] of the message you - wish to reply to. This may be found in the ChannelSendReport if replying - to your own. Alternatively, if reacting to another user's message, you may - retrieve it via the ChannelMessageReceptionCallback registered using - RegisterReceiveHandler. - - leaseTimeMS - The lease of the message. This will be how long the message - is valid until, in milliseconds. As per the channels.Manager - documentation, this has different meanings depending on the use case. - These use cases may be generic enough that they will not be enumerated - here. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, - and GetDefaultCMixParams will be used internally. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - message - The contents of the message. The message should be at most 510 + bytes. This is expected to be Unicode, and thus a string data type is + expected. + - messageToReactTo - The marshalled [channel.MessageID] of the message you + wish to reply to. This may be found in the ChannelSendReport if replying + to your own. Alternatively, if reacting to another user's message, you may + retrieve it via the ChannelMessageReceptionCallback registered using + RegisterReceiveHandler. + - leaseTimeMS - The lease of the message. This will be how long the message + is valid until, in milliseconds. As per the channels.Manager + documentation, this has different meanings depending on the use case. + These use cases may be generic enough that they will not be enumerated + here. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, + and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport + - []byte - A JSON marshalled ChannelSendReport */ - (NSData* _Nullable)sendReply:(NSData* _Nullable)marshalledChanId message:(NSString* _Nullable)message messageToReactTo:(NSData* _Nullable)messageToReactTo leaseTimeMS:(int64_t)leaseTimeMS cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -2130,17 +2148,18 @@ channel the message was sent to and the message itself. This is returned via the callback as JSON marshalled bytes. JSON Example: - { - "ChannelId": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "MessageId": "3S6DiVjWH9mLmjy1oaam/3x45bJQzOW6u2KgeUn59wA=", - "ReplyTo":"cxMyGUFJ+Ff1Xp2X+XkIpOnNAQEZmv8SNP5eYH4tCik=", - "MessageType": 42, - "SenderUsername": "hunter2", - "Content": "YmFuX2JhZFVTZXI=", - "Timestamp": 1662502150335283000, - "Lease": 25, - "Rounds": [ 1, 4, 9], - } + + { + "ChannelId": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "MessageId": "3S6DiVjWH9mLmjy1oaam/3x45bJQzOW6u2KgeUn59wA=", + "ReplyTo":"cxMyGUFJ+Ff1Xp2X+XkIpOnNAQEZmv8SNP5eYH4tCik=", + "MessageType": 42, + "SenderUsername": "hunter2", + "Content": "YmFuX2JhZFVTZXI=", + "Timestamp": 1662502150335283000, + "Lease": 25, + "Rounds": [ 1, 4, 9], + } */ @interface BindingsReceivedChannelMessageReport : NSObject <goSeqRefInterface> { } @@ -2271,22 +2290,25 @@ JSON Example: channel's share URL and password, if it needs one. JSON example for a public channel: - { - "url": "https://internet.speakeasy.tech/?0Name=name&1Description=desc&2Level=Public&3Created=1665489600000000000&e=%2FWNZvuHPuv%2Bx23XbZXVNzCi7y8rUSxkh75MpR9UrsCo%3D&k=ddX1CH52xH%2F%2Fb6lKrbvDghdSmCQr90ktsOAZ%2FrhEonI%3D&l=2&m=0&p=328&s=%2FD%2FoQP2mio3XAWfhmWF0xmZrpj4nAsb9JLXj%2B0Mzq9Y%3D&v=1", - "password": "" - } + + { + "url": "https://internet.speakeasy.tech/?0Name=name&1Description=desc&2Level=Public&3Created=1665489600000000000&e=%2FWNZvuHPuv%2Bx23XbZXVNzCi7y8rUSxkh75MpR9UrsCo%3D&k=ddX1CH52xH%2F%2Fb6lKrbvDghdSmCQr90ktsOAZ%2FrhEonI%3D&l=2&m=0&p=328&s=%2FD%2FoQP2mio3XAWfhmWF0xmZrpj4nAsb9JLXj%2B0Mzq9Y%3D&v=1", + "password": "" + } JSON example for a private channel: - { - "url": "https://internet.speakeasy.tech/?0Name=name&1Description=desc&3Created=1665489600000000000&d=5AZQirb%2FYrmUITLn%2FFzCaGek1APfJnd2q0KwORGj%2BnbGg26kTShG6cfD3w6c%2BA3RDzxuKDSDN0zS4n1LbjiGe0KYdb8eJVeyRZtld516hfojNDXNAwZq8zbeZy4jjbF627fcLHRNS%2FaII4uJ5UB3gLUeBeZGraaybCCu3FIj1N4RbcJ5cQgT7hBf93bHmJc%3D&m=0&v=1", - "password": "tribune gangrene labrador italics nutmeg process exhume legal" - } + + { + "url": "https://internet.speakeasy.tech/?0Name=name&1Description=desc&3Created=1665489600000000000&d=5AZQirb%2FYrmUITLn%2FFzCaGek1APfJnd2q0KwORGj%2BnbGg26kTShG6cfD3w6c%2BA3RDzxuKDSDN0zS4n1LbjiGe0KYdb8eJVeyRZtld516hfojNDXNAwZq8zbeZy4jjbF627fcLHRNS%2FaII4uJ5UB3gLUeBeZGraaybCCu3FIj1N4RbcJ5cQgT7hBf93bHmJc%3D&m=0&v=1", + "password": "tribune gangrene labrador italics nutmeg process exhume legal" + } JSON example for a secret channel: - { - "url": "https://internet.speakeasy.tech/?d=w5evLthm%2Fq2j11g6PPtV0QoLaAqNCIER0OqxhxL%2FhpGVJI0057ZPgGBrKoJNE1%2FdoVuU35%2FhohuW%2BWvGlx6IuHoN6mDj0HfNj6Lo%2B8GwIaD6jOEwUcH%2FMKGsKnoqFsMaMPd5gXYgdHvA8l5SRe0gSCVqGKUaG6JgL%2FDu4iyjY7v4ykwZdQ7soWOcBLHDixGEkVLpwsCrPVHkT2K0W6gV74GIrQ%3D%3D&m=0&v=1", - "password": "frenzy contort staple thicket consuming affiliate scion demeanor" - } + + { + "url": "https://internet.speakeasy.tech/?d=w5evLthm%2Fq2j11g6PPtV0QoLaAqNCIER0OqxhxL%2FhpGVJI0057ZPgGBrKoJNE1%2FdoVuU35%2FhohuW%2BWvGlx6IuHoN6mDj0HfNj6Lo%2B8GwIaD6jOEwUcH%2FMKGsKnoqFsMaMPd5gXYgdHvA8l5SRe0gSCVqGKUaG6JgL%2FDu4iyjY7v4ykwZdQ7soWOcBLHDixGEkVLpwsCrPVHkT2K0W6gV74GIrQ%3D%3D&m=0&v=1", + "password": "frenzy contort staple thicket consuming affiliate scion demeanor" + } */ @interface BindingsShareURL : NSObject <goSeqRefInterface> { } @@ -2481,11 +2503,11 @@ FOUNDATION_EXPORT BOOL BindingsAsyncRequestRestLike(long e2eID, NSData* _Nullabl and codeset version. Parameters: - - pubKey - The Ed25519 public key. - - codesetVersion - The version of the codeset used to generate the identity. + - pubKey - The Ed25519 public key. + - codesetVersion - The version of the codeset used to generate the identity. Returns: - - JSON of [channel.Identity]. + - JSON of [channel.Identity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsConstructIdentity(NSData* _Nullable pubKey, long codesetVersion, NSError* _Nullable* _Nullable error); @@ -2512,12 +2534,12 @@ pretty print. This function can only be used for private or secret channel URLs. To get the privacy level of a channel URL, use [GetShareUrlType]. Parameters: - - url - The channel's share URL. Should be received from another user or - generated via [GetShareURL]. - - password - The password needed to decrypt the secret data in the URL. + - url - The channel's share URL. Should be received from another user or + generated via [GetShareURL]. + - password - The password needed to decrypt the secret data in the URL. Returns: - - The channel pretty print. + - The channel pretty print. */ FOUNDATION_EXPORT NSString* _Nonnull BindingsDecodePrivateURL(NSString* _Nullable url, NSString* _Nullable password, NSError* _Nullable* _Nullable error); @@ -2527,11 +2549,11 @@ function can only be used for public channel URLs. To get the privacy level of a channel URL, use [GetShareUrlType]. Parameters: - - url - The channel's share URL. Should be received from another user or - generated via [GetShareURL]. + - url - The channel's share URL. Should be received from another user or + generated via [GetShareURL]. Returns: - - The channel pretty print. + - The channel pretty print. */ FOUNDATION_EXPORT NSString* _Nonnull BindingsDecodePublicURL(NSString* _Nullable url, NSError* _Nullable* _Nullable error); @@ -2561,33 +2583,33 @@ the admin. It is only for making new channels, not joining existing ones. It returns a pretty print of the channel and the private key. Parameters: - - cmixID - The tracked cmix object ID. This can be retrieved using - [Cmix.GetID]. - - name - The name of the new channel. The name must be between 3 and 24 - characters inclusive. It can only include upper and lowercase unicode - letters, digits 0 through 9, and underscores (_). It cannot be changed - once a channel is created. - - description - The description of a channel. The description is optional - but cannot be longer than 144 characters and can include all unicode - characters. It cannot be changed once a channel is created. - - privacyLevel - The broadcast.PrivacyLevel of the channel. 0 = public, - 1 = private, and 2 = secret. Refer to the comment below for more - information. + - cmixID - The tracked cmix object ID. This can be retrieved using + [Cmix.GetID]. + - name - The name of the new channel. The name must be between 3 and 24 + characters inclusive. It can only include upper and lowercase unicode + letters, digits 0 through 9, and underscores (_). It cannot be changed + once a channel is created. + - description - The description of a channel. The description is optional + but cannot be longer than 144 characters and can include all unicode + characters. It cannot be changed once a channel is created. + - privacyLevel - The broadcast.PrivacyLevel of the channel. 0 = public, + 1 = private, and 2 = secret. Refer to the comment below for more + information. Returns: - - []byte - [ChannelGeneration] describes a generated channel. It contains - both the public channel info and the private key for the channel in PEM - format. + - []byte - [ChannelGeneration] describes a generated channel. It contains + both the public channel info and the private key for the channel in PEM + format. The [broadcast.PrivacyLevel] of a channel indicates the level of channel information revealed when sharing it via URL. For any channel besides public channels, the secret information is encrypted and a password is required to share and join a channel. - - A privacy level of [broadcast.Public] reveals all the information - including the name, description, privacy level, public key and salt. - - A privacy level of [broadcast.Private] reveals only the name and - description. - - A privacy level of [broadcast.Secret] reveals nothing. + - A privacy level of [broadcast.Public] reveals all the information + including the name, description, privacy level, public key and salt. + - A privacy level of [broadcast.Private] reveals only the name and + description. + - A privacy level of [broadcast.Secret] reveals nothing. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGenerateChannel(long cmixID, NSString* _Nullable name, NSString* _Nullable description, long privacyLevel, NSError* _Nullable* _Nullable error); @@ -2597,11 +2619,11 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsGenerateChannel(long cmixID, NSStrin via [GetPublicChannelIdentityFromPrivate]. Parameters: - - cmixID - The tracked cmix object ID. This can be retrieved using - [Cmix.GetID]. + - cmixID - The tracked cmix object ID. This can be retrieved using + [Cmix.GetID]. Returns: - - Marshalled bytes of [channel.PrivateIdentity]. + - Marshalled bytes of [channel.PrivateIdentity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGenerateChannelIdentity(long cmixID, NSError* _Nullable* _Nullable error); @@ -2625,13 +2647,14 @@ FOUNDATION_EXPORT BindingsChannelDbCipher* _Nullable BindingsGetChannelDbCipherT * GetChannelInfo returns the info about a channel from its public description. Parameters: - - prettyPrint - The pretty print of the channel. + - prettyPrint - The pretty print of the channel. The pretty print will be of the format: - <Speakeasy-v3:Test_Channel|description:Channel description.|level:Public|created:1666718081766741100|secrets:+oHcqDbJPZaT3xD5NcdLY8OjOMtSQNKdKgLPmr7ugdU=|rCI0wr01dHFStjSFMvsBzFZClvDIrHLL5xbCOPaUOJ0=|493|1|7cBhJxVfQxWo+DypOISRpeWdQBhuQpAZtUbQHjBm8NQ=> + + <Speakeasy-v3:Test_Channel|description:Channel description.|level:Public|created:1666718081766741100|secrets:+oHcqDbJPZaT3xD5NcdLY8OjOMtSQNKdKgLPmr7ugdU=|rCI0wr01dHFStjSFMvsBzFZClvDIrHLL5xbCOPaUOJ0=|493|1|7cBhJxVfQxWo+DypOISRpeWdQBhuQpAZtUbQHjBm8NQ=> Returns: - - []byte - JSON of [ChannelInfo], which describes all relevant channel info. + - []byte - JSON of [ChannelInfo], which describes all relevant channel info. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetChannelInfo(NSString* _Nullable prettyPrint, NSError* _Nullable* _Nullable error); @@ -2639,23 +2662,24 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsGetChannelInfo(NSString* _Nullable p * GetChannelJSON returns the JSON of the channel for the given pretty print. Parameters: - - prettyPrint - The pretty print of the channel. + - prettyPrint - The pretty print of the channel. Returns: - - JSON of the [broadcast.Channel] object. + - JSON of the [broadcast.Channel] object. Example JSON of [broadcast.Channel]: - { - "ReceptionID": "Ja/+Jh+1IXZYUOn+IzE3Fw/VqHOscomD0Q35p4Ai//kD", - "Name": "My_Channel", - "Description": "Here is information about my channel.", - "Salt": "+tlrU/htO6rrV3UFDfpQALUiuelFZ+Cw9eZCwqRHk+g=", - "RsaPubKeyHash": "PViT1mYkGBj6AYmE803O2RpA7BX24EjgBdldu3pIm4o=", - "RsaPubKeyLength": 5, - "RSASubPayloads": 1, - "Secret": "JxZt/wPx2luoPdHY6jwbXqNlKnixVU/oa9DgypZOuyI=", - "Level": 0 - } + + { + "ReceptionID": "Ja/+Jh+1IXZYUOn+IzE3Fw/VqHOscomD0Q35p4Ai//kD", + "Name": "My_Channel", + "Description": "Here is information about my channel.", + "Salt": "+tlrU/htO6rrV3UFDfpQALUiuelFZ+Cw9eZCwqRHk+g=", + "RsaPubKeyHash": "PViT1mYkGBj6AYmE803O2RpA7BX24EjgBdldu3pIm4o=", + "RsaPubKeyLength": 5, + "RSASubPayloads": 1, + "Secret": "JxZt/wPx2luoPdHY6jwbXqNlKnixVU/oa9DgypZOuyI=", + "Level": 0 + } */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetChannelJSON(NSString* _Nullable prettyPrint, NSError* _Nullable* _Nullable error); @@ -2762,10 +2786,10 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsGetPubkeyFromContact(NSData* _Nullab from a bytes version and returns it JSON marshaled. Parameters: - - marshaledPublic - Bytes of the public identity ([channel.Identity]). + - marshaledPublic - Bytes of the public identity ([channel.Identity]). Returns: - - JSON of the constructed [channel.Identity]. + - JSON of the constructed [channel.Identity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetPublicChannelIdentity(NSData* _Nullable marshaledPublic, NSError* _Nullable* _Nullable error); @@ -2775,11 +2799,11 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsGetPublicChannelIdentity(NSData* _Nu ([channel.PrivateIdentity]). Parameters: - - marshaledPrivate - Bytes of the private identity - (channel.PrivateIdentity]). + - marshaledPrivate - Bytes of the private identity + (channel.PrivateIdentity]). Returns: - - JSON of the public [channel.Identity]. + - JSON of the public [channel.Identity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetPublicChannelIdentityFromPrivate(NSData* _Nullable marshaledPrivate, NSError* _Nullable* _Nullable error); @@ -2790,11 +2814,11 @@ given channel ID. NOTE: This function is unsafe and only for debugging purposes only. Parameters: - - cmixID - ID of [Cmix] object in tracker. - - channelIdBase64 - The [id.ID] of the channel in base 64 encoding. + - cmixID - ID of [Cmix] object in tracker. + - channelIdBase64 - The [id.ID] of the channel in base 64 encoding. Returns: - - The PEM file of the private key. + - The PEM file of the private key. */ FOUNDATION_EXPORT NSString* _Nonnull BindingsGetSavedChannelPrivateKeyUNSAFE(long cmixID, NSString* _Nullable channelIdBase64, NSError* _Nullable* _Nullable error); @@ -2803,15 +2827,16 @@ FOUNDATION_EXPORT NSString* _Nonnull BindingsGetSavedChannelPrivateKeyUNSAFE(lon If the URL is an invalid channel URL, an error is returned. Parameters: - - url - The channel share URL. + - url - The channel share URL. Returns: - - An int that corresponds to the [broadcast.PrivacyLevel] as outlined below. + - An int that corresponds to the [broadcast.PrivacyLevel] as outlined below. Possible returns: - 0 = public channel - 1 = private channel - 2 = secret channel + + 0 = public channel + 1 = private channel + 2 = secret channel */ FOUNDATION_EXPORT BOOL BindingsGetShareUrlType(NSString* _Nullable url, long* _Nullable ret0_, NSError* _Nullable* _Nullable error); @@ -2825,11 +2850,11 @@ FOUNDATION_EXPORT NSString* _Nonnull BindingsGetVersion(void); data. Parameters: - - password - The password used to encrypt the identity. - - data - The encrypted data. + - password - The password used to encrypt the identity. + - data - The encrypted data. Returns: - - JSON of [channel.PrivateIdentity]. + - JSON of [channel.PrivateIdentity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsImportPrivateIdentity(NSString* _Nullable password, NSData* _Nullable data, NSError* _Nullable* _Nullable error); @@ -2909,12 +2934,12 @@ The channel manager should have previously been created with [ChannelsManager.GetStorageTag]. Parameters: - - cmixID - The tracked cmix object ID. This can be retrieved using - [Cmix.GetID]. - - storageTag - The storage tag associated with the previously created - channel manager and retrieved with [ChannelsManager.GetStorageTag]. - - event - An interface that contains a function that initialises and returns - the event model that is bindings-compatible. + - cmixID - The tracked cmix object ID. This can be retrieved using + [Cmix.GetID]. + - storageTag - The storage tag associated with the previously created + channel manager and retrieved with [ChannelsManager.GetStorageTag]. + - event - An interface that contains a function that initialises and returns + the event model that is bindings-compatible. */ FOUNDATION_EXPORT BindingsChannelsManager* _Nullable BindingsLoadChannelsManager(long cmixID, NSString* _Nullable storageTag, id<BindingsEventModelBuilder> _Nullable eventBuilder, NSError* _Nullable* _Nullable error); @@ -3014,12 +3039,12 @@ FOUNDATION_EXPORT BOOL BindingsMultiLookupUD(long e2eID, NSData* _Nullable udCon * NewChannelsDatabaseCipher constructs a ChannelDbCipher object. Parameters: - - cmixID - The tracked [Cmix] object ID. - - password - The password for storage. This should be the same password - passed into [NewCmix]. - - plaintTextBlockSize - The maximum size of a payload to be encrypted. - A payload passed into [ChannelDbCipher.Encrypt] that is larger than - plaintTextBlockSize will result in an error. + - cmixID - The tracked [Cmix] object ID. + - password - The password for storage. This should be the same password + passed into [NewCmix]. + - plaintTextBlockSize - The maximum size of a payload to be encrypted. + A payload passed into [ChannelDbCipher.Encrypt] that is larger than + plaintTextBlockSize will result in an error. */ FOUNDATION_EXPORT BindingsChannelDbCipher* _Nullable BindingsNewChannelsDatabaseCipher(long cmixID, NSData* _Nullable password, long plaintTextBlockSize, NSError* _Nullable* _Nullable error); @@ -3033,12 +3058,12 @@ reload this channel manager, use [LoadChannelsManager], passing in the storage tag retrieved by [ChannelsManager.GetStorageTag]. Parameters: - - cmixID - The tracked Cmix object ID. This can be retrieved using - [Cmix.GetID]. - - privateIdentity - Bytes of a private identity ([channel.PrivateIdentity]) - that is generated by [GenerateChannelIdentity]. - - event - An interface that contains a function that initialises and returns - the event model that is bindings-compatible. + - cmixID - The tracked Cmix object ID. This can be retrieved using + [Cmix.GetID]. + - privateIdentity - Bytes of a private identity ([channel.PrivateIdentity]) + that is generated by [GenerateChannelIdentity]. + - event - An interface that contains a function that initialises and returns + the event model that is bindings-compatible. */ FOUNDATION_EXPORT BindingsChannelsManager* _Nullable BindingsNewChannelsManager(long cmixID, NSData* _Nullable privateIdentity, id<BindingsEventModelBuilder> _Nullable eventBuilder, NSError* _Nullable* _Nullable error); 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 91e00787b70d81643696ce73d3baf18e406901ed..a616579df5bfd7ae5d3cd41ec961af17d8ed9e79 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 dcf46cd4439785f4f904ea1f41277a66ed3e7db9..29b692cb622e84ca73a5d29b1f3954765ffb29db 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 @@ -470,7 +470,7 @@ be returned by this function. Any padding will be discarded within this function. Parameters: - - ciphertext - the encrypted data returned by [ChannelDbCipher.Encrypt]. + - ciphertext - the encrypted data returned by [ChannelDbCipher.Encrypt]. */ - (NSData* _Nullable)decrypt:(NSData* _Nullable)ciphertext error:(NSError* _Nullable* _Nullable)error; /** @@ -478,15 +478,28 @@ Parameters: done on the plaintext so all encrypted data looks uniform at rest. Parameters: - - plaintext - The data to be encrypted. This must be smaller than the block - size passed into [NewChannelsDatabaseCipher]. If it is larger, this will - return an error. + - plaintext - The data to be encrypted. This must be smaller than the block + size passed into [NewChannelsDatabaseCipher]. If it is larger, this will + return an error. */ - (NSData* _Nullable)encrypt:(NSData* _Nullable)plaintext error:(NSError* _Nullable* _Nullable)error; /** * GetID returns the ID for this ChannelDbCipher in the channelDbCipherTracker. */ - (long)getID; +/** + * MarshalJSON marshals the cipher into valid JSON. This function adheres to the +json.Marshaler interface. + */ +- (NSData* _Nullable)marshalJSON:(NSError* _Nullable* _Nullable)error; +/** + * UnmarshalJSON unmarshalls JSON into the cipher. This function adheres to the +json.Unmarshaler interface. + +Note that this function does not transfer the internal RNG. Use +NewCipherFromJSON to properly reconstruct a cipher from JSON. + */ +- (BOOL)unmarshalJSON:(NSData* _Nullable)data error:(NSError* _Nullable* _Nullable)error; @end /** @@ -495,10 +508,11 @@ contains the public channel info formatted in pretty print and the private key for the channel in PEM format. Example JSON: - { - "Channel": "\u003cSpeakeasy-v3:name|description:desc|level:Public|created:1665489600000000000|secrets:zjHmrPPMDQ0tNSANjAmQfKhRpJIdJMU+Hz5hsZ+fVpk=|qozRNkADprqb38lsnU7WxCtGCq9OChlySCEgl4NHjI4=|2|328|7aZQAtuVjE84q4Z09iGytTSXfZj9NyTa6qBp0ueKjCI=\u003e", - "PrivateKey": "-----BEGIN RSA PRIVATE KEY-----\nMCYCAQACAwDVywIDAQABAgMAlVECAgDvAgIA5QICAJECAgCVAgIA1w==\n-----END RSA PRIVATE KEY-----" - } + + { + "Channel": "\u003cSpeakeasy-v3:name|description:desc|level:Public|created:1665489600000000000|secrets:zjHmrPPMDQ0tNSANjAmQfKhRpJIdJMU+Hz5hsZ+fVpk=|qozRNkADprqb38lsnU7WxCtGCq9OChlySCEgl4NHjI4=|2|328|7aZQAtuVjE84q4Z09iGytTSXfZj9NyTa6qBp0ueKjCI=\u003e", + "PrivateKey": "-----BEGIN RSA PRIVATE KEY-----\nMCYCAQACAwDVywIDAQABAgMAlVECAgDvAgIA5QICAJECAgCVAgIA1w==\n-----END RSA PRIVATE KEY-----" + } */ @interface BindingsChannelGeneration : NSObject <goSeqRefInterface> { } @@ -514,11 +528,12 @@ Example JSON: * ChannelInfo contains information about a channel. Example of ChannelInfo JSON: - { - "Name": "Test Channel", - "Description": "This is a test channel", - "ChannelID": "RRnpRhmvXtW9ugS1nILJ3WfttdctDvC2jeuH43E0g/0D", - } + + { + "Name": "Test Channel", + "Description": "This is a test channel", + "ChannelID": "RRnpRhmvXtW9ugS1nILJ3WfttdctDvC2jeuH43E0g/0D", + } */ @interface BindingsChannelInfo : NSObject <goSeqRefInterface> { } @@ -536,11 +551,12 @@ Example of ChannelInfo JSON: ChannelsManager's Send operations. JSON Example: - { - "MessageId": "0kitNxoFdsF4q1VMSI/xPzfCnGB2l+ln2+7CTHjHbJw=", - "Rounds":[1,5,9], - "EphId": 0 - } + + { + "MessageId": "0kitNxoFdsF4q1VMSI/xPzfCnGB2l+ln2+7CTHjHbJw=", + "Rounds":[1,5,9], + "EphId": 0 + } */ @interface BindingsChannelSendReport : NSObject <goSeqRefInterface> { } @@ -574,12 +590,12 @@ reload this channel manager, use [LoadChannelsManager], passing in the storage tag retrieved by [ChannelsManager.GetStorageTag]. Parameters: - - cmixID - The tracked Cmix object ID. This can be retrieved using - [Cmix.GetID]. - - privateIdentity - Bytes of a private identity ([channel.PrivateIdentity]) - that is generated by [GenerateChannelIdentity]. - - event - An interface that contains a function that initialises and returns - the event model that is bindings-compatible. + - cmixID - The tracked Cmix object ID. This can be retrieved using + [Cmix.GetID]. + - privateIdentity - Bytes of a private identity ([channel.PrivateIdentity]) + that is generated by [GenerateChannelIdentity]. + - event - An interface that contains a function that initialises and returns + the event model that is bindings-compatible. */ - (nullable instancetype)init:(long)cmixID privateIdentity:(NSData* _Nullable)privateIdentity eventBuilder:(id<BindingsEventModelBuilder> _Nullable)eventBuilder; // skipped constructor ChannelsManager.NewChannelsManagerGoEventModel with unsupported parameter or return types @@ -597,13 +613,14 @@ string. * GetChannels returns the IDs of all channels that have been joined. Returns: - - []byte - A JSON marshalled list of IDs. + - []byte - A JSON marshalled list of IDs. JSON Example: - { - "U4x/lrFkvxuXu59LtHLon1sUhPJSCcnZND6SugndnVID", - "15tNdkKbYXoMn58NO6VbDMDWFEyIhTWEGsvgcJsHWAgD" - } + + { + "U4x/lrFkvxuXu59LtHLon1sUhPJSCcnZND6SugndnVID", + "15tNdkKbYXoMn58NO6VbDMDWFEyIhTWEGsvgcJsHWAgD" + } */ - (NSData* _Nullable)getChannels:(NSError* _Nullable* _Nullable)error; /** @@ -639,14 +656,14 @@ calling [ChannelsManager.JoinChannelFromURL]. There is no enforcement for public URLs. Parameters: - - cmixID - The tracked Cmix object ID. - - host - The URL to append the channel info to. - - maxUses - The maximum number of uses the link can be used (0 for - unlimited). - - marshalledChanId - A marshalled channel ID ([id.ID]). + - cmixID - The tracked Cmix object ID. + - host - The URL to append the channel info to. + - maxUses - The maximum number of uses the link can be used (0 for + unlimited). + - marshalledChanId - A marshalled channel ID ([id.ID]). Returns: - - JSON of ShareURL. + - JSON of ShareURL. */ - (NSData* _Nullable)getShareURL:(long)cmixID host:(NSString* _Nullable)host maxUses:(long)maxUses marshalledChanId:(NSData* _Nullable)marshalledChanId error:(NSError* _Nullable* _Nullable)error; /** @@ -658,14 +675,15 @@ Returns: been joined. Parameters: - - channelPretty - A portable channel string. Should be received from - another user or generated via GenerateChannel. + - channelPretty - A portable channel string. Should be received from + another user or generated via GenerateChannel. The pretty print will be of the format: - <Speakeasy-v3:Test_Channel|description:Channel description.|level:Public|created:1666718081766741100|secrets:+oHcqDbJPZaT3xD5NcdLY8OjOMtSQNKdKgLPmr7ugdU=|rCI0wr01dHFStjSFMvsBzFZClvDIrHLL5xbCOPaUOJ0=|493|1|7cBhJxVfQxWo+DypOISRpeWdQBhuQpAZtUbQHjBm8NQ=> + + <Speakeasy-v3:Test_Channel|description:Channel description.|level:Public|created:1666718081766741100|secrets:+oHcqDbJPZaT3xD5NcdLY8OjOMtSQNKdKgLPmr7ugdU=|rCI0wr01dHFStjSFMvsBzFZClvDIrHLL5xbCOPaUOJ0=|493|1|7cBhJxVfQxWo+DypOISRpeWdQBhuQpAZtUbQHjBm8NQ=> Returns: - - []byte - JSON of [ChannelInfo], which describes all relevant channel info. + - []byte - JSON of [ChannelInfo], which describes all relevant channel info. */ - (NSData* _Nullable)joinChannel:(NSString* _Nullable)channelPretty error:(NSError* _Nullable* _Nullable)error; /** @@ -673,7 +691,7 @@ Returns: channel was not previously joined. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). */ - (BOOL)leaveChannel:(NSData* _Nullable)marshalledChanId error:(NSError* _Nullable* _Nullable)error; /** @@ -685,10 +703,10 @@ There can only be one handler per [channels.MessageType], and this will return an error on any re-registration. Parameters: - - messageType - represents the [channels.MessageType] which will have a - registered listener. - - listenerCb - the callback which will be executed when a channel message - of messageType is received. + - messageType - represents the [channels.MessageType] which will have a + registered listener. + - listenerCb - the callback which will be executed when a channel message + of messageType is received. */ - (BOOL)registerReceiveHandler:(long)messageType listenerCb:(id<BindingsChannelMessageReceptionCallback> _Nullable)listenerCb error:(NSError* _Nullable* _Nullable)error; /** @@ -696,7 +714,7 @@ Parameters: memory (~3 weeks) over the event model. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). */ - (BOOL)replayChannel:(NSData* _Nullable)marshalledChanId error:(NSError* _Nullable* _Nullable)error; /** @@ -707,23 +725,23 @@ before being sent over the wire, is too long, this will return an error. The message must be at most 510 bytes long. Parameters: - - adminPrivateKey - The PEM-encoded admin RSA private key. - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - messageType - The message type of the message. This will be a valid - [channels.MessageType]. - - message - The contents of the message. The message should be at most 510 - bytes. This need not be of data type string, as the message could be a - specified format that the channel may recognize. - - leaseTimeMS - The lease of the message. This will be how long the message - is valid until, in milliseconds. As per the channels.Manager - documentation, this has different meanings depending on the use case. - These use cases may be generic enough that they will not be enumerated - here. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, - and GetDefaultCMixParams will be used internally. + - adminPrivateKey - The PEM-encoded admin RSA private key. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - messageType - The message type of the message. This will be a valid + [channels.MessageType]. + - message - The contents of the message. The message should be at most 510 + bytes. This need not be of data type string, as the message could be a + specified format that the channel may recognize. + - leaseTimeMS - The lease of the message. This will be how long the message + is valid until, in milliseconds. As per the channels.Manager + documentation, this has different meanings depending on the use case. + These use cases may be generic enough that they will not be enumerated + here. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, + and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport. + - []byte - A JSON marshalled ChannelSendReport. */ - (NSData* _Nullable)sendAdminGeneric:(NSData* _Nullable)adminPrivateKey marshalledChanId:(NSData* _Nullable)marshalledChanId messageType:(long)messageType message:(NSData* _Nullable)message leaseTimeMS:(int64_t)leaseTimeMS cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -736,22 +754,22 @@ to send a payload of 802 bytes at minimum. The meaning of validUntil depends on the use case. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - messageType - The message type of the message. This will be a valid - [channels.MessageType]. - - message - The contents of the message. This need not be of data type - string, as the message could be a specified format that the channel may - recognize. - - leaseTimeMS - The lease of the message. This will be how long the message - is valid until, in milliseconds. As per the channels.Manager - documentation, this has different meanings depending on the use case. - These use cases may be generic enough that they will not be enumerated - here. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, - and GetDefaultCMixParams will be used internally. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - messageType - The message type of the message. This will be a valid + [channels.MessageType]. + - message - The contents of the message. This need not be of data type + string, as the message could be a specified format that the channel may + recognize. + - leaseTimeMS - The lease of the message. This will be how long the message + is valid until, in milliseconds. As per the channels.Manager + documentation, this has different meanings depending on the use case. + These use cases may be generic enough that they will not be enumerated + here. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, + and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport. + - []byte - A JSON marshalled ChannelSendReport. */ - (NSData* _Nullable)sendGeneric:(NSData* _Nullable)marshalledChanId messageType:(long)messageType message:(NSData* _Nullable)message leaseTimeMS:(int64_t)leaseTimeMS cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -764,20 +782,20 @@ The message will auto delete validUntil after the round it is sent in, lasting forever if [channels.ValidForever] is used. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - message - The contents of the message. The message should be at most 510 - bytes. This is expected to be Unicode, and thus a string data type is - expected - - leaseTimeMS - The lease of the message. This will be how long the message - is valid until, in milliseconds. As per the channels.Manager - documentation, this has different meanings depending on the use case. - These use cases may be generic enough that they will not be enumerated - here. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be - empty, and GetDefaultCMixParams will be used internally. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - message - The contents of the message. The message should be at most 510 + bytes. This is expected to be Unicode, and thus a string data type is + expected + - leaseTimeMS - The lease of the message. This will be how long the message + is valid until, in milliseconds. As per the channels.Manager + documentation, this has different meanings depending on the use case. + These use cases may be generic enough that they will not be enumerated + here. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be + empty, and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport + - []byte - A JSON marshalled ChannelSendReport */ - (NSData* _Nullable)sendMessage:(NSData* _Nullable)marshalledChanId message:(NSString* _Nullable)message leaseTimeMS:(int64_t)leaseTimeMS cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -787,19 +805,19 @@ be rejected otherwise. Users will drop the reaction if they do not recognize the reactTo message. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - reaction - The user's reaction. This should be a single emoji with no - other characters. As such, a Unicode string is expected. - - messageToReactTo - The marshalled [channel.MessageID] of the message you - wish to reply to. This may be found in the ChannelSendReport if replying - to your own. Alternatively, if reacting to another user's message, you may - retrieve it via the ChannelMessageReceptionCallback registered using - RegisterReceiveHandler. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, - and GetDefaultCMixParams will be used internally. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - reaction - The user's reaction. This should be a single emoji with no + other characters. As such, a Unicode string is expected. + - messageToReactTo - The marshalled [channel.MessageID] of the message you + wish to reply to. This may be found in the ChannelSendReport if replying + to your own. Alternatively, if reacting to another user's message, you may + retrieve it via the ChannelMessageReceptionCallback registered using + RegisterReceiveHandler. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, + and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport. + - []byte - A JSON marshalled ChannelSendReport. */ - (NSData* _Nullable)sendReaction:(NSData* _Nullable)marshalledChanId reaction:(NSString* _Nullable)reaction messageToReactTo:(NSData* _Nullable)messageToReactTo cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -814,25 +832,25 @@ delete validUntil after the round it is sent in, lasting forever if [channels.ValidForever] is used. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - message - The contents of the message. The message should be at most 510 - bytes. This is expected to be Unicode, and thus a string data type is - expected. - - messageToReactTo - The marshalled [channel.MessageID] of the message you - wish to reply to. This may be found in the ChannelSendReport if replying - to your own. Alternatively, if reacting to another user's message, you may - retrieve it via the ChannelMessageReceptionCallback registered using - RegisterReceiveHandler. - - leaseTimeMS - The lease of the message. This will be how long the message - is valid until, in milliseconds. As per the channels.Manager - documentation, this has different meanings depending on the use case. - These use cases may be generic enough that they will not be enumerated - here. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, - and GetDefaultCMixParams will be used internally. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - message - The contents of the message. The message should be at most 510 + bytes. This is expected to be Unicode, and thus a string data type is + expected. + - messageToReactTo - The marshalled [channel.MessageID] of the message you + wish to reply to. This may be found in the ChannelSendReport if replying + to your own. Alternatively, if reacting to another user's message, you may + retrieve it via the ChannelMessageReceptionCallback registered using + RegisterReceiveHandler. + - leaseTimeMS - The lease of the message. This will be how long the message + is valid until, in milliseconds. As per the channels.Manager + documentation, this has different meanings depending on the use case. + These use cases may be generic enough that they will not be enumerated + here. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, + and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport + - []byte - A JSON marshalled ChannelSendReport */ - (NSData* _Nullable)sendReply:(NSData* _Nullable)marshalledChanId message:(NSString* _Nullable)message messageToReactTo:(NSData* _Nullable)messageToReactTo leaseTimeMS:(int64_t)leaseTimeMS cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -2130,17 +2148,18 @@ channel the message was sent to and the message itself. This is returned via the callback as JSON marshalled bytes. JSON Example: - { - "ChannelId": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "MessageId": "3S6DiVjWH9mLmjy1oaam/3x45bJQzOW6u2KgeUn59wA=", - "ReplyTo":"cxMyGUFJ+Ff1Xp2X+XkIpOnNAQEZmv8SNP5eYH4tCik=", - "MessageType": 42, - "SenderUsername": "hunter2", - "Content": "YmFuX2JhZFVTZXI=", - "Timestamp": 1662502150335283000, - "Lease": 25, - "Rounds": [ 1, 4, 9], - } + + { + "ChannelId": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "MessageId": "3S6DiVjWH9mLmjy1oaam/3x45bJQzOW6u2KgeUn59wA=", + "ReplyTo":"cxMyGUFJ+Ff1Xp2X+XkIpOnNAQEZmv8SNP5eYH4tCik=", + "MessageType": 42, + "SenderUsername": "hunter2", + "Content": "YmFuX2JhZFVTZXI=", + "Timestamp": 1662502150335283000, + "Lease": 25, + "Rounds": [ 1, 4, 9], + } */ @interface BindingsReceivedChannelMessageReport : NSObject <goSeqRefInterface> { } @@ -2271,22 +2290,25 @@ JSON Example: channel's share URL and password, if it needs one. JSON example for a public channel: - { - "url": "https://internet.speakeasy.tech/?0Name=name&1Description=desc&2Level=Public&3Created=1665489600000000000&e=%2FWNZvuHPuv%2Bx23XbZXVNzCi7y8rUSxkh75MpR9UrsCo%3D&k=ddX1CH52xH%2F%2Fb6lKrbvDghdSmCQr90ktsOAZ%2FrhEonI%3D&l=2&m=0&p=328&s=%2FD%2FoQP2mio3XAWfhmWF0xmZrpj4nAsb9JLXj%2B0Mzq9Y%3D&v=1", - "password": "" - } + + { + "url": "https://internet.speakeasy.tech/?0Name=name&1Description=desc&2Level=Public&3Created=1665489600000000000&e=%2FWNZvuHPuv%2Bx23XbZXVNzCi7y8rUSxkh75MpR9UrsCo%3D&k=ddX1CH52xH%2F%2Fb6lKrbvDghdSmCQr90ktsOAZ%2FrhEonI%3D&l=2&m=0&p=328&s=%2FD%2FoQP2mio3XAWfhmWF0xmZrpj4nAsb9JLXj%2B0Mzq9Y%3D&v=1", + "password": "" + } JSON example for a private channel: - { - "url": "https://internet.speakeasy.tech/?0Name=name&1Description=desc&3Created=1665489600000000000&d=5AZQirb%2FYrmUITLn%2FFzCaGek1APfJnd2q0KwORGj%2BnbGg26kTShG6cfD3w6c%2BA3RDzxuKDSDN0zS4n1LbjiGe0KYdb8eJVeyRZtld516hfojNDXNAwZq8zbeZy4jjbF627fcLHRNS%2FaII4uJ5UB3gLUeBeZGraaybCCu3FIj1N4RbcJ5cQgT7hBf93bHmJc%3D&m=0&v=1", - "password": "tribune gangrene labrador italics nutmeg process exhume legal" - } + + { + "url": "https://internet.speakeasy.tech/?0Name=name&1Description=desc&3Created=1665489600000000000&d=5AZQirb%2FYrmUITLn%2FFzCaGek1APfJnd2q0KwORGj%2BnbGg26kTShG6cfD3w6c%2BA3RDzxuKDSDN0zS4n1LbjiGe0KYdb8eJVeyRZtld516hfojNDXNAwZq8zbeZy4jjbF627fcLHRNS%2FaII4uJ5UB3gLUeBeZGraaybCCu3FIj1N4RbcJ5cQgT7hBf93bHmJc%3D&m=0&v=1", + "password": "tribune gangrene labrador italics nutmeg process exhume legal" + } JSON example for a secret channel: - { - "url": "https://internet.speakeasy.tech/?d=w5evLthm%2Fq2j11g6PPtV0QoLaAqNCIER0OqxhxL%2FhpGVJI0057ZPgGBrKoJNE1%2FdoVuU35%2FhohuW%2BWvGlx6IuHoN6mDj0HfNj6Lo%2B8GwIaD6jOEwUcH%2FMKGsKnoqFsMaMPd5gXYgdHvA8l5SRe0gSCVqGKUaG6JgL%2FDu4iyjY7v4ykwZdQ7soWOcBLHDixGEkVLpwsCrPVHkT2K0W6gV74GIrQ%3D%3D&m=0&v=1", - "password": "frenzy contort staple thicket consuming affiliate scion demeanor" - } + + { + "url": "https://internet.speakeasy.tech/?d=w5evLthm%2Fq2j11g6PPtV0QoLaAqNCIER0OqxhxL%2FhpGVJI0057ZPgGBrKoJNE1%2FdoVuU35%2FhohuW%2BWvGlx6IuHoN6mDj0HfNj6Lo%2B8GwIaD6jOEwUcH%2FMKGsKnoqFsMaMPd5gXYgdHvA8l5SRe0gSCVqGKUaG6JgL%2FDu4iyjY7v4ykwZdQ7soWOcBLHDixGEkVLpwsCrPVHkT2K0W6gV74GIrQ%3D%3D&m=0&v=1", + "password": "frenzy contort staple thicket consuming affiliate scion demeanor" + } */ @interface BindingsShareURL : NSObject <goSeqRefInterface> { } @@ -2481,11 +2503,11 @@ FOUNDATION_EXPORT BOOL BindingsAsyncRequestRestLike(long e2eID, NSData* _Nullabl and codeset version. Parameters: - - pubKey - The Ed25519 public key. - - codesetVersion - The version of the codeset used to generate the identity. + - pubKey - The Ed25519 public key. + - codesetVersion - The version of the codeset used to generate the identity. Returns: - - JSON of [channel.Identity]. + - JSON of [channel.Identity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsConstructIdentity(NSData* _Nullable pubKey, long codesetVersion, NSError* _Nullable* _Nullable error); @@ -2512,12 +2534,12 @@ pretty print. This function can only be used for private or secret channel URLs. To get the privacy level of a channel URL, use [GetShareUrlType]. Parameters: - - url - The channel's share URL. Should be received from another user or - generated via [GetShareURL]. - - password - The password needed to decrypt the secret data in the URL. + - url - The channel's share URL. Should be received from another user or + generated via [GetShareURL]. + - password - The password needed to decrypt the secret data in the URL. Returns: - - The channel pretty print. + - The channel pretty print. */ FOUNDATION_EXPORT NSString* _Nonnull BindingsDecodePrivateURL(NSString* _Nullable url, NSString* _Nullable password, NSError* _Nullable* _Nullable error); @@ -2527,11 +2549,11 @@ function can only be used for public channel URLs. To get the privacy level of a channel URL, use [GetShareUrlType]. Parameters: - - url - The channel's share URL. Should be received from another user or - generated via [GetShareURL]. + - url - The channel's share URL. Should be received from another user or + generated via [GetShareURL]. Returns: - - The channel pretty print. + - The channel pretty print. */ FOUNDATION_EXPORT NSString* _Nonnull BindingsDecodePublicURL(NSString* _Nullable url, NSError* _Nullable* _Nullable error); @@ -2561,33 +2583,33 @@ the admin. It is only for making new channels, not joining existing ones. It returns a pretty print of the channel and the private key. Parameters: - - cmixID - The tracked cmix object ID. This can be retrieved using - [Cmix.GetID]. - - name - The name of the new channel. The name must be between 3 and 24 - characters inclusive. It can only include upper and lowercase unicode - letters, digits 0 through 9, and underscores (_). It cannot be changed - once a channel is created. - - description - The description of a channel. The description is optional - but cannot be longer than 144 characters and can include all unicode - characters. It cannot be changed once a channel is created. - - privacyLevel - The broadcast.PrivacyLevel of the channel. 0 = public, - 1 = private, and 2 = secret. Refer to the comment below for more - information. + - cmixID - The tracked cmix object ID. This can be retrieved using + [Cmix.GetID]. + - name - The name of the new channel. The name must be between 3 and 24 + characters inclusive. It can only include upper and lowercase unicode + letters, digits 0 through 9, and underscores (_). It cannot be changed + once a channel is created. + - description - The description of a channel. The description is optional + but cannot be longer than 144 characters and can include all unicode + characters. It cannot be changed once a channel is created. + - privacyLevel - The broadcast.PrivacyLevel of the channel. 0 = public, + 1 = private, and 2 = secret. Refer to the comment below for more + information. Returns: - - []byte - [ChannelGeneration] describes a generated channel. It contains - both the public channel info and the private key for the channel in PEM - format. + - []byte - [ChannelGeneration] describes a generated channel. It contains + both the public channel info and the private key for the channel in PEM + format. The [broadcast.PrivacyLevel] of a channel indicates the level of channel information revealed when sharing it via URL. For any channel besides public channels, the secret information is encrypted and a password is required to share and join a channel. - - A privacy level of [broadcast.Public] reveals all the information - including the name, description, privacy level, public key and salt. - - A privacy level of [broadcast.Private] reveals only the name and - description. - - A privacy level of [broadcast.Secret] reveals nothing. + - A privacy level of [broadcast.Public] reveals all the information + including the name, description, privacy level, public key and salt. + - A privacy level of [broadcast.Private] reveals only the name and + description. + - A privacy level of [broadcast.Secret] reveals nothing. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGenerateChannel(long cmixID, NSString* _Nullable name, NSString* _Nullable description, long privacyLevel, NSError* _Nullable* _Nullable error); @@ -2597,11 +2619,11 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsGenerateChannel(long cmixID, NSStrin via [GetPublicChannelIdentityFromPrivate]. Parameters: - - cmixID - The tracked cmix object ID. This can be retrieved using - [Cmix.GetID]. + - cmixID - The tracked cmix object ID. This can be retrieved using + [Cmix.GetID]. Returns: - - Marshalled bytes of [channel.PrivateIdentity]. + - Marshalled bytes of [channel.PrivateIdentity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGenerateChannelIdentity(long cmixID, NSError* _Nullable* _Nullable error); @@ -2625,13 +2647,14 @@ FOUNDATION_EXPORT BindingsChannelDbCipher* _Nullable BindingsGetChannelDbCipherT * GetChannelInfo returns the info about a channel from its public description. Parameters: - - prettyPrint - The pretty print of the channel. + - prettyPrint - The pretty print of the channel. The pretty print will be of the format: - <Speakeasy-v3:Test_Channel|description:Channel description.|level:Public|created:1666718081766741100|secrets:+oHcqDbJPZaT3xD5NcdLY8OjOMtSQNKdKgLPmr7ugdU=|rCI0wr01dHFStjSFMvsBzFZClvDIrHLL5xbCOPaUOJ0=|493|1|7cBhJxVfQxWo+DypOISRpeWdQBhuQpAZtUbQHjBm8NQ=> + + <Speakeasy-v3:Test_Channel|description:Channel description.|level:Public|created:1666718081766741100|secrets:+oHcqDbJPZaT3xD5NcdLY8OjOMtSQNKdKgLPmr7ugdU=|rCI0wr01dHFStjSFMvsBzFZClvDIrHLL5xbCOPaUOJ0=|493|1|7cBhJxVfQxWo+DypOISRpeWdQBhuQpAZtUbQHjBm8NQ=> Returns: - - []byte - JSON of [ChannelInfo], which describes all relevant channel info. + - []byte - JSON of [ChannelInfo], which describes all relevant channel info. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetChannelInfo(NSString* _Nullable prettyPrint, NSError* _Nullable* _Nullable error); @@ -2639,23 +2662,24 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsGetChannelInfo(NSString* _Nullable p * GetChannelJSON returns the JSON of the channel for the given pretty print. Parameters: - - prettyPrint - The pretty print of the channel. + - prettyPrint - The pretty print of the channel. Returns: - - JSON of the [broadcast.Channel] object. + - JSON of the [broadcast.Channel] object. Example JSON of [broadcast.Channel]: - { - "ReceptionID": "Ja/+Jh+1IXZYUOn+IzE3Fw/VqHOscomD0Q35p4Ai//kD", - "Name": "My_Channel", - "Description": "Here is information about my channel.", - "Salt": "+tlrU/htO6rrV3UFDfpQALUiuelFZ+Cw9eZCwqRHk+g=", - "RsaPubKeyHash": "PViT1mYkGBj6AYmE803O2RpA7BX24EjgBdldu3pIm4o=", - "RsaPubKeyLength": 5, - "RSASubPayloads": 1, - "Secret": "JxZt/wPx2luoPdHY6jwbXqNlKnixVU/oa9DgypZOuyI=", - "Level": 0 - } + + { + "ReceptionID": "Ja/+Jh+1IXZYUOn+IzE3Fw/VqHOscomD0Q35p4Ai//kD", + "Name": "My_Channel", + "Description": "Here is information about my channel.", + "Salt": "+tlrU/htO6rrV3UFDfpQALUiuelFZ+Cw9eZCwqRHk+g=", + "RsaPubKeyHash": "PViT1mYkGBj6AYmE803O2RpA7BX24EjgBdldu3pIm4o=", + "RsaPubKeyLength": 5, + "RSASubPayloads": 1, + "Secret": "JxZt/wPx2luoPdHY6jwbXqNlKnixVU/oa9DgypZOuyI=", + "Level": 0 + } */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetChannelJSON(NSString* _Nullable prettyPrint, NSError* _Nullable* _Nullable error); @@ -2762,10 +2786,10 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsGetPubkeyFromContact(NSData* _Nullab from a bytes version and returns it JSON marshaled. Parameters: - - marshaledPublic - Bytes of the public identity ([channel.Identity]). + - marshaledPublic - Bytes of the public identity ([channel.Identity]). Returns: - - JSON of the constructed [channel.Identity]. + - JSON of the constructed [channel.Identity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetPublicChannelIdentity(NSData* _Nullable marshaledPublic, NSError* _Nullable* _Nullable error); @@ -2775,11 +2799,11 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsGetPublicChannelIdentity(NSData* _Nu ([channel.PrivateIdentity]). Parameters: - - marshaledPrivate - Bytes of the private identity - (channel.PrivateIdentity]). + - marshaledPrivate - Bytes of the private identity + (channel.PrivateIdentity]). Returns: - - JSON of the public [channel.Identity]. + - JSON of the public [channel.Identity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetPublicChannelIdentityFromPrivate(NSData* _Nullable marshaledPrivate, NSError* _Nullable* _Nullable error); @@ -2790,11 +2814,11 @@ given channel ID. NOTE: This function is unsafe and only for debugging purposes only. Parameters: - - cmixID - ID of [Cmix] object in tracker. - - channelIdBase64 - The [id.ID] of the channel in base 64 encoding. + - cmixID - ID of [Cmix] object in tracker. + - channelIdBase64 - The [id.ID] of the channel in base 64 encoding. Returns: - - The PEM file of the private key. + - The PEM file of the private key. */ FOUNDATION_EXPORT NSString* _Nonnull BindingsGetSavedChannelPrivateKeyUNSAFE(long cmixID, NSString* _Nullable channelIdBase64, NSError* _Nullable* _Nullable error); @@ -2803,15 +2827,16 @@ FOUNDATION_EXPORT NSString* _Nonnull BindingsGetSavedChannelPrivateKeyUNSAFE(lon If the URL is an invalid channel URL, an error is returned. Parameters: - - url - The channel share URL. + - url - The channel share URL. Returns: - - An int that corresponds to the [broadcast.PrivacyLevel] as outlined below. + - An int that corresponds to the [broadcast.PrivacyLevel] as outlined below. Possible returns: - 0 = public channel - 1 = private channel - 2 = secret channel + + 0 = public channel + 1 = private channel + 2 = secret channel */ FOUNDATION_EXPORT BOOL BindingsGetShareUrlType(NSString* _Nullable url, long* _Nullable ret0_, NSError* _Nullable* _Nullable error); @@ -2825,11 +2850,11 @@ FOUNDATION_EXPORT NSString* _Nonnull BindingsGetVersion(void); data. Parameters: - - password - The password used to encrypt the identity. - - data - The encrypted data. + - password - The password used to encrypt the identity. + - data - The encrypted data. Returns: - - JSON of [channel.PrivateIdentity]. + - JSON of [channel.PrivateIdentity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsImportPrivateIdentity(NSString* _Nullable password, NSData* _Nullable data, NSError* _Nullable* _Nullable error); @@ -2909,12 +2934,12 @@ The channel manager should have previously been created with [ChannelsManager.GetStorageTag]. Parameters: - - cmixID - The tracked cmix object ID. This can be retrieved using - [Cmix.GetID]. - - storageTag - The storage tag associated with the previously created - channel manager and retrieved with [ChannelsManager.GetStorageTag]. - - event - An interface that contains a function that initialises and returns - the event model that is bindings-compatible. + - cmixID - The tracked cmix object ID. This can be retrieved using + [Cmix.GetID]. + - storageTag - The storage tag associated with the previously created + channel manager and retrieved with [ChannelsManager.GetStorageTag]. + - event - An interface that contains a function that initialises and returns + the event model that is bindings-compatible. */ FOUNDATION_EXPORT BindingsChannelsManager* _Nullable BindingsLoadChannelsManager(long cmixID, NSString* _Nullable storageTag, id<BindingsEventModelBuilder> _Nullable eventBuilder, NSError* _Nullable* _Nullable error); @@ -3014,12 +3039,12 @@ FOUNDATION_EXPORT BOOL BindingsMultiLookupUD(long e2eID, NSData* _Nullable udCon * NewChannelsDatabaseCipher constructs a ChannelDbCipher object. Parameters: - - cmixID - The tracked [Cmix] object ID. - - password - The password for storage. This should be the same password - passed into [NewCmix]. - - plaintTextBlockSize - The maximum size of a payload to be encrypted. - A payload passed into [ChannelDbCipher.Encrypt] that is larger than - plaintTextBlockSize will result in an error. + - cmixID - The tracked [Cmix] object ID. + - password - The password for storage. This should be the same password + passed into [NewCmix]. + - plaintTextBlockSize - The maximum size of a payload to be encrypted. + A payload passed into [ChannelDbCipher.Encrypt] that is larger than + plaintTextBlockSize will result in an error. */ FOUNDATION_EXPORT BindingsChannelDbCipher* _Nullable BindingsNewChannelsDatabaseCipher(long cmixID, NSData* _Nullable password, long plaintTextBlockSize, NSError* _Nullable* _Nullable error); @@ -3033,12 +3058,12 @@ reload this channel manager, use [LoadChannelsManager], passing in the storage tag retrieved by [ChannelsManager.GetStorageTag]. Parameters: - - cmixID - The tracked Cmix object ID. This can be retrieved using - [Cmix.GetID]. - - privateIdentity - Bytes of a private identity ([channel.PrivateIdentity]) - that is generated by [GenerateChannelIdentity]. - - event - An interface that contains a function that initialises and returns - the event model that is bindings-compatible. + - cmixID - The tracked Cmix object ID. This can be retrieved using + [Cmix.GetID]. + - privateIdentity - Bytes of a private identity ([channel.PrivateIdentity]) + that is generated by [GenerateChannelIdentity]. + - event - An interface that contains a function that initialises and returns + the event model that is bindings-compatible. */ FOUNDATION_EXPORT BindingsChannelsManager* _Nullable BindingsNewChannelsManager(long cmixID, NSData* _Nullable privateIdentity, id<BindingsEventModelBuilder> _Nullable eventBuilder, NSError* _Nullable* _Nullable error); 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 ecd3142a1f4d3259c940950b488d71d38794a272..d2b36722d13be6fb98007d8fa0d902553ba0a5fe 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 dcf46cd4439785f4f904ea1f41277a66ed3e7db9..29b692cb622e84ca73a5d29b1f3954765ffb29db 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 @@ -470,7 +470,7 @@ be returned by this function. Any padding will be discarded within this function. Parameters: - - ciphertext - the encrypted data returned by [ChannelDbCipher.Encrypt]. + - ciphertext - the encrypted data returned by [ChannelDbCipher.Encrypt]. */ - (NSData* _Nullable)decrypt:(NSData* _Nullable)ciphertext error:(NSError* _Nullable* _Nullable)error; /** @@ -478,15 +478,28 @@ Parameters: done on the plaintext so all encrypted data looks uniform at rest. Parameters: - - plaintext - The data to be encrypted. This must be smaller than the block - size passed into [NewChannelsDatabaseCipher]. If it is larger, this will - return an error. + - plaintext - The data to be encrypted. This must be smaller than the block + size passed into [NewChannelsDatabaseCipher]. If it is larger, this will + return an error. */ - (NSData* _Nullable)encrypt:(NSData* _Nullable)plaintext error:(NSError* _Nullable* _Nullable)error; /** * GetID returns the ID for this ChannelDbCipher in the channelDbCipherTracker. */ - (long)getID; +/** + * MarshalJSON marshals the cipher into valid JSON. This function adheres to the +json.Marshaler interface. + */ +- (NSData* _Nullable)marshalJSON:(NSError* _Nullable* _Nullable)error; +/** + * UnmarshalJSON unmarshalls JSON into the cipher. This function adheres to the +json.Unmarshaler interface. + +Note that this function does not transfer the internal RNG. Use +NewCipherFromJSON to properly reconstruct a cipher from JSON. + */ +- (BOOL)unmarshalJSON:(NSData* _Nullable)data error:(NSError* _Nullable* _Nullable)error; @end /** @@ -495,10 +508,11 @@ contains the public channel info formatted in pretty print and the private key for the channel in PEM format. Example JSON: - { - "Channel": "\u003cSpeakeasy-v3:name|description:desc|level:Public|created:1665489600000000000|secrets:zjHmrPPMDQ0tNSANjAmQfKhRpJIdJMU+Hz5hsZ+fVpk=|qozRNkADprqb38lsnU7WxCtGCq9OChlySCEgl4NHjI4=|2|328|7aZQAtuVjE84q4Z09iGytTSXfZj9NyTa6qBp0ueKjCI=\u003e", - "PrivateKey": "-----BEGIN RSA PRIVATE KEY-----\nMCYCAQACAwDVywIDAQABAgMAlVECAgDvAgIA5QICAJECAgCVAgIA1w==\n-----END RSA PRIVATE KEY-----" - } + + { + "Channel": "\u003cSpeakeasy-v3:name|description:desc|level:Public|created:1665489600000000000|secrets:zjHmrPPMDQ0tNSANjAmQfKhRpJIdJMU+Hz5hsZ+fVpk=|qozRNkADprqb38lsnU7WxCtGCq9OChlySCEgl4NHjI4=|2|328|7aZQAtuVjE84q4Z09iGytTSXfZj9NyTa6qBp0ueKjCI=\u003e", + "PrivateKey": "-----BEGIN RSA PRIVATE KEY-----\nMCYCAQACAwDVywIDAQABAgMAlVECAgDvAgIA5QICAJECAgCVAgIA1w==\n-----END RSA PRIVATE KEY-----" + } */ @interface BindingsChannelGeneration : NSObject <goSeqRefInterface> { } @@ -514,11 +528,12 @@ Example JSON: * ChannelInfo contains information about a channel. Example of ChannelInfo JSON: - { - "Name": "Test Channel", - "Description": "This is a test channel", - "ChannelID": "RRnpRhmvXtW9ugS1nILJ3WfttdctDvC2jeuH43E0g/0D", - } + + { + "Name": "Test Channel", + "Description": "This is a test channel", + "ChannelID": "RRnpRhmvXtW9ugS1nILJ3WfttdctDvC2jeuH43E0g/0D", + } */ @interface BindingsChannelInfo : NSObject <goSeqRefInterface> { } @@ -536,11 +551,12 @@ Example of ChannelInfo JSON: ChannelsManager's Send operations. JSON Example: - { - "MessageId": "0kitNxoFdsF4q1VMSI/xPzfCnGB2l+ln2+7CTHjHbJw=", - "Rounds":[1,5,9], - "EphId": 0 - } + + { + "MessageId": "0kitNxoFdsF4q1VMSI/xPzfCnGB2l+ln2+7CTHjHbJw=", + "Rounds":[1,5,9], + "EphId": 0 + } */ @interface BindingsChannelSendReport : NSObject <goSeqRefInterface> { } @@ -574,12 +590,12 @@ reload this channel manager, use [LoadChannelsManager], passing in the storage tag retrieved by [ChannelsManager.GetStorageTag]. Parameters: - - cmixID - The tracked Cmix object ID. This can be retrieved using - [Cmix.GetID]. - - privateIdentity - Bytes of a private identity ([channel.PrivateIdentity]) - that is generated by [GenerateChannelIdentity]. - - event - An interface that contains a function that initialises and returns - the event model that is bindings-compatible. + - cmixID - The tracked Cmix object ID. This can be retrieved using + [Cmix.GetID]. + - privateIdentity - Bytes of a private identity ([channel.PrivateIdentity]) + that is generated by [GenerateChannelIdentity]. + - event - An interface that contains a function that initialises and returns + the event model that is bindings-compatible. */ - (nullable instancetype)init:(long)cmixID privateIdentity:(NSData* _Nullable)privateIdentity eventBuilder:(id<BindingsEventModelBuilder> _Nullable)eventBuilder; // skipped constructor ChannelsManager.NewChannelsManagerGoEventModel with unsupported parameter or return types @@ -597,13 +613,14 @@ string. * GetChannels returns the IDs of all channels that have been joined. Returns: - - []byte - A JSON marshalled list of IDs. + - []byte - A JSON marshalled list of IDs. JSON Example: - { - "U4x/lrFkvxuXu59LtHLon1sUhPJSCcnZND6SugndnVID", - "15tNdkKbYXoMn58NO6VbDMDWFEyIhTWEGsvgcJsHWAgD" - } + + { + "U4x/lrFkvxuXu59LtHLon1sUhPJSCcnZND6SugndnVID", + "15tNdkKbYXoMn58NO6VbDMDWFEyIhTWEGsvgcJsHWAgD" + } */ - (NSData* _Nullable)getChannels:(NSError* _Nullable* _Nullable)error; /** @@ -639,14 +656,14 @@ calling [ChannelsManager.JoinChannelFromURL]. There is no enforcement for public URLs. Parameters: - - cmixID - The tracked Cmix object ID. - - host - The URL to append the channel info to. - - maxUses - The maximum number of uses the link can be used (0 for - unlimited). - - marshalledChanId - A marshalled channel ID ([id.ID]). + - cmixID - The tracked Cmix object ID. + - host - The URL to append the channel info to. + - maxUses - The maximum number of uses the link can be used (0 for + unlimited). + - marshalledChanId - A marshalled channel ID ([id.ID]). Returns: - - JSON of ShareURL. + - JSON of ShareURL. */ - (NSData* _Nullable)getShareURL:(long)cmixID host:(NSString* _Nullable)host maxUses:(long)maxUses marshalledChanId:(NSData* _Nullable)marshalledChanId error:(NSError* _Nullable* _Nullable)error; /** @@ -658,14 +675,15 @@ Returns: been joined. Parameters: - - channelPretty - A portable channel string. Should be received from - another user or generated via GenerateChannel. + - channelPretty - A portable channel string. Should be received from + another user or generated via GenerateChannel. The pretty print will be of the format: - <Speakeasy-v3:Test_Channel|description:Channel description.|level:Public|created:1666718081766741100|secrets:+oHcqDbJPZaT3xD5NcdLY8OjOMtSQNKdKgLPmr7ugdU=|rCI0wr01dHFStjSFMvsBzFZClvDIrHLL5xbCOPaUOJ0=|493|1|7cBhJxVfQxWo+DypOISRpeWdQBhuQpAZtUbQHjBm8NQ=> + + <Speakeasy-v3:Test_Channel|description:Channel description.|level:Public|created:1666718081766741100|secrets:+oHcqDbJPZaT3xD5NcdLY8OjOMtSQNKdKgLPmr7ugdU=|rCI0wr01dHFStjSFMvsBzFZClvDIrHLL5xbCOPaUOJ0=|493|1|7cBhJxVfQxWo+DypOISRpeWdQBhuQpAZtUbQHjBm8NQ=> Returns: - - []byte - JSON of [ChannelInfo], which describes all relevant channel info. + - []byte - JSON of [ChannelInfo], which describes all relevant channel info. */ - (NSData* _Nullable)joinChannel:(NSString* _Nullable)channelPretty error:(NSError* _Nullable* _Nullable)error; /** @@ -673,7 +691,7 @@ Returns: channel was not previously joined. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). */ - (BOOL)leaveChannel:(NSData* _Nullable)marshalledChanId error:(NSError* _Nullable* _Nullable)error; /** @@ -685,10 +703,10 @@ There can only be one handler per [channels.MessageType], and this will return an error on any re-registration. Parameters: - - messageType - represents the [channels.MessageType] which will have a - registered listener. - - listenerCb - the callback which will be executed when a channel message - of messageType is received. + - messageType - represents the [channels.MessageType] which will have a + registered listener. + - listenerCb - the callback which will be executed when a channel message + of messageType is received. */ - (BOOL)registerReceiveHandler:(long)messageType listenerCb:(id<BindingsChannelMessageReceptionCallback> _Nullable)listenerCb error:(NSError* _Nullable* _Nullable)error; /** @@ -696,7 +714,7 @@ Parameters: memory (~3 weeks) over the event model. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). */ - (BOOL)replayChannel:(NSData* _Nullable)marshalledChanId error:(NSError* _Nullable* _Nullable)error; /** @@ -707,23 +725,23 @@ before being sent over the wire, is too long, this will return an error. The message must be at most 510 bytes long. Parameters: - - adminPrivateKey - The PEM-encoded admin RSA private key. - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - messageType - The message type of the message. This will be a valid - [channels.MessageType]. - - message - The contents of the message. The message should be at most 510 - bytes. This need not be of data type string, as the message could be a - specified format that the channel may recognize. - - leaseTimeMS - The lease of the message. This will be how long the message - is valid until, in milliseconds. As per the channels.Manager - documentation, this has different meanings depending on the use case. - These use cases may be generic enough that they will not be enumerated - here. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, - and GetDefaultCMixParams will be used internally. + - adminPrivateKey - The PEM-encoded admin RSA private key. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - messageType - The message type of the message. This will be a valid + [channels.MessageType]. + - message - The contents of the message. The message should be at most 510 + bytes. This need not be of data type string, as the message could be a + specified format that the channel may recognize. + - leaseTimeMS - The lease of the message. This will be how long the message + is valid until, in milliseconds. As per the channels.Manager + documentation, this has different meanings depending on the use case. + These use cases may be generic enough that they will not be enumerated + here. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, + and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport. + - []byte - A JSON marshalled ChannelSendReport. */ - (NSData* _Nullable)sendAdminGeneric:(NSData* _Nullable)adminPrivateKey marshalledChanId:(NSData* _Nullable)marshalledChanId messageType:(long)messageType message:(NSData* _Nullable)message leaseTimeMS:(int64_t)leaseTimeMS cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -736,22 +754,22 @@ to send a payload of 802 bytes at minimum. The meaning of validUntil depends on the use case. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - messageType - The message type of the message. This will be a valid - [channels.MessageType]. - - message - The contents of the message. This need not be of data type - string, as the message could be a specified format that the channel may - recognize. - - leaseTimeMS - The lease of the message. This will be how long the message - is valid until, in milliseconds. As per the channels.Manager - documentation, this has different meanings depending on the use case. - These use cases may be generic enough that they will not be enumerated - here. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, - and GetDefaultCMixParams will be used internally. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - messageType - The message type of the message. This will be a valid + [channels.MessageType]. + - message - The contents of the message. This need not be of data type + string, as the message could be a specified format that the channel may + recognize. + - leaseTimeMS - The lease of the message. This will be how long the message + is valid until, in milliseconds. As per the channels.Manager + documentation, this has different meanings depending on the use case. + These use cases may be generic enough that they will not be enumerated + here. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, + and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport. + - []byte - A JSON marshalled ChannelSendReport. */ - (NSData* _Nullable)sendGeneric:(NSData* _Nullable)marshalledChanId messageType:(long)messageType message:(NSData* _Nullable)message leaseTimeMS:(int64_t)leaseTimeMS cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -764,20 +782,20 @@ The message will auto delete validUntil after the round it is sent in, lasting forever if [channels.ValidForever] is used. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - message - The contents of the message. The message should be at most 510 - bytes. This is expected to be Unicode, and thus a string data type is - expected - - leaseTimeMS - The lease of the message. This will be how long the message - is valid until, in milliseconds. As per the channels.Manager - documentation, this has different meanings depending on the use case. - These use cases may be generic enough that they will not be enumerated - here. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be - empty, and GetDefaultCMixParams will be used internally. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - message - The contents of the message. The message should be at most 510 + bytes. This is expected to be Unicode, and thus a string data type is + expected + - leaseTimeMS - The lease of the message. This will be how long the message + is valid until, in milliseconds. As per the channels.Manager + documentation, this has different meanings depending on the use case. + These use cases may be generic enough that they will not be enumerated + here. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be + empty, and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport + - []byte - A JSON marshalled ChannelSendReport */ - (NSData* _Nullable)sendMessage:(NSData* _Nullable)marshalledChanId message:(NSString* _Nullable)message leaseTimeMS:(int64_t)leaseTimeMS cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -787,19 +805,19 @@ be rejected otherwise. Users will drop the reaction if they do not recognize the reactTo message. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - reaction - The user's reaction. This should be a single emoji with no - other characters. As such, a Unicode string is expected. - - messageToReactTo - The marshalled [channel.MessageID] of the message you - wish to reply to. This may be found in the ChannelSendReport if replying - to your own. Alternatively, if reacting to another user's message, you may - retrieve it via the ChannelMessageReceptionCallback registered using - RegisterReceiveHandler. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, - and GetDefaultCMixParams will be used internally. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - reaction - The user's reaction. This should be a single emoji with no + other characters. As such, a Unicode string is expected. + - messageToReactTo - The marshalled [channel.MessageID] of the message you + wish to reply to. This may be found in the ChannelSendReport if replying + to your own. Alternatively, if reacting to another user's message, you may + retrieve it via the ChannelMessageReceptionCallback registered using + RegisterReceiveHandler. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, + and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport. + - []byte - A JSON marshalled ChannelSendReport. */ - (NSData* _Nullable)sendReaction:(NSData* _Nullable)marshalledChanId reaction:(NSString* _Nullable)reaction messageToReactTo:(NSData* _Nullable)messageToReactTo cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -814,25 +832,25 @@ delete validUntil after the round it is sent in, lasting forever if [channels.ValidForever] is used. Parameters: - - marshalledChanId - A JSON marshalled channel ID ([id.ID]). - - message - The contents of the message. The message should be at most 510 - bytes. This is expected to be Unicode, and thus a string data type is - expected. - - messageToReactTo - The marshalled [channel.MessageID] of the message you - wish to reply to. This may be found in the ChannelSendReport if replying - to your own. Alternatively, if reacting to another user's message, you may - retrieve it via the ChannelMessageReceptionCallback registered using - RegisterReceiveHandler. - - leaseTimeMS - The lease of the message. This will be how long the message - is valid until, in milliseconds. As per the channels.Manager - documentation, this has different meanings depending on the use case. - These use cases may be generic enough that they will not be enumerated - here. - - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, - and GetDefaultCMixParams will be used internally. + - marshalledChanId - A JSON marshalled channel ID ([id.ID]). + - message - The contents of the message. The message should be at most 510 + bytes. This is expected to be Unicode, and thus a string data type is + expected. + - messageToReactTo - The marshalled [channel.MessageID] of the message you + wish to reply to. This may be found in the ChannelSendReport if replying + to your own. Alternatively, if reacting to another user's message, you may + retrieve it via the ChannelMessageReceptionCallback registered using + RegisterReceiveHandler. + - leaseTimeMS - The lease of the message. This will be how long the message + is valid until, in milliseconds. As per the channels.Manager + documentation, this has different meanings depending on the use case. + These use cases may be generic enough that they will not be enumerated + here. + - cmixParamsJSON - A JSON marshalled [xxdk.CMIXParams]. This may be empty, + and GetDefaultCMixParams will be used internally. Returns: - - []byte - A JSON marshalled ChannelSendReport + - []byte - A JSON marshalled ChannelSendReport */ - (NSData* _Nullable)sendReply:(NSData* _Nullable)marshalledChanId message:(NSString* _Nullable)message messageToReactTo:(NSData* _Nullable)messageToReactTo leaseTimeMS:(int64_t)leaseTimeMS cmixParamsJSON:(NSData* _Nullable)cmixParamsJSON error:(NSError* _Nullable* _Nullable)error; /** @@ -2130,17 +2148,18 @@ channel the message was sent to and the message itself. This is returned via the callback as JSON marshalled bytes. JSON Example: - { - "ChannelId": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "MessageId": "3S6DiVjWH9mLmjy1oaam/3x45bJQzOW6u2KgeUn59wA=", - "ReplyTo":"cxMyGUFJ+Ff1Xp2X+XkIpOnNAQEZmv8SNP5eYH4tCik=", - "MessageType": 42, - "SenderUsername": "hunter2", - "Content": "YmFuX2JhZFVTZXI=", - "Timestamp": 1662502150335283000, - "Lease": 25, - "Rounds": [ 1, 4, 9], - } + + { + "ChannelId": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "MessageId": "3S6DiVjWH9mLmjy1oaam/3x45bJQzOW6u2KgeUn59wA=", + "ReplyTo":"cxMyGUFJ+Ff1Xp2X+XkIpOnNAQEZmv8SNP5eYH4tCik=", + "MessageType": 42, + "SenderUsername": "hunter2", + "Content": "YmFuX2JhZFVTZXI=", + "Timestamp": 1662502150335283000, + "Lease": 25, + "Rounds": [ 1, 4, 9], + } */ @interface BindingsReceivedChannelMessageReport : NSObject <goSeqRefInterface> { } @@ -2271,22 +2290,25 @@ JSON Example: channel's share URL and password, if it needs one. JSON example for a public channel: - { - "url": "https://internet.speakeasy.tech/?0Name=name&1Description=desc&2Level=Public&3Created=1665489600000000000&e=%2FWNZvuHPuv%2Bx23XbZXVNzCi7y8rUSxkh75MpR9UrsCo%3D&k=ddX1CH52xH%2F%2Fb6lKrbvDghdSmCQr90ktsOAZ%2FrhEonI%3D&l=2&m=0&p=328&s=%2FD%2FoQP2mio3XAWfhmWF0xmZrpj4nAsb9JLXj%2B0Mzq9Y%3D&v=1", - "password": "" - } + + { + "url": "https://internet.speakeasy.tech/?0Name=name&1Description=desc&2Level=Public&3Created=1665489600000000000&e=%2FWNZvuHPuv%2Bx23XbZXVNzCi7y8rUSxkh75MpR9UrsCo%3D&k=ddX1CH52xH%2F%2Fb6lKrbvDghdSmCQr90ktsOAZ%2FrhEonI%3D&l=2&m=0&p=328&s=%2FD%2FoQP2mio3XAWfhmWF0xmZrpj4nAsb9JLXj%2B0Mzq9Y%3D&v=1", + "password": "" + } JSON example for a private channel: - { - "url": "https://internet.speakeasy.tech/?0Name=name&1Description=desc&3Created=1665489600000000000&d=5AZQirb%2FYrmUITLn%2FFzCaGek1APfJnd2q0KwORGj%2BnbGg26kTShG6cfD3w6c%2BA3RDzxuKDSDN0zS4n1LbjiGe0KYdb8eJVeyRZtld516hfojNDXNAwZq8zbeZy4jjbF627fcLHRNS%2FaII4uJ5UB3gLUeBeZGraaybCCu3FIj1N4RbcJ5cQgT7hBf93bHmJc%3D&m=0&v=1", - "password": "tribune gangrene labrador italics nutmeg process exhume legal" - } + + { + "url": "https://internet.speakeasy.tech/?0Name=name&1Description=desc&3Created=1665489600000000000&d=5AZQirb%2FYrmUITLn%2FFzCaGek1APfJnd2q0KwORGj%2BnbGg26kTShG6cfD3w6c%2BA3RDzxuKDSDN0zS4n1LbjiGe0KYdb8eJVeyRZtld516hfojNDXNAwZq8zbeZy4jjbF627fcLHRNS%2FaII4uJ5UB3gLUeBeZGraaybCCu3FIj1N4RbcJ5cQgT7hBf93bHmJc%3D&m=0&v=1", + "password": "tribune gangrene labrador italics nutmeg process exhume legal" + } JSON example for a secret channel: - { - "url": "https://internet.speakeasy.tech/?d=w5evLthm%2Fq2j11g6PPtV0QoLaAqNCIER0OqxhxL%2FhpGVJI0057ZPgGBrKoJNE1%2FdoVuU35%2FhohuW%2BWvGlx6IuHoN6mDj0HfNj6Lo%2B8GwIaD6jOEwUcH%2FMKGsKnoqFsMaMPd5gXYgdHvA8l5SRe0gSCVqGKUaG6JgL%2FDu4iyjY7v4ykwZdQ7soWOcBLHDixGEkVLpwsCrPVHkT2K0W6gV74GIrQ%3D%3D&m=0&v=1", - "password": "frenzy contort staple thicket consuming affiliate scion demeanor" - } + + { + "url": "https://internet.speakeasy.tech/?d=w5evLthm%2Fq2j11g6PPtV0QoLaAqNCIER0OqxhxL%2FhpGVJI0057ZPgGBrKoJNE1%2FdoVuU35%2FhohuW%2BWvGlx6IuHoN6mDj0HfNj6Lo%2B8GwIaD6jOEwUcH%2FMKGsKnoqFsMaMPd5gXYgdHvA8l5SRe0gSCVqGKUaG6JgL%2FDu4iyjY7v4ykwZdQ7soWOcBLHDixGEkVLpwsCrPVHkT2K0W6gV74GIrQ%3D%3D&m=0&v=1", + "password": "frenzy contort staple thicket consuming affiliate scion demeanor" + } */ @interface BindingsShareURL : NSObject <goSeqRefInterface> { } @@ -2481,11 +2503,11 @@ FOUNDATION_EXPORT BOOL BindingsAsyncRequestRestLike(long e2eID, NSData* _Nullabl and codeset version. Parameters: - - pubKey - The Ed25519 public key. - - codesetVersion - The version of the codeset used to generate the identity. + - pubKey - The Ed25519 public key. + - codesetVersion - The version of the codeset used to generate the identity. Returns: - - JSON of [channel.Identity]. + - JSON of [channel.Identity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsConstructIdentity(NSData* _Nullable pubKey, long codesetVersion, NSError* _Nullable* _Nullable error); @@ -2512,12 +2534,12 @@ pretty print. This function can only be used for private or secret channel URLs. To get the privacy level of a channel URL, use [GetShareUrlType]. Parameters: - - url - The channel's share URL. Should be received from another user or - generated via [GetShareURL]. - - password - The password needed to decrypt the secret data in the URL. + - url - The channel's share URL. Should be received from another user or + generated via [GetShareURL]. + - password - The password needed to decrypt the secret data in the URL. Returns: - - The channel pretty print. + - The channel pretty print. */ FOUNDATION_EXPORT NSString* _Nonnull BindingsDecodePrivateURL(NSString* _Nullable url, NSString* _Nullable password, NSError* _Nullable* _Nullable error); @@ -2527,11 +2549,11 @@ function can only be used for public channel URLs. To get the privacy level of a channel URL, use [GetShareUrlType]. Parameters: - - url - The channel's share URL. Should be received from another user or - generated via [GetShareURL]. + - url - The channel's share URL. Should be received from another user or + generated via [GetShareURL]. Returns: - - The channel pretty print. + - The channel pretty print. */ FOUNDATION_EXPORT NSString* _Nonnull BindingsDecodePublicURL(NSString* _Nullable url, NSError* _Nullable* _Nullable error); @@ -2561,33 +2583,33 @@ the admin. It is only for making new channels, not joining existing ones. It returns a pretty print of the channel and the private key. Parameters: - - cmixID - The tracked cmix object ID. This can be retrieved using - [Cmix.GetID]. - - name - The name of the new channel. The name must be between 3 and 24 - characters inclusive. It can only include upper and lowercase unicode - letters, digits 0 through 9, and underscores (_). It cannot be changed - once a channel is created. - - description - The description of a channel. The description is optional - but cannot be longer than 144 characters and can include all unicode - characters. It cannot be changed once a channel is created. - - privacyLevel - The broadcast.PrivacyLevel of the channel. 0 = public, - 1 = private, and 2 = secret. Refer to the comment below for more - information. + - cmixID - The tracked cmix object ID. This can be retrieved using + [Cmix.GetID]. + - name - The name of the new channel. The name must be between 3 and 24 + characters inclusive. It can only include upper and lowercase unicode + letters, digits 0 through 9, and underscores (_). It cannot be changed + once a channel is created. + - description - The description of a channel. The description is optional + but cannot be longer than 144 characters and can include all unicode + characters. It cannot be changed once a channel is created. + - privacyLevel - The broadcast.PrivacyLevel of the channel. 0 = public, + 1 = private, and 2 = secret. Refer to the comment below for more + information. Returns: - - []byte - [ChannelGeneration] describes a generated channel. It contains - both the public channel info and the private key for the channel in PEM - format. + - []byte - [ChannelGeneration] describes a generated channel. It contains + both the public channel info and the private key for the channel in PEM + format. The [broadcast.PrivacyLevel] of a channel indicates the level of channel information revealed when sharing it via URL. For any channel besides public channels, the secret information is encrypted and a password is required to share and join a channel. - - A privacy level of [broadcast.Public] reveals all the information - including the name, description, privacy level, public key and salt. - - A privacy level of [broadcast.Private] reveals only the name and - description. - - A privacy level of [broadcast.Secret] reveals nothing. + - A privacy level of [broadcast.Public] reveals all the information + including the name, description, privacy level, public key and salt. + - A privacy level of [broadcast.Private] reveals only the name and + description. + - A privacy level of [broadcast.Secret] reveals nothing. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGenerateChannel(long cmixID, NSString* _Nullable name, NSString* _Nullable description, long privacyLevel, NSError* _Nullable* _Nullable error); @@ -2597,11 +2619,11 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsGenerateChannel(long cmixID, NSStrin via [GetPublicChannelIdentityFromPrivate]. Parameters: - - cmixID - The tracked cmix object ID. This can be retrieved using - [Cmix.GetID]. + - cmixID - The tracked cmix object ID. This can be retrieved using + [Cmix.GetID]. Returns: - - Marshalled bytes of [channel.PrivateIdentity]. + - Marshalled bytes of [channel.PrivateIdentity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGenerateChannelIdentity(long cmixID, NSError* _Nullable* _Nullable error); @@ -2625,13 +2647,14 @@ FOUNDATION_EXPORT BindingsChannelDbCipher* _Nullable BindingsGetChannelDbCipherT * GetChannelInfo returns the info about a channel from its public description. Parameters: - - prettyPrint - The pretty print of the channel. + - prettyPrint - The pretty print of the channel. The pretty print will be of the format: - <Speakeasy-v3:Test_Channel|description:Channel description.|level:Public|created:1666718081766741100|secrets:+oHcqDbJPZaT3xD5NcdLY8OjOMtSQNKdKgLPmr7ugdU=|rCI0wr01dHFStjSFMvsBzFZClvDIrHLL5xbCOPaUOJ0=|493|1|7cBhJxVfQxWo+DypOISRpeWdQBhuQpAZtUbQHjBm8NQ=> + + <Speakeasy-v3:Test_Channel|description:Channel description.|level:Public|created:1666718081766741100|secrets:+oHcqDbJPZaT3xD5NcdLY8OjOMtSQNKdKgLPmr7ugdU=|rCI0wr01dHFStjSFMvsBzFZClvDIrHLL5xbCOPaUOJ0=|493|1|7cBhJxVfQxWo+DypOISRpeWdQBhuQpAZtUbQHjBm8NQ=> Returns: - - []byte - JSON of [ChannelInfo], which describes all relevant channel info. + - []byte - JSON of [ChannelInfo], which describes all relevant channel info. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetChannelInfo(NSString* _Nullable prettyPrint, NSError* _Nullable* _Nullable error); @@ -2639,23 +2662,24 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsGetChannelInfo(NSString* _Nullable p * GetChannelJSON returns the JSON of the channel for the given pretty print. Parameters: - - prettyPrint - The pretty print of the channel. + - prettyPrint - The pretty print of the channel. Returns: - - JSON of the [broadcast.Channel] object. + - JSON of the [broadcast.Channel] object. Example JSON of [broadcast.Channel]: - { - "ReceptionID": "Ja/+Jh+1IXZYUOn+IzE3Fw/VqHOscomD0Q35p4Ai//kD", - "Name": "My_Channel", - "Description": "Here is information about my channel.", - "Salt": "+tlrU/htO6rrV3UFDfpQALUiuelFZ+Cw9eZCwqRHk+g=", - "RsaPubKeyHash": "PViT1mYkGBj6AYmE803O2RpA7BX24EjgBdldu3pIm4o=", - "RsaPubKeyLength": 5, - "RSASubPayloads": 1, - "Secret": "JxZt/wPx2luoPdHY6jwbXqNlKnixVU/oa9DgypZOuyI=", - "Level": 0 - } + + { + "ReceptionID": "Ja/+Jh+1IXZYUOn+IzE3Fw/VqHOscomD0Q35p4Ai//kD", + "Name": "My_Channel", + "Description": "Here is information about my channel.", + "Salt": "+tlrU/htO6rrV3UFDfpQALUiuelFZ+Cw9eZCwqRHk+g=", + "RsaPubKeyHash": "PViT1mYkGBj6AYmE803O2RpA7BX24EjgBdldu3pIm4o=", + "RsaPubKeyLength": 5, + "RSASubPayloads": 1, + "Secret": "JxZt/wPx2luoPdHY6jwbXqNlKnixVU/oa9DgypZOuyI=", + "Level": 0 + } */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetChannelJSON(NSString* _Nullable prettyPrint, NSError* _Nullable* _Nullable error); @@ -2762,10 +2786,10 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsGetPubkeyFromContact(NSData* _Nullab from a bytes version and returns it JSON marshaled. Parameters: - - marshaledPublic - Bytes of the public identity ([channel.Identity]). + - marshaledPublic - Bytes of the public identity ([channel.Identity]). Returns: - - JSON of the constructed [channel.Identity]. + - JSON of the constructed [channel.Identity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetPublicChannelIdentity(NSData* _Nullable marshaledPublic, NSError* _Nullable* _Nullable error); @@ -2775,11 +2799,11 @@ FOUNDATION_EXPORT NSData* _Nullable BindingsGetPublicChannelIdentity(NSData* _Nu ([channel.PrivateIdentity]). Parameters: - - marshaledPrivate - Bytes of the private identity - (channel.PrivateIdentity]). + - marshaledPrivate - Bytes of the private identity + (channel.PrivateIdentity]). Returns: - - JSON of the public [channel.Identity]. + - JSON of the public [channel.Identity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsGetPublicChannelIdentityFromPrivate(NSData* _Nullable marshaledPrivate, NSError* _Nullable* _Nullable error); @@ -2790,11 +2814,11 @@ given channel ID. NOTE: This function is unsafe and only for debugging purposes only. Parameters: - - cmixID - ID of [Cmix] object in tracker. - - channelIdBase64 - The [id.ID] of the channel in base 64 encoding. + - cmixID - ID of [Cmix] object in tracker. + - channelIdBase64 - The [id.ID] of the channel in base 64 encoding. Returns: - - The PEM file of the private key. + - The PEM file of the private key. */ FOUNDATION_EXPORT NSString* _Nonnull BindingsGetSavedChannelPrivateKeyUNSAFE(long cmixID, NSString* _Nullable channelIdBase64, NSError* _Nullable* _Nullable error); @@ -2803,15 +2827,16 @@ FOUNDATION_EXPORT NSString* _Nonnull BindingsGetSavedChannelPrivateKeyUNSAFE(lon If the URL is an invalid channel URL, an error is returned. Parameters: - - url - The channel share URL. + - url - The channel share URL. Returns: - - An int that corresponds to the [broadcast.PrivacyLevel] as outlined below. + - An int that corresponds to the [broadcast.PrivacyLevel] as outlined below. Possible returns: - 0 = public channel - 1 = private channel - 2 = secret channel + + 0 = public channel + 1 = private channel + 2 = secret channel */ FOUNDATION_EXPORT BOOL BindingsGetShareUrlType(NSString* _Nullable url, long* _Nullable ret0_, NSError* _Nullable* _Nullable error); @@ -2825,11 +2850,11 @@ FOUNDATION_EXPORT NSString* _Nonnull BindingsGetVersion(void); data. Parameters: - - password - The password used to encrypt the identity. - - data - The encrypted data. + - password - The password used to encrypt the identity. + - data - The encrypted data. Returns: - - JSON of [channel.PrivateIdentity]. + - JSON of [channel.PrivateIdentity]. */ FOUNDATION_EXPORT NSData* _Nullable BindingsImportPrivateIdentity(NSString* _Nullable password, NSData* _Nullable data, NSError* _Nullable* _Nullable error); @@ -2909,12 +2934,12 @@ The channel manager should have previously been created with [ChannelsManager.GetStorageTag]. Parameters: - - cmixID - The tracked cmix object ID. This can be retrieved using - [Cmix.GetID]. - - storageTag - The storage tag associated with the previously created - channel manager and retrieved with [ChannelsManager.GetStorageTag]. - - event - An interface that contains a function that initialises and returns - the event model that is bindings-compatible. + - cmixID - The tracked cmix object ID. This can be retrieved using + [Cmix.GetID]. + - storageTag - The storage tag associated with the previously created + channel manager and retrieved with [ChannelsManager.GetStorageTag]. + - event - An interface that contains a function that initialises and returns + the event model that is bindings-compatible. */ FOUNDATION_EXPORT BindingsChannelsManager* _Nullable BindingsLoadChannelsManager(long cmixID, NSString* _Nullable storageTag, id<BindingsEventModelBuilder> _Nullable eventBuilder, NSError* _Nullable* _Nullable error); @@ -3014,12 +3039,12 @@ FOUNDATION_EXPORT BOOL BindingsMultiLookupUD(long e2eID, NSData* _Nullable udCon * NewChannelsDatabaseCipher constructs a ChannelDbCipher object. Parameters: - - cmixID - The tracked [Cmix] object ID. - - password - The password for storage. This should be the same password - passed into [NewCmix]. - - plaintTextBlockSize - The maximum size of a payload to be encrypted. - A payload passed into [ChannelDbCipher.Encrypt] that is larger than - plaintTextBlockSize will result in an error. + - cmixID - The tracked [Cmix] object ID. + - password - The password for storage. This should be the same password + passed into [NewCmix]. + - plaintTextBlockSize - The maximum size of a payload to be encrypted. + A payload passed into [ChannelDbCipher.Encrypt] that is larger than + plaintTextBlockSize will result in an error. */ FOUNDATION_EXPORT BindingsChannelDbCipher* _Nullable BindingsNewChannelsDatabaseCipher(long cmixID, NSData* _Nullable password, long plaintTextBlockSize, NSError* _Nullable* _Nullable error); @@ -3033,12 +3058,12 @@ reload this channel manager, use [LoadChannelsManager], passing in the storage tag retrieved by [ChannelsManager.GetStorageTag]. Parameters: - - cmixID - The tracked Cmix object ID. This can be retrieved using - [Cmix.GetID]. - - privateIdentity - Bytes of a private identity ([channel.PrivateIdentity]) - that is generated by [GenerateChannelIdentity]. - - event - An interface that contains a function that initialises and returns - the event model that is bindings-compatible. + - cmixID - The tracked Cmix object ID. This can be retrieved using + [Cmix.GetID]. + - privateIdentity - Bytes of a private identity ([channel.PrivateIdentity]) + that is generated by [GenerateChannelIdentity]. + - event - An interface that contains a function that initialises and returns + the event model that is bindings-compatible. */ FOUNDATION_EXPORT BindingsChannelsManager* _Nullable BindingsNewChannelsManager(long cmixID, NSData* _Nullable privateIdentity, id<BindingsEventModelBuilder> _Nullable eventBuilder, NSError* _Nullable* _Nullable error);