func (mSig *Multisignature) AddSignatureFromPubKey(sig []byte, pubkey crypto.PubKey, keys []crypto.PubKey) error {
	index := getIndex(pubkey, keys)
	if index == -1 {
		keysStr := make([]string, len(keys))
		for i, k := range keys {
			keysStr[i] = fmt.Sprintf("%X", k.Bytes())
		}

		return fmt.Errorf("provided key %X doesn't exist in pubkeys: \n%s", pubkey.Bytes(), strings.Join(keysStr, "\n"))
	}

	mSig.AddSignature(sig, index)
	return nil
}
// AddSignatureFromPubKey adds a signature to the multisig, at the index in
// keys corresponding to the provided pubkey.
AddSignatureFromPubKey adds a signature to the multisig, at the index in
keys corresponding to the provided pubkey.
// AddSignatureFromPubKey adds a signature to the multisig at the index in // keys corresponding to the provided pubkey .
func (mSig *Multisignature) AddSignatureFromPubKey(sig []byte, pubkey crypto.PubKey, keys []crypto.PubKey) error {
	index := getIndex(pubkey, keys)
	if index == -1 {
		keysStr := make([]string, len(keys))
		for i, k := range keys {
			keysStr[i] = fmt.Sprintf("%X", k.Bytes())
		}
		return fmt.Errorf("provided key %X doesn't exist in pubkeys: \n%s", pubkey.Bytes(), strings.Join(keysStr, "\n"))
	}
	mSig.AddSignature(sig, index)
	return nil
}
func ( mSig * Multisignature ) AddSignatureFromPubKey ( sig [ ] byte , pubkey crypto . PubKey , keys [ ] crypto . PubKey ) error { index := getIndex ( pubkey , keys ) if index == - 1 { keysStr := make ( [ ] string , len ( keys ) ) for i , k := range keys { keysStr [ i ] = fmt . Sprintf ( " " , k . Bytes ( ) ) } return fmt . Errorf ( " \n " , pubkey . Bytes ( ) , strings . Join ( keysStr , " \n " ) ) } mSig . AddSignature ( sig , index ) return nil }
AddSignatureFromPubKey adds a signature to the multisig, at the index in
keys corresponding to the provided pubkey.
AddSignatureFromPubKey adds a signature to the multisig at the index in keys corresponding to the provided pubkey .