diff options
Diffstat (limited to 'tests/functional_tests/test_framework/wallet.py')
-rw-r--r-- | tests/functional_tests/test_framework/wallet.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/functional_tests/test_framework/wallet.py b/tests/functional_tests/test_framework/wallet.py index 270c95f82..340eed179 100644 --- a/tests/functional_tests/test_framework/wallet.py +++ b/tests/functional_tests/test_framework/wallet.py @@ -482,3 +482,27 @@ class Wallet(object): 'id': '0' } return self.rpc.send_json_rpc_request(get_tx_key) + + def sign(self, data): + sign = { + 'method': 'sign', + 'params' : { + 'data': data, + }, + 'jsonrpc': '2.0', + 'id': '0' + } + return self.rpc.send_json_rpc_request(sign) + + def verify(self, data, address, signature): + verify = { + 'method': 'verify', + 'params' : { + 'data': data, + 'address': address, + 'signature': signature, + }, + 'jsonrpc': '2.0', + 'id': '0' + } + return self.rpc.send_json_rpc_request(verify) |