Documentation ¶
Index ¶
- Constants
- func ImportsNodeRuntime() (*wasm.Imports, error)
- func NewRuntimeFromGenesis(cfg *Config) (runtime.Instance, error)
- type Config
- type Instance
- func (in *Instance) ApplyExtrinsic(data types.Extrinsic) ([]byte, error)
- func (in *Instance) BabeConfiguration() (*types.BabeConfiguration, error)
- func (in *Instance) CheckInherents()
- func (in *Instance) CheckRuntimeVersion(code []byte) (runtime.Version, error)
- func (in *Instance) DecodeSessionKeys(enc []byte) ([]byte, error)
- func (in *Instance) Exec(function string, data []byte) ([]byte, error)
- func (in *Instance) ExecuteBlock(block *types.Block) ([]byte, error)
- func (in *Instance) FinalizeBlock() (*types.Header, error)
- func (in *Instance) GenerateSessionKeys()
- func (in *Instance) GetCodeHash() common.Hash
- func (in *Instance) GetContext() *runtime.Context
- func (in *Instance) GrandpaAuthorities() ([]types.Authority, error)
- func (in *Instance) InherentExtrinsics(data []byte) ([]byte, error)
- func (in *Instance) InitializeBlock(header *types.Header) error
- func (in *Instance) Keystore() *keystore.GlobalKeystore
- func (in *Instance) Metadata() ([]byte, error)
- func (in *Instance) NetworkService() runtime.BasicNetwork
- func (in *Instance) NodeStorage() runtime.NodeStorage
- func (in *Instance) OffchainWorker()
- func (in *Instance) PaymentQueryInfo(ext []byte) (*types.TransactionPaymentQueryInfo, error)
- func (in *Instance) RandomSeed()
- func (in *Instance) SetContextStorage(s runtime.Storage)
- func (in *Instance) Stop()
- func (in *Instance) UpdateRuntimeCode(code []byte) error
- func (in *Instance) ValidateTransaction(e types.Extrinsic) (*transaction.Validity, error)
- func (in *Instance) Validator() bool
- func (in *Instance) Version() (runtime.Version, error)
Constants ¶
const Name = "wasmer"
Name represents the name of the interpreter
Variables ¶
This section is empty.
Functions ¶
func ImportsNodeRuntime ¶
ImportsNodeRuntime returns the imports for the v0.8 runtime
Types ¶
type Config ¶
type Config struct { runtime.InstanceConfig Imports func() (*wasm.Imports, error) }
Config represents a wasmer configuration
type Instance ¶
Instance represents a v0.8 runtime go-wasmer instance
func NewInstance ¶
NewInstance instantiates a runtime from raw wasm bytecode
func NewInstanceFromFile ¶
NewInstanceFromFile instantiates a runtime from a .wasm file
func NewInstanceFromTrie ¶
NewInstanceFromTrie returns a new runtime instance with the code provided in the given trie
func (*Instance) ApplyExtrinsic ¶
ApplyExtrinsic calls runtime API function BlockBuilder_apply_extrinsic
func (*Instance) BabeConfiguration ¶
func (in *Instance) BabeConfiguration() (*types.BabeConfiguration, error)
BabeConfiguration gets the configuration data for BABE from the runtime
func (*Instance) CheckInherents ¶
func (in *Instance) CheckInherents()
func (*Instance) CheckRuntimeVersion ¶
CheckRuntimeVersion calculates runtime Version for runtime blob passed in
func (*Instance) DecodeSessionKeys ¶
DecodeSessionKeys decodes the given public session keys. Returns a list of raw public keys including their key type.
func (*Instance) ExecuteBlock ¶
ExecuteBlock calls runtime function Core_execute_block
func (*Instance) FinalizeBlock ¶
FinalizeBlock calls runtime API function BlockBuilder_finalize_block
func (*Instance) GenerateSessionKeys ¶
func (in *Instance) GenerateSessionKeys()
func (*Instance) GetCodeHash ¶
GetCodeHash returns the code of the instance
func (*Instance) GetContext ¶
GetContext returns the context of the instance
func (*Instance) GrandpaAuthorities ¶
GrandpaAuthorities returns the genesis authorities from the runtime
func (*Instance) InherentExtrinsics ¶
InherentExtrinsics calls runtime API function BlockBuilder_inherent_extrinsics
func (*Instance) InitializeBlock ¶
InitializeBlock calls runtime API function Core_initialise_block
func (*Instance) Keystore ¶
func (in *Instance) Keystore() *keystore.GlobalKeystore
Keystore to get reference to runtime keystore
func (*Instance) NetworkService ¶
func (in *Instance) NetworkService() runtime.BasicNetwork
NetworkService to get referernce to runtime network service
func (*Instance) NodeStorage ¶
func (in *Instance) NodeStorage() runtime.NodeStorage
NodeStorage to get reference to runtime node service
func (*Instance) OffchainWorker ¶
func (in *Instance) OffchainWorker()
func (*Instance) PaymentQueryInfo ¶
func (in *Instance) PaymentQueryInfo(ext []byte) (*types.TransactionPaymentQueryInfo, error)
PaymentQueryInfo returns information of a given extrinsic
func (*Instance) RandomSeed ¶
func (in *Instance) RandomSeed()
func (*Instance) SetContextStorage ¶
SetContextStorage sets the runtime's storage. It should be set before calls to the below functions.
func (*Instance) UpdateRuntimeCode ¶
UpdateRuntimeCode updates the runtime instance to run the given code
func (*Instance) ValidateTransaction ¶
ValidateTransaction runs the extrinsic through the runtime function TaggedTransactionQueue_validate_transaction and returns *Validity