Skip to content

Welshman Docs / @welshman/signer / SignerQueue

Class: SignerQueue ​

Defined in: packages/signer/src/queue.ts:20

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.

Constructors ​

Constructor ​

new SignerQueue(): SignerQueue

Returns ​

SignerQueue

Properties ​

queue ​

queue: TaskQueue<SignerRequest>

Defined in: packages/signer/src/queue.ts:21

Methods ​

push() ​

push<T>(thunk, options?): Promise<T>

Defined in: packages/signer/src/queue.ts:28

Type Parameters ​

T ​

T

Parameters ​

thunk ​

() => Promise<T>

options? ​

SignerOptions = {}

Returns ​

Promise<T>