Add sign msg method
This commit is contained in:
@@ -38,3 +38,12 @@ class ReferenceSigner(Signer):
|
||||
tx.r = z[:32]
|
||||
tx.s = z[32:64]
|
||||
return z
|
||||
|
||||
|
||||
def signEthereumMessage(self, address, message, password=None):
|
||||
#msg = b'\x19Ethereum Signed Message:\n{}{}'.format(len(message), message)
|
||||
k = keys.PrivateKey(self.keyGetter.get(address, password))
|
||||
#z = keys.ecdsa_sign(message_hash=g, private_key=k)
|
||||
z = k.sign_msg(message.encode('utf-8'))
|
||||
return z
|
||||
|
||||
|
||||
Reference in New Issue
Block a user