@julesl23/s5js
Version:
Enhanced TypeScript SDK for S5 decentralized storage with path-based API, media processing, and directory utilities
22 lines • 551 B
JavaScript
// storage service, pinning service, gateway, portal
export class S5Portal {
protocol;
host;
headers;
constructor(protocol, host, headers) {
this.protocol = protocol;
this.host = host;
this.headers = headers;
}
;
apiURL(path, params) {
const url = `${this.protocol}://${this.host}/s5/${path}`;
if (params === undefined) {
return url;
}
else {
return `${url}?${new URLSearchParams(params)}`;
}
}
}
//# sourceMappingURL=portal.js.map