InMemoryClientStorage class

An in-memory storage solution for the ClientStorageInterface. This is used by the tests and example but real applications would benefit from persistant storage.

Implemented types

Constructors

InMemoryClientStorage.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
keyCompleters Map<String, KeyToComplete>
final
keys Map<ECPublicKey, FrostKeyWithDetails>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sigNonces Map<SignaturesRequestId, SignaturesNonces>
final
sigsRejected Map<SignaturesRequestId, FinalExpirable>
final

Methods

addNewFrostKey(FrostKeyWithDetails newKey) Future<void>
Add new key with details to storage
override
addOrReplaceAck(SignedDkgAck ack) Future<void>
Adds the acknowledgement of a FROST key for a participant, including for self. May update an existing ACK
override
addRejectedSigsRequest(SignaturesRequestId id, FinalExpirable expirable) Future<void>
Add the ID of a signatures request that was rejected. This may be removed when expirable expires or by removeRejectionOfSigsRequest.
override
addSignaturesNonces(SignaturesRequestId id, SignaturesNonces nonces, int capacity) Future<void>
Stores the nonces for the presignatures of a request given by id. Each nonce is mapped by the signature index in the request.
override
loadKeys() Future<Set<FrostKeyWithDetails>>
Load the key details including SignedDkgAcks.
override
loadRejectedSigsRequests() Future<Map<SignaturesRequestId, FinalExpirable>>
Loads the IDs of all of the signatures requests that were rejected by the client
override
loadSigNonces() Future<Map<SignaturesRequestId, SignaturesNonces>>
For every non-expired signature request, this should return a map from the
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeRejectionOfSigsRequest(SignaturesRequestId id) Future<void>
Removes the ID of a signatures request that is no longer rejected.
override
removeSigsRequest(SignaturesRequestId id) Future<void>
Remove all data (rejection and/or nonces) for a signatures request
override
toString() String
A string representation of this object.
inherited
waitForKeyWithName(String name, int expAcks) Future<FrostKeyWithDetails>
Waits for a key to be created and receive a number of ACKs. Must only be used once at a time.

Operators

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