Skip to content

Commit

Permalink
Bump to v2 version because of breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
OBrezhniev committed Sep 21, 2023
1 parent 48636e9 commit 7b1ef48
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions babyjub/babyjub.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"math/big"

"github.com/iden3/go-iden3-crypto/constants"
"github.com/iden3/go-iden3-crypto/ff"
"github.com/iden3/go-iden3-crypto/utils"
"github.com/iden3/go-iden3-crypto/v2/constants"
"github.com/iden3/go-iden3-crypto/v2/ff"
"github.com/iden3/go-iden3-crypto/v2/utils"
)

// A is one of the babyjub constants.
Expand Down
4 changes: 2 additions & 2 deletions babyjub/babyjub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"math/rand"
"testing"

"github.com/iden3/go-iden3-crypto/constants"
"github.com/iden3/go-iden3-crypto/utils"
"github.com/iden3/go-iden3-crypto/v2/constants"
"github.com/iden3/go-iden3-crypto/v2/utils"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion babyjub/babyjub_wrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"math/big"
"testing"

"github.com/iden3/go-iden3-crypto/poseidon"
"github.com/iden3/go-iden3-crypto/v2/poseidon"
"github.com/stretchr/testify/require"
)

Expand Down
6 changes: 3 additions & 3 deletions babyjub/eddsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"fmt"
"math/big"

"github.com/iden3/go-iden3-crypto/mimc7"
"github.com/iden3/go-iden3-crypto/poseidon"
"github.com/iden3/go-iden3-crypto/utils"
"github.com/iden3/go-iden3-crypto/v2/mimc7"
"github.com/iden3/go-iden3-crypto/v2/poseidon"
"github.com/iden3/go-iden3-crypto/v2/utils"
)

// pruneBuffer prunes the buffer during key generation according to RFC 8032.
Expand Down
4 changes: 2 additions & 2 deletions babyjub/eddsa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"math/big"
"testing"

"github.com/iden3/go-iden3-crypto/constants"
"github.com/iden3/go-iden3-crypto/utils"
"github.com/iden3/go-iden3-crypto/v2/constants"
"github.com/iden3/go-iden3-crypto/v2/utils"
"github.com/stretchr/testify/assert"
"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/iden3/go-iden3-crypto
module github.com/iden3/go-iden3-crypto/v2

go 1.18

Expand Down
2 changes: 1 addition & 1 deletion goldenposeidon/constants.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package poseidon

import "github.com/iden3/go-iden3-crypto/ffg"
import "github.com/iden3/go-iden3-crypto/v2/ffg"

const (
// NROUNDSF const from original paper
Expand Down
2 changes: 1 addition & 1 deletion goldenposeidon/poseidon.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package poseidon
import (
"math/big"

"github.com/iden3/go-iden3-crypto/ffg"
"github.com/iden3/go-iden3-crypto/v2/ffg"
)

func zero() *ffg.Element {
Expand Down
8 changes: 4 additions & 4 deletions mimc7/mimc7.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"errors"
"math/big"

_constants "github.com/iden3/go-iden3-crypto/constants"
"github.com/iden3/go-iden3-crypto/ff"
"github.com/iden3/go-iden3-crypto/keccak256"
"github.com/iden3/go-iden3-crypto/utils"
_constants "github.com/iden3/go-iden3-crypto/v2/constants"
"github.com/iden3/go-iden3-crypto/v2/ff"
"github.com/iden3/go-iden3-crypto/v2/keccak256"
"github.com/iden3/go-iden3-crypto/v2/utils"
)

// SEED defines the seed used to constants
Expand Down
2 changes: 1 addition & 1 deletion poseidon/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"math/big"

"github.com/iden3/go-iden3-crypto/ff"
"github.com/iden3/go-iden3-crypto/v2/ff"
)

type constantsStr struct {
Expand Down
4 changes: 2 additions & 2 deletions poseidon/poseidon.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"math/big"

"github.com/iden3/go-iden3-crypto/ff"
"github.com/iden3/go-iden3-crypto/utils"
"github.com/iden3/go-iden3-crypto/v2/ff"
"github.com/iden3/go-iden3-crypto/v2/utils"
)

// NROUNDSF constant from Poseidon paper
Expand Down
2 changes: 1 addition & 1 deletion poseidon/poseidon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"math/big"
"testing"

"github.com/iden3/go-iden3-crypto/utils"
"github.com/iden3/go-iden3-crypto/v2/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"math/big"
"strings"

"github.com/iden3/go-iden3-crypto/constants"
"github.com/iden3/go-iden3-crypto/ff"
"github.com/iden3/go-iden3-crypto/v2/constants"
"github.com/iden3/go-iden3-crypto/v2/ff"
)

// NewIntFromString creates a new big.Int from a decimal integer encoded as a
Expand Down

0 comments on commit 7b1ef48

Please sign in to comment.