mirror of
https://github.com/BeamMW/web-wallet.git
synced 2026-10-03 23:12:07 +00:00
Web Wallet for Beam blockchain
- TypeScript 98.4%
- JavaScript 0.9%
- HTML 0.5%
- Shell 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| src | ||
| .babelrc | ||
| .eslintrc | ||
| .gitignore | ||
| .prettierrc | ||
| images.d.ts | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| update_version.sh | ||
| webpack.config.js | ||
| yarn.lock | ||
Beam Web Wallet
Beam Web Wallet is fully functional wallet for Beam blockchain implemented as Chromium extension
Building web wallet extension
npm install
npm run build
Enable developer mode in Chrome chrome://extensions/
Import unpacked extension from ./dist
Web wallet integration with Beam dApps
-
Add utils.js to DAPP
-
Initialize Utils
Utils.initialize({
"appname": "DAPP NAME",
"min_api_version": "6.2",
"headless": false,
"apiResultHandler": (error, result, full) => {
console.log('api result data: ', result, full);
}
}, (err) => {
Utils.download("./PATH_TO_SHADER.wasm", (err, bytes) => {
// subscribe to the state change event
Utils.callApi("ev_subunsub", {ev_system_state: true},
(error, result, full) => {
}
);
})
});
- Call allowed methods from BEAM Wallet API
Utils.callApi("METHOD_NAME", PARAMS, (error, result, full) => {});
- Invoke contract methods
Utils.invokeContract("role=manager,action=view,cid=" + CID, (error, result, full) => {});
Examples: