dsl

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recover

func Recover[C any](m dsl.Module, dest t.ModuleID, data [][]byte, sigShares [][]byte, context *C)

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

func SignShare[C any](m dsl.Module, dest t.ModuleID, data [][]byte, context *C)

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

func UponSignShareResult[C any](m dsl.Module, handler func(sigShare []byte, context *C) error)

UponSignShareResult invokes handler when the module receives a response to a request made by SignShare with the same context type C.

func UponVerifyFullResult

func UponVerifyFullResult[C any](m dsl.Module, handler func(ok bool, err string, context *C) error)

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

func VerifyFull[C any](m dsl.Module, dest t.ModuleID, data [][]byte, sigFull []byte, context *C)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL