conversion

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: MIT Imports: 25 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccPubKeysFromPartyIDs

func AccPubKeysFromPartyIDs(partyIDs []string, partyIDMap map[string]*btss.PartyID) ([]string, error)

func BytesToHashString

func BytesToHashString(msg []byte) (string, error)

func CheckKeyOnCurve

func CheckKeyOnCurve(pk string) (bool, error)

func GetParties

func GetParties(keys []string, localPartyKey string) ([]*btss.PartyID, *btss.PartyID, error)

func GetPeerIDFromPartyID

func GetPeerIDFromPartyID(partyID *btss.PartyID) (peer.ID, error)

func GetPeerIDFromPubKey

func GetPeerIDFromPubKey(pubkey string) (peer.ID, error)

GetPeerIDFromPubKey get the peer.ID from bech32 format node pub key

func GetPeerIDFromSecp256PubKey

func GetPeerIDFromSecp256PubKey(pk []byte) (peer.ID, error)

GetPeerIDFromSecp256PubKey convert the given pubkey into a peer.ID

func GetPeerIDs

func GetPeerIDs(pubkeys []string) ([]peer.ID, error)

GetPeerIDs return a slice of peer id

func GetPeerIDsFromPubKeys

func GetPeerIDsFromPubKeys(pubkeys []string) ([]peer.ID, error)

GetPeerIDsFromPubKeys convert a list of node pub key to their peer.ID

func GetPeersID

func GetPeersID(partyIDtoP2PID map[string]peer.ID, localPeerID string) []peer.ID

func GetPreviousKeySignUicast

func GetPreviousKeySignUicast(current string) string

func GetPriKey

func GetPriKey(priKeyString string) (tcrypto.PrivKey, error)

func GetPriKeyRawBytes

func GetPriKeyRawBytes(priKey tcrypto.PrivKey) ([]byte, error)

func GetPubKeyFromPeerID

func GetPubKeyFromPeerID(pID string) (string, error)

GetPubKeyFromPeerID extract the pub key from PeerID

func GetPubKeysFromPeerIDs

func GetPubKeysFromPeerIDs(peers []string) ([]string, error)

GetPubKeysFromPeerIDs given a list of peer ids, and get a list og pub keys.

func GetRandomPeerID

func GetRandomPeerID() peer.ID

GetRandomPeerID for test

func GetRandomPubKey

func GetRandomPubKey() string

GetRandomPubKey for test

func GetThreshold

func GetThreshold(value int) (int, error)

func GetTssPubKey

func GetTssPubKey(pubKeyPoint *crypto.ECPoint) (string, types.AccAddress, error)

func PartyIDtoPubKey

func PartyIDtoPubKey(party *btss.PartyID) (string, error)

func RandStringBytesMask

func RandStringBytesMask(n int) string

func SetupBech32Prefix

func SetupBech32Prefix()

func SetupIDMaps

func SetupIDMaps(parties map[string]*btss.PartyID, partyIDtoP2PID map[string]peer.ID) error

func SetupPartyIDMap

func SetupPartyIDMap(partiesID []*btss.PartyID) map[string]*btss.PartyID

func VersionLTCheck

func VersionLTCheck(currentVer, expectedVer string) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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