FakeInjectedBridge class final

An InjectedBridge the test drives directly.

Implemented types

Constructors

FakeInjectedBridge({String key = 'tonkeeper', int protocolVersion = 2, bool isWalletBrowser = true})
Creates a fake injected binding.

Properties

closed ↔ bool
Whether close was called.
getter/setter pair
connectRequests → List<Map<String, Object?>>
Connect requests passed to connect, oldest first.
final
connectResponse ↔ Map<String, Object?>?
What connect resolves with.
getter/setter pair
events → Stream<Map<String, Object?>>
Wallet-initiated events — the decoded WalletEvent objects.
no setteroverride
failNextWith ↔ Object?
Makes the next call of any kind fail.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
isWalletBrowser → bool
Whether the page is open inside the wallet's own browser.
final
key → String
The window property the wallet injected itself into.
final
onSend ↔ Map<String, Object?> Function(Map<String, Object?> request)?
What send resolves with, given the request it received.
getter/setter pair
protocolVersion → int
Highest TON Connect protocol version the wallet supports.
final
restoreCalls ↔ int
How many times restoreConnection was called.
getter/setter pair
restoreResponse ↔ Map<String, Object?>?
What restoreConnection resolves with.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sentRequests → List<Map<String, Object?>>
Requests passed to send, oldest first.
final

Methods

close() → Future<void>
Stops listening to the wallet.
override
connect(int protocolVersion, Map<String, Object?> request) → Future<Map<String, Object?>>
Sends a connect request, returning the decoded ConnectEvent.
override
emit(Map<String, Object?> event) → void
Delivers a wallet-initiated event.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
restoreConnection() → Future<Map<String, Object?>>
Attempts to restore a prior approval, returning the decoded ConnectEvent.
override
send(Map<String, Object?> request) → Future<Map<String, Object?>>
Sends an AppRequest, returning the decoded WalletResponse.
override
toString() → String
A string representation of this object.
inherited

Operators

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