Documentation ¶
Index ¶
- Constants
- func SetDurationPerBlock(d time.Duration)
- type Address
- type AddressBuf
- func (*AddressBuf) Descriptor() ([]byte, []int)
- func (m *AddressBuf) GetValue() []byte
- func (*AddressBuf) ProtoMessage()
- func (m *AddressBuf) Reset()
- func (m *AddressBuf) String() string
- func (a *AddressBuf) Unmarshal() Address
- func (m *AddressBuf) XXX_DiscardUnknown()
- func (m *AddressBuf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AddressBuf) XXX_Merge(src proto.Message)
- func (m *AddressBuf) XXX_Size() int
- func (m *AddressBuf) XXX_Unmarshal(b []byte) error
- type BigIntegerBuf
- func (*BigIntegerBuf) Descriptor() ([]byte, []int)
- func (m *BigIntegerBuf) GetValue() []byte
- func (*BigIntegerBuf) ProtoMessage()
- func (m *BigIntegerBuf) Reset()
- func (m *BigIntegerBuf) String() string
- func (buf *BigIntegerBuf) Unmarshal() *big.Int
- func (m *BigIntegerBuf) XXX_DiscardUnknown()
- func (m *BigIntegerBuf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BigIntegerBuf) XXX_Merge(src proto.Message)
- func (m *BigIntegerBuf) XXX_Size() int
- func (m *BigIntegerBuf) XXX_Unmarshal(b []byte) error
- type BlockId
- type BlockIdBuf
- func (*BlockIdBuf) Descriptor() ([]byte, []int)
- func (m *BlockIdBuf) GetHeaderHash() *HashBuf
- func (m *BlockIdBuf) GetHeight() *TimeBlocksBuf
- func (*BlockIdBuf) ProtoMessage()
- func (m *BlockIdBuf) Reset()
- func (m *BlockIdBuf) String() string
- func (idb *BlockIdBuf) Unmarshal() *BlockId
- func (m *BlockIdBuf) XXX_DiscardUnknown()
- func (m *BlockIdBuf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockIdBuf) XXX_Merge(src proto.Message)
- func (m *BlockIdBuf) XXX_Size() int
- func (m *BlockIdBuf) XXX_Unmarshal(b []byte) error
- type Hash
- type HashBuf
- func (*HashBuf) Descriptor() ([]byte, []int)
- func (m *HashBuf) GetValue() []byte
- func (*HashBuf) ProtoMessage()
- func (m *HashBuf) Reset()
- func (m *HashBuf) String() string
- func (hb *HashBuf) Unmarshal() Hash
- func (m *HashBuf) XXX_DiscardUnknown()
- func (m *HashBuf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HashBuf) XXX_Merge(src proto.Message)
- func (m *HashBuf) XXX_Size() int
- func (m *HashBuf) XXX_Unmarshal(b []byte) error
- type TimeBlocks
- type TimeBlocksBuf
- func (*TimeBlocksBuf) Descriptor() ([]byte, []int)
- func (m *TimeBlocksBuf) GetVal() *BigIntegerBuf
- func (*TimeBlocksBuf) ProtoMessage()
- func (m *TimeBlocksBuf) Reset()
- func (m *TimeBlocksBuf) String() string
- func (tb *TimeBlocksBuf) Unmarshal() *TimeBlocks
- func (m *TimeBlocksBuf) XXX_DiscardUnknown()
- func (m *TimeBlocksBuf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TimeBlocksBuf) XXX_Merge(src proto.Message)
- func (m *TimeBlocksBuf) XXX_Size() int
- func (m *TimeBlocksBuf) XXX_Unmarshal(b []byte) error
- type TimeTicks
- func (rt TimeTicks) Add(rt2 TimeTicks) TimeTicks
- func (rt TimeTicks) Clone() TimeTicks
- func (rt TimeTicks) Cmp(rt2 TimeTicks) int
- func (rt TimeTicks) Duration() time.Duration
- func (rt TimeTicks) Equals(rt2 TimeTicks) bool
- func (rt TimeTicks) MarshalToBuf() *TimeTicksBuf
- func (rt TimeTicks) String() string
- type TimeTicksBuf
- func (*TimeTicksBuf) Descriptor() ([]byte, []int)
- func (m *TimeTicksBuf) GetVal() *BigIntegerBuf
- func (*TimeTicksBuf) ProtoMessage()
- func (m *TimeTicksBuf) Reset()
- func (m *TimeTicksBuf) String() string
- func (rtb *TimeTicksBuf) Unmarshal() TimeTicks
- func (m *TimeTicksBuf) XXX_DiscardUnknown()
- func (m *TimeTicksBuf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TimeTicksBuf) XXX_Merge(src proto.Message)
- func (m *TimeTicksBuf) XXX_Size() int
- func (m *TimeTicksBuf) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const TicksPerBlock = int64(1000)
Variables ¶
This section is empty.
Functions ¶
func SetDurationPerBlock ¶
Types ¶
type Address ¶
type Address [20]byte
func HexToAddress ¶
func NewAddressFromEth ¶
func (Address) MarshallToBuf ¶
func (a Address) MarshallToBuf() *AddressBuf
func (Address) ShortString ¶
func (Address) ToEthAddress ¶
type AddressBuf ¶
type AddressBuf struct { Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AddressBuf) Descriptor ¶
func (*AddressBuf) Descriptor() ([]byte, []int)
func (*AddressBuf) GetValue ¶
func (m *AddressBuf) GetValue() []byte
func (*AddressBuf) ProtoMessage ¶
func (*AddressBuf) ProtoMessage()
func (*AddressBuf) Reset ¶
func (m *AddressBuf) Reset()
func (*AddressBuf) String ¶
func (m *AddressBuf) String() string
func (*AddressBuf) Unmarshal ¶
func (a *AddressBuf) Unmarshal() Address
func (*AddressBuf) XXX_DiscardUnknown ¶
func (m *AddressBuf) XXX_DiscardUnknown()
func (*AddressBuf) XXX_Marshal ¶
func (m *AddressBuf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AddressBuf) XXX_Merge ¶
func (m *AddressBuf) XXX_Merge(src proto.Message)
func (*AddressBuf) XXX_Size ¶
func (m *AddressBuf) XXX_Size() int
func (*AddressBuf) XXX_Unmarshal ¶
func (m *AddressBuf) XXX_Unmarshal(b []byte) error
type BigIntegerBuf ¶
type BigIntegerBuf struct { Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func MarshalBigInt ¶
func MarshalBigInt(bi *big.Int) *BigIntegerBuf
func (*BigIntegerBuf) Descriptor ¶
func (*BigIntegerBuf) Descriptor() ([]byte, []int)
func (*BigIntegerBuf) GetValue ¶
func (m *BigIntegerBuf) GetValue() []byte
func (*BigIntegerBuf) ProtoMessage ¶
func (*BigIntegerBuf) ProtoMessage()
func (*BigIntegerBuf) Reset ¶
func (m *BigIntegerBuf) Reset()
func (*BigIntegerBuf) String ¶
func (m *BigIntegerBuf) String() string
func (*BigIntegerBuf) Unmarshal ¶
func (buf *BigIntegerBuf) Unmarshal() *big.Int
func (*BigIntegerBuf) XXX_DiscardUnknown ¶
func (m *BigIntegerBuf) XXX_DiscardUnknown()
func (*BigIntegerBuf) XXX_Marshal ¶
func (m *BigIntegerBuf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BigIntegerBuf) XXX_Merge ¶
func (m *BigIntegerBuf) XXX_Merge(src proto.Message)
func (*BigIntegerBuf) XXX_Size ¶
func (m *BigIntegerBuf) XXX_Size() int
func (*BigIntegerBuf) XXX_Unmarshal ¶
func (m *BigIntegerBuf) XXX_Unmarshal(b []byte) error
type BlockId ¶
type BlockId struct { Height *TimeBlocks HeaderHash Hash }
func (*BlockId) MarshalToBuf ¶
func (id *BlockId) MarshalToBuf() *BlockIdBuf
type BlockIdBuf ¶
type BlockIdBuf struct { Height *TimeBlocksBuf `protobuf:"bytes,1,opt,name=height,proto3" json:"height,omitempty"` HeaderHash *HashBuf `protobuf:"bytes,2,opt,name=headerHash,proto3" json:"headerHash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BlockIdBuf) Descriptor ¶
func (*BlockIdBuf) Descriptor() ([]byte, []int)
func (*BlockIdBuf) GetHeaderHash ¶
func (m *BlockIdBuf) GetHeaderHash() *HashBuf
func (*BlockIdBuf) GetHeight ¶
func (m *BlockIdBuf) GetHeight() *TimeBlocksBuf
func (*BlockIdBuf) ProtoMessage ¶
func (*BlockIdBuf) ProtoMessage()
func (*BlockIdBuf) Reset ¶
func (m *BlockIdBuf) Reset()
func (*BlockIdBuf) String ¶
func (m *BlockIdBuf) String() string
func (*BlockIdBuf) Unmarshal ¶
func (idb *BlockIdBuf) Unmarshal() *BlockId
func (*BlockIdBuf) XXX_DiscardUnknown ¶
func (m *BlockIdBuf) XXX_DiscardUnknown()
func (*BlockIdBuf) XXX_Marshal ¶
func (m *BlockIdBuf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockIdBuf) XXX_Merge ¶
func (m *BlockIdBuf) XXX_Merge(src proto.Message)
func (*BlockIdBuf) XXX_Size ¶
func (m *BlockIdBuf) XXX_Size() int
func (*BlockIdBuf) XXX_Unmarshal ¶
func (m *BlockIdBuf) XXX_Unmarshal(b []byte) error
type Hash ¶
type Hash [32]byte
func NewHashFromEth ¶
func (Hash) MarshalToBuf ¶
func (Hash) ShortString ¶
type HashBuf ¶
type HashBuf struct { Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func MarshalSliceOfHashes ¶
func (*HashBuf) Descriptor ¶
func (*HashBuf) ProtoMessage ¶
func (*HashBuf) ProtoMessage()
func (*HashBuf) XXX_DiscardUnknown ¶
func (m *HashBuf) XXX_DiscardUnknown()
func (*HashBuf) XXX_Marshal ¶
func (*HashBuf) XXX_Unmarshal ¶
type TimeBlocks ¶
func BlocksFromSeconds ¶
func BlocksFromSeconds(seconds int64) *TimeBlocks
func NewTimeBlocks ¶
func NewTimeBlocks(val *big.Int) *TimeBlocks
func NewTimeBlocksInt ¶
func NewTimeBlocksInt(val int64) *TimeBlocks
func (*TimeBlocks) AsInt ¶
func (tb *TimeBlocks) AsInt() *big.Int
func (*TimeBlocks) Clone ¶
func (tb *TimeBlocks) Clone() *TimeBlocks
func (*TimeBlocks) Cmp ¶
func (tb *TimeBlocks) Cmp(tb2 *TimeBlocks) int
func (*TimeBlocks) Duration ¶
func (tb *TimeBlocks) Duration() time.Duration
func (*TimeBlocks) Marshal ¶
func (tb *TimeBlocks) Marshal() *TimeBlocksBuf
func (*TimeBlocks) String ¶
func (tb *TimeBlocks) String() string
type TimeBlocksBuf ¶
type TimeBlocksBuf struct { Val *BigIntegerBuf `protobuf:"bytes,1,opt,name=val,proto3" json:"val,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TimeBlocksBuf) Descriptor ¶
func (*TimeBlocksBuf) Descriptor() ([]byte, []int)
func (*TimeBlocksBuf) GetVal ¶
func (m *TimeBlocksBuf) GetVal() *BigIntegerBuf
func (*TimeBlocksBuf) ProtoMessage ¶
func (*TimeBlocksBuf) ProtoMessage()
func (*TimeBlocksBuf) Reset ¶
func (m *TimeBlocksBuf) Reset()
func (*TimeBlocksBuf) String ¶
func (m *TimeBlocksBuf) String() string
func (*TimeBlocksBuf) Unmarshal ¶
func (tb *TimeBlocksBuf) Unmarshal() *TimeBlocks
func (*TimeBlocksBuf) XXX_DiscardUnknown ¶
func (m *TimeBlocksBuf) XXX_DiscardUnknown()
func (*TimeBlocksBuf) XXX_Marshal ¶
func (m *TimeBlocksBuf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TimeBlocksBuf) XXX_Merge ¶
func (m *TimeBlocksBuf) XXX_Merge(src proto.Message)
func (*TimeBlocksBuf) XXX_Size ¶
func (m *TimeBlocksBuf) XXX_Size() int
func (*TimeBlocksBuf) XXX_Unmarshal ¶
func (m *TimeBlocksBuf) XXX_Unmarshal(b []byte) error
type TimeTicks ¶
func TicksFromBlockNum ¶
func TicksFromBlockNum(blockNum *TimeBlocks) TimeTicks
func TicksFromSeconds ¶
func (TimeTicks) MarshalToBuf ¶
func (rt TimeTicks) MarshalToBuf() *TimeTicksBuf
type TimeTicksBuf ¶
type TimeTicksBuf struct { Val *BigIntegerBuf `protobuf:"bytes,1,opt,name=val,proto3" json:"val,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TimeTicksBuf) Descriptor ¶
func (*TimeTicksBuf) Descriptor() ([]byte, []int)
func (*TimeTicksBuf) GetVal ¶
func (m *TimeTicksBuf) GetVal() *BigIntegerBuf
func (*TimeTicksBuf) ProtoMessage ¶
func (*TimeTicksBuf) ProtoMessage()
func (*TimeTicksBuf) Reset ¶
func (m *TimeTicksBuf) Reset()
func (*TimeTicksBuf) String ¶
func (m *TimeTicksBuf) String() string
func (*TimeTicksBuf) Unmarshal ¶
func (rtb *TimeTicksBuf) Unmarshal() TimeTicks
func (*TimeTicksBuf) XXX_DiscardUnknown ¶
func (m *TimeTicksBuf) XXX_DiscardUnknown()
func (*TimeTicksBuf) XXX_Marshal ¶
func (m *TimeTicksBuf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TimeTicksBuf) XXX_Merge ¶
func (m *TimeTicksBuf) XXX_Merge(src proto.Message)
func (*TimeTicksBuf) XXX_Size ¶
func (m *TimeTicksBuf) XXX_Size() int
func (*TimeTicksBuf) XXX_Unmarshal ¶
func (m *TimeTicksBuf) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.