func AssetFromString(name string) (a Asset, err error) {
	var cpm *coinparam.Params
	if cpm, err = chainutils.GetParamFromName(name); err != nil {
		return
	}
	if a, err = AssetFromCoinParam(cpm); err != nil {
		return
	}
	return
}
AssetFromString returns an asset from a string
package match
import (
	"fmt"
	"github.com/mit-dci/lit/coinparam"
	"github.com/mit-dci/opencx/chainutils"
)
const (
	BTC Asset = 0x00
	VTC Asset = 0x01
	BTCTest Asset = 0x03
	VTCTest Asset = 0x04
	LTCTest Asset = 0x05
	BTCReg Asset = 0x06
	VTCReg Asset = 0x07
	LTCReg Asset = 0x08
)
func largeAssetList() []Asset {
	return []Asset{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a}
}
func AssetFromCoinParam(cpm *coinparam.Params) (a Asset, err error) {
	assetMap := map[*coinparam.Params]Asset{
		&coinparam.BitcoinParams:  BTC,
		&coinparam.VertcoinParams: VTC,
		&coinparam.TestNet3Params:         BTCTest,
		&coinparam.VertcoinTestNetParams:  VTCTest,
		&coinparam.LiteCoinTestNet4Params: LTCTest,
		&coinparam.RegressionNetParams:    BTCReg,
		&coinparam.VertcoinRegTestParams:  VTCReg,
		&coinparam.LiteRegNetParams:       LTCReg,
	}
	var found bool
	if a, found = assetMap[cpm]; !found {
		err = fmt.Errorf("Could not get an asset for that coin param")
		return
	}
	return
}
func (a Asset) CoinParamFromAsset() (coinType *coinparam.Params, err error) {
	assetMap := map[Asset]*coinparam.Params{
		BTC: &coinparam.BitcoinParams,
		VTC: &coinparam.VertcoinParams,
		BTCTest: &coinparam.TestNet3Params,
		VTCTest: &coinparam.VertcoinTestNetParams,
		LTCTest: &coinparam.LiteCoinTestNet4Params,
		BTCReg:  &coinparam.RegressionNetParams,
		LTCReg:  &coinparam.LiteRegNetParams,
		VTCReg:  &coinparam.VertcoinRegTestParams,
	}
	var found bool
	if coinType, found = assetMap[a]; !found {
		err = fmt.Errorf("Could not get a coin param for that asset")
		return
	}
	return
}