eos_go_trace_api_plugin_wrapper

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 12 Imported by: 0

README

eos-go-trace-api-plugin-wrapper

Wrapper for trace api plugin for EOS blockchain for Go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeTransfer

func DecodeTransfer(hexString string) (*token.Transfer, error)

Types

type Action

type Action struct {
	Account        eos.AccountName   `json:"account"`
	Name           eos.ActionName    `json:"action"`
	Receiver       eos.AccountName   `json:"receiver"`
	GlobalSequence eos.Uint64        `json:"global_sequence,omitempty"`
	Authorization  []PermissionLevel `json:"authorization,omitempty"`
	eos.ActionData
}

type Block

type Block struct {
	BlockHeader
	Transactions []SignedTransaction `json:"transactions"`
}

type BlockHeader

type BlockHeader struct {
	Timestamp        eos.BlockTimestamp `json:"timestamp"`
	Producer         eos.AccountName    `json:"producer"`
	Status           string             `json:"status"`
	Previous         eos.Checksum256    `json:"previous_id"`
	TransactionMRoot eos.Checksum256    `json:"transaction_mroot"`
	ActionMRoot      eos.Checksum256    `json:"action_mroot"`
	ScheduleVersion  uint32             `json:"schedule_version"`
}

type BlockResp

type BlockResp struct {
	Block
	ID       eos.Checksum256 `json:"id"`
	BlockNum uint32          `json:"number"`
}

type PermissionLevel

type PermissionLevel struct {
	Actor      eos.AccountName    `json:"account"`
	Permission eos.PermissionName `json:"permission"`
}

type SignedTransaction

type SignedTransaction struct {
	SignedTransactionHeader
	*Transaction

	Signatures []ecc.Signature `json:"signatures"`
}

type SignedTransactionHeader

type SignedTransactionHeader struct {
	Status               eos.TransactionStatus `json:"status"`
	CPUUsageMicroSeconds uint32                `json:"cpu_usage_us"`
	NetUsageWords        eos.Varuint32         `json:"net_usage_words"`
}

type TraceAPI

type TraceAPI struct {
	HttpClient *http.Client
	BaseURL    string
	// Header is one or more headers to be added to all outgoing calls
	Header http.Header
}

func New

func New(baseURL string) *TraceAPI

func (*TraceAPI) GetBlockByID

func (api *TraceAPI) GetBlockByID(num uint32) (out *BlockResp, err error)

type Transaction

type Transaction struct {
	eos.TransactionHeader

	ID      eos.Checksum256 `json:"id"`
	Actions []*Action       `json:"actions"`
}

Jump to

Keyboard shortcuts

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