Class SignatureUtils

java.lang.Object
i5.las2peer.registry.SignatureUtils

public class SignatureUtils
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    SignatureUtils()  
  • Method Summary

    Modifier and Type Method Description
    static byte[] signFunctionCall​(org.web3j.abi.datatypes.Function functionCall, org.web3j.crypto.Credentials credentials)
    Returns signature of encoded Ethereum function call.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • signFunctionCall

      public static byte[] signFunctionCall​(org.web3j.abi.datatypes.Function functionCall, org.web3j.crypto.Credentials credentials)
      Returns signature of encoded Ethereum function call. The message is derived from the function selector (a.k.a. method ID) and the arguments. This is hashed. Then prefixed with an Ethereum specific prefix. Then hashed again. Then signed. (The last three steps happen in Web3J: Sign.signPrefixedMessage(byte[], ECKeyPair).)
      Parameters:
      functionCall - Ethereum contract function call representation, including arguments
      credentials - credentials with key pair used for signing
      Returns:
      signature as a single byte array, as used for ECRecover
      See Also:
      Encoding spec