/** * Allow to embed small pieces of data on the blockchain. * * @param NullData $nullData * @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 NullData */ public function create(NullData $nullData, $params = array(), $apiContext = null, $restCall = null) { ArgumentGetParamsValidator::validate($params, 'params'); $allowedParams = array(); $params = ArgumentGetParamsValidator::sanitize($params, $allowedParams); $payLoad = $nullData->toJSON(); $chainUrlPrefix = self::getChainUrlPrefix($apiContext); $json = self::executeCall("{$chainUrlPrefix}/txs/data?" . http_build_query($params), "POST", $payLoad, null, $apiContext, $restCall); $nullData->fromJson($json); return $nullData; }