send the transaction using the API

@param string|array  $signed
@param string[]      $paths
@param bool          $checkFee
@return string           the complete raw transaction
@throws \Exception
511
protected function sendTransaction($signed, $paths, $checkFee = false) {
        return $this->sdk->sendTransaction($this->identifier, $signed, $paths, $checkFee);
    }
989161
protected function matchTokens(array $pathTokens, array $patternTokens)
    {
        $matches = [];
        for ($i = 1; $i < count($patternTokens); $i++) {
            $pathToken = $pathTokens[$i];
            $patternToken = $patternTokens[$i];
            if ($pathToken == '' && $patternToken != '') {
                return false;
            }
            if ($patternToken == '*') {
                continue;
            }
            if (substr($patternToken, 0, 1) == '{') {
                $matches[substr($patternToken, 1, -1)] = urldecode($pathToken);
            } else if (urldecode($pathToken) != $patternToken) {
                return false;
            }
        }
        if (empty($matches)) {
            return true;
        }
        return $matches;
    }
310840
def broadcast_signed_transaction(unsigned_tx, signatures, pubkeys, coin_symbol='btc', api_key=None):
    '''
    
    '''

    assert 'errors' not in unsigned_tx, unsigned_tx
    assert api_key, 'api_key required'

    url = make_url(coin_symbol, **dict(txs='send'))

    data = unsigned_tx.copy()
    data['signatures'] = signatures
    data['pubkeys'] = pubkeys

    params = {'token': api_key}

    r = requests.post(url, params=params, json=data, verify=True, timeout=TIMEOUT_IN_SECONDS)
    response_dict = get_valid_json(r)

    if response_dict.get('tx') and response_dict.get('received'):
        response_dict['tx']['received'] = parser.parse(response_dict['tx']['received'])

    return response_dict
330758
def crypto_sign_open(signed, pk):
    
    message = ffi.new("unsigned char[]", len(signed))
    message_len = ffi.new("unsigned long long *")

    if lib.crypto_sign_open(
            message, message_len, signed, len(signed), pk) != 0:
        raise exc.BadSignatureError("Signature was forged or corrupt")

    return ffi.buffer(message, message_len[0])[:]
666127
function readCertsSync(paths) {
    var opts = {};

    if (!(paths instanceof Array))
        throw new TypeError("readCertsSync expects Array argument");

    switch (paths.length) {
        case 1:
            opts.pfx = fs.readFileSync(paths[0]);
            break;
        case 2:
            opts.cert = fs.readFileSync(paths[0]);
            opts.key = fs.readFileSync(paths[1]);
            break;
        default:
            opts.cert = fs.readFileSync(paths[0]);
            opts.key = fs.readFileSync(paths[1]);
            opts.ca = [];
            paths.slice(2).forEach(function(path) {
                opts.ca.push(fs.readFileSync(path));
            });
    }

    return opts;
}
445302
public function executeWrite(QueryInterface $query, array $params = [])
    {
        $isInTransaction = $this->isInTransaction();
        $transaction = $this->getTransaction();

        $cursor = null;

        try {
            $cursor = $transaction->execute($this->ctx, $query->getSql(), $params, TabletType::MASTER);
        } catch (VitessException $e) {
            $this->handleException($e);

            return new Result(null, $e);
        }

        if (!$isInTransaction) {
            $commitResult = $this->commitTransaction();

            if (!$commitResult->isSuccess()) {
                return $commitResult;
            }
        }

        return new Result(new Cursor($cursor));
    }
948095
public function send(array $transaction)
    {
        $this->assertValidTransaction($transaction);

        if ($transaction['transaction_type'] == 'email') {
            $transaction['content']['plain'] = base64_encode($transaction['content']['plain']);
            $transaction['content']['html'] = base64_encode($transaction['content']['html']);
        }

        $request = new Request('transactionals');
        $request->setParams($transaction);

        $response = $this->client->post($request);

        $this->assertSuccessResponse($response);

        return $response->getData();
    }
1297560
function signAndExport(Client $client) {
		$arr = array();

		$config = $client->getConfig();

		foreach($this->fieldsInOrder as $f) {
			$val = $this->$f;
			if ($val === null) {
				$val = "";
			}
			$arr[$f] = $val;
		}

		foreach ($this->auxFieldsInOrder as $f) {
			$val = $this->$f;
			if ($val !== null) {
				$arr[$f] = $val;
			}
		}

		$stringToSign = $this->getSignatureString();

		$client->writeToTraceLog('Signing payment request, base for the signature:' . "\n" . $stringToSign);

		$signed = Crypto::signString($stringToSign, $config->privateKeyFile, $config->privateKeyPassword);
		$arr["signature"] = $signed;

		return $arr;
	}
1023202
public function signInFormSucceeded(Form $form, ArrayHash $values)
	{
		try {
			$this->user->login($values->username, $values->password);
			if ($values->remember) {
				$this->user->setExpiration('+ ' . $this->sessionExpiration, false);
			} else {
				$this->user->setExpiration('+ ' . $this->loginExpiration, true);
			}
			$this->restoreRequest($this->backlink);
			$this->redirect(":{$this->module}:Homepage:");
		} catch (AuthenticationException $e) {
			if ($e->getCode() == IAuthenticator::NOT_APPROVED) {
				$form->addError('cms.user.accountDeactivated');
			} else {
				$form->addError('cms.user.incorrectUsernameOrPassword');
			}
		}
	}
371000
public function transactions($txhashes) {
        $response = $this->dataClient->get($this->converter->getUrlForTransactions($txhashes));
        return $this->converter->convertTxs($response->body());
    }
1299333
public function send($from, $to, $subject, $text, $files = [], $bcc = null)
    {
        $files = $files === null ? [] : $files;

        return $this->transports[$this->defaultTransport]->send($from, $to, $subject, $text, $files, $bcc);
    }
934806
public function download(string $commit, string $path, array $params = [])
    {
        $path = $this->buildFilesPath($commit, 'files', ...explode('/', $path));

        return $this->pureGet($path, $params, ['Accept' => '*/*'])->getBody();
    }
1109642
public String sign(RawTransaction rawTransaction) {

        byte[] signedMessage;

        if (chainId > ChainId.NONE) {
            signedMessage = TransactionEncoder.signMessage(rawTransaction, chainId, credentials);
        } else {
            signedMessage = TransactionEncoder.signMessage(rawTransaction, credentials);
        }

        return Numeric.toHexString(signedMessage);
    }
1134532
protected function filterPaths(array $paths, $pattern, array $extensions=[])
    {
        if (!$this->isFilterPattern($pattern) && !$extensions) {
            return $paths;
        }
        return array_filter($paths, function ($path) use ($pattern, $extensions) {
            return $this->filterPath($path, $pattern, $extensions);
        });
    }
615470
private function __sendCheckRequest($path, $param)
    {
        $result = self::__sendRequest($path, 'GET', $param);

        // if response code is 200 return the response value
        if ($result->code === 200) {
            if (isset($result->response->qr))
                unset($result->response->qr);

            return $result->response;

        } else if ($result->code == 0) { // if response code is 0 return false and set error message
            $this->error = $result->response;
            return false;
        } else { //Get error massage and return false
            if (isset($result->response->description) && !is_null($result->response->description))
                $this->error = $result->response->description;
            else if (isset($result->response->message) && !is_null($result->response->message))
                $this->error = $result->response->message;
            return false;
        }
    }
518969
public function getSignedDownloadUrl($path, $expires = 3600, $host_name = '', $use_ssl = false)
    {
        $object = $this->applyPathPrefix($path);
        $url = $this->client->signUrl($this->bucket, $object, $expires);

        if (! empty($host_name) || $use_ssl) {
            $parse_url = parse_url($url);
            if (! empty($host_name)) {
                $parse_url['host'] = $this->bucket.'.'.$host_name;
            }
            if ($use_ssl) {
                $parse_url['scheme'] = 'https';
            }

            $url = (isset($parse_url['scheme']) ? $parse_url['scheme'].'://' : '')
                   .(
                   isset($parse_url['user']) ?
                       $parse_url['user'].(isset($parse_url['pass']) ? ':'.$parse_url['pass'] : '').'@'
                       : ''
                   )
                   .(isset($parse_url['host']) ? $parse_url['host'] : '')
                   .(isset($parse_url['port']) ? ':'.$parse_url['port'] : '')
                   .(isset($parse_url['path']) ? $parse_url['path'] : '')
                   .(isset($parse_url['query']) ? '?'.$parse_url['query'] : '');
        }

        return $url;
    }
680808
def sign_transaction(self, txins: Union[TxOut],
                         tx: MutableTransaction) -> MutableTransaction:
        ''''''

        solver = P2pkhSolver(self._private_key)
        return tx.spend(txins, [solver for i in txins])