human
Similate a basic transaction
1.  Create digital wallet objects for Alice and Bob.
2.  Create private and digital keys for these wallets
3.  Send Bob's public key in 'PEM' format to Alice
4.  Alice then encrypt's a message using Bob's public key
5.  Alice sends encrypted message to Bob
6.  Bob receives message and decrypts message using his private key
"""

class DigitalWallet(object):
    def __init__(self, name):
                
        # Owner of the wallet
        self._name = name
        
        # Generate RSA keys on object creation
        private_key, public_key = self.__generate_RSA_keys(2048)
        
        # Objects RSA keys
        self._private_key = private_key # This should never be sent out
        self._public_keys = {self._name: public_key} 
        
    def __generate_RSA_keys(self, num_bits):
        # Keys that are generated when the digital wallet is created
        random_generator = Random.new().read
        private_key = RSA.generate(2048, random_generator)
        public_key = private_key.publickey()
        return private_key, public_key
    
    def send_public_keys(self):
        # Public key can be sent to others for message encryption
        return {self._name: self._public_keys[self._name].exportKey(format='PEM')}
    
    def receive_public_key(self, key_dict):
        # Recieve a public key from another person
        for key, val in key_dict.items():
            public_key = RSA.importKey(val)
            self._public_keys[key] = public_key
        
    def send_encrypted_message(self, to_user, message):
        # Encrypt with the public key and return to user
        return self._public_keys[to_user].encrypt(message, K=None)
    
    def receive_encrypted_message(self, encrypted_message):
        decoded_message = self._private_key.decrypt(encrypted_message)
        print(decoded_message)
        
    
# Build wallets for Alice and Bob
alice_wallet = DigitalWallet(name='Alice')
bob_wallet = DigitalWallet(name='Bob')

# Receive a public key from Bob
bob_public_key =...
Given the above code, generate some markdown instructions for it.

=====
What is a code to and the other steps required?
assistant
#Here is code to and the other steps required.

Build typical transaction object
A transaction should have the following properties:
1.  The owners public key and private key (Alice's public key, for example.
2.  Another users public key, so that they can send encrypted messages