Documentation ¶
Index ¶
- Constants
- func OnDispatch(index int32) *wasmlib.ScExportMap
- type CoreBlobEventHandlers
- type EventStore
- type Funcs
- type GetBlobFieldCall
- type GetBlobInfoCall
- type ImmutableGetBlobFieldParams
- type ImmutableGetBlobFieldResults
- type ImmutableGetBlobInfoParams
- type ImmutableGetBlobInfoResults
- type ImmutableStoreBlobParams
- func (s ImmutableStoreBlobParams) Blobs() MapStringToImmutableBytes
- func (s ImmutableStoreBlobParams) DataSchema() wasmtypes.ScImmutableBytes
- func (s ImmutableStoreBlobParams) ProgBinary() wasmtypes.ScImmutableBytes
- func (s ImmutableStoreBlobParams) Sources() wasmtypes.ScImmutableBytes
- func (s ImmutableStoreBlobParams) VMType() wasmtypes.ScImmutableString
- type ImmutableStoreBlobResults
- type MapStringToImmutableBytes
- type MapStringToImmutableInt32
- type MapStringToMutableBytes
- type MapStringToMutableInt32
- type MutableGetBlobFieldParams
- type MutableGetBlobFieldResults
- type MutableGetBlobInfoParams
- type MutableGetBlobInfoResults
- type MutableStoreBlobParams
- func (s MutableStoreBlobParams) Blobs() MapStringToMutableBytes
- func (s MutableStoreBlobParams) DataSchema() wasmtypes.ScMutableBytes
- func (s MutableStoreBlobParams) ProgBinary() wasmtypes.ScMutableBytes
- func (s MutableStoreBlobParams) Sources() wasmtypes.ScMutableBytes
- func (s MutableStoreBlobParams) VMType() wasmtypes.ScMutableString
- type MutableStoreBlobResults
- type StoreBlobCall
Constants ¶
const ( ScName = "blob" ScDescription = "Blob Contract" HScName = wasmtypes.ScHname(0xfd91bc63) )
const ( ParamBlobs = "this" ParamDataSchema = "d" ParamField = "field" ParamHash = "hash" ParamProgBinary = "p" ParamSources = "s" ParamVMType = "v" )
const ( ResultBlobSizes = "this" ResultBytes = "bytes" ResultHash = "hash" )
const ( FuncStoreBlob = "storeBlob" ViewGetBlobField = "getBlobField" ViewGetBlobInfo = "getBlobInfo" )
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 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 ¶
func NewImmutableGetBlobFieldParams ¶ added in v1.0.3
func NewImmutableGetBlobFieldParams() ImmutableGetBlobFieldParams
func (ImmutableGetBlobFieldParams) Field ¶
func (s ImmutableGetBlobFieldParams) Field() wasmtypes.ScImmutableString
chunk name
func (ImmutableGetBlobFieldParams) Hash ¶
func (s ImmutableGetBlobFieldParams) Hash() wasmtypes.ScImmutableHash
hash of the blob
type ImmutableGetBlobFieldResults ¶
func (ImmutableGetBlobFieldResults) Bytes ¶
func (s ImmutableGetBlobFieldResults) Bytes() wasmtypes.ScImmutableBytes
data for named chunk
type ImmutableGetBlobInfoParams ¶
func NewImmutableGetBlobInfoParams ¶ added in v1.0.3
func NewImmutableGetBlobInfoParams() ImmutableGetBlobInfoParams
func (ImmutableGetBlobInfoParams) Hash ¶
func (s ImmutableGetBlobInfoParams) Hash() wasmtypes.ScImmutableHash
hash of the blob
type ImmutableGetBlobInfoResults ¶
func (ImmutableGetBlobInfoResults) BlobSizes ¶
func (s ImmutableGetBlobInfoResults) BlobSizes() MapStringToImmutableInt32
sizes for each named chunk
type ImmutableStoreBlobParams ¶
func NewImmutableStoreBlobParams ¶ added in v1.0.3
func NewImmutableStoreBlobParams() ImmutableStoreBlobParams
func (ImmutableStoreBlobParams) Blobs ¶
func (s ImmutableStoreBlobParams) Blobs() MapStringToImmutableBytes
named chunks
func (ImmutableStoreBlobParams) DataSchema ¶ added in v1.0.3
func (s ImmutableStoreBlobParams) DataSchema() wasmtypes.ScImmutableBytes
data schema for external tools
func (ImmutableStoreBlobParams) ProgBinary ¶ added in v0.3.0
func (s ImmutableStoreBlobParams) ProgBinary() wasmtypes.ScImmutableBytes
smart contract program binary code
func (ImmutableStoreBlobParams) Sources ¶ added in v1.0.3
func (s ImmutableStoreBlobParams) Sources() wasmtypes.ScImmutableBytes
smart contract program source code
func (ImmutableStoreBlobParams) VMType ¶ added in v0.3.1
func (s ImmutableStoreBlobParams) VMType() wasmtypes.ScImmutableString
VM type that must be used to run progBinary
type ImmutableStoreBlobResults ¶
func (ImmutableStoreBlobResults) Hash ¶
func (s ImmutableStoreBlobResults) Hash() wasmtypes.ScImmutableHash
calculated hash of blob chunks
type MapStringToImmutableBytes ¶
func (MapStringToImmutableBytes) GetBytes ¶
func (m MapStringToImmutableBytes) GetBytes(key string) wasmtypes.ScImmutableBytes
type MapStringToImmutableInt32 ¶
func (MapStringToImmutableInt32) GetInt32 ¶
func (m MapStringToImmutableInt32) GetInt32(key string) wasmtypes.ScImmutableInt32
type MapStringToMutableBytes ¶
func (MapStringToMutableBytes) Clear ¶
func (m MapStringToMutableBytes) Clear()
func (MapStringToMutableBytes) GetBytes ¶
func (m MapStringToMutableBytes) GetBytes(key string) wasmtypes.ScMutableBytes
type MapStringToMutableInt32 ¶
func (MapStringToMutableInt32) Clear ¶
func (m MapStringToMutableInt32) Clear()
func (MapStringToMutableInt32) GetInt32 ¶
func (m MapStringToMutableInt32) GetInt32(key string) wasmtypes.ScMutableInt32
type MutableGetBlobFieldParams ¶
func (MutableGetBlobFieldParams) Field ¶
func (s MutableGetBlobFieldParams) Field() wasmtypes.ScMutableString
chunk name
func (MutableGetBlobFieldParams) Hash ¶
func (s MutableGetBlobFieldParams) Hash() wasmtypes.ScMutableHash
hash of the blob
type MutableGetBlobFieldResults ¶
func NewMutableGetBlobFieldResults ¶ added in v1.0.3
func NewMutableGetBlobFieldResults() MutableGetBlobFieldResults
func (MutableGetBlobFieldResults) Bytes ¶
func (s MutableGetBlobFieldResults) Bytes() wasmtypes.ScMutableBytes
data for named chunk
type MutableGetBlobInfoParams ¶
func (MutableGetBlobInfoParams) Hash ¶
func (s MutableGetBlobInfoParams) Hash() wasmtypes.ScMutableHash
hash of the blob
type MutableGetBlobInfoResults ¶
func NewMutableGetBlobInfoResults ¶ added in v1.0.3
func NewMutableGetBlobInfoResults() MutableGetBlobInfoResults
func (MutableGetBlobInfoResults) BlobSizes ¶
func (s MutableGetBlobInfoResults) BlobSizes() MapStringToMutableInt32
sizes for each named chunk
type MutableStoreBlobParams ¶
func (MutableStoreBlobParams) Blobs ¶
func (s MutableStoreBlobParams) Blobs() MapStringToMutableBytes
named chunks
func (MutableStoreBlobParams) DataSchema ¶ added in v1.0.3
func (s MutableStoreBlobParams) DataSchema() wasmtypes.ScMutableBytes
data schema for external tools
func (MutableStoreBlobParams) ProgBinary ¶ added in v0.3.0
func (s MutableStoreBlobParams) ProgBinary() wasmtypes.ScMutableBytes
smart contract program binary code
func (MutableStoreBlobParams) Sources ¶ added in v1.0.3
func (s MutableStoreBlobParams) Sources() wasmtypes.ScMutableBytes
smart contract program source code
func (MutableStoreBlobParams) VMType ¶ added in v0.3.1
func (s MutableStoreBlobParams) VMType() wasmtypes.ScMutableString
VM type that must be used to run progBinary
type MutableStoreBlobResults ¶
func NewMutableStoreBlobResults ¶ added in v1.0.3
func NewMutableStoreBlobResults() MutableStoreBlobResults
func (MutableStoreBlobResults) Hash ¶
func (s MutableStoreBlobResults) Hash() wasmtypes.ScMutableHash
calculated hash of blob chunks
type StoreBlobCall ¶
type StoreBlobCall struct { Func *wasmlib.ScFunc Params MutableStoreBlobParams Results ImmutableStoreBlobResults }