Encrypt and Send
Passencrypt=True to transfer(). The recipient’s public key is fetched from its wallet via the get_public_key get-method; for an undeployed recipient, pass it as recipient_public_key.
Decrypt
UseTextCipher.decrypt with the recipient’s private key and the original sender’s address. The encrypted payload (message body with opcode 0x2167DA4B) can be provided as raw bytes, a hex string, a base64 string, or a full body Cell parsed from BoC.