Package org.web3j.crypto
Class StructuredDataEncoder
java.lang.Object
org.web3j.crypto.StructuredDataEncoder
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic com.fasterxml.jackson.databind.ObjectMapper -
Constructor Summary
ConstructorsConstructorDescriptionStructuredDataEncoder(String jsonMessageInString) StructuredDataEncoder(StructuredData.EIP712Message jsonMessageObject) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]encodeData(String primaryType, HashMap<String, Object> data) encodeStruct(String structName) encodeType(String primaryType) getArrayDimensionsFromDeclaration(String declaration) getDependencies(String primaryType) List<org.web3j.crypto.Pair>getDepthsAndDimensions(Object data, int depth) byte[]byte[]byte[]hashMessage(String primaryType, HashMap<String, Object> data) byte[]parseJSONMessage(String jsonMessageInString) byte[]voidvalidateStructuredData(StructuredData.EIP712Message jsonMessageObject)
-
Field Details
-
mapper
public static com.fasterxml.jackson.databind.ObjectMapper mapper -
jsonMessageObject
-
-
Constructor Details
-
StructuredDataEncoder
-
StructuredDataEncoder
- Throws:
IOExceptionRuntimeException
-
-
Method Details
-
getDependencies
-
encodeStruct
-
encodeType
-
typeHash
-
getArrayDimensionsFromDeclaration
-
getDepthsAndDimensions
-
getArrayDimensionsFromData
- Throws:
RuntimeException
-
flattenMultidimensionalArray
-
encodeData
- Throws:
RuntimeException
-
hashMessage
- Throws:
RuntimeException
-
hashDomain
- Throws:
RuntimeException
-
validateStructuredData
public void validateStructuredData(StructuredData.EIP712Message jsonMessageObject) throws RuntimeException - Throws:
RuntimeException
-
parseJSONMessage
public StructuredData.EIP712Message parseJSONMessage(String jsonMessageInString) throws IOException, RuntimeException - Throws:
IOExceptionRuntimeException
-
getStructuredData
- Throws:
RuntimeException
-
hashStructuredData
- Throws:
RuntimeException
-