client

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GenerateWalletSuccessTopic = "mpc.mpc_keygen_success.*" // 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 mpc.KeygenSuccessEvent)) error

	SignTransaction(msg *types.SignTxMessage) error
	OnSignResult(callback func(event event.SigningResultEvent)) error
}

func NewMPCClient

func NewMPCClient(opts Options) MPCClient

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

Jump to

Keyboard shortcuts

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