Package i5.las2peer.registry
Class SignatureUtils
java.lang.Object
i5.las2peer.registry.SignatureUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
signFunctionCall
(org.web3j.abi.datatypes.Function functionCall, org.web3j.crypto.Credentials credentials) Returns signature of encoded Ethereum function call.
-
Constructor Details
-
SignatureUtils
public SignatureUtils()
-
-
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 argumentscredentials
- credentials with key pair used for signing- Returns:
- signature as a single byte array, as used for ECRecover
- See Also:
-