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