Skip to content

Commit

Permalink
refactor: make SEDASigner interface exported
Browse files Browse the repository at this point in the history
  • Loading branch information
hacheigriega committed Sep 23, 2024
1 parent d2b3a1b commit 7490d3b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/utils/seda_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,19 @@ func saveSEDAKeys(keys []indexedPrivKey, dirPath string) error {
return nil
}

type sedaSigner interface {
type SEDASigner interface {
Sign(input []byte, index uint32) (signature []byte, err error)
}

var _ sedaSigner = &sedaKeys{}
var _ SEDASigner = &sedaKeys{}

type sedaKeys struct {
keys []indexedPrivKey
}

// LoadSEDASigner loads the SEDA keys from the given file and returns
// a sedaKeys object.
func LoadSEDASigner(loadPath string) (*sedaKeys, error) {
// LoadSEDASigner loads the SEDA keys from a given file and returns
// a SEDASigner interface.
func LoadSEDASigner(loadPath string) (SEDASigner, error) {
keysJSONBytes, err := os.ReadFile(loadPath)
if err != nil {
return nil, fmt.Errorf("failed to read SEDA keys from %v: %v", loadPath, err)
Expand Down

0 comments on commit 7490d3b

Please sign in to comment.