Documentation ¶
Index ¶
- Constants
- Variables
- func IsBottomUp(from SubnetID, to SubnetID) bool
- type EpochKey
- type IPCAddress
- type Status
- type SubnetID
- func (id SubnetID) Actor() address.Address
- func (id SubnetID) Bytes() ([]byte, error)
- func (id SubnetID) ChainID() uint64
- func (id SubnetID) CommonParent(other SubnetID) (SubnetID, int)
- func (id SubnetID) Down(curr SubnetID) SubnetID
- func (id SubnetID) Equal(other SubnetID) bool
- func (id SubnetID) IsRoot() bool
- func (id SubnetID) Key() string
- func (t *SubnetID) MarshalCBOR(w io.Writer) error
- func (id SubnetID) Parent() SubnetID
- func (id SubnetID) String() string
- func (t *SubnetID) UnmarshalCBOR(r io.Reader) (err error)
- func (id SubnetID) Up(curr SubnetID) SubnetID
Constants ¶
View Source
const ( RootPrefix = "r" SubnetSeparator = "/" UndefStr = "" IPCAddrSeparator = ":" // MaxChainID is the maximum chain ID value // possible. MaxChainID = 4503599627370476 )
Variables ¶
View Source
var UndefIPCAddress = IPCAddress{}
UndefIPCAddress creates a convenient type to define undefined IPC address
View Source
var UndefSubnetID = SubnetID{
Root: 0,
Children: []address.Address{},
}
UndefSubnetID is the undef ID
Functions ¶
func IsBottomUp ¶ added in v0.1.2
IsBottomUp returns true if the from subnet is above in the hierarchy.
Types ¶
type EpochKey ¶ added in v0.1.4
type EpochKey abi.ChainEpoch
type IPCAddress ¶
type IPCAddress struct { SubnetID SubnetID RawAddress address.Address }
IPCAddress adds subnet information to raw Filecoin addresses
func AddressFromString ¶
func AddressFromString(addr string) (IPCAddress, error)
func (*IPCAddress) MarshalCBOR ¶
func (t *IPCAddress) MarshalCBOR(w io.Writer) error
func (*IPCAddress) UnmarshalCBOR ¶
func (t *IPCAddress) UnmarshalCBOR(r io.Reader) (err error)
type SubnetID ¶
type SubnetID struct { // ChainID of the root network Root uint64 // Children up to the current subnet. Children []address.Address }
func NewSubnetID ¶
func NewSubnetIDFromRoute ¶ added in v0.1.6
func NewSubnetIDFromString ¶
func (SubnetID) Actor ¶
func (id SubnetID) Actor() address.Address
Actor returns the subnet actor ID that governs the current subnet or the ID=0 if the current subnet is the root.
func (SubnetID) CommonParent ¶
CommonParent computes the common parent of two subnet IDs and returns the number of children in it.
func (SubnetID) Down ¶
Down Returns from the current subnet the next subnet down in the path defined by the current subnet and the destination subnet.
Click to show internal directories.
Click to hide internal directories.