github.com/daeglee/go-ethereum@v0.0.0-20190504220456-cad3e8d18e9b/cmd/clef/intapi_changelog.md (about) 1 ### Changelog for internal API (ui-api) 2 3 ### 6.0.0 4 5 Removed `password` from responses to operations which require them. This is for two reasons, 6 7 - Consistency between how rulesets operate and how manual processing works. A rule can `Approve` but require the actual password to be stored in the clef storage. 8 With this change, the same stored password can be used even if rulesets are not enabled, but storage is. 9 - It also removes the usability-shortcut that a UI might otherwise want to implement; remembering passwords. Since we now will not require the 10 password on every `Approve`, there's no need for the UI to cache it locally. 11 - In a future update, we'll likely add `clef_storePassword` to the internal API, so the user can store it via his UI (currently only CLI works). 12 13 Affected datatypes: 14 - `SignTxResponse` 15 - `SignDataResponse` 16 - `NewAccountResponse` 17 18 If `clef` requires a password, the `OnInputRequired` will be used to collect it. 19 20 21 ### 5.0.0 22 23 Changed the namespace format to adhere to the legacy ethereum format: `name_methodName`. Changes: 24 25 * `ApproveTx` -> `ui_approveTx` 26 * `ApproveSignData` -> `ui_approveSignData` 27 * `ApproveExport` -> `removed` 28 * `ApproveImport` -> `removed` 29 * `ApproveListing` -> `ui_approveListing` 30 * `ApproveNewAccount` -> `ui_approveNewAccount` 31 * `ShowError` -> `ui_showError` 32 * `ShowInfo` -> `ui_showInfo` 33 * `OnApprovedTx` -> `ui_onApprovedTx` 34 * `OnSignerStartup` -> `ui_onSignerStartup` 35 * `OnInputRequired` -> `ui_onInputRequired` 36 37 38 ### 4.0.0 39 40 * Bidirectional communication implemented, so the UI can query `clef` via the stdin/stdout RPC channel. Methods implemented are: 41 - `clef_listWallets` 42 - `clef_listAccounts` 43 - `clef_listWallets` 44 - `clef_deriveAccount` 45 - `clef_importRawKey` 46 - `clef_openWallet` 47 - `clef_chainId` 48 - `clef_setChainId` 49 - `clef_export` 50 - `clef_import` 51 52 * The type `Account` was modified (the json-field `type` was removed), to consist of 53 54 ```golang 55 type Account struct { 56 Address common.Address `json:"address"` // Ethereum account address derived from the key 57 URL URL `json:"url"` // Optional resource locator within a backend 58 } 59 ``` 60 61 62 ### 3.2.0 63 64 * Make `ShowError`, `OnApprovedTx`, `OnSignerStartup` be json-rpc [notifications](https://www.jsonrpc.org/specification#notification): 65 66 > A Notification is a Request object without an "id" member. A Request object that is a Notification signifies the Client's lack of interest in the corresponding Response object, and as such no Response object needs to be returned to the client. The Server MUST NOT reply to a Notification, including those that are within a batch request. 67 > 68 > Notifications are not confirmable by definition, since they do not have a Response object to be returned. As such, the Client would not be aware of any errors (like e.g. "Invalid params","Internal error" 69 ### 3.1.0 70 71 * Add `ContentType` `string` to `SignDataRequest` to accommodate the latest EIP-191 and EIP-712 implementations. 72 73 ### 3.0.0 74 75 * Make use of `OnInputRequired(info UserInputRequest)` for obtaining master password during startup 76 77 ### 2.1.0 78 79 * Add `OnInputRequired(info UserInputRequest)` to internal API. This method is used when Clef needs user input, e.g. passwords. 80 81 The following structures are used: 82 ```golang 83 UserInputRequest struct { 84 Prompt string `json:"prompt"` 85 Title string `json:"title"` 86 IsPassword bool `json:"isPassword"` 87 } 88 UserInputResponse struct { 89 Text string `json:"text"` 90 } 91 92 ### 2.0.0 93 94 * Modify how `call_info` on a transaction is conveyed. New format: 95 96 ``` 97 { 98 "jsonrpc": "2.0", 99 "id": 2, 100 "method": "ApproveTx", 101 "params": [ 102 { 103 "transaction": { 104 "from": "0x82A2A876D39022B3019932D30Cd9c97ad5616813", 105 "to": "0x07a565b7ed7d7a678680a4c162885bedbb695fe0", 106 "gas": "0x333", 107 "gasPrice": "0x123", 108 "value": "0x10", 109 "nonce": "0x0", 110 "data": "0x4401a6e40000000000000000000000000000000000000000000000000000000000000012", 111 "input": null 112 }, 113 "call_info": [ 114 { 115 "type": "WARNING", 116 "message": "Invalid checksum on to-address" 117 }, 118 { 119 "type": "WARNING", 120 "message": "Tx contains data, but provided ABI signature could not be matched: Did not match: test (0 matches)" 121 } 122 ], 123 "meta": { 124 "remote": "127.0.0.1:54286", 125 "local": "localhost:8550", 126 "scheme": "HTTP/1.1" 127 } 128 } 129 ] 130 } 131 ``` 132 133 #### 1.2.0 134 135 * Add `OnStartup` method, to provide the UI with information about what API version 136 the signer uses (both internal and external) aswell as build-info and external api. 137 138 Example call: 139 ```json 140 { 141 "jsonrpc": "2.0", 142 "id": 1, 143 "method": "OnSignerStartup", 144 "params": [ 145 { 146 "info": { 147 "extapi_http": "http://localhost:8550", 148 "extapi_ipc": null, 149 "extapi_version": "2.0.0", 150 "intapi_version": "1.2.0" 151 } 152 } 153 ] 154 } 155 ``` 156 157 #### 1.1.0 158 159 * Add `OnApproved` method 160 161 #### 1.0.0 162 163 Initial release. 164 165 ### Versioning 166 167 The API uses [semantic versioning](https://semver.org/). 168 169 TLDR; Given a version number MAJOR.MINOR.PATCH, increment the: 170 171 * MAJOR version when you make incompatible API changes, 172 * MINOR version when you add functionality in a backwards-compatible manner, and 173 * PATCH version when you make backwards-compatible bug fixes. 174 175 Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.