-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d6291a2
Showing
150 changed files
with
46,609 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
REACT_APP_INFURA_KEY='b7d2af9f01534031ba773374f766ef65' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
REACT_APP_DEV_MNEMONIC='benefit crew supreme gesture quantum web media hazard theory mercy wing kitten' | ||
REACT_APP_DEV_GALAXY_TICKET='~wacfus-dabpex-danted-mosfep-pasrud-lavmer-nodtex-taslus-pactyp-milpub-pildeg-fornev-ralmed-dinfeb-fopbyr-sanbet-sovmyl-dozsut-mogsyx-mapwyc-sorrup-ricnec-marnys-lignex' | ||
REACT_APP_ROPSTEN_KEY='b7d2af9f01534031ba773374f766ef65' | ||
REACT_APP_HD_PATH="m/44'/60'/0'/0/0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
/ref | ||
|
||
/deprecated | ||
|
||
bridge*.tar.gz | ||
checksums.txt | ||
|
||
*.pem |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Changelog | ||
|
||
- 0.5.0 (2019-01-14) | ||
This release adds a bunch of additional features and last-mile polish, | ||
and also makes a number of bugfixes. | ||
|
||
* Improved validation and style throughout. | ||
* Improved error handling and presentation to the user. | ||
* Enables mainnet! | ||
* Adds Trezor support. | ||
* Adds ability to generate Arvo keyfiles. | ||
* Displays points for additional proxy rights in the 'Points' view. | ||
* Allows authentication with sharded master tickets. | ||
* Provides name suggestions when spawning children. | ||
* And more! | ||
|
||
- 0.4.0 (2018-12-28) | ||
This release largely focuses on UX: | ||
|
||
* Improved information rendering in Point details view. Actions now | ||
better-respect permissions, and addresses/keys are only displayed if | ||
set. | ||
* Adds a point's spawned children to its details view. | ||
* Supplements the Points view with a list of outgoing transfers, and adds | ||
an action to the Point details view for cancelling such transfers. | ||
* Misc bugfixes, style enhancements, and minor improvements. | ||
|
||
- 0.3.0 (2018-12-21) | ||
Adds the following features: | ||
|
||
* Ledger support for authentication and transaction signing. | ||
* Style overhaul from reactstrap to base. | ||
* Final Azimuth contracts support. | ||
* Custom HD path support when authenticating via BIP39. | ||
* Offline mode, complete with offline transaction signing. | ||
* Ability to lookup/view the details of an arbitrary point. | ||
* Basic push/pull point transfer flow. | ||
* Ropsten support. | ||
|
||
- 0.2.1 (2018-11-26) | ||
* Use updated urbit-constitution-js dependency that fixes a webpack build | ||
issue. | ||
|
||
- 0.2.0 (2018-11-20) | ||
Initial release of the refactored Bridge series. A basic application that | ||
supports: | ||
|
||
* A local testnet running Ganache. | ||
* Authentication with both BIP39 mnemonics (i.e. UP8 seeds) and UP8 master | ||
tickets. | ||
* Setting of transfer/management/spawn proxies. | ||
* Setting of Urbit network keys. | ||
* Creation of galaxies (for the constitution owner). | ||
* Transfer of ships. | ||
* And probably some other stuff. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# bridge | ||
|
||
An application for interacting with Azimuth. | ||
|
||
## Install | ||
|
||
Clone the repo, and use a simple `npm install`. | ||
|
||
## Build | ||
|
||
You can use a `npm run build` to create an optimised static build. | ||
|
||
## Usage | ||
|
||
The build directory needs to be served with a static server; you can use the | ||
`bridge` script to start serving the site at localhost:5000. | ||
|
||
### Ledger support | ||
|
||
To authenticate and sign transactions with a Ledger, Bridge must be serving | ||
over HTTPS on localhost. This requires self-signed certificates. You can do | ||
this via the following: | ||
|
||
* Install [mkcert](https://github.com/FiloSottile/mkcert) | ||
* Install a local certificate authority via `mkcert -install` | ||
* In your `bridge` directory, generate a certificate valid for localhost via | ||
`mkcert localhost`. This will produce two files: `localhost.pem`, the local | ||
certificate, and `localhost-key.pem`, its corresponding private key. | ||
* Run `python bridge-https.py` | ||
|
||
Bridge will serve to localhost over HTTPS on port 4443 | ||
|
||
## Development | ||
|
||
### General notes | ||
|
||
Use `npm run pilot` to get going. This will boot up a Ganache node in | ||
the background, deploy the Azimuth contracts to it, and fire up a local | ||
webserver. Bridge will be served on `localhost:3000`. | ||
|
||
Note that one of our dependencies itself depends on a library called | ||
`handle-thing` which breaks under the Ledger support requirements (see below) | ||
on node 11.1.0, so make sure you're using some other node version. | ||
|
||
You can use [nvm](https://github.com/creationix/nvm), for example, and do: | ||
|
||
``` | ||
$ nvm install 11.0.0 | ||
$ nvm use v11.0.0 | ||
``` | ||
|
||
before running `npm run pilot`. | ||
|
||
### Useful Accounts | ||
|
||
The ecliptic owner is the only account that's able to create galaxies, so | ||
it's a good place to get started. On the testnet, it's the address: | ||
|
||
``` | ||
0x6DEfFb0caFDB11D175F123F6891AA64F01c24F7d | ||
``` | ||
|
||
You can authenticate as it using the following mnemonic: | ||
|
||
``` | ||
benefit crew supreme gesture quantum web media hazard theory mercy wing kitten | ||
``` | ||
|
||
Under that mnemonic, Ganache will also auto-populate the following accounts | ||
with 100 ETH: | ||
|
||
``` | ||
0x6deffb0cafdb11d175f123f6891aa64f01c24f7d | ||
0xd53208cf45fc9bd7938b200bff8814a26146688f | ||
0x7b2a2d51e4d8fac602e20a5f6907ff9fbd88e1fd | ||
0xf48062ae8bafd6ef19cd6cb89db93a0d0ca6ce26 | ||
0xf84a77aeb351c49dfa87e805a659d2daddff7606 | ||
0x167e357cf8b845370d0d408f9b389b66185b7b5b | ||
0xcbecf3abc9878f07afc851aead2d8f1c436cc71d | ||
0x0afc0c3f4eeea500871f464ca71eef5e54a9af36 | ||
0x6d654ef2489674d21aed428e8a4ad8ca4820f125 | ||
0x218f6f87683db546ad47a5dc8b480e5a9b694866 | ||
``` | ||
|
||
To play around with any of these, authenticate using the same mnemonic, but | ||
use a custom HD path of `m/44'/60'/0'/0/1`, `m/44'/60'/0'/0/2`, and so on. | ||
|
||
### Initial Development State | ||
|
||
You can also tweak a couple of things to change your development state | ||
somewhat (say, for example, you want to start on the points list screen, instead | ||
of having to re-authenticate whenever you make a change or refresh the page): | ||
|
||
* The `.env.development` file contains environment variables that you can | ||
provide to the application when it's running in development. You can access | ||
them via `process.env.REACT_APP_<whatever>`. | ||
|
||
* The `componentDidMount` method of the Bridge component in `src/Bridge.js` | ||
can be tweaked for setting your initial state. You can provide a specific | ||
wallet, network type, and so on. | ||
|
||
### HTTPS | ||
|
||
For development, you can enable HTTPS on localhost without a certificate for | ||
Chrome by pasting the following into the URL bar: | ||
|
||
``` | ||
chrome://flags/#allow-insecure-localhost | ||
``` | ||
|
||
Additionally you need to run with the `HTTPS` environment variable set to | ||
`true`. Note that `npm run pilot` will handle this automatically. | ||
|
||
### Releases | ||
|
||
To generate a release `.tar.gz` file, use a simple `npm run release`. | ||
|
||
This will pack the build directory together with the `bridge` and | ||
`bridge-https.py` scripts, and also generate a set of checksums for the build | ||
directory. You can verify the checksums on e.g. OS X via `shasum -c | ||
checksums.txt`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import BaseHTTPServer, SimpleHTTPServer | ||
import os | ||
import ssl | ||
|
||
httpd = BaseHTTPServer.HTTPServer(('localhost', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler) | ||
httpd.socket = ssl.wrap_socket (httpd.socket, certfile='localhost.pem', keyfile='localhost-key.pem', server_side=True) | ||
os.chdir('./build') | ||
httpd.serve_forever() |
Oops, something went wrong.