WalletStateApi class
An implementation of the WalletStateAlgebra that uses a database to store state information.
Constructors
- WalletStateApi(Database _instance, FlutterSecureStorage _secureStorage, {ExtendedEd25519? extendedEd25519, SCrypt? kdf})
Properties
- api → WalletApi
-
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
-
addEntityVks(
String fellowship, String template, List< String> entities) → Future<void> - Add a new entry of entity verification keys to the wallet state's cartesian indexing. Entities are at a pair of x (fellowship) and y (template) layers and thus represent a Child verification key at a participants own x/y path. The respective x and y indices of the specified fellowship and template labels must already exist.
-
addNewLockTemplate(
String template, LockTemplate lockTemplate) → Future< void> - Add a new lock template entry to the wallet state's cartesian indexing. Lock templates are at the y (template) layer. This new entry will be associated to the label given by template. The index of the new entry (and thus associated with the template label) will be automatically derived by the next available y-index.
-
addPreimage(
Preimage preimage, Proposition_Digest digestProposition) → void - Add a preimage secret associated to a digest proposition.
-
getAddress(
String fellowship, String template, int? someInteraction) → String? - Get the lock address associated to the given fellowship, template and optional state
-
getCurrentAddress(
) → String - Get the current address for the wallet state
-
getCurrentIndicesForFunds(
String fellowship, String template, int? someState) → Indices? - Get the current indices for the given fellowship, template and optional state
-
getEntityVks(
String fellowship, String template) → List< String> ? - Get the list of verification keys associated to the given pair of fellowship and template
-
getIndicesBySignature(
Proposition_DigitalSignature signatureProposition) → Indices? - Get the indices associated to a signature proposition
-
getLock(
String fellowship, String template, int nextState) → Lock? - Using the template associated the given template, the verification keys associated to the fellowship and template pair, and the z state given by nextState, build a Lock
-
getLockByAddress(
String lockAddress) → Lock_Predicate? - Get the lock predicate associated to the given lockAddress.
-
getLockByIndex(
Indices indices) → Lock_Predicate? - Get the lock predicate associated to the given indices
-
getLockTemplate(
String template) → LockTemplate? - Get the lock template associated to the given template
-
getNextIndicesForFunds(
String fellowship, String template) → Indices? - Get the next available indices for the given fellowship and template
-
getPreimage(
Proposition_Digest digestProposition) → Preimage? - Get the preimage secret associated to a digest proposition.
-
initWalletState(
int networkId, int ledgerId, VerificationKey vk) → Future< void> - Initialize the wallet state with the given verification key
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setCurrentIndices(
String fellowship, String template, int interaction) → Indices? -
toString(
) → String -
A string representation of this object.
inherited
-
updateWalletState(
String lockPredicate, String lockAddress, String? routine, String? vk, Indices indices) → Future< void> - Update the wallet state with a new set of Predicate Lock, Lock Address, and their associated Indices
-
validateCurrentIndicesForFunds(
String fellowship, String template, int? someState) → Indices - Validate that the supplied fellowship, template and optional state exist and are associated with each other in the current wallet state
-
validateFellowship(
String fellowship) → bool -
validateTemplate(
String template) → bool
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited