api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: AGPL-3.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(cache Cache, wasm []byte) ([]byte, error)

func GetCode

func GetCode(cache Cache, code_id []byte) ([]byte, error)

func Handle

func Handle(cache Cache, code_id []byte, params []byte, msg []byte, store KVStore, api *GoAPI, gasLimit uint64) ([]byte, uint64, error)

func Instantiate

func Instantiate(cache Cache, code_id []byte, params []byte, msg []byte, store KVStore, api *GoAPI, gasLimit uint64) ([]byte, uint64, error)

func Query

func Query(cache Cache, code_id []byte, msg []byte, store KVStore, api *GoAPI, gasLimit uint64) ([]byte, uint64, error)

func ReleaseCache

func ReleaseCache(cache Cache)

Types

type Cache

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

func InitCache

func InitCache(dataDir string, cacheSize uint64) (Cache, error)

type CanonicalAddress

type CanonicalAddress func(string) ([]byte, error)

type GoAPI

type GoAPI struct {
	HumanAddress     HumanAddress
	CanonicalAddress CanonicalAddress
}

type HumanAddress

type HumanAddress func([]byte) (string, error)

type KVStore

type KVStore interface {
	Get(key []byte) []byte
	Set(key, value []byte)
}

Jump to

Keyboard shortcuts

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