LivepeerEvents/src/util/livepeer.js

47 lines
886 B
JavaScript

export const getQuotes = () => (
fetch("api/livepeer/quotes", {
method: "GET",
headers: {
"Content-Type": "application/json"
}
})
);
export const getBlockchainData = () => (
fetch("api/livepeer/blockchains", {
method: "GET",
headers: {
"Content-Type": "application/json"
}
})
);
export const getEvents = () => (
fetch("api/livepeer/getEvents", {
method: "GET",
headers: {
"Content-Type": "application/json"
}
})
);
export const getCurrentOrchestratorInfo = () => (
fetch("api/livepeer/getOrchestrator", {
method: "GET",
headers: {
"Content-Type": "application/json"
}
})
);
export const getOrchestratorInfo = (orchAddr) => (
fetch("api/livepeer/getOrchestrator", {
method: "POST",
body: JSON.stringify(orchAddr),
headers: {
"Content-Type": "application/json"
}
})
);