Skip to content

Commit

Permalink
Merge branch 'update-repo'
Browse files Browse the repository at this point in the history
  • Loading branch information
thisconnect committed May 16, 2024
2 parents 404d597 + 331efe7 commit b22740e
Show file tree
Hide file tree
Showing 35 changed files with 75 additions and 75 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
go-version: ${{env.GO_VERSION}}
# Keep the linter version and its config in .golangci.yml in sync with the app repo at
# https://github.com/digitalbitbox/bitbox-wallet-app/blob/98e815c25950dc7f55a27551d053239e6fd804ca/Makefile#L24
# https://github.com/BitBoxSwiss/bitbox-wallet-app/blob/98e815c25950dc7f55a27551d053239e6fd804ca/Makefile#L24
- name: Install golangci-lint
run: |
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ tagging versions.

## Comand to update the BitBox02 protobuf message files

Clone the [BitBox02 firmware repo](https://github.com/digitalbitbox/bitbox02-firmware):
Clone the [BitBox02 firmware repo](https://github.com/BitBoxSwiss/bitbox02-firmware):

Make sure you have `protoc` and
[protoc-gen-go](https://developers.google.com/protocol-buffers/docs/reference/go-generated)
installed:

`git clone https://github.com/digitalbitbox/bitbox02-firmware.git`
`git clone https://github.com/BitBoxSwiss/bitbox02-firmware.git`

```sh
rm -rf api/firmware/messages/{*.pb.go,*.proto}
Expand Down
6 changes: 3 additions & 3 deletions api/bootloader/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"io"
"math"

"github.com/digitalbitbox/bitbox02-api-go/api/common"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/digitalbitbox/bitbox02-api-go/util/semver"
"github.com/BitBoxSwiss/bitbox02-api-go/api/common"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/util/semver"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions api/bootloader/device_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"io/ioutil"
"testing"

"github.com/digitalbitbox/bitbox02-api-go/api/bootloader"
"github.com/digitalbitbox/bitbox02-api-go/api/common"
"github.com/digitalbitbox/bitbox02-api-go/util/semver"
"github.com/BitBoxSwiss/bitbox02-api-go/api/bootloader"
"github.com/BitBoxSwiss/bitbox02-api-go/api/common"
"github.com/BitBoxSwiss/bitbox02-api-go/util/semver"
"github.com/stretchr/testify/require"
)

Expand Down
4 changes: 2 additions & 2 deletions api/bootloader/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"crypto/sha256"
"encoding/binary"

"github.com/digitalbitbox/bitbox02-api-go/api/common"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/api/common"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
)

// HashFirmware returns the hash of `<firmware version><firmware>`, as computed by the bootloader to
Expand Down
2 changes: 1 addition & 1 deletion api/bootloader/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"io/ioutil"
"testing"

"github.com/digitalbitbox/bitbox02-api-go/api/common"
"github.com/BitBoxSwiss/bitbox02-api-go/api/common"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion api/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// Package common contains common functionality to firmware and bootloader of the bitbox02.
package common

import "github.com/digitalbitbox/bitbox02-api-go/util/errp"
import "github.com/BitBoxSwiss/bitbox02-api-go/util/errp"

// Product enumerates the BitBox-based products. A product is a "platform"-"edition" tuple. Together
// with the firmware version, it determines the device API.
Expand Down
4 changes: 2 additions & 2 deletions api/firmware/attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"fmt"
"math/big"

"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/util/semver"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/digitalbitbox/bitbox02-api-go/util/semver"
)

type attestationPubkey struct {
Expand Down
6 changes: 3 additions & 3 deletions api/firmware/attestation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import (
"math/big"
"testing"

"github.com/BitBoxSwiss/bitbox02-api-go/api/common"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/mocks"
"github.com/BitBoxSwiss/bitbox02-api-go/util/semver"
"github.com/btcsuite/btcd/btcec/v2"
btcec_ecdsa "github.com/btcsuite/btcd/btcec/v2/ecdsa"
"github.com/digitalbitbox/bitbox02-api-go/api/common"
"github.com/digitalbitbox/bitbox02-api-go/api/firmware/mocks"
"github.com/digitalbitbox/bitbox02-api-go/util/semver"
"github.com/stretchr/testify/require"
)

Expand Down
4 changes: 2 additions & 2 deletions api/firmware/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package firmware
import (
"time"

"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
)

// CreateBackup is called after SetPassword() to create the backup.
Expand Down
6 changes: 3 additions & 3 deletions api/firmware/bip85.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
package firmware

import (
"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/digitalbitbox/bitbox02-api-go/util/semver"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/util/semver"
"google.golang.org/protobuf/types/known/emptypb"
)

Expand Down
6 changes: 3 additions & 3 deletions api/firmware/btc.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"fmt"
"strings"

"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/util/semver"
"github.com/btcsuite/btcd/btcutil/base58"
"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/digitalbitbox/bitbox02-api-go/util/semver"
"google.golang.org/protobuf/proto"
)

Expand Down
4 changes: 2 additions & 2 deletions api/firmware/btc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"errors"
"testing"

"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/digitalbitbox/bitbox02-api-go/util/semver"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/util/semver"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/proto"
)
Expand Down
4 changes: 2 additions & 2 deletions api/firmware/cardano.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package firmware

import (
"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
)

// queryCardano is like query, but nested one level deeper for Cardano.
Expand Down
8 changes: 4 additions & 4 deletions api/firmware/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"fmt"
"sync"

"github.com/digitalbitbox/bitbox02-api-go/api/common"
"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/digitalbitbox/bitbox02-api-go/util/semver"
"github.com/BitBoxSwiss/bitbox02-api-go/api/common"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/util/semver"
"github.com/flynn/noise"
)

Expand Down
8 changes: 4 additions & 4 deletions api/firmware/device_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"fmt"
"testing"

"github.com/digitalbitbox/bitbox02-api-go/api/common"
"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/digitalbitbox/bitbox02-api-go/api/firmware/mocks"
"github.com/digitalbitbox/bitbox02-api-go/util/semver"
"github.com/BitBoxSwiss/bitbox02-api-go/api/common"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/mocks"
"github.com/BitBoxSwiss/bitbox02-api-go/util/semver"
"github.com/flynn/noise"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/proto"
Expand Down
2 changes: 1 addition & 1 deletion api/firmware/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package firmware
import (
"fmt"

"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions api/firmware/eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"strconv"
"strings"

"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/digitalbitbox/bitbox02-api-go/util/semver"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/util/semver"
)

// queryETH is like query, but nested one level deeper for Ethereum.
Expand Down
2 changes: 1 addition & 1 deletion api/firmware/eth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package firmware
import (
"testing"

"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion api/firmware/messages/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FILES=${DIR}/*.proto
OPTS=""
for f in $FILES
do
OPTS="${OPTS} --go_opt=M$(basename ${f})=github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
OPTS="${OPTS} --go_opt=M$(basename ${f})=github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
done
protoc --proto_path=${DIR} \
${OPTS} \
Expand Down
4 changes: 2 additions & 2 deletions api/firmware/mnemonic.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"fmt"
"time"

"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
)

// ShowMnemonic lets the user export the bip39 mnemonic phrase on the device.
Expand Down
6 changes: 3 additions & 3 deletions api/firmware/pairing.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"encoding/base32"
"fmt"

"github.com/digitalbitbox/bitbox02-api-go/api/common"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/digitalbitbox/bitbox02-api-go/util/semver"
"github.com/BitBoxSwiss/bitbox02-api-go/api/common"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/util/semver"
"github.com/flynn/noise"
)

Expand Down
6 changes: 3 additions & 3 deletions api/firmware/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"fmt"
"time"

"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/digitalbitbox/bitbox02-api-go/util/semver"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/util/semver"
"google.golang.org/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion api/firmware/random.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package firmware
import (
"crypto/rand"

"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
)

// bytesOrPanic returns random bytes of the given length or panics in case of an error.
Expand Down
4 changes: 2 additions & 2 deletions api/firmware/sdcard.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package firmware

import (
"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
)

// CheckSDCard checks whether an sd card is inserted in the device.
Expand Down
2 changes: 1 addition & 1 deletion api/firmware/secp256k1.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"crypto/sha256"
"math/big"

"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
)

func taggedSha256(tag []byte, msg []byte) []byte {
Expand Down
6 changes: 3 additions & 3 deletions api/firmware/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
package firmware

import (
"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/digitalbitbox/bitbox02-api-go/util/semver"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/util/semver"
)

// SetDeviceName sends a request to the device using protobuf to set the device name.
Expand Down
10 changes: 5 additions & 5 deletions cmd/miniscript/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ import (
"strconv"
"strings"

"github.com/BitBoxSwiss/bitbox02-api-go/api/common"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/mocks"
"github.com/BitBoxSwiss/bitbox02-api-go/communication/u2fhid"
"github.com/benma/miniscript-go"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/ecdsa"
Expand All @@ -33,11 +38,6 @@ import (
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/digitalbitbox/bitbox02-api-go/api/common"
"github.com/digitalbitbox/bitbox02-api-go/api/firmware"
"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/digitalbitbox/bitbox02-api-go/api/firmware/mocks"
"github.com/digitalbitbox/bitbox02-api-go/communication/u2fhid"
"github.com/karalabe/usb"
)

Expand Down
10 changes: 5 additions & 5 deletions cmd/playground/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (
"math/big"
"net/http"

"github.com/digitalbitbox/bitbox02-api-go/api/common"
"github.com/digitalbitbox/bitbox02-api-go/api/firmware"
"github.com/digitalbitbox/bitbox02-api-go/api/firmware/messages"
"github.com/digitalbitbox/bitbox02-api-go/api/firmware/mocks"
"github.com/digitalbitbox/bitbox02-api-go/communication/u2fhid"
"github.com/BitBoxSwiss/bitbox02-api-go/api/common"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/mocks"
"github.com/BitBoxSwiss/bitbox02-api-go/communication/u2fhid"
"github.com/karalabe/usb"
)

Expand Down
2 changes: 1 addition & 1 deletion communication/u2fhid/u2fhid.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"io"
"sync"

"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion communication/usart/usart.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"io"
"sync"

"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
)

const version byte = 0x01
Expand Down
2 changes: 1 addition & 1 deletion communication/usart/usart_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"testing"
"testing/quick"

"github.com/digitalbitbox/bitbox02-api-go/communication/usart"
"github.com/BitBoxSwiss/bitbox02-api-go/communication/usart"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/digitalbitbox/bitbox02-api-go
module github.com/BitBoxSwiss/bitbox02-api-go

go 1.13

Expand Down
2 changes: 1 addition & 1 deletion util/semver/semver.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"strconv"
"strings"

"github.com/digitalbitbox/bitbox02-api-go/util/errp"
"github.com/BitBoxSwiss/bitbox02-api-go/util/errp"
)

// SemVer implements Semantic Versioning according to https://semver.org.
Expand Down
Loading

0 comments on commit b22740e

Please sign in to comment.