DappApprovalDelegate

fun interface DappApprovalDelegate

The wallet UI, from the engine's point of view.

Implementations suspend until the user answers. There is deliberately no timeout and no auto-approve: an implementation that returns DappApproval.Approved without asking turns the wallet into a custodial signer for whoever holds the transport, which is a different product with a different security review.

Functions

Link copied to clipboard
abstract suspend fun approve(request: DappApprovalRequest): DappApproval

Presents request to the user and suspends until they answer.

open suspend fun approve(request: DappApprovalRequest, context: DappRequestContext): DappApproval

approve with what the transport knew, such as the dApp's deadline. The default drops the context; a wallet that keeps the dApp's clock overrides this one.