Documentation ¶
Index ¶
- Variables
- func NativeToWei(n uint64) *big.Int
- func WeiToNative(x *big.Int) *big.Int
- type Balance
- func (*Balance) Descriptor() ([]byte, []int)
- func (m *Balance) GetAmount() uint64
- func (m *Balance) GetType() Type
- func (m *Balance) Marshal() (dAtA []byte, err error)
- func (m *Balance) MarshalTo(dAtA []byte) (int, error)
- func (m *Balance) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Balance) ProtoMessage()
- func (m *Balance) Reset()
- func (m *Balance) Size() (n int)
- func (b Balance) String() string
- func (m *Balance) Unmarshal(dAtA []byte) error
- func (m *Balance) XXX_DiscardUnknown()
- func (m *Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Balance) XXX_Merge(src proto.Message)
- func (*Balance) XXX_MessageName() string
- func (m *Balance) XXX_Size() int
- func (m *Balance) XXX_Unmarshal(b []byte) error
- type Balances
- func (bs Balances) Add(ty Type, amount uint64) Balances
- func (bs Balances) Get(ty Type) *uint64
- func (bs Balances) GetFallback(ty Type, fallback uint64) uint64
- func (bs Balances) GetNative(fallback uint64) uint64
- func (bs Balances) GetPower(fallback uint64) uint64
- func (bs Balances) Has(ty Type) bool
- func (bs Balances) HasNative() bool
- func (bs Balances) HasPower() bool
- func (bs Balances) Len() int
- func (bs Balances) Less(i, j int) bool
- func (bs Balances) Native(amount uint64) Balances
- func (bs Balances) Power(amount uint64) Balances
- func (bs Balances) Sort() Balances
- func (bs Balances) Sum(bss ...Balances) Balances
- func (bs Balances) Swap(i, j int)
- type Type
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NativeToWei ¶ added in v0.29.0
Types ¶
type Balance ¶
type Balance struct { Type Type `protobuf:"varint,1,opt,name=Type,proto3,casttype=Type" json:"Type,omitempty"` Amount uint64 `protobuf:"varint,2,opt,name=Amount,proto3" json:"Amount,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Balance) Descriptor ¶
func (*Balance) MarshalToSizedBuffer ¶ added in v0.30.0
func (*Balance) ProtoMessage ¶
func (*Balance) ProtoMessage()
func (*Balance) XXX_DiscardUnknown ¶ added in v0.23.0
func (m *Balance) XXX_DiscardUnknown()
func (*Balance) XXX_Marshal ¶ added in v0.23.0
func (*Balance) XXX_MessageName ¶
func (*Balance) XXX_Unmarshal ¶ added in v0.23.0
type Type ¶
type Type uint32
func TypeFromString ¶
func (Type) MarshalText ¶
func (*Type) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.