proxy

package
v1.6.5-rc18 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const ABIName = "w3bstream-wasm-proxy"

Variables

This section is empty.

Functions

This section is empty.

Types

type ABIContext

type ABIContext struct {
	Imports  types.ImportsHandler
	Instance types.Instance
}

func (*ABIContext) GetExports

func (a *ABIContext) GetExports() types.Exports

func (*ABIContext) GetImports

func (a *ABIContext) GetImports() types.ImportsHandler

func (*ABIContext) GetInstance

func (a *ABIContext) GetInstance() types.Instance

func (*ABIContext) Name

func (a *ABIContext) Name() string

func (*ABIContext) OnCreated

func (a *ABIContext) OnCreated(i types.Instance)

func (*ABIContext) OnDestroy

func (a *ABIContext) OnDestroy(i types.Instance)

func (*ABIContext) OnEventReceived

func (a *ABIContext) OnEventReceived(entry string, typ string, data []byte) (interface{}, uint64, error)

func (*ABIContext) SetImports

func (a *ABIContext) SetImports(imports types.ImportsHandler)

func (*ABIContext) SetInstance

func (a *ABIContext) SetInstance(instance types.Instance)

type Imports

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

func NewImports

func NewImports(ctx context.Context) *Imports

func NewImportsDebugMode

func NewImportsDebugMode(ctx context.Context) *Imports

func (*Imports) Abort

func (i *Imports) Abort(msg, filename string, line, col int32)

func (*Imports) AsyncAPICall

func (i *Imports) AsyncAPICall(req []byte) ([]byte, error)

func (*Imports) CallContract

func (i *Imports) CallContract(chainID uint32, data []byte) ([]byte, error)

func (*Imports) Env

func (i *Imports) Env(key string) (string, bool)

func (*Imports) ExecSQL

func (i *Imports) ExecSQL(q string) error

func (*Imports) FlushLog

func (i *Imports) FlushLog()

func (*Imports) GetEventType

func (i *Imports) GetEventType(rid uint32) (string, bool)

func (*Imports) GetKVData

func (i *Imports) GetKVData(key string) ([]byte, error)

func (*Imports) GetResourceData

func (i *Imports) GetResourceData(rid uint32) ([]byte, bool)

func (*Imports) Log

func (i *Imports) Log(lv consts.LogLevel, msg string)

func (*Imports) LogInternal

func (i *Imports) LogInternal(lv consts.LogLevel, msg string, args ...any)

func (*Imports) PubMQTT

func (i *Imports) PubMQTT(topic string, message []byte) error

func (*Imports) QuerySQL

func (i *Imports) QuerySQL(q string) ([]byte, error)

func (*Imports) RemoveEventType

func (i *Imports) RemoveEventType(rid uint32)

func (*Imports) RemoveResourceData

func (i *Imports) RemoveResourceData(rid uint32)

func (*Imports) Seed

func (i *Imports) Seed() float64

func (*Imports) SendTX

func (i *Imports) SendTX(chainID uint32, data []byte) (string, error)

func (*Imports) SendTXWithOperator

func (i *Imports) SendTXWithOperator(chainID uint32, data []byte) (string, error)

func (*Imports) SetEventType

func (i *Imports) SetEventType(rid uint32, typ string) error

func (*Imports) SetKVData

func (i *Imports) SetKVData(key string, data []byte) error

func (*Imports) SetResourceData

func (i *Imports) SetResourceData(rid uint32, data []byte) error

func (*Imports) SubmitMetrics

func (i *Imports) SubmitMetrics(data []byte) error

func (*Imports) Trace

func (i *Imports) Trace(msg, trace string)

Jump to

Keyboard shortcuts

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