import type { Bounds, Tagged } from "@bounded-authority-protocol/verifier"; import type { AnchorCompact, Envelope, GrantCompact, TransitionCompact } from "./api.js"; import { type V3OperationInput } from "./v3.js"; import { type AtomicSigningIdentity, type SignerResult } from "./handle.js"; export interface Es256KeyHandle { sign(message: Uint8Array): Uint8Array | Promise; publicKey(): Uint8Array | Promise; thumbprint(): string | Promise; keyIdentity?(): { keyId: string; publicKey: Uint8Array; } | Promise<{ keyId: string; publicKey: Uint8Array; }>; signingIdentity?(): Promise | AtomicSigningIdentity; } export interface V3SignerEvent { readonly kind: "v3_report" | "v3_anchor" | "v3_grant" | "v3_key_transition"; readonly phase: "start" | "stop" | "error"; } export interface V3SignOpts { readonly bounds?: Bounds; readonly issuedAt?: number; readonly proofId?: string; readonly anchoredAt?: number; readonly onEvent?: (event: V3SignerEvent) => void; } export interface V3ReportInput { readonly grantCompact: Uint8Array; readonly operation: string; readonly method: string; readonly targetUri: string; readonly invocationId: string; readonly castArguments: Tagged; readonly nonce?: string; } export interface V3AnchorInput { readonly anchorId: string; readonly chainId: string; readonly sequence: number; readonly chainHash: Uint8Array; } export interface V3GrantInput { 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 V3OperationInput[]; } export interface V3TransitionInput { readonly transitionId: string; readonly chainId: string; readonly effectiveAt: number; readonly nextKeyId: string; readonly nextPublicKey: Uint8Array; } export declare function signV3Report(report: V3ReportInput, handle: Es256KeyHandle, opts?: V3SignOpts): Promise>; export declare function signV3Anchor(input: V3AnchorInput, handle: Es256KeyHandle, opts?: V3SignOpts): Promise>; export declare function signV3Grant(input: V3GrantInput, handle: Es256KeyHandle, opts?: V3SignOpts): Promise>; export declare function signV3KeyTransition(input: V3TransitionInput, handle: Es256KeyHandle, opts?: V3SignOpts): Promise>;