w3-store
Version:
web3.storage upload service
45 lines • 1.27 kB
TypeScript
export function create({ id, db }: Context): {
identity: API.Identity.Identity;
};
export function server({ context, ...options }: API.ServerOptions & {
context: Context;
}): Server.ServerView<{
identity: {
identity: API.Identity.Identity;
};
}>;
/**
* @implements {API.Identity.NotRegistered}
*/
export class NotRegistered implements API.Identity.NotRegistered {
/**
* @param {[API.Identity.ID, ...API.Identity.ID[]]} ids
*/
constructor(ids: [API.Identity.ID, ...API.Identity.ID[]]);
ids: [API.Identity.ID, ...API.Identity.ID[]];
get message(): string;
get error(): true;
/** @type {"NotRegistered"} */
get name(): "NotRegistered";
toJSON(): {
name: "NotRegistered";
message: string;
ids: [API.Identity.ID, ...API.Identity.ID[]];
error: true;
};
}
export type AccountLink = {
account: API.DID;
proof: Server.LinkedProof;
};
export type DB = {
set: (key: string, value: AccountLink) => API.Await<unknown>;
get: (key: string) => API.Await<AccountLink | undefined>;
};
export type Context = {
id: API.SigningAuthority;
db: DB;
};
import * as API from "../type.js";
import * as Server from "@ucanto/server";
//# sourceMappingURL=provider.d.ts.map