No commit suggestions generated

This commit is contained in:
Prad Nukala
2025-10-09 15:10:39 -04:00
commit a934caa7d3
323 changed files with 98121 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
//
// Copyright Coinbase, Inc. All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//
// Copyright Coinbase, Inc. All Rights Reserved.
//
//
// SPDX-License-Identifier: Apache-2.0
//
package sharing
import (
crand "crypto/rand"
"testing"
"github.com/stretchr/testify/require"
"github.com/sonr-io/sonr/crypto/core/curves"
)
func TestNewPoly(t *testing.T) {
curve := curves.BLS12381G1()
secret := curve.NewScalar().Hash([]byte("test"))
poly := new(Polynomial).Init(secret, 4, crand.Reader)
require.NotNil(t, poly)
require.Equal(t, poly.Coefficients[0], secret)
}