java.lang.Object
com.hedera.hashgraph.sdk.LiveHash
A hash (presumably of some kind of credential or certificate), along with a
list of keys (each of which is either a primitive or a threshold key). Each
of them must reach its threshold when signing the transaction, to attach
this livehash to this account. At least one of them must reach its
threshold to delete this livehash from this account.
See Hedera Documentation
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AccountIdThe account to which the livehash is attachedfinal DurationThe duration for which the livehash will remain validfinal com.google.protobuf.ByteStringThe SHA-384 hash of a credential or certificatefinal KeyListA list of keys (primitive or threshold), all of which must sign to attach the livehash to an account, and any one of which can later delete it. -
Method Summary
Modifier and TypeMethodDescriptionstatic LiveHashfromBytes(byte[] bytes) Create a live hash from a byte array.protected static LiveHashfromProtobuf(LiveHash liveHash) Create a live hash from a protobuf.com.google.protobuf.ByteStringtoBytes()Extract the byte array.protected LiveHashConvert the live hash into a protobuf.toString()
-
Field Details
-
accountId
The account to which the livehash is attached -
hash
public final com.google.protobuf.ByteString hashThe SHA-384 hash of a credential or certificate -
keys
A list of keys (primitive or threshold), all of which must sign to attach the livehash to an account, and any one of which can later delete it. -
duration
The duration for which the livehash will remain valid
-
-
Method Details
-
fromProtobuf
Create a live hash from a protobuf.- Parameters:
liveHash- the protobuf- Returns:
- the new live hash
-
fromBytes
public static LiveHash fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException Create a live hash from a byte array.- Parameters:
bytes- the byte array- Returns:
- the new live hash
- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
toProtobuf
Convert the live hash into a protobuf.- Returns:
- the protobuf
-
toBytes
public com.google.protobuf.ByteString toBytes()Extract the byte array.- Returns:
- the byte array representation
-
toString
-