java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<SignaturePair,SignaturePair.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<SignaturePair,SignaturePair.Builder>
com.hedera.hashgraph.sdk.proto.SignaturePair.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,SignaturePairOrBuilder,Cloneable
- Enclosing class:
SignaturePair
public static final class SignaturePair.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<SignaturePair,SignaturePair.Builder>
implements SignaturePairOrBuilder
* A public key and signature pair.<br/> Only Ed25519 and ECDSA(secp256k1) keys and signatures are currently supported as cryptographic (non-implied) signatures.Protobuf type
proto.SignaturePair-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescription* A smart contract virtual signature.Deprecated.proto.SignaturePair.ECDSA_384 is deprecated.* An ECDSA(secp256k1) signature.* An Ed25519 signature.* Prefix bytes of the public key.Deprecated.proto.SignaturePair.RSA_3072 is deprecated.com.google.protobuf.ByteString* A smart contract virtual signature.com.google.protobuf.ByteStringDeprecated.proto.SignaturePair.ECDSA_384 is deprecated.com.google.protobuf.ByteString* An ECDSA(secp256k1) signature.com.google.protobuf.ByteString* An Ed25519 signature.com.google.protobuf.ByteString* Prefix bytes of the public key.com.google.protobuf.ByteStringDeprecated.proto.SignaturePair.RSA_3072 is deprecated.boolean* A smart contract virtual signature.booleanDeprecated.proto.SignaturePair.ECDSA_384 is deprecated.boolean* An ECDSA(secp256k1) signature.boolean* An Ed25519 signature.booleanDeprecated.proto.SignaturePair.RSA_3072 is deprecated.setContract(com.google.protobuf.ByteString value) * A smart contract virtual signature.setECDSA384(com.google.protobuf.ByteString value) Deprecated.proto.SignaturePair.ECDSA_384 is deprecated.setECDSASecp256K1(com.google.protobuf.ByteString value) * An ECDSA(secp256k1) signature.setEd25519(com.google.protobuf.ByteString value) * An Ed25519 signature.setPubKeyPrefix(com.google.protobuf.ByteString value) * Prefix bytes of the public key.setRSA3072(com.google.protobuf.ByteString value) Deprecated.proto.SignaturePair.RSA_3072 is deprecated.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
-
getSignatureCase
- Specified by:
getSignatureCasein interfaceSignaturePairOrBuilder
-
clearSignature
-
getPubKeyPrefix
public com.google.protobuf.ByteString getPubKeyPrefix()* Prefix bytes of the public key. <p> The client may use any number of bytes from zero to the whole length of the public key for pubKeyPrefix. If zero bytes are used, then it MUST be true that only one cryptographic key is required to sign the associated transaction.<br/> If the `pubKeyPrefix` is 0 bytes and more than a single cryptographic key is required to sign the transaction, the request SHALL resolve to `INVALID_SIGNATURE`. <blockquote>Important Note<blockquote> In the special case that a signature is provided to authorize a precompiled contract, the `pubKeyPrefix` MUST contain the _entire public key_.<br/> That is, if the key is an Ed25519 key, the `pubKeyPrefix` MUST be 32 bytes long and contain the full public key bytes.<br/> If the key is an ECDSA(secp256k1) key, the `pubKeyPrefix` MUST be 33 bytes long and contain the full _compressed_ form of the public key. </blockquote></blockquote> <p> <dl><dt>Purpose</dt> <dd>The `pubKeyPrefix` exists to save cost. A signed transaction with shorter prefixes will have fewer bytes, and so will have a lower transaction fee. The prefixes, however, MUST be long enough to distinguish between all of the public keys that might be signing the transaction. Therefore, software signing a transaction SHOULD evaluate which keys might possibly be required to sign a transaction, and ensure that the shortest prefix that is sufficient to unambiguously identify the correct key is used. </dd></dl>
bytes pubKeyPrefix = 1;- Specified by:
getPubKeyPrefixin interfaceSignaturePairOrBuilder- Returns:
- The pubKeyPrefix.
-
setPubKeyPrefix
* Prefix bytes of the public key. <p> The client may use any number of bytes from zero to the whole length of the public key for pubKeyPrefix. If zero bytes are used, then it MUST be true that only one cryptographic key is required to sign the associated transaction.<br/> If the `pubKeyPrefix` is 0 bytes and more than a single cryptographic key is required to sign the transaction, the request SHALL resolve to `INVALID_SIGNATURE`. <blockquote>Important Note<blockquote> In the special case that a signature is provided to authorize a precompiled contract, the `pubKeyPrefix` MUST contain the _entire public key_.<br/> That is, if the key is an Ed25519 key, the `pubKeyPrefix` MUST be 32 bytes long and contain the full public key bytes.<br/> If the key is an ECDSA(secp256k1) key, the `pubKeyPrefix` MUST be 33 bytes long and contain the full _compressed_ form of the public key. </blockquote></blockquote> <p> <dl><dt>Purpose</dt> <dd>The `pubKeyPrefix` exists to save cost. A signed transaction with shorter prefixes will have fewer bytes, and so will have a lower transaction fee. The prefixes, however, MUST be long enough to distinguish between all of the public keys that might be signing the transaction. Therefore, software signing a transaction SHOULD evaluate which keys might possibly be required to sign a transaction, and ensure that the shortest prefix that is sufficient to unambiguously identify the correct key is used. </dd></dl>
bytes pubKeyPrefix = 1;- Parameters:
value- The pubKeyPrefix to set.- Returns:
- This builder for chaining.
-
clearPubKeyPrefix
* Prefix bytes of the public key. <p> The client may use any number of bytes from zero to the whole length of the public key for pubKeyPrefix. If zero bytes are used, then it MUST be true that only one cryptographic key is required to sign the associated transaction.<br/> If the `pubKeyPrefix` is 0 bytes and more than a single cryptographic key is required to sign the transaction, the request SHALL resolve to `INVALID_SIGNATURE`. <blockquote>Important Note<blockquote> In the special case that a signature is provided to authorize a precompiled contract, the `pubKeyPrefix` MUST contain the _entire public key_.<br/> That is, if the key is an Ed25519 key, the `pubKeyPrefix` MUST be 32 bytes long and contain the full public key bytes.<br/> If the key is an ECDSA(secp256k1) key, the `pubKeyPrefix` MUST be 33 bytes long and contain the full _compressed_ form of the public key. </blockquote></blockquote> <p> <dl><dt>Purpose</dt> <dd>The `pubKeyPrefix` exists to save cost. A signed transaction with shorter prefixes will have fewer bytes, and so will have a lower transaction fee. The prefixes, however, MUST be long enough to distinguish between all of the public keys that might be signing the transaction. Therefore, software signing a transaction SHOULD evaluate which keys might possibly be required to sign a transaction, and ensure that the shortest prefix that is sufficient to unambiguously identify the correct key is used. </dd></dl>
bytes pubKeyPrefix = 1;- Returns:
- This builder for chaining.
-
hasContract
public boolean hasContract()* A smart contract virtual signature. <p> This value MUST be length zero, if set.
bytes contract = 2;- Specified by:
hasContractin interfaceSignaturePairOrBuilder- Returns:
- Whether the contract field is set.
-
getContract
public com.google.protobuf.ByteString getContract()* A smart contract virtual signature. <p> This value MUST be length zero, if set.
bytes contract = 2;- Specified by:
getContractin interfaceSignaturePairOrBuilder- Returns:
- The contract.
-
setContract
* A smart contract virtual signature. <p> This value MUST be length zero, if set.
bytes contract = 2;- Parameters:
value- The contract to set.- Returns:
- This builder for chaining.
-
clearContract
* A smart contract virtual signature. <p> This value MUST be length zero, if set.
bytes contract = 2;- Returns:
- This builder for chaining.
-
hasEd25519
public boolean hasEd25519()* An Ed25519 signature.
bytes ed25519 = 3;- Specified by:
hasEd25519in interfaceSignaturePairOrBuilder- Returns:
- Whether the ed25519 field is set.
-
getEd25519
public com.google.protobuf.ByteString getEd25519()* An Ed25519 signature.
bytes ed25519 = 3;- Specified by:
getEd25519in interfaceSignaturePairOrBuilder- Returns:
- The ed25519.
-
setEd25519
* An Ed25519 signature.
bytes ed25519 = 3;- Parameters:
value- The ed25519 to set.- Returns:
- This builder for chaining.
-
clearEd25519
* An Ed25519 signature.
bytes ed25519 = 3;- Returns:
- This builder for chaining.
-
hasRSA3072
Deprecated.proto.SignaturePair.RSA_3072 is deprecated. See basic_types.proto;l=1304* This option is not supported.<br/> A RSA-3072 signature.
bytes RSA_3072 = 4 [deprecated = true];- Specified by:
hasRSA3072in interfaceSignaturePairOrBuilder- Returns:
- Whether the rSA3072 field is set.
-
getRSA3072
Deprecated.proto.SignaturePair.RSA_3072 is deprecated. See basic_types.proto;l=1304* This option is not supported.<br/> A RSA-3072 signature.
bytes RSA_3072 = 4 [deprecated = true];- Specified by:
getRSA3072in interfaceSignaturePairOrBuilder- Returns:
- The rSA3072.
-
setRSA3072
Deprecated.proto.SignaturePair.RSA_3072 is deprecated. See basic_types.proto;l=1304* This option is not supported.<br/> A RSA-3072 signature.
bytes RSA_3072 = 4 [deprecated = true];- Parameters:
value- The rSA3072 to set.- Returns:
- This builder for chaining.
-
clearRSA3072
Deprecated.proto.SignaturePair.RSA_3072 is deprecated. See basic_types.proto;l=1304* This option is not supported.<br/> A RSA-3072 signature.
bytes RSA_3072 = 4 [deprecated = true];- Returns:
- This builder for chaining.
-
hasECDSA384
Deprecated.proto.SignaturePair.ECDSA_384 is deprecated. See basic_types.proto;l=1310* This option is not supported.<br/> ECDSA p-384 signature.
bytes ECDSA_384 = 5 [deprecated = true];- Specified by:
hasECDSA384in interfaceSignaturePairOrBuilder- Returns:
- Whether the eCDSA384 field is set.
-
getECDSA384
Deprecated.proto.SignaturePair.ECDSA_384 is deprecated. See basic_types.proto;l=1310* This option is not supported.<br/> ECDSA p-384 signature.
bytes ECDSA_384 = 5 [deprecated = true];- Specified by:
getECDSA384in interfaceSignaturePairOrBuilder- Returns:
- The eCDSA384.
-
setECDSA384
Deprecated.proto.SignaturePair.ECDSA_384 is deprecated. See basic_types.proto;l=1310* This option is not supported.<br/> ECDSA p-384 signature.
bytes ECDSA_384 = 5 [deprecated = true];- Parameters:
value- The eCDSA384 to set.- Returns:
- This builder for chaining.
-
clearECDSA384
Deprecated.proto.SignaturePair.ECDSA_384 is deprecated. See basic_types.proto;l=1310* This option is not supported.<br/> ECDSA p-384 signature.
bytes ECDSA_384 = 5 [deprecated = true];- Returns:
- This builder for chaining.
-
hasECDSASecp256K1
public boolean hasECDSASecp256K1()* An ECDSA(secp256k1) signature.
bytes ECDSA_secp256k1 = 6;- Specified by:
hasECDSASecp256K1in interfaceSignaturePairOrBuilder- Returns:
- Whether the eCDSASecp256k1 field is set.
-
getECDSASecp256K1
public com.google.protobuf.ByteString getECDSASecp256K1()* An ECDSA(secp256k1) signature.
bytes ECDSA_secp256k1 = 6;- Specified by:
getECDSASecp256K1in interfaceSignaturePairOrBuilder- Returns:
- The eCDSASecp256k1.
-
setECDSASecp256K1
* An ECDSA(secp256k1) signature.
bytes ECDSA_secp256k1 = 6;- Parameters:
value- The eCDSASecp256k1 to set.- Returns:
- This builder for chaining.
-
clearECDSASecp256K1
* An ECDSA(secp256k1) signature.
bytes ECDSA_secp256k1 = 6;- Returns:
- This builder for chaining.
-