{"id":15172144,"url":"https://github.com/solana-labs/obsolete-dontuse-example-webwallet","last_synced_at":"2025-10-01T08:32:12.615Z","repository":{"id":66335313,"uuid":"144362055","full_name":"solana-labs/obsolete-dontuse-example-webwallet","owner":"solana-labs","description":"Example Solana Web-based Wallet","archived":true,"fork":false,"pushed_at":"2020-08-30T15:21:24.000Z","size":3854,"stargazers_count":36,"open_issues_count":11,"forks_count":30,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-09-23T02:02:20.111Z","etag":null,"topics":["blockchain","javascript","js","solana"],"latest_commit_sha":null,"homepage":"https://solana-example-webwallet.herokuapp.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solana-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-08-11T06:41:11.000Z","updated_at":"2024-07-06T14:49:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"de13aeb0-147c-429a-934d-ca1d18af6ebd","html_url":"https://github.com/solana-labs/obsolete-dontuse-example-webwallet","commit_stats":{"total_commits":790,"total_committers":9,"mean_commits":87.77777777777777,"dds":0.379746835443038,"last_synced_commit":"66f135591a2d928ebb7d8499cff612c0f27f9a0d"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-labs%2Fobsolete-dontuse-example-webwallet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-labs%2Fobsolete-dontuse-example-webwallet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-labs%2Fobsolete-dontuse-example-webwallet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-labs%2Fobsolete-dontuse-example-webwallet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solana-labs","download_url":"https://codeload.github.com/solana-labs/obsolete-dontuse-example-webwallet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219875325,"owners_count":16554666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["blockchain","javascript","js","solana"],"created_at":"2024-09-27T09:41:28.826Z","updated_at":"2025-10-01T08:32:12.098Z","avatar_url":"https://github.com/solana-labs.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![Build status][travis-image]][travis-url]\n\n[travis-image]: https://api.travis-ci.org/solana-labs/example-webwallet.svg?branch=master\n[travis-url]: https://travis-ci.org/solana-labs/example-webwallet\n\n# Example Web Wallet\n\nThis project demonstrates how to use the [Solana Javascript API](https://github.com/solana-labs/solana-web3.js)\nto implement a simple web wallet.\n\n**IMPORTANT: This wallet does not sufficently protect the private keys it\ngenerates and should NOT be used in a non-test environment**\n\n## Getting Started\n\n```\n$ npm install\n$ npm run start\n```\n\nThen open your browser to http://localhost:8080/\n\n## Development\n\nWhen making changes, using the webpack-dev-server can be quite convenient as it\nwill rebuild and reload the app automatically\n\n```\n$ npm run dev\n```\n\n## Funding dApps\n\nIf this wallet is opened by a dApp, it will accept requests for funds. In order to\nrequest funds from your dApp, follow these steps:\n\n1. Attach a message event listener to the dApp window\n```js\nwindow.addEventListener('message', (e) =\u003e { /* ... */ });\n```\n2. Open the wallet url in a window from the dApp\n```js\nconst walletWindow = window.open(WALLET_URL, 'wallet', 'toolbar=no, location=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=500, height=600');\n```\n3. Wait for the wallet to load, it will post a `'ready'` message when it's ready to handle requests\n```js\nwindow.addEventListener('message', (e) =\u003e {\n  if (e.data) {\n    switch (e.data.method) {\n      case 'ready': {\n        // ...\n        break;\n      }\n    }\n  }\n});\n```\n4. Send an `'addFunds'` request\n```js\nwalletWindow.postMessage({\n  method: 'addFunds',\n  params: {\n    pubkey: '7q4tpevKWZFSXszPfnvWDuuE19EhSnsAmt5x4MqCyyVb',\n    amount: 150,\n    network: 'https://devnet.solana.com',\n  },\n}, WALLET_URL);\n```\n5. Listen for an `'addFundsResponse'` event which will include the amount transferred and the transaction signature\n```js\nwindow.addEventListener('message', (e) =\u003e {\n  // ...\n  switch (e.data.method) {\n    case 'ready': {\n      // ...\n      break;\n    }\n    case 'addFundsResponse': {\n      const {amount, signature} = e.data.params;\n      // ...\n      break;\n    }\n  }\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolana-labs%2Fobsolete-dontuse-example-webwallet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolana-labs%2Fobsolete-dontuse-example-webwallet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolana-labs%2Fobsolete-dontuse-example-webwallet/lists"}