diff --git a/include/ircd/m/device.h b/include/ircd/m/device.h index c48ff5014..9843909f0 100644 --- a/include/ircd/m/device.h +++ b/include/ircd/m/device.h @@ -16,8 +16,34 @@ namespace ircd::m struct device; struct device_keys; struct device_list_update; + struct cross_signing_key; } +struct ircd::m::cross_signing_key +:json::tuple +< + /// Required. The ID of the user the key belongs to. + json::property, + + /// Required. What the key is used for. + /// One of: ["master", "self_signing", "user_signing"] + json::property, + + /// Required. The public key. The object must have exactly one property, + /// whose name is in the form :, + /// and whose value is the unpadded base64 public key. + json::property, + + /// Signatures of the key, calculated using the process described at + /// Signing JSON. Optional for the master key. Other keys must be signed + /// by the user's master key. + json::property +> +{ + using super_type::tuple; + using super_type::operator=; +}; + struct ircd::m::device_keys :json::tuple < diff --git a/include/ircd/m/name.h b/include/ircd/m/name.h index 7fb7b9144..81a6fb055 100644 --- a/include/ircd/m/name.h +++ b/include/ircd/m/name.h @@ -209,4 +209,6 @@ struct ircd::m::name static constexpr const char *const msgtype {"msgtype"}; static constexpr const char *const format {"format"}; static constexpr const char *const formatted_body {"formatted_body"}; + + static constexpr const char *const usage {"usage"}; }; diff --git a/matrix/name.cc b/matrix/name.cc index d6d5c3e93..67116c5a8 100644 --- a/matrix/name.cc +++ b/matrix/name.cc @@ -188,3 +188,5 @@ constexpr const char *const ircd::m::name::body; constexpr const char *const ircd::m::name::msgtype; constexpr const char *const ircd::m::name::format; constexpr const char *const ircd::m::name::formatted_body; + +constexpr const char *const ircd::m::name::usage;