async-matrix 2.1.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Cargo.lock +8 -8
- data/README.md +33 -58
- data/ext/async_matrix_e2ee/Cargo.toml +7 -1
- data/lib/async/matrix/api/chain.rb +120 -94
- data/lib/async/matrix/api/concat.rb +28 -22
- data/lib/async/matrix/api/path_tree.rb +71 -44
- data/lib/async/matrix/api.rb +6 -1
- data/lib/async/matrix/app_service_client.rb +213 -0
- data/lib/async/matrix/auth_error.rb +20 -0
- data/lib/async/matrix/bad_json_error.rb +20 -0
- data/lib/async/matrix/client/encryption.rb +413 -0
- data/lib/async/matrix/client/rooms.rb +478 -0
- data/lib/async/matrix/client/sync.rb +508 -0
- data/lib/async/matrix/client.rb +217 -113
- data/lib/async/matrix/config/vivify.rb +107 -0
- data/lib/async/matrix/config.rb +184 -0
- data/lib/async/matrix/device_store.rb +1621 -0
- data/lib/async/matrix/double_puppet_client.rb +1 -1
- data/lib/async/matrix/e2ee/pickle_key.rb +182 -0
- data/lib/async/matrix/error.rb +9 -36
- data/lib/async/matrix/{application_service/error_response.rb → error_response.rb} +10 -10
- data/lib/async/matrix/homeserver_error.rb +20 -0
- data/lib/async/matrix/invalid_endpoint_error.rb +20 -0
- data/lib/async/matrix/media_client.rb +46 -35
- data/lib/async/matrix/not_found_error.rb +20 -0
- data/lib/async/matrix/notifier.rb +7 -3
- data/lib/async/matrix/response_too_large_error.rb +20 -0
- data/lib/async/matrix/version.rb +1 -1
- data/lib/async/matrix.rb +16 -7
- data/lib/protocol/matrix/canonical_json.rb +200 -0
- data/lib/protocol/matrix/content.rb +106 -0
- data/lib/protocol/matrix/encrypted_message.rb +1018 -0
- data/lib/protocol/matrix/error.rb +49 -0
- data/lib/protocol/matrix/event.rb +208 -0
- data/lib/protocol/matrix/key_backup.rb +347 -0
- data/lib/protocol/matrix/keys.rb +381 -0
- data/lib/protocol/matrix/message_batch.rb +482 -0
- data/lib/protocol/matrix/schema/registry.rb +381 -0
- data/lib/protocol/matrix/schema/validation_error.rb +234 -0
- data/lib/protocol/matrix/schema.rb +170 -0
- data/lib/protocol/matrix/secret_storage.rb +535 -0
- data/lib/protocol/matrix/signing.rb +278 -0
- data/lib/protocol/matrix.rb +25 -0
- metadata +42 -135
- data/lib/async/discord/api/path_tree.rb +0 -127
- data/lib/async/discord/api.rb +0 -151
- data/lib/async/discord/client.rb +0 -283
- data/lib/async/discord/error.rb +0 -84
- data/lib/async/discord/gateway.rb +0 -359
- data/lib/async/discord.rb +0 -15
- data/lib/async/matrix/application_service/bot.rb +0 -232
- data/lib/async/matrix/application_service/config/schema/analytics.json +0 -21
- data/lib/async/matrix/application_service/config/schema/appservice.json +0 -82
- data/lib/async/matrix/application_service/config/schema/backfill.json +0 -91
- data/lib/async/matrix/application_service/config/schema/bridge.json +0 -209
- data/lib/async/matrix/application_service/config/schema/config.json +0 -61
- data/lib/async/matrix/application_service/config/schema/database.json +0 -38
- data/lib/async/matrix/application_service/config/schema/direct_media.json +0 -35
- data/lib/async/matrix/application_service/config/schema/double_puppet.json +0 -24
- data/lib/async/matrix/application_service/config/schema/encryption.json +0 -164
- data/lib/async/matrix/application_service/config/schema/homeserver.json +0 -58
- data/lib/async/matrix/application_service/config/schema/logging.json +0 -50
- data/lib/async/matrix/application_service/config/schema/management_room_texts.json +0 -25
- data/lib/async/matrix/application_service/config/schema/matrix.json +0 -45
- data/lib/async/matrix/application_service/config/schema/permissions.json +0 -54
- data/lib/async/matrix/application_service/config/schema/provisioning.json +0 -23
- data/lib/async/matrix/application_service/config/schema/public_media.json +0 -39
- data/lib/async/matrix/application_service/config/schema/relay.json +0 -43
- data/lib/async/matrix/application_service/config/vivify.rb +0 -109
- data/lib/async/matrix/application_service/config.rb +0 -225
- data/lib/async/matrix/application_service/dispatcher.rb +0 -185
- data/lib/async/matrix/application_service/event.rb +0 -285
- data/lib/async/matrix/application_service/server.rb +0 -430
- data/lib/async/matrix/application_service/transaction.rb +0 -66
- data/lib/async/matrix/application_service/transaction_handler.rb +0 -185
- data/lib/async/matrix/application_service/transaction_store.rb +0 -80
- data/lib/async/matrix/bridge/discord/db/connection.rb +0 -141
- data/lib/async/matrix/bridge/discord/db/file.rb +0 -118
- data/lib/async/matrix/bridge/discord/db/guild.rb +0 -120
- data/lib/async/matrix/bridge/discord/db/message.rb +0 -160
- data/lib/async/matrix/bridge/discord/db/migrations/001_create_users.rb +0 -14
- data/lib/async/matrix/bridge/discord/db/migrations/002_create_guilds.rb +0 -14
- data/lib/async/matrix/bridge/discord/db/migrations/003_create_portals.rb +0 -23
- data/lib/async/matrix/bridge/discord/db/migrations/004_create_puppets.rb +0 -19
- data/lib/async/matrix/bridge/discord/db/migrations/005_create_messages.rb +0 -20
- data/lib/async/matrix/bridge/discord/db/migrations/006_create_reactions.rb +0 -19
- data/lib/async/matrix/bridge/discord/db/migrations/007_create_files.rb +0 -18
- data/lib/async/matrix/bridge/discord/db/portal.rb +0 -150
- data/lib/async/matrix/bridge/discord/db/puppet.rb +0 -128
- data/lib/async/matrix/bridge/discord/db/reaction.rb +0 -165
- data/lib/async/matrix/bridge/discord/db/schema.rb +0 -18
- data/lib/async/matrix/bridge/discord/db/user.rb +0 -112
- data/lib/async/matrix/bridge/discord/db.rb +0 -138
- data/lib/async/matrix/schema/registry.rb +0 -354
- data/lib/async/matrix/schema/validation_error.rb +0 -225
- data/lib/async/matrix/schema.rb +0 -170
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Released under the Apache License, Version 2.0.
|
|
4
|
+
# Copyright, 2026, by General Intelligence Systems.
|
|
5
|
+
|
|
6
|
+
require_relative "canonical_json"
|
|
7
|
+
require_relative "error"
|
|
8
|
+
|
|
9
|
+
module Protocol
|
|
10
|
+
module Matrix
|
|
11
|
+
# Signing JSON, per https://spec.matrix.org/latest/appendices/#signing-json
|
|
12
|
+
#
|
|
13
|
+
# The procedure, in full:
|
|
14
|
+
#
|
|
15
|
+
# 1. remove `signatures` and `unsigned`
|
|
16
|
+
# 2. encode what is left as canonical JSON
|
|
17
|
+
# 3. sign those bytes with ed25519
|
|
18
|
+
# 4. encode the signature as UNPADDED base64
|
|
19
|
+
# 5. store it under signatures[entity]["<algorithm>:<key_id>"]
|
|
20
|
+
#
|
|
21
|
+
# THE KEY MATERIAL IS INJECTED. `signer` is anything answering
|
|
22
|
+
# `sign(String) -> base64`, and `verifier` anything answering
|
|
23
|
+
# `verify_signature(key, message, signature) -> bool` — which is the shape
|
|
24
|
+
# the native E2EE module already exposes. So this file implements the
|
|
25
|
+
# procedure and holds no keys, which is what lets it sit in the protocol
|
|
26
|
+
# layer and be tested without cryptography.
|
|
27
|
+
module Signing
|
|
28
|
+
ED25519 = "ed25519"
|
|
29
|
+
|
|
30
|
+
class Error < Protocol::Matrix::Error; end
|
|
31
|
+
|
|
32
|
+
# No signature from the entity and key we were told to check.
|
|
33
|
+
class MissingSignatureError < Error; end
|
|
34
|
+
|
|
35
|
+
# "{algorithm}:{key_id}" — for a device key the key_id is the device id.
|
|
36
|
+
def self.key_id(name, algorithm: ED25519)
|
|
37
|
+
"#{algorithm}:#{name}"
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Sign +object+ as +user_id+ with +key_id+.
|
|
41
|
+
#
|
|
42
|
+
# @returns [Hash] a copy of +object+ with the signature added. EXISTING
|
|
43
|
+
# SIGNATURES ARE PRESERVED: a device-keys object legitimately carries
|
|
44
|
+
# several (our device key, our self-signing key, another user's
|
|
45
|
+
# attestation), and replacing the map rather than merging into it would
|
|
46
|
+
# silently discard them.
|
|
47
|
+
def self.sign(object, signer:, user_id:, key_id:)
|
|
48
|
+
signature = sign_bytes(CanonicalJson.signable_bytes(object), signer: signer)
|
|
49
|
+
existing = object["signatures"] || object[:signatures] || {}
|
|
50
|
+
mine = existing[user_id] || {}
|
|
51
|
+
|
|
52
|
+
object.merge(
|
|
53
|
+
"signatures" => existing.merge(user_id => mine.merge(key_id => signature)),
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Sign the given bytes, returning unpadded base64.
|
|
58
|
+
#
|
|
59
|
+
# PADDING IS STRIPPED HERE rather than assumed absent. The spec requires
|
|
60
|
+
# unpadded base64, and whether a given primitive emits padding is its own
|
|
61
|
+
# business; a stray "=" would make every signature we produce fail
|
|
62
|
+
# verification everywhere, which is an expensive thing to discover
|
|
63
|
+
# remotely.
|
|
64
|
+
def self.sign_bytes(message, signer:)
|
|
65
|
+
signer.sign(message).delete_suffix("==").delete_suffix("=")
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Is +object+ correctly signed by +user_id+ with +key_id+?
|
|
69
|
+
#
|
|
70
|
+
# @parameter key [String] the public ed25519 key to verify against.
|
|
71
|
+
# @parameter verifier [Object] answers
|
|
72
|
+
# `verify_signature(key, message, signature) -> bool`.
|
|
73
|
+
# @raises [MissingSignatureError] when there is no such signature to check
|
|
74
|
+
# — distinct from a signature that is present and wrong, because the two
|
|
75
|
+
# mean different things about the sender.
|
|
76
|
+
def self.verify(object, key:, verifier:, user_id:, key_id:)
|
|
77
|
+
signature = signature_for(object, user_id: user_id, key_id: key_id)
|
|
78
|
+
|
|
79
|
+
if signature.nil?
|
|
80
|
+
raise MissingSignatureError, "no #{key_id} signature from #{user_id}"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
verifier.verify_signature(key, CanonicalJson.signable_bytes(object), signature)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# The signature +user_id+ made with +key_id+, or nil.
|
|
87
|
+
def self.signature_for(object, user_id:, key_id:)
|
|
88
|
+
signatures = object["signatures"] || object[:signatures] || {}
|
|
89
|
+
(signatures[user_id] || {})[key_id]
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def self.signed_by?(object, user_id:, key_id:)
|
|
93
|
+
!signature_for(object, user_id: user_id, key_id: key_id).nil?
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
__END__
|
|
100
|
+
describe "Protocol::Matrix::Signing" do
|
|
101
|
+
# A signer that records what it was asked to sign, so a spec can assert on
|
|
102
|
+
# the exact bytes the signature covers.
|
|
103
|
+
def recording_signer(signature = "SIGNATURE")
|
|
104
|
+
signer = Object.new
|
|
105
|
+
signed = []
|
|
106
|
+
signer.define_singleton_method(:signed) { signed }
|
|
107
|
+
signer.define_singleton_method(:sign) do |message|
|
|
108
|
+
signed << message
|
|
109
|
+
signature
|
|
110
|
+
end
|
|
111
|
+
signer
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def verifier(result = true)
|
|
115
|
+
verifier = Object.new
|
|
116
|
+
calls = []
|
|
117
|
+
verifier.define_singleton_method(:calls) { calls }
|
|
118
|
+
verifier.define_singleton_method(:verify_signature) do |key, message, signature|
|
|
119
|
+
calls << [key, message, signature]
|
|
120
|
+
result
|
|
121
|
+
end
|
|
122
|
+
verifier
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
it "builds a key identifier" do
|
|
126
|
+
Protocol::Matrix::Signing.key_id("JLAFKJWSCS").should == "ed25519:JLAFKJWSCS"
|
|
127
|
+
Protocol::Matrix::Signing.key_id("1", algorithm: "ed25519").should == "ed25519:1"
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
it "stores the signature under entity and key identifier" do
|
|
131
|
+
signed = Protocol::Matrix::Signing.sign(
|
|
132
|
+
{"a" => 1},
|
|
133
|
+
signer: recording_signer,
|
|
134
|
+
user_id: "@alice:example.com",
|
|
135
|
+
key_id: "ed25519:DEV",
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
signed["signatures"].should == {"@alice:example.com" => {"ed25519:DEV" => "SIGNATURE"}}
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# The signature covers canonical JSON of the object MINUS signatures and
|
|
142
|
+
# unsigned.
|
|
143
|
+
it "signs the canonical form, excluding signatures and unsigned" do
|
|
144
|
+
signer = recording_signer
|
|
145
|
+
Protocol::Matrix::Signing.sign(
|
|
146
|
+
{"b" => 2, "a" => 1, "unsigned" => {"age" => 1}},
|
|
147
|
+
signer: signer,
|
|
148
|
+
user_id: "@alice:example.com",
|
|
149
|
+
key_id: "ed25519:DEV",
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
signer.signed.should == ['{"a":1,"b":2}']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# A device-keys object legitimately carries several signatures; replacing the
|
|
156
|
+
# map rather than merging into it would discard them.
|
|
157
|
+
it "preserves signatures already present" do
|
|
158
|
+
object = {
|
|
159
|
+
"a" => 1,
|
|
160
|
+
"signatures" => {
|
|
161
|
+
"@bob:example.com" => {"ed25519:OTHER" => "theirs"},
|
|
162
|
+
"@alice:example.com" => {"ed25519:SSK" => "self-signing"},
|
|
163
|
+
},
|
|
164
|
+
}
|
|
165
|
+
signed = Protocol::Matrix::Signing.sign(
|
|
166
|
+
object,
|
|
167
|
+
signer: recording_signer,
|
|
168
|
+
user_id: "@alice:example.com",
|
|
169
|
+
key_id: "ed25519:DEV",
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
signed["signatures"]["@bob:example.com"].should == {"ed25519:OTHER" => "theirs"}
|
|
173
|
+
signed["signatures"]["@alice:example.com"].should == {
|
|
174
|
+
"ed25519:SSK" => "self-signing", "ed25519:DEV" => "SIGNATURE",
|
|
175
|
+
}
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
it "returns a copy rather than mutating its argument" do
|
|
179
|
+
object = {"a" => 1}
|
|
180
|
+
Protocol::Matrix::Signing.sign(
|
|
181
|
+
object,
|
|
182
|
+
signer: recording_signer,
|
|
183
|
+
user_id: "@alice:example.com",
|
|
184
|
+
key_id: "ed25519:DEV",
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
object.key?("signatures").should == false
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# The spec requires UNPADDED base64. Whether a primitive emits padding is its
|
|
191
|
+
# own business; a stray "=" would fail verification everywhere.
|
|
192
|
+
it "strips base64 padding from whatever the signer returns" do
|
|
193
|
+
Protocol::Matrix::Signing.sign_bytes("msg", signer: recording_signer("abc=")).should == "abc"
|
|
194
|
+
Protocol::Matrix::Signing.sign_bytes("msg", signer: recording_signer("abc==")).should == "abc"
|
|
195
|
+
Protocol::Matrix::Signing.sign_bytes("msg", signer: recording_signer("abc")).should == "abc"
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# ── Verifying ─────────────────────────────────────────────────────────────
|
|
199
|
+
|
|
200
|
+
it "verifies against the same bytes it would have signed" do
|
|
201
|
+
check = verifier
|
|
202
|
+
object = {
|
|
203
|
+
"b" => 2,
|
|
204
|
+
"a" => 1,
|
|
205
|
+
"signatures" => {"@alice:example.com" => {"ed25519:DEV" => "SIG"}},
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
Protocol::Matrix::Signing.verify(
|
|
209
|
+
object,
|
|
210
|
+
key: "PUBKEY",
|
|
211
|
+
verifier: check,
|
|
212
|
+
user_id: "@alice:example.com",
|
|
213
|
+
key_id: "ed25519:DEV",
|
|
214
|
+
).should == true
|
|
215
|
+
|
|
216
|
+
check.calls.should == [["PUBKEY", '{"a":1,"b":2}', "SIG"]]
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
it "reports a signature that does not verify" do
|
|
220
|
+
Protocol::Matrix::Signing.verify(
|
|
221
|
+
{"a" => 1, "signatures" => {"@alice:example.com" => {"ed25519:DEV" => "SIG"}}},
|
|
222
|
+
key: "PUBKEY",
|
|
223
|
+
verifier: verifier(false),
|
|
224
|
+
user_id: "@alice:example.com",
|
|
225
|
+
key_id: "ed25519:DEV",
|
|
226
|
+
).should == false
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# "A signature that is absent" and "a signature that is wrong" say different
|
|
230
|
+
# things about the sender, so they are not the same answer.
|
|
231
|
+
it "distinguishes a missing signature from a bad one" do
|
|
232
|
+
lambda {
|
|
233
|
+
Protocol::Matrix::Signing.verify(
|
|
234
|
+
{"a" => 1},
|
|
235
|
+
key: "PUBKEY",
|
|
236
|
+
verifier: verifier,
|
|
237
|
+
user_id: "@alice:example.com",
|
|
238
|
+
key_id: "ed25519:DEV",
|
|
239
|
+
)
|
|
240
|
+
}.should.raise(Protocol::Matrix::Signing::MissingSignatureError)
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
it "treats a signature from a different key as missing" do
|
|
244
|
+
lambda {
|
|
245
|
+
Protocol::Matrix::Signing.verify(
|
|
246
|
+
{"signatures" => {"@alice:example.com" => {"ed25519:OTHER" => "SIG"}}},
|
|
247
|
+
key: "PUBKEY",
|
|
248
|
+
verifier: verifier,
|
|
249
|
+
user_id: "@alice:example.com",
|
|
250
|
+
key_id: "ed25519:DEV",
|
|
251
|
+
)
|
|
252
|
+
}.should.raise(Protocol::Matrix::Signing::MissingSignatureError)
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
it "finds a signature, or reports its absence" do
|
|
256
|
+
object = {"signatures" => {"@alice:example.com" => {"ed25519:DEV" => "SIG"}}}
|
|
257
|
+
|
|
258
|
+
Protocol::Matrix::Signing.signature_for(object, user_id: "@alice:example.com", key_id: "ed25519:DEV")
|
|
259
|
+
.should == "SIG"
|
|
260
|
+
Protocol::Matrix::Signing.signed_by?(object, user_id: "@alice:example.com", key_id: "ed25519:DEV")
|
|
261
|
+
.should == true
|
|
262
|
+
Protocol::Matrix::Signing.signed_by?(object, user_id: "@bob:example.com", key_id: "ed25519:DEV")
|
|
263
|
+
.should == false
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# A signature survives a round trip through canonical JSON regardless of the
|
|
267
|
+
# order the object was built in -- which is the entire purpose of the
|
|
268
|
+
# canonical encoding.
|
|
269
|
+
it "signs two differently ordered objects identically" do
|
|
270
|
+
first = recording_signer
|
|
271
|
+
second = recording_signer
|
|
272
|
+
|
|
273
|
+
Protocol::Matrix::Signing.sign({"a" => 1, "b" => 2}, signer: first, user_id: "@a:b", key_id: "ed25519:D")
|
|
274
|
+
Protocol::Matrix::Signing.sign({"b" => 2, "a" => 1}, signer: second, user_id: "@a:b", key_id: "ed25519:D")
|
|
275
|
+
|
|
276
|
+
first.signed.should == second.signed
|
|
277
|
+
end
|
|
278
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Released under the Apache License, Version 2.0.
|
|
4
|
+
# Copyright, 2026, by General Intelligence Systems.
|
|
5
|
+
|
|
6
|
+
# The Matrix protocol layer: message formats, event schemas, and the rules for
|
|
7
|
+
# reading them. No HTTP, no sockets, no storage.
|
|
8
|
+
#
|
|
9
|
+
# The split follows the Socketry convention that `protocol-http` and
|
|
10
|
+
# `protocol-grpc` set: a protocol library owns the FORMAT and the state machine
|
|
11
|
+
# over it, and the `async-*` library binds that to IO. So an Event, a Content, an
|
|
12
|
+
# EncryptedMessage and the schemas that validate them live here, and the Client
|
|
13
|
+
# that fetches them lives in Async::Matrix.
|
|
14
|
+
#
|
|
15
|
+
# Practically, that means everything under this namespace can be unit tested
|
|
16
|
+
# with a Hash and no network, no homeserver, and — for EncryptedMessage — no
|
|
17
|
+
# crypto either.
|
|
18
|
+
module Protocol
|
|
19
|
+
module Matrix
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
Dir.glob("#{__dir__}/matrix/**/*.rb").sort.each do |path|
|
|
24
|
+
require path
|
|
25
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: async-matrix
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nathan Kidd
|
|
@@ -15,84 +15,42 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '2.
|
|
18
|
+
version: '2.46'
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '2.
|
|
25
|
+
version: '2.46'
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: async-http
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
29
29
|
requirements:
|
|
30
30
|
- - "~>"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '0.
|
|
32
|
+
version: '0.105'
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '0.
|
|
40
|
-
- !ruby/object:Gem::Dependency
|
|
41
|
-
name: async-websocket
|
|
42
|
-
requirement: !ruby/object:Gem::Requirement
|
|
43
|
-
requirements:
|
|
44
|
-
- - "~>"
|
|
45
|
-
- !ruby/object:Gem::Version
|
|
46
|
-
version: '0.30'
|
|
47
|
-
type: :runtime
|
|
48
|
-
prerelease: false
|
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
-
requirements:
|
|
51
|
-
- - "~>"
|
|
52
|
-
- !ruby/object:Gem::Version
|
|
53
|
-
version: '0.30'
|
|
54
|
-
- !ruby/object:Gem::Dependency
|
|
55
|
-
name: grape
|
|
56
|
-
requirement: !ruby/object:Gem::Requirement
|
|
57
|
-
requirements:
|
|
58
|
-
- - "~>"
|
|
59
|
-
- !ruby/object:Gem::Version
|
|
60
|
-
version: '3.3'
|
|
61
|
-
type: :runtime
|
|
62
|
-
prerelease: false
|
|
63
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
-
requirements:
|
|
65
|
-
- - "~>"
|
|
66
|
-
- !ruby/object:Gem::Version
|
|
67
|
-
version: '3.3'
|
|
39
|
+
version: '0.105'
|
|
68
40
|
- !ruby/object:Gem::Dependency
|
|
69
41
|
name: json_schemer
|
|
70
42
|
requirement: !ruby/object:Gem::Requirement
|
|
71
43
|
requirements:
|
|
72
44
|
- - "~>"
|
|
73
45
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: '2.
|
|
46
|
+
version: '2.5'
|
|
75
47
|
type: :runtime
|
|
76
48
|
prerelease: false
|
|
77
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
78
50
|
requirements:
|
|
79
51
|
- - "~>"
|
|
80
52
|
- !ruby/object:Gem::Version
|
|
81
|
-
version: '2.
|
|
82
|
-
- !ruby/object:Gem::Dependency
|
|
83
|
-
name: sequel
|
|
84
|
-
requirement: !ruby/object:Gem::Requirement
|
|
85
|
-
requirements:
|
|
86
|
-
- - "~>"
|
|
87
|
-
- !ruby/object:Gem::Version
|
|
88
|
-
version: '5.0'
|
|
89
|
-
type: :runtime
|
|
90
|
-
prerelease: false
|
|
91
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
92
|
-
requirements:
|
|
93
|
-
- - "~>"
|
|
94
|
-
- !ruby/object:Gem::Version
|
|
95
|
-
version: '5.0'
|
|
53
|
+
version: '2.5'
|
|
96
54
|
- !ruby/object:Gem::Dependency
|
|
97
55
|
name: string_builder
|
|
98
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -135,20 +93,6 @@ dependencies:
|
|
|
135
93
|
- - "~>"
|
|
136
94
|
- !ruby/object:Gem::Version
|
|
137
95
|
version: '1.0'
|
|
138
|
-
- !ruby/object:Gem::Dependency
|
|
139
|
-
name: falcon
|
|
140
|
-
requirement: !ruby/object:Gem::Requirement
|
|
141
|
-
requirements:
|
|
142
|
-
- - "~>"
|
|
143
|
-
- !ruby/object:Gem::Version
|
|
144
|
-
version: '0.55'
|
|
145
|
-
type: :development
|
|
146
|
-
prerelease: false
|
|
147
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
148
|
-
requirements:
|
|
149
|
-
- - "~>"
|
|
150
|
-
- !ruby/object:Gem::Version
|
|
151
|
-
version: '0.55'
|
|
152
96
|
- !ruby/object:Gem::Dependency
|
|
153
97
|
name: logger
|
|
154
98
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -163,50 +107,37 @@ dependencies:
|
|
|
163
107
|
- - ">="
|
|
164
108
|
- !ruby/object:Gem::Version
|
|
165
109
|
version: '0'
|
|
166
|
-
- !ruby/object:Gem::Dependency
|
|
167
|
-
name: sqlite3
|
|
168
|
-
requirement: !ruby/object:Gem::Requirement
|
|
169
|
-
requirements:
|
|
170
|
-
- - ">="
|
|
171
|
-
- !ruby/object:Gem::Version
|
|
172
|
-
version: '0'
|
|
173
|
-
type: :development
|
|
174
|
-
prerelease: false
|
|
175
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
176
|
-
requirements:
|
|
177
|
-
- - ">="
|
|
178
|
-
- !ruby/object:Gem::Version
|
|
179
|
-
version: '0'
|
|
180
110
|
- !ruby/object:Gem::Dependency
|
|
181
111
|
name: rake-compiler
|
|
182
112
|
requirement: !ruby/object:Gem::Requirement
|
|
183
113
|
requirements:
|
|
184
114
|
- - "~>"
|
|
185
115
|
- !ruby/object:Gem::Version
|
|
186
|
-
version: '1.
|
|
116
|
+
version: '1.3'
|
|
187
117
|
type: :development
|
|
188
118
|
prerelease: false
|
|
189
119
|
version_requirements: !ruby/object:Gem::Requirement
|
|
190
120
|
requirements:
|
|
191
121
|
- - "~>"
|
|
192
122
|
- !ruby/object:Gem::Version
|
|
193
|
-
version: '1.
|
|
123
|
+
version: '1.3'
|
|
194
124
|
- !ruby/object:Gem::Dependency
|
|
195
125
|
name: lefthook
|
|
196
126
|
requirement: !ruby/object:Gem::Requirement
|
|
197
127
|
requirements:
|
|
198
128
|
- - "~>"
|
|
199
129
|
- !ruby/object:Gem::Version
|
|
200
|
-
version: '2.
|
|
130
|
+
version: '2.2'
|
|
201
131
|
type: :development
|
|
202
132
|
prerelease: false
|
|
203
133
|
version_requirements: !ruby/object:Gem::Requirement
|
|
204
134
|
requirements:
|
|
205
135
|
- - "~>"
|
|
206
136
|
- !ruby/object:Gem::Version
|
|
207
|
-
version: '2.
|
|
137
|
+
version: '2.2'
|
|
208
138
|
description: Async-native Matrix protocol primitives built on the Socketry async ecosystem.
|
|
209
|
-
Provides
|
|
139
|
+
Provides a Client-Server API client, schema-validated events, media and end-to-end
|
|
140
|
+
encryption.
|
|
210
141
|
email:
|
|
211
142
|
- nathankidd@hey.com
|
|
212
143
|
executables: []
|
|
@@ -517,75 +448,51 @@ files:
|
|
|
517
448
|
- ext/async_matrix_e2ee/Cargo.toml
|
|
518
449
|
- ext/async_matrix_e2ee/extconf.rb
|
|
519
450
|
- ext/async_matrix_e2ee/src/lib.rs
|
|
520
|
-
- lib/async/discord.rb
|
|
521
|
-
- lib/async/discord/api.rb
|
|
522
|
-
- lib/async/discord/api/path_tree.rb
|
|
523
|
-
- lib/async/discord/client.rb
|
|
524
|
-
- lib/async/discord/error.rb
|
|
525
|
-
- lib/async/discord/gateway.rb
|
|
526
451
|
- lib/async/matrix.rb
|
|
527
452
|
- lib/async/matrix/api.rb
|
|
528
453
|
- lib/async/matrix/api/chain.rb
|
|
529
454
|
- lib/async/matrix/api/concat.rb
|
|
530
455
|
- lib/async/matrix/api/path_tree.rb
|
|
531
|
-
- lib/async/matrix/
|
|
532
|
-
- lib/async/matrix/
|
|
533
|
-
- lib/async/matrix/
|
|
534
|
-
- lib/async/matrix/application_service/config/schema/appservice.json
|
|
535
|
-
- lib/async/matrix/application_service/config/schema/backfill.json
|
|
536
|
-
- lib/async/matrix/application_service/config/schema/bridge.json
|
|
537
|
-
- lib/async/matrix/application_service/config/schema/config.json
|
|
538
|
-
- lib/async/matrix/application_service/config/schema/database.json
|
|
539
|
-
- lib/async/matrix/application_service/config/schema/direct_media.json
|
|
540
|
-
- lib/async/matrix/application_service/config/schema/double_puppet.json
|
|
541
|
-
- lib/async/matrix/application_service/config/schema/encryption.json
|
|
542
|
-
- lib/async/matrix/application_service/config/schema/homeserver.json
|
|
543
|
-
- lib/async/matrix/application_service/config/schema/logging.json
|
|
544
|
-
- lib/async/matrix/application_service/config/schema/management_room_texts.json
|
|
545
|
-
- lib/async/matrix/application_service/config/schema/matrix.json
|
|
546
|
-
- lib/async/matrix/application_service/config/schema/permissions.json
|
|
547
|
-
- lib/async/matrix/application_service/config/schema/provisioning.json
|
|
548
|
-
- lib/async/matrix/application_service/config/schema/public_media.json
|
|
549
|
-
- lib/async/matrix/application_service/config/schema/relay.json
|
|
550
|
-
- lib/async/matrix/application_service/config/vivify.rb
|
|
551
|
-
- lib/async/matrix/application_service/dispatcher.rb
|
|
552
|
-
- lib/async/matrix/application_service/error_response.rb
|
|
553
|
-
- lib/async/matrix/application_service/event.rb
|
|
554
|
-
- lib/async/matrix/application_service/server.rb
|
|
555
|
-
- lib/async/matrix/application_service/transaction.rb
|
|
556
|
-
- lib/async/matrix/application_service/transaction_handler.rb
|
|
557
|
-
- lib/async/matrix/application_service/transaction_store.rb
|
|
558
|
-
- lib/async/matrix/bridge/discord/db.rb
|
|
559
|
-
- lib/async/matrix/bridge/discord/db/connection.rb
|
|
560
|
-
- lib/async/matrix/bridge/discord/db/file.rb
|
|
561
|
-
- lib/async/matrix/bridge/discord/db/guild.rb
|
|
562
|
-
- lib/async/matrix/bridge/discord/db/message.rb
|
|
563
|
-
- lib/async/matrix/bridge/discord/db/migrations/001_create_users.rb
|
|
564
|
-
- lib/async/matrix/bridge/discord/db/migrations/002_create_guilds.rb
|
|
565
|
-
- lib/async/matrix/bridge/discord/db/migrations/003_create_portals.rb
|
|
566
|
-
- lib/async/matrix/bridge/discord/db/migrations/004_create_puppets.rb
|
|
567
|
-
- lib/async/matrix/bridge/discord/db/migrations/005_create_messages.rb
|
|
568
|
-
- lib/async/matrix/bridge/discord/db/migrations/006_create_reactions.rb
|
|
569
|
-
- lib/async/matrix/bridge/discord/db/migrations/007_create_files.rb
|
|
570
|
-
- lib/async/matrix/bridge/discord/db/portal.rb
|
|
571
|
-
- lib/async/matrix/bridge/discord/db/puppet.rb
|
|
572
|
-
- lib/async/matrix/bridge/discord/db/reaction.rb
|
|
573
|
-
- lib/async/matrix/bridge/discord/db/schema.rb
|
|
574
|
-
- lib/async/matrix/bridge/discord/db/user.rb
|
|
456
|
+
- lib/async/matrix/app_service_client.rb
|
|
457
|
+
- lib/async/matrix/auth_error.rb
|
|
458
|
+
- lib/async/matrix/bad_json_error.rb
|
|
575
459
|
- lib/async/matrix/client.rb
|
|
460
|
+
- lib/async/matrix/client/encryption.rb
|
|
461
|
+
- lib/async/matrix/client/rooms.rb
|
|
462
|
+
- lib/async/matrix/client/sync.rb
|
|
463
|
+
- lib/async/matrix/config.rb
|
|
464
|
+
- lib/async/matrix/config/vivify.rb
|
|
576
465
|
- lib/async/matrix/connection.rb
|
|
466
|
+
- lib/async/matrix/device_store.rb
|
|
577
467
|
- lib/async/matrix/double_puppet_client.rb
|
|
578
468
|
- lib/async/matrix/e2ee.rb
|
|
469
|
+
- lib/async/matrix/e2ee/pickle_key.rb
|
|
579
470
|
- lib/async/matrix/endpoint.rb
|
|
580
471
|
- lib/async/matrix/error.rb
|
|
472
|
+
- lib/async/matrix/error_response.rb
|
|
473
|
+
- lib/async/matrix/homeserver_error.rb
|
|
474
|
+
- lib/async/matrix/invalid_endpoint_error.rb
|
|
581
475
|
- lib/async/matrix/media_client.rb
|
|
476
|
+
- lib/async/matrix/not_found_error.rb
|
|
582
477
|
- lib/async/matrix/notifier.rb
|
|
583
|
-
- lib/async/matrix/
|
|
584
|
-
- lib/async/matrix/schema/registry.rb
|
|
585
|
-
- lib/async/matrix/schema/validation_error.rb
|
|
478
|
+
- lib/async/matrix/response_too_large_error.rb
|
|
586
479
|
- lib/async/matrix/server.rb
|
|
587
480
|
- lib/async/matrix/stream.rb
|
|
588
481
|
- lib/async/matrix/version.rb
|
|
482
|
+
- lib/protocol/matrix.rb
|
|
483
|
+
- lib/protocol/matrix/canonical_json.rb
|
|
484
|
+
- lib/protocol/matrix/content.rb
|
|
485
|
+
- lib/protocol/matrix/encrypted_message.rb
|
|
486
|
+
- lib/protocol/matrix/error.rb
|
|
487
|
+
- lib/protocol/matrix/event.rb
|
|
488
|
+
- lib/protocol/matrix/key_backup.rb
|
|
489
|
+
- lib/protocol/matrix/keys.rb
|
|
490
|
+
- lib/protocol/matrix/message_batch.rb
|
|
491
|
+
- lib/protocol/matrix/schema.rb
|
|
492
|
+
- lib/protocol/matrix/schema/registry.rb
|
|
493
|
+
- lib/protocol/matrix/schema/validation_error.rb
|
|
494
|
+
- lib/protocol/matrix/secret_storage.rb
|
|
495
|
+
- lib/protocol/matrix/signing.rb
|
|
589
496
|
homepage: https://github.com/general-intelligence-systems/async-matrix
|
|
590
497
|
licenses:
|
|
591
498
|
- Apache-2.0
|