UNPKG

godprotocol

Version:
39 lines (25 loc) 712 B
import { get_request, post_request } from "../utils/services"; class Repository { constructor(manager) { this.manager = manager; this.gds = this.manager.oracle.gds; } read_address = async (address) => { let content = await this.manager.oracle.fs.read_file(`${address}`); try { content = JSON.parse(content); } catch (err) {} return content; }; sync = async () => { }; create_or_update_file = async (path, content, message, sha) => { }; get_file_sha = async (path) => { }; write_file = async (path, content, message = "") => { await this.manager.oracle.fs.write_file(path, content) return path }; } export default Repository;