Refactor crypto package to use p256k1 signer
Some checks failed
Go / build (push) Has been cancelled
Go / release (push) Has been cancelled

- Replaced the p256k package with p256k1.mleku.dev/signer across the codebase, updating all instances where the previous signer was utilized.
- Removed the deprecated p256k package, including all related files and tests, to streamline the codebase and improve maintainability.
- Updated various components, including event handling, database interactions, and protocol implementations, to ensure compatibility with the new signer interface.
- Enhanced tests to validate the new signing functionality and ensure robustness across the application.
- Bumped version to v0.23.3 to reflect these changes.
This commit is contained in:
2025-11-03 10:21:31 +00:00
parent edcdec9c7e
commit 2614b51068
50 changed files with 312 additions and 972 deletions

View File

@@ -7,14 +7,14 @@ import (
"lol.mleku.dev/chk"
"next.orly.dev/pkg/crypto/ec/secp256k1"
"next.orly.dev/pkg/crypto/p256k"
p256k1signer "p256k1.mleku.dev/signer"
"next.orly.dev/pkg/encoders/bech32encoding"
"next.orly.dev/pkg/protocol/directory"
)
// Helper to create a test keypair using p256k.Signer
func createTestKeypair(t *testing.T) (*p256k.Signer, []byte) {
signer := new(p256k.Signer)
// Helper to create a test keypair using p256k1signer.P256K1Signer
func createTestKeypair(t *testing.T) (*p256k1signer.P256K1Signer, []byte) {
signer := p256k1signer.NewP256K1Signer()
if err := signer.Generate(); chk.E(err) {
t.Fatalf("failed to generate keypair: %v", err)
}