Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PaymentChannelActorState ¶
type PaymentChannelActorState interface {
From() address.Address
To() address.Address
ToSend() types.BigInt
ClosingAt() uint64
MinCloseHeight() uint64
}
PaymentChannelActorState is an abstraction over a payment channel actor's state.
type Storage ¶
type Storage interface {
Get(c cid.Cid, out interface{}) error
}
Storage provides a key/value store for actor state.
type Wrapper ¶
type Wrapper interface {
// Returns the CID of the root node of the state tree.
Cid() cid.Cid
// Returns the actor state at `address` (or an error if there is none).
Actor(address address.Address) (Actor, error)
// Returns the actor storage for the actor at `address` (which is empty if there is no such actor).
Storage(address address.Address) (Storage, error)
// Creates a new private key and returns the associated address.
NewAccountAddress() (address.Address, error)
// Sign data with addr's key.
Sign(ctx context.Context, addr address.Address, data []byte) (*types.Signature, error)
// Installs a new actor in the state tree.
// This signature will probably become a little more complex when the actor state is non-empty.
SetActor(address address.Address, code actors.ActorCodeID, balance types.BigInt) (Actor, Storage, error)
// Installs a new singleton actor in the state tree.
SetSingletonActor(address actors.SingletonActorID, balance types.BigInt) (Actor, Storage, error)
}
Wrapper abstracts the inspection and mutation of an implementation-specific state tree and storage. The interface wraps a single, mutable state.
Click to show internal directories.
Click to hide internal directories.