types

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: MIT Imports: 12 Imported by: 0

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       KeyType
	PrivateKey []byte
}

KeyInfo is used for storing keys in KeyStore

type KeyType

type KeyType string

KeyType defines a type of a key

const (
	KTBLS             KeyType = "bls"
	KTSecp256k1       KeyType = "secp256k1"
	KTSecp256k1Ledger KeyType = "secp256k1-ledger"
)

func (*KeyType) UnmarshalJSON

func (kt *KeyType) UnmarshalJSON(bb []byte) error

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) Caller

func (m *Message) Caller() address.Address

func (*Message) ChainLength

func (m *Message) ChainLength() int

func (*Message) Cid

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

func (*Message) MarshalCBOR

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

func (*Message) MarshalJSON

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

func (*Message) Receiver

func (m *Message) Receiver() address.Address

func (*Message) Serialize

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

func (*Message) ToStorageBlock

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

func (*Message) VMMessage

func (m *Message) VMMessage() *Message

func (*Message) ValueReceived

func (m *Message) ValueReceived() abi.TokenAmount

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 RawMessage

type RawMessage Message

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