UNPKG

@storacha/client

Version:

Client for the storacha.network w3up api

36 lines 1.1 kB
/** * Client for interacting with the `usage/*` capabilities. */ export class UsageClient extends Base { /** * Get a usage report for the passed space in the given time period. * * Required delegated capabilities: * - `usage/report` * * @param {import('../types.js').SpaceDID} space * @param {{ from: Date, to: Date }} period * @param {object} [options] * @param {string} [options.nonce] */ report(space: import("../types.js").SpaceDID, period: { from: Date; to: Date; }, options?: { nonce?: string | undefined; }): Promise<API.UsageReportSuccess>; } export function report({ agent }: { agent: API.Agent; }, { space, period, nonce, proofs }: { space: API.SpaceDID; period: { from: Date; to: Date; }; nonce?: string | undefined; proofs?: API.Delegation<API.Capabilities>[] | undefined; }): Promise<API.Result<API.UsageReportSuccess, API.UsageReportFailure>>; import { Base } from '../base.js'; import * as API from '../types.js'; //# sourceMappingURL=usage.d.ts.map