export { fail }; export function create>(options: API.ServerOptions): API.ServerView; export function handle, I extends API.Transport.Tuple, S>>>(server: API.Server, request: API.HTTPRequest; Out: API.Transport.Tuple>, API.SigAlg>>; }>>): Promise; In: API.Transport.Tuple>>; }>> | { status: number; headers: Record; body: Uint8Array; }>; export function execute, I extends API.Transport.Tuple>(input: API.AgentMessage<{ In: API.InferInvocations; Out: API.Transport.Tuple>, API.SigAlg>>; }>, server: API.Server): Promise; In: API.Transport.Tuple>>; }>>; export function run, C extends API.Capability>(invocation: API.Invocation, server: API.Server): Promise; export function invoke, C extends API.Capability>(invocation: API.Invocation, server: API.Server): Promise; export function resolve(service: Record, path: string[]): null | Record>; import { fail } from '@ucanto/core'; import * as API from '@ucanto/interface'; /** * @template {Record} S * @implements {API.ServerView} */ declare class Server> implements API.ServerView { /** * @param {API.ServerOptions} options */ constructor({ id, service, codec, principal, ...rest }: API.ServerOptions); context: { audience?: API.Reader<`did:${string}:${string}`, unknown, API.Failure> | undefined; canIssue?: ((capability: API.ParsedCapability, issuer: `did:${string}:${string}`) => boolean) | undefined; resolve?: ((proof: API.UCANLink, API.SigAlg>) => API.Await, API.UnavailableProof>>) | undefined; validateAuthorization: (proofs: API.Authorization>) => API.Await>; resolveDIDKey?: ((did: `did:${string}:${string}`) => API.Await>) | undefined; proofs?: API.Delegation[] | undefined; id: API.Signer<`did:${string}:${string}`, API.SigAlg>; principal: API.PrincipalParser; }; service: S; codec: API.InboundCodec; catch: (err: API.HandlerExecutionError) => void; validateAuthorization: (proofs: API.Authorization>) => API.Await>; get id(): API.Signer<`did:${string}:${string}`, API.SigAlg>; /** * @template {API.Tuple>} I * @param {API.HTTPRequest, Out: API.Tuple }>>} request * @returns {Promise, In: API.Tuple }>>>} */ request, S>>>(request: API.HTTPRequest; Out: API.Transport.Tuple>, API.SigAlg>>; }>>): Promise; In: API.Transport.Tuple>>; }>>>; /** * @template {API.Capability} C * @param {API.ServiceInvocation} invocation * @returns {Promise>} */ run>(invocation: API.ServiceInvocation): Promise>; } import { Receipt } from '@ucanto/core'; export { capability, URI, Link, Failure } from "@ucanto/validator"; export { ok, error } from "./handler.js"; //# sourceMappingURL=server.d.ts.map