Versions in this module Expand all Collapse all v1 v1.28.1 Apr 11, 2023 v1.28.0 Jan 19, 2023 v1.20.0 Jul 1, 2022 Changes in this version + func BytesToHashString(msg []byte) (string, error) + func CheckKeyOnCurve(pkData []byte) (bool, error) + func CheckUnicast(round RoundInfo) bool + func GenerateSignature(msg []byte, msgID string, privKey crypto.PrivKey) ([]byte, error) + func GetBroadcastMessageType(msgType message.TssMsgType) message.TssMsgType + func GetECDSAPubKeyFromPubKeyData(pkData []byte) (*ecdsa.PublicKey, error) + func GetPIDFromPartyID(partyID *btss.PartyID) (peer.ID, error) + func GetPIDFromPubKey(pk crypto.PubKey) (peer.ID, error) + func GetPIDFromPubKeyData(pk []byte) (peer.ID, error) + func GetPIDsFromPubKeys(pks [][]byte) ([]peer.ID, error) + func GetParties(keys []crypto.PubKey, localPK crypto.PubKey, peerMap map[string]*peer.AddrInfo) ([]*btss.PartyID, *btss.PartyID, error) + func GetPatyIDInfoMap(partiesID []*btss.PartyID) (map[string]*btss.PartyID, error) + func GetPreviousKeySignUicast(current string) string + func GetPubKeyDataFromPartyID(partyID *btss.PartyID) ([]byte, error) + func GetPubKeyDatasFromPartyIDs(partyIDs []*btss.PartyID) ([][]byte, error) + func GetPubKeyDatasMapFromPartyIDs(partyIDs []*btss.PartyID) (map[string][]byte, error) + func GetPubKeyFromPartyID(partyID *btss.PartyID) (crypto.PubKey, error) + func GetPubKeyFromPubKeyData(pk []byte) (crypto.PubKey, error) + func GetPubKeyInfoFromECDSAPubkey(ecdsaPk *ecdsa.PublicKey) (string, []byte, error) + func GetPubKeysFromPartyIDs(partyIDs []*btss.PartyID) ([]crypto.PubKey, error) + func GetPubKeysFromPubKeyDatas(pksData [][]byte) ([]crypto.PubKey, error) + func GetTssPubKey(pubKeyPoint *bcrypto.ECPoint) (*ecdsa.PublicKey, error) + func MsgToHashInt(msg []byte) (*big.Int, error) + func MsgToHashString(msg []byte) (string, error) + func SortPubKey(keys []crypto.PubKey) + func VerifySignature(pubKey crypto.PubKey, message, sig []byte, msgID string) (bool, error) + type PartyInfo struct + PartyIDMap map[string]*btss.PartyID + PartyMap *sync.Map + type RoundInfo struct + Index int + MsgIdentifier string + RoundMsg string + func GetMsgRound(msg []byte, partyID *btss.PartyID, isBroadcast bool) (RoundInfo, error) + type Signature struct + Msg string + R string + RecoveryID string + S string + SignEthData []byte + func BatchSignatures(sigs []*bcommon.SignatureData, msgsToSign [][]byte) []Signature + func NewSignature(msg, r, s, recoveryID string, data []byte) Signature + type Status byte + const Fail + const NA + const Success