The whole idea is heavily inspired by EIP-712. To get a signature needed to calculate hash(hash(domain), hash(aci), hash(data)).
hash function is blake2b.
domain is a record containing not required properties:
name as string,
version as integer,
networkId as string,
contractAddress
aci is part of a complete contract ACI. It defines a type of data to sign. For example, the ACI
corresponds to the data
domain and data are fate-encoded before hashing. aci is prepared for hashing according to .
— calculates signature, supported in AccountMemory and in aepp-wallet connection;
— calculates the overall hash of typed data to sign;
— deterministic hashing of an arbitrary JS value, used to calculate hash(aci);
{
"record": [
{ "name": "foo", "type": "string" },
{ "name": "bar", "type": "int" }
]
}{ "foo": "test", "bar": 42 }