Documentation
¶
Index ¶
- Constants
- type MPCAccount
- func (a *MPCAccount) AddShare(index int, share *Share) error
- func (a *MPCAccount) GetShare(index int) (*Share, error)
- func (a *MPCAccount) RefreshShares() error
- func (a *MPCAccount) Sign(message []byte, participatingShares map[int]*Share) ([]byte, error)
- func (a *MPCAccount) Verify(message []byte, signature []byte) bool
- type Manager
- type Point
- type Protocol
- type PublicKey
- type Share
Constants ¶
View Source
const ( // DefaultThreshold is the default threshold for MPC DefaultThreshold = 3 // DefaultParties is the default number of parties DefaultParties = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MPCAccount ¶
type MPCAccount struct {
AccountID ids.ShortID
Threshold int
Parties int
PublicKey *PublicKey
Protocol Protocol
// contains filtered or unexported fields
}
MPCAccount represents a per-account MPC configuration
func (*MPCAccount) AddShare ¶
func (a *MPCAccount) AddShare(index int, share *Share) error
AddShare adds a share to the account
func (*MPCAccount) GetShare ¶
func (a *MPCAccount) GetShare(index int) (*Share, error)
GetShare retrieves a specific share
func (*MPCAccount) RefreshShares ¶
func (a *MPCAccount) RefreshShares() error
RefreshShares performs proactive secret sharing to refresh shares
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages per-account MPC configurations
func (*Manager) CreateAccount ¶
func (m *Manager) CreateAccount(accountID ids.ShortID, threshold, parties int, protocol Protocol) (*MPCAccount, error)
CreateAccount creates a new MPC account
func (*Manager) GetAccount ¶
func (m *Manager) GetAccount(accountID ids.ShortID) (*MPCAccount, error)
GetAccount retrieves an MPC account
Click to show internal directories.
Click to hide internal directories.