model

package
v0.0.0-...-bb1a4e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoPeriod            string = "none"
	LatestBlockNumber   string = "latest"
	EarliestBlockNumber string = "earliest"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionCache

type ConnectionCache struct {
	ProtocolVersion string
	NetVersion      string
}

type EthError

type EthError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

EthError - ethereum error

func (EthError) Error

func (err EthError) Error() string

type EthRequest

type EthRequest struct {
	ID      int    `json:"id"`
	JSONRPC string `json:"jsonrpc"`
	Method  string `json:"method"`
	Params  string `json:"params"`
}

func (*EthRequest) SetBlockPeriod

func (request *EthRequest) SetBlockPeriod(period string)

type EthRequestParams

type EthRequestParams struct {

	// DATA, 20 UnsafeBytes - (optional) The address the transaction is sent from.
	From string `json:"from,omitempty"`
	// DATA, 20 UnsafeBytes - The address the transaction is directed to.
	To string `json:"to,omitempty"`
	// QUANTITY - (optional) Integer of the gas provided for the transaction execution.
	// eth_call consumes zero gas, but this parameter may be needed by some executions.
	Gas string `json:"gas,omitempty"`
	// QUANTITY - (optional) Integer of the gasPrice used for each paid gas
	GasPrice string `json:"gasPrice,omitempty"`
	// QUANTITY - (optional) Integer of the value sent with this transaction
	Value string `json:"value,omitempty"`
	// DATA - (optional) Hash of the method signature and encoded parameters.
	Data string `json:"data,omitempty"`
	// DATA target block name or hexadecimal value
	Tag string
}

Object - The transaction call object

func (EthRequestParams) String

func (params EthRequestParams) String() string

type EthResponse

type EthResponse struct {
	ID      int             `json:"id"`
	JSONRPC string          `json:"jsonrpc"`
	Result  json.RawMessage `json:"result"`
	//Data string    `json:"result"`
	Error *EthError `json:"error"`
}

func (EthResponse) Errored

func (response EthResponse) Errored() error

type FilterChanges

type FilterChanges struct {
	Hash       string   `json:"hash"`
	From       string   `json:"from"`
	To         string   `json:"to"`
	Expiry     string   `json:"expiry"`
	Sent       string   `json:"sent"`
	TTL        string   `json:"ttl"`
	Topics     []string `json:"topics"`
	Payload    string   `json:"payload"`
	WorkProved string   `json:"workProved"`
}

type RpcOptions

type RpcOptions struct {
	DefaultAccount                string `json:"default_account"`
	DefaultBlock                  string `json:"default_block"`
	DefaultGas                    int    `json:"default_gas"`
	DefaultGasPrice               int    `json:"default_gas_price"`
	TransactionBlockTimeout       int    `json:"transaction_block_timeout"`
	TransactionConfirmationBlocks int    `json:"transaction_confirmation_blocks"`
	TransactionPollingTimeout     int    `json:"transaction_polling_timeout"`
}

type WhisperParams

type WhisperParams struct {
}

Parameters

Object - The whisper post object:

from: DATA, 60 Bytes - (optional) The identity of the sender.
to: DATA, 60 Bytes - (optional) The identity of the receiver. When present whisper will encrypt the message so that only the receiver can decrypt it.
topics: Array of DATA - Array of DATA topics, for the receiver to identify messages.
payload: DATA - The payload of the message.
priority: QUANTITY - The integer of the priority in a range from ... (?).
ttl: QUANTITY - integer of the time to live in seconds.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL