Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeDirectory(blobs dict.Dict) (map[hashing.HashValue]uint32, error)
- func DecodeSize(size []byte) (uint32, error)
- func DecodeSizesMap(sizes dict.Dict) (map[string]uint32, error)
- func EncodeSize(size uint32) []byte
- func FieldValueKey(blobHash hashing.HashValue, fieldName string) []byte
- func GetBlobSizes(state kv.KVStore, blobHash hashing.HashValue) *collections.Map
- func GetBlobSizesR(state kv.KVStoreReader, blobHash hashing.HashValue) *collections.ImmutableMap
- func GetBlobValues(state kv.KVStore, blobHash hashing.HashValue) *collections.Map
- func GetBlobValuesR(state kv.KVStoreReader, blobHash hashing.HashValue) *collections.ImmutableMap
- func GetDirectory(state kv.KVStore) *collections.Map
- func GetDirectoryR(state kv.KVStoreReader) *collections.ImmutableMap
- func LocateProgram(state kv.KVStoreReader, programHash hashing.HashValue) (string, []byte, error)
- func MustGetBlobHash(fields dict.Dict) hashing.HashValue
- func SetInitialState(state kv.KVStore)
Constants ¶
View Source
const ( // variable names of standard blob's field // user-defined field must be different VarFieldProgramBinary = "p" VarFieldVMType = "v" VarFieldProgramDescription = "d" )
state variables
View Source
const ( ParamHash = "hash" ParamField = "field" ParamBytes = "bytes" )
request parameters
View Source
const DirectoryPrefix = "d"
Variables ¶
View Source
var ( FuncStoreBlob = coreutil.Func("storeBlob") ViewGetBlobInfo = coreutil.ViewFunc("getBlobInfo") ViewGetBlobField = coreutil.ViewFunc("getBlobField") ViewListBlobs = coreutil.ViewFunc("listBlobs") )
View Source
var Contract = coreutil.NewContract(coreutil.CoreContractBlob)
View Source
var Processor = Contract.Processor(nil, FuncStoreBlob.WithHandler(storeBlob), ViewGetBlobField.WithHandler(getBlobField), ViewGetBlobInfo.WithHandler(getBlobInfo), ViewListBlobs.WithHandler(listBlobs), )
Functions ¶
func DecodeSize ¶
func EncodeSize ¶
func FieldValueKey ¶ added in v0.3.0
FieldValueKey returns key of the blob field value in the SC state.
func GetBlobSizes ¶
GetBlobSizes retrieves the writeable blob field-size map from the state
func GetBlobSizesR ¶
func GetBlobSizesR(state kv.KVStoreReader, blobHash hashing.HashValue) *collections.ImmutableMap
GetBlobSizesR retrieves the blob field-size map from the read-only state
func GetBlobValues ¶
GetBlobValues retrieves the blob field-value map from the state
func GetBlobValuesR ¶
func GetBlobValuesR(state kv.KVStoreReader, blobHash hashing.HashValue) *collections.ImmutableMap
GetBlobValuesR retrieves the blob field-value map from the read-only state
func GetDirectory ¶
func GetDirectory(state kv.KVStore) *collections.Map
GetDirectory retrieves the blob directory from the state
func GetDirectoryR ¶
func GetDirectoryR(state kv.KVStoreReader) *collections.ImmutableMap
GetDirectoryR retrieves the blob directory from the read-only state
func LocateProgram ¶
func MustGetBlobHash ¶
MustGetBlobHash deterministically hashes map of binary values
func SetInitialState ¶ added in v1.0.3
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.