diff --git a/.golangci.yml b/.golangci.yml index 0c42868..9c98528 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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/SkycoinProject/hardware-wallet-go + local-prefixes: github.com/skycoin/hardware-wallet-go linters: diff --git a/.travis.yml b/.travis.yml index da4a750..41842b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,9 @@ before_install: - source ./ci-scripts/install-$TRAVIS_OS_NAME.sh install: - - if [[ ! -d $GOPATH/src/github.com/SkycoinProject/hardware-wallet-go ]]; then mkdir -p $GOPATH/src/github.com/skycoin; ln -s $TRAVIS_BUILD_DIR $GOPATH/src/github.com/SkycoinProject/hardware-wallet-go; fi - - go get github.com/vektra/mockery/.../ - - cd $GOPATH/src/github.com/SkycoinProject/hardware-wallet-go + - 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 + - go get github.com/vektra/mockery/v2/.../ + - cd $GOPATH/src/github.com/skycoin/hardware-wallet-go - make mocks - make install-linters - make lint @@ -31,7 +31,7 @@ before_script: fi # Install hardware wallet for running tests against emulator - mkdir -p tmp/hardware-wallet - - git clone --depth=1 --single-branch --branch develop https://github.com/SkycoinProject/hardware-wallet.git tmp/hardware-wallet + - git clone --depth=1 --single-branch --branch develop https://github.com/skycoin/hardware-wallet.git tmp/hardware-wallet - git -C tmp/hardware-wallet submodule update --init # Install OS-specific test and build dependencies for hardware-wallet - ( cd ./tmp/hardware-wallet && sh "ci-scripts/install-${TRAVIS_OS_NAME}.sh" ) @@ -88,6 +88,5 @@ deploy: skip_cleanup: true draft: true on: - repo: SkycoinProject/hardware-wallet-go + repo: skycoin/hardware-wallet-go tags: true - diff --git a/Gopkg.toml b/Gopkg.toml index 8e942a5..017b79e 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -30,11 +30,11 @@ [[constraint]] - name = "github.com/SkycoinProject/skycoin" + name = "github.com/skycoin/skycoin" branch = "develop" [[constraint]] - name = "github.com/SkycoinProject/hardware-wallet-protob" + name = "github.com/skycoin/hardware-wallet-protob" branch = "develop" [[constraint]] diff --git a/Makefile b/Makefile index b8cdf87..03d055a 100644 --- a/Makefile +++ b/Makefile @@ -22,11 +22,11 @@ dep: ## Ensure package dependencies are up to date mocks: ## Create all mock files for unit tests echo "Generating mock files" - mockery -name Devicer -dir ./src/skywallet -case underscore -inpkg -testonly - mockery -name DeviceDriver -dir ./src/skywallet -case underscore -inpkg -testonly + mockery --name Devicer --dir ./src/skywallet --case underscore --inpackage + mockery --name DeviceDriver --dir ./src/skywallet --case underscore --inpackage test-unit: ## Run unit tests - go test -v github.com/SkycoinProject/hardware-wallet-go/src/skywallet + go test -v github.com/skycoin/hardware-wallet-go/src/skywallet test-integration-emulator: ## Run emulator integration tests ./ci-scripts/integration-test.sh -a -m EMULATOR -n emulator-integration @@ -50,8 +50,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/SkycoinProject/hardware-wallet-go ./cmd - goimports -w -local github.com/SkycoinProject/hardware-wallet-go ./src + goimports -w -local github.com/skycoin/hardware-wallet-go ./cmd + goimports -w -local github.com/skycoin/hardware-wallet-go ./src help: @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' diff --git a/cmd/cli/README.md b/cmd/cli/README.md index d0a67fc..ed0e9ce 100644 --- a/cmd/cli/README.md +++ b/cmd/cli/README.md @@ -183,7 +183,7 @@ OPTIONS: --addressN value Number of addresses to generate (default: 1) --startIndex value Start to generate 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. - --coinType Coin Type, which will be used on hardware-wallet. Supported values: SKY, BTC (default: SKY)) + --coinType Coin Type, which will be used on hardware-wallet. Supported values: SKY, BTC (default: SKY)) ``` #### Examples @@ -542,7 +542,7 @@ OPTIONS: --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 - --coinType Coin Type, which will be used on hardware-wallet. Supported values: SKY, BTC (default: SKY)) + --coinType Coin Type, which will be used on hardware-wallet. Supported values: SKY, BTC (default: SKY)) ``` ```bash @@ -614,3 +614,42 @@ INFO [skycoin-hw-cli]: Getting mixed entropy from device A real example about how to use this feature can be checked at the [TRNG validation](https://github.com/SkycoinProject/hardware-wallet/tree/8edc2a28027875f464b68348c44fb188efb4dfbb#validate-the-trng) (please get noticed that the firmware should be build with this feature enabled trough `ENABLE_GETENTROPY`). The tool is use specifically [from here](https://github.com/SkycoinProject/hardware-wallet/blob/8edc2a28027875f464b68348c44fb188efb4dfbb/trng-test/Makefile#L7-L8). + + +## For developers purpose only +### deterministicBuild + +Test for deterministic builds of address + +``` +OPTIONS: + --file_name string Name of file to store results (JSON only!!!!!!) + --mnemonic string Mnemonic for HW + --file_action string Two actions allowed - APPEND or OVERWRITE + --coinType value SKY only + --deviceType value EMULATOR only +``` +#### Examples + +```bash +$ skycoin-hw-cli deterministicBuild --file_name="test.json" --mnemonic="wire junk original sword bread bottom armor dog snow accident inform rigid" --file_action="OVERWRITE" --coinType=SKY --deviceType=EMULATOR +``` + +If you want automate testing deterministic builds, you can write simple Python or bash script + +```python +import os + +#set mnemonic and file to store results (should be JSON only) +mnemonics = ["wire junk original sword bread bottom armor dog snow accident inform rigid", + "all all all all all all all all all all all all"] + +filename = "test.json" + +#set env variable for button auto press +os.environ["AUTO_PRESS_BUTTONS"] = "1" + +for mnemonic in mnemonics: + #run command in terminal using Python + os.system('skycoin-hw-cli deterministicBuild --file_name="{0}" --mnemonic="{1}" --file_action="{2}" --coinType=SKY --deviceType=EMULATOR'.format(filename, mnemonic, "APPEND")) +``` diff --git a/src/cli/address_gen.go b/src/cli/address_gen.go index 807717b..0df893f 100644 --- a/src/cli/address_gen.go +++ b/src/cli/address_gen.go @@ -5,11 +5,11 @@ import ( "os" "runtime" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" gcli "github.com/urfave/cli" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func addressGenCmd() gcli.Command { diff --git a/src/cli/apply_settings.go b/src/cli/apply_settings.go index 6d9c195..8cc979a 100644 --- a/src/cli/apply_settings.go +++ b/src/cli/apply_settings.go @@ -7,9 +7,9 @@ import ( gcli "github.com/urfave/cli" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func applySettingsCmd() gcli.Command { diff --git a/src/cli/backup.go b/src/cli/backup.go index ba2c54a..00e309b 100644 --- a/src/cli/backup.go +++ b/src/cli/backup.go @@ -7,9 +7,9 @@ import ( gcli "github.com/urfave/cli" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func backupCmd() gcli.Command { diff --git a/src/cli/cancel.go b/src/cli/cancel.go index 6a2feb6..627bb41 100644 --- a/src/cli/cancel.go +++ b/src/cli/cancel.go @@ -7,7 +7,7 @@ import ( gcli "github.com/urfave/cli" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func cancelCmd() gcli.Command { diff --git a/src/cli/check_message_signature.go b/src/cli/check_message_signature.go index 31d77f7..39ed037 100644 --- a/src/cli/check_message_signature.go +++ b/src/cli/check_message_signature.go @@ -7,7 +7,7 @@ import ( gcli "github.com/urfave/cli" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func checkMessageSignatureCmd() gcli.Command { diff --git a/src/cli/cli.go b/src/cli/cli.go index a70fe7b..f98cb7d 100644 --- a/src/cli/cli.go +++ b/src/cli/cli.go @@ -6,7 +6,7 @@ package cli import ( "fmt" - "github.com/SkycoinProject/skycoin/src/util/logging" + "github.com/skycoin/skycoin/src/util/logging" gcli "github.com/urfave/cli" ) @@ -98,6 +98,7 @@ func NewApp() (*App, error) { getRawEntropyCmd(), getMixedEntropyCmd(), getUsbDetails(), + deterministicBuildCmd(), } app.Name = "skycoin-hw-cli" diff --git a/src/cli/deterministic_builds.go b/src/cli/deterministic_builds.go new file mode 100644 index 0000000..0d899bb --- /dev/null +++ b/src/cli/deterministic_builds.go @@ -0,0 +1,228 @@ +package cli + +import ( + "os" + "runtime" + "fmt" + "strings" + + gcli "github.com/urfave/cli" + + messages "github.com/skycoin/hardware-wallet-protob/go" + + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" +) + +func deterministicBuildCmd() gcli.Command { + name := "deterministicBuild" + return gcli.Command{ + Name: name, + Usage: "Checks deterministic builds (for developer purposes only)", + Description: "", + + Flags: []gcli.Flag{ + gcli.StringFlag{ + Name: "mnemonic", + Usage: "Mnemonic that will be stored in the device to generate addresses.", + }, + gcli.StringFlag{ + Name: "file_name", + Usage: "Name of file to store results of a tool", + }, + gcli.StringFlag{ + Name: "file_action", + Usage: "Two options to interact with file - overwrite (OVERWRITE) or append to existed (APPEND)", + }, + gcli.StringFlag{ + Name: "deviceType", + Usage: "Device type to send instructions to, hardware wallet (USB) or emulator.", + EnvVar: "DEVICE_TYPE", + }, + gcli.StringFlag{ + Name: "coinType", + Value: "SKY", + Usage: "Coin type to use on hardware-wallet.", + EnvVar: "COIN_TYPE", + }, + }, + + OnUsageError: onCommandUsageError(name), + + Action: func(c *gcli.Context) { + //grt coinType (only SKY) + coinType, err := skyWallet.CoinTypeFromString(c.String("coinType")) + + file_name := c.String("file_name") + + if err != nil { + log.Error(err) + return + } + + //initialize HW + device := skyWallet.NewDevice(skyWallet.DeviceTypeFromString(c.String("deviceType"))) + if device == nil { + return + } + + defer device.Close() + + //set AUTO_PRESS_BUTTONS + if os.Getenv("AUTO_PRESS_BUTTONS") == "1" && device.Driver.DeviceType() == skyWallet.DeviceTypeEmulator && runtime.GOOS == "linux" { + err := device.SetAutoPressButton(true, skyWallet.ButtonRight) + if err != nil { + log.Error(err) + return + } + } + + toolResult := result{Mnemonic: c.String("mnemonic")} + + start := time.Now() + + switch coinType { + case skyWallet.SkycoinCoinType: + + //set mnemonic + mnemonic := c.String("mnemonic") + msg, err := device.SetMnemonic(mnemonic) + if err != nil { + log.Error(err) + return + } + + if msg.Kind == uint16(messages.MessageType_MessageType_ButtonRequest) { + msg, err = device.ButtonAck() + if err != nil { + log.Error(err) + return + } + } + + responseMsg, err := skyWallet.DecodeSuccessOrFailMsg(msg) + if err != nil { + log.Error(err) + return + } + + fmt.Println(responseMsg) + + //if device already with mnemonic - wipe and generate new + if strings.Compare(responseMsg, + "Device is already initialized. Use Wipe first.") == 0 { + fmt.Println("Wiping...") + + msg, err := device.Wipe() + if err != nil { + log.Error(err) + return + } + + if msg.Kind == uint16(messages.MessageType_MessageType_ButtonRequest) { + msg, err = device.ButtonAck() + if err != nil { + log.Error(err) + return + } + } + + responseMsg, err := skyWallet.DecodeSuccessOrFailMsg(msg) + if err != nil { + log.Error(err) + return + } + + if len(responseMsg) > 0 { + fmt.Println(responseMsg) + } else { + fmt.Println("Firmware was successfully wiped from the device") + } + + msg, err = device.SetMnemonic(mnemonic) + + if err != nil { + log.Error(err) + } + + if msg.Kind == uint16(messages.MessageType_MessageType_ButtonRequest) { + // Send ButtonAck + msg, err = device.ButtonAck() + if err != nil { + log.Error(err) + } + } + + responseMsg, err = skyWallet.DecodeSuccessOrFailMsg(msg) + if err != nil { + log.Error(err) + } + + fmt.Println(responseMsg) + } + + //get keypair and address + msg, err = device.AddressGen(1, 1, false, coinType) + + if err != nil { + log.Error(err) + } + + for msg.Kind != uint16(messages.MessageType_MessageType_ResponseSkycoinAddress) && msg.Kind != uint16(messages.MessageType_MessageType_Failure) { + fmt.Println("Error") + } + if msg.Kind == uint16(messages.MessageType_MessageType_ResponseSkycoinAddress) { + addresses, err := skyWallet.DecodeResponseSkycoinAddress(msg) + if err != nil { + log.Error(err) + } + fmt.Println(addresses) + toolResult.Address = addresses[0] + } else { + failMsg, err := skyWallet.DecodeFailMsg(msg) + if err != nil { + log.Error(err) + } + fmt.Println("Failed with code: ", failMsg) + } + default: + fmt.Println("Error") + } + toolResult.Duration = time.Since(start).Nanoseconds() + + string_to_write := fmt.Sprintf("Mnemonic: %s, Duration: %d, Address: %s", toolResult.Mnemonic, toolResult.Duration, toolResult.Address) + + fmt.Println(string_to_write) + + file, _ := json.MarshalIndent(toolResult, "", " ") + + if strings.Compare(c.String("file_action"), "APPEND") == 0{ + + f, err := os.OpenFile(file_name, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600) + + if err != nil{ + log.Error(err) + } + + defer f.Close() + + if _, err = f.WriteString(string(file)); err != nil { + log.Error(err) + } + + }else{ + f, err := os.OpenFile(file_name, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600) + + if err != nil{ + log.Error(err) + } + + defer f.Close() + + if _, err = f.WriteString(string(file)); err != nil { + log.Error(err) + } + } + + }, + } +} diff --git a/src/cli/features.go b/src/cli/features.go index f7e4a23..b748867 100644 --- a/src/cli/features.go +++ b/src/cli/features.go @@ -9,9 +9,9 @@ import ( "github.com/gogo/protobuf/proto" gcli "github.com/urfave/cli" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func featuresCmd() gcli.Command { diff --git a/src/cli/firmware_update.go b/src/cli/firmware_update.go index 9485a4a..bbacaa1 100644 --- a/src/cli/firmware_update.go +++ b/src/cli/firmware_update.go @@ -7,7 +7,7 @@ import ( gcli "github.com/urfave/cli" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func firmwareUpdate() gcli.Command { diff --git a/src/cli/generate_mnemonic.go b/src/cli/generate_mnemonic.go index 06061f4..965a233 100644 --- a/src/cli/generate_mnemonic.go +++ b/src/cli/generate_mnemonic.go @@ -5,11 +5,11 @@ import ( "os" "runtime" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" gcli "github.com/urfave/cli" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func generateMnemonicCmd() gcli.Command { diff --git a/src/cli/get_mixed_entropy.go b/src/cli/get_mixed_entropy.go index c57f89e..18a7726 100644 --- a/src/cli/get_mixed_entropy.go +++ b/src/cli/get_mixed_entropy.go @@ -3,7 +3,7 @@ package cli import ( gcli "github.com/urfave/cli" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func getMixedEntropyCmd() gcli.Command { diff --git a/src/cli/get_raw_entropy.go b/src/cli/get_raw_entropy.go index cdec677..354b591 100644 --- a/src/cli/get_raw_entropy.go +++ b/src/cli/get_raw_entropy.go @@ -3,7 +3,7 @@ package cli import ( gcli "github.com/urfave/cli" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func getRawEntropyCmd() gcli.Command { diff --git a/src/cli/integration/integration_test.go b/src/cli/integration/integration_test.go index c47f0e1..2e75bf5 100644 --- a/src/cli/integration/integration_test.go +++ b/src/cli/integration/integration_test.go @@ -13,10 +13,10 @@ import ( "testing" "time" - "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + "github.com/skycoin/hardware-wallet-go/src/skywallet" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" - "github.com/SkycoinProject/skycoin/src/util/logging" + messages "github.com/skycoin/hardware-wallet-protob/go" + "github.com/skycoin/skycoin/src/util/logging" "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/require" ) diff --git a/src/cli/recovery.go b/src/cli/recovery.go index 551c69b..a4a4182 100644 --- a/src/cli/recovery.go +++ b/src/cli/recovery.go @@ -7,9 +7,9 @@ import ( gcli "github.com/urfave/cli" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func recoveryCmd() gcli.Command { diff --git a/src/cli/remove_pin_code.go b/src/cli/remove_pin_code.go index 6196d5e..d72d680 100644 --- a/src/cli/remove_pin_code.go +++ b/src/cli/remove_pin_code.go @@ -7,9 +7,9 @@ import ( gcli "github.com/urfave/cli" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func removePinCode() gcli.Command { diff --git a/src/cli/set_mnemonic.go b/src/cli/set_mnemonic.go index 8dce2f5..468806f 100644 --- a/src/cli/set_mnemonic.go +++ b/src/cli/set_mnemonic.go @@ -5,11 +5,11 @@ import ( "os" "runtime" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" gcli "github.com/urfave/cli" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func setMnemonicCmd() gcli.Command { diff --git a/src/cli/set_pin_code.go b/src/cli/set_pin_code.go index 4c7393f..e5e46e5 100644 --- a/src/cli/set_pin_code.go +++ b/src/cli/set_pin_code.go @@ -7,9 +7,9 @@ import ( gcli "github.com/urfave/cli" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func setPinCode() gcli.Command { diff --git a/src/cli/sign_message.go b/src/cli/sign_message.go index 6a02519..313d36a 100644 --- a/src/cli/sign_message.go +++ b/src/cli/sign_message.go @@ -7,9 +7,9 @@ import ( gcli "github.com/urfave/cli" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func signMessageCmd() gcli.Command { diff --git a/src/cli/transaction_sign.go b/src/cli/transaction_sign.go index f4beaba..655fe99 100644 --- a/src/cli/transaction_sign.go +++ b/src/cli/transaction_sign.go @@ -10,9 +10,9 @@ import ( gcli "github.com/urfave/cli" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func transactionSignCmd() gcli.Command { diff --git a/src/cli/usbhid.go b/src/cli/usbhid.go index 6850623..e1ec883 100644 --- a/src/cli/usbhid.go +++ b/src/cli/usbhid.go @@ -3,7 +3,7 @@ package cli import ( gcli "github.com/urfave/cli" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func getUsbDetails() gcli.Command { diff --git a/src/cli/wipe.go b/src/cli/wipe.go index 99e0bbf..26f2677 100644 --- a/src/cli/wipe.go +++ b/src/cli/wipe.go @@ -5,11 +5,11 @@ import ( "os" "runtime" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" gcli "github.com/urfave/cli" - skyWallet "github.com/SkycoinProject/hardware-wallet-go/src/skywallet" + skyWallet "github.com/skycoin/hardware-wallet-go/src/skywallet" ) func wipeCmd() gcli.Command { diff --git a/src/skywallet/bit_encoded_flags_test.go b/src/skywallet/bit_encoded_flags_test.go index 40f45f3..65a2826 100644 --- a/src/skywallet/bit_encoded_flags_test.go +++ b/src/skywallet/bit_encoded_flags_test.go @@ -4,7 +4,7 @@ import ( "math/rand" "testing" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" "github.com/stretchr/testify/suite" ) diff --git a/src/skywallet/helper.go b/src/skywallet/helper.go index faf70bc..29b961a 100644 --- a/src/skywallet/helper.go +++ b/src/skywallet/helper.go @@ -12,10 +12,10 @@ import ( "github.com/gogo/protobuf/proto" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" - "github.com/SkycoinProject/hardware-wallet-go/src/skywallet/usb" - "github.com/SkycoinProject/hardware-wallet-go/src/skywallet/wire" + "github.com/skycoin/hardware-wallet-go/src/skywallet/usb" + "github.com/skycoin/hardware-wallet-go/src/skywallet/wire" ) // DeviceType type of device: emulator or usb @@ -66,10 +66,10 @@ func CoinTypeFromString(ct string) (CoinType, error) { } const ( - // SkycoinVendorID from https://github.com/SkycoinProject/hardware-wallet/blob/50000f674c56c0cc18eec30d55978b73ed279b2e/tiny-firmware/bootloader/usb.c#L57 + // SkycoinVendorID from https://github.com/skycoin/hardware-wallet/blob/50000f674c56c0cc18eec30d55978b73ed279b2e/tiny-firmware/bootloader/usb.c#L57 SkycoinVendorID = 0x313A - // SkycoinHwProductID from https://github.com/SkycoinProject/hardware-wallet/blob/50000f674c56c0cc18eec30d55978b73ed279b2e/tiny-firmware/bootloader/usb.c#L58 + // SkycoinHwProductID from https://github.com/skycoin/hardware-wallet/blob/50000f674c56c0cc18eec30d55978b73ed279b2e/tiny-firmware/bootloader/usb.c#L58 SkycoinHwProductID = 0x0001 // EmulatorPort is the emulator udp port diff --git a/src/skywallet/messages.go b/src/skywallet/messages.go index 4cc7ad6..9251b35 100644 --- a/src/skywallet/messages.go +++ b/src/skywallet/messages.go @@ -4,10 +4,10 @@ import ( "bytes" "fmt" - "github.com/SkycoinProject/skycoin/src/cipher" + "github.com/skycoin/skycoin/src/cipher" "github.com/gogo/protobuf/proto" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" ) // MessageCancel prepare Cancel request diff --git a/src/skywallet/mock_device_driver_test.go b/src/skywallet/mock_device_driver_test.go index d8bed98..3b7739d 100644 --- a/src/skywallet/mock_device_driver_test.go +++ b/src/skywallet/mock_device_driver_test.go @@ -3,8 +3,8 @@ package skywallet import ( - usb "github.com/SkycoinProject/hardware-wallet-go/src/skywallet/usb" - wire "github.com/SkycoinProject/hardware-wallet-go/src/skywallet/wire" + usb "github.com/skycoin/hardware-wallet-go/src/skywallet/usb" + wire "github.com/skycoin/hardware-wallet-go/src/skywallet/wire" mock "github.com/stretchr/testify/mock" ) diff --git a/src/skywallet/mock_devicer_test.go b/src/skywallet/mock_devicer_test.go index 3b9c7b3..ea23c3a 100644 --- a/src/skywallet/mock_devicer_test.go +++ b/src/skywallet/mock_devicer_test.go @@ -3,10 +3,10 @@ package skywallet import ( - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" mock "github.com/stretchr/testify/mock" - wire "github.com/SkycoinProject/hardware-wallet-go/src/skywallet/wire" + wire "github.com/skycoin/hardware-wallet-go/src/skywallet/wire" ) // MockDevicer is an autogenerated mock type for the Devicer type diff --git a/src/skywallet/skywallet.go b/src/skywallet/skywallet.go index 4ba9de6..1655884 100644 --- a/src/skywallet/skywallet.go +++ b/src/skywallet/skywallet.go @@ -9,13 +9,13 @@ import ( "github.com/gogo/protobuf/proto" - "github.com/SkycoinProject/hardware-wallet-go/src/skywallet/usb" + "github.com/skycoin/hardware-wallet-go/src/skywallet/usb" - "github.com/SkycoinProject/skycoin/src/util/logging" + "github.com/skycoin/skycoin/src/util/logging" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" - "github.com/SkycoinProject/hardware-wallet-go/src/skywallet/wire" + "github.com/skycoin/hardware-wallet-go/src/skywallet/wire" ) var ( diff --git a/src/skywallet/skywallet_test.go b/src/skywallet/skywallet_test.go index e64cab8..1cba8bf 100644 --- a/src/skywallet/skywallet_test.go +++ b/src/skywallet/skywallet_test.go @@ -5,9 +5,9 @@ import ( "sync" "testing" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" - "github.com/SkycoinProject/hardware-wallet-go/src/skywallet/wire" + "github.com/skycoin/hardware-wallet-go/src/skywallet/wire" "github.com/stretchr/testify/require" diff --git a/src/skywallet/transaction.go b/src/skywallet/transaction.go index 8845b61..083bf84 100644 --- a/src/skywallet/transaction.go +++ b/src/skywallet/transaction.go @@ -6,9 +6,9 @@ import ( "github.com/gogo/protobuf/proto" - messages "github.com/SkycoinProject/hardware-wallet-protob/go" + messages "github.com/skycoin/hardware-wallet-protob/go" - "github.com/SkycoinProject/hardware-wallet-go/src/skywallet/wire" + "github.com/skycoin/hardware-wallet-go/src/skywallet/wire" ) //go:generate mockery -name TransactionSigner -case underscore -inpkg -testonly diff --git a/src/skywallet/usb/bus.go b/src/skywallet/usb/bus.go index e420632..6923145 100644 --- a/src/skywallet/usb/bus.go +++ b/src/skywallet/usb/bus.go @@ -4,7 +4,7 @@ import ( "errors" "io" - "github.com/SkycoinProject/skycoin/src/util/logging" + "github.com/skycoin/skycoin/src/util/logging" ) var ( diff --git a/src/skywallet/usb/hidapi.go b/src/skywallet/usb/hidapi.go index 1c4e346..ff1c0f1 100644 --- a/src/skywallet/usb/hidapi.go +++ b/src/skywallet/usb/hidapi.go @@ -10,7 +10,7 @@ import ( "sync" "sync/atomic" - lowlevel "github.com/SkycoinProject/hardware-wallet-go/src/usb/lowlevel/hidapi" + lowlevel "github.com/skycoin/hardware-wallet-go/src/usb/lowlevel/hidapi" ) const ( diff --git a/src/skywallet/usb/libusb.go b/src/skywallet/usb/libusb.go index 81ee918..131168f 100644 --- a/src/skywallet/usb/libusb.go +++ b/src/skywallet/usb/libusb.go @@ -7,7 +7,7 @@ import ( "sync" "sync/atomic" - lowlevel "github.com/SkycoinProject/hardware-wallet-go/src/usb/lowlevel/libusb" + lowlevel "github.com/skycoin/hardware-wallet-go/src/usb/lowlevel/libusb" ) const (