@codex-storage/sdk-js
Version:
Codex SDK to interact with the Codex decentralized storage network.
63 lines (61 loc) • 1.84 kB
JavaScript
import { CodexMarketplace } from './chunk-IKKEHM5H.mjs';
export { CodexAvailabilityPatchInput, CodexCreateAvailabilityInput, CodexCreateStorageRequestInput, CodexMarketplace } from './chunk-IKKEHM5H.mjs';
import { CodexDebug } from './chunk-OUB34QMD.mjs';
export { CodexDebug, CodexLogLevelInput } from './chunk-OUB34QMD.mjs';
import { CodexData } from './chunk-HDKK24O2.mjs';
export { CodexData } from './chunk-HDKK24O2.mjs';
import { CodexNode } from './chunk-HPUHQWSZ.mjs';
export { CodexNode } from './chunk-HPUHQWSZ.mjs';
import './chunk-JUEFSJIF.mjs';
export { Fetch, FetchAuthBuilder } from './chunk-2VOCE3TZ.mjs';
export { CodexError, CodexValibotIssuesMap } from './chunk-MVZZ6JVF.mjs';
// src/index.ts
var Codex = class {
url;
_marketplace;
_data;
_node;
_debug;
auth = {};
constructor(url, options) {
this.url = url;
this._marketplace = null;
this._data = null;
this._node = null;
this._debug = null;
if (options == null ? void 0 : options.auth) {
this.auth = options == null ? void 0 : options.auth;
}
}
get marketplace() {
if (this._marketplace) {
return this._marketplace;
}
this._marketplace = new CodexMarketplace(this.url, { auth: this.auth });
return this._marketplace;
}
get data() {
if (this._data) {
return this._data;
}
this._data = new CodexData(this.url, { auth: this.auth });
return this._data;
}
get node() {
if (this._node) {
return this._node;
}
this._node = new CodexNode(this.url, { auth: this.auth });
return this._node;
}
get debug() {
if (this._debug) {
return this._debug;
}
this._debug = new CodexDebug(this.url, { auth: this.auth });
return this._debug;
}
};
export { Codex };
//# sourceMappingURL=index.mjs.map
//# sourceMappingURL=index.mjs.map