• This repository has been archived on 17/Apr/2023
  • Stars
    star
    1,129
  • Rank 41,225 (Top 0.9 %)
  • Language
    JavaScript
  • License
    Mozilla Public Li...
  • Created almost 9 years ago
  • Updated over 2 years ago

Reviews

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

Repository Details

The Blockstack Browser

Blockstack Browser CircleCI branch BrowserStack Status License Slack

The Blockstack Browser allows you to explore the Blockstack internet.

⚠️ IMPORTANT: This project has been deprecated in favor of the Blockstack App. It will receive only critical updates by Blockstack PBC going forward.

Table of contents

Releases

Download the latest release

Developing

macOS

Please note these instructions have only been tested on macOS 10.13

  1. Download and install the latest release of Blockstack for Mac.
  2. Start Blockstack
  3. Option-click the Blockstack menu bar item and select "Enable Development Mode"
  4. Clone this repo: git clone https://github.com/blockstack/blockstack-browser.git
  5. Install node dependencies: npm install
  6. Run npm run dev

Linux

  1. Clone this repo: git clone https://github.com/blockstack/blockstack-browser.git
  2. Install node dependencies: npm install
  3. Run npm run dev

Note: npm dev runs a BrowserSync process that watches the assets in /app, then builds them and places them in /build, and in turn serves them up on port 3000. When changes are made to the original files, they are rebuilt and re-synced to the browser frames you have open.

Troubleshooting

Common problems and solutions:

  • The sign-in page does not load: These instructions run the Browser in development mode, which uses a different port (3000) than the production mode (8888). However, existing applications will direct you to http://localhost:8888 on sign-in. You will need to manually edit the URL to change 8888 to 3000 and refresh the page.

  • The sign-in page does not load with localhost:3000: If you have taken the above step and the page still does not load, check your auth= query parameter. If it starts with any number of / characters, remove them and reload the page. For example, if your auth= query looks like auth=///abcdef..., then you will need to change it to auth=abcdef....

Building for macOS

  1. Make sure you have a working installation of Xcode >=9 and Node.js >=10.
  2. Run npm run mac:release:dev to build an unsigned application bundle.
  3. The output bundle is located at native/macos/export/Blockstack.app.

Note: This has only been tested on macOS High Sierra 10.13

Building a macOS release for distribution

  1. Ensure you have valid Developer ID signing credentials in your Keychain. (See https://developer.apple.com/developer-id/ for more information)
  2. Open the Blockstack macOS project in Xcode and configure your code signing development team (You only need to do this once)
  3. Make sure you have an OpenSSL ready for bottling by homebrew by running brew install openssl --build-bottle
  4. Open the Blockstack macOS project in Xcode.
  5. Select the Product menu and click Archive.
  6. When the archive build completes, the Organizer window will open. Select your new build.
  7. Click "Export..."
  8. Click "Export a Developer ID-signed Application"
  9. Choose the development team with the Developer ID you'd like to use to sign the application.
  10. Click "Export" and select the location to which you would like to save the signed build.

Building for Windows

Prerequisites:

Run npm run win32.

This will:

  • Run the webpack build.
  • Setup the resources used by msbuild and the WiX msi project.
  • Run msbuild to compile the native app and create the msi installation file.

The output file can be found at native\windows\BlockstackSetup\bin\Release\en-us\BlockstackSetup.msi.

This does not perform any code or installer file signing.

Building for the Web

  1. Make sure you've cloned the repo and installed all npm assets (as shown above)
  2. Run npm run web

Building for Linux (dpkg)

  1. Install fpm
  2. Run ./native/linux/make_deb.sh
  3. A .deb package will be placed in ./native/linux/dist/

Contributing

We do project-wide sprints every two weeks and we're always looking for more help.

If you'd like to contribute, head to the contributing guidelines. Inside you'll find directions for opening issues, coding standards, and notes on development.

Logging

The Browser uses log4js for logging. The macOS app uses macOS's unified logging API, os_log for logging.

macOS

On macOS, the Browser sends log events to the macOS app's log server. These are then included in macOS's unified logging API. You can view logs by starting Console.app.

To see only Blockstack process logs, filter by process by typing process: Blockstack in the search box. You can also filter for only log entries proactively generated by the BLockstack project using this query: subsystem:org.blockstack.portal subsystem:org.blockstack.core subsystem:org.blockstack.mac If you'd like to see more detail, enable the inclusion of Info and Debug messages in the Action menu. Please note that in our experience, Console.app doesn't always show debug messages in real time and only shows them when doing a log dump as described below.

Sending logs to developers

Blockstack logs are included in macOS's unified logging system. This allows us to easily collect a large amount of information about the user's system when we need to troubleshoot a problem while protecting their privacy.

  1. Press Shift-Control-Option-Command-Period. Your screen will briefly flash.
  2. After a few minutes, a Finder window will automatically open to /private/var/tmp
  3. Send the most recent sysdiagnose_DATE_TIME.tar.gz file to your friendly developers.

The most important file in this archive is system_logs.logarchive, which will include recent system logs including Blockstack's logs. You can open it on a Mac using Console.app. The other files include information about your computer that may help in diagnosing problems.

If you're worried about inadvertently sending some private information, you can select the log entries you'd like to send inside Console.app and copy them into an email or github issue. To help us debug your problem, we ask that at a minimum you enable Info and Debug messages and filter by process: Blockstack.

More technical users (with admin permission) can use the sysdiagnose command to generate a custom dump of information.

Tech Stack

This app uses the latest versions of the following libraries:

And a few other smaller modules (these can be found in package.json).

Maintainer

This repository is maintained by hankstoever.id.

Testing

Run all tests in the test/ directory with the npm run test command. A single file can be run by specifing an -f flag: npm run test <PATH_TO_TEST_FILE>.

Note: When running tests, code coverage will be automatically calculated and output to an HTML file using the Istanbul library. These files can be seen in the generated __coverage__/ directory.

App Development

Run the browser in the Blockstack Test Environment

When developing apps, the browser can be run in a Docker test environment that is backed by the regtest bitcoin network, hence no real money involved.

Note: The Dockerfile creates an image that release on AMD64 architecture.

The easiest way to get that setup is through Docker containers for the api, the browser and the cors-proxy. There is a docker-compose.yaml file published in the Blockstack todo app repo that does this. To use it, first install Docker and stop any running Blockstack applications (blockstack-browser or blockstack api) then:

$ docker-compose up -d

This brings up

  • A blockstack-core api node that is backed

    • by a bitcoind instance running regtest and
    • by a blockstack-core node built from the test chain.

    The initialization script generates 50 BTCs for the core wallet.

  • a blockstack-browser node. It uses bitcoin addresses that are mapped to regtest bitcoin addresses.

  • a cors-proxy to bypass origin policy issues.

The easiest way to work with this setup is in Incognito mode in your browser. Once the images have been pulled down and the containers are started you can open http://localhost:8888.

Choose the Advanced Mode setup and enter the API Password as blockstack_integration_test_api_password

Common Tasks

  • You can send bitcoins from the core wallet to the browser wallet by opening the hidden url http://localhost:8888/wallet/send-core

  • You can inspect the mapped bitcoin addresses from the browser node to the regtest address by looking into the log file of the api node (execute bash in the api container and look at /tmp/blockstack-run-scenario.blockstack_integration_tests.scenarios.portal_test_env/client/api_endpoint.log).

  • You can inspect the api password by looking into the client.ini file of the api node (execute bash in the api container and look at /tmp/blockstack-run-scenario.blockstack_integration_tests.scenarios.portal_test_env/client/client.ini)

  • You can verify the blockstack version of the api node by running curl localhost:6270/v1/node/ping

More Repositories

1

stacks-core

The Stacks blockchain implementation
Rust
3,010
star
2

stacks

Overview of Bitcoin's Stacks layer.
2,040
star
3

sbtc-developer-release

sBTC primitives, signer components, helper tools
Rust
1,983
star
4

gaia

A decentralized high-performance storage system
TypeScript
762
star
5

pybitcoin

A Bitcoin python library for private + public keys, addresses, transactions, & RPC
Python
274
star
6

sbtc

Repo containing sbtc
Rust
204
star
7

docs

Unleash Bitcoin's full potential with decentralized apps and smart contracts. The documentation covers key aspects of the Stacks network and technology and provides tutorials and other helpful content for developers.
JavaScript
157
star
8

blockstack.org

The Blockstack website
JavaScript
135
star
9

radiks

A client-side framework for building model-driven decentralized applications.
TypeScript
97
star
10

virtualchain

Library for scanning blockchains and running Blockstack state engines
Python
95
star
11

reading-list

Reading list of research papers on blockchains, P2P networks, consensus etc
79
star
12

clarity-js-sdk

Javascript SDK for interacting with Clarity smart contracts
TypeScript
63
star
13

blockstack-explorer

A block explorer for Blockstack
JavaScript
62
star
14

radiks-server

A server for indexing data in decentralized applications
TypeScript
55
star
15

zone-file-py

DNS Zone File Converter
Python
50
star
16

app-mining

For App Mining landing page development and App Mining operations.
49
star
17

jsontokens-js

Library for encoding, decoding, and verifying JSON Web Tokens (JWTs) in node.js
TypeScript
46
star
18

blockstack-android

The Blockstack Android library for identity, auth and storage
JavaScript
45
star
19

animal-kingdom

JavaScript
44
star
20

key-encoder-js

Library for encoding and decoding ecdsa private keys and converting between formats
TypeScript
44
star
21

blockstack-app-generator

Blockstack app generator
JavaScript
43
star
22

blockstack-ios

The Blockstack iOS library for identity, auth and storage
JavaScript
42
star
23

atlas

The Atlas peer network
CSS
41
star
24

app.co

The universal dapp store
JavaScript
39
star
25

blockstack-react-native

SDK for React Native
Kotlin
34
star
26

stacks-blockchain-docker

Stacks-blockchain with API using docker compose
Shell
28
star
27

blockstack-ruby

The Blockstack Ruby library for auth and identity
Ruby
26
star
28

designs

Blockstack designs
HTML
26
star
29

subdomain-registrar

Subdomain registrar for the Stacks network
JavaScript
20
star
30

stacks-transactions-js

The JavaScript library for generating Stacks 2.0 transactions
TypeScript
19
star
31

blockstack-proofs-py

For verifying proofs (twitter, github, domains etc) linked to a blockchain ID
Python
19
star
32

keychain-manager-js

A key system for hierarchical deterministic (HD / BIP32) keychains
JavaScript
15
star
33

python-utilitybelt

Miscellaneous python utilities.
Python
15
star
34

cli-blockstack

Node.js CLI for Blockstack, built on blockstack.js
TypeScript
14
star
35

sbtc-bridge-web

Web tool to facilitage peg operations for sBTC
Svelte
14
star
36

clarity-wasm

`clar2wasm` is a compiler for generating WebAssembly from Clarity.
Rust
13
star
37

keylib-py

Library for elliptic curve (ECDSA) private keys, public keys, and bitcoin addresses.
Python
12
star
38

blockstack-files

End-to-end encrypted file sharing with Blockstack
Python
12
star
39

omniauth-blockstack

OmniAuth Blockstack plugin
Ruby
11
star
40

c32check

Crockford base-32 encoding with 4-byte checksum
TypeScript
11
star
41

evangelists

10
star
42

blockstack-collections

TypeScript
10
star
43

BlockstackCoreApi-iOS-deprecated

The Blockstack Core API for iOS [deprecated]
Swift
10
star
44

sbtc-docs

Documentation about sBTC
JavaScript
9
star
45

daily-scrum

What community members are working on today
9
star
46

blockstack-utxo

Library for interfacing with various UTXO providers, including ones for testing purposes.
Python
9
star
47

discord-automod

Discord Bot for community moderation
JavaScript
9
star
48

discourse-blockstack

A discourse plugin to enable log in with Stacks
Ruby
9
star
49

blockstack-stats

A site for displaying live Blockstack stats
CSS
9
star
50

blockstack.go

Go
8
star
51

packaging

Packaging utilities for Blockstack repositories
Python
8
star
52

stacks-utils

Utilities for the Stacks blockchain.
JavaScript
6
star
53

stats

A client/server package for privacy-preserving analytics
JavaScript
6
star
54

sbtc-bridge-api

TypeScript
6
star
55

blockstack-search-indexer

Search indexer for Blockstack names and profiles
JavaScript
6
star
56

blockstack-storage-js

Blockstack storage API access for Javascript clients
JavaScript
6
star
57

clarity-vscode

VSCode extension for: Clarity Language Syntax Highlighting
6
star
58

send-many-stx-cli

A simple CLI for making a bulk STX transfer in one command.
TypeScript
6
star
59

blockstack.org-api

The proxy API for blockstack.org
Python
5
star
60

blockstack-explorer-api

TypeScript
5
star
61

blockstack-consensus-data

Test traces from prior versions to verify consensus continuity on hard forks
5
star
62

blockchainprotocols.org

Blockchain protocol stats
JavaScript
4
star
63

design-system

4
star
64

app.co-api

JavaScript
3
star
65

stacks-blockchain-testground

Go
3
star
66

.github

Repository to hold defaults such as CONTRIBUTING and CODE_OF_CONDUCT
3
star
67

stacks-test-tools

Repo for testing
TypeScript
3
star
68

whitepapers

Stacks whitepapers
3
star
69

stackit

UNDER CONSTRUCTION: Sample Application for Blockstack
JavaScript
2
star
70

atlas-monitor

Network monitoring for Blockstack's Atlas network
CSS
2
star
71

transaction-broadcaster

Transaction and Zonefile Broadcaster Service for Blockstack
JavaScript
2
star
72

when-activation

HTML
2
star
73

updates.blockstack.org

Update server for the Blockstack macOS app
2
star
74

blockstack-app-android

Java
1
star
75

docs-api

JavaScript
1
star
76

bounties

1
star
77

blockstack-todos-vue

CSS
1
star
78

clarity-benchmarking

Jupyter Notebook
1
star
79

blockstack-ledger-signer

Library for signing Blockstack transactions with a Ledger
JavaScript
1
star