diff --git a/plan.md b/plan.md deleted file mode 100644 index f57644df0..000000000 --- a/plan.md +++ /dev/null @@ -1,48 +0,0 @@ -Step 1: Make sure native SDKs provide hooks for just decrypting bytes to hand off to client -Step 2: Introduce two new types to RN SDK: - -```ts - -// JSContentCodecs just get the decrypted bytes from the native layer and encode/decode -// into JS objects, similar to how codecs work in the other SDKs. This should be suitable -// for small objects like replies, reactions, etc. -interface JSContentCodec { - encode(object: T): EncodedContent - decode(encodedContent: EncodedContent): T - fallback(object: T): string | undefined -} - -// NativeContentCodecs perform both encryption as well as encoding operations in the native -// layer. These require swift/kotlin implementations -interface NativeContentCodec { - encode(object: T): EncodedContent - decode(encodedContent: EncodedContent): T - fallback(object: T): string | undefined -} - -// To send a basic Reaction message: -type Reaction = { - messageID: string, - reaction: string -} - -class ReactionCodec: JSContentCodec { - encode(object: Reaction): EncodedContent { - - } - - encode(encodedContent: EncodedContent): Reaction { - - } -} - -conversation.send(reaction, { codec: ReactionCodec }) - -// To send a remote attachment: -class RemoteAttachmentCodec: NativeContentCodec { - -} - - - -```