UNPKG

@storacha/client

Version:

Client for the storacha.network w3up api

58 lines 1.3 kB
export * from "@storacha/access/space"; /** * @typedef {object} Model * @property {API.SpaceDID} id * @property {{name?:string, access?:import('@storacha/access').SpaceAccessType}} [meta] * @property {API.Agent} agent */ export class Space { /** * @param {Model} model */ constructor(model: Model); usage: StorageUsage; /** * The given space name. */ get name(): string; get access(): import("@storacha/access").SpaceAccessType; /** * The DID of the space. */ did(): `did:key:${string}`; /** * User defined space metadata. */ meta(): { name?: string; access?: import("@storacha/access").SpaceAccessType; } | undefined; #private; } export class StorageUsage { /** * @param {Model} model */ constructor(model: Model); /** * Get the current usage in bytes. */ get(): Promise<({ ok?: undefined; } & { error: API.Failure; }) | { ok: bigint | undefined; }>; #private; } export type Model = { id: API.SpaceDID; meta?: { name?: string; access?: import("@storacha/access").SpaceAccessType; } | undefined; agent: API.Agent; }; import * as API from './types.js'; //# sourceMappingURL=space.d.ts.map