java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<LedgerId,LedgerId.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<LedgerId,LedgerId.Builder>
com.hedera.hashgraph.sdk.proto.LedgerId.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,LedgerIdOrBuilder,Cloneable
- Enclosing class:
LedgerId
public static final class LedgerId.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<LedgerId,LedgerId.Builder>
implements LedgerIdOrBuilder
* A ledger identifier.<br/> This message identifies a ledger and is used to verify ledger signatures in a Threshold Signature Scheme (TSS). A ledger identifier SHALL be a public key defined according to the TSS process.<br/> A ledger identifier SHOULD NOT change, but MAY do so in rare circumstances.<br/> Clients SHOULD always check for the correct ledger identifier, according to the network roster, before attempting to verify any state proof or other ledger signature. ### Block Stream Effects Every block in the Block Stream `BlockProof` SHALL be signed via TSS and MUST be verified with the ledger identifier current at the _start_ of that block. If the ledger identifier changes, the new value MUST be used to validate Block Proof items after the change. A change to the ledger identifier SHALL be reported in a State Change for the block containing that change, which SHALL be verified with the _prior_ ledger identifier.Protobuf type
com.hedera.hapi.node.state.roster.LedgerId-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescription* A public key.<br/> This key both identifies the ledger and can be used to verify ledger signatures.* A signature from the prior ledger key.<br/> This signature is the _previous_ ledger ID signing _this_ ledger ID.<br/> This value MAY be unset, if there is no prior ledger ID.<br/> This value SHOULD be set if a prior ledger ID exists to generate the signature.* The signatures from nodes in the active roster signing the new ledger id.<br/> These signatures establish a chain of trust from the network to the new ledger id.* A round number.<br/> This identifies when this ledger id becomes active.<br/> This value is REQUIRED.com.google.protobuf.ByteString* A public key.<br/> This key both identifies the ledger and can be used to verify ledger signatures.com.google.protobuf.ByteString* A signature from the prior ledger key.<br/> This signature is the _previous_ ledger ID signing _this_ ledger ID.<br/> This value MAY be unset, if there is no prior ledger ID.<br/> This value SHOULD be set if a prior ledger ID exists to generate the signature.* The signatures from nodes in the active roster signing the new ledger id.<br/> These signatures establish a chain of trust from the network to the new ledger id.longgetRound()* A round number.<br/> This identifies when this ledger id becomes active.<br/> This value is REQUIRED.boolean* The signatures from nodes in the active roster signing the new ledger id.<br/> These signatures establish a chain of trust from the network to the new ledger id.* The signatures from nodes in the active roster signing the new ledger id.<br/> These signatures establish a chain of trust from the network to the new ledger id.setLedgerId(com.google.protobuf.ByteString value) * A public key.<br/> This key both identifies the ledger and can be used to verify ledger signatures.setLedgerSignature(com.google.protobuf.ByteString value) * A signature from the prior ledger key.<br/> This signature is the _previous_ ledger ID signing _this_ ledger ID.<br/> This value MAY be unset, if there is no prior ledger ID.<br/> This value SHOULD be set if a prior ledger ID exists to generate the signature.* The signatures from nodes in the active roster signing the new ledger id.<br/> These signatures establish a chain of trust from the network to the new ledger id.setRosterSignatures(RosterSignatures.Builder builderForValue) * The signatures from nodes in the active roster signing the new ledger id.<br/> These signatures establish a chain of trust from the network to the new ledger id.setRound(long value) * A round number.<br/> This identifies when this ledger id becomes active.<br/> This value is REQUIRED.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
-
getLedgerId
public com.google.protobuf.ByteString getLedgerId()* A public key.<br/> This key both identifies the ledger and can be used to verify ledger signatures. <p> This value MUST be set.<br/> This value MUST NOT be empty.<br/> This value MUST contain a valid public key.
bytes ledger_id = 1;- Specified by:
getLedgerIdin interfaceLedgerIdOrBuilder- Returns:
- The ledgerId.
-
setLedgerId
* A public key.<br/> This key both identifies the ledger and can be used to verify ledger signatures. <p> This value MUST be set.<br/> This value MUST NOT be empty.<br/> This value MUST contain a valid public key.
bytes ledger_id = 1;- Parameters:
value- The ledgerId to set.- Returns:
- This builder for chaining.
-
clearLedgerId
* A public key.<br/> This key both identifies the ledger and can be used to verify ledger signatures. <p> This value MUST be set.<br/> This value MUST NOT be empty.<br/> This value MUST contain a valid public key.
bytes ledger_id = 1;- Returns:
- This builder for chaining.
-
getRound
public long getRound()* A round number.<br/> This identifies when this ledger id becomes active.<br/> This value is REQUIRED.
uint64 round = 2;- Specified by:
getRoundin interfaceLedgerIdOrBuilder- Returns:
- The round.
-
setRound
* A round number.<br/> This identifies when this ledger id becomes active.<br/> This value is REQUIRED.
uint64 round = 2;- Parameters:
value- The round to set.- Returns:
- This builder for chaining.
-
clearRound
* A round number.<br/> This identifies when this ledger id becomes active.<br/> This value is REQUIRED.
uint64 round = 2;- Returns:
- This builder for chaining.
-
getLedgerSignature
public com.google.protobuf.ByteString getLedgerSignature()* A signature from the prior ledger key.<br/> This signature is the _previous_ ledger ID signing _this_ ledger ID.<br/> This value MAY be unset, if there is no prior ledger ID.<br/> This value SHOULD be set if a prior ledger ID exists to generate the signature.
bytes ledger_signature = 3;- Specified by:
getLedgerSignaturein interfaceLedgerIdOrBuilder- Returns:
- The ledgerSignature.
-
setLedgerSignature
* A signature from the prior ledger key.<br/> This signature is the _previous_ ledger ID signing _this_ ledger ID.<br/> This value MAY be unset, if there is no prior ledger ID.<br/> This value SHOULD be set if a prior ledger ID exists to generate the signature.
bytes ledger_signature = 3;- Parameters:
value- The ledgerSignature to set.- Returns:
- This builder for chaining.
-
clearLedgerSignature
* A signature from the prior ledger key.<br/> This signature is the _previous_ ledger ID signing _this_ ledger ID.<br/> This value MAY be unset, if there is no prior ledger ID.<br/> This value SHOULD be set if a prior ledger ID exists to generate the signature.
bytes ledger_signature = 3;- Returns:
- This builder for chaining.
-
hasRosterSignatures
public boolean hasRosterSignatures()* The signatures from nodes in the active roster signing the new ledger id.<br/> These signatures establish a chain of trust from the network to the new ledger id. <p> This value MUST be present when the ledger signature of a previous ledger id is absent.
.com.hedera.hapi.node.state.roster.RosterSignatures roster_signatures = 4;- Specified by:
hasRosterSignaturesin interfaceLedgerIdOrBuilder- Returns:
- Whether the rosterSignatures field is set.
-
getRosterSignatures
* The signatures from nodes in the active roster signing the new ledger id.<br/> These signatures establish a chain of trust from the network to the new ledger id. <p> This value MUST be present when the ledger signature of a previous ledger id is absent.
.com.hedera.hapi.node.state.roster.RosterSignatures roster_signatures = 4;- Specified by:
getRosterSignaturesin interfaceLedgerIdOrBuilder- Returns:
- The rosterSignatures.
-
setRosterSignatures
* The signatures from nodes in the active roster signing the new ledger id.<br/> These signatures establish a chain of trust from the network to the new ledger id. <p> This value MUST be present when the ledger signature of a previous ledger id is absent.
.com.hedera.hapi.node.state.roster.RosterSignatures roster_signatures = 4; -
setRosterSignatures
* The signatures from nodes in the active roster signing the new ledger id.<br/> These signatures establish a chain of trust from the network to the new ledger id. <p> This value MUST be present when the ledger signature of a previous ledger id is absent.
.com.hedera.hapi.node.state.roster.RosterSignatures roster_signatures = 4; -
mergeRosterSignatures
* The signatures from nodes in the active roster signing the new ledger id.<br/> These signatures establish a chain of trust from the network to the new ledger id. <p> This value MUST be present when the ledger signature of a previous ledger id is absent.
.com.hedera.hapi.node.state.roster.RosterSignatures roster_signatures = 4; -
clearRosterSignatures
* The signatures from nodes in the active roster signing the new ledger id.<br/> These signatures establish a chain of trust from the network to the new ledger id. <p> This value MUST be present when the ledger signature of a previous ledger id is absent.
.com.hedera.hapi.node.state.roster.RosterSignatures roster_signatures = 4;
-