rename to keycard-go
This commit is contained in:
parent
2bc233b65b
commit
f81dc83bb3
10
Makefile
10
Makefile
|
@ -1,15 +1,15 @@
|
|||
.PHONY: test build
|
||||
|
||||
GOBIN = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))build/bin
|
||||
PROJECT_NAME=hardware-wallet-go
|
||||
PROJECT_NAME=keycard-go
|
||||
GO_PROJECT_PATH=github.com/status-im/$(PROJECT_NAME)
|
||||
BIN_NAME=status-hardware-wallet
|
||||
DOCKER_IMAGE_NAME=status-hardware-wallet-build
|
||||
BIN_NAME=keycard
|
||||
DOCKER_IMAGE_NAME=keycard
|
||||
|
||||
build:
|
||||
go build -i -o $(GOBIN)/$(BIN_NAME) -v ./cmd/status-hardware-wallet
|
||||
go build -i -o $(GOBIN)/$(BIN_NAME) -v ./cmd/keycard
|
||||
@echo "Compilation done."
|
||||
@echo "Run \"build/bin/$(BIN_NAME) -h\" to view available commands."
|
||||
@echo "Run \"./build/bin/$(BIN_NAME) -h\" to view available commands."
|
||||
|
||||
test:
|
||||
go test -v ./...
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# hardware-wallet-go
|
||||
|
||||
`hardware-wallet-go` is a set of Go packages built to interact with the [Status Hardware Wallet](https://github.com/status-im/hardware-wallet).
|
||||
`keycard-go` is a set of Go packages built to interact with the [Status Keycard](https://github.com/status-im/status-keycard).
|
||||
|
||||
If you only need a tool to initialize your card, check out the [status-hardware-wallet](cmd/status-hardware-wallet) command.
|
||||
If you only need a tool to initialize your card, check out the [keycard](cmd/keycard) CLI.
|
||||
|
|
|
@ -3,7 +3,7 @@ package apdu
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/status-im/hardware-wallet-go/hexutils"
|
||||
"github.com/status-im/keycard-go/hexutils"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package apdu
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/status-im/hardware-wallet-go/hexutils"
|
||||
"github.com/status-im/keycard-go/hexutils"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package apdu
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/status-im/hardware-wallet-go/hexutils"
|
||||
"github.com/status-im/keycard-go/hexutils"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/status-im/hardware-wallet-go/apdu"
|
||||
"github.com/status-im/hardware-wallet-go/globalplatform"
|
||||
"github.com/status-im/hardware-wallet-go/lightwallet"
|
||||
"github.com/status-im/hardware-wallet-go/lightwallet/actions"
|
||||
"github.com/status-im/keycard-go/apdu"
|
||||
"github.com/status-im/keycard-go/globalplatform"
|
||||
"github.com/status-im/keycard-go/lightwallet"
|
||||
"github.com/status-im/keycard-go/lightwallet/actions"
|
||||
)
|
||||
|
||||
var (
|
|
@ -17,7 +17,7 @@ import (
|
|||
type commandFunc func(*Initializer) error
|
||||
|
||||
var (
|
||||
logger = log.New("package", "status-go/cmd/hardware-wallet-light")
|
||||
logger = log.New("package", "status-go/cmd/keycard")
|
||||
|
||||
commands map[string]commandFunc
|
||||
command string
|
||||
|
@ -65,9 +65,9 @@ func init() {
|
|||
}
|
||||
|
||||
func usage() {
|
||||
fmt.Printf("\nUsage: hardware-wallet-light COMMAND [FLAGS]\n\nValid commands:\n\n")
|
||||
fmt.Printf("\nUsage:\n keycard COMMAND [FLAGS]\n\nAvailable commands:\n")
|
||||
for name := range commands {
|
||||
fmt.Printf(" - %s\n", name)
|
||||
fmt.Printf(" %s\n", name)
|
||||
}
|
||||
fmt.Print("\nFlags:\n\n")
|
||||
flag.PrintDefaults()
|
|
@ -4,8 +4,8 @@ import (
|
|||
"bytes"
|
||||
"encoding/binary"
|
||||
|
||||
"github.com/status-im/hardware-wallet-go/apdu"
|
||||
"github.com/status-im/hardware-wallet-go/globalplatform/crypto"
|
||||
"github.com/status-im/keycard-go/apdu"
|
||||
"github.com/status-im/keycard-go/globalplatform/crypto"
|
||||
)
|
||||
|
||||
// APDUWrapper is a wrapper for apdu commands inside a global platform secure channel.
|
||||
|
|
|
@ -3,9 +3,9 @@ package globalplatform
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/status-im/hardware-wallet-go/apdu"
|
||||
"github.com/status-im/hardware-wallet-go/globalplatform/crypto"
|
||||
"github.com/status-im/hardware-wallet-go/hexutils"
|
||||
"github.com/status-im/keycard-go/apdu"
|
||||
"github.com/status-im/keycard-go/globalplatform/crypto"
|
||||
"github.com/status-im/keycard-go/hexutils"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package globalplatform
|
||||
|
||||
import "github.com/status-im/hardware-wallet-go/apdu"
|
||||
import "github.com/status-im/keycard-go/apdu"
|
||||
|
||||
// Channel is an interface with a Send method to send apdu commands and receive apdu responses.
|
||||
type Channel interface {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package globalplatform
|
||||
|
||||
import (
|
||||
"github.com/status-im/hardware-wallet-go/apdu"
|
||||
"github.com/status-im/hardware-wallet-go/globalplatform/crypto"
|
||||
"github.com/status-im/keycard-go/apdu"
|
||||
"github.com/status-im/keycard-go/globalplatform/crypto"
|
||||
)
|
||||
|
||||
// Constants used in apdu commands and responses as defined by iso7816 and globalplatform.
|
||||
|
|
|
@ -3,7 +3,7 @@ package globalplatform
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/status-im/hardware-wallet-go/hexutils"
|
||||
"github.com/status-im/keycard-go/hexutils"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package crypto
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/status-im/hardware-wallet-go/hexutils"
|
||||
"github.com/status-im/keycard-go/hexutils"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -2,4 +2,4 @@ package globalplatform
|
|||
|
||||
import "github.com/ethereum/go-ethereum/log"
|
||||
|
||||
var logger = log.New("package", "hardware-wallet-go/globalplatform")
|
||||
var logger = log.New("package", "keycard/globalplatform")
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/status-im/hardware-wallet-go/apdu"
|
||||
"github.com/status-im/keycard-go/apdu"
|
||||
)
|
||||
|
||||
var internalFiles = []string{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package globalplatform
|
||||
|
||||
import (
|
||||
"github.com/status-im/hardware-wallet-go/apdu"
|
||||
"github.com/status-im/hardware-wallet-go/hexutils"
|
||||
"github.com/status-im/keycard-go/apdu"
|
||||
"github.com/status-im/keycard-go/hexutils"
|
||||
)
|
||||
|
||||
// Transmitter defines an interface with one method to transmit raw commands and receive raw responses.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package globalplatform
|
||||
|
||||
import (
|
||||
"github.com/status-im/hardware-wallet-go/apdu"
|
||||
"github.com/status-im/hardware-wallet-go/hexutils"
|
||||
"github.com/status-im/keycard-go/apdu"
|
||||
"github.com/status-im/keycard-go/hexutils"
|
||||
)
|
||||
|
||||
// SecureChannel wraps another channel and sends wrapped commands using APDUWrapper.
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/status-im/hardware-wallet-go/apdu"
|
||||
"github.com/status-im/hardware-wallet-go/globalplatform/crypto"
|
||||
"github.com/status-im/keycard-go/apdu"
|
||||
"github.com/status-im/keycard-go/globalplatform/crypto"
|
||||
)
|
||||
|
||||
// Session is a struct containing the keys and challenges used in the current communication with a card.
|
||||
|
|
|
@ -3,8 +3,8 @@ package globalplatform
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/status-im/hardware-wallet-go/apdu"
|
||||
"github.com/status-im/hardware-wallet-go/hexutils"
|
||||
"github.com/status-im/keycard-go/apdu"
|
||||
"github.com/status-im/keycard-go/hexutils"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/status-im/hardware-wallet-go/apdu"
|
||||
"github.com/status-im/hardware-wallet-go/globalplatform"
|
||||
"github.com/status-im/hardware-wallet-go/lightwallet"
|
||||
"github.com/status-im/hardware-wallet-go/lightwallet/crypto"
|
||||
"github.com/status-im/keycard-go/apdu"
|
||||
"github.com/status-im/keycard-go/globalplatform"
|
||||
"github.com/status-im/keycard-go/lightwallet"
|
||||
"github.com/status-im/keycard-go/lightwallet/crypto"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package lightwallet
|
||||
|
||||
import (
|
||||
"github.com/status-im/hardware-wallet-go/apdu"
|
||||
"github.com/status-im/hardware-wallet-go/globalplatform"
|
||||
"github.com/status-im/keycard-go/apdu"
|
||||
"github.com/status-im/keycard-go/globalplatform"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/status-im/hardware-wallet-go/hexutils"
|
||||
"github.com/status-im/keycard-go/hexutils"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import (
|
|||
"errors"
|
||||
|
||||
ethcrypto "github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/status-im/hardware-wallet-go/apdu"
|
||||
"github.com/status-im/hardware-wallet-go/globalplatform"
|
||||
"github.com/status-im/hardware-wallet-go/lightwallet/crypto"
|
||||
"github.com/status-im/keycard-go/apdu"
|
||||
"github.com/status-im/keycard-go/globalplatform"
|
||||
"github.com/status-im/keycard-go/lightwallet/crypto"
|
||||
)
|
||||
|
||||
var ErrInvalidResponseMAC = errors.New("invalid response MAC")
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/status-im/hardware-wallet-go/apdu"
|
||||
"github.com/status-im/hardware-wallet-go/hexutils"
|
||||
"github.com/status-im/keycard-go/apdu"
|
||||
"github.com/status-im/keycard-go/hexutils"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue