public function sweepWallet($destinationAddress, $sweepBatchSize = 200) {
        if ($this->debug) {
            echo "\nstarting wallet sweeping to address $destinationAddress";
        }

        //do wallet fund discovery
        if (!isset($this->sweepData)) {
            $this->discoverWalletFunds($sweepBatchSize);
        }

        if ($this->sweepData['balance'] === 0) {
            //no funds found
            throw new \Exception("No funds found after searching through {$this->sweepData['addressesSearched']} addresses");
        }

        //create and sign the transaction
        $transaction = $this->createTransaction($destinationAddress);

        //return or send the transaction
        return $transaction->getHex();
    }