Giter Club home page Giter Club logo

blockcore-wallet's Introduction

Blockcore Wallet

Non-Custodial Web5 Wallet for your Browser

The Blockcore Wallet does wallet management, account management, identity management and signing. Built on web-technology, Blockcore Wallet is cross-platform and works in different modes, such as browser extension, Progressive Web App, native mobile and desktop app and more.

Open the Wallet Guide to install the wallet.

Features

The wallet supports having multiple active wallets at the same time, and each wallet can contain one or more accounts, even on different blockchains and networks.

  • Multiple wallets with multiple accounts
  • Web5 wallet for identity and data
  • Payment requests
  • Decentralized blockchain API discovery
  • Internationalization support with multiple languages and LTR/RTL support.
  • Nostr support

Browser Support

Blockcore Wallet supports all Chromium based browsers - Chrome, Edge Opera, Brave etc.

Firefox is not supported. Support for Firefox is not planned.

Normal vs Quick

When adding additional accounts to your wallet, you have the option to choose the modes Normal and Quick. The difference can be very important depending on your usage and needs.

Normal will retrieve all transaction history for your wallet, and calculate the balance locally. When sending transactions, the available unspent transaction outputs (UTXOs) are queried locally in the history of data.

Quick will retrieve only the current balance information from the indexer APIs, even for very large wallets, this is very quick to do. When sending transactions, the indexer API is queried until the amount being sent has been fulfilled. This means even if you have thousands of UTXOs, the wallet does not need to download all the data to perform transactions.

Instances

This wallet is made available in multiple different instances that has different featuresets:

Blockcore

  • Chains: All Blockcore supported blockchains
  • All features currently under development
  • Download: "blockcore-*.zip

CoinVault

  • Chains: Stratis and Cirrus.
  • Features: Wallet, NFT and more.
  • Download: "coinvault-*.zip

Free City Wallet

  • Chains: City Chain
  • Features: Focused on decentralized citizenship
  • Download: "freecity-*.zip

Supported Browsers

The extension works on Chrome and Edge browsers. Future Firefox support might be added later.

WARNING AND RISK

This software should be considered experimental, use at your own risk.

All the standard practices for cryptocurrency wallets apply: Make sure you take backup of your secret recovery phrase. We are not responsible for any mistakes or problems with the software and services. You hold your own keys, we can never restore or help you if you lose your secret recovery phrase. You can still lose valuables even though you don't lose your recovery phrase, due to bugs and issues in the software provided. Use at your own risk.

Development

First you need to get the source code and you should include the submodules:

git clone --recurse-submodules https://github.com/block-core/blockcore-wallet.git

If you have already cloned and don't have the submodules, you might get an error with importing the lists.

You can do the following to initialize the submodules if you cloned without --recurse-submodules.

git submodule init
git submodule update

Requirements

  • Node.js LTS (16.x): https://nodejs.org/en/
  • Angular CLI: npm install -g @angular/cli
  • Install the suggested workspace extensions for VS Code

Code Formatting Rules

Please use an editor that respects the .editorconfig when auto-formatting the code.

If formatting is not applied according to the rules, make sure you don't have configuration in user settings for VS Code: %APPDATA%\Code\User\settings.json

Run with Hot-Reload

npm install
npm start

This will run Angular in watch-mode and ensure it auto-reloads.

Install Extension

To install the extension, follow the instructions here: https://docs.microsoft.com/en-us/microsoft-edge/extensions-chromium/getting-started/extension-sideloading

Choose the blockcore-wallet\dist\extension folder when picking folder for extension to load from.

Update Allow/Deny lists

The lists is a git submodule and to update to latest:

git submodule update --remote --merge

blockcore-wallet's People

Contributors

abulhallaj avatar dangershony avatar davidgershony avatar drmathias avatar miladsoft avatar missmeowness avatar omahs avatar peterwau avatar psavva avatar shtah avatar sondreb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

blockcore-wallet's Issues

Add support for nostr IDs

The default derivation path for nostr IDs are: m/44'/1237'/0'/0/0

Allow users to manager their nost Ids and key-pairs using the extension on this path.

New separate identities should increment the account value, which is hardened path. Should not use the last two sections, which in a normal wallet is change/receive address and address (key) index.

A secondary identity should be: m/44'/1237'/1'/0/0

NIP-06: https://github.com/fiatjaf/nostr/blob/master/nips/06.md

Allow account export and import

While the user can take backup of their secret recovery phrase, the accounts are manually added for different derivations paths / networks / blockchains. Having the ability to export and import would greatly improve the restore experience for users.

Make the scrollbar overlay content

The scrollbar in the menu is appended to the right of the content as oppose to overlay. Fix the issue and make the scrollbar overlay content.

image

Add support for Nostr Web3 provider

nos2x is an "official" browser extension for Nostr, we should implement the same APIs and be compatible as an alternative.

Blockcore Extension is an agnostic and cross-chain and cross-platform wallet extension, so the implementation should be respectful of the official. The extension should check if "window.nostr" already exists, and if it does, we should have an option that allow users to override the "official" extension.

The current provider API (as of 2022-01-16):

async getPublicKey()
async signEvent(event)

https://github.com/fiatjaf/nos2x

Add logging framework

Add logging and error handling logic that is able to work in both background and UI. It should store a log of 100 latest issues and show that on dedicated page available from the settings view.

Tool: Sign and Verify

Add a tool under the "Tools" section on wallet dashboard that allow users to sign and verify messages.

The UI should allow users to pick account, then address, then either sign a message manually or verify it.

Persist the watch list

The watch list that watches for changes on specific addresses should be persisted, it will be removed if user exists or restarts the extension (background process).

This means that an transaction performed might not be reflected correctly in the state of the account.

Feature: Wallet Watcher

The extension could be setup to watch a wallet using xpubkey derived from the mnemonic, and query the indexers that we are running for Blockcore chains. The background.ts is the place to put background processing that checks transactions, and then a notification could be actived on the host OS.

Migrate to IndexedDB for improved scaling on large wallets

The extension currently hold all data using the standard storage APIs on extension. We must perform testing on this for larger wallets if it would be smart to migrate to IndexedDB, which is an SQL-like storage in the browser and wouldn't require us to keep everything in-memory. We can of course also partition the data using normal storage too.

We must perform tests and verification on the actual need for this, and should be done before the milestone tagged.

Research: Investigate possibility of trigger extension popup programmatically

The extension can be opened with a shortcut (currently Shift+Alt+X, but it would be preferable if web pages could activate the extension as oppose to showing it in a popup window.

This task is to do research and find possible solutions to activate the extension popup from web pages.

This is probably not possible and not allowed for security reasons, but we can still try to improve the user experience.

https://stackoverflow.com/questions/34853588/how-to-trigger-an-istrusted-true-click-event-using-javascript

Auto-scroll on navigation

When user navigate back from settings, which has a lot of options, the user should be returned to the exact same scroll location.

Reference for some example code and implementations: angular/angular#10929

Default account selection

When a wallet is first created, the user should see a friendly UX that allows them to add multiple accounts with easy clicks.

Allow single key accounts

The create account UI should support an advanced option of single key, where the user can enter the whole derivation path and the account will be marked "singleKey" or something similar.

Cirrus Core allows users to pick any of the 20 keys (addresses) to be used when making a wallet, we only support the first (0) index by default, but in the account UI a user can add alternatives for Cirrus Core (and potentially other services that relies on a single key).

What's new - dialog

We currently have an option within settings that users can check to see the latest changes, but we should probably have an dialog similar to Metamask for important new features. See example:

image

Wallet creation should keep state

When the user creates a new wallet, we should keep the state, especially the secret recovery phrase, since the user might copy and paste into another application, at which time the wizard restarts if the popup closes. The user might end up re-generating a new phrase and not recognize this.

Implement password change

The UI is already in place, implement the logic that sends message from UI to background to decrypt existing wallet and re-encrypt using the new password provided.

image

Add an Auto-Lock timer

  • Allow the user to keep the password (or perhaps just decrypted mnemonic) in-memory for a specific amount of time.
  • Start the timer when the extension is closed and use background service to wipe it.

Allow forced restart of extension

During development, the extension might come in an always-loading state. This loading indicator should have a timeout that shows some UI options after 3-5 seconds that allow users to restart the extension, perhaps validate the settings, see error log, etc. Maybe copy and paste the error log to show to the dev team. Behavior should be similar to how it is done on Blockcore Hub.

image

Add coin/network icons font

  • The account and default account (on new wallets) only lists our selection of available Material icons at the moment. In the future, we should have our own icon font that includes the different chains, so user can pick those if they want to.
  • Icons are available in our chaininfo repo: https://github.com/block-core/chaininfo
  • This task is to make and add a font based upon the icons, not to link to the binary images that already exists. This will make it work seamless cross the app between existing icons (or new package if we choose to change what we already have).

Add support for redirect on maximize

The button added in #31 opens the standard page (dashboard when unlocked). It should instead attempt to redirect to the same state as already exists.

It obviously might be hard to replicate user input if user is on a send screen, but at least navigate to the correct account and screen would be helpful.

Create optimized add-on store graphics for screenshots

The add-on store screenshots are wide and can have multiple screenshots in one, or some graphics on the sides. This task is for anyone to come up with some better template for screenshots in the add-on store.

Example of current screenshots used (white sidebars):

image

Introduction popup

There should be an introduction popup that appears the first time user starts the extension, explaining some of the basic functionality and UI, and with some warnings regarding Non-Custodial Wallet (user controls the keys), etc.

Change Password

It should be possible to re-encrypt the Secret Recovery Phrase.

Allow local state edit for sequence

If an identity is re-used during development for an Blockcore Vault configuration, then locally the Blockcore Extension will attempt to push an invalid sequence update to the DID when publishing. The error should be displayed, and user should be allowed to update local cache to correspond with server.

Actions UI / Workflow

When any web page triggers the extension, this should activate an actions workflow within the extension. This should overlay the regular UI, and the user should be able to exit the workflow.

Triggers from web pages opens in a regular pop-up window. If the user clicks the extension icon in the browser, the same state should be displayed. This ensures that if the user dismissed the popup by mistake or it is hidden, they can get back into the same workflow from tapping the icon.

Create a blocklist

When the extension starts being used to authenticate against web apps, we should maintain a public blocklist that can be used to display warnings to users.

Connect Account to Web Page

Whenever the user responds to an "action", they must initially pick an account they want to assign to the web page. E.g. if the web page asks the user to perform a signing, they must first pick account, even though there is already an active account open.

The next time any "action" is triggered from the same domain, the extension will auto-select the previous account.

We must ensure we have some UI where user can "logout" their account from specific web pages.

Index 0 is not shown in the derivation parth

image

The value 0 (index 0) is not shown in the derivation path when an account is selected. It is shown correctly when 1 or another value is used. This is likely due to number/string parsing, thinking "0" is equal to null/undefined/empty string.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.