status-go/services/browsers
Andrea Maria Piana ed9ca8392c Upgrade linter to 1.50.0 2023-01-13 17:52:03 +00:00
..
README.md
api.go
api_test.go feat: make kdf iterations configurable when creating a multiaccount (#2796) 2022-09-27 16:27:20 -04:00
database.go Upgrade linter to 1.50.0 2023-01-13 17:52:03 +00:00
service.go

README.md

Browsers Service

Browser service provides read/write API for browser object.

To enable include browsers config part and add browsers to APIModules:

{
  "BrowsersConfig": {
    "Enabled": true,
  },
  APIModules: "browsers"
}

API

Enabling service will expose three additional methods:

browsers_addBrowser

Stores browser in the database. All fields are specified below:

{
  "browser-id": "1",
  "name": "first",
  "timestamp": 10,
  "dapp?": true,
  "history-index": 1,
  "history": [
    "one",
    "two"
  ]
}

browsers_getBrowsers

Reads all browsers, returns in the format specified above. List is sorted by timestamp.

browsers_deleteBrowser

Delete browser from database. Accepts browser id.