dto

package
Version: v0.0.0-...-e983f0f Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Number     *big.Int `json:"number"`
	Hash       string   `json:"hash"`
	ParentHash string   `json:"parentHash"`
	Author     string   `json:"author,omitempty"`
	Miner      string   `json:"miner,omitempty"`
	Size       *big.Int `json:"size"`
	GasUsed    *big.Int `json:"gasUsed"`
	Nonce      *big.Int `json:"nonce"`
	Timestamp  *big.Int `json:"timestamp"`
}

func (*Block) UnmarshalJSON

func (b *Block) UnmarshalJSON(data []byte) error

*

* How to un-marshal the block struct using the Big.Int rather than the
* `complexReturn` type.

type Error

type Error struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

type RequestResult

type RequestResult struct {
	ID      int         `json:"id"`
	Version string      `json:"jsonrpc"`
	Result  interface{} `json:"result"`
	Error   *Error      `json:"error,omitempty"`
	Data    string      `json:"data,omitempty"`
}

func (*RequestResult) ToBigInt

func (pointer *RequestResult) ToBigInt() (*big.Int, error)

func (*RequestResult) ToBlock

func (pointer *RequestResult) ToBlock() (*Block, error)

func (*RequestResult) ToBoolean

func (pointer *RequestResult) ToBoolean() (bool, error)

func (*RequestResult) ToComplexIntResponse

func (pointer *RequestResult) ToComplexIntResponse() (types.ComplexIntResponse, error)

func (*RequestResult) ToComplexString

func (pointer *RequestResult) ToComplexString() (types.ComplexString, error)

func (*RequestResult) ToInt

func (pointer *RequestResult) ToInt() (int64, error)

func (*RequestResult) ToSignTransactionResponse

func (pointer *RequestResult) ToSignTransactionResponse() (*SignTransactionResponse, error)

func (*RequestResult) ToString

func (pointer *RequestResult) ToString() (string, error)

func (*RequestResult) ToStringArray

func (pointer *RequestResult) ToStringArray() ([]string, error)

func (*RequestResult) ToSyncingResponse

func (pointer *RequestResult) ToSyncingResponse() (*SyncingResponse, error)

func (*RequestResult) ToTransactionReceipt

func (pointer *RequestResult) ToTransactionReceipt() (*TransactionReceipt, error)

func (*RequestResult) ToTransactionResponse

func (pointer *RequestResult) ToTransactionResponse() (*TransactionResponse, error)

type RequestTransactionParameters

type RequestTransactionParameters struct {
	From     string `json:"from"`
	To       string `json:"to,omitempty"`
	Nonce    string `json:"nonce,omitempty"`
	Gas      string `json:"gas,omitempty"`
	GasPrice string `json:"gasPrice,omitempty"`
	Value    string `json:"value,omitempty"`
	Data     string `json:"data,omitempty"`
}

RequestTransactionParameters JSON

type SHHPostParameters

type SHHPostParameters struct {
	From     string   `json:"from"`
	To       string   `json:"to"`
	Topics   []string `json:"topics"`
	Payload  string   `json:"payload"`
	Priority string   `json:"priority"`
	TTL      string   `json:"ttl"`
}

type SignTransactionResponse

type SignTransactionResponse struct {
	Raw         types.ComplexString     `json:"raw"`
	Transaction SignedTransactionParams `json:"tx"`
}

type SignedTransactionParams

type SignedTransactionParams struct {
	Gas      *big.Int `json:"gas"`
	GasPrice *big.Int `json:"gasPrice"`
	Hash     string   `json:"hash"`
	Input    string   `json:"input"`
	Nonce    *big.Int `json:"nonce"`
	S        string   `json:"s"`
	R        string   `json:"r"`
	V        *big.Int `json:"v"`
	To       string   `json:"to"`
	Value    *big.Int `json:"value"`
}

func (*SignedTransactionParams) UnmarshalJSON

func (sp *SignedTransactionParams) UnmarshalJSON(data []byte) error

type SyncingResponse

type SyncingResponse struct {
	StartingBlock *big.Int `json:"startingBlock"`
	CurrentBlock  *big.Int `json:"currentBlock"`
	HighestBlock  *big.Int `json:"highestBlock"`
}

type TransactionLogs

type TransactionLogs struct {
	Address          string   `json:"address"`
	Topics           []string `json:"topics"`
	Data             string   `json:"data"`
	BlockNumber      *big.Int `json:"blockNumber"`
	TransactionHash  string   `json:"transactionHash"`
	TransactionIndex *big.Int `json:"transactionIndex"`
	BlockHash        string   `json:"blockHash"`
	LogIndex         *big.Int `json:"logIndex"`
	Removed          bool     `json:"removed"`
}

func (*TransactionLogs) UnmarshalJSON

func (r *TransactionLogs) UnmarshalJSON(data []byte) error

type TransactionParameters

type TransactionParameters struct {
	From     string
	To       string
	Nonce    *big.Int
	Gas      *big.Int
	GasPrice *big.Int
	Value    *big.Int
	Data     types.ComplexString
}

TransactionParameters GO transaction to make more easy controll the parameters

func (*TransactionParameters) Transform

Transform the GO transactions parameters to json style

type TransactionReceipt

type TransactionReceipt struct {
	TransactionHash   string            `json:"transactionHash"`
	TransactionIndex  *big.Int          `json:"transactionIndex"`
	BlockHash         string            `json:"blockHash"`
	BlockNumber       *big.Int          `json:"blockNumber"`
	From              string            `json:"from"`
	To                string            `json:"to"`
	CumulativeGasUsed *big.Int          `json:"cumulativeGasUsed"`
	GasUsed           *big.Int          `json:"gasUsed"`
	ContractAddress   string            `json:"contractAddress"`
	Logs              []TransactionLogs `json:"logs"`
	LogsBloom         string            `json:"logsBloom"`
	Root              string            `json:"string"`
	Status            bool              `json:"status"`
}

func (*TransactionReceipt) UnmarshalJSON

func (r *TransactionReceipt) UnmarshalJSON(data []byte) error

type TransactionResponse

type TransactionResponse struct {
	Hash             string              `json:"hash"`
	Nonce            *big.Int            `json:"nonce"`
	BlockHash        string              `json:"blockHash"`
	BlockNumber      *big.Int            `json:"blockNumber"`
	TransactionIndex *big.Int            `json:"transactionIndex"`
	From             string              `json:"from"`
	To               string              `json:"to"`
	Input            string              `json:"input"`
	Value            *big.Int            `json:"value"`
	GasPrice         *big.Int            `json:"gasPrice,omitempty"`
	Gas              *big.Int            `json:"gas,omitempty"`
	Data             types.ComplexString `json:"data,omitempty"`
}

func (*TransactionResponse) UnmarshalJSON

func (t *TransactionResponse) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL