async def sweep(self, privkey, destination, fee=None, feerate=None, nocheck=False, imax=100):
        """
        Sweep private keys. Returns a transaction that spends UTXOs from
        privkey to a destination address. The transaction will not be broadcast.

        arg:str:privkey:Private key. Type \'?\' to get a prompt.
        arg:str:destination:Bitcoin address, contact or alias
        arg:str:fee:Transaction fee (absolute, in BTC)
        arg:str:feerate:Transaction fee rate (in sat/vbyte)
        arg:int:imax:Maximum number of inputs
        arg:bool:nocheck:Do not verify aliases
        """
        from .wallet import sweep
        fee_policy = self._get_fee_policy(fee, feerate)
        privkeys = privkey.split()
        self.nocheck = nocheck
        #dest = self._resolver(destination)
        tx = await sweep(
            privkeys,
            network=self.network,
            to_address=destination,
            fee_policy=fee_policy,
            imax=imax,
        )
        return tx.serialize() if tx else None

        Sweep private keys. Returns a transaction that spends UTXOs from
        privkey to a destination address. The transaction will not be broadcast.

        arg:str:privkey:Private key. Type '?' to get a prompt.
        arg:str:destination:Bitcoin address, contact or alias
        arg:str:fee:Transaction fee (absolute, in BTC)
        arg:str:feerate:Transaction fee rate (in sat/vbyte)
        arg:int:imax:Maximum number of inputs
        arg:bool:nocheck:Do not verify aliases
        
electrum/commands.py