DappTransport

interface DappTransport

Moves JSON-RPC frames between a dApp and a wallet.

The currency is JsonRpcRequest/JsonRpcResponse rather than a typed request union, because that is literally what crosses the wire and every planned transport is a way of carrying those bytes somewhere:

  • InProcessDappTransport — same process, for tests and for apps that embed the wallet layer but still want to code against the standard API.

  • deep link / App Link — same device, request-response only.

  • LAN gRPC — two devices, a bidirectional stream of these same frames.

Keeping the seam at the frame means a new transport implements two members and inherits the whole protocol, and it is why the JSON-RPC document stays the single schema — no transport gets to define its own.

Properties

Link copied to clipboard
open val events: Flow<DappEvent>

Events pushed by the wallet.

Functions

Link copied to clipboard
abstract suspend fun send(request: JsonRpcRequest): JsonRpcResponse

Sends a request and awaits its response.