Returns block template with an empty "hole" for nonce.

@param int    $reserveSize Size of the reserve to be specified. Required.
@param string $address     Valid TurtleCoin wallet address. Required.
@return JsonResponse
439106
public function getBlockTemplate(int $reserveSize, string $address):JsonResponse
    {
        $params = [
            'reserve_size'   => $reserveSize,
            'wallet_address' => $address,
        ];

        return $this->rpcPost('getblocktemplate', $params);
    }
784308
function queryPrivate($method, array $request = array())
    {
        if(!isset($request['nonce'])) {
            // generate a 64 bit nonce using a timestamp at microsecond resolution
            // string functions are used to avoid problems on 32 bit systems
            $nonce = explode(' ', microtime());
            $request['nonce'] = $nonce[1] . str_pad(substr($nonce[0], 2, 6), 6, '0');
        }

        // build the POST data string
        $postdata = http_build_query($request, '', '&');

        // set API key and sign the message
        $path = '/' . $this->version . '/private/' . $method;
        $sign = hash_hmac('sha512', $path . hash('sha256', $request['nonce'] . $postdata, true), base64_decode($this->secret), true);
        $headers = array(
            'API-Key: ' . $this->key,
            'API-Sign: ' . base64_encode($sign)
        );

        // make request
        curl_setopt($this->curl, CURLOPT_URL, $this->url . $path);
        curl_setopt($this->curl, CURLOPT_POSTFIELDS, $postdata);
        curl_setopt($this->curl, CURLOPT_HTTPHEADER, $headers);
        $result = curl_exec($this->curl);
        if($result===false)
            throw new \Exception('CURL error: ' . curl_error($this->curl));

        // decode results
        $result = json_decode($result, true);
        if(!is_array($result))
            throw new \Exception('JSON decode error');

        return $result;
    }
280235
public function depositAddress(string $asset)
    {
        $params = [
            "wapi" => true,
            "asset" => $asset,
        ];
        return $this->httpRequest("v3/depositAddress.html", "GET", $params, true);
    }
556872
function useNonce($server_url, $timestamp, $salt)
    {
        global $Auth_OpenID_SKEW;
        
        // save one request to memcache when nonce obviously expired 
        if (abs($timestamp - time()) > $Auth_OpenID_SKEW) {
            return false;
        }
        
        // SETNX will set the value only of the key doesn't exist yet.
        $nonceKey = $this->nonceKey($server_url, $salt);
        $added = $this->redis->setnx($nonceKey, "1");
        if ($added) {
            // Will set expiration
            $this->redis->expire($nonceKey, $Auth_OpenID_SKEW);
            return true;
        } else {
            return false;
        }
    }
956411
public function chunk($chunksize)
    {
        if ($chunksize < 1) {
            throw new \InvalidArgumentException("'{$chunksize}' is not a valid chunk size.");
        }

        return Linq::from(new ChunkIterator($this->iterator, $chunksize));
    }
655171
public function buildUrl($destination, DepositRequest $depositRequest)
    {
        $page = [
            $this->getPage($destination, $depositRequest),
            'username'      => $depositRequest->username,
            'merchant'      => $depositRequest->merchant,
            'transactionId' => $depositRequest->id,
        ];

        if (is_array($page)) {
            $page[0] = $this->localizePage($page[0]);
        } else {
            $page = $this->localizePage($page);
        }

        return Url::to($page, true);
    }
183309
public function setCryptoAddress($address)
    {
        if (!$this->checkAddress($address) || !preg_match(static::CRYPTO_ADDRESS_VALIDATION_REGEX, $address)) {
            throw new ErrorParameter('Invalid crypto address provided');
        }

        $this->crypto_address = $address;

        return $this;
    }
95771
public static function latLngFromAddress ($address, $country = null)
	{
		/** @var Settings $settings */
		$settings = SimpleMap::getInstance()->getSettings();
		$token = static::getToken($settings->geoToken, $settings->geoService);

		switch ($settings->geoService)
		{
			case GeoEnum::Here:
				return static::_latLngFromAddress_Here(
					$token,
					$address, $country
				);
			case GeoEnum::GoogleMaps:
				return static::_latLngFromAddress_Google(
					$token,
					$address, $country
				);
			case GeoEnum::Mapbox:
				return static::_latLngFromAddress_Mapbox(
					$token,
					$address, $country
				);
			case GeoEnum::Nominatim:
				return static::_latLngFromAddress_Nominatim(
					$address, $country
				);
			default:
				throw new Exception(
					'Unknown geo-coding service: ' . $settings->geoService
				);
		}
	}
1001626
public function getPaymentFeeExclVat($address)
    {
        $config = Mage::getSingleton('adyen_fee/tax_config');
        $quote = $address->getQuote();
        $store = $quote->getStore();
        $fee = $this->getPaymentFeeAmount($quote, $store);
        if ($fee && $config->paymentFeePriceIncludesTax($store)) {
            $fee -= $this->getPaymentFeeVat($address);
        }

        return $fee;
    }
1354776
@Override
  public String requestDepositAddress(Currency currency, String... arguments) throws IOException {

    CryptonitDepositAddress response = null;

    throw new NotYetImplementedForExchangeException();
    // return response.getDepositAddress();
  }
184600
protected function create_nonce($length = 32) {
		$nonce = "";
		$codeAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		$codeAlphabet.= "abcdefghijklmnopqrstuvwxyz";
		$codeAlphabet.= "0123456789";
		for ($i = 0; $i < $length; $i++) {
			$nonce .= $codeAlphabet[$this->crypto_rand_secure(0, strlen($codeAlphabet))];
		}
		return $nonce;
	}
806863
public function bcc($address, $name = null)
    {
        if (is_array($address)) {
            $this->addAddressArray($address, 'bcc');
        } else {
            $this->bcc[$address] = $name;
        }

        return $this;
    }
722672
function getCache($address) {
        if(!isset($this->dsn))
            return false;
        
        $_ret = array();
        
        // PEAR DB
        require_once('DB.php');          
        $_db =& DB::connect($this->dsn);
        if (PEAR::isError($_db)) {
            die($_db->getMessage());
        }
        $_res =& $_db->query("SELECT lon,lat FROM {$this->_db_cache_table} where address = ?", $address);
        if (PEAR::isError($_res)) {
            die($_res->getMessage());
        }
        if($_row = $_res->fetchRow()) {            
            $_ret['lon'] = $_row[0];
            $_ret['lat'] = $_row[1];
        }
        
        $_db->disconnect();
        
        return !empty($_ret) ? $_ret : false;
    }
62143
public function getEntry(Address $address)
    {
        $events = array_filter($this->events, function (Entry $entry) use ($address) {
            return $entry->getAddress()->isMatch($address);
        });
        $last_matching_entry = null;
        foreach ($events as $entry) {
            if ($entry->getAddress()->isEntireCache() || $entry->getAddress()->isEntireBin()) {
                $last_matching_entry = null;
            } elseif (!is_null($entry->expiration) && $entry->expiration < $_SERVER['REQUEST_TIME']) {
                $last_matching_entry = null;
            } else {
                $last_matching_entry = clone $entry;
            }
        }
        // Last event was a deletion, so miss.
        if (is_null($last_matching_entry) || is_null($last_matching_entry->value)) {
            $this->misses++;
            return null;
        }

        $unserialized_value = @unserialize($last_matching_entry->value);

        // If unserialization failed, miss.
        if (false === $unserialized_value && serialize(false) !== $last_matching_entry->value) {
            throw new UnserializationException($address, $last_matching_entry->value);
        }

        $last_matching_entry->value = $unserialized_value;

        $this->hits++;
        return $last_matching_entry;
    }
194977
public function bcc($address, $name = null, $override = false)
    {
        if ($override) {
            $this->swift->setBcc($address, $name);

            return $this;
        }

        return $this->addAddresses($address, $name, 'Bcc');
    }
310947
public function getBlockHashes(int $firstBlockIndex, int $blockCount):JsonResponse
    {
        $params = [
            'firstBlockIndex' => $firstBlockIndex,
            'blockCount'      => $blockCount,
        ];

        return $this->rpcPost('getBlockHashes', $params);
    }
482188
public function create($address)
    {
        if (is_array($address)) {
            $address = new OrderAddress($address);
        }

        if ($address instanceof OrderAddress) {
            if ($this->fireEvent('creating', array($address)) === false) {
                return false;
            }

            $address->setCaller($this);
            $address->save();

            $this->fireEvent('created', array($address));

            $address = $this->find($address->id);

            return $address;
        }

        throw new Exception(sprintf(Exception::CANT_CREATE_MODEL,
            'Subbly\\Model\\Order',
            $this->name()
        ));
    }