public function announce(TxModel $transaction, KeyPair $kp = null)
    {
        // always set optional `signer` in case we provide a KeyPair
        if (null !== $kp) {
            $transaction->setAttribute("signer", $kp->getPublicKey("hex"));
        }

        // now we can serialize and sign
        $serialized = $transaction->serialize();
        $signature  = $this->signTransaction($transaction, $kp, $serialized);
        $broadcast  = [];

        if ($signature) {
            // valid KeyPair provided, signature was created.

            // recommended signed transaction broadcast method.
            // this will use the /transaction/announce endpoint.
            $broadcast = [
                "data" => Buffer::fromUInt8($serialized)->getHex(),
                "signature" => $signature->getHex(),
            ];
        }
        else {
            // WARNING: with this you must provide a `privateKey`
            // in the transaction attributes. This is *not* recommended.
            $broadcast = $transaction->toDTO();
        }

        $endpoint = $this->getAnnouncePath($transaction, $kp);
        $apiUrl   = $this->getPath($endpoint, []);
        $response = $this->api->postJSON($apiUrl, $broadcast);

        //XXX include Error checks
        $object = json_decode($response, true);
        return $this->createBaseModel($object); //XXX brr => error/content validation first
    }