Skip to content

Commit

Permalink
Merge pull request #162 from simelo/stdevAlDen_t161_add_bip44_support
Browse files Browse the repository at this point in the history
add bip44 support - fixes #161
  • Loading branch information
olemis authored Nov 20, 2019
2 parents e0502ce + 18a810d commit 64371a1
Show file tree
Hide file tree
Showing 307 changed files with 34,334 additions and 6,112 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ linters-settings:
range-loops: true # Report preallocation suggestions on range loops, true by default
for-loops: false # Report preallocation suggestions on for loops, false by default
goimports:
local-prefixes: github.com/skycoin/hardware-wallet-go
local-prefixes: github.com/fibercrypto/skywallet-go


linters:
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ before_install:
- source ./ci-scripts/install-$TRAVIS_OS_NAME.sh

install:
- if [[ ! -d $GOPATH/src/github.com/skycoin/hardware-wallet-go ]]; then mkdir -p $GOPATH/src/github.com/skycoin; ln -s $TRAVIS_BUILD_DIR $GOPATH/src/github.com/skycoin/hardware-wallet-go; fi
- if [[ ! -d $GOPATH/src/github.com/fibercrypto/skywallet-go ]]; then mkdir -p $GOPATH/src/github.com/skycoin; ln -s $TRAVIS_BUILD_DIR $GOPATH/src/github.com/fibercrypto/skywallet-go; fi
- go get github.com/vektra/mockery/.../
- cd $GOPATH/src/github.com/skycoin/hardware-wallet-go
- cd $GOPATH/src/github.com/fibercrypto/skywallet-go
- make mocks
- make install-linters
- make lint
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed

### Changed
- Change `protobuf` file definitions from http://github.com/skycoin/hardware-wallet-protob.git to http://github.com/fibercrypto/skywallet-go.git

### Removed

Expand All @@ -20,6 +21,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

- Add flag `walletType` for `addressGen`, `signMessage` and `transactionSign`.
- Add travis CD instructions for github releases.
- Add BitEncodedFlags to encode/decode flags from/to a string.
- Add remove PIN code.
Expand Down
85 changes: 55 additions & 30 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
name = "github.com/skycoin/skycoin"
branch = "develop"

[[constraint]]
name = "github.com/skycoin/hardware-wallet-protob"
revision = "bd9f95c53447f97ac56f24a415c25d04680552de"

[[constraint]]
name = "github.com/gogo/protobuf"
version = "1.2.1"

[[constraint]]
branch = "develop"
name = "github.com/fibercrypto/skywallet-protob"
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mocks: ## Create all mock files for unit tests
mockery -name DeviceDriver -dir ./src/skywallet -case underscore -inpkg -testonly

test-unit: ## Run unit tests
go test -v github.com/skycoin/hardware-wallet-go/src/skywallet
go test -v github.com/fibercrypto/skywallet-go/src/skywallet

test-integration-emulator: ## Run emulator integration tests
./ci-scripts/integration-test.sh -a -m EMULATOR -n emulator-integration
Expand All @@ -52,8 +52,8 @@ lint: ## Run linters. Use make install-linters first.
golangci-lint run -c .golangci.yml ./...

format: ## Formats the code. Must have goimports installed (use make install-linters).
goimports -w -local github.com/skycoin/hardware-wallet-go ./cmd
goimports -w -local github.com/skycoin/hardware-wallet-go ./src
goimports -w -local github.com/fibercrypto/skywallet-go ./cmd
goimports -w -local github.com/fibercrypto/skywallet-go ./src

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ https://github.com/golang/go/wiki/Ubuntu
### Download source code

```bash
$ go get github.com/skycoin/hardware-wallet-go
$ go get github.com/fibercrypto/skywallet-go
```

### Dependancies management
Expand All @@ -54,7 +54,7 @@ $ make dep
$ go run cmd/cli/cli.go
```

See also [CLI README](https://github.com/skycoin/hardware-wallet-go/blob/master/cmd/cli/README.md) for information about the Command Line Interface.
See also [CLI README](https://github.com/fibercrypto/skywallet-go/blob/master/cmd/cli/README.md) for information about the Command Line Interface.

# Development guidelines

Expand Down Expand Up @@ -313,4 +313,4 @@ skycoin-cli walletBalance $WALLET2.wlt

## Wiki

More information in [the wiki](https://github.com/skycoin/hardware-wallet-go/wiki)
More information in [the wiki](https://github.com/fibercrypto/skywallet-go/wiki)
6 changes: 4 additions & 2 deletions ci-scripts/integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
SCRIPT=`basename ${BASH_SOURCE[0]}`

MODE="emulator"
WALLET_TYPE="deterministic"
TIMEOUT="60m"
# run go test with -v flag
VERBOSE=""
Expand All @@ -25,7 +26,7 @@ usage () {
exit 1
}

while getopts "h?m:r:n:vfa" args; do
while getopts "h?m:r:n:vfaw" args; do
case $args in
h|\?)
usage;
Expand All @@ -36,13 +37,14 @@ case $args in
v ) VERBOSE="-v";;
f ) FAILFAST="-failfast";;
a ) AUTO_PRESS_BUTTONS="1";;
w ) WALLET_TYPE=${OPTARG};;
esac
done


set +e

HW_GO_INTEGRATION_TESTS=1 HW_GO_INTEGRATION_TEST_MODE=$MODE AUTO_PRESS_BUTTONS=$AUTO_PRESS_BUTTONS \
HW_GO_INTEGRATION_TESTS=1 HW_GO_INTEGRATION_TEST_MODE=$MODE HW_GO_INTEGRATION_TEST_WALLET_TYPE=$WALLET_TYPE AUTO_PRESS_BUTTONS=$AUTO_PRESS_BUTTONS \
go test -count=1 ./src/cli/integration/... $FAILFAST -timeout=$TIMEOUT $VERBOSE $RUN_TESTS

TEST_FAIL=$?
Expand Down
30 changes: 18 additions & 12 deletions cmd/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Skycoin Hardware wallet command line interface
## Install

```bash
$ cd $GOPATH/src/github.com/skycoin/hardware-wallet-go/
$ cd $GOPATH/src/github.com/fibercrypto/skywallet-go/
$ ./install.sh
```

Expand Down Expand Up @@ -180,9 +180,11 @@ $ skycoin-hw-cli addressGen [number of addresses] [start index]

```
OPTIONS:
--addressN value Number of addresses to generate (default: 1)
--startIndex value Start to genereate deterministic addresses from startIndex (default: 0)
--confirmAddress If requesting one address it will be sent only if user confirms operation by pressing device's button.
--addressN value Number of addresses to generate. Assume 1 if not set. (default: 1)
--startIndex value Index where deterministic key generation will start from. Assume 0 if not set. (default: 0)
--confirmAddress If requesting one address it will be sent only if user confirms operation by pressing device's button.
--deviceType value Device type to send instructions to, hardware wallet (USB) or emulator. [$DEVICE_TYPE]
--walletType value Wallet type. Types are "deterministic" or "bip44"
```

#### Examples
Expand Down Expand Up @@ -302,8 +304,10 @@ $ skycoin-hw-cli signMessage [address index] [message to sign]

```
OPTIONS:
--addressN value Index of the address that will issue the signature. (default: 0)
--message value The message that the signature claims to be signing.
--addressIndex value Index of the address that will issue the signature. Assume 0 if not set. (default: 0)
--message value The message that the signature claims to be signing.
--deviceType value Device type to send instructions to, hardware wallet (USB) or emulator. [$DEVICE_TYPE]
--walletType value Wallet type. Types are "deterministic" or "bip44"
```

#### Examples
Expand Down Expand Up @@ -534,12 +538,14 @@ Ask the device to sign a message using the secret key at given index.

```
OPTIONS:
--inputHash value Hash of the Input of the transaction we expect the device to sign
--inputIndex value Index of the input in the wallet
--outputAddress string Addresses of the output for the transaction
--coin value Amount of coins
--hour value Number of hours
--addressIndex value If the address is a return address tell its index in the wallet
--inputHash value Hash of the Input of the transaction we expect the device to sign
--inputIndex value Index of the input in the wallet
--outputAddress value Addresses of the output for the transaction
--coin value Amount of coins
--hour value Number of hours
--addressIndex value If the address is a return address tell its index in the wallet
--deviceType value Device type to send instructions to, hardware wallet (USB) or emulator. [$DEVICE_TYPE]
--walletType value Wallet type. Types are "deterministic" or "bip44"
```

```bash
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/skycoin/hardware-wallet-go/src/cli"
"github.com/fibercrypto/skywallet-go/src/cli"
)

func main() {
Expand Down
Loading

0 comments on commit 64371a1

Please sign in to comment.