{"id":20392393,"url":"https://github.com/wiseplat/meteor-package-accounts","last_synced_at":"2026-05-31T22:31:36.497Z","repository":{"id":122792499,"uuid":"120945974","full_name":"WISEPLAT/meteor-package-accounts","owner":"WISEPLAT","description":null,"archived":false,"fork":false,"pushed_at":"2018-02-09T19:23:36.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-10T13:33:36.492Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WISEPLAT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-09T19:21:34.000Z","updated_at":"2018-02-09T19:22:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"e4cf1730-b642-4ce9-bfcd-ebb06758e2cb","html_url":"https://github.com/WISEPLAT/meteor-package-accounts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WISEPLAT/meteor-package-accounts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WISEPLAT%2Fmeteor-package-accounts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WISEPLAT%2Fmeteor-package-accounts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WISEPLAT%2Fmeteor-package-accounts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WISEPLAT%2Fmeteor-package-accounts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WISEPLAT","download_url":"https://codeload.github.com/WISEPLAT/meteor-package-accounts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WISEPLAT%2Fmeteor-package-accounts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33752286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T03:43:36.871Z","updated_at":"2026-05-31T22:31:36.479Z","avatar_url":"https://github.com/WISEPLAT.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wiseplat accounts\n\nProvides you with an `WshAccounts` collection, where balances are automatically updated.\nAdditionally the accounts are persisted in localstorage.\n\nIf the wiseplat node removes accounts,\nthe `WshAccounts` collection will set the `deactivated: true` property to these accounts and hide them from normal queries.\n\nIf the Accounts should reapear in the node (e.g. the user importet those, or mist allwed them access), they will be available again,\nincluding all the extra properties you've set.\n\n**Note** don't use the `WshAccounts` collection to add your own custom accounts as a reload of your application,\nor any change in `web3.wsh.accounts` would hide them.\n\n## Installation\n\n    $ meteor add wiseplat:accounts\n\n## Usage\n\nInitialize Accounts on the start of your application, as soon as you have a wiseplat connection:\n\n```js\nWshAccounts.init();\n```\n\nThen simply use the global `WshAccounts` object like any other minimongo collection.\nIt provides the `.find()`, `.findOne()`, `.findAll()`, `.update()`, `.updateAll()` and `.remove()` functions e.g.:\n\n```js\n// Get all active accounts\nvar myAccounts = WshAccounts.find().fetch();\n\n[\n  {\n    \"_id\": \"2Zd3Z9XQrc7iN7Ci3\"\n    \"address\": \"0x343c98e2b6e49bc0fed722c2a269f3814ddd1533\",\n    \"balance\": \"18260939861619682985678\",\n    \"name\": \"Coinbase\",\n  }\n]\n\n// or\nvar myPrimaryAccount = WshAccounts.findOne({name: 'Coinbase'});\n```\n\n#### If you want to get truly all accounts including the deactivated ones use:\n\n```js\nvar allAccounts = WshAccounts.findAll().fetch();\n\n[\n  {\n    \"_id\": \"2Zd3Z9XQrc7iN7Ci3\"\n    \"address\": \"0x343c98e2b6e49bc0fed722c2a269f3814ddd1533\",\n    \"balance\": \"18260939861619682985678\",\n    \"name\": \"Coinbase\",\n  },\n  {\n    \"_id\": \"56sbC8dggbYstmN2o\",\n    \"address\": \"0x990ccf8a0de58091c028d6ff76bb235ee67c1c39\",\n    \"balance\": \"0\",\n    \"name\": \"0x990ccf8a0de58091c028d6ff76bb235ee67c1c39\",\n    \"deactivated\": true\n  }\n]\n\n```\n\n#### If you want to update a deactivated account use:\n\n```js\nWshAccounts.updateAll({address: \"0x990ccf8a0de58091c028d6ff76bb235ee67c1c39\"}, {name: 'XYZ'}});\n```\n\n#### If you manually want to activate an account to make it visible call:\n\n```js\nWshAccounts.updateAll({address: \"0x990ccf8a0de58091c028d6ff76bb235ee67c1c39\"}, {$unset: {deactivated: ''}})\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiseplat%2Fmeteor-package-accounts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiseplat%2Fmeteor-package-accounts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiseplat%2Fmeteor-package-accounts/lists"}