Documentation ¶
Index ¶
- Variables
- type AccountStatus
- type UserAccount
- func (*UserAccount) Descriptor() ([]byte, []int)
- func (m *UserAccount) GetAddress() []byte
- func (a *UserAccount) GetAddress2() ethbase.Address
- func (m *UserAccount) GetBalance() []byte
- func (a *UserAccount) GetBalance2() *ethbase.SafeUint256
- func (m *UserAccount) GetNameTag() string
- func (m *UserAccount) GetNonce() uint64
- func (m *UserAccount) GetStatus() AccountStatus
- func (m *UserAccount) Marshal() (dAtA []byte, err error)
- func (a *UserAccount) MarshalJSON() ([]byte, error)
- func (m *UserAccount) MarshalTo(dAtA []byte) (int, error)
- func (m *UserAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*UserAccount) ProtoMessage()
- func (m *UserAccount) Reset()
- func (a *UserAccount) SetAddress(addr ethbase.Address)
- func (a *UserAccount) SetBalance(b *ethbase.SafeUint256)
- func (m *UserAccount) Size() (n int)
- func (m *UserAccount) String() string
- func (a *UserAccount) ToString() string
- func (m *UserAccount) Unmarshal(dAtA []byte) error
- func (a *UserAccount) UnmarshalJSON(input []byte) error
- func (m *UserAccount) XXX_DiscardUnknown()
- func (m *UserAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UserAccount) XXX_Merge(src proto.Message)
- func (m *UserAccount) XXX_Size() int
- func (m *UserAccount) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AccountStatus ¶
type AccountStatus int32
AccountStatus account status
const ( // normal, can be invoked AccountStatus_NORMAL AccountStatus = 0 // frozen, cannot be invoked temporarily AccountStatus_FROZEN AccountStatus = 1 // revoked, cannot be invoked permanently AccountStatus_REVOKED AccountStatus = 2 )
func (AccountStatus) EnumDescriptor ¶
func (AccountStatus) EnumDescriptor() ([]byte, []int)
func (AccountStatus) String ¶
func (x AccountStatus) String() string
type UserAccount ¶
type UserAccount struct { // address Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // member type NameTag string `protobuf:"bytes,2,opt,name=name_tag,json=nameTag,proto3" json:"name_tag,omitempty"` // token balance Balance []byte `protobuf:"bytes,3,opt,name=balance,proto3" json:"balance,omitempty"` //nonce (tx count) Nonce uint64 `protobuf:"varint,4,opt,name=nonce,proto3" json:"nonce,omitempty"` //status Status AccountStatus `protobuf:"varint,5,opt,name=status,proto3,enum=eth.AccountStatus" json:"status,omitempty"` }
user account
func NewUserAccount ¶
func NewUserAccount(addr ethbase.Address, name string, balance *ethbase.SafeUint256, nonce uint64) *UserAccount
NewUserAccount 新建一个UserAccount对象 @param addr @param name @param balance @param nonce @return *UserAccount
func NewUserAccount2 ¶
func NewUserAccount2(addr, name, balance string, nonce uint64) (*UserAccount, error)
NewUserAccount2 新建一个UserAccount对象 @param addr @param name @param balance @param nonce @return *UserAccount @return error
func (*UserAccount) Descriptor ¶
func (*UserAccount) Descriptor() ([]byte, []int)
func (*UserAccount) GetAddress ¶
func (m *UserAccount) GetAddress() []byte
func (*UserAccount) GetAddress2 ¶
func (a *UserAccount) GetAddress2() ethbase.Address
GetAddress2 获得地址类型的Address属性 @return ethbase.Address
func (*UserAccount) GetBalance ¶
func (m *UserAccount) GetBalance() []byte
func (*UserAccount) GetBalance2 ¶
func (a *UserAccount) GetBalance2() *ethbase.SafeUint256
GetBalance2 获取账户余额 @return *ethbase.SafeUint256
func (*UserAccount) GetNameTag ¶
func (m *UserAccount) GetNameTag() string
func (*UserAccount) GetNonce ¶
func (m *UserAccount) GetNonce() uint64
func (*UserAccount) GetStatus ¶
func (m *UserAccount) GetStatus() AccountStatus
func (*UserAccount) Marshal ¶
func (m *UserAccount) Marshal() (dAtA []byte, err error)
func (*UserAccount) MarshalJSON ¶
func (a *UserAccount) MarshalJSON() ([]byte, error)
MarshalJSON 序列化为JSON @return []byte @return error
func (*UserAccount) MarshalTo ¶
func (m *UserAccount) MarshalTo(dAtA []byte) (int, error)
func (*UserAccount) MarshalToSizedBuffer ¶
func (m *UserAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*UserAccount) ProtoMessage ¶
func (*UserAccount) ProtoMessage()
func (*UserAccount) Reset ¶
func (m *UserAccount) Reset()
func (*UserAccount) SetAddress ¶
func (a *UserAccount) SetAddress(addr ethbase.Address)
SetAddress 设置Address属性 @param addr
func (*UserAccount) SetBalance ¶
func (a *UserAccount) SetBalance(b *ethbase.SafeUint256)
SetBalance 设置Balance属性 @param b
func (*UserAccount) Size ¶
func (m *UserAccount) Size() (n int)
func (*UserAccount) String ¶
func (m *UserAccount) String() string
func (*UserAccount) ToString ¶
func (a *UserAccount) ToString() string
ToString 转换为可读的JSON String @return string
func (*UserAccount) Unmarshal ¶
func (m *UserAccount) Unmarshal(dAtA []byte) error
func (*UserAccount) UnmarshalJSON ¶
func (a *UserAccount) UnmarshalJSON(input []byte) error
UnmarshalJSON Json反序列化逻辑 @param input @return error
func (*UserAccount) XXX_DiscardUnknown ¶
func (m *UserAccount) XXX_DiscardUnknown()
func (*UserAccount) XXX_Marshal ¶
func (m *UserAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UserAccount) XXX_Merge ¶
func (m *UserAccount) XXX_Merge(src proto.Message)
func (*UserAccount) XXX_Size ¶
func (m *UserAccount) XXX_Size() int
func (*UserAccount) XXX_Unmarshal ¶
func (m *UserAccount) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.