Skip to content

Commit

Permalink
bump deps, remove cgo buildtag
Browse files Browse the repository at this point in the history
no functional changes
  • Loading branch information
ribasushi authored and Stebalien committed Sep 3, 2024
1 parent 19c0520 commit 7d812ed
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 125 deletions.
29 changes: 0 additions & 29 deletions address_cgo_test.go

This file was deleted.

22 changes: 20 additions & 2 deletions address_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"strings"
"testing"

"github.com/filecoin-project/go-crypto"
"github.com/multiformats/go-varint"
"github.com/stretchr/testify/assert"
"golang.org/x/xerrors"

cbg "github.com/whyrusleeping/cbor-gen"
)
Expand Down Expand Up @@ -486,7 +486,7 @@ func TestInvalidByteAddresses(t *testing.T) {
assert := assert.New(t)

_, err := NewFromBytes(tc.input)
assert.True(xerrors.Is(err, tc.expectErr))
assert.True(errors.Is(err, tc.expectErr))
})
}

Expand Down Expand Up @@ -666,3 +666,21 @@ func TestDelegatedAddress(t *testing.T) {
})
}
}
func TestSecp256k1Address(t *testing.T) {
assert := assert.New(t)

sk, err := crypto.GenerateKey()
assert.NoError(err)

addr, err := NewSecp256k1Address(crypto.PublicKey(sk))
assert.NoError(err)
assert.Equal(SECP256K1, addr.Protocol())

str, err := encode(Mainnet, addr)
assert.NoError(err)

maybe, err := decode(str)
assert.NoError(err)
assert.Equal(addr, maybe)

}
46 changes: 24 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,34 @@ module github.com/filecoin-project/go-address
go 1.22

require (
github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03
github.com/ipfs/go-ipld-cbor v0.0.5
github.com/multiformats/go-varint v0.0.6
github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1
github.com/stretchr/testify v1.4.0
github.com/whyrusleeping/cbor-gen v0.0.0-20210303213153-67a261a1d291
golang.org/x/crypto v0.17.0
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
github.com/filecoin-project/go-crypto v0.1.0
github.com/ipfs/go-ipld-cbor v0.1.0
github.com/multiformats/go-varint v0.0.7
github.com/polydawn/refmt v0.89.0
github.com/stretchr/testify v1.9.0
github.com/whyrusleeping/cbor-gen v0.1.2
golang.org/x/crypto v0.26.0
golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/ipfs/go-block-format v0.0.2 // indirect
github.com/ipfs/go-cid v0.0.6 // indirect
github.com/ipfs/go-ipfs-util v0.0.1 // indirect
github.com/ipfs/go-ipld-format v0.0.1 // indirect
github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 // indirect
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect
github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771 // indirect
github.com/mr-tron/base58 v1.1.3 // indirect
github.com/multiformats/go-base32 v0.0.3 // indirect
github.com/multiformats/go-base36 v0.1.0 // indirect
github.com/multiformats/go-multibase v0.0.3 // indirect
github.com/multiformats/go-multihash v0.0.13 // indirect
github.com/ipfs/go-block-format v0.2.0 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
github.com/ipfs/go-ipfs-util v0.0.3 // indirect
github.com/ipfs/go-ipld-format v0.6.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-base32 v0.1.0 // indirect
github.com/multiformats/go-base36 v0.2.0 // indirect
github.com/multiformats/go-multibase v0.2.0 // indirect
github.com/multiformats/go-multihash v0.2.3 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
golang.org/x/sys v0.15.0 // indirect
gopkg.in/yaml.v2 v2.2.4 // indirect
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
golang.org/x/sys v0.24.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.3.0 // indirect
)
Loading

0 comments on commit 7d812ed

Please sign in to comment.