const hasProps = (obj, ...props) => {
    if (!obj) {
        return false;
    }
    const keys = Reflect.ownKeys(obj);
    // @ts-ignore
    return props.every((prop) => keys.includes(prop));
};
export const isChainIdResponse = (raw) => hasProps(raw, "chainId");
export const isExchangesResponse = (raw) => {
    if (!Array.isArray(raw)) {
        return false;
    }
    else if (!raw.length) {
        return true;
    }
    return hasProps(raw[0], "id", "currency", "price", "amount", "blockNumber", "exchangeDate");
};
//# sourceMappingURL=response.js.map