Documentation
¶
Index ¶
- Constants
- Variables
- func ComposeReadyKey(nodeID string) string
- func NewRegistry(nodeID string, peerNodeIDs []string, consulKV infra.ConsulKV) *registry
- func PartyIDToRoutingDest(partyID party.ID) string
- type BaseReshareSession
- func (s *BaseReshareSession) ErrChan() <-chan error
- func (s *BaseReshareSession) GetPubKeyResult() []byte
- func (s *BaseReshareSession) IsNewPeer() bool
- func (s *BaseReshareSession) ListenToIncomingMessageAsync()
- func (s *BaseReshareSession) ProcessInboundMessage(msgBytes []byte)
- func (s *BaseReshareSession) ProcessOutboundMessage()
- func (s *BaseReshareSession) Stop()
- type ID
- type KMSEnabledKVStore
- type KeyComposerFn
- type KeyGenSession
- type KeyType
- type Node
- func (p *Node) CreateKeyGenSession(walletID string, threshold int, resultQueue messaging.MessageQueue) (KeyGenSession, error)
- func (p *Node) CreateReshareSession(sessionType SessionType, walletID string, threshold int, newThreshold int, ...) (ReshareSession, error)
- func (p *Node) CreateSignSession(sessionID string, walletID string, messageHash []byte, signerPeerIDs []string, ...) (SignSession, error)
- func (p *Node) ID() string
- func (p *Node) KeyInfoStore() keyinfo.Store
- type PeerRegistry
- type ReshareSession
- type Session
- type SessionType
- type SignSession
- type TopicComposer
Constants ¶
View Source
const ( PurposeKeygen string = "keygen" PurposeSign string = "sign" DefaultVersion int = 1 )
View Source
const (
ReadinessCheckPeriod = 1 * time.Second
)
Variables ¶
View Source
var ( ErrNotEnoughParticipants = errors.New("Not enough participants to sign") ErrNotInParticipantList = errors.New("Node is not in the participant list") )
Functions ¶
func ComposeReadyKey ¶
func NewRegistry ¶
func PartyIDToRoutingDest ¶
Helper function to get party routing destination
Types ¶
type BaseReshareSession ¶
type BaseReshareSession struct {
// contains filtered or unexported fields
}
BaseReshareSession provides common functionality for reshare sessions
func (*BaseReshareSession) GetPubKeyResult ¶
func (s *BaseReshareSession) GetPubKeyResult() []byte
GetPubKeyResult returns the public key after successful resharing
func (*BaseReshareSession) IsNewPeer ¶
func (s *BaseReshareSession) IsNewPeer() bool
IsNewPeer returns true if this node is joining as a new peer
func (*BaseReshareSession) ListenToIncomingMessageAsync ¶
func (s *BaseReshareSession) ListenToIncomingMessageAsync()
func (*BaseReshareSession) ProcessInboundMessage ¶
func (s *BaseReshareSession) ProcessInboundMessage(msgBytes []byte)
func (*BaseReshareSession) ProcessOutboundMessage ¶
func (s *BaseReshareSession) ProcessOutboundMessage()
type KMSEnabledKVStore ¶
KMSEnabledKVStore wraps a regular KVStore with KMS encryption
func NewKMSEnabledKVStore ¶
func NewKMSEnabledKVStore(store kvstore.KVStore, nodeID string) (*KMSEnabledKVStore, error)
NewKMSEnabledKVStore creates a new KMS-enabled KV store
func (*KMSEnabledKVStore) Delete ¶
func (k *KMSEnabledKVStore) Delete(key string) error
Delete removes a value and its KMS entry if applicable
type KeyComposerFn ¶
type KeyGenSession ¶
type KeyGenSession interface {
Session
}
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) CreateKeyGenSession ¶
func (p *Node) CreateKeyGenSession( walletID string, threshold int, resultQueue messaging.MessageQueue, ) (KeyGenSession, error)
func (*Node) CreateReshareSession ¶
func (p *Node) CreateReshareSession( sessionType SessionType, walletID string, threshold int, newThreshold int, newNodeIDs []string, isNewPeer bool, resultQueue messaging.MessageQueue, ) (ReshareSession, error)
func (*Node) CreateSignSession ¶
func (p *Node) CreateSignSession( sessionID string, walletID string, messageHash []byte, signerPeerIDs []string, resultQueue messaging.MessageQueue, useBroadcast bool, ) (SignSession, error)
func (*Node) KeyInfoStore ¶
type PeerRegistry ¶
type ReshareSession ¶
type ReshareSession interface {
Session
Reshare(done func())
GetPubKeyResult() []byte
IsNewPeer() bool
}
ReshareSession represents a threshold signature resharing session
type SessionType ¶
type SessionType string
const ( TypeGenerateWalletResultFmt = "mpc.mpc_keygen_result.%s" SessionTypeCGGMP21 SessionType = "session_cggmp21" SessionTypeECDSA SessionType = "ecdsa" SessionTypeEDDSA SessionType = "eddsa" )
type SignSession ¶
type SignSession interface {
Session
}
type TopicComposer ¶
Click to show internal directories.
Click to hide internal directories.