Refactor signer implementation to use p8k package
- Replaced all instances of p256k1signer with the new p8k.Signer across various modules, including event creation, policy handling, and database interactions. - Updated related test cases and benchmarks to ensure compatibility with the new signer interface. - Bumped version to v0.25.0 to reflect these significant changes and improvements in cryptographic operations.
This commit is contained in:
@@ -17,7 +17,7 @@ import (
|
||||
|
||||
"lol.mleku.dev/chk"
|
||||
"lol.mleku.dev/log"
|
||||
p256k1signer "p256k1.mleku.dev/signer"
|
||||
"next.orly.dev/pkg/interfaces/signer/p8k"
|
||||
"github.com/minio/sha256-simd"
|
||||
"next.orly.dev/pkg/encoders/bech32encoding"
|
||||
"next.orly.dev/pkg/encoders/event"
|
||||
@@ -335,7 +335,10 @@ func NewAggregator(keyInput string, since, until *timestamp.T, bloomFilterFile s
|
||||
}
|
||||
|
||||
// Create signer from private key
|
||||
signer = p256k1signer.NewP256K1Signer()
|
||||
var signerErr error
|
||||
if signer, signerErr = p8k.New(); signerErr != nil {
|
||||
return nil, fmt.Errorf("failed to create signer: %w", signerErr)
|
||||
}
|
||||
if err = signer.InitSec(secretBytes); chk.E(err) {
|
||||
return nil, fmt.Errorf("failed to initialize signer: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user