• Stars
    star
    332
  • Rank 126,957 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Bitcoin.com wallet is a fork of the Copay Wallet (https://github.com/bitpay/copay).

The Bitcoin.com wallet is a secure bitcoin wallet platform for both desktop and mobile devices. It uses Bitcore Wallet Service (our fork of the Bitpay Bitcore Wallet Service) (BWS) for peer synchronization and network interfacing.

Binary versions of The Bitcoin.com wallet are available for download at Bitcoin.com.

For a list of frequently asked questions please visit the Bitcoin.com Wallet FAQ.

Main Features

  • Multiple wallet creation and management in-app
  • Creates both Bitcoin Cash (BCH) and Bitcoin Core (BTC) wallets by default
  • Intuitive, multisignature security for personal or shared wallets
  • Easy spending proposal flow for shared wallets and group payments
  • BIP32 Hierarchical deterministic (HD) address generation and wallet backups
  • Device-based security: all private keys are stored locally, not in the cloud
  • Support for Bitcoin testnet wallets
  • Synchronous access across all major mobile and desktop platforms
  • Payment protocol (BIP70-BIP73) support: easily-identifiable payment requests and verifiable, secure bitcoin payments
  • Support for over 150 currency pricing options and unit denomination in BTC or bits
  • Mnemonic (BIP39) support for wallet backups
  • Paper wallet sweep support (BIP38)
  • Email notifications for payments and transfers
  • Push notifications (only available for ios and android versions)
  • Customizable wallet naming and background colors
  • Multiple languages supported
  • Available for iOS, Android, Linux, Windows and OS X devices

Building the wallet

You don't need to run npm install, run apply:bitcoincom instead

npm run apply:bitcoincom

There is a bug when building the next step, you will need to go directly into one of the javascript files in node_modules

nano node_modules/asn1.js-rfc5280/index.js

Delete the whole try catch part at the top, replace it with only

var asn1 = require('asn1.js');

If you don't do this, you will get this error:

ยป <!doctype html>
ยป ^
ยป ParseError: Unexpected token

Testing in a Browser

Note: This method should only be used for development purposes. When running the Bitcoin.com wallet in a normal browser environment, browser extensions and other malicious code might have access to internal data and private keys.

Clone the repo and open the directory:

git clone https://github.com/Bitcoin-com/Wallet.git
cd Wallet

Ensure you have Node installed, then install and start the Bitcoin.com wallet:

npm run apply:bitcoincom
npm start

Visit localhost:8100 to view the app.

A watch task is also available to rebuild components of the app as changes are made. This task can be run in a separate process โ€“ while the server started by npm start is running โ€“ to quickly test changes.

npm run watch

External Config

When creating the production version, the build scripts expect a configuration file called leanplum-config.json to be in the directory that contains the project folder, with contents in the following format:

{
  "dev": {
    "appId": "",
    "key": ""
  },
  "prod": {
    "appId": "",
    "key": ""
  }
}

Testing on Real Devices

It's recommended that all final testing be done on a real device โ€“ both to assess performance and to enable features that are unavailable to the emulator (e.g. a device camera).

Android

Follow the Cordova Android Platform Guide to set up your development environment.

When your developement enviroment is ready, run the start:android npm package script.

npm run apply:bitcoincom
npm run start:android

iOS

Follow the Cordova iOS Platform Guide to set up your development environment.

When your developement enviroment is ready, run the start:ios npm package script.

npm run apply:bitcoincom
npm run start:ios

Desktop (Linux, macOS, and Windows)

The desktop version of the Bitcoin.com wallet currently uses NW.js, an app runtime based on Chromium. To get started, first install NW.js on your system from the NW.js website.

When NW.js is installed, run the start:desktop npm package script.

npm run apply:bitcoincom
npm run start:desktop

Build Bitcoin.com wallet App Bundles

Before building the release version for a platform, run the clean-all command to delete any untracked files in your current working directory. (Be sure to stash any uncommited changes you've made.) This guarantees consistency across builds for the current state of this repository.

The build:*-release commands build the production version of the app, and bundle it with the release version of the platform being built.

Android

npm run clean-all
npm run apply:bitcoincom
npm run build:android-release

iOS

npm run clean-all
npm run apply:bitcoincom
npm run build:ios-release

Desktop (Linux, macOS, and Windows)

npm run clean-all
npm run apply:bitcoincom
npm run build:desktop-release

About The Bitcoin.com Wallet

General

The Bitcoin.com wallet implements a multisig wallet using p2sh addresses. It supports multiple wallets, each with its own configuration, such as 3-of-5 (3 required signatures from 5 participant peers) or 2-of-3. To create a multisig wallet shared between multiple participants, the Bitcoin.com wallet requires the extended public keys of all the wallet participants. Those public keys are then incorporated into the wallet configuration and combined to generate a payment address where funds can be sent into the wallet. Conversely, each participant manages their own private key and that private key is never transmitted anywhere.

To unlock a payment and spend the wallet's funds, a quorum of participant signatures must be collected and assembled in the transaction. The funds cannot be spent without at least the minimum number of signatures required by the wallet configuration (2-of-3, 3-of-5, 6-of-6, etc.). Once a transaction proposal is created, the proposal is distributed among the wallet participants for each to sign the transaction locally. Finally, when the transaction is signed, the last signing participant will broadcast the transaction to the Bitcoin network.

The Bitcoin.com wallet also implements BIP32 to generate new addresses for peers. The public key that each participant contributes to the wallet is a BIP32 extended public key. As additional public keys are needed for wallet operations (to produce new addresses to receive payments into the wallet, for example) new public keys can be derived from the participants' original extended public keys. Once again, it's important to stress that each participant keeps their own private keys locally - private keys are not shared - and are used to sign transaction proposals to make payments from the shared wallet.

For more information regarding how addresses are generated using this procedure, see: Structure for Deterministic P2SH Multisignature Wallets.

Bitcoin.com Wallet Backups and Recovery

The Bitcoin.com wallet uses BIP39 mnemonics for backing up wallets. The BIP44 standard is used for wallet address derivation. Multisig wallets use P2SH addresses, while non-multisig wallets use P2PKH.

Wallet Export Format

The Bitcoin.com wallet encrypts the backup with the Stanford JS Crypto Library. To extract the private key of your wallet you can use https://bitwiseshiftleft.github.io/sjcl/demo/, copy the backup to 'ciphertext' and enter your password. The resulting JSON will have a key named: xPrivKey, that is the extended private key of your wallet. That information is enough to sign any transaction from your wallet, so be careful when handling it!

Using a tool like Bitcore PlayGround all wallet addresses can be generated. (TIP: Use the Address section for P2PKH address type wallets and Multisig Address for P2SH address type wallets). For multisig addresses, the required number of signatures (key m on the export) is also needed to recreate the addresses.

Bitcore Wallet Service

The Bitcoin.com wallet depends on Bitcore Wallet Service (BWS) for blockchain information, networking and synchronization. A BWS instance can be setup and operational within minutes or you can use a public instance like https://bws.bitcoin.com. Switching between BWS instances is very simple and can be done with a click from within the wallet. BWS also allows the Bitcoin.com wallet to interoperate with other wallets like [Bitcore Wallet CLI] (https://github.com/bitpay/bitcore-wallet).

Translations

The Bitcoin.com wallet uses standard gettext PO files for translations and Crowdin as the front-end tool for translators. To join our team of translators, please create an account at Crowdin and translate the Bitcoin.com wallet documentation and application text into your native language.

To download and build using the latest translations from Crowdin, please use the following commands:

cd i18n
node crowdin_download.js

This will download all partial and complete language translations while also cleaning out any untranslated ones.

Contributing to this project

Anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing.

Support

Please see Support requests

More Repositories

1

paperwallet.bitcoin.com

A customizable paper wallet for Bitcoin Cash
HTML
88
star
2

bitcoin-cash-merchant-ios

This is Bitcoin Cash Merchant App for iOS built with Swift by the Bitcoin.com Team. Enjoy!
Swift
73
star
3

Blockexplorer

JavaScript
23
star
4

slp-sdk

Simple Ledger Protocol SDK powered by BITBOX
JavaScript
20
star
5

slp-indexer

Bitcoin.com slp-indexer
Java
19
star
6

developer.bitcoin.com

Front end for developer.bitcoin.com
JavaScript
16
star
7

slp-wallet-sdk-ios

This is the SLP SDK for iOS built with Swift by the Bitcoin.com Wallet Team. Enjoy!
Swift
13
star
8

bitcore-wallet-service

JavaScript
12
star
9

slp-wallet-sdk-android

This is the SLP SDK for Android built with Kotlin by the Bitcoin.com Wallet Team. Enjoy!
Kotlin
12
star
10

golden-ticket

Golden Ticket is Bitcoin.com's event paper wallet generator.
TypeScript
11
star
11

oracles.cash

Platform for creating oracles on Bitcoin Cash
CSS
10
star
12

mastering-bitcoin-cash

9
star
13

Bitcoin

C++
7
star
14

bitcoincashjs2-lib

Fork of bitcoincashjs-lib with alternate compile2 function for compiling Script
JavaScript
5
star
15

bitcoincom-link

Multi-provider interface for applications supporting BCH, SLP, BTC, ETH
TypeScript
5
star
16

web3-aws-eth

Java
4
star
17

gifts-frontend

An open-source, non-custodial webapp for generating gifts that automatically refund if unclaimed
JavaScript
4
star
18

wallet-decrypt-tools

Bitcoin.com mobile wallet backup decryption tools
JavaScript
4
star
19

bitbox-cli

BITBOX Command Line functionality
JavaScript
4
star
20

cashaccounts

Cash Accounts
JavaScript
3
star
21

mineragent

Shell
2
star
22

bitcore-lib-cash

JavaScript
2
star
23

securepreferences-android

Kotlin
2
star
24

slp-wallet-sdk-ios-demo

This is the SLP SDK demo for iOS built with Swift by the Bitcoin.com Wallet Team. Enjoy!
Swift
2
star
25

bip70-merchant-services

bip70-merchant-services
TypeScript
2
star
26

MerchantRN

Merchant app in React Native.
TypeScript
2
star
27

ws.bitcoin.com

WebSockets
TypeScript
2
star
28

WaaS

Wallet as a Service
TypeScript
2
star
29

bitcoin-invoice-components

React components for BCH invoices
JavaScript
2
star
30

tip-jar

Android Coding Assignment
Kotlin
2
star
31

bupool

C
2
star
32

slp-wallet-sdk-android-demo

This is the SLP SDK demo for Android built with Kotlin by the Bitcoin.com Wallet Team. Enjoy!
Kotlin
1
star
33

wormhole-scaffold-angular

Basic Angular app w/ Wormhole SDK web bindings
TypeScript
1
star
34

developer

1
star
35

Pay.bitcoin.com

Documentation for BIP70 merchant server
1
star
36

btc1

C++
1
star
37

satoshis-vision

HTML
1
star
38

wyohackathon-2019

Code for https://wyohackathon.io 2019
TypeScript
1
star
39

wormhole-scaffold-next

Wormhole SDK Scaffold NextJS
JavaScript
1
star
40

tip-jar-backend

Java
1
star
41

bitcoin-abc

C++
1
star
42

PayExchangePartnerDemo

Java
1
star
43

wormholerest.bitcoin.com

Wormhole over HTTP
JavaScript
1
star
44

ios-coding-test

Swift
1
star
45

bitbox-scaffold-websockets

BITBOX React scaffold w/ Websockets
JavaScript
1
star
46

cloudrest.bitcoin.com

REST layer for Bitcoin.com's cloud
JavaScript
1
star
47

bitcore-wallet-client

JavaScript
1
star
48

Bitcoin-Unlimited-Scripts

Shell
1
star
49

bitbox-cloud

Command line utility for Bitcoin.com's Cloud
JavaScript
1
star
50

CocoaPods

Bitcoin.com CocoaPods
Ruby
1
star