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
olemis authored Nov 20, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents e0502ce + 18a810d commit 64371a1
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
@@ -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:
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

@@ -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.
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
@@ -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
@@ -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
@@ -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}'
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
@@ -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

@@ -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
@@ -4,6 +4,7 @@
SCRIPT=`basename ${BASH_SOURCE[0]}`

MODE="emulator"
WALLET_TYPE="deterministic"
TIMEOUT="60m"
# run go test with -v flag
VERBOSE=""
@@ -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;
@@ -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=$?
30 changes: 18 additions & 12 deletions cmd/cli/README.md
Original file line number Diff line number Diff line change
@@ -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
```

@@ -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
@@ -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
@@ -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
2 changes: 1 addition & 1 deletion cmd/cli/cli.go
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import (
"fmt"
"os"

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

func main() {
12 changes: 9 additions & 3 deletions src/cli/address_gen.go
Original file line number Diff line number Diff line change
@@ -5,11 +5,11 @@ import (
"os"
"runtime"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

gcli "github.com/urfave/cli"

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

func addressGenCmd() gcli.Command {
@@ -38,9 +38,15 @@ func addressGenCmd() gcli.Command {
Usage: "Device type to send instructions to, hardware wallet (USB) or emulator.",
EnvVar: "DEVICE_TYPE",
},
gcli.StringFlag{
Name: "walletType",
Usage: "Wallet type. Types are \"deterministic\" or \"bip44\"",
Required: true,
},
},
OnUsageError: onCommandUsageError(name),
Action: func(c *gcli.Context) {
walletType := c.String("walletType")
addressN := c.Int("addressN")
startIndex := c.Int("startIndex")
confirmAddress := c.Bool("confirmAddress")
@@ -60,7 +66,7 @@ func addressGenCmd() gcli.Command {
}

var pinEnc string
msg, err := device.AddressGen(uint32(addressN), uint32(startIndex), confirmAddress)
msg, err := device.AddressGen(uint32(addressN), uint32(startIndex), confirmAddress, walletType)
if err != nil {
log.Error(err)
return
4 changes: 2 additions & 2 deletions src/cli/apply_settings.go
Original file line number Diff line number Diff line change
@@ -7,9 +7,9 @@ import (

gcli "github.com/urfave/cli"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

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

func applySettingsCmd() gcli.Command {
4 changes: 2 additions & 2 deletions src/cli/backup.go
Original file line number Diff line number Diff line change
@@ -7,9 +7,9 @@ import (

gcli "github.com/urfave/cli"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

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

func backupCmd() gcli.Command {
2 changes: 1 addition & 1 deletion src/cli/cancel.go
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import (

gcli "github.com/urfave/cli"

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

func cancelCmd() gcli.Command {
2 changes: 1 addition & 1 deletion src/cli/check_message_signature.go
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import (

gcli "github.com/urfave/cli"

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

func checkMessageSignatureCmd() gcli.Command {
4 changes: 2 additions & 2 deletions src/cli/features.go
Original file line number Diff line number Diff line change
@@ -9,9 +9,9 @@ import (
"github.com/gogo/protobuf/proto"
gcli "github.com/urfave/cli"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

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

func featuresCmd() gcli.Command {
2 changes: 1 addition & 1 deletion src/cli/firmware_update.go
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import (

gcli "github.com/urfave/cli"

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

func firmwareUpdate() gcli.Command {
4 changes: 2 additions & 2 deletions src/cli/generate_mnemonic.go
Original file line number Diff line number Diff line change
@@ -5,11 +5,11 @@ import (
"os"
"runtime"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

gcli "github.com/urfave/cli"

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

func generateMnemonicCmd() gcli.Command {
2 changes: 1 addition & 1 deletion src/cli/get_mixed_entropy.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ package cli
import (
gcli "github.com/urfave/cli"

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

func getMixedEntropyCmd() gcli.Command {
2 changes: 1 addition & 1 deletion src/cli/get_raw_entropy.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ package cli
import (
gcli "github.com/urfave/cli"

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

func getRawEntropyCmd() gcli.Command {
45 changes: 28 additions & 17 deletions src/cli/integration/integration_test.go
Original file line number Diff line number Diff line change
@@ -13,10 +13,10 @@ import (
"testing"
"time"

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

messages "github.com/fibercrypto/skywallet-protob/go"
"github.com/gogo/protobuf/proto"
messages "github.com/skycoin/hardware-wallet-protob/go"
"github.com/skycoin/skycoin/src/util/logging"
"github.com/stretchr/testify/require"
)
@@ -36,7 +36,6 @@ const (
)

func execCommand(args ...string) *exec.Cmd {
args = append(args)
cmd := exec.Command(binaryPath, args...)
cmd.Env = os.Environ()
cmd.Env = append(cmd.Env, "AUTO_PRESS_BUTTONS="+autopressButtons())
@@ -64,6 +63,18 @@ func mode(t *testing.T) string {
return mode
}

func walletType(t *testing.T) string {
walletType := os.Getenv("HW_GO_INTEGRATION_TEST_WALLET_TYPE")
switch walletType {
case "":
walletType = skywallet.WalletTypeDeterministic
case skywallet.WalletTypeDeterministic, skywallet.WalletTypeBip44:
default:
t.Fatalf("Invalid wallet type %s, must be %s or %s", walletType, skywallet.WalletTypeDeterministic, skywallet.WalletTypeBip44)
}
return walletType
}

func enabled() bool {
return os.Getenv("HW_GO_INTEGRATION_TESTS") == "1"
}
@@ -94,7 +105,7 @@ func TestMain(m *testing.M) {
// Build cli binary file.
args := []string{"build", "-ldflags", "-X main.AUTO_PRESS_BUTTONS=true", "-o", binaryPath, "../../../cmd/cli/cli.go"}
if err := exec.Command("go", args...).Run(); err != nil {
fmt.Fprintf(os.Stderr, fmt.Sprintf("Make %v binary failed: %v\n", binaryName, err))
fmt.Fprint(os.Stderr, fmt.Sprintf("Make %v binary failed: %v\n", binaryName, err))
os.Exit(1)
}

@@ -215,14 +226,14 @@ func TestAddressGen(t *testing.T) {
expectOutput string
}{
{
name: "addressGen -n 2",
args: []string{"addressGen", "-addressN", "2"},
name: "addressGen -n 2 -wt " + walletType(t),
args: []string{"addressGen", "-addressN", "2", "--walletType", walletType(t)},
expectOutput: "[2EU3JbveHdkxW6z5tdhbbB2kRAWvXC2pLzw zC8GAQGQBfwk7vtTxVoRG7iMperHNuyYPs]",
},

{
name: "addressGen -n 2 -s 2",
args: []string{"addressGen", "-addressN", "2", "--startIndex", "2"},
name: "addressGen -n 2 -s 2 -wt " + walletType(t),
args: []string{"addressGen", "-addressN", "2", "--startIndex", "2", "--walletType", walletType(t)},
expectOutput: "[28L2fexvThTVz6e2dWUV4pSuCP8SAnCUVku 2NckPkQRQFa5E7HtqDkZmV1TH4HCzR2N5J6]",
},
}
@@ -699,7 +710,7 @@ func TestSignMessage(t *testing.T) {
return
}

output, err := execCommandCombinedOutput([]string{"signMessage", "--message", "Hello World"}...)
output, err := execCommandCombinedOutput([]string{"signMessage", "--message", "Hello World", "--walletType", walletType(t)}...)
if err != nil {
require.Equal(t, err, "exit status 1")
}
@@ -729,7 +740,7 @@ func TestTransactionSign(t *testing.T) {
{
name: "transactionSign sample 1",
args: []string{"transactionSign", "--inputHash", "181bd5656115172fe81451fae4fb56498a97744d89702e73da75ba91ed5200f9",
"--inputIndex", "0", "--outputAddress=K9TzLrgqz7uXn3QJHGxmzdRByAzH33J2ot", "--coin", "100000", "--hour", "2"},
"--inputIndex", "0", "--outputAddress=K9TzLrgqz7uXn3QJHGxmzdRByAzH33J2ot", "--coin", "100000", "--hour", "2", "--walletType", walletType(t)},
message: []string{"d11c62b1e0e9abf629b1f5f4699cef9fbc504b45ceedf0047ead686979498218"},
address: []string{"2EU3JbveHdkxW6z5tdhbbB2kRAWvXC2pLzw"},
},
@@ -738,7 +749,7 @@ func TestTransactionSign(t *testing.T) {
name: "transactionSign sample 2",
args: []string{"transactionSign", "--inputHash", "01a9ef6c25271229ef9760e1536c3dc5ccf0ead7de93a64c12a01340670d87e9",
"--inputHash", "8c2c97bfd34e0f0f9833b789ce03c2e80ac0b94b9d0b99cee6ea76fb662e8e1c", "--inputIndex", "0", "--inputIndex", "0",
"--outputAddress=K9TzLrgqz7uXn3QJHGxmzdRByAzH33J2ot", "--coin", "20800000", "--hour", "255"},
"--outputAddress=K9TzLrgqz7uXn3QJHGxmzdRByAzH33J2ot", "--coin", "20800000", "--hour", "255", "--walletType", walletType(t)},
message: []string{"9bbde062d665a8b11ae15aee6d4f32f0f3d61af55160c142060795a219378a54", "f947b0352b19672f7b7d04dc2f1fdc47bc5355878f3c47a43d4d4cfbae07d026"},
address: []string{"2EU3JbveHdkxW6z5tdhbbB2kRAWvXC2pLzw", "2EU3JbveHdkxW6z5tdhbbB2kRAWvXC2pLzw"},
},
@@ -749,7 +760,7 @@ func TestTransactionSign(t *testing.T) {
"--inputHash", "33e826d62489932905dd936d3edbb74f37211d68d4657689ed4b8027edcad0fb", "--inputIndex", "0",
"--inputHash", "668f4c144ad2a4458eaef89a38f10e5307b4f0e8fce2ade96fb2cc2409fa6592", "--inputIndex", "0",
"--outputAddress=K9TzLrgqz7uXn3QJHGxmzdRByAzH33J2ot", "--coin", "111000000", "--hour", "6464556",
"--outputAddress=2iNNt6fm9LszSWe51693BeyNUKX34pPaLx8", "--coin", "1900000", "--hour", "1"},
"--outputAddress=2iNNt6fm9LszSWe51693BeyNUKX34pPaLx8", "--coin", "1900000", "--hour", "1", "--walletType", walletType(t)},
message: []string{"ff383c647551a3ba0387f8334b3f397e45f9fc7b3b5c3b18ab9f2b9737bce039",
"c918d83d8d3b1ee85c1d2af6885a0067bacc636d2ebb77655150f86e80bf4417",
"0e827c5d16bab0c3451850cc6deeaa332cbcb88322deea4ea939424b072e9b97"},
@@ -760,7 +771,7 @@ func TestTransactionSign(t *testing.T) {
name: "transactionSign sample 4",
args: []string{"transactionSign", "--inputHash", "b99f62c5b42aec6be97f2ca74bb1a846be9248e8e19771943c501e0b48a43d82", "--inputIndex", "0",
"--inputHash", "cd13f705d9c1ce4ac602e4c4347e986deab8e742eae8996b34c429874799ebb2", "--inputIndex", "0",
"--outputAddress=22S8njPeKUNJBijQjNCzaasXVyf22rWv7gF", "--coin", "23100000", "--hour", "0"},
"--outputAddress=22S8njPeKUNJBijQjNCzaasXVyf22rWv7gF", "--coin", "23100000", "--hour", "0", "--walletType", walletType(t)},
message: []string{"42a26380399172f2024067a17704fceda607283a0f17cb0024ab7a96fc6e4ac6",
"5e0a5a8c7ea4a2a500c24e3a4bfd83ef9f74f3c2ff4bdc01240b66a41e34ebbf"},
address: []string{"2EU3JbveHdkxW6z5tdhbbB2kRAWvXC2pLzw", "2EU3JbveHdkxW6z5tdhbbB2kRAWvXC2pLzw"},
@@ -769,7 +780,7 @@ func TestTransactionSign(t *testing.T) {
{
name: "transactionSign sample 5",
args: []string{"transactionSign", "--inputHash", "4c12fdd28bd580989892b0518f51de3add96b5efb0f54f0cd6115054c682e1f1", "--inputIndex", "0",
"--outputAddress=2iNNt6fm9LszSWe51693BeyNUKX34pPaLx8", "--coin", "1000000", "--hour", "0"},
"--outputAddress=2iNNt6fm9LszSWe51693BeyNUKX34pPaLx8", "--coin", "1000000", "--hour", "0", "--walletType", walletType(t)},
message: []string{"c40e110f5e460532bfb03a5a0e50262d92d8913a89c87869adb5a443463dea69"},
address: []string{"2EU3JbveHdkxW6z5tdhbbB2kRAWvXC2pLzw"},
},
@@ -779,15 +790,15 @@ func TestTransactionSign(t *testing.T) {
args: []string{"transactionSign", "--inputHash", "c5467f398fc3b9d7255d417d9ca208c0a1dfa0ee573974a5fdeb654e1735fc59", "--inputIndex", "0",
"--outputAddress=K9TzLrgqz7uXn3QJHGxmzdRByAzH33J2ot", "--coin", "10000000", "--hour", "1",
"--outputAddress=VNz8LR9JTSoz5o7qPHm3QHj4EiJB6LV18L", "--coin", "5500000", "--hour", "0",
"--outputAddress=22S8njPeKUNJBijQjNCzaasXVyf22rWv7gF", "--coin", "4500000", "--hour", "1"},
"--outputAddress=22S8njPeKUNJBijQjNCzaasXVyf22rWv7gF", "--coin", "4500000", "--hour", "1", "--walletType", walletType(t)},
message: []string{"7edea77354eca0999b1b023014eb04638b05313d40711707dd03a9935696ccd1"},
address: []string{"2EU3JbveHdkxW6z5tdhbbB2kRAWvXC2pLzw"},
},

{
name: "transactionSign sample 7",
args: []string{"transactionSign", "--inputHash", "ae6fcae589898d6003362aaf39c56852f65369d55bf0f2f672bcc268c15a32da", "--inputIndex", "0",
"--outputAddress=3pXt9MSQJkwgPXLNePLQkjKq8tsRnFZGQA", "--coin", "1000000", "--hour", "1000"},
"--outputAddress=3pXt9MSQJkwgPXLNePLQkjKq8tsRnFZGQA", "--coin", "1000000", "--hour", "1000", "--walletType", walletType(t)},
message: []string{"47bfa37c79f7960df8e8a421250922c5165167f4c91ecca5682c1106f9010a7f"},
address: []string{"2EU3JbveHdkxW6z5tdhbbB2kRAWvXC2pLzw"},
},
@@ -796,7 +807,7 @@ func TestTransactionSign(t *testing.T) {
name: "transactionSign sample 8",
args: []string{"transactionSign", "--inputHash", "ae6fcae589898d6003362aaf39c56852f65369d55bf0f2f672bcc268c15a32da", "--inputIndex", "0",
"--outputAddress=3pXt9MSQJkwgPXLNePLQkjKq8tsRnFZGQA", "--coin", "300000", "--hour", "500",
"--outputAddress=S6Dnv6gRTgsHCmZQxjN7cX5aRjJvDvqwp9", "--coin", "700000", "--hour", "500"},
"--outputAddress=S6Dnv6gRTgsHCmZQxjN7cX5aRjJvDvqwp9", "--coin", "700000", "--hour", "500", "--walletType", walletType(t)},
message: []string{"e0c6e4982b1b8c33c5be55ac115b69be68f209c5d9054954653e14874664b57d"},
address: []string{"2EU3JbveHdkxW6z5tdhbbB2kRAWvXC2pLzw"},
},
4 changes: 2 additions & 2 deletions src/cli/recovery.go
Original file line number Diff line number Diff line change
@@ -7,9 +7,9 @@ import (

gcli "github.com/urfave/cli"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

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

func recoveryCmd() gcli.Command {
4 changes: 2 additions & 2 deletions src/cli/remove_pin_code.go
Original file line number Diff line number Diff line change
@@ -7,9 +7,9 @@ import (

gcli "github.com/urfave/cli"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

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

func removePinCode() gcli.Command {
4 changes: 2 additions & 2 deletions src/cli/set_mnemonic.go
Original file line number Diff line number Diff line change
@@ -5,11 +5,11 @@ import (
"os"
"runtime"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

gcli "github.com/urfave/cli"

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

func setMnemonicCmd() gcli.Command {
4 changes: 2 additions & 2 deletions src/cli/set_pin_code.go
Original file line number Diff line number Diff line change
@@ -7,9 +7,9 @@ import (

gcli "github.com/urfave/cli"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

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

func setPinCode() gcli.Command {
15 changes: 10 additions & 5 deletions src/cli/sign_message.go
Original file line number Diff line number Diff line change
@@ -7,9 +7,9 @@ import (

gcli "github.com/urfave/cli"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

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

func signMessageCmd() gcli.Command {
@@ -20,7 +20,7 @@ func signMessageCmd() gcli.Command {
Description: "",
Flags: []gcli.Flag{
gcli.IntFlag{
Name: "addressN",
Name: "addressIndex",
Value: 0,
Usage: "Index of the address that will issue the signature. Assume 0 if not set.",
},
@@ -33,6 +33,10 @@ func signMessageCmd() gcli.Command {
Usage: "Device type to send instructions to, hardware wallet (USB) or emulator.",
EnvVar: "DEVICE_TYPE",
},
gcli.StringFlag{
Name: "walletType",
Usage: "Wallet type. Types are \"deterministic\" or \"bip44\"",
},
},
OnUsageError: onCommandUsageError(name),
Action: func(c *gcli.Context) {
@@ -50,11 +54,12 @@ func signMessageCmd() gcli.Command {
}
}

addressN := c.Int("addressN")
addressIndex := c.Int("addressIndex")
message := c.String("message")
walletType := c.String("walletType")
var signature string

msg, err := device.SignMessage(addressN, message)
msg, err := device.SignMessage(1, addressIndex, message, walletType)
if err != nil {
log.Error(err)
return
12 changes: 9 additions & 3 deletions src/cli/transaction_sign.go
Original file line number Diff line number Diff line change
@@ -9,9 +9,9 @@ import (

gcli "github.com/urfave/cli"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

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

func transactionSignCmd() gcli.Command {
@@ -50,6 +50,11 @@ func transactionSignCmd() gcli.Command {
Usage: "Device type to send instructions to, hardware wallet (USB) or emulator.",
EnvVar: "DEVICE_TYPE",
},
gcli.StringFlag{
Name: "walletType",
Usage: "Wallet type. Types are \"deterministic\" or \"bip44\"",
Required: true,
},
},
OnUsageError: onCommandUsageError(name),
Action: func(c *gcli.Context) {
@@ -59,6 +64,7 @@ func transactionSignCmd() gcli.Command {
coins := c.Int64Slice("coin")
hours := c.Int64Slice("hour")
addressIndex := c.IntSlice("addressIndex")
walletType := c.String("walletType")

device := skyWallet.NewDevice(skyWallet.DeviceTypeFromString(c.String("deviceType")))
if device == nil {
@@ -102,7 +108,7 @@ func transactionSignCmd() gcli.Command {
transactionOutputs = append(transactionOutputs, &transactionOutput)
}

msg, err := device.TransactionSign(transactionInputs, transactionOutputs)
msg, err := device.TransactionSign(transactionInputs, transactionOutputs, walletType)
if err != nil {
log.Error(err)
return
2 changes: 1 addition & 1 deletion src/cli/usbhid.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ package cli
import (
gcli "github.com/urfave/cli"

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

func getUsbDetails() gcli.Command {
4 changes: 2 additions & 2 deletions src/cli/wipe.go
Original file line number Diff line number Diff line change
@@ -5,11 +5,11 @@ import (
"os"
"runtime"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

gcli "github.com/urfave/cli"

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

func wipeCmd() gcli.Command {
2 changes: 1 addition & 1 deletion src/skywallet/bit_encoded_flags_test.go
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import (
"math/rand"
"testing"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"
"github.com/stretchr/testify/suite"
)

6 changes: 3 additions & 3 deletions src/skywallet/helper.go
Original file line number Diff line number Diff line change
@@ -12,10 +12,10 @@ import (

"github.com/gogo/protobuf/proto"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

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

// DeviceType type of device: emulator or usb
85 changes: 84 additions & 1 deletion src/skywallet/messages.go
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import (
"github.com/gogo/protobuf/proto"
"github.com/skycoin/skycoin/src/cipher"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"
)

// MessageCancel prepare Cancel request
@@ -91,6 +91,30 @@ func MessageAddressGen(addressN, startIndex uint32, confirmAddress bool) ([][64]
return chunks, nil
}

// MessageAddressGenBip44 prepare MessageAddressGen request
func MessageAddressGenBip44(addressN, startIndex, coinType, account uint32, confirmAddress bool) ([][64]byte, error) {
skycoinAddress := &messages.SkycoinAddress{
ConfirmAddress: proto.Bool(confirmAddress),
StartIndex: proto.Uint32(0), // TODO remove this field from here
AddressN: proto.Uint32(0), // TODO remove this field from here
Bip44Addr: &messages.Bip44AddrIndex{
CoinType: proto.Uint32(firstHardenedChild + coinType), // coinType'
Account: proto.Uint32(firstHardenedChild + account), // account'
Change: proto.Uint32(0),
AddressStartIndex: proto.Uint32(startIndex),
AddressN: proto.Uint32(addressN),
},
}

data, err := proto.Marshal(skycoinAddress)
if err != nil {
return [][64]byte{}, err
}

chunks := makeSkyWalletMessage(data, messages.MessageType_MessageType_SkycoinAddress)
return chunks, nil
}

// MessageDeviceGetRawEntropy prepare GetEntropy request
func MessageDeviceGetRawEntropy(entropyBytes uint32) ([][64]byte, error) {
getEntropy := &messages.GetRawEntropy{
@@ -285,6 +309,29 @@ func MessageSignMessage(addressIndex int, message string) ([][64]byte, error) {
return chunks, nil
}

// MessageSignMessageBip44 prepare MessageSignMessage request
func MessageSignMessageBip44(startIndex, addressN, coinType, account uint32, message string) ([][64]byte, error) {
skycoinSignMessage := &messages.SkycoinSignMessage{
AddressN: proto.Uint32(uint32(0)), // TODO remove this field
Message: proto.String(message),
Bip44Addr: &messages.Bip44AddrIndex{
CoinType: proto.Uint32(firstHardenedChild + coinType), // coinType'
Account: proto.Uint32(firstHardenedChild + account), // account'
Change: proto.Uint32(0),
AddressStartIndex: proto.Uint32(startIndex),
AddressN: proto.Uint32(addressN),
},
}

data, err := proto.Marshal(skycoinSignMessage)
if err != nil {
return [][64]byte{}, err
}

chunks := makeSkyWalletMessage(data, messages.MessageType_MessageType_SkycoinSignMessage)
return chunks, nil
}

// MessageTransactionSign prepare MessageTransactionSign request
func MessageTransactionSign(inputs []*messages.SkycoinTransactionInput, outputs []*messages.SkycoinTransactionOutput) ([][64]byte, error) {
skycoinTransactionSignMessage := &messages.TransactionSign{
@@ -304,6 +351,42 @@ func MessageTransactionSign(inputs []*messages.SkycoinTransactionInput, outputs
return chunks, nil
}

// MessageTransactionSignBip44 prepare MessageTransactionSign request
func MessageTransactionSignBip44(coinType, account uint32, inputs []*messages.SkycoinTransactionInput, outputs []*messages.SkycoinTransactionOutput) ([][64]byte, error) {
for idxInput := range inputs {
inputs[idxInput].Bip44Addr = &messages.Bip44AddrIndex{
CoinType: proto.Uint32(firstHardenedChild + coinType), // coinType'
Account: proto.Uint32(firstHardenedChild + account), // account'
Change: proto.Uint32(0),
AddressStartIndex: proto.Uint32(*inputs[idxInput].Index),
AddressN: proto.Uint32(1),
}
}
for idxOutput := range outputs {
outputs[idxOutput].Bip44Addr = &messages.Bip44AddrIndex{
CoinType: proto.Uint32(firstHardenedChild + coinType), // coinType'
Account: proto.Uint32(firstHardenedChild + account), // account'
Change: proto.Uint32(0),
AddressStartIndex: proto.Uint32(*outputs[idxOutput].AddressIndex),
AddressN: proto.Uint32(1),
}
}
skycoinTransactionSignMessage := &messages.TransactionSign{
NbIn: proto.Uint32(uint32(len(inputs))),
NbOut: proto.Uint32(uint32(len(outputs))),
TransactionIn: inputs,
TransactionOut: outputs,
}

data, err := proto.Marshal(skycoinTransactionSignMessage)
if err != nil {
return [][64]byte{}, err
}

chunks := makeSkyWalletMessage(data, messages.MessageType_MessageType_TransactionSign)
return chunks, nil
}

// MessageWipe prepare MessageWipe request
func MessageWipe() ([][64]byte, error) {
wipeDevice := &messages.WipeDevice{}
4 changes: 2 additions & 2 deletions src/skywallet/mock_device_driver_test.go
4 changes: 2 additions & 2 deletions src/skywallet/mock_devicer_test.go
65 changes: 53 additions & 12 deletions src/skywallet/skywallet.go
Original file line number Diff line number Diff line change
@@ -7,13 +7,13 @@ import (
"sync"
"time"

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

"github.com/skycoin/skycoin/src/util/logging"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

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

var (
@@ -48,13 +48,27 @@ var (
ErrInvalidWordCount = errors.New("word count must be 12 or 24")
// ErrNoDeviceConnected is returned if no device is connected to the system
ErrNoDeviceConnected = errors.New("no device connected")
// ErrInvalidWalletType a valid wallet type should be specified
ErrInvalidWalletType = errors.New("invalid wallet type, options are: " + WalletTypeDeterministic + " or " + WalletTypeBip44)
)

const (
// WalletTypeDeterministic specify use deterministic derivation to get
// for example an address
WalletTypeDeterministic = "deterministic"

// WalletTypeBip44 specify use BIP 44 derivation to get
// for example an address
WalletTypeBip44 = "bip44"
coinTypeSkycoin = 8000
firstHardenedChild = uint32(0x80000000)
)

//go:generate mockery -name Devicer -case underscore -inpkg -testonly

// Devicer provides api for the hw wallet functions
type Devicer interface {
AddressGen(addressN, startIndex uint32, confirmAddress bool) (wire.Message, error)
AddressGen(addressN, startIndex uint32, confirmAddress bool, walletType string) (wire.Message, error)
ApplySettings(usePassphrase *bool, label string, language string) (wire.Message, error)
Backup() (wire.Message, error)
Cancel() (wire.Message, error)
@@ -67,8 +81,8 @@ type Devicer interface {
GenerateMnemonic(wordCount uint32, usePassphrase bool) (wire.Message, error)
Recovery(wordCount uint32, usePassphrase *bool, dryRun bool) (wire.Message, error)
SetMnemonic(mnemonic string) (wire.Message, error)
TransactionSign(inputs []*messages.SkycoinTransactionInput, outputs []*messages.SkycoinTransactionOutput) (wire.Message, error)
SignMessage(addressIndex int, message string) (wire.Message, error)
TransactionSign(inputs []*messages.SkycoinTransactionInput, outputs []*messages.SkycoinTransactionOutput, walletType string) (wire.Message, error)
SignMessage(addressN, addressIndex int, message string, walletType string) (wire.Message, error)
Wipe() (wire.Message, error)
PinMatrixAck(p string) (wire.Message, error)
WordAck(word string) (wire.Message, error)
@@ -192,7 +206,7 @@ func (d *Device) GetUsbInfo() ([]usb.Info, error) {
}

// AddressGen Ask the device to generate an address
func (d *Device) AddressGen(addressN, startIndex uint32, confirmAddress bool) (wire.Message, error) {
func (d *Device) AddressGen(addressN, startIndex uint32, confirmAddress bool, walletType string) (wire.Message, error) {
if err := d.Connect(); err != nil {
return wire.Message{}, err
}
@@ -202,7 +216,16 @@ func (d *Device) AddressGen(addressN, startIndex uint32, confirmAddress bool) (w
return wire.Message{}, ErrAddressNZero
}

addressGenChunks, err := MessageAddressGen(addressN, startIndex, confirmAddress)
var err error
var addressGenChunks [][64]byte
switch walletType {
case WalletTypeDeterministic:
addressGenChunks, err = MessageAddressGen(addressN, startIndex, confirmAddress)
case WalletTypeBip44:
addressGenChunks, err = MessageAddressGenBip44(addressN, startIndex, coinTypeSkycoin, 0, confirmAddress)
default:
return wire.Message{}, ErrInvalidWalletType
}
if err != nil {
return wire.Message{}, err
}
@@ -729,13 +752,22 @@ func (d *Device) SetMnemonic(mnemonic string) (wire.Message, error) {
}

// SignMessage Ask the device to sign a message using the secret key at given index.
func (d *Device) SignMessage(addressIndex int, message string) (wire.Message, error) {
func (d *Device) SignMessage(addressN, addressIndex int, message, walletType string) (wire.Message, error) {
if err := d.Connect(); err != nil {
return wire.Message{}, err
}
defer d.Disconnect()

signMessageChunks, err := MessageSignMessage(addressIndex, message)
var err error
var signMessageChunks [][64]byte
switch walletType {
case WalletTypeDeterministic:
signMessageChunks, err = MessageSignMessage(addressIndex, message)
case WalletTypeBip44:
signMessageChunks, err = MessageSignMessageBip44(uint32(addressIndex), uint32(addressN), coinTypeSkycoin, 0, message)
default:
return wire.Message{}, ErrInvalidWalletType
}
if err != nil {
return wire.Message{}, err
}
@@ -749,13 +781,22 @@ func (d *Device) SignMessage(addressIndex int, message string) (wire.Message, er
}

// TransactionSign Ask the device to sign a transaction using the given information.
func (d *Device) TransactionSign(inputs []*messages.SkycoinTransactionInput, outputs []*messages.SkycoinTransactionOutput) (wire.Message, error) {
func (d *Device) TransactionSign(inputs []*messages.SkycoinTransactionInput, outputs []*messages.SkycoinTransactionOutput, walletType string) (wire.Message, error) {
if err := d.Connect(); err != nil {
return wire.Message{}, err
}
defer d.Disconnect()

transactionSignChunks, err := MessageTransactionSign(inputs, outputs)
var err error
var transactionSignChunks [][64]byte
switch walletType {
case WalletTypeDeterministic:
transactionSignChunks, err = MessageTransactionSign(inputs, outputs)
case WalletTypeBip44:
transactionSignChunks, err = MessageTransactionSignBip44(coinTypeSkycoin, 0, inputs, outputs)
default:
return wire.Message{}, ErrInvalidWalletType
}
if err != nil {
return wire.Message{}, err
}
8 changes: 4 additions & 4 deletions src/skywallet/skywallet_test.go
Original file line number Diff line number Diff line change
@@ -5,9 +5,9 @@ import (
"sync"
"testing"

messages "github.com/skycoin/hardware-wallet-protob/go"
messages "github.com/fibercrypto/skywallet-protob/go"

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

"github.com/stretchr/testify/require"

@@ -71,7 +71,7 @@ func (suite *devicerSuit) TestAddressGen() {
}

for _, tc := range tt {
msg, err := device.AddressGen(tc.addressN, tc.startIndex, false)
msg, err := device.AddressGen(tc.addressN, tc.startIndex, false, WalletTypeDeterministic)
suite.Equal(err, tc.err)
suite.Equal(msg.Kind, tc.msgKind)
}
@@ -340,7 +340,7 @@ func (suite *devicerSuit) TestTransactionSign() {
device := getMockDevice(driverMock)

// NOTE(denisacostaq@gmail.com): When
msg, err := device.TransactionSign(nil, nil)
msg, err := device.TransactionSign(nil, nil, WalletTypeDeterministic)

// NOTE(denisacostaq@gmail.com): Assert
suite.Nil(err)
2 changes: 1 addition & 1 deletion src/skywallet/usb/hidapi.go
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ import (
"sync"
"sync/atomic"

lowlevel "github.com/skycoin/hardware-wallet-go/src/usb/lowlevel/hidapi"
lowlevel "github.com/fibercrypto/skywallet-go/src/usb/lowlevel/hidapi"
)

const (
2 changes: 1 addition & 1 deletion src/skywallet/usb/libusb.go
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import (
"sync"
"sync/atomic"

lowlevel "github.com/skycoin/hardware-wallet-go/src/usb/lowlevel/libusb"
lowlevel "github.com/fibercrypto/skywallet-go/src/usb/lowlevel/libusb"
)

const (
21 changes: 21 additions & 0 deletions vendor/github.com/cpuguy83/go-md2man/LICENSE.md
20 changes: 20 additions & 0 deletions vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go
285 changes: 285 additions & 0 deletions vendor/github.com/cpuguy83/go-md2man/md2man/roff.go

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions vendor/github.com/gogo/protobuf/proto/encode.go
1 change: 1 addition & 0 deletions vendor/github.com/gogo/protobuf/proto/extensions.go
21 changes: 21 additions & 0 deletions vendor/github.com/gogo/protobuf/proto/extensions_gogo.go
20 changes: 13 additions & 7 deletions vendor/github.com/gogo/protobuf/proto/lib.go
71 changes: 41 additions & 30 deletions vendor/github.com/gogo/protobuf/proto/properties.go
17 changes: 10 additions & 7 deletions vendor/github.com/gogo/protobuf/proto/table_marshal.go
19 changes: 19 additions & 0 deletions vendor/github.com/gogo/protobuf/proto/table_merge.go
22 changes: 13 additions & 9 deletions vendor/github.com/gogo/protobuf/proto/table_unmarshal.go
6 changes: 4 additions & 2 deletions vendor/github.com/gogo/protobuf/proto/text.go
6 changes: 3 additions & 3 deletions vendor/github.com/mattn/go-colorable/colorable_appengine.go
6 changes: 3 additions & 3 deletions vendor/github.com/mattn/go-colorable/colorable_others.go
43 changes: 34 additions & 9 deletions vendor/github.com/mattn/go-colorable/colorable_windows.go
6 changes: 3 additions & 3 deletions vendor/github.com/mattn/go-colorable/noncolorable.go
4 changes: 3 additions & 1 deletion vendor/github.com/mattn/go-isatty/go.mod
6 changes: 4 additions & 2 deletions vendor/github.com/mattn/go-isatty/go.sum
22 changes: 22 additions & 0 deletions vendor/github.com/mattn/go-isatty/isatty_plan9.go
39 changes: 35 additions & 4 deletions vendor/github.com/mattn/go-isatty/isatty_windows.go
8 changes: 8 additions & 0 deletions vendor/github.com/russross/blackfriday/.gitignore
17 changes: 17 additions & 0 deletions vendor/github.com/russross/blackfriday/.travis.yml
29 changes: 29 additions & 0 deletions vendor/github.com/russross/blackfriday/LICENSE.txt
369 changes: 369 additions & 0 deletions vendor/github.com/russross/blackfriday/README.md
1,474 changes: 1,474 additions & 0 deletions vendor/github.com/russross/blackfriday/block.go

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions vendor/github.com/russross/blackfriday/doc.go
1 change: 1 addition & 0 deletions vendor/github.com/russross/blackfriday/go.mod
Loading

0 comments on commit 64371a1

Please sign in to comment.