{"id":28240521,"url":"https://github.com/bitmask-stack/bitmask-core","last_synced_at":"2025-06-12T05:31:03.498Z","repository":{"id":37793276,"uuid":"465084208","full_name":"bitmask-stack/bitmask-core","owner":"bitmask-stack","description":"Core functionality for the BitMask wallet","archived":false,"fork":false,"pushed_at":"2024-02-14T22:45:17.000Z","size":1916,"stargazers_count":95,"open_issues_count":53,"forks_count":21,"subscribers_count":7,"default_branch":"development","last_synced_at":"2025-06-07T11:08:00.743Z","etag":null,"topics":["bitcoin","nft","rgb","rust"],"latest_commit_sha":null,"homepage":"https://bitmask.app","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitmask-stack.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":"2022-03-01T23:01:11.000Z","updated_at":"2025-05-27T09:33:29.000Z","dependencies_parsed_at":"2023-12-26T20:57:46.075Z","dependency_job_id":"27f62903-0a47-4328-8b33-8d059eca9493","html_url":"https://github.com/bitmask-stack/bitmask-core","commit_stats":{"total_commits":364,"total_committers":8,"mean_commits":45.5,"dds":0.4340659340659341,"last_synced_commit":"6eeb2ed4e9f567e2eafbf95baad6bbb8508c98a7"},"previous_names":["bitmask-stack/bitmask-core"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bitmask-stack/bitmask-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitmask-stack%2Fbitmask-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitmask-stack%2Fbitmask-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitmask-stack%2Fbitmask-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitmask-stack%2Fbitmask-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitmask-stack","download_url":"https://codeload.github.com/bitmask-stack/bitmask-core/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitmask-stack%2Fbitmask-core/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259404185,"owners_count":22852135,"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":["bitcoin","nft","rgb","rust"],"created_at":"2025-05-19T04:07:01.835Z","updated_at":"2025-06-12T05:31:03.492Z","avatar_url":"https://github.com/bitmask-stack.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BitMask Core\nCore functionality for the BitMask wallet - \u003chttps://bitmask.app\u003e\n\n**BitMask** is a Bitcoin-only web wallet and browser extension for accessing decentralized web applications on the Bitcoin timechain. It is designed to support UTXO-based smart contracting protocols such as [RGB](https://rgb.tech), in addition to Lightning payments.\n\n[![Build status](https://img.shields.io/github/actions/workflow/status/diba-io/bitmask-core/rust.yaml?branch=development\u0026style=flat-square)](https://github.com/diba-io/bitmask-core/actions/workflows/rust.yaml)\n[![Crates.io](https://img.shields.io/crates/v/bitmask-core?style=flat-square)](https://docs.rs/bitmask-core/latest/bitmask-core/)\n[![npm: bitmask-core](https://img.shields.io/npm/v/bitmask-core?style=flat-square)](https://www.npmjs.com/package/bitmask-core)\n[![License: MIT+APACHE](https://img.shields.io/crates/l/bitmask-core?style=flat-square)](https://mit-license.org)\n[![Telegram](https://img.shields.io/badge/telegram-invite-blue?style=flat-square)](https://t.me/+eQk5aQ5--iUxYzVk)\n\n## Uses\n\n- [bdk](https://github.com/bitcoindevkit/bdk) - Bitcoin Dev Kit\n- [rgb-wallet](https://github.com/RGB-WG/rgb-wallet) - RGB Wallet\n- [wasm-pack](https://github.com/rustwasm/wasm-pack) - WebAssembly\n- [lndhubx](https://lndhubx.kollider.xyz) - Custodial Lightning\n- [nostr-sdk](https://github.com/rust-nostr/nostr) - Nostr SDK\n- [carbonado](https://github.com/diba-io/carbonado) - Carbonado e2ee decentralized storage\n\n## Build\n\nThis should work with either wasm-pack, [trunk](https://github.com/thedodd/trunk), or x86-64.\n\nSome environment variables may be needed in order to compile on macos-aarch64, for more, [see this](https://github.com/sapio-lang/sapio/issues/146#issuecomment-960659800).\n\nIf there are issues compiling, be sure to check you're compiling with the latest Rust version.\n\nTo build this as a NodeJS module, use: `wasm-pack build --release --target bundler`\n\n## Test\n\n1. Lint against wasm32: `cargo clippy --target wasm32-unknown-unknown`\n2. Run tests in browser: `TEST_WALLET_SEED=\"replace with a 12 word mnemonic for a wallet containing testnet sats\" wasm-pack test --headless --chrome`\n\n## Run\n\nTo run the bitmaskd node with REST server, either for testing the web wallet, or simply for increased privacy:\n\n`cargo install --features=server --path .`\n\nThen run `bitmaskd`.\n\n## Development\n\nParts of this application are built with conditional compilation statements for wasm32 support. This is a helpful command for checking linting and correctness while also developing on desktop platforms:\n\n`cargo clippy --target wasm32-unknown-unknown --no-default-features --release`\n\n## Release\n\nUpon a new release, follow these steps:\n\n1. Run `cargo update` to update to latest deps.\n1. Run `cargo +nightly udeps` to see if there are any unused dependencies.\n\n## Docker\n\nFor running bitmask-core tests in Regtest Mode, please follow the steps below:\n\n### Initial Setup\n\n1. Build bitcoin node + electrum: `docker-compose build`.\n2. Up and running Docker containers: `docker-compose up -d node1 bitmaskd`.\n3. Load the command line: `source .commands`\n4. Download and install BDK cli: `cargo install bdk-cli`. We will use BDK to generate the mnemonic.\n5. Generate a new mnemonic: `bdk-cli generate`.\n6. Create an environment variable called **TEST_WALLET_SEED** with mnemonic generated in the **step 5** (only wasm32).\n7. Run the test to get main address for bitcoin and rgb: `cargo test --test wallet -- create_wallet --exact`.\n8. Load your wallet in the bitcoin node: `node1 loadwallet default`.\n9. Generate new first 500 blocks: `node1 -generate 500`.\n10. Send some coins to the main wallet address: `node1 sendtoaddress {MAIN_VAULT_ADDRESS} 10`. Change `{MAIN_VAULT_ADDRESS}` with the address generated in the **step 7**.\n11. Send some coins to the rgb wallet address: `node1 sendtoaddress {RGB_VAULT_ADDRESS} 10`. Change `{RGB_VAULT_ADDRESS}` with the address generated in the **step 7**.\n12. Mine a new block: `node1 -generate 1`\n13. Run the test to check the balance: `cargo test --test wallet -- get_wallet_balance --exact`.\n\n### Running the tests\n\nRunning the tests: `cargo test --test-threads 1`\n\n### Troubleshooting\n\n#### **1. After restarting the container**\n\n**A.The bitcoin node does not work?**\n\nCheck if your wallet is loaded. For that, run the command `node1 loadwallet default`.\n\n**B.The electrs node does not work?**\n\nTo stop the electrs freeze, run `node1 -generate`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitmask-stack%2Fbitmask-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitmask-stack%2Fbitmask-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitmask-stack%2Fbitmask-core/lists"}