types

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT Imports: 12 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct {
	Code    cid.Cid         `json:"Code"`
	Head    cid.Cid         `json:"Head"`
	Nonce   uint64          `json:"Nonce"`
	Balance decimal.Decimal `json:"Balance"`
}

type BeaconEntry

type BeaconEntry struct {
	Round uint64
	Data  []byte
}

type BlockHeader

type BlockHeader struct {
	Miner                 string
	Ticket                *Ticket
	Parents               []cid.Cid
	ParentWeight          decimal.Decimal
	Height                int64
	ParentStateRoot       cid.Cid
	ParentMessageReceipts cid.Cid
	Messages              cid.Cid
	BLSAggregate          *crypto.Signature
	Timestamp             uint64
	BlockSig              *crypto.Signature
	ForkSignaling         uint64
	ParentBaseFee         decimal.Decimal
}

type BlockMessages

type BlockMessages struct {
	BlsMessages   []*Message       `json:"BlsMessages"`
	SecpkMessages []*SignedMessage `json:"SecpkMessages"`
	Cids          []cid.Cid        `json:"Cids"`
}

type ExecutionTrace

type ExecutionTrace struct {
	Msg        *Message
	MsgRct     *MessageReceipt
	Error      string
	Duration   time.Duration
	GasCharges []*GasTrace

	Subcalls []ExecutionTrace
}

type GasTrace

type GasTrace struct {
	Name string

	Location          []Loc `json:"loc"`
	TotalGas          int64 `json:"tg"`
	ComputeGas        int64 `json:"cg"`
	StorageGas        int64 `json:"sg"`
	TotalVirtualGas   int64 `json:"vtg"`
	VirtualComputeGas int64 `json:"vcg"`
	VirtualStorageGas int64 `json:"vsg"`

	TimeTaken time.Duration `json:"tt"`
	Extra     interface{}   `json:"ex,omitempty"`
}

type HeadChange

type HeadChange struct {
	Type string
	Val  *TipSet
}

type InvocResult

type InvocResult struct {
	Msg            *Message
	MsgRct         *MessageReceipt
	ExecutionTrace ExecutionTrace
	Error          string
	Duration       time.Duration
}

type IpldObject

type IpldObject struct {
	Cid cid.Cid
	Obj interface{}
}

type KeyInfo

type KeyInfo struct {
	Type       string `json:"Type"` // secp256k1
	PrivateKey []byte `json:"PrivateKey"`
}

type Loc

type Loc struct {
	File     string
	Line     int
	Function string
}

type Message

type Message struct {
	Version    uint64          `json:"Version"`
	To         address.Address `json:"To"`
	From       address.Address `json:"From"`
	Nonce      uint64          `json:"Nonce"`
	Value      decimal.Decimal `json:"Value"`
	GasLimit   int64           `json:"GasLimit"`
	GasFeeCap  decimal.Decimal `json:"GasFeeCap"`
	GasPremium decimal.Decimal `json:"GasPremium"`
	Method     uint64          `json:"Method"`
	Params     []byte          `json:"Params"`
}

func (*Message) Cid added in v0.2.0

func (m *Message) Cid() cid.Cid

func (*Message) MarshalCBOR added in v0.2.0

func (t *Message) MarshalCBOR(w io.Writer) error

func (*Message) Serialize added in v0.2.0

func (m *Message) Serialize() ([]byte, error)

func (*Message) ToStorageBlock added in v0.2.0

func (m *Message) ToStorageBlock() (block.Block, error)

type MessageReceipt

type MessageReceipt struct {
	// Ok = ExitCode(0)
	ExitCode int64 // 状态为0表示成功
	Return   []byte
	GasUsed  int64
}

type MessageSendSpec

type MessageSendSpec struct {
	MaxFee decimal.Decimal `json:"MaxFee"`
}

type MsgLookup

type MsgLookup struct {
	Message   cid.Cid // Can be different than requested, in case it was replaced, but only gas values changed
	Receipt   MessageReceipt
	ReturnDec interface{}
	TipSet    TipSetKey
	Height    int64
}

type ObjStat

type ObjStat struct {
	Size  uint64
	Links uint64
}

type SignedMessage

type SignedMessage struct {
	Message   *Message         `json:"Message"`
	Signature crypto.Signature `json:"Signature"`
}

type Ticket

type Ticket struct {
	VRFProof []byte
}

type TipSet

type TipSet struct {
	Cids   []cid.Cid
	Blocks []*BlockHeader
	Height int64
}

type TipSetKey

type TipSetKey []cid.Cid

type Version

type Version struct {
	Version    string
	APIVersion uint32
	BlockDelay uint64
}

Jump to

Keyboard shortcuts

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