Documentation
¶
Index ¶
Constants ¶
View Source
const ( GenerateWalletSuccessTopic = "mpc.mpc_keygen_result.*" // wildcard to listen to all success events ResharingSuccessTopic = "mpc.mpc_reshare_result.*" // wildcard to listen to all success events )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MPCClient ¶
type MPCClient interface {
CreateWallet(walletID string) error
OnWalletCreationResult(callback func(event event.KeygenResultEvent)) error
SignTransaction(msg *types.SignTxMessage) error
OnSignResult(callback func(event event.SigningResultEvent)) error
Resharing(msg *types.ResharingMessage) error
OnResharingResult(callback func(event event.ResharingResultEvent)) error
}
func NewMPCClient ¶
NewMPCClient creates a new MPC client using the provided options. It reads the Ed25519 private key from disk and sets up messaging connections. If the key is encrypted (.age file), decryption options must be provided in the config.
type Options ¶
type Options struct {
// NATS connection
NatsConn *nats.Conn
// Key path options
KeyPath string // Path to unencrypted key (default: "./event_initiator.key")
// Encryption options
Encrypted bool // Whether the key is encrypted
Password string // Password for encrypted key
}
Options defines configuration options for creating a new MPCClient
Click to show internal directories.
Click to hide internal directories.