@lighthouse-web3/sdk
Version:
NPM package and CLI tool to interact with lighthouse protocol
18 lines (17 loc) • 604 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const lighthouse_config_1 = require("../../lighthouse.config");
exports.default = async (cid) => {
try {
const response = await fetch(lighthouse_config_1.lighthouseConfig.lighthouseBLSNode +
`/api/fileAccessConditions/get/${cid}`);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const conditions = await response.json();
return { data: conditions };
}
catch (error) {
throw new Error(error.message);
}
};