src/Server.php
public function challenge(string $hydroAddressId): ChallengeResponse
    {
        try {
            $response = $this->callHydroApi(
                'post',
                'challenge',
                [
                    'json' => [
                        'hydro_address_id' => $hydroAddressId
                    ]
                ]
            );

            $data = \GuzzleHttp\json_decode($response->getBody()->getContents(), true, 512, JSON_BIGINT_AS_STRING);
        } catch (RuntimeException $e) {
            throw ChallengeFailed::forHydroAddressId($hydroAddressId, $e->getMessage());
        } catch (InvalidArgumentException $e) {
            throw ChallengeFailed::forHydroAddressId($hydroAddressId, $e->getMessage());
        } catch (GuzzleException $e) {
            throw ChallengeFailed::forHydroAddressId($hydroAddressId, $e->getMessage());
        } catch (ApiRequestFailed $e) {
            throw ChallengeFailed::forHydroAddressId($hydroAddressId, $e->getMessage());
        }

        return new ChallengeResponse(
            $data['amount'],
            (int) $data['challenge'],
            (int) $data['partner_id'],
            $data['transaction_hash']
        );
    }
public function challenge(string $hydroAddressId): ChallengeResponse
    {
        try {
            $response = $this->callHydroApi(
                'post',
                'challenge',
                [
                    'json' => [
                        'hydro_address_id' => $hydroAddressId
                    ]
                ]
            );

            $data = \GuzzleHttp\json_decode($response->getBody()->getContents(), true, 512, JSON_BIGINT_AS_STRING);
        } catch (RuntimeException $e) {
            throw ChallengeFailed::forHydroAddressId($hydroAddressId, $e->getMessage());
        } catch (InvalidArgumentException $e) {
            throw ChallengeFailed::forHydroAddressId($hydroAddressId, $e->getMessage());
        } catch (GuzzleException $e) {
            throw ChallengeFailed::forHydroAddressId($hydroAddressId, $e->getMessage());
        } catch (ApiRequestFailed $e) {
            throw ChallengeFailed::forHydroAddressId($hydroAddressId, $e->getMessage());
        }

        return new ChallengeResponse(
            $data['amount'],
            (int) $data['challenge'],
            (int) $data['partner_id'],
            $data['transaction_hash']
        );
    }
After being whitelisted, each user must authenticate through the Server-side Raindrop process once every 24 hours
to retain access to the protected system.

@param string $hydroAddressId
@return ChallengeResponse
@throws ChallengeFailed