@@ -0,0 +1,2022 @@
+# -*- coding: utf-8 -*-%0Afrom ..memo import Memo as SyncMemo%0A%0A%0Aclass Memo(SyncMemo):%0A    %22%22%22 Deals with Memos that are attached to a transfer%0A%0A        :param .account.Account from_account: Account that has sent%0A            the memo%0A        :param .account.Account to_account: Account that has received%0A            the memo%0A        :param instance blockchain_instance: instance to use when accesing a RPC%0A%0A        A memo is encrypted with a shared secret derived from a private key of%0A        the sender and a public key of the receiver. Due to the underlying%0A        mathematics, the same shared secret can be derived by the private key%0A        of the receiver and the public key of the sender. The encrypted message%0A        is perturbed by a nonce that is part of the transmitted message.%0A%0A        .. code-block:: python%0A%0A            from .memo import Memo%0A            m = await Memo(%22from-account%22, %22to-account%22)%0A            m.blockchain.wallet.unlock(%22secret%22)%0A            enc = (m.encrypt(%22foobar%22))%0A            print(enc)%0A            %3E%3E %7B'nonce': '17329630356955254641', 'message': '8563e2bb2976e0217806d642901a2855'%7D%0A            print(m.decrypt(enc))%0A            %3E%3E foobar%0A%0A        To decrypt a memo, simply use%0A%0A        .. code-block:: python%0A%0A            from memo import Memo%0A            m = await Memo()%0A            m.blockchain.wallet.unlock(%22secret%22)%0A            print(memo.decrypt(op_data%5B%22memo%22%5D))%0A%0A        if %60%60op_data%60%60 being the payload of a transfer operation.%0A%0A    %22%22%22%0A%0A    async def __init__(self, from_account=None, to_account=None, **kwargs):%0A        self.define_classes()%0A        assert self.account_class%0A        assert self.privatekey_class%0A        assert self.publickey_class%0A%0A        if to_account:%0A            self.to_account = await self.account_class(%0A                to_account, blockchain_instance=self.blockchain%0A            )%0A        if from_account:%0A            self.from_account = await self.account_class(%0A                from_account, blockchain_instance=self.blockchain%0A            )%0A

Add async Memo