AssociationScenario class abstract

Association Scenario

The interface for a scenario that connects a dApp with a wallet application via a websocket.

Inheritance
Implementers

Constructors

AssociationScenario(Association association, {required int? maxAttempts, required List<int>? backoffSchedule, required List<String>? protocols, required Duration? timeLimit})
Creates a scenario that connects a dApp with a wallet application via a websocket.

Properties

association Association
The scenario's Association information.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeLimit Duration?
The default timeout duration applied to a connect call.
finalinherited

Methods

connect({Duration? timeLimit, Uri? walletUriBase}) Future<Session>
Establishes an encrypted session between the dApp and wallet endpoints.
override
dispose() Future<void>
Releases all acquired resources.
override
initialize(JsonRpcWebsocketClient client, Uri walletUri, {Duration? timeLimit}) Future<void>
Performs any setup required by the scenario prior to establishing an encrypted session (e.g. launching the mobile wallet application or waiting for a ping frame).
isWebsocketPing(List<int> data) bool
Returns true if data is an APP_PING message.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onWebsocketPing(List<int> data) → void
Called when the dApp receives an APP_PING message from the wallet endpoint.
session(JsonRpcWebsocketClient<List<int>> client) FutureOr<Session>
Returns the JSON RPC API for the connected client.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited