import { type Bounds, type OperationInput, type Tagged } from "@bounded-authority-protocol/verifier"; import { type KeyHandle, type SignerResult } from "./handle.js"; export interface SignerEvent { readonly kind: "report" | "local_loopback_report" | "anchor" | "grant" | "key_transition"; readonly phase: "start" | "stop" | "error"; } export interface SignOpts { readonly bounds?: Bounds; readonly issuedAt?: number; readonly proofId?: string; readonly anchoredAt?: number; readonly onEvent?: (event: SignerEvent) => void; } export interface ReportInput { readonly grantCompact: Uint8Array; readonly operation: string; readonly method: string; readonly targetUri: string; readonly invocationId: string; readonly castArguments: Tagged; readonly nonce?: string; } export interface AnchorInput { readonly anchorId: string; readonly chainId: string; readonly sequence: number; readonly chainHash: Uint8Array; } export interface GrantInput { readonly issuer: string; readonly grantId: string; readonly audiences: readonly string[]; readonly issuedAt: number; readonly notBefore: number; readonly expiresAt: number; readonly holderThumbprint: string; readonly operations: readonly OperationInput[]; } export interface TransitionInput { readonly transitionId: string; readonly chainId: string; readonly effectiveAt: number; readonly nextKeyId: string; readonly nextPublicKey: Uint8Array; } export interface Envelope { readonly grant: Uint8Array; readonly proof: Uint8Array; } export interface AnchorCompact { readonly anchor: Uint8Array; } export interface GrantCompact { readonly grant: Uint8Array; } export interface TransitionCompact { readonly keyTransition: Uint8Array; } export declare function signReport(report: ReportInput, handle: KeyHandle, opts?: SignOpts): Promise>; export declare function signLocalLoopbackReport(report: ReportInput, handle: KeyHandle, opts?: SignOpts): Promise>; export declare function signAnchor(input: AnchorInput, handle: KeyHandle, opts?: SignOpts): Promise>; export declare function signGrant(input: GrantInput, handle: KeyHandle, opts?: SignOpts): Promise>; export declare function signKeyTransition(input: TransitionInput, handle: KeyHandle, opts?: SignOpts): Promise>;