/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { Bt as StreamSendOpts, I as SigningCallCtx, It as RawStreamingCall, Mt as IRequestSender, Ut as IMessageTransport, V as Principal, _n as SignedCapability, li as JsonValue, st as PublicSigningIdentity, zt as SendOpts } from "../../chunks/hubRpcConnection-Ba6dm9d-.js"; import { i as hubFromConnection, n as SlotPrerequest, r as SlotReservation, t as Hub } from "../../chunks/hubFacade-DPPm32b0.js"; import { a as HubAccessResult, i as HubAccessRequest } from "../../chunks/hubAccess-DDeQLWpk.js"; //#region src/hub/client/hubSigningSender.d.ts /** * The single connection handle a hub client consumes: a signing request * sender (every outbound call is wrapped in a `$hubrpc` signed envelope by the * principal) that also surfaces the principal's public identity and its grants. * * It IS the channel — `sendRequest("svc::iface::member", params)` routes a * form-3 hub call. The {@link Principal}'s `capBag` is the live grant list: * {@link listGrants} returns its snapshot and {@link requestAccess} grows it. * * Construct with {@link HubSigningSender.create} from any transport whose peer * is (or routes to) a hub — a socket, a websocket, or an in-memory * {@link import('@vscode/hubrpc-hub/hub/server').Hub} link. */ declare class HubSigningSender implements IRequestSender { private readonly _inner; private readonly _principal; /** * Wrap `transport` in a JSON-RPC channel + signing sender bound to * `principal`. */ static create(transport: IMessageTransport, principal: Principal): HubSigningSender; private constructor(); /** Public identity (nodeId) this connection signs as. Never exposes keys. */ get identity(): PublicSigningIdentity; /** Snapshot of the durable capabilities currently held (the cap bag). */ listGrants(): readonly SignedCapability[]; /** * Request capabilities from the hub through the same signed connection: * a `hubAccess::requestAccess` call served at the connection root (never * forwarded → never gated, so no `hubAccess` bootstrap cap is needed). Any * durable (non-one-shot) caps the hub mints join the principal's cap bag, so * subsequent signed calls present them automatically. */ requestAccess(req: HubAccessRequest): Promise; sendRequest(method: string, params: JsonValue | undefined, opts?: SendOpts): Promise; sendNotification(method: string, params: JsonValue | undefined, opts?: SendOpts): Promise; sendRequestWithStream(method: string, params: JsonValue | undefined, opts?: StreamSendOpts): RawStreamingCall; close(): void; } //#endregion export { Hub, HubSigningSender, type SlotPrerequest, type SlotReservation, hubFromConnection }; //# sourceMappingURL=index.d.ts.map