Added Standard Objects for the encryption channel

This commit is contained in:
netkas 2025-02-06 15:38:52 -05:00
parent 0e08bef3bc
commit d929a9ec4c
4 changed files with 405 additions and 7 deletions

View file

@ -7,6 +7,7 @@
use Socialbox\Enums\Status\EncryptionChannelState;
use Socialbox\Interfaces\SerializableInterface;
use Socialbox\Objects\PeerAddress;
use Socialbox\Objects\Standard\EncryptionChannel;
class EncryptionChannelRecord implements SerializableInterface
{
@ -256,4 +257,14 @@
'created' => $this->created->format('Y-m-d H:i:s')
];
}
/**
* Converts the Encryption Channel Record to a Standard Encryption Channel
*
* @return EncryptionChannel
*/
public function toStandard(): EncryptionChannel
{
return new EncryptionChannel($this->toArray());
}
}