Documentation ¶
Index ¶
- Variables
- func CheckMsgEnum(me MsgEnum) error
- func ContainMsgType(multiME MsgEnum, mt types.MsgType) bool
- func FindCode(enum MsgEnum) []int
- func MsgEnumCode(me MsgEnum) int
- type AddressScope
- type DrawRandomParams
- type Group
- type GroupAuth
- type KeyBind
- type KeyStrategy
- type MethodName
- type MethodTemplate
- type MsgEnum
- type MsgTypeTemplate
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCodeOverflow = errors.New("code over flow")
View Source
var MaxMsgEnumCode = len(MsgEnumPool) - 1
View Source
var MsgEnumPool = []struct { Code int Name string }{ {Code: MsgEnumCode(MEUnknown), Name: "unknown"}, {Code: MsgEnumCode(MEChainMsg), Name: "chainMsg"}, {Code: MsgEnumCode(MEBlock), Name: "block"}, {Code: MsgEnumCode(MEDealProposal), Name: "dealProposal"}, {Code: MsgEnumCode(MEDrawRandomParam), Name: "drawRandomParam"}, {Code: MsgEnumCode(MESignedVoucher), Name: "signedVoucher"}, {Code: MsgEnumCode(MEStorageAsk), Name: "storageAsk"}, {Code: MsgEnumCode(MEAskResponse), Name: "askResponse"}, {Code: MsgEnumCode(MENetWorkResponse), Name: "netWorkResponse"}, {Code: MsgEnumCode(MEProviderDealState), Name: "providerDealState"}, {Code: MsgEnumCode(MEClientDeal), Name: "clientDeal"}, }
Functions ¶
func CheckMsgEnum ¶
func MsgEnumCode ¶
Types ¶
type AddressScope ¶
type AddressScope struct { Root bool // is root auth, true : can get all addresses in the wallet Addresses []address.Address // when root==false, should fill a scope of wallet addresses }
type DrawRandomParams ¶
type DrawRandomParams struct { Rbase []byte Pers crypto.DomainSeparationTag Round abi.ChainEpoch Entropy []byte }
func (*DrawRandomParams) MarshalCBOR ¶
func (dr *DrawRandomParams) MarshalCBOR(w io.Writer) error
func (*DrawRandomParams) SignBytes ¶
func (dr *DrawRandomParams) SignBytes() ([]byte, error)
return store.DrawRandomness(dr.Rbase, dr.Pers, dr.Round, dr.Entropy)
func (*DrawRandomParams) UnmarshalCBOR ¶
func (dr *DrawRandomParams) UnmarshalCBOR(r io.Reader) error
type Group ¶
type Group struct { GroupID uint Name string // NOTE: not fill data when query groups KeyBinds []*KeyBind }
Group multi KeyBind
type KeyBind ¶
type KeyBind struct { BindID uint Name string Address string // source from MsgTypeTemplate or temporary create MetaTypes MsgEnum // source from MethodTemplate Methods []MethodName }
KeyBind bind wallet usage strategy allow designated rule to pass
func (*KeyBind) ContainMethod ¶
type KeyStrategy ¶
type KeyStrategy struct { Address address.Address // wallet address MetaTypes MsgEnum // sum MsgEnum Methods []MethodName // msg method array }
KeyStrategy a uint of wallet strategy
type MethodName ¶
type MethodName = string
type MethodTemplate ¶
type MethodTemplate struct { MTId uint Name string // method name join with ',' Methods []MethodName }
MethodTemplate to quickly create a private key usage strategy msg actor and methodNum agg to method name NOTE: routeType 4
type MsgTypeTemplate ¶
MsgTypeTemplate to quickly create a private key usage strategy
Click to show internal directories.
Click to hide internal directories.