mirror of
https://github.com/AthanorLabs/atomic-swap.git
synced 2026-04-22 03:00:02 -04:00
18 lines
391 B
Go
18 lines
391 B
Go
package protocol
|
|
|
|
import (
|
|
"encoding/hex"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestKeysAndProof(t *testing.T) {
|
|
kp, err := GenerateKeysAndProof()
|
|
require.NoError(t, err)
|
|
|
|
pk, err := VerifyKeysAndProof(hex.EncodeToString(kp.DLEqProof.Proof()), kp.Secp256k1PublicKey.String())
|
|
require.NoError(t, err)
|
|
require.Equal(t, kp.Secp256k1PublicKey.String(), pk.String())
|
|
}
|