Added EIP-191 to the client

This commit is contained in:
Alexandre Paillier
2023-11-17 14:01:26 +01:00
parent 620167633b
commit 58ea0e5cab
2 changed files with 24 additions and 0 deletions

View File

@@ -224,3 +224,10 @@ class EthAppClient:
# skip APDU header & empty sig
sig = sign_data(Key.SET_PLUGIN, tmp[5:-1])
return self._send(self._cmd_builder.set_external_plugin(plugin_name, contract_address, method_selelector, sig))
def personal_sign(self, path: str, msg: bytes):
chunks = self._cmd_builder.personal_sign(path, msg)
for chunk in chunks[:-1]:
with self._send(chunk):
pass
return self._send(chunks[-1])