From 8871c761fe4bd6e5632f052b175ccc71cb62f2be Mon Sep 17 00:00:00 2001 From: Alex Emmet <111742636+Alex-Emmet@users.noreply.github.com> Date: Tue, 7 Jul 2026 23:37:15 +0200 Subject: [PATCH] Typemap --- Cargo.lock | 52 ++++++++++++++++++++++++++----------------------- type-maps.yaml | 53 +++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 78 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1e33af4..7be625d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -538,27 +538,27 @@ checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" [[package]] name = "crossbeam-channel" -version = "0.5.15" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.18" +version = "0.9.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.21" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" [[package]] name = "crypto-common" @@ -1479,11 +1479,11 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" dependencies = [ - "getrandom 0.3.4", + "getrandom 0.4.3", "libc", ] @@ -1733,7 +1733,7 @@ dependencies = [ [[package]] name = "mtp" version = "0.1.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#515244ce6664b355f0a89b00c8c18c26c8b95dbd" +source = "git+https://git.methanium.net/Methanium/mtp.git#2126a142f44634ccfdcaa297633fdb63b1d9b46d" dependencies = [ "mtp-client", "mtp-codec", @@ -1747,7 +1747,7 @@ dependencies = [ [[package]] name = "mtp-client" version = "0.1.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#515244ce6664b355f0a89b00c8c18c26c8b95dbd" +source = "git+https://git.methanium.net/Methanium/mtp.git#2126a142f44634ccfdcaa297633fdb63b1d9b46d" dependencies = [ "mtp-codec", "mtp-common", @@ -1760,7 +1760,7 @@ dependencies = [ [[package]] name = "mtp-codec" version = "0.1.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#515244ce6664b355f0a89b00c8c18c26c8b95dbd" +source = "git+https://git.methanium.net/Methanium/mtp.git#2126a142f44634ccfdcaa297633fdb63b1d9b46d" dependencies = [ "base64 0.22.1", "byteorder", @@ -1773,7 +1773,7 @@ dependencies = [ [[package]] name = "mtp-common" version = "0.1.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#515244ce6664b355f0a89b00c8c18c26c8b95dbd" +source = "git+https://git.methanium.net/Methanium/mtp.git#2126a142f44634ccfdcaa297633fdb63b1d9b46d" dependencies = [ "quinn", "rustls", @@ -1784,7 +1784,7 @@ dependencies = [ [[package]] name = "mtp-crypto" version = "0.1.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#515244ce6664b355f0a89b00c8c18c26c8b95dbd" +source = "git+https://git.methanium.net/Methanium/mtp.git#2126a142f44634ccfdcaa297633fdb63b1d9b46d" dependencies = [ "base64 0.22.1", "chacha20poly1305", @@ -1803,7 +1803,7 @@ dependencies = [ [[package]] name = "mtp-files" version = "0.1.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#515244ce6664b355f0a89b00c8c18c26c8b95dbd" +source = "git+https://git.methanium.net/Methanium/mtp.git#2126a142f44634ccfdcaa297633fdb63b1d9b46d" dependencies = [ "mtp-crypto", "thiserror 1.0.69", @@ -1812,7 +1812,7 @@ dependencies = [ [[package]] name = "mtp-host" version = "0.1.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#515244ce6664b355f0a89b00c8c18c26c8b95dbd" +source = "git+https://git.methanium.net/Methanium/mtp.git#2126a142f44634ccfdcaa297633fdb63b1d9b46d" dependencies = [ "mtp-codec", "mtp-common", @@ -1825,11 +1825,12 @@ dependencies = [ [[package]] name = "mtp-transport" version = "0.1.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#515244ce6664b355f0a89b00c8c18c26c8b95dbd" +source = "git+https://git.methanium.net/Methanium/mtp.git#2126a142f44634ccfdcaa297633fdb63b1d9b46d" dependencies = [ "log", "mtp-codec", "mtp-common", + "rcgen", "rustls", "rustls-native-certs", "tokio", @@ -1839,7 +1840,7 @@ dependencies = [ [[package]] name = "mtp-type-map" version = "0.1.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#515244ce6664b355f0a89b00c8c18c26c8b95dbd" +source = "git+https://git.methanium.net/Methanium/mtp.git#2126a142f44634ccfdcaa297633fdb63b1d9b46d" dependencies = [ "serde", "serde_yaml", @@ -2648,6 +2649,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57f6d249aad744e274e682777a50283a225a32705394ee6d5fcc01efa25e4055" dependencies = [ "aws-lc-rs", + "pem", + "ring", "rustls-pki-types", "time", "x509-parser", @@ -2837,9 +2840,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "ryu" @@ -3955,6 +3958,7 @@ dependencies = [ "lazy_static", "nom", "oid-registry", + "ring", "rusticata-macros", "thiserror 2.0.18", "time", @@ -3995,18 +3999,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.52" +version = "0.8.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f" +checksum = "75726053136156d419e285b9b7eddaaea9e3fea6ce32eed44a89901f0bd98de1" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.52" +version = "0.8.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" +checksum = "4714fd92cf900833d49538023a9b3915155210801d1c1169eba513b2addefd71" dependencies = [ "proc-macro2", "quote", diff --git a/type-maps.yaml b/type-maps.yaml index 0eebb7f..a36bfc6 100644 --- a/type-maps.yaml +++ b/type-maps.yaml @@ -1,8 +1,46 @@ -# The version a Client should use protocol_version: "1.0" +# Note that markers 0 to 31 are reserved for default use, manually working with them is not recommended + +# Fixed CommunicationType markers are: +# Error: 0 +# ErrorParsing: 1 +# ErrorBadVersion: 2 +# Disconnect: 3 +# Redirect: 4 +# Shutdown: 5 +# BadRequest: 6 +# Unauthorized: 7 +# Forbidden: 8 +# NotFound: 9 +# TooManyRequests: 10 +# InternalServerError: 11 +# BadGateway: 12 +# ServiceUnavailable: 13 +# GatewayTimeout: 14 +# Identification: 15 +# IdentificationResponse: 16 +# Register: 17 +# RegisterResponse: 18 +# Ping: 19 +# Pong: 20 + +# Fixed Data Type markers are: +# Error: 0 +# ErrorParsing: 1 +# ErrorMessage: 2 +# Version: 3 +# Description: 4 +# Timestamp: 5 +# Id: 6 +# ClientNonce: 7 +# ServerNonce: 8 +# PublicKeys: 9 +# Signature: 10 +# Connected: 11 + type_maps: - "1.0": # Protocol version 1.0 + "1.0": CommunicationTypes: ErrorProtocol: 33 ErrorAnonymous: 34 @@ -33,6 +71,7 @@ type_maps: MessageLive: 59 MessageOtherIota: 60 MessageChunk: 61 + MessageGet: 143 MessagesGet: 62 PushNotification: 63 ReadNotification: 64 @@ -104,6 +143,11 @@ type_maps: GetChatSecret: 140 ChatSecretResponse: 141 ChatSecretForward: 142 + MessageEditLive: 144 + MessageEdit: 145 + MessageReactionAdd: 146 + MessageReactionRemove: 147 + MessageReactionLive: 148 DataTypes: ErrorType: 32 ErrorProtocol: 33 @@ -218,4 +262,7 @@ type_maps: SenderUserId: 152 RecipientUserId: 153 Recipients: 154 - ReplyId: 155 + Edited: 155 + Reactions: 156 + Reaction: + ReplyId: 158