Skip to content
docs

ApprovalQueue

Defined in: approvals.ts:106

new ApprovalQueue(window, newId?, options?): ApprovalQueue

Defined in: approvals.ts:112

ApprovalWindow

() => string

ApprovalQueueOptions = {}

ApprovalQueue

get current(): ApprovalRequest<unknown> | null

Defined in: approvals.ts:155

The request currently shown (the window asks for it by id on load).

ApprovalRequest<unknown> | null


get queued(): number

Defined in: approvals.ts:159

number

decline(requestId, error?): boolean

Defined in: approvals.ts:167

string

Error = ...

boolean


declineAll(error?): void

Defined in: approvals.ts:172

Lock, disconnect, shutdown: everything pending is declined.

Error = ...

void


onChange(listener): () => void

Defined in: approvals.ts:180

() => void

() => void


pendingFor(origin): number

Defined in: approvals.ts:150

Requests waiting for origin (current + queued).

string

number


request<T>(input): Promise<T>

Defined in: approvals.ts:117

Enqueue and wait for the user’s answer. Refuses (never queues) past the per-origin limits.

T = unknown

Omit<ApprovalRequest, "id" | "createdAt" | "originWarnings" | "via">

Promise<T>


resolve(requestId, value): boolean

Defined in: approvals.ts:163

string

unknown

boolean


setVia(origin, via): void

Defined in: approvals.ts:139

Attach (or clear) the transport note every later request from origin carries.

string

OriginVia | null

void


viaFor(origin): OriginVia | undefined

Defined in: approvals.ts:145

The transport note later requests from origin carry (WalletConnect Verify’s verdict for wc:<topic>), if any.

string

OriginVia | undefined