java.lang.Object
io.hotmoka.crypto.internal.EntropyImpl
io.hotmoka.crypto.internal.AbstractAccountImpl<R>
- All Implemented Interfaces:
io.hotmoka.crypto.api.Account<StorageReference>,io.hotmoka.crypto.api.Entropy,Comparable<io.hotmoka.crypto.api.Entropy>
The information to control an account of a Hotmoka node.
One needs the entropy from which the key pair can be reconstructed and
the storage reference of the account in the store of the node.
-
Field Summary
Fields inherited from class io.hotmoka.crypto.internal.AbstractAccountImpl
reference -
Constructor Summary
ConstructorsConstructorDescriptionAccount(StorageReference reference) Creates the information to control an account in a Hotmoka node.Account(StorageReference reference, String dir) Creates the information to control an account in a Hotmoka node.Account(io.hotmoka.crypto.api.Entropy entropy, byte[] reference) Creates the information to control an account in a Hotmoka node, from its entropy and from the byte representation of its storage reference.Account(io.hotmoka.crypto.api.Entropy entropy, StorageReference reference) Creates the information to control an account.Creates the information to control an account in a Hotmoka node.Creates the information to control an account in a Hotmoka node. -
Method Summary
Methods inherited from class io.hotmoka.crypto.internal.AbstractAccountImpl
bip39Words, bip39Words, delete, dump, dump, equals, getReference, hashCode, toStringMethods inherited from class io.hotmoka.crypto.internal.EntropyImpl
delete, dump, dump, getEntropy, keys, lengthMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.hotmoka.crypto.api.Entropy
delete, dump, dump, getEntropy, keys, length
-
Constructor Details
-
Account
Creates the information to control an account.- Parameters:
entropy- the entropy, from which the key pair can be derivedreference- the reference to the account. This is limited to have 0 as progressive, in order to reduce the information needed to represent an account as BIP39 words
-
Account
Creates the information to control an account in a Hotmoka node. The entropy of the account is recovered from its PEM file.- Parameters:
reference- the reference to the account. This is limited to have 0 as progressive, in order to reduce the information needed to represent an account as BIP39 words- Throws:
IOException- if the PEM file cannot be read
-
Account
Creates the information to control an account in a Hotmoka node. The entropy of the account is recovered from its PEM file.- Parameters:
reference- the reference to the account. This is limited to have 0 as progressive, in order to reduce the information needed to represent an account as BIP39 wordsdir- the directory where the PEM file must be looked for- Throws:
IOException- if the PEM file cannot be read
-
Account
Creates the information to control an account in a Hotmoka node. The entropy of the account is recovered from its PEM file.- Parameters:
reference- the reference to the account, as a string. This is limited to have 0 as progressive, in order to reduce the information needed to represent an account as BIP39 words- Throws:
IOException- if the PEM file cannot be read
-
Account
Creates the information to control an account in a Hotmoka node. The entropy of the account is recovered from its PEM file.- Parameters:
reference- the reference to the account, as a string. This is limited to have 0 as progressive, in order to reduce the information needed to represent an account as BIP39 wordsdir- the directory where the PEM file must be looked for- Throws:
IOException- if the PEM file cannot be read
-
Account
public Account(io.hotmoka.crypto.api.Entropy entropy, byte[] reference) Creates the information to control an account in a Hotmoka node, from its entropy and from the byte representation of its storage reference.- Parameters:
entropy- the entropyreference- the byte representation of the reference
-
-
Method Details
-
compareTo
public int compareTo(io.hotmoka.crypto.api.Entropy other) - Specified by:
compareToin interfaceComparable<io.hotmoka.crypto.api.Entropy>- Overrides:
compareToin classio.hotmoka.crypto.internal.EntropyImpl
-
getReferenceAsBytes
public byte[] getReferenceAsBytes()
-