Class SignaturePair.Builder

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
  • Method Details

    • getSignatureCase

      public SignaturePair.SignatureCase getSignatureCase()
      Specified by:
      getSignatureCase in interface SignaturePairOrBuilder
    • clearSignature

      public SignaturePair.Builder 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:
      getPubKeyPrefix in interface SignaturePairOrBuilder
      Returns:
      The pubKeyPrefix.
    • setPubKeyPrefix

      public SignaturePair.Builder setPubKeyPrefix(com.google.protobuf.ByteString value)
       *
       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

      public SignaturePair.Builder 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:
      hasContract in interface SignaturePairOrBuilder
      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:
      getContract in interface SignaturePairOrBuilder
      Returns:
      The contract.
    • setContract

      public SignaturePair.Builder setContract(com.google.protobuf.ByteString value)
       *
       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

      public SignaturePair.Builder 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:
      hasEd25519 in interface SignaturePairOrBuilder
      Returns:
      Whether the ed25519 field is set.
    • getEd25519

      public com.google.protobuf.ByteString getEd25519()
       *
       An Ed25519 signature.
       
      bytes ed25519 = 3;
      Specified by:
      getEd25519 in interface SignaturePairOrBuilder
      Returns:
      The ed25519.
    • setEd25519

      public SignaturePair.Builder setEd25519(com.google.protobuf.ByteString value)
       *
       An Ed25519 signature.
       
      bytes ed25519 = 3;
      Parameters:
      value - The ed25519 to set.
      Returns:
      This builder for chaining.
    • clearEd25519

      public SignaturePair.Builder clearEd25519()
       *
       An Ed25519 signature.
       
      bytes ed25519 = 3;
      Returns:
      This builder for chaining.
    • hasRSA3072

      @Deprecated public boolean 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:
      hasRSA3072 in interface SignaturePairOrBuilder
      Returns:
      Whether the rSA3072 field is set.
    • getRSA3072

      @Deprecated public com.google.protobuf.ByteString 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:
      getRSA3072 in interface SignaturePairOrBuilder
      Returns:
      The rSA3072.
    • setRSA3072

      @Deprecated public SignaturePair.Builder setRSA3072(com.google.protobuf.ByteString value)
      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 public SignaturePair.Builder 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 public boolean 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:
      hasECDSA384 in interface SignaturePairOrBuilder
      Returns:
      Whether the eCDSA384 field is set.
    • getECDSA384

      @Deprecated public com.google.protobuf.ByteString 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:
      getECDSA384 in interface SignaturePairOrBuilder
      Returns:
      The eCDSA384.
    • setECDSA384

      @Deprecated public SignaturePair.Builder setECDSA384(com.google.protobuf.ByteString value)
      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 public SignaturePair.Builder 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:
      hasECDSASecp256K1 in interface SignaturePairOrBuilder
      Returns:
      Whether the eCDSASecp256k1 field is set.
    • getECDSASecp256K1

      public com.google.protobuf.ByteString getECDSASecp256K1()
       *
       An ECDSA(secp256k1) signature.
       
      bytes ECDSA_secp256k1 = 6;
      Specified by:
      getECDSASecp256K1 in interface SignaturePairOrBuilder
      Returns:
      The eCDSASecp256k1.
    • setECDSASecp256K1

      public SignaturePair.Builder setECDSASecp256K1(com.google.protobuf.ByteString value)
       *
       An ECDSA(secp256k1) signature.
       
      bytes ECDSA_secp256k1 = 6;
      Parameters:
      value - The eCDSASecp256k1 to set.
      Returns:
      This builder for chaining.
    • clearECDSASecp256K1

      public SignaturePair.Builder clearECDSASecp256K1()
       *
       An ECDSA(secp256k1) signature.
       
      bytes ECDSA_secp256k1 = 6;
      Returns:
      This builder for chaining.