Documentation ¶
Index ¶
- Constants
- type Address
- type BN64
- type BlockNumberOrHash
- type DataVec
- type H256
- type Integer
- type Uint256
- func (ui256 *Uint256) Bytes() []byte
- func (ui256 *Uint256) Cmp(test Uint256) int
- func (ui256 *Uint256) Data32() primitives.Data32
- func (ui256 Uint256) MarshalText() ([]byte, error)
- func (ui256 *Uint256) Text(base int) string
- func (ui256 *Uint256) Uint64() uint64
- func (ui256 *Uint256) UnmarshalJSON(data []byte) error
- type Uint64
- type Uinteger
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct{ primitives.Data20 }
func BytesToAddress ¶
func HexStringToAddress ¶
type BN64 ¶
type BN64 int64
func UintToBN64 ¶
func (*BN64) Int64 ¶
Int64 returns block number as *int64. If BN64 contains following tags; Earliest, Latest, Pending, Finalized, Safe it returns; 0, -1, -2, -3, -4 respectively
func (*BN64) Uint64 ¶
Uint64 returns block number as *uint64.
If BN64 contains following tags; Safe, Finalized, Pending, Latest it returns nil If BN64 contains the Earliest tag, it returns 0
func (*BN64) UnmarshalJSON ¶
type BlockNumberOrHash ¶ added in v1.1.0
type BlockNumberOrHash struct { BlockNumber *BN64 `json:"blockNumber,omitempty"` BlockHash *H256 `json:"blockHash,omitempty"` RequireCanonical bool `json:"requireCanonical,omitempty"` }
func BlockNumberOrHashWithBN64 ¶ added in v1.1.0
func BlockNumberOrHashWithBN64(bn BN64) BlockNumberOrHash
func BlockNumberOrHashWithHash ¶ added in v1.1.0
func BlockNumberOrHashWithHash(hash H256, canonical bool) BlockNumberOrHash
func (*BlockNumberOrHash) Hash ¶ added in v1.1.0
func (bnh *BlockNumberOrHash) Hash() (H256, bool)
func (*BlockNumberOrHash) Number ¶ added in v1.1.0
func (bnh *BlockNumberOrHash) Number() (BN64, bool)
func (*BlockNumberOrHash) String ¶ added in v1.1.0
func (bnh *BlockNumberOrHash) String() string
func (*BlockNumberOrHash) UnmarshalJSON ¶ added in v1.1.0
func (bnh *BlockNumberOrHash) UnmarshalJSON(data []byte) error
type Uint256 ¶
func IntToUint256 ¶
func RandomUint256 ¶
func RandomUint256() Uint256
RandomUint256 returns a random Uint256 with a size of FilterIdByteSize. The 8 MSBs are BigEndian ordered Unix nanoseconds, the rest of the bytes are randomly generated by crypto/rand
func Uint256FromBytes ¶
func Uint256FromHex ¶
func UintToUint256 ¶
func (*Uint256) Data32 ¶
func (ui256 *Uint256) Data32() primitives.Data32
func (Uint256) MarshalText ¶ added in v1.1.0
MarshalText implements encoding.TextMarshaler
func (*Uint256) UnmarshalJSON ¶
type Uint64 ¶
type Uint64 struct {
// contains filtered or unexported fields
}
func IntToUint64 ¶
func UintToUint64 ¶
func (*Uint64) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.