coordinator

package
v0.0.0-...-b211041 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0 Imports: 18 Imported by: 1

README

Coordinator

This package utilizes the voltix tss package and simplifies the process of key generation, message signing & key resharing.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteECDSAKeySigning

func ExecuteECDSAKeySigning(input SignInput) (string, error)

ExecuteECDSAKeySigning Coordinates ECDSA signing process in a TSS env from session setup to computing and encoding the signature

func ExecuteEdDSAKeySigning

func ExecuteEdDSAKeySigning(input SignInput) (string, error)

ExecuteEdDSAKeySigning Coordinates EdDSA signing process in a TSS env from session setup to computing and encoding the signature

func ExecuteKeyGeneration

func ExecuteKeyGeneration(input KeygenInput) (string, error)

ExecuteKeyGeneration Orchestrates TSS keygen process for ECDSA & EdDSA including session management and message handling

func ExecuteKeyResharing

func ExecuteKeyResharing(input ReshareInput) (string, error)

ExecuteKeyResharing Manages the key resharing process for ECDSA & EdDSA ensures all parties are synced and sessions are properly handled

func GenerateRandomChainCodeHex

func GenerateRandomChainCodeHex() (string, error)

GenerateRandomChainCodeHex Generates a 32-byte random chain code encoded as a hexadecimal string. Does not take arg because it relies on the (secure) rng from the crypto pkg

func StartSession

func StartSession(server string, session string, parties []string) error

func WaitAllParties

func WaitAllParties(parties []string, server, session string) error

Types

type KeygenInput

type KeygenInput struct {
	Server      string
	Session     string
	Key         string
	KeyFolder   string
	Message     string
	ChainCode   string
	DerivePath  string
	PubKey      string
	PubKeyEdDSA string
}

type LocalStateAccessorImp

type LocalStateAccessorImp struct {
	// contains filtered or unexported fields
}

func (*LocalStateAccessorImp) GetLocalState

func (l *LocalStateAccessorImp) GetLocalState(pubKey string) (string, error)

func (*LocalStateAccessorImp) SaveLocalState

func (l *LocalStateAccessorImp) SaveLocalState(pubKey, localState string) error

type MessengerImp

type MessengerImp struct {
	Server    string
	SessionID string
}

func (*MessengerImp) Send

func (m *MessengerImp) Send(from, to, body string) error

type ReshareInput

type ReshareInput struct {
	Server        string
	Session       string
	Key           string
	KeyFolder     string
	ChainCode     string
	PubKey        string
	PubKeyEdDSA   string
	ResharePrefix string
	OldParties    []string
}

type SignInput

type SignInput struct {
	Server      string
	Session     string
	Key         string
	KeyFolder   string
	Message     string
	ChainCode   string
	DerivePath  string
	PubKey      string
	PubKeyEdDSA string
}

Jump to

Keyboard shortcuts

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