import { TaskQueue } from "@welshman/lib"; import type { SignerOptions } from "./util.js"; export type SignerRequest = { priority: number; run: () => Promise; }; /** * The lane every request to one signer goes down. A browser extension and a native signer * app each answer one request at a time, so a caller is already queueing; making the queue * explicit is what lets a signature the user is waiting on overtake a backlog of * decryptions, and what keeps one request that never answers from blocking the rest. * * `batchSize` is 1, since a batch is fixed once it starts and a request arriving mid-batch * would otherwise wait out the whole of it however urgent it is. A `batchDelay` of 0 then * costs no timer per request, since `TaskQueue` drains a zero delay in a microtask. */ export declare class SignerQueue { queue: TaskQueue; push: (thunk: () => Promise, options?: SignerOptions) => Promise; } //# sourceMappingURL=queue.d.ts.map