func SimpleProofsFromMap(m map[string]Hasher) (rootHash []byte, proofs map[string]*SimpleProof, keys []string) {
	sm := newSimpleMap()
	for k, v := range m {
		sm.Set(k, v)
	}
	sm.Sort()
	kvs := sm.kvs
	kvsH := make([]Hasher, 0, len(kvs))
	for _, kvp := range kvs {
		kvsH = append(kvsH, KVPair(kvp))
	}

	rootHash, proofList := SimpleProofsFromHashers(kvsH)
	proofs = make(map[string]*SimpleProof)
	keys = make([]string, len(proofList))
	for i, kvp := range kvs {
		proofs[string(kvp.Key)] = proofList[i]
		keys[i] = string(kvp.Key)
	}
	return
}
func SimpleProofsFromMap(m map[string]Hasher) (rootHash []byte, proofs map[string]*SimpleProof, keys []string) {
	sm := newSimpleMap()
	for k, v := range m {
		sm.Set(k, v)
	}
	sm.Sort()
	kvs := sm.kvs
	kvsH := make([]Hasher, 0, len(kvs))
	for _, kvp := range kvs {
		kvsH = append(kvsH, KVPair(kvp))
	}

	rootHash, proofList := SimpleProofsFromHashers(kvsH)
	proofs = make(map[string]*SimpleProof)
	keys = make([]string, len(proofList))
	for i, kvp := range kvs {
		proofs[string(kvp.Key)] = proofList[i]
		keys[i] = string(kvp.Key)
	}
	return
}
func SimpleProofsFromMap ( m map [ string ] Hasher ) ( rootHash [ ] byte , proofs map [ string ] * SimpleProof , keys [ ] string ) { sm := newSimpleMap ( ) for k , v := range m { sm . Set ( k , v ) } sm . Sort ( ) kvs := sm . kvs kvsH := make ( [ ] Hasher , 0 , len ( kvs ) ) for _ , kvp := range kvs { kvsH = append ( kvsH , KVPair ( kvp ) ) } rootHash , proofList := SimpleProofsFromHashers ( kvsH ) proofs = make ( map [ string ] * SimpleProof ) keys = make ( [ ] string , len ( proofList ) ) for i , kvp := range kvs { proofs [ string ( kvp . Key ) ] = proofList [ i ] keys [ i ] = string ( kvp . Key ) } return }
// SimpleProofsFromMap generates proofs from a map. The keys/values of the map will be used as the keys/values
// in the underlying key-value pairs.
// The keys are sorted before the proofs are computed.
SimpleProofsFromMap generates proofs from a map . The keys / values of the map will be used as the keys / values in the underlying key - value pairs . The keys are sorted before the proofs are computed .