From 35dcd8c30646cdaaefc65ec98a677c7e7e6e3a3a Mon Sep 17 00:00:00 2001 From: Paul Berg Date: Sat, 29 Sep 2018 17:52:05 +0300 Subject: [PATCH] Updated the extapi changelog and addded indications in the README --- cmd/clef/README.md | 13 ++++++++----- cmd/clef/extapi_changelog.md | 11 +++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/cmd/clef/README.md b/cmd/clef/README.md index c9461be101..8fcaae7cb5 100644 --- a/cmd/clef/README.md +++ b/cmd/clef/README.md @@ -347,12 +347,13 @@ Bash example: ``` -### account_sign +### account_signData #### Sign data Signs a chunk of data and returns the calculated signature. #### Arguments + - content type [string]: type of data to sign - account [address]: account to sign with - data [data]: data to sign @@ -364,8 +365,9 @@ Bash example: { "id": 3, "jsonrpc": "2.0", - "method": "account_sign", + "method": "account_signData", "params": [ + "data/plain", "0x1923f626bb8dc025849e00f99c25fe2b2f7fb0db", "0xaabbccdd" ] @@ -383,10 +385,11 @@ Response ### account_ecRecover -#### Recover address +#### Sign data Derive the address from the account that was used to sign data from the data and signature. - + #### Arguments + - content type [string]: type of signed data - data [data]: data that was signed - signature [data]: the signature to verify @@ -400,6 +403,7 @@ Response "jsonrpc": "2.0", "method": "account_ecRecover", "params": [ + "data/plain", "0xaabbccdd", "0x5b6693f153b48ec1c706ba4169960386dbaa6903e249cc79a8e6ddc434451d417e1e57327872c7f538beeb323c300afa9999a3d4a5de6caf3be0d5ef832b67ef1c" ] @@ -413,7 +417,6 @@ Response "jsonrpc": "2.0", "result": "0x1923f626bb8dc025849e00f99c25fe2b2f7fb0db" } - ``` ### account_import diff --git a/cmd/clef/extapi_changelog.md b/cmd/clef/extapi_changelog.md index 6c2c3e8194..693e6b1759 100644 --- a/cmd/clef/extapi_changelog.md +++ b/cmd/clef/extapi_changelog.md @@ -1,10 +1,21 @@ ### Changelog for external API +#### 5.0.0 + +* The external `account_EcRecover`-method was added again. +* The external method `accounts_Sign(address, data)` was replaced with `accounts_signData(contentType, address, data)`. +The addition of `contentType` makes it possible to use the method for different types of objects, such as: + * signing data with an intended validator (not yet implemented) + * signing clique headers, + * signing plain personal messages, + * signing structured data adhering to [EIP-712](https://eips.ethereum.org/EIPS/eip-712) (not yet implemented) + #### 4.0.0 * The external `account_Ecrecover`-method was removed. * The external `account_Import`-method was removed. + #### 3.0.0 * The external `account_List`-method was changed to not expose `url`, which contained info about the local filesystem. It now returns only a list of addresses.