coreblob

package
v1.3.0-alpha.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ScName        = "blob"
	ScDescription = "Blob Contract"
	HScName       = wasmtypes.ScHname(0xfd91bc63)
)
View Source
const (
	ParamBlobs      = "this"
	ParamDataSchema = "d"
	ParamField      = "field"
	ParamHash       = "hash"
	ParamProgBinary = "p"
	ParamSources    = "s"
	ParamVMType     = "v"
)
View Source
const (
	ResultBlobSizes = "this"
	ResultBytes     = "bytes"
	ResultHash      = "hash"
)
View Source
const (
	FuncStoreBlob    = "storeBlob"
	ViewGetBlobField = "getBlobField"
	ViewGetBlobInfo  = "getBlobInfo"
)
View Source
const (
	HFuncStoreBlob    = wasmtypes.ScHname(0xddd4c281)
	HViewGetBlobField = wasmtypes.ScHname(0x1f448130)
	HViewGetBlobInfo  = wasmtypes.ScHname(0xfde4ab46)
)

Variables

This section is empty.

Functions

func OnDispatch added in v1.0.3

func OnDispatch(index int32) *wasmlib.ScExportMap

Types

type CoreBlobEventHandlers added in v1.0.3

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

func NewCoreBlobEventHandlers added in v1.0.3

func NewCoreBlobEventHandlers() *CoreBlobEventHandlers

func (*CoreBlobEventHandlers) CallHandler added in v1.0.3

func (h *CoreBlobEventHandlers) CallHandler(topic string, dec *wasmtypes.WasmDecoder)

func (*CoreBlobEventHandlers) ID added in v1.0.3

func (h *CoreBlobEventHandlers) ID() uint32

func (*CoreBlobEventHandlers) OnCoreBlobStore added in v1.0.3

func (h *CoreBlobEventHandlers) OnCoreBlobStore(handler func(e *EventStore))

type EventStore added in v1.0.3

type EventStore struct {
	Timestamp uint64
	BlobHash  wasmtypes.ScHash
}

type Funcs

type Funcs struct{}
var ScFuncs Funcs

func (Funcs) GetBlobField

func (sc Funcs) GetBlobField(ctx wasmlib.ScViewClientContext) *GetBlobFieldCall

Returns the chunk associated with the given blob field name.

func (Funcs) GetBlobInfo

func (sc Funcs) GetBlobInfo(ctx wasmlib.ScViewClientContext) *GetBlobInfoCall

Returns the size of each chunk of the blob.

func (Funcs) StoreBlob

func (sc Funcs) StoreBlob(ctx wasmlib.ScFuncClientContext) *StoreBlobCall

Stores a new blob in the registry.

type GetBlobFieldCall

type GetBlobFieldCall struct {
	Func    *wasmlib.ScView
	Params  MutableGetBlobFieldParams
	Results ImmutableGetBlobFieldResults
}

type GetBlobInfoCall

type GetBlobInfoCall struct {
	Func    *wasmlib.ScView
	Params  MutableGetBlobInfoParams
	Results ImmutableGetBlobInfoResults
}

type ImmutableGetBlobFieldParams

type ImmutableGetBlobFieldParams struct {
	Proxy wasmtypes.Proxy
}

func NewImmutableGetBlobFieldParams added in v1.0.3

func NewImmutableGetBlobFieldParams() ImmutableGetBlobFieldParams

func (ImmutableGetBlobFieldParams) Field

chunk name

func (ImmutableGetBlobFieldParams) Hash

hash of the blob

type ImmutableGetBlobFieldResults

type ImmutableGetBlobFieldResults struct {
	Proxy wasmtypes.Proxy
}

func (ImmutableGetBlobFieldResults) Bytes

data for named chunk

type ImmutableGetBlobInfoParams

type ImmutableGetBlobInfoParams struct {
	Proxy wasmtypes.Proxy
}

func NewImmutableGetBlobInfoParams added in v1.0.3

func NewImmutableGetBlobInfoParams() ImmutableGetBlobInfoParams

func (ImmutableGetBlobInfoParams) Hash

hash of the blob

type ImmutableGetBlobInfoResults

type ImmutableGetBlobInfoResults struct {
	Proxy wasmtypes.Proxy
}

func (ImmutableGetBlobInfoResults) BlobSizes

sizes for each named chunk

type ImmutableStoreBlobParams

type ImmutableStoreBlobParams struct {
	Proxy wasmtypes.Proxy
}

func NewImmutableStoreBlobParams added in v1.0.3

func NewImmutableStoreBlobParams() ImmutableStoreBlobParams

func (ImmutableStoreBlobParams) Blobs

named chunks

func (ImmutableStoreBlobParams) DataSchema added in v1.0.3

data schema for external tools

func (ImmutableStoreBlobParams) ProgBinary added in v0.3.0

smart contract program binary code

func (ImmutableStoreBlobParams) Sources added in v1.0.3

smart contract program source code

func (ImmutableStoreBlobParams) VMType added in v0.3.1

VM type that must be used to run progBinary

type ImmutableStoreBlobResults

type ImmutableStoreBlobResults struct {
	Proxy wasmtypes.Proxy
}

func (ImmutableStoreBlobResults) Hash

calculated hash of blob chunks

type MapStringToImmutableBytes

type MapStringToImmutableBytes struct {
	Proxy wasmtypes.Proxy
}

func (MapStringToImmutableBytes) GetBytes

type MapStringToImmutableInt32

type MapStringToImmutableInt32 struct {
	Proxy wasmtypes.Proxy
}

func (MapStringToImmutableInt32) GetInt32

type MapStringToMutableBytes

type MapStringToMutableBytes struct {
	Proxy wasmtypes.Proxy
}

func (MapStringToMutableBytes) Clear

func (m MapStringToMutableBytes) Clear()

func (MapStringToMutableBytes) GetBytes

type MapStringToMutableInt32

type MapStringToMutableInt32 struct {
	Proxy wasmtypes.Proxy
}

func (MapStringToMutableInt32) Clear

func (m MapStringToMutableInt32) Clear()

func (MapStringToMutableInt32) GetInt32

type MutableGetBlobFieldParams

type MutableGetBlobFieldParams struct {
	Proxy wasmtypes.Proxy
}

func (MutableGetBlobFieldParams) Field

chunk name

func (MutableGetBlobFieldParams) Hash

hash of the blob

type MutableGetBlobFieldResults

type MutableGetBlobFieldResults struct {
	Proxy wasmtypes.Proxy
}

func NewMutableGetBlobFieldResults added in v1.0.3

func NewMutableGetBlobFieldResults() MutableGetBlobFieldResults

func (MutableGetBlobFieldResults) Bytes

data for named chunk

type MutableGetBlobInfoParams

type MutableGetBlobInfoParams struct {
	Proxy wasmtypes.Proxy
}

func (MutableGetBlobInfoParams) Hash

hash of the blob

type MutableGetBlobInfoResults

type MutableGetBlobInfoResults struct {
	Proxy wasmtypes.Proxy
}

func NewMutableGetBlobInfoResults added in v1.0.3

func NewMutableGetBlobInfoResults() MutableGetBlobInfoResults

func (MutableGetBlobInfoResults) BlobSizes

sizes for each named chunk

type MutableStoreBlobParams

type MutableStoreBlobParams struct {
	Proxy wasmtypes.Proxy
}

func (MutableStoreBlobParams) Blobs

named chunks

func (MutableStoreBlobParams) DataSchema added in v1.0.3

data schema for external tools

func (MutableStoreBlobParams) ProgBinary added in v0.3.0

smart contract program binary code

func (MutableStoreBlobParams) Sources added in v1.0.3

smart contract program source code

func (MutableStoreBlobParams) VMType added in v0.3.1

VM type that must be used to run progBinary

type MutableStoreBlobResults

type MutableStoreBlobResults struct {
	Proxy wasmtypes.Proxy
}

func NewMutableStoreBlobResults added in v1.0.3

func NewMutableStoreBlobResults() MutableStoreBlobResults

func (MutableStoreBlobResults) Hash

calculated hash of blob chunks

type StoreBlobCall

type StoreBlobCall struct {
	Func    *wasmlib.ScFunc
	Params  MutableStoreBlobParams
	Results ImmutableStoreBlobResults
}

Jump to

Keyboard shortcuts

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