Documentation ¶
Index ¶
- func Recover[C any](m dsl.Module, dest t.ModuleID, data [][]byte, sigShares [][]byte, context *C)
- func SignShare[C any](m dsl.Module, dest t.ModuleID, data [][]byte, context *C)
- func UponEvent[EvWrapper pb.Event_TypeWrapper[Ev], Ev any](m dsl.Module, handler func(ev *Ev) error)
- func UponRecoverResult[C any](m dsl.Module, ...)
- func UponSignShareResult[C any](m dsl.Module, handler func(sigShare []byte, context *C) error)
- func UponVerifyFullResult[C any](m dsl.Module, handler func(ok bool, err string, context *C) error)
- func UponVerifyShareResult[C any](m dsl.Module, handler func(ok bool, err string, context *C) error)
- func VerifyFull[C any](m dsl.Module, dest t.ModuleID, data [][]byte, sigFull []byte, context *C)
- func VerifyShare[C any](m dsl.Module, dest t.ModuleID, data [][]byte, sigShare []byte, nodeID t.NodeID, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Recover ¶
Recover emits a signature recovery request event. The response should be processed using UponRecoverResult with the same context type C. C can be an arbitrary type and does not have to be serializable.
func SignShare ¶
SignShare emits a request event to (threshold-)sign the given message. The response should be processed using UponSignShareResult with the same context type C. C can be an arbitrary type and does not have to be serializable.
func UponEvent ¶
func UponEvent[EvWrapper pb.Event_TypeWrapper[Ev], Ev any](m dsl.Module, handler func(ev *Ev) error)
UponEvent registers a handler for the given threshcrypto event type.
func UponRecoverResult ¶
func UponRecoverResult[C any](m dsl.Module, handler func(ok bool, fullSig []byte, err string, context *C) error)
UponRecoverResult invokes handler when the module receives a response to a request made by Recover with the same context type C.
func UponSignShareResult ¶
UponSignShareResult invokes handler when the module receives a response to a request made by SignShare with the same context type C.
func UponVerifyFullResult ¶
UponVerifyFullResult invokes handler when the module receives a response to a request made by VerifyFull with the same context type C.
func UponVerifyShareResult ¶
func UponVerifyShareResult[C any](m dsl.Module, handler func(ok bool, err string, context *C) error)
UponVerifyShareResult invokes handler when the module receives a response to a request made by VerifyShare with the same context type C.
func VerifyFull ¶
VerifyFull emits a (full) (threshold) signature verification request event. The response should be processed using UponVerifyFullResult with the same context type C. C can be an arbitrary type and does not have to be serializable.
func VerifyShare ¶
func VerifyShare[C any](m dsl.Module, dest t.ModuleID, data [][]byte, sigShare []byte, nodeID t.NodeID, context *C)
VerifyShare emits a signature share verification request event. The response should be processed using UponVerifyShareResult with the same context type C. C can be an arbitrary type and does not have to be serializable.
Types ¶
This section is empty.