Documentation ¶
Index ¶
- type Account
- type Service
- func (s *Service) Account() *protobuf.Account
- func (s *Service) AccountEBalancePerAssetReachLimit() bool
- func (s *Service) AccountExternalAddressExist() bool
- func (s *Service) Address() string
- func (s *Service) AssetSymbol() string
- func (s *Service) ExtAddress() string
- func (s *Service) GetAccountByAddress(address string) (*protobuf.Account, error)
- func (s *Service) GetPublicAddress(keyBytes []byte) (string, error)
- func (s *Service) IsHerdiusZeroAddress() bool
- func (s *Service) ReceiverAddress() string
- func (s *Service) SetAccount(account *protobuf.Account)
- func (s *Service) SetAddress(address string)
- func (s *Service) SetAssetSymbol(assetSymbol string)
- func (s *Service) SetExtAddress(extAddress string)
- func (s *Service) SetReceiverAddress(receiverAddress string)
- func (s *Service) SetTxLockedAmount(txLockedAmount uint64)
- func (s *Service) SetTxRedeemAmount(txRedeemAmount uint64)
- func (s *Service) SetTxType(txType string)
- func (s *Service) SetTxValue(txValue uint64)
- func (s *Service) TxLockedAmount() uint64
- func (s *Service) TxRedeemAmount() uint64
- func (s *Service) TxType() string
- func (s *Service) TxValue() uint64
- func (s *Service) VerifyAccountBalance() bool
- func (s *Service) VerifyAccountNonce(a *protobuf.Account, txNonce uint64) bool
- func (s *Service) VerifyLockedAmount() bool
- func (s *Service) VerifyRedeemAmount() bool
- type ServiceI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Nonce uint64 `json:"nonce"` Address string `json:"address"` Balance []byte `json:"balance"` StorageRoot []byte `json:"storageRoot"` }
Account : Account Detail
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service ...
func NewAccountService ¶
func NewAccountService() *Service
func (*Service) AccountEBalancePerAssetReachLimit ¶
AccountEBalancePerAssetReachLimit reports whether an account reaches limit for number of address per asset.
func (*Service) AccountExternalAddressExist ¶
AccountExternalAddressExist reports whether an external address existed in EBalances
func (*Service) AssetSymbol ¶
AssetSymbol returns service asset symbol
func (*Service) ExtAddress ¶
ExtAddress returns service ExtAddress
func (*Service) GetAccountByAddress ¶
func (*Service) GetPublicAddress ¶
func (*Service) IsHerdiusZeroAddress ¶
IsHerdiusZeroAddress checks if receiver address is of herdius zero address when lock tx type is transmitted to herdius blockchain
func (*Service) ReceiverAddress ¶
ReceiverAddress returns receiver's her account address
func (*Service) SetAccount ¶
SetAccount sets Service account
func (*Service) SetAddress ¶
SetAddress sets Service asset symbol
func (*Service) SetAssetSymbol ¶
SetAssetSymbol sets Service asset symbol
func (*Service) SetExtAddress ¶
SetExtAddress sets Service ExtAddress
func (*Service) SetReceiverAddress ¶
SetReceiverAddress sets receiver's her account address
func (*Service) SetTxLockedAmount ¶
SetTxLockedAmount sets transaction transfer locked amount
func (*Service) SetTxRedeemAmount ¶
SetTxRedeemAmount sets transaction transfer redeem amount
func (*Service) SetTxValue ¶
SetTxValue sets transaction transfer value
func (*Service) TxLockedAmount ¶
TxLockedAmount returns transaction transfer locked amount
func (*Service) TxRedeemAmount ¶
TxRedeemAmount returns transaction transfer redeem amount
func (*Service) VerifyAccountBalance ¶
VerifyAccountBalance verifies if account has enough HER tokens or external asset balances
func (*Service) VerifyAccountNonce ¶
VerifyAccountNonce verifies initiated transaction has Nonce value greater than Nonce value in account
func (*Service) VerifyLockedAmount ¶
VerifyLockedAmount checks account have enough external balance for lock.
func (*Service) VerifyRedeemAmount ¶
VerifyRedeemAmount checks account have proper locked amount for redeeming