Beispiel #1
0
 /**
  * Obtain the TXConfidence resource for the given identifier.
  *
  * @deprecated since version 1.2.1 Use TXClient.
  * @param string $txhash
  * @param array $params Parameters
  * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param BlockCypherRestCall $restCall is the Rest Call Service that is used to make rest calls
  * @return TXConfidence
  */
 public static function get($txhash, $params = array(), $apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($txhash, 'txhash');
     ArgumentGetParamsValidator::validate($params, 'params');
     $allowedParams = array();
     $params = ArgumentGetParamsValidator::sanitize($params, $allowedParams);
     $payLoad = "";
     $chainUrlPrefix = self::getChainUrlPrefix($apiContext);
     $json = self::executeCall("{$chainUrlPrefix}/txs/{$txhash}/confidence" . http_build_query(array_intersect_key($params, $allowedParams)), "GET", $payLoad, null, $apiContext, $restCall);
     $ret = new TXConfidence();
     $ret->fromJson($json);
     return $ret;
 }