validation

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: Apache-2.0, MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactories

func NewFactories() *factories

Types

type Applier

type Applier struct {
}

Applier applies messages to state trees and storage.

func NewApplier

func NewApplier() *Applier

func (*Applier) ApplyMessage

func (a *Applier) ApplyMessage(eCtx *vchain.ExecutionContext, state vstate.Wrapper, message interface{}) (vchain.MessageReceipt, error)

type MessageFactory

type MessageFactory struct {
	// contains filtered or unexported fields
}

func NewMessageFactory

func NewMessageFactory(signer Signer) *MessageFactory

func (*MessageFactory) FromActorCodeCid

func (mf *MessageFactory) FromActorCodeCid(code vactors.ActorCodeID) cid.Cid

func (*MessageFactory) FromSingletonAddress

func (mf *MessageFactory) FromSingletonAddress(addr vactors.SingletonActorID) vaddress.Address

func (*MessageFactory) MakeMessage

func (mf *MessageFactory) MakeMessage(from, to vaddress.Address, method vchain.MethodID, nonce uint64, value, gasPrice vtypes.BigInt, gasLimit vtypes.GasUnit, params []byte) (interface{}, error)

type Signer

type Signer interface {
	Sign(ctx context.Context, addr vaddress.Address, msg []byte) (*types.Signature, error)
}

type StateWrapper

type StateWrapper struct {
	// contains filtered or unexported fields
}

func NewState

func NewState() *StateWrapper

func (*StateWrapper) Actor

func (s *StateWrapper) Actor(addr vaddress.Address) (vstate.Actor, error)

func (*StateWrapper) Cid

func (s *StateWrapper) Cid() cid.Cid

func (*StateWrapper) NewAccountAddress

func (s *StateWrapper) NewAccountAddress() (vaddress.Address, error)

func (*StateWrapper) SetActor

func (*StateWrapper) SetSingletonActor

func (s *StateWrapper) SetSingletonActor(addr vactors.SingletonActorID, balance vtypes.BigInt) (vstate.Actor, vstate.Storage, error)

func (*StateWrapper) Sign

func (s *StateWrapper) Sign(ctx context.Context, addr vaddress.Address, data []byte) (*vtypes.Signature, error)

func (*StateWrapper) Signer

func (s *StateWrapper) Signer() *keyStore

func (*StateWrapper) Storage

func (s *StateWrapper) Storage(addr vaddress.Address) (vstate.Storage, error)

Jump to

Keyboard shortcuts

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