WalletStore class

A wallet storing credentials and keys permanently using Hive.

Keys are stored and generated according to BIP32 standard. Per default the path m/456/0/index is used for keys and dids to prove and identify the credentials someone hold. If a wallet is also used to issue credentials the keypair found at path m/456/1/0 is the default one.

Constructors

WalletStore(String _walletPath)
Constructs a wallet at file-system path path.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
standardConnectionPath → String
The path used to derive connection keys
final
standardConnectionPathEd → String
The path used to derive connection keys
final
standardConnectionPathX → String
The path used to derive connection keys
final
standardCredentialPath → String
The path used to derive credential keys
final
standardCredentialPathEd → String
The path used to derive credential keys
final

Methods

closeBoxes() → Future<void>
Closes storage containers.
deleteConfigEntry(String key) → Future<void>
deleteConnection(String connectionDid) → Future<void>
deleteCredential(String credentialDid) → Future<void>
deleteExchangeHistory(String credentialDid) → Future<void>
getAllConnections() → Map<dynamic, Connection>
Lists all connections.
getAllCredentials() → Map<dynamic, Credential>
Lists all credentials.
getAllIssuedCredentials() → Map<dynamic, Credential>
Returns all credentials one issued over time.
getBoxes() → Map<String, Box?>
getConfigEntry(String key) → String?
Returns the configuration Entry for key.
getConnection(String? did) → Connection?
Returns the connection associated with did.
getConversationEntry(String threadId) → DidcommConversation?
getCredential(String? did) → Credential?
Returns the credential associated with did.
getDid(String hdPath, [KeyType keyType = KeyType.secp256k1]) → Future<String>
Returns the DID associated with hdPath.
getExchangeHistoryEntriesForCredential(String credentialDid) → List<ExchangeHistoryEntry>?
Returns the Exchange History associated with a credential identified by credentialDid.
getIssuedCredential(String holderDid) → Credential?
Returns a credential one issued to holderDid.
getKeyAgreementKeyForDid(String did) → Future<String?>
getKeyAgreementKeyForDidAsJwk(String did) → Future<Map<String, dynamic>?>
getLastConnectionDid([KeyType keyType = KeyType.secp256k1]) → String?
getLastConnectionIndex([KeyType keyType = KeyType.secp256k1]) → int?
Returns the last value of the next HD-path for the connection keys.
getLastCredentialDid([KeyType keyType = KeyType.secp256k1]) → String?
getLastCredentialIndex([KeyType keyType = KeyType.secp256k1]) → int?
Returns the last value of the next HD-path for the credential keys.
getNextConnectionDID([KeyType keyType = KeyType.secp256k1]) → Future<String>
Returns a new connection-DID.
getNextCredentialDID([KeyType keyType = KeyType.secp256k1]) → Future<String>
Returns a new DID a credential could be issued for.
getPrivateKey(String hdPath, [KeyType keyType = KeyType.secp256k1]) → Future<String>
Returns the private key as hex-String associated with hdPath.
getPrivateKeyForConnectionDid(String did) → Future<String?>
Returns the private key as hex-String associated with did.
getPrivateKeyForConnectionDidAsJwk(String did) → Future<Map<String, dynamic>?>
getPrivateKeyForCredentialDid(String did) → Future<String?>
Returns the private key as hex-String associated with did.
getPrivateKeyForCredentialDidAsJwk(String did) → Future<Map<String, dynamic>?>
getPrivateKeyJwk(String hdPath, [KeyType keyType = KeyType.secp256k1]) → Future<Map<String, dynamic>>
getPublicKey(String hdPath, [KeyType keyType = KeyType.secp256k1]) → Future<String>
Returns the public key as hex-String associated with hdPath.
getStandardIssuerDid([KeyType keyType = KeyType.secp256k1]) → String?
Returns the DID for issuing credentials.
getStandardIssuerPrivateKey([KeyType keyType = KeyType.secp256k1]) → Future<String?>
Returns the private key for issuing credentials.
initialize({String? mnemonic, String network = 'mainnet'}) → Future<String?>
Initializes new hierarchical deterministic wallet or restores one from given mnemonic.
initializeIssuer([KeyType keyType = KeyType.secp256k1]) → Future<String>
Generates and returns DID for the issuer.
isInitialized() → bool
isWalletOpen() → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openBoxes([String? password]) → Future<bool>
Opens storage containers optional encrypted with password
storeConfigEntry(String key, String value) → Future<void>
Stores a configuration Entry.
storeConnection(String otherDid, String name, String? hdPath, {KeyType keyType = KeyType.secp256k1, String? comDid}) → Future<void>
Stores a Connection permanently.
storeConversationEntry(DidcommPlaintextMessage message, String myDid) → Future<void>
storeCredential(String? w3cCred, String? plaintextCred, String? hdPath, {KeyType keyType = KeyType.secp256k1, String? credDid}) → Future<void>
Stores a credential permanently.
storeExchangeHistoryEntry(String credentialDid, DateTime timestamp, String action, String otherParty, [List<String>? shownAttributes]) → Future<void>
Put a new Entry to Exchange history of a credential identified by credentialDid.
toIssuingHistory(String holderDid, String plaintextCredential, String w3cCredential) → void
Stores a credential issued to holderDid.
toString() → String
A string representation of this object.
inherited

Operators

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