func (account *Account) GetNativeBalance() string {
	return account.NativeBalance.Amount
}
GetNativeBalance returns the balance of the native currency (typically lumens)
in the account.
package microstellar
import (
	"encoding/base64"
	"github.com/stellar/go/clients/horizon"
)
type Address string
type Seed string
type KeyPair struct {
	Seed    string  
	Address string  
}
type Balance struct {
	Asset  *Asset `json:"asset"`
	Amount string `json:"amount"`
	Limit  string `json:"limit"`
}
type Signer struct {
	PublicKey string `json:"public_key"`
	Weight    int32  `json:"weight"`
	Key       string `json:"key"`
	Type      string `json:"type"`
}
type Thresholds struct {
	High   byte `json:"high"`
	Medium byte `json:"medium"`
	Low    byte `json:"low"`
}
type Flags struct {
	AuthRequired  bool `json:"auth_required"`
	AuthRevocable bool `json:"auth_revocable"`
	AuthImmutable bool `json:"auth_immutable"`
}
type Account struct {
	Address       string            `json:"address"`
	Balances      []Balance         `json:"balances"`
	Signers       []Signer          `json:"signers"`
	Flags         Flags             `json:"flags"`
	NativeBalance Balance           `json:"native_balance"`
	HomeDomain    string            `json:"home_domain"`
	Thresholds    Thresholds        `json:"thresholds"`
	Data          map[string]string `json:"data"`
	Sequence      string            `json:"seq"`
}
func newAccount() *Account {
	account := &Account{}
	account.NativeBalance = Balance{NativeAsset, "0", ""}
	account.Signers = []Signer{
		Signer{},
	}
	account.Balances = []Balance{}
	return account
}
func newAccountFromHorizon(ha horizon.Account) *Account {
	account := newAccount()
	account.Address = ha.HistoryAccount.AccountID
	account.HomeDomain = ha.HomeDomain
	account.Sequence = ha.Sequence
	for _, b := range ha.Balances {
		if b.Asset.Type == string(NativeType) {
			account.NativeBalance = Balance{NativeAsset, b.Balance, ""}
			continue
		}
		balance := Balance{
			Asset:  NewAsset(b.Asset.Code, b.Asset.Issuer, AssetType(b.Asset.Type)),
			Amount: b.Balance,
			Limit:  b.Limit,
		}
		account.Balances = append(account.Balances, balance)
	}
	account.Signers = []Signer{}
	for _, s := range ha.Signers {
		signer := Signer{
			PublicKey: s.PublicKey,
			Weight:    s.Weight,
			Key:       s.Key,
			Type:      s.Type,
		}
		account.Signers = append(account.Signers, signer)
	}
	account.Thresholds.High = ha.Thresholds.HighThreshold
	account.Thresholds.Medium = ha.Thresholds.MedThreshold
	account.Thresholds.Low = ha.Thresholds.LowThreshold
	account.Flags.AuthRequired = ha.Flags.AuthRequired
	account.Flags.AuthRevocable = ha.Flags.AuthRevocable
	account.Data = map[string]string{}
	for k, v := range ha.Data {
		account.Data[k] = v
	}
	return account
}
func (account *Account) GetBalance(asset *Asset) string {
	if asset.IsNative() {
		return account.GetNativeBalance()
	}
	for _, b := range account.Balances {
		if asset.Equals(*b.Asset) {
			return b.Amount
		}
	}
	return ""
}