messager

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0, MIT Imports: 10 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressStateToString

func AddressStateToString(state AddressState) string

func MessageStateToString

func MessageStateToString(state MessageState) string

Types

type ActorCfg added in v1.11.0

type ActorCfg struct {
	ID           types.UUID     `json:"id"`
	ActorVersion actors.Version `json:"version"`
	// max for current, use nonce and +1
	MethodType
	FeeSpec

	CreatedAt time.Time `json:"createAt"` // 创建时间
	UpdatedAt time.Time `json:"updateAt"` // 更新时间
}

type Address

type Address struct {
	ID   types.UUID      `json:"id"`
	Addr address.Address `json:"addr"`
	// max for current, use nonce and +1
	Nonce     uint64       `json:"nonce"`
	Weight    int64        `json:"weight"`
	State     AddressState `json:"state"`
	SelMsgNum uint64       `json:"selMsgNum"`
	// number of address selection messages
	FeeSpec

	IsDeleted int       `json:"isDeleted"` // 是否删除 1:是  -1:否
	CreatedAt time.Time `json:"createAt"`  // 创建时间
	UpdatedAt time.Time `json:"updateAt"`  // 更新时间
}

type AddressSpec added in v1.8.0

type AddressSpec struct {
	Address           address.Address `json:"address"`
	GasOverEstimation float64         `json:"gasOverEstimation"`
	GasOverPremium    float64         `json:"gasOverPremium"`
	MaxFeeStr         string          `json:"maxFeeStr"`
	GasFeeCapStr      string          `json:"gasFeeCapStr"`
	BaseFeeStr        string          `json:"baseFeeStr"`
}

type AddressState

type AddressState int
const (
	AddressStateAlive AddressState
	AddressStateRemoving
	AddressStateRemoved
	AddressStateForbbiden // forbbiden received message
)

func (AddressState) String

func (as AddressState) String() string

type ChangeGasSpecParams added in v1.11.0

type ChangeGasSpecParams struct {
	GasOverEstimation *float64 `json:"gasOverEstimation"`
	MaxFee            big.Int  `json:"maxFee,omitempty"`
	GasFeeCap         big.Int  `json:"gasFeeCap"`
	GasOverPremium    *float64 `json:"gasOverPremium"`
	BaseFee           big.Int  `json:"baseFee"`
}

type FeeSpec added in v1.11.0

type FeeSpec struct {
	GasOverEstimation float64 `json:"gasOverEstimation"`
	MaxFee            big.Int `json:"maxFee,omitempty"`
	GasFeeCap         big.Int `json:"gasFeeCap"`
	GasOverPremium    float64 `json:"gasOverPremium"`
	BaseFee           big.Int `json:"baseFee"`
}

type Message

type Message struct {
	ID string

	UnsignedCid *cid.Cid
	SignedCid   *cid.Cid
	shared.Message
	Signature *crypto.Signature

	Height     int64
	Confidence int64
	Receipt    *shared.MessageReceipt
	TipSetKey  shared.TipSetKey
	Meta       *SendSpec
	WalletName string

	State MessageState

	// Error is set if the message failed to fill
	ErrorMsg string

	CreatedAt time.Time
	UpdatedAt time.Time
}

func FromUnsignedMessage

func FromUnsignedMessage(unsignedMsg shared.Message) *Message

func (*Message) MarshalJSON

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

todo ignore use message MarshalJSON method

type MessageState

type MessageState int
const (
	UnKnown MessageState = iota
	UnFillMsg
	FillMsg
	OnChainMsg
	FailedMsg
	NonceConflictMsg
)

func (MessageState) String

func (mst MessageState) String() string

type MessageWithUID

type MessageWithUID struct {
	UnsignedMessage shared.Message
	ID              string
}

type MethodType added in v1.11.0

type MethodType struct {
	Code   cid.Cid       `json:"code"`
	Method abi.MethodNum `json:"method"`
}

type MsgQueryParams added in v1.10.0

type MsgQueryParams struct {
	// Message State
	State []MessageState
	// Message From
	From []address.Address

	// the time stamp that query msgs updated before
	ByUpdateAt *time.Time

	// order by Asc or Desc, Default is Desc
	Asc bool

	Limit  uint
	Offset uint
}

type Node

type Node struct {
	ID types.UUID

	Name      string
	URL       string
	Token     string
	Type      NodeType
	CreatedAt time.Time
	UpdatedAt time.Time
}

type NodeType

type NodeType int
const (
	FullNode NodeType
	LightNode
)

type QuickSendParams

type QuickSendParams struct {
	To      address.Address
	From    address.Address
	Val     abi.TokenAmount
	Account string

	GasPremium *abi.TokenAmount
	GasFeeCap  *abi.TokenAmount
	GasLimit   *int64

	Method     abi.MethodNum
	Params     string
	ParamsType QuickSendParamsCodec // json or hex
}

type QuickSendParamsCodec

type QuickSendParamsCodec string
const (
	QuickSendParamsCodecJSON QuickSendParamsCodec = "json"
	QuickSendParamsCodecHex  QuickSendParamsCodec = "hex"
)

type ReplacMessageParams added in v1.6.1

type ReplacMessageParams struct {
	ID             string
	Auto           bool
	MaxFee         abi.TokenAmount
	GasLimit       int64
	GasPremium     abi.TokenAmount
	GasFeecap      abi.TokenAmount
	GasOverPremium float64
}

type SendSpec

type SendSpec struct {
	ExpireEpoch       abi.ChainEpoch `json:"expireEpoch"`
	GasOverEstimation float64        `json:"gasOverEstimation"`
	MaxFee            big.Int        `json:"maxFee,omitempty"`
	GasOverPremium    float64        `json:"gasOverPremium"`
}

type SharedSpec

type SharedSpec struct {
	ID        uint   `json:"id"`
	SelMsgNum uint64 `json:"selMsgNum"`

	FeeSpec
}

func (*SharedSpec) GetSendSpec

func (ss *SharedSpec) GetSendSpec() *SendSpec

Jump to

Keyboard shortcuts

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