func (db *CXDBMemory) GetBalance(pubkey *koblitz.PublicKey, coin *coinparam.Params) (amount uint64, err error) {
	var pkpair pubkeyCoinPair
	copy(pkpair.pubkey[:], pubkey.SerializeCompressed())
	pkpair.coin = coin
	db.balancesMtx.Lock()
	var found bool
	if amount, found = db.balances[&pkpair]; !found {
		db.balancesMtx.Unlock()
		err = fmt.Errorf("Could not find balance, register please")
		return
	}
	db.balancesMtx.Unlock()
	return
}
GetBalance gets the balance for a pubkey and an asset.
package cxdbmemory
import (
	"fmt"
	"github.com/mit-dci/lit/coinparam"
	"github.com/mit-dci/lit/crypto/koblitz"
)
func (db *CXDBMemory) RegisterUser(pubkey *koblitz.PublicKey, addressMap map[*coinparam.Params]string) (err error) {
	db.balancesMtx.Lock()
	for coin := range addressMap {
		var pkpair pubkeyCoinPair
		copy(pkpair.pubkey[:], pubkey.SerializeCompressed())
		pkpair.coin = coin
		db.balances[&pkpair] = 0
	}
	db.balancesMtx.Unlock()
	return
}