github.com/jincm/wesharechain@v0.0.0-20210122032815-1537409ce26a/chain/cmd/clef/intapi_changelog.md (about)

     1  ### Changelog for internal API (ui-api)
     2  
     3  ### 4.0.0
     4  
     5  * Bidirectional communication implemented, so the UI can query `clef` via the stdin/stdout RPC channel. Methods implemented are:
     6    - `clef_listWallets` 
     7    - `clef_listAccounts`
     8    - `clef_listWallets`
     9    - `clef_deriveAccount`
    10    - `clef_importRawKey`
    11    - `clef_openWallet`
    12    - `clef_chainId`
    13    - `clef_setChainId`
    14    - `clef_export`
    15    - `clef_import`
    16   
    17  * The type `Account` was modified (the json-field `type` was removed), to consist of 
    18  
    19  ```golang
    20  type Account struct {
    21  	Address common.Address `json:"address"` // Ethereum account address derived from the key
    22  	URL     URL            `json:"url"`     // Optional resource locator within a backend
    23  }
    24  ```
    25  
    26  
    27  ### 3.2.0
    28  
    29  * Make `ShowError`, `OnApprovedTx`, `OnSignerStartup` be json-rpc [notifications](https://www.jsonrpc.org/specification#notification):
    30  
    31  > 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.
    32  > 
    33  >  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"
    34  ### 3.1.0
    35  
    36  * Add `ContentType` `string` to `SignDataRequest` to accommodate the latest EIP-191 and EIP-712 implementations.
    37  
    38  ### 3.0.0
    39  
    40  * Make use of `OnInputRequired(info UserInputRequest)` for obtaining master password during startup
    41  
    42  ### 2.1.0
    43  
    44  * Add `OnInputRequired(info UserInputRequest)` to internal API. This method is used when Clef needs user input, e.g. passwords.
    45  
    46  The following structures are used:
    47  ```golang
    48         UserInputRequest struct {
    49                 Prompt     string `json:"prompt"`
    50                 Title      string `json:"title"`
    51                 IsPassword bool   `json:"isPassword"`
    52         }
    53         UserInputResponse struct {
    54                 Text string `json:"text"`
    55         }
    56  
    57  ### 2.0.0
    58  
    59  * Modify how `call_info` on a transaction is conveyed. New format:
    60  
    61  ```
    62  {
    63    "jsonrpc": "2.0",
    64    "id": 2,
    65    "method": "ApproveTx",
    66    "params": [
    67      {
    68        "transaction": {
    69          "from": "0x82A2A876D39022B3019932D30Cd9c97ad5616813",
    70          "to": "0x07a565b7ed7d7a678680a4c162885bedbb695fe0",
    71          "gas": "0x333",
    72          "gasPrice": "0x123",
    73          "value": "0x10",
    74          "nonce": "0x0",
    75          "data": "0x4401a6e40000000000000000000000000000000000000000000000000000000000000012",
    76          "input": null
    77        },
    78        "call_info": [
    79          {
    80            "type": "WARNING",
    81            "message": "Invalid checksum on to-address"
    82          },
    83          {
    84            "type": "WARNING",
    85            "message": "Tx contains data, but provided ABI signature could not be matched: Did not match: test (0 matches)"
    86          }
    87        ],
    88        "meta": {
    89          "remote": "127.0.0.1:54286",
    90          "local": "localhost:8550",
    91          "scheme": "HTTP/1.1"
    92        }
    93      }
    94    ]
    95  }
    96  ```
    97  
    98  #### 1.2.0
    99  
   100  * Add `OnStartup` method, to provide the UI with information about what API version
   101  the signer uses (both internal and external) aswell as build-info and external api.
   102  
   103  Example call:
   104  ```json
   105  {
   106    "jsonrpc": "2.0",
   107    "id": 1,
   108    "method": "OnSignerStartup",
   109    "params": [
   110      {
   111        "info": {
   112          "extapi_http": "http://localhost:8550",
   113          "extapi_ipc": null,
   114          "extapi_version": "2.0.0",
   115          "intapi_version": "1.2.0"
   116        }
   117      }
   118    ]
   119  }
   120  ```
   121  
   122  #### 1.1.0
   123  
   124  * Add `OnApproved` method
   125  
   126  #### 1.0.0
   127  
   128  Initial release.
   129  
   130  ### Versioning
   131  
   132  The API uses [semantic versioning](https://semver.org/).
   133  
   134  TLDR; Given a version number MAJOR.MINOR.PATCH, increment the:
   135  
   136  * MAJOR version when you make incompatible API changes,
   137  * MINOR version when you add functionality in a backwards-compatible manner, and
   138  * PATCH version when you make backwards-compatible bug fixes.
   139  
   140  Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.