Class ThresholdKey.Builder

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 Type
    Method
    Description
    * 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.
    * 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.
    boolean
    * 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, mergeFrom

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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:
      getThreshold in interface ThresholdKeyOrBuilder
      Returns:
      The threshold.
    • setThreshold

      public ThresholdKey.Builder 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.
       
      uint32 threshold = 1;
      Parameters:
      value - The threshold to set.
      Returns:
      This builder for chaining.
    • clearThreshold

      public ThresholdKey.Builder 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:
      hasKeys in interface ThresholdKeyOrBuilder
      Returns:
      Whether the keys field is set.
    • getKeys

      public KeyList getKeys()
       *
       A list of the keys that MAY satisfy signature requirements of this key.
       
      .proto.KeyList keys = 2;
      Specified by:
      getKeys in interface ThresholdKeyOrBuilder
      Returns:
      The keys.
    • setKeys

      public ThresholdKey.Builder setKeys(KeyList value)
       *
       A list of the keys that MAY satisfy signature requirements of this key.
       
      .proto.KeyList keys = 2;
    • setKeys

      public ThresholdKey.Builder setKeys(KeyList.Builder builderForValue)
       *
       A list of the keys that MAY satisfy signature requirements of this key.
       
      .proto.KeyList keys = 2;
    • mergeKeys

      public ThresholdKey.Builder mergeKeys(KeyList value)
       *
       A list of the keys that MAY satisfy signature requirements of this key.
       
      .proto.KeyList keys = 2;
    • clearKeys

      public ThresholdKey.Builder clearKeys()
       *
       A list of the keys that MAY satisfy signature requirements of this key.
       
      .proto.KeyList keys = 2;