<?php

declare(strict_types=1);

namespace PhpWA\Crypto\Signal;

interface SignalProtocolStoreInterface
{
    public function identityKeyPair(): SignalKeyPair;
    public function registrationId(): int;
    public function assertTrustedIdentity(string $address, string $identityKey): void;
    public function loadSession(string $address): ?SignalSessionRecord;
    public function storeSession(string $address, SignalSessionRecord $record): void;
    public function loadPreKey(int $id): ?SignalKeyPair;
    public function storePreKey(int $id, SignalKeyPair $keyPair): void;
    public function removePreKey(int $id): void;
    public function loadSignedPreKey(int $id): ?SignalKeyPair;
    public function storeSignedPreKey(int $id, SignalKeyPair $keyPair): void;
    public function loadSenderKey(string $name): SenderKeyRecord;
    public function storeSenderKey(string $name, SenderKeyRecord $record): void;
}
