forked from strangelove-ventures/horcrux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interfaces defined where it is used.
- Loading branch information
Showing
14 changed files
with
216 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package node | ||
|
||
import ( | ||
cometcrypto "github.com/cometbft/cometbft/crypto" | ||
"github.com/strangelove-ventures/horcrux/pkg/pcosigner" | ||
"github.com/strangelove-ventures/horcrux/pkg/types" | ||
) | ||
|
||
// ICosigner interface is a set of methods for an m-of-n threshold signature. | ||
// This interface abstracts the underlying key storage and management | ||
type ICosigner interface { | ||
// GetID should return the id number of the cosigner | ||
// The ID is the shamir index: 1, 2, etc... | ||
GetID() int | ||
|
||
// GetAddress gets the P2P URL (GRPC and Raft) | ||
GetAddress() string | ||
|
||
// GetPubKey gets the combined public key (permament) | ||
// Not used by Remote Cosigner | ||
GetPubKey(chainID string) (cometcrypto.PubKey, error) | ||
|
||
VerifySignature(chainID string, payload, signature []byte) bool | ||
|
||
// GetNonces requests nonce frpm the peer cosigners | ||
GetNonces(chainID string, hrst types.HRSTKey) (*pcosigner.CosignerNoncesResponse, error) | ||
|
||
// Sign the requested bytes | ||
SetNoncesAndSign(req pcosigner.CosignerSetNoncesAndSignRequest) (*pcosigner.CosignerSignResponse, error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.