java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<ThresholdKey,ThresholdKey.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<ThresholdKey,ThresholdKey.Builder>
com.hedera.hashgraph.sdk.proto.ThresholdKey.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,ThresholdKeyOrBuilder,Cloneable
- Enclosing class:
ThresholdKey
public static final class ThresholdKey.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<ThresholdKey,ThresholdKey.Builder>
implements ThresholdKeyOrBuilder
* A threshold value and a list of public keys that, together, form a threshold signature requirement. Any subset of the keys in the list may satisfy the signature requirements of this type of key, provided the number of keys meets or exceeds the threshold. For example, if a particular key has a threshold of three(3) and eight(8) keys in the list, then any three(3) signatures, from the list of eight(8), is sufficient to authorize that key. For threshold purposes, all signatures from a single `primitive` key are considered a single signature, so that signature(s) from a single key SHALL NOT _directly_ meet a threshold greater than one(1). #### Note > It is possible to construct a complex key structure that _would_ enable a > single primitive key to successfully meet a threshold requirement. All > threshold keys SHOULD be carefully audited to ensure no one `primitive` > key, or smart contract, has disproportionate capability.Protobuf type
proto.ThresholdKey-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescription* A list of the keys that MAY satisfy signature requirements of this key.* A transaction MUST have valid signatures from at least this number of separate keys, from the `keys` list to be authorized by this key.getKeys()* A list of the keys that MAY satisfy signature requirements of this key.int* A transaction MUST have valid signatures from at least this number of separate keys, from the `keys` list to be authorized by this key.booleanhasKeys()* A list of the keys that MAY satisfy signature requirements of this key.* A list of the keys that MAY satisfy signature requirements of this key.* A list of the keys that MAY satisfy signature requirements of this key.setKeys(KeyList.Builder builderForValue) * A list of the keys that MAY satisfy signature requirements of this key.setThreshold(int value) * A transaction MUST have valid signatures from at least this number of separate keys, from the `keys` list to be authorized by this key.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getThreshold
public int getThreshold()* A transaction MUST have valid signatures from at least this number of separate keys, from the `keys` list to be authorized by this key.
uint32 threshold = 1;- Specified by:
getThresholdin interfaceThresholdKeyOrBuilder- Returns:
- The threshold.
-
setThreshold
* A transaction MUST have valid signatures from at least this number of separate keys, from the `keys` list to be authorized by this key.
uint32 threshold = 1;- Parameters:
value- The threshold to set.- Returns:
- This builder for chaining.
-
clearThreshold
* A transaction MUST have valid signatures from at least this number of separate keys, from the `keys` list to be authorized by this key.
uint32 threshold = 1;- Returns:
- This builder for chaining.
-
hasKeys
public boolean hasKeys()* A list of the keys that MAY satisfy signature requirements of this key.
.proto.KeyList keys = 2;- Specified by:
hasKeysin interfaceThresholdKeyOrBuilder- Returns:
- Whether the keys field is set.
-
getKeys
* A list of the keys that MAY satisfy signature requirements of this key.
.proto.KeyList keys = 2;- Specified by:
getKeysin interfaceThresholdKeyOrBuilder- Returns:
- The keys.
-
setKeys
* A list of the keys that MAY satisfy signature requirements of this key.
.proto.KeyList keys = 2; -
setKeys
* A list of the keys that MAY satisfy signature requirements of this key.
.proto.KeyList keys = 2; -
mergeKeys
* A list of the keys that MAY satisfy signature requirements of this key.
.proto.KeyList keys = 2; -
clearKeys
* A list of the keys that MAY satisfy signature requirements of this key.
.proto.KeyList keys = 2;
-