/** * A new address is generated similar to Address Generation and associated it with the given wallet. * * @deprecated since version 1.2. Use HDWalletClient. * @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 HDWalletGenerateAddressResponse */ public function generateAddress($params = array(), $apiContext = null, $restCall = null) { ArgumentGetParamsValidator::validate($params, 'params'); $allowedParams = array('subchain_index' => 1); $params = ArgumentGetParamsValidator::sanitize($params, $allowedParams); $payLoad = ""; $chainUrlPrefix = self::getChainUrlPrefix($apiContext); $json = self::executeCall("{$chainUrlPrefix}/wallets/hd/{$this->name}/addresses/generate?" . http_build_query($params), "POST", $payLoad, null, $apiContext, $restCall); $ret = new HDWalletGenerateAddressResponse(); $ret->fromJson($json); return $ret; }