types

package
v0.0.0-...-d492368 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Overview

Package types go-fvm-sdk types

Index

Constants

View Source
const (
	//MaxCidLen The maximum supported CID size. (SPEC_AUDIT)
	MaxCidLen = 100

	//MaxActorAddrLen The maximum actor address length (class 2 addresses).
	MaxActorAddrLen = 21

	//UNIT block unit
	UNIT uint32 = 0

	BLAKE2B256 uint64 = 0xb220
	BLAKE2BLEN uint32 = 32
)
View Source
const (
	FLAGINDEXEDKEY   = 0b00000001
	FLAGINDEXEDVALUE = 0b00000010
	FLAGINDEXEDALL   = FLAGINDEXEDKEY | FLAGINDEXEDVALUE
)
View Source
const (
	/// DagCBOR should be used for all IPLD-CBOR data where CIDs need to be traversable.
	DAGCBOR uint64 = 0x71
	CBOR    uint64 = 0x51
	IPLDRAW uint64 = 0x55
)
View Source
const NoDataBlockID uint32 = 0

NoDataBlockID specify noblock in params and return

View Source
const ReadonlyFlag = 0b00000001

Variables

View Source
var SimulatedEnvkey emptyKeyType

Functions

func ValidateConsensusFaultType

func ValidateConsensusFaultType(c runtime.ConsensusFaultType) bool

Types

type ActorEvent

type ActorEvent struct {
	Entries []*Entry
}

ActorEvent An event as originally emitted by the actor.

type ActorKey

type ActorKey abi.ActorID

ActorKey adapts an actor id as a mapping key.

func (ActorKey) Key

func (k ActorKey) Key() string

Key get actor id string as key

type ActorType

type ActorType int32
const (
	System           ActorType = 1
	Init             ActorType = 2
	Cron             ActorType = 3
	Account          ActorType = 4
	Power            ActorType = 5
	Miner            ActorType = 6
	Market           ActorType = 7
	PaymentChannel   ActorType = 8
	Multisig         ActorType = 9
	Reward           ActorType = 10
	VerifiedRegistry ActorType = 11

	PlaceHolder ActorType = 12
	Evm         ActorType = 13
	Eam         ActorType = 14
	EthAccount  ActorType = 15
)

func (ActorType) IsAccount

func (t ActorType) IsAccount() bool

func (ActorType) IsPrincipal

func (t ActorType) IsPrincipal() bool

func (ActorType) IsSingletonActor

func (t ActorType) IsSingletonActor() bool

type AggregateSealVerifyInfo

type AggregateSealVerifyInfo struct {
	Number                abi.SectorNumber
	Randomness            abi.SealRandomness
	InteractiveRandomness abi.InteractiveSealRandomness

	// Safe because we get those from the miner actor
	SealedCID   cid.Cid `checked:"true"` // CommR
	UnsealedCID cid.Cid `checked:"true"` // CommD
}

func (*AggregateSealVerifyInfo) MarshalCBOR

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

func (*AggregateSealVerifyInfo) UnmarshalCBOR

func (t *AggregateSealVerifyInfo) UnmarshalCBOR(r io.Reader) (err error)

type AggregateSealVerifyProofAndInfos

type AggregateSealVerifyProofAndInfos struct {
	Miner          abi.ActorID
	SealProof      abi.RegisteredSealProof
	AggregateProof abi.RegisteredAggregationProof
	Proof          []byte
	Infos          []AggregateSealVerifyInfo
}

func (*AggregateSealVerifyProofAndInfos) MarshalCBOR

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

func (*AggregateSealVerifyProofAndInfos) UnmarshalCBOR

func (t *AggregateSealVerifyProofAndInfos) UnmarshalCBOR(r io.Reader) (err error)

type BlockID

type BlockID = uint32

type CBORBytes

type CBORBytes []byte

CBORBytes Wraps already-serialized bytes as CBOR-marshalable.

func (CBORBytes) MarshalCBOR

func (b CBORBytes) MarshalCBOR(w io.Writer) error

func (*CBORBytes) UnmarshalCBOR

func (b *CBORBytes) UnmarshalCBOR(r io.Reader) error

type CborInt

type CborInt = cbg.CborInt

type CborString

type CborString string

func (CborString) MarshalCBOR

func (cb CborString) MarshalCBOR(w io.Writer) error

func (*CborString) UnmarshalCBOR

func (cb *CborString) UnmarshalCBOR(r io.Reader) error

type CborUint

type CborUint uint64

func (CborUint) MarshalCBOR

func (cb CborUint) MarshalCBOR(w io.Writer) error

func (*CborUint) UnmarshalCBOR

func (cb *CborUint) UnmarshalCBOR(r io.Reader) error

type Codec

type Codec = uint64

type Entry

type Entry struct {
	/// A bitmap conveying metadata or hints about this entry.
	Flags Flags
	/// The key of this event.
	Key string
	/// The value's codec. Must be IPLDRAW (0x55) for now according to FIP-0049.
	Codec Codec
	/// Any DAG-CBOR encodeable type.
	Value RawBytes
}

Entry A key value entry inside an Event.

func (*Entry) MarshalCBOR

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

func (*Entry) UnmarshalCBOR

func (t *Entry) UnmarshalCBOR(r io.Reader) (err error)

type Flags

type Flags uint64

type InstallParams

type InstallParams struct {
	Code []byte
}

func (*InstallParams) MarshalCBOR

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

func (*InstallParams) UnmarshalCBOR

func (t *InstallParams) UnmarshalCBOR(r io.Reader) (err error)

type InstallReturn

type InstallReturn struct {
	CodeCid   cid.Cid
	Installed bool
}

func (*InstallReturn) MarshalCBOR

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

func (*InstallReturn) UnmarshalCBOR

func (t *InstallReturn) UnmarshalCBOR(r io.Reader) (err error)

type IpldOpen

type IpldOpen struct {
	Codec Codec
	ID    uint32
	Size  uint32
}

type IpldStat

type IpldStat struct {
	Codec Codec
	Size  uint32
}

type MessageContext

type MessageContext struct {
	// The current call's origin actor ID.
	Origin abi.ActorID
	// The nonce from the explicit message.
	Nonce uint64
	// The caller's actor ID.
	Caller abi.ActorID
	// The receiver's actor ID (i.e. ourselves).
	Receiver abi.ActorID
	// The method number from the message.
	MethodNumber abi.MethodNum
	// The value that was received.
	ValueReceived abi.TokenAmount
	// The current gas premium
	GasPremium abi.TokenAmount
	// Flags pertaining to the currently executing actor's invocation context.
	Flags SendFlags
}

type NetworkContext

type NetworkContext struct {
	// The current epoch.
	Epoch abi.ChainEpoch
	// The current time (seconds since the unix epoch).
	Timestamp uint64
	// The current base-fee.
	BaseFee abi.TokenAmount
	// The Chain ID of the network.
	ChainId uint64
	// The network version.
	NetworkVersion uint32
}

type ParamsRaw

type ParamsRaw struct {
	Codec Codec
	Raw   []byte
}

type RawBytes

type RawBytes []byte

type Receipt

type Receipt struct {
	ExitCode   ferrors.ExitCode `json:"exit_code"`
	ReturnData RawBytes         `json:"return_data"`
	GasUsed    int64            `json:"gas_used"`
}

func (*Receipt) MarshalCBOR

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

func (*Receipt) UnmarshalCBOR

func (t *Receipt) UnmarshalCBOR(r io.Reader) (err error)

type ReplicaUpdateInfo

type ReplicaUpdateInfo struct {
	UpdateProofType      abi.RegisteredUpdateProof
	OldSealedSectorCID   cid.Cid
	NewSealedSectorCID   cid.Cid
	NewUnsealedSectorCID cid.Cid
	Proof                []byte
}

func (*ReplicaUpdateInfo) MarshalCBOR

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

func (*ReplicaUpdateInfo) UnmarshalCBOR

func (t *ReplicaUpdateInfo) UnmarshalCBOR(r io.Reader) (err error)

type ResolveAddress

type ResolveAddress struct {
	Resolved int32
	Value    uint64
}

type SendFlags

type SendFlags = uint64

type SendResult

type SendResult struct {
	ExitCode    ferrors.ExitCode
	ReturnID    BlockID
	ReturnCodec uint64
	ReturnSize  uint32
}

type StringKey

type StringKey string

StringKey Adapts an string as a mapping key.

func (StringKey) Key

func (k StringKey) Key() string

Key return string as key

type VerifyConsensusFault

type VerifyConsensusFault struct {
	Epoch  int64
	Target abi.ActorID
	Fault  uint32
}

Jump to

Keyboard shortcuts

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