FakeWallet class final
Stands in for the wallet side of a session.
Holds a real SessionCrypto, so everything it produces is encrypted the way a wallet would encrypt it rather than hand-waved past.
Constructors
- FakeWallet()
- Creates a wallet with a fresh session keypair.
Properties
- clientId → String
-
This wallet's
client_id.no setter - crypto → SessionCrypto
-
This wallet's session keypair.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
connectError(
{int id = 1, int code = 300}) → Map< String, Object?> -
A
connect_errorevent. Code 300 is a user decline; 100 is an unrecognised dApp. -
connectSuccess(
{int id = 1, String? address, String appName = 'tonkeeper', List< Map< ? features, bool withProof = false}) → Map<String, Object?> >String, Object?> -
A
connectevent. -
disconnectEvent(
{int id = 2}) → Map< String, Object?> -
A wallet-initiated
disconnectevent. -
envelopeFor(
String dAppClientId, Map< String, Object?> payload) → String -
Builds a bridge envelope carrying
payloadencrypted fordAppClientId. -
errorResponse(
String requestId, {int code = 300, String message = 'User declined the transaction'}) → Map< String, Object?> -
A failed response to the request with
requestId. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
response(
String requestId, {String result = 'te6ccg'}) → Map< String, Object?> -
A successful response to the request with
requestId. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited