diff options
Diffstat (limited to 'matrix-specification/Data/DeviceKeys.php')
| -rw-r--r-- | matrix-specification/Data/DeviceKeys.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/matrix-specification/Data/DeviceKeys.php b/matrix-specification/Data/DeviceKeys.php new file mode 100644 index 0000000..034263e --- /dev/null +++ b/matrix-specification/Data/DeviceKeys.php @@ -0,0 +1,31 @@ +<?php + +namespace Matrix\Data; + +class DeviceKeys implements \JsonSerializable +{ + /** + * @param string[] $algorithms + * @param array<string, string> $keys + * @param array<string, array<string, string>> $signatures + */ + public function __construct( + private array $algorithms, + private string $deviceId, + private array $keys, + private array $signatures, + private string $userId, + ) + {} + + public function jsonSerialize(): array + { + return [ + "algorithms" => $this->algorithms, + "device_id" => $this->deviceId, + "keys" => $this->keys, + "signatures" => $this->signatures, + "user_id" => $this->userId, + ]; + } +} |
