Documentation ¶
Index ¶
- type MoneroKeySign
- type MoneroSpendProof
- type Notifier
- type Request
- type Response
- type SignatureNotifier
- func (s *SignatureNotifier) BroadcastFailed(messageID string, peers []peer.ID) error
- func (s *SignatureNotifier) BroadcastSignature(messageID string, signedTxHex *MoneroSpendProof, peers []peer.ID) error
- func (s *SignatureNotifier) ReleaseStream(msgID string)
- func (s *SignatureNotifier) WaitForSignature(messageID string, encodeddest string, walletClient wallet.Client, ...) (*MoneroSpendProof, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MoneroKeySign ¶
type MoneroKeySign struct {
// contains filtered or unexported fields
}
func NewMoneroKeySign ¶
func NewMoneroKeySign(localP2PID string, conf common.TssConfig, broadcastChan chan *messages.BroadcastMsgChan, stopChan chan struct{}, msgID string, privKey tcrypto.PrivKey, p2pComm *p2p.Communication, keygenHeight, rpcAddress string) (*MoneroKeySign, moneroWallet.Client, error)
func (*MoneroKeySign) GetTssCommonStruct ¶
func (tKeySign *MoneroKeySign) GetTssCommonStruct() *common.TssCommon
func (*MoneroKeySign) GetTssKeySignChannels ¶
func (tKeySign *MoneroKeySign) GetTssKeySignChannels() chan *p2p.Message
func (*MoneroKeySign) SignMessage ¶
func (tKeySign *MoneroKeySign) SignMessage(encodedTx string, parties []string) (*MoneroSpendProof, error)
signMessage
type MoneroSpendProof ¶
type Notifier ¶
type Notifier struct { MessageID string // contains filtered or unexported fields }
Notifier is design to receive keysign signature, success or failure
func NewNotifier ¶
func NewNotifier(messageID string, encodedAddress string, client wallet.Client, threshold int) (*Notifier, error)
NewNotifier create a new instance of Notifier
func (*Notifier) GetResponseChannel ¶
func (n *Notifier) GetResponseChannel() <-chan *MoneroSpendProof
GetResponseChannel the final signature gathered from keysign party will be returned from the channel
func (*Notifier) ProcessSignature ¶
func (n *Notifier) ProcessSignature(data *MoneroSpendProof) (bool, error)
ProcessSignature is to verify whether the signature is valid return value bool , true indicated we already gather all the signature from keysign party, and they are all match false means we are still waiting for more signature from keysign party
type Request ¶
type Request struct { SignerPubKeys []string `json:"signer_pub_keys"` BlockHeight int64 `json:"block_height"` Version string `json:"tss_version"` PoolPubKey string `json:"pool_pub_key"` // pub key of the pool that we would like to send this message from // these parameters are for monero RpcAddress string `json:"rpc_address"` EncodedTx string `json:"encoded_transaction"` KeygenHeight string `json:"keygen_height"` }
Request request to sign a message
type Response ¶
type Response struct { SignedTxHex string `json:"signed_tx_hex"` TxKey string `json:"tx_key"` Status common.Status `json:"status"` Blame blame.Blame `json:"blame"` }
Response key sign response
type SignatureNotifier ¶
type SignatureNotifier struct {
// contains filtered or unexported fields
}
SignatureNotifier is design to notify the
func NewSignatureNotifier ¶
func NewSignatureNotifier(host host.Host) *SignatureNotifier
NewSignatureNotifier create a new instance of SignatureNotifier
func (*SignatureNotifier) BroadcastFailed ¶
func (s *SignatureNotifier) BroadcastFailed(messageID string, peers []peer.ID) error
BroadcastFailed will send keysign failed message to the nodes that are not in the keysign party
func (*SignatureNotifier) BroadcastSignature ¶
func (s *SignatureNotifier) BroadcastSignature(messageID string, signedTxHex *MoneroSpendProof, peers []peer.ID) error
BroadcastSignature sending the keysign signature to all other peers
func (*SignatureNotifier) ReleaseStream ¶
func (s *SignatureNotifier) ReleaseStream(msgID string)
func (*SignatureNotifier) WaitForSignature ¶
func (s *SignatureNotifier) WaitForSignature(messageID string, encodeddest string, walletClient wallet.Client, timeout time.Duration, sigChan chan string, threshold int) (*MoneroSpendProof, error)
WaitForSignature wait until keysign finished and signature is available