Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Commit

Permalink
Merge pull request #53 from andrerfneves/develop
Browse files Browse the repository at this point in the history
Release v0.3
  • Loading branch information
andrerfneves authored Jan 25, 2019
2 parents 829421b + 5c7fdd9 commit 03c4eac
Show file tree
Hide file tree
Showing 169 changed files with 25,806 additions and 8,360 deletions.
21 changes: 10 additions & 11 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-flow"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread"
]
}
{
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-flow"],
"plugins": [
"@babel/plugin-transform-regenerator",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-syntax-dynamic-import"
]
}
48 changes: 48 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: 2

jobs:
test:
docker:
- image: electronuserland/builder:wine-chrome
steps:
- checkout
- run: apt-get -y update
- run: apt install -y software-properties-common
- run: add-apt-repository ppa:jonathonf/ffmpeg-4
- run: apt-get -y update
- run: apt-get -y install libusb-1.0-0-dev graphicsmagick libudev-dev
- run: apt-get -y install tmux xvfb libxtst6 libxss1 libgtk2.0-0 libnss3 libasound2 libgconf-2-4 ffmpeg frei0r-plugins
# TODO: Just a quick try
- run: rm yarn.lock
- run: yarn install
- run:
name: Run Webpack
command: yarn dev
background: true
- run:
name: Run Mock RPC API
command: yarn e2e:serve
background: true
- run: yarn wait-on http://localhost:8080 && yarn wait-on http://localhost:18232
- run:
command: Xvfb :44 -auth /tmp/xvfb.auth -ac -screen 0 1024x768x24 -listen tcp
background: true
- run:
command: ffmpeg -y -f x11grab -video_size 1024x768 -i :44 -codec:v libx264 -r 12 /tmp/e2e-record.mp4
background: true
- run: DISPLAY=:44 yarn e2e:run
- run: |
kill -s SIGINT $(pgrep ffmpeg)
sleep 10
kill -s SIGTERM $(pgrep Xvfb)
- store_artifacts:
path: /tmp/e2e-record.mp4
destination: e2e-record.mp4
workflows:
version: 2
test:
jobs:
- test:
filters:
branches:
only: feature/e2e
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ZEC_PRICE_API_KEY=
103 changes: 48 additions & 55 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,55 +1,48 @@
{
"parser": "babel-eslint",
"extends": [
"airbnb",
"plugin:flowtype/recommended"
],
"env": {
"browser": true,
"node": true,
"mocha": true
},
"plugins": ["flowtype"],
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": true
}
},
"rules": {
"jsx-quotes": ["error", "prefer-single"],
"import/prefer-default-export": [
"off"
],
"react/jsx-filename-extension": [
1,
{ "extensions": [".js"] }
],
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": [
"Link"
],
"specialLink": [
"to",
"hrefLeft",
"hrefRight"
],
"aspects": [
"noHref",
"invalidHref",
"preferButton"
]
}
],
"jsx-a11y/no-autofocus": [ 0, {
"ignoreNonDOM": true
}],
"max-len": ["error", {
"ignoreUrls": true,
"ignoreComments": true,
"ignoreStrings": true,
"ignorePattern": "<p[^>]*>.*?</p>"
}]
}
}
{
"parser": "babel-eslint",
"extends": ["airbnb", "plugin:flowtype/recommended"],
"env": {
"browser": true,
"node": true,
"mocha": true,
"jest/globals": true
},
"plugins": ["flowtype", "jest"],
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": true
}
},
"rules": {
"jsx-quotes": ["error", "prefer-single"],
"import/prefer-default-export": ["off"],
"react/jsx-filename-extension": [1, { "extensions": [".js"] }],
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": ["Link"],
"specialLink": ["to", "hrefLeft", "hrefRight"],
"aspects": ["noHref", "invalidHref", "preferButton"]
}
],
"jsx-a11y/no-autofocus": [
0,
{
"ignoreNonDOM": true
}
],
"max-len": [
"error",
{
"code": 100,
"tabWidth": 2,
"ignoreUrls": true,
"ignoreComments": true,
"ignoreStrings": true,
"ignorePattern": "<p[^>]*>.*?</p>",
"ignoreTrailingComments": true
}
],
"consistent-return": 0
}
}
4 changes: 4 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
[ignore]
.*/node_modules/polished/.*
./__tests__

[include]

[libs]
flow-typed

[lints]

[options]
esproposal.optional_chaining=enable

[strict]
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ node_modules
dist
.DS_Store
flow-coverage
build
.docz
coverage
flow-typed
.env
75 changes: 75 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of
experience, nationality, personal appearance, race, religion, or sexual identity
and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening,
offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an
incident. Further details of specific enforcement policies may be posted
separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Zcash Foundation
Copyright (c) 2019 Zcash Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
72 changes: 65 additions & 7 deletions NODE.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
# Zcash Node Setup

## Installation
The original `zcashd` daemon built by the Zcash Company, is built entirely in for Linux systems. If you're running a Linux distro, you should look [here](https://github.com/zcash/zcash) for instructions on how to install it.

Download the attached files, verify checksum of the archive and extract
For macOS users, please follow [this guide](https://github.com/kozyilmaz/zcash-apple) to build the binaries locally on your machine and then install it. After downloading the tarball and the hash, use the steps below to kickstart your node and connect it to the network.

## Installing

Download the attached files from Zcash Apple repository, verify the checksum of the archive and then extract its contents:

```bash
shasum -a 256 -c zcash-macos-v2.0.1a.tar.bz2.hash
tar -xvf zcash-macos-v2.0.1a.tar.bz2
```

## How to use
## Running

When launching Zcash on MacOS for the first time, certain initialization steps should be completed.
Please run the commands below once for the first time
When launching Zcash on macOS for the first time, certain initialization steps should be completed. Please run the commands below once for the first time

```
cd zcash-macos-v2.0.1a/usr/local/bin
./zcash-fetch-params
./zcash-init
./zcashd
```

You can just run Zcash by launching the daemon afterwards:
Expand All @@ -27,4 +29,60 @@ You can just run Zcash by launching the daemon afterwards:
./zcashd
```

You can refer to NODE_COMMANDS for basic usage
## Basic Commands

Along with `zcashd`, the daemon provides the `zcash-cli` utility which allows you to run RPC commands to your node, and receive the output data.

Some useful commands can be found below:

### General

> List information for a command
```bash
./zcash-cli help <command>
```

> List all shielded addresses
```bash
./zcash-cli z_listaddresses
```

> Create new shielded address
```bash
./zcash-cli z_getnewaddress
```

> Get total balance
```bash
./zcash-cli z_gettotalbalance
```

### Sending Funds
```bash
export ZADDR='zcNeXiyD3JkhKTrU38xM9C6HQGy9aP5qqVFH25qFzQGnmdwYZ2Dr53Jy7iRp64D4CzkMZdmKagN6mmtu3jVKHuZ8xZp8fw3'
export FRIEND='zcfZJW3qLHpSc7q7W1SXRGdVjgM6Q6kRwdkz1DHW5sP2EqcMHf5RCp3Frpf2qnb81j9K6upzRN4HoVxfboVwLTRaZ7bKn8b'
```

> Send from shielded address to shielded address (with memo and fee)
```bash
./zcash-cli z_sendmany "$ZADDR" "[{\"address\": \"$FRIEND\", \"amount\": 0.05, \"memo\": \"9876543210\"}]" 1 0.002
```

> Get send result
```bash
./zcash-cli z_getoperationresult [\"$OPID\"]
```

> List amounts received by shielded address
```bash
./zcash-cli z_listreceivedbyaddress "$ZADDR"
```

## Helpful Resources

* [Zcash Documentation (ReadTheDocs)](https://zcash.readthedocs.io/en/latest/rtd_pages/user_guide.html)
* [Zcash Apple Daemon](https://github.com/kozyilmaz/zcash-apple)
* [Zcash Community Forum](https://forum.zcashcommunity.com/)
* [Zcash Foundation](https://z.cash.foundation/)
* [Zcash Daemon](https://github.com/zcash/zcash)
* [Zcash Payment API Docs](https://github.com/zcash/zcash/blob/master/doc/payment-api.md)
Loading

0 comments on commit 03c4eac

Please sign in to comment.