Documentation ¶
Index ¶
- Constants
- func CheckDuplicates(arr []string) error
- func CheckKeysArr(keysArr []string) error
- func CheckPublicKey(address string) error
- func DecodeAndSort(item string) ([][]byte, error)
- func DecodeBase58PublicKey(encodedBase58PublicKey string) ([]byte, error)
- func IsValidator(authorities []string, pk string) bool
- func KeyStringToSortedHashedHex(keys []string) (string, error)
- func ParseCCName(stub shim.ChaincodeStubInterface) (string, error)
- func ToLowerFirstLetter(in string) string
- func ValidateMinSignatures(n int) error
Constants ¶
const MinSignaturesRequired = 1
MinSignaturesRequired defines the minimum number of signatures required for a multisignature transaction.
Variables ¶
This section is empty.
Functions ¶
func CheckDuplicates ¶
CheckDuplicates checks a string array for duplicates. It returns an error if duplicates are found, indicating the first duplicated item encountered.
func CheckKeysArr ¶
CheckKeysArr checks keys if not empty or having duplicates
func CheckPublicKey ¶
CheckPublicKey verifies public key in the address variable
func DecodeAndSort ¶
DecodeAndSort returns decoded and sorted collection
func DecodeBase58PublicKey ¶
DecodeBase58PublicKey decode public key from base58 to ed25519 byte array
func IsValidator ¶
IsValidator checks whether a public key belongs to authorized entities and returns true or false
func KeyStringToSortedHashedHex ¶
KeyStringToSortedHashedHex returns keys encoded to sorted hashed hex
func ParseCCName ¶
func ParseCCName(stub shim.ChaincodeStubInterface) (string, error)
ParseCCName returns chaincode name from proposal
func ToLowerFirstLetter ¶
ToLowerFirstLetter returns string with first letter in lower case
func ValidateMinSignatures ¶
ValidateMinSignatures checks that the number of required signatures is greater than the minimum allowed value. It returns an error if the number of required signatures is less than or equal to the minimum allowed value.
Types ¶
This section is empty.