Documentation ¶
Index ¶
- Variables
- type Block
- func (*Block) Descriptor() ([]byte, []int)deprecated
- func (x *Block) GetDifficulty() uint64
- func (x *Block) GetGasLimit() uint64
- func (x *Block) GetGasUsed() uint64
- func (x *Block) GetHash() string
- func (x *Block) GetNonce() uint64
- func (x *Block) GetNumber() uint64
- func (x *Block) GetTs() *timestamppb.Timestamp
- func (*Block) ProtoMessage()
- func (x *Block) ProtoReflect() protoreflect.Message
- func (x *Block) Reset()
- func (x *Block) String() string
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)deprecated
- func (x *Transaction) GetAccountNonce() uint64
- func (x *Transaction) GetAmount() uint64
- func (x *Transaction) GetFrom() []byte
- func (x *Transaction) GetGasLimit() uint64
- func (x *Transaction) GetHash() string
- func (x *Transaction) GetPayload() []byte
- func (x *Transaction) GetPrice() uint64
- func (x *Transaction) GetR() uint64
- func (x *Transaction) GetRecipient() []byte
- func (x *Transaction) GetS() uint64
- func (x *Transaction) GetSize() float64
- func (x *Transaction) GetTs() *timestamppb.Timestamp
- func (x *Transaction) GetV() uint64
- func (*Transaction) ProtoMessage()
- func (x *Transaction) ProtoReflect() protoreflect.Message
- func (x *Transaction) Reset()
- func (x *Transaction) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_chain_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Ts *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=ts,proto3" json:"ts,omitempty"` //uint64 Hash string `protobuf:"bytes,2,opt,name=Hash,proto3" json:"Hash,omitempty"` Difficulty uint64 `protobuf:"varint,3,opt,name=Difficulty,proto3" json:"Difficulty,omitempty"` //bigint Number uint64 `protobuf:"varint,4,opt,name=Number,proto3" json:"Number,omitempty"` //bigint GasLimit uint64 `protobuf:"varint,5,opt,name=GasLimit,proto3" json:"GasLimit,omitempty"` // uint64 GasUsed uint64 `protobuf:"varint,6,opt,name=GasUsed,proto3" json:"GasUsed,omitempty"` // uint64 Nonce uint64 `protobuf:"varint,7,opt,name=Nonce,proto3" json:"Nonce,omitempty"` //[8]byte .Uint64() // contains filtered or unexported fields }
func ParseHeader ¶
func (*Block) Descriptor
deprecated
func (*Block) GetDifficulty ¶
func (*Block) GetGasLimit ¶
func (*Block) GetGasUsed ¶
func (*Block) GetTs ¶
func (x *Block) GetTs() *timestamppb.Timestamp
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) ProtoReflect ¶
func (x *Block) ProtoReflect() protoreflect.Message
type Transaction ¶
type Transaction struct { Ts *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=ts,proto3" json:"ts,omitempty"` //uint64 From []byte `protobuf:"bytes,2,opt,name=From,proto3" json:"From,omitempty"` Hash string `protobuf:"bytes,3,opt,name=Hash,proto3" json:"Hash,omitempty"` Size float64 `protobuf:"fixed64,4,opt,name=Size,proto3" json:"Size,omitempty"` AccountNonce uint64 `protobuf:"varint,5,opt,name=AccountNonce,proto3" json:"AccountNonce,omitempty"` // uint64 Price uint64 `protobuf:"varint,6,opt,name=Price,proto3" json:"Price,omitempty"` // big.int GasLimit uint64 `protobuf:"varint,7,opt,name=GasLimit,proto3" json:"GasLimit,omitempty"` // uint64 Recipient []byte `protobuf:"bytes,8,opt,name=Recipient,proto3" json:"Recipient,omitempty"` Amount uint64 `protobuf:"varint,9,opt,name=Amount,proto3" json:"Amount,omitempty"` // big.int Payload []byte `protobuf:"bytes,10,opt,name=Payload,proto3" json:"Payload,omitempty"` V uint64 `protobuf:"varint,11,opt,name=V,proto3" json:"V,omitempty"` // big.int R uint64 `protobuf:"varint,12,opt,name=R,proto3" json:"R,omitempty"` // big.int S uint64 `protobuf:"varint,13,opt,name=S,proto3" json:"S,omitempty"` // big.int // contains filtered or unexported fields }
to convert addresses from bytes to hex address, https://github.com/ethereum/go-ethereum/blob/4b2ff1457ac28fb2894485194e0e344e84c2bcd7/common/types.go#L210
func ParseTransaction ¶
func ParseTransaction(tx *types.Transaction, timestamp *timestamppb.Timestamp) *Transaction
func (*Transaction) Descriptor
deprecated
func (*Transaction) Descriptor() ([]byte, []int)
Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) GetAccountNonce ¶
func (x *Transaction) GetAccountNonce() uint64
func (*Transaction) GetAmount ¶
func (x *Transaction) GetAmount() uint64
func (*Transaction) GetFrom ¶
func (x *Transaction) GetFrom() []byte
func (*Transaction) GetGasLimit ¶
func (x *Transaction) GetGasLimit() uint64
func (*Transaction) GetHash ¶
func (x *Transaction) GetHash() string
func (*Transaction) GetPayload ¶
func (x *Transaction) GetPayload() []byte
func (*Transaction) GetPrice ¶
func (x *Transaction) GetPrice() uint64
func (*Transaction) GetR ¶
func (x *Transaction) GetR() uint64
func (*Transaction) GetRecipient ¶
func (x *Transaction) GetRecipient() []byte
func (*Transaction) GetS ¶
func (x *Transaction) GetS() uint64
func (*Transaction) GetSize ¶
func (x *Transaction) GetSize() float64
func (*Transaction) GetTs ¶
func (x *Transaction) GetTs() *timestamppb.Timestamp
func (*Transaction) GetV ¶
func (x *Transaction) GetV() uint64
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) ProtoReflect ¶
func (x *Transaction) ProtoReflect() protoreflect.Message
func (*Transaction) Reset ¶
func (x *Transaction) Reset()
func (*Transaction) String ¶
func (x *Transaction) String() string
Click to show internal directories.
Click to hide internal directories.