mirror of
https://github.com/status-im/status-go.git
synced 2026-08-31 09:01:16 +00:00
Part of the Go project layout migration, item 31. Pure move plus import-path rewrite across 687 files. No API or behaviour change. The services keep their grouping under pkg/services/<name> rather than being promoted to pkg/<name>: 27 top-level directories in pkg/ would read worse than what we have, and the grouping is what makes "an RPC service" identifiable at a glance. Paths that follow the move: the logosstorage test target and generate step, the two wallet token-list tools, the migration-order check (and the pre-rebase hook symlinked to it), and the storage env helper. refs #7067
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.