Documentation ¶
Index ¶
- Constants
- type Currency
- func (c *Currency) Add(a *Currency) *Currency
- func (c Currency) Equals(a *Currency) bool
- func (c Currency) GreaterThan(a *Currency) bool
- func (c Currency) LessThan(a *Currency) bool
- func (c Currency) MarshalJSON() ([]byte, error)
- func (c *Currency) Set(x uint64) *Currency
- func (c *Currency) SetAMO(x float64) *Currency
- func (c *Currency) SetString(x string, base int) (*Currency, error)
- func (c Currency) String() string
- func (c *Currency) Sub(a *Currency) *Currency
- func (c *Currency) UnmarshalJSON(data []byte) error
- type Delegate
- type ParcelValue
- type RequestValue
- type Stake
- type UsageValue
Constants ¶
View Source
const (
OneAMOUint64 = 1000000000000000000 // in decimal
)
View Source
const ParcelAminoName = "amo/ParcelValue"
View Source
const RequestAminoName = "amo/RequestValue"
View Source
const UsageAminoName = "amo/UsageValue"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Currency ¶
Currency uses big endian for compatibility to big.Int
func (Currency) GreaterThan ¶
func (Currency) MarshalJSON ¶
func (*Currency) UnmarshalJSON ¶
type ParcelValue ¶
type ParcelValue struct { Owner crypto.Address `json:"owner"` Custody cmn.HexBytes `json:"custody"` Info cmn.HexBytes `json:"info,omitempty"` }
func (*ParcelValue) Deserialize ¶
func (value *ParcelValue) Deserialize(data []byte) error
func (ParcelValue) Serialize ¶
func (value ParcelValue) Serialize() ([]byte, error)
type RequestValue ¶
func (*RequestValue) Deserialize ¶
func (value *RequestValue) Deserialize(data []byte) error
func (RequestValue) IsExpired ¶
func (value RequestValue) IsExpired() bool
func (RequestValue) Serialize ¶
func (value RequestValue) Serialize() ([]byte, error)
type Stake ¶
type Stake struct { Amount Currency `json:"amount"` Validator ed25519.PubKeyEd25519 `json:"validator"` }
type UsageValue ¶
func (*UsageValue) Deserialize ¶
func (value *UsageValue) Deserialize(data []byte) error
func (UsageValue) IsExpired ¶
func (value UsageValue) IsExpired() bool
func (UsageValue) Serialize ¶
func (value UsageValue) Serialize() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.