Documentation
¶
Index ¶
- Constants
- Variables
- func ComparePartyIDs(x, y *tss.PartyID) bool
- func ComposeReadyKey(nodeID string) string
- func CreatePartyID(nodeID string, label string) *tss.PartyID
- func NewRegistry(nodeID string, peerNodeIDs []string, consulKV infra.ConsulKV) *registry
- func PartyIDToNodeID(partyID *tss.PartyID) string
- type EDDSAKeygenSession
- type EDDSAKeygenSuccessEvent
- type EDDSASigningSession
- type GetRoundFunc
- type ID
- type ISession
- type ISigningSession
- type KeyComposerFn
- type KeyType
- type KeygenSession
- type KeygenSuccessEvent
- type Node
- func (p *Node) Close()
- func (p *Node) CreateEDDSAKeyGenSession(walletID string, threshold int, successQueue messaging.MessageQueue) (*EDDSAKeygenSession, error)
- func (p *Node) CreateEDDSASigningSession(walletID string, txID string, networkInternalCode string, threshold int, ...) (*EDDSASigningSession, error)
- func (p *Node) CreateKeyGenSession(walletID string, threshold int, successQueue messaging.MessageQueue) (*KeygenSession, error)
- func (p *Node) CreateSigningSession(walletID string, txID string, networkInternalCode string, threshold int, ...) (*SigningSession, error)
- func (p *Node) ID() string
- type PeerRegistry
- type RoundInfo
- type Session
- func (s *Session) Close() error
- func (s *Session) ErrChan() <-chan error
- func (s *Session) GetPubKeyResult() []byte
- func (s *Session) ListenToIncomingMessageAsync()
- func (s *Session) PartyCount() int
- func (s *Session) PartyID() *tss.PartyID
- func (s *Session) PartyIDs() []*tss.PartyID
- func (s *Session) SendReplySignSuccess(natMsg *nats.Msg)
- type SessionType
- type SigningSession
- type TopicComposer
Constants ¶
View Source
const ( KEYGEN1 = "KGRound1Message" KEYGEN2aUnicast = "KGRound2Message1" KEYGEN2b = "KGRound2Message2" KEYGEN3 = "KGRound3Message" KEYSIGN1aUnicast = "SignRound1Message1" KEYSIGN1b = "SignRound1Message2" KEYSIGN2Unicast = "SignRound2Message" KEYSIGN3 = "SignRound3Message" KEYSIGN4 = "SignRound4Message" KEYSIGN5 = "SignRound5Message" KEYSIGN6 = "SignRound6Message" KEYSIGN7 = "SignRound7Message" KEYSIGN8 = "SignRound8Message" KEYSIGN9 = "SignRound9Message" TSSKEYGENROUNDS = 4 TSSKEYSIGNROUNDS = 10 )
View Source
const ( EDDSA_KEYGEN1 = "KGRound1Message" EDDSA_KEYGEN2aUnicast = "KGRound2Message1" EDDSA_KEYGEN2b = "KGRound2Message2" EDDSA_KEYSIGN1 = "SignRound1Message" EDDSA_KEYSIGN2 = "SignRound2Message" EDDSA_KEYSIGN3 = "SignRound3Message" EDDSA_TSSKEYGENROUNDS = 3 EDDSA_TSSKEYSIGNROUNDS = 3 )
View Source
const ( PurposeKeygen string = "keygen" PurposeSign string = "sign" )
View Source
const (
ReadinessCheckPeriod = 1 * time.Second
)
View Source
const (
TypeGenerateWalletSuccess = "mpc.mpc_keygen_success.%s"
)
Variables ¶
View Source
var (
ErrNotEnoughParticipants = errors.New("Not enough participants to sign")
)
Functions ¶
func ComparePartyIDs ¶
func ComposeReadyKey ¶
func NewRegistry ¶
func PartyIDToNodeID ¶
Types ¶
type EDDSAKeygenSession ¶
type EDDSAKeygenSession struct {
Session
// contains filtered or unexported fields
}
func NewEDDSAKeygenSession ¶
func NewEDDSAKeygenSession( walletID string, pubSub messaging.PubSub, direct messaging.DirectMessaging, participantPeerIDs []string, selfID *tss.PartyID, partyIDs []*tss.PartyID, threshold int, kvstore kvstore.KVStore, keyinfoStore keyinfo.Store, resultQueue messaging.MessageQueue, identityStore identity.Store, ) *EDDSAKeygenSession
func (*EDDSAKeygenSession) GenerateKey ¶
func (s *EDDSAKeygenSession) GenerateKey(done func())
func (*EDDSAKeygenSession) Init ¶
func (s *EDDSAKeygenSession) Init()
type EDDSAKeygenSuccessEvent ¶
type EDDSASigningSession ¶
type EDDSASigningSession struct {
Session
// contains filtered or unexported fields
}
func NewEDDSASigningSession ¶
func NewEDDSASigningSession( walletID string, txID string, networkInternalCode string, pubSub messaging.PubSub, direct messaging.DirectMessaging, participantPeerIDs []string, selfID *tss.PartyID, partyIDs []*tss.PartyID, threshold int, kvstore kvstore.KVStore, keyinfoStore keyinfo.Store, resultQueue messaging.MessageQueue, identityStore identity.Store, ) *EDDSASigningSession
func (*EDDSASigningSession) Sign ¶
func (s *EDDSASigningSession) Sign(onSuccess func(data []byte))
type GetRoundFunc ¶
type ISigningSession ¶
type KeyComposerFn ¶
type KeyType ¶
type KeyType string
const ( KeyTypeSecp256k1 KeyType = "secp256k1" KeyTypeEd25519 = "ed25519" )
type KeygenSession ¶
type KeygenSession struct {
Session
// contains filtered or unexported fields
}
func NewKeygenSession ¶
func NewKeygenSession( walletID string, pubSub messaging.PubSub, direct messaging.DirectMessaging, participantPeerIDs []string, selfID *tss.PartyID, partyIDs []*tss.PartyID, threshold int, preParams *keygen.LocalPreParams, kvstore kvstore.KVStore, keyinfoStore keyinfo.Store, resultQueue messaging.MessageQueue, identityStore identity.Store, ) *KeygenSession
func (*KeygenSession) GenerateKey ¶
func (s *KeygenSession) GenerateKey(done func())
func (*KeygenSession) Init ¶
func (s *KeygenSession) Init()
type KeygenSuccessEvent ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) CreateEDDSAKeyGenSession ¶
func (p *Node) CreateEDDSAKeyGenSession(walletID string, threshold int, successQueue messaging.MessageQueue) (*EDDSAKeygenSession, error)
func (*Node) CreateEDDSASigningSession ¶
func (p *Node) CreateEDDSASigningSession( walletID string, txID string, networkInternalCode string, threshold int, resultQueue messaging.MessageQueue, ) (*EDDSASigningSession, error)
func (*Node) CreateKeyGenSession ¶
func (p *Node) CreateKeyGenSession(walletID string, threshold int, successQueue messaging.MessageQueue) (*KeygenSession, error)
func (*Node) CreateSigningSession ¶
func (p *Node) CreateSigningSession( walletID string, txID string, networkInternalCode string, threshold int, resultQueue messaging.MessageQueue, ) (*SigningSession, error)
type PeerRegistry ¶
type RoundInfo ¶
func GetEcdsaMsgRound ¶
type Session ¶
type Session struct {
ErrCh chan error
// contains filtered or unexported fields
}
func (*Session) GetPubKeyResult ¶
func (*Session) ListenToIncomingMessageAsync ¶
func (s *Session) ListenToIncomingMessageAsync()
func (*Session) PartyCount ¶
func (*Session) SendReplySignSuccess ¶
type SessionType ¶
type SessionType string
const ( SessionTypeEcdsa SessionType = "session_ecdsa" SessionTypeEddsa SessionType = "session_eddsa" )
type SigningSession ¶
type SigningSession struct {
Session
// contains filtered or unexported fields
}
Ecdsa signing session
func NewSigningSession ¶
func NewSigningSession( walletID string, txID string, networkInternalCode string, pubSub messaging.PubSub, direct messaging.DirectMessaging, participantPeerIDs []string, selfID *tss.PartyID, partyIDs []*tss.PartyID, threshold int, preParams *keygen.LocalPreParams, kvstore kvstore.KVStore, keyinfoStore keyinfo.Store, resultQueue messaging.MessageQueue, identityStore identity.Store, ) *SigningSession
func (*SigningSession) Sign ¶
func (s *SigningSession) Sign(onSuccess func(data []byte))
type TopicComposer ¶
Click to show internal directories.
Click to hide internal directories.