Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeatMessage ¶
type BeatMessage struct {
ID meter.Bytes32 `json:"hash"`
ParentID meter.Bytes32 `json:"parentHash"`
UncleHash meter.Bytes32 `json:"sha3Uncles"`
Signer meter.Address `json:"miner"`
Beneficiary meter.Address `json:"beneficiary"`
StateRoot meter.Bytes32 `json:"stateRoot"`
TxsRoot meter.Bytes32 `json:"transactionsRoot"`
ReceiptsRoot meter.Bytes32 `json:"receiptsRoot"`
Bloom string `json:"logsBloom"`
K uint32 `json:"k"`
Difficaulty string `json:"difficulty"`
Number string `json:"number"`
Timestamp uint64 `json:"timestamp"`
GasLimit uint64 `json:"gasLimit"`
GasUsed uint64 `json:"gasUsed"`
Extra string `json:"extraData"`
Nonce uint64 `json:"nonce"`
Epoch uint64 `json:"epoch"`
Size uint32 `json:"size"`
}
type BlockMessage ¶
type BlockMessage struct {
Number uint32 `json:"number"`
ID meter.Bytes32 `json:"id"`
Size uint32 `json:"size"`
ParentID meter.Bytes32 `json:"parentID"`
Timestamp uint64 `json:"timestamp"`
GasLimit uint64 `json:"gasLimit"`
Beneficiary meter.Address `json:"beneficiary"`
GasUsed uint64 `json:"gasUsed"`
TotalScore uint64 `json:"totalScore"`
TxsRoot meter.Bytes32 `json:"txsRoot"`
StateRoot meter.Bytes32 `json:"stateRoot"`
ReceiptsRoot meter.Bytes32 `json:"receiptsRoot"`
Signer meter.Address `json:"signer"`
Transactions []meter.Bytes32 `json:"transactions"`
Obsolete bool `json:"obsolete"`
}
BlockMessage block piped by websocket
type EventFilter ¶
type EventFilter struct {
Address *meter.Address // restricts matches to events created by specific contracts
Topic0 *meter.Bytes32
Topic1 *meter.Bytes32
Topic2 *meter.Bytes32
Topic3 *meter.Bytes32
Topic4 *meter.Bytes32
}
EventFilter contains options for contract event filtering.
type EventMessage ¶
type EventMessage struct {
Address meter.Address `json:"address"`
Topics []meter.Bytes32 `json:"topics"`
LogIndex uint32 `json:"logIndex"`
Data string `json:"data"`
Meta LogMeta `json:"meta"`
Obsolete bool `json:"obsolete"`
}
EventMessage event piped by websocket
type Subscriptions ¶
type Subscriptions struct {
// contains filtered or unexported fields
}
func New ¶
func New(chain *chain.Chain, allowedOrigins []string, backtraceLimit uint32) *Subscriptions
func (*Subscriptions) Close ¶
func (s *Subscriptions) Close()
type TransferFilter ¶
type TransferFilter struct {
TxOrigin *meter.Address // who send transaction
Sender *meter.Address // who transferred tokens
Recipient *meter.Address // who received tokens
}
TransferFilter contains options for contract transfer filtering.
type TransferMessage ¶
type TransferMessage struct {
Sender meter.Address `json:"sender"`
Recipient meter.Address `json:"recipient"`
LogIndex uint32 `json:"logIndex"`
Amount *math.HexOrDecimal256 `json:"amount"`
Token byte `json:"token"`
Meta LogMeta `json:"meta"`
Obsolete bool `json:"obsolete"`
}
TransferMessage transfer piped by websocket
Click to show internal directories.
Click to hide internal directories.