import { getSubgraphSdk } from "../utils/graphql";
export async function getExchanges(subgraphUrl, queryVars = {}) {
    const sdk = getSubgraphSdk(subgraphUrl);
    const { exchanges = [] } = await sdk.getExchangesQuery(queryVars);
    return exchanges;
}
export async function getExchangeById(subgraphUrl, exchangeId, queryVars = {}) {
    const sdk = getSubgraphSdk(subgraphUrl);
    const { exchange } = await sdk.getExchangeByIdQuery({
        exchangeId: exchangeId.toString(),
        ...queryVars
    });
    return exchange;
}
export async function getNonListedOfferVoided(subgraphUrl, queryVars = {}) {
    const sdk = getSubgraphSdk(subgraphUrl);
    const { nonListedOfferVoideds } = await sdk.getNonListedOfferVoidedQuery(queryVars);
    return nonListedOfferVoideds;
}
//# sourceMappingURL=subgraph.js.map