wasmlib

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0, BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// all TYPE_* values should exactly match the counterpart OBJTYPE_* values on the host!
	TYPE_ARRAY   int32 = 0x20
	TYPE_ARRAY16 int32 = 0x30
	TYPE_CALL    int32 = 0x40

	TYPE_ADDRESS    int32 = 1
	TYPE_AGENT_ID   int32 = 2
	TYPE_BYTES      int32 = 3
	TYPE_CHAIN_ID   int32 = 4
	TYPE_COLOR      int32 = 5
	TYPE_HASH       int32 = 6
	TYPE_HNAME      int32 = 7
	TYPE_INT16      int32 = 8
	TYPE_INT32      int32 = 9
	TYPE_INT64      int32 = 10
	TYPE_MAP        int32 = 11
	TYPE_REQUEST_ID int32 = 12
	TYPE_STRING     int32 = 13

	OBJ_ID_NULL    int32 = 0
	OBJ_ID_ROOT    int32 = 1
	OBJ_ID_STATE   int32 = 2
	OBJ_ID_PARAMS  int32 = 3
	OBJ_ID_RESULTS int32 = 4
)
View Source
const (
	KeyAccountID       = Key32(-1)
	KeyAddress         = Key32(-2)
	KeyBalances        = Key32(-3)
	KeyBase58Decode    = Key32(-4)
	KeyBase58Encode    = Key32(-5)
	KeyBlsAddress      = Key32(-6)
	KeyBlsAggregate    = Key32(-7)
	KeyBlsValid        = Key32(-8)
	KeyCall            = Key32(-9)
	KeyCaller          = Key32(-10)
	KeyChainID         = Key32(-11)
	KeyChainOwnerID    = Key32(-12)
	KeyColor           = Key32(-13)
	KeyContract        = Key32(-14)
	KeyContractCreator = Key32(-15)
	KeyDeploy          = Key32(-16)
	KeyEd25519Address  = Key32(-17)
	KeyEd25519Valid    = Key32(-18)
	KeyEvent           = Key32(-19)
	KeyExports         = Key32(-20)
	KeyHashBlake2b     = Key32(-21)
	KeyHashSha3        = Key32(-22)
	KeyHname           = Key32(-23)
	KeyIncoming        = Key32(-24)
	KeyLength          = Key32(-25)
	KeyLog             = Key32(-26)
	KeyMaps            = Key32(-27)
	KeyMinted          = Key32(-28)
	KeyName            = Key32(-29)
	KeyPanic           = Key32(-30)
	KeyParams          = Key32(-31)
	KeyPost            = Key32(-32)
	KeyRandom          = Key32(-33)
	KeyRequestID       = Key32(-34)
	KeyResults         = Key32(-35)
	KeyReturn          = Key32(-36)
	KeyState           = Key32(-37)
	KeyTimestamp       = Key32(-38)
	KeyTrace           = Key32(-39)
	KeyTransfers       = Key32(-40)
	KeyUtility         = Key32(-41)
	KeyValid           = Key32(-42)
	KeyZzzzzzz         = Key32(-43)
)

Variables

View Source
var (
	IOTA = ScColor{}
	MINT = ScColor{}
)
View Source
var Root = ScMutableMap{/* contains filtered or unexported fields */}
View Source
var TypeSizes = [...]uint8{0, 33, 37, 0, 33, 32, 32, 4, 2, 4, 8, 0, 34, 0}

Functions

func AddFunc

func AddFunc(f func(ctx ScFuncContext)) []func(ctx ScFuncContext)

func AddView

func AddView(v func(ctx ScViewContext)) []func(ctx ScViewContext)

func CallFunc

func CallFunc(objID int32, keyID Key32, params []byte) []byte

func Clear

func Clear(objID int32)

func Exists

func Exists(objID int32, keyID Key32, typeID int32) bool

func FuncError

func FuncError(ctx ScFuncContext)

func GetBytes

func GetBytes(objID int32, keyID Key32, typeID int32) []byte

func GetLength

func GetLength(objID int32) int32

func GetObjectID

func GetObjectID(objID int32, keyID Key32, typeID int32) int32

func Log

func Log(text string)

func OnCall

func OnCall(index int32)

func Panic

func Panic(text string)

func SetBytes

func SetBytes(objID int32, keyID Key32, typeID int32, value []byte)

func Trace

func Trace(text string)

func ViewError

func ViewError(ctx ScViewContext)

Types

type BytesDecoder

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

func NewBytesDecoder

func NewBytesDecoder(data []byte) *BytesDecoder

func (*BytesDecoder) Address

func (d *BytesDecoder) Address() ScAddress

func (*BytesDecoder) AgentID

func (d *BytesDecoder) AgentID() ScAgentID

func (*BytesDecoder) Bytes

func (d *BytesDecoder) Bytes() []byte

func (*BytesDecoder) ChainID

func (d *BytesDecoder) ChainID() ScChainID

func (*BytesDecoder) Close

func (d *BytesDecoder) Close()

func (*BytesDecoder) Color

func (d *BytesDecoder) Color() ScColor

func (*BytesDecoder) Hash

func (d *BytesDecoder) Hash() ScHash

func (*BytesDecoder) Hname

func (d *BytesDecoder) Hname() ScHname

func (*BytesDecoder) Int16

func (d *BytesDecoder) Int16() int16

func (*BytesDecoder) Int32

func (d *BytesDecoder) Int32() int32

func (*BytesDecoder) Int64

func (d *BytesDecoder) Int64() int64

func (*BytesDecoder) RequestID

func (d *BytesDecoder) RequestID() ScRequestID

func (*BytesDecoder) String

func (d *BytesDecoder) String() string

type BytesEncoder

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

func NewBytesEncoder

func NewBytesEncoder() *BytesEncoder

func (*BytesEncoder) Address

func (e *BytesEncoder) Address(value ScAddress) *BytesEncoder

func (*BytesEncoder) AgentID

func (e *BytesEncoder) AgentID(value ScAgentID) *BytesEncoder

func (*BytesEncoder) Bytes

func (e *BytesEncoder) Bytes(value []byte) *BytesEncoder

func (*BytesEncoder) ChainID

func (e *BytesEncoder) ChainID(value ScChainID) *BytesEncoder

func (*BytesEncoder) Color

func (e *BytesEncoder) Color(value ScColor) *BytesEncoder

func (*BytesEncoder) Data

func (e *BytesEncoder) Data() []byte

func (*BytesEncoder) Hash

func (e *BytesEncoder) Hash(value ScHash) *BytesEncoder

func (*BytesEncoder) Hname

func (e *BytesEncoder) Hname(value ScHname) *BytesEncoder

func (*BytesEncoder) Int16

func (e *BytesEncoder) Int16(value int16) *BytesEncoder

func (*BytesEncoder) Int32

func (e *BytesEncoder) Int32(value int32) *BytesEncoder

func (*BytesEncoder) Int64

func (e *BytesEncoder) Int64(value int64) *BytesEncoder

func (*BytesEncoder) RequestID

func (e *BytesEncoder) RequestID(value ScRequestID) *BytesEncoder

func (*BytesEncoder) String

func (e *BytesEncoder) String(value string) *BytesEncoder

type InitHost

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

func NewInitHost

func NewInitHost() *InitHost

func (InitHost) AddFunc

func (h InitHost) AddFunc(f func(ctx ScFuncContext)) []func(ctx ScFuncContext)

func (InitHost) AddView

func (h InitHost) AddView(v func(ctx ScViewContext)) []func(ctx ScViewContext)

func (InitHost) CallFunc

func (h InitHost) CallFunc(objID, keyID int32, params []byte) []byte

func (InitHost) Exists

func (h InitHost) Exists(objID, keyID, typeID int32) bool

func (InitHost) GetBytes

func (h InitHost) GetBytes(objID, keyID, typeID int32) []byte

func (InitHost) GetKeyIDFromBytes

func (h InitHost) GetKeyIDFromBytes(bytes []byte) int32

func (InitHost) GetKeyIDFromString

func (h InitHost) GetKeyIDFromString(key string) int32

func (InitHost) GetObjectID

func (h InitHost) GetObjectID(objID, keyID, typeID int32) int32

func (InitHost) SetBytes

func (h InitHost) SetBytes(objID, keyID, typeID int32, value []byte)

type Key

type Key string

func (Key) KeyID

func (key Key) KeyID() Key32

type Key32

type Key32 int32

func GetKeyIDFromBytes

func GetKeyIDFromBytes(bytes []byte) Key32

func GetKeyIDFromString

func GetKeyIDFromString(key string) Key32

func (Key32) KeyID

func (key Key32) KeyID() Key32

type MapKey

type MapKey interface {
	KeyID() Key32
}

type ScAddress

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

func NewScAddressFromBytes

func NewScAddressFromBytes(bytes []byte) ScAddress

func (ScAddress) AsAgentID

func (o ScAddress) AsAgentID() ScAgentID

func (ScAddress) Bytes

func (o ScAddress) Bytes() []byte

func (ScAddress) KeyID

func (o ScAddress) KeyID() Key32

func (ScAddress) String

func (o ScAddress) String() string

type ScAgentID

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

func NewScAgentID

func NewScAgentID(address ScAddress, hContract ScHname) ScAgentID

func NewScAgentIDFromBytes

func NewScAgentIDFromBytes(bytes []byte) ScAgentID

func (ScAgentID) Address

func (o ScAgentID) Address() ScAddress

func (ScAgentID) Bytes

func (o ScAgentID) Bytes() []byte

func (ScAgentID) Hname

func (o ScAgentID) Hname() ScHname

func (ScAgentID) IsAddress

func (o ScAgentID) IsAddress() bool

func (ScAgentID) KeyID

func (o ScAgentID) KeyID() Key32

func (ScAgentID) String

func (o ScAgentID) String() string

type ScBalances

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

used to retrieve any information that is related to colored token balances

func (ScBalances) Balance

func (ctx ScBalances) Balance(color ScColor) int64

retrieve the balance for the specified token color

func (ScBalances) Colors

func (ctx ScBalances) Colors() ScImmutableColorArray

retrieve a list of all token colors that have a non-zero balance

type ScBaseContext

type ScBaseContext struct{}

shared interface part of ScFuncContext and ScViewContext

func (ScBaseContext) AccountID

func (ctx ScBaseContext) AccountID() ScAgentID

retrieve the agent id of this contract account

func (ScBaseContext) Balances

func (ctx ScBaseContext) Balances() ScBalances

access the current balances for all token colors

func (ScBaseContext) ChainID

func (ctx ScBaseContext) ChainID() ScChainID

retrieve the chain id of the chain this contract lives on

func (ScBaseContext) ChainOwnerID

func (ctx ScBaseContext) ChainOwnerID() ScAgentID

retrieve the agent id of the owner of the chain this contract lives on

func (ScBaseContext) Contract

func (ctx ScBaseContext) Contract() ScHname

retrieve the hname of this contract

func (ScBaseContext) ContractCreator

func (ctx ScBaseContext) ContractCreator() ScAgentID

retrieve the agent id of the creator of this contract

func (ScBaseContext) Log

func (ctx ScBaseContext) Log(text string)

logs informational text message

func (ScBaseContext) Panic

func (ctx ScBaseContext) Panic(text string)

logs error text message and then panics

func (ScBaseContext) Params

func (ctx ScBaseContext) Params() ScImmutableMap

retrieve parameters passed to the smart contract function that was called

func (ScBaseContext) Require

func (ctx ScBaseContext) Require(cond bool, msg string)

panics if condition is not satisfied

func (ScBaseContext) Results

func (ctx ScBaseContext) Results() ScMutableMap

any results returned by the smart contract function call are returned here

func (ScBaseContext) Timestamp

func (ctx ScBaseContext) Timestamp() int64

deterministic time stamp fixed at the moment of calling the smart contract

func (ScBaseContext) Trace

func (ctx ScBaseContext) Trace(text string)

logs debugging trace text message

func (ScBaseContext) Utility

func (ctx ScBaseContext) Utility() ScUtility

access diverse utility functions

type ScChainID

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

func NewScChainIDFromBytes

func NewScChainIDFromBytes(bytes []byte) ScChainID

func (ScChainID) Address

func (o ScChainID) Address() ScAddress

func (ScChainID) Bytes

func (o ScChainID) Bytes() []byte

func (ScChainID) KeyID

func (o ScChainID) KeyID() Key32

func (ScChainID) String

func (o ScChainID) String() string

type ScColor

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

func NewScColorFromBytes

func NewScColorFromBytes(bytes []byte) ScColor

func NewScColorFromRequestID

func NewScColorFromRequestID(requestID ScRequestID) ScColor

func (ScColor) Bytes

func (o ScColor) Bytes() []byte

func (ScColor) KeyID

func (o ScColor) KeyID() Key32

func (ScColor) String

func (o ScColor) String() string

type ScExports

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

func NewScExports

func NewScExports() ScExports

func (ScExports) AddFunc

func (ctx ScExports) AddFunc(name string, f func(ctx ScFuncContext))

func (ScExports) AddView

func (ctx ScExports) AddView(name string, v func(ctx ScViewContext))

type ScFunc

type ScFunc struct {
	ScView
	// contains filtered or unexported fields
}

func NewScFunc

func NewScFunc(ctx ScFuncCallContext, hContract, hFunction ScHname) *ScFunc

func (*ScFunc) Call

func (f *ScFunc) Call()

func (*ScFunc) Delay

func (f *ScFunc) Delay(seconds int32) *ScFunc

func (*ScFunc) OfContract

func (f *ScFunc) OfContract(hContract ScHname) *ScFunc

func (*ScFunc) Post

func (f *ScFunc) Post()

func (*ScFunc) PostToChain

func (f *ScFunc) PostToChain(chainID ScChainID)

func (*ScFunc) Transfer

func (f *ScFunc) Transfer(transfer ScTransfers) *ScFunc

func (*ScFunc) TransferIotas

func (f *ScFunc) TransferIotas(amount int64) *ScFunc

type ScFuncCallContext

type ScFuncCallContext interface {
	InitFuncCallContext()
}

type ScFuncContext

type ScFuncContext struct {
	ScBaseContext
}

smart contract interface with mutable access to state

func (ScFuncContext) Call

func (ctx ScFuncContext) Call(hContract, hFunction ScHname, params *ScMutableMap, transfer *ScTransfers) ScImmutableMap

calls a smart contract function

func (ScFuncContext) CallSelf

func (ctx ScFuncContext) CallSelf(hFunction ScHname, params *ScMutableMap, transfer *ScTransfers) ScImmutableMap

calls a smart contract function on the current contract

func (ScFuncContext) Caller

func (ctx ScFuncContext) Caller() ScAgentID

retrieve the agent id of the caller of the smart contract

func (ScFuncContext) Deploy

func (ctx ScFuncContext) Deploy(programHash ScHash, name, description string, params *ScMutableMap)

deploys a smart contract

func (ScFuncContext) Event

func (ctx ScFuncContext) Event(text string)

signals an event on the node that external entities can subscribe to

func (ScFuncContext) Host

func (ctx ScFuncContext) Host() ScHost

func (ScFuncContext) Incoming

func (ctx ScFuncContext) Incoming() ScBalances

access the incoming balances for all token colors

func (ScFuncContext) InitFuncCallContext

func (ctx ScFuncContext) InitFuncCallContext()

func (ScFuncContext) InitViewCallContext

func (ctx ScFuncContext) InitViewCallContext()

func (ScFuncContext) Minted

func (ctx ScFuncContext) Minted() ScBalances

retrieve the tokens that were minted in this transaction

func (ScFuncContext) Post

func (ctx ScFuncContext) Post(chainID ScChainID, hContract, hFunction ScHname, params *ScMutableMap, transfer ScTransfers, delay int32)

(delayed) posts a smart contract function

func (ScFuncContext) PostSelf

func (ctx ScFuncContext) PostSelf(hFunction ScHname, params *ScMutableMap, transfer ScTransfers, delay int32)

func (ScFuncContext) RequestID

func (ctx ScFuncContext) RequestID() ScRequestID

retrieve the request id of this transaction

func (ScFuncContext) State

func (ctx ScFuncContext) State() ScMutableMap

access to mutable state storage

func (ScFuncContext) TransferToAddress

func (ctx ScFuncContext) TransferToAddress(address ScAddress, transfer ScTransfers)

transfer colored token amounts to the specified Tangle ledger address

type ScHash

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

func NewScHashFromBytes

func NewScHashFromBytes(bytes []byte) ScHash

func (ScHash) Bytes

func (o ScHash) Bytes() []byte

func (ScHash) KeyID

func (o ScHash) KeyID() Key32

func (ScHash) String

func (o ScHash) String() string

type ScHname

type ScHname uint32

func NewScHname

func NewScHname(name string) ScHname

func NewScHnameFromBytes

func NewScHnameFromBytes(bytes []byte) ScHname

func (ScHname) Bytes

func (hn ScHname) Bytes() []byte

func (ScHname) KeyID

func (hn ScHname) KeyID() Key32

func (ScHname) String

func (hn ScHname) String() string

type ScHost

type ScHost interface {
	AddFunc(f func(ctx ScFuncContext)) []func(ctx ScFuncContext)
	AddView(v func(ctx ScViewContext)) []func(ctx ScViewContext)
	CallFunc(objID, keyID int32, params []byte) []byte
	Exists(objID, keyID, typeID int32) bool
	GetBytes(objID, keyID, typeID int32) []byte
	GetKeyIDFromBytes(bytes []byte) int32
	GetKeyIDFromString(key string) int32
	GetObjectID(objID, keyID, typeID int32) int32
	SetBytes(objID, keyID, typeID int32, value []byte)
}

func ConnectHost

func ConnectHost(h ScHost) ScHost

type ScImmutableAddress

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

func NewScImmutableAddress

func NewScImmutableAddress(objID int32, keyID Key32) ScImmutableAddress

func (ScImmutableAddress) Exists

func (o ScImmutableAddress) Exists() bool

func (ScImmutableAddress) String

func (o ScImmutableAddress) String() string

func (ScImmutableAddress) Value

func (o ScImmutableAddress) Value() ScAddress

type ScImmutableAddressArray

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

func (ScImmutableAddressArray) GetAddress

func (o ScImmutableAddressArray) GetAddress(index int32) ScImmutableAddress

func (ScImmutableAddressArray) Length

func (o ScImmutableAddressArray) Length() int32

type ScImmutableAgentID

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

func NewScImmutableAgentID

func NewScImmutableAgentID(objID int32, keyID Key32) ScImmutableAgentID

func (ScImmutableAgentID) Exists

func (o ScImmutableAgentID) Exists() bool

func (ScImmutableAgentID) String

func (o ScImmutableAgentID) String() string

func (ScImmutableAgentID) Value

func (o ScImmutableAgentID) Value() ScAgentID

type ScImmutableAgentIDArray

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

func (ScImmutableAgentIDArray) GetAgentID

func (o ScImmutableAgentIDArray) GetAgentID(index int32) ScImmutableAgentID

func (ScImmutableAgentIDArray) Length

func (o ScImmutableAgentIDArray) Length() int32

type ScImmutableBytes

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

func NewScImmutableBytes

func NewScImmutableBytes(objID int32, keyID Key32) ScImmutableBytes

func (ScImmutableBytes) Exists

func (o ScImmutableBytes) Exists() bool

func (ScImmutableBytes) String

func (o ScImmutableBytes) String() string

func (ScImmutableBytes) Value

func (o ScImmutableBytes) Value() []byte

type ScImmutableBytesArray

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

func (ScImmutableBytesArray) GetBytes

func (o ScImmutableBytesArray) GetBytes(index int32) ScImmutableBytes

func (ScImmutableBytesArray) Length

func (o ScImmutableBytesArray) Length() int32

type ScImmutableChainID

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

func NewScImmutableChainID

func NewScImmutableChainID(objID int32, keyID Key32) ScImmutableChainID

func (ScImmutableChainID) Exists

func (o ScImmutableChainID) Exists() bool

func (ScImmutableChainID) String

func (o ScImmutableChainID) String() string

func (ScImmutableChainID) Value

func (o ScImmutableChainID) Value() ScChainID

type ScImmutableChainIDArray

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

func (ScImmutableChainIDArray) GetChainID

func (o ScImmutableChainIDArray) GetChainID(index int32) ScImmutableChainID

func (ScImmutableChainIDArray) Length

func (o ScImmutableChainIDArray) Length() int32

type ScImmutableColor

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

func NewScImmutableColor

func NewScImmutableColor(objID int32, keyID Key32) ScImmutableColor

func (ScImmutableColor) Exists

func (o ScImmutableColor) Exists() bool

func (ScImmutableColor) String

func (o ScImmutableColor) String() string

func (ScImmutableColor) Value

func (o ScImmutableColor) Value() ScColor

type ScImmutableColorArray

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

func (ScImmutableColorArray) GetColor

func (o ScImmutableColorArray) GetColor(index int32) ScImmutableColor

func (ScImmutableColorArray) Length

func (o ScImmutableColorArray) Length() int32

type ScImmutableHash

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

func NewScImmutableHash

func NewScImmutableHash(objID int32, keyID Key32) ScImmutableHash

func (ScImmutableHash) Exists

func (o ScImmutableHash) Exists() bool

func (ScImmutableHash) String

func (o ScImmutableHash) String() string

func (ScImmutableHash) Value

func (o ScImmutableHash) Value() ScHash

type ScImmutableHashArray

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

func (ScImmutableHashArray) GetHash

func (o ScImmutableHashArray) GetHash(index int32) ScImmutableHash

func (ScImmutableHashArray) Length

func (o ScImmutableHashArray) Length() int32

type ScImmutableHname

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

func NewScImmutableHname

func NewScImmutableHname(objID int32, keyID Key32) ScImmutableHname

func (ScImmutableHname) Exists

func (o ScImmutableHname) Exists() bool

func (ScImmutableHname) String

func (o ScImmutableHname) String() string

func (ScImmutableHname) Value

func (o ScImmutableHname) Value() ScHname

type ScImmutableHnameArray

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

func (ScImmutableHnameArray) GetHname

func (o ScImmutableHnameArray) GetHname(index int32) ScImmutableHname

func (ScImmutableHnameArray) Length

func (o ScImmutableHnameArray) Length() int32

type ScImmutableInt16

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

func NewScImmutableInt16

func NewScImmutableInt16(objID int32, keyID Key32) ScImmutableInt16

func (ScImmutableInt16) Exists

func (o ScImmutableInt16) Exists() bool

func (ScImmutableInt16) String

func (o ScImmutableInt16) String() string

func (ScImmutableInt16) Value

func (o ScImmutableInt16) Value() int16

type ScImmutableInt16Array

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

func (ScImmutableInt16Array) GetInt16

func (o ScImmutableInt16Array) GetInt16(index int32) ScImmutableInt16

func (ScImmutableInt16Array) Length

func (o ScImmutableInt16Array) Length() int32

type ScImmutableInt32

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

func NewScImmutableInt32

func NewScImmutableInt32(objID int32, keyID Key32) ScImmutableInt32

func (ScImmutableInt32) Exists

func (o ScImmutableInt32) Exists() bool

func (ScImmutableInt32) String

func (o ScImmutableInt32) String() string

func (ScImmutableInt32) Value

func (o ScImmutableInt32) Value() int32

type ScImmutableInt32Array

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

func (ScImmutableInt32Array) GetInt32

func (o ScImmutableInt32Array) GetInt32(index int32) ScImmutableInt32

func (ScImmutableInt32Array) Length

func (o ScImmutableInt32Array) Length() int32

type ScImmutableInt64

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

func NewScImmutableInt64

func NewScImmutableInt64(objID int32, keyID Key32) ScImmutableInt64

func (ScImmutableInt64) Exists

func (o ScImmutableInt64) Exists() bool

func (ScImmutableInt64) String

func (o ScImmutableInt64) String() string

func (ScImmutableInt64) Value

func (o ScImmutableInt64) Value() int64

type ScImmutableInt64Array

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

func (ScImmutableInt64Array) GetInt64

func (o ScImmutableInt64Array) GetInt64(index int32) ScImmutableInt64

func (ScImmutableInt64Array) Length

func (o ScImmutableInt64Array) Length() int32

type ScImmutableMap

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

func (ScImmutableMap) CallFunc

func (o ScImmutableMap) CallFunc(keyID Key32, params []byte) []byte

func (ScImmutableMap) GetAddress

func (o ScImmutableMap) GetAddress(key MapKey) ScImmutableAddress

func (ScImmutableMap) GetAddressArray

func (o ScImmutableMap) GetAddressArray(key MapKey) ScImmutableAddressArray

func (ScImmutableMap) GetAgentID

func (o ScImmutableMap) GetAgentID(key MapKey) ScImmutableAgentID

func (ScImmutableMap) GetAgentIDArray

func (o ScImmutableMap) GetAgentIDArray(key MapKey) ScImmutableAgentIDArray

func (ScImmutableMap) GetBytes

func (o ScImmutableMap) GetBytes(key MapKey) ScImmutableBytes

func (ScImmutableMap) GetBytesArray

func (o ScImmutableMap) GetBytesArray(key MapKey) ScImmutableBytesArray

func (ScImmutableMap) GetChainID

func (o ScImmutableMap) GetChainID(key MapKey) ScImmutableChainID

func (ScImmutableMap) GetChainIDArray

func (o ScImmutableMap) GetChainIDArray(key MapKey) ScImmutableChainIDArray

func (ScImmutableMap) GetColor

func (o ScImmutableMap) GetColor(key MapKey) ScImmutableColor

func (ScImmutableMap) GetColorArray

func (o ScImmutableMap) GetColorArray(key MapKey) ScImmutableColorArray

func (ScImmutableMap) GetHash

func (o ScImmutableMap) GetHash(key MapKey) ScImmutableHash

func (ScImmutableMap) GetHashArray

func (o ScImmutableMap) GetHashArray(key MapKey) ScImmutableHashArray

func (ScImmutableMap) GetHname

func (o ScImmutableMap) GetHname(key MapKey) ScImmutableHname

func (ScImmutableMap) GetHnameArray

func (o ScImmutableMap) GetHnameArray(key MapKey) ScImmutableHnameArray

func (ScImmutableMap) GetInt16

func (o ScImmutableMap) GetInt16(key MapKey) ScImmutableInt16

func (ScImmutableMap) GetInt16Array

func (o ScImmutableMap) GetInt16Array(key MapKey) ScImmutableInt16Array

func (ScImmutableMap) GetInt32

func (o ScImmutableMap) GetInt32(key MapKey) ScImmutableInt32

func (ScImmutableMap) GetInt32Array

func (o ScImmutableMap) GetInt32Array(key MapKey) ScImmutableInt32Array

func (ScImmutableMap) GetInt64

func (o ScImmutableMap) GetInt64(key MapKey) ScImmutableInt64

func (ScImmutableMap) GetInt64Array

func (o ScImmutableMap) GetInt64Array(key MapKey) ScImmutableInt64Array

func (ScImmutableMap) GetMap

func (o ScImmutableMap) GetMap(key MapKey) ScImmutableMap

func (ScImmutableMap) GetMapArray

func (o ScImmutableMap) GetMapArray(key MapKey) ScImmutableMapArray

func (ScImmutableMap) GetRequestID

func (o ScImmutableMap) GetRequestID(key MapKey) ScImmutableRequestID

func (ScImmutableMap) GetRequestIDArray

func (o ScImmutableMap) GetRequestIDArray(key MapKey) ScImmutableRequestIDArray

func (ScImmutableMap) GetString

func (o ScImmutableMap) GetString(key MapKey) ScImmutableString

func (ScImmutableMap) GetStringArray

func (o ScImmutableMap) GetStringArray(key MapKey) ScImmutableStringArray

func (ScImmutableMap) MapID

func (o ScImmutableMap) MapID() int32

type ScImmutableMapArray

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

func (ScImmutableMapArray) GetMap

func (o ScImmutableMapArray) GetMap(index int32) ScImmutableMap

func (ScImmutableMapArray) Length

func (o ScImmutableMapArray) Length() int32

type ScImmutableRequestID

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

func NewScImmutableRequestID

func NewScImmutableRequestID(objID int32, keyID Key32) ScImmutableRequestID

func (ScImmutableRequestID) Exists

func (o ScImmutableRequestID) Exists() bool

func (ScImmutableRequestID) String

func (o ScImmutableRequestID) String() string

func (ScImmutableRequestID) Value

type ScImmutableRequestIDArray

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

func (ScImmutableRequestIDArray) GetRequestID

func (ScImmutableRequestIDArray) Length

func (o ScImmutableRequestIDArray) Length() int32

type ScImmutableString

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

func NewScImmutableString

func NewScImmutableString(objID int32, keyID Key32) ScImmutableString

func (ScImmutableString) Exists

func (o ScImmutableString) Exists() bool

func (ScImmutableString) String

func (o ScImmutableString) String() string

func (ScImmutableString) Value

func (o ScImmutableString) Value() string

type ScImmutableStringArray

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

func (ScImmutableStringArray) GetString

func (o ScImmutableStringArray) GetString(index int32) ScImmutableString

func (ScImmutableStringArray) Length

func (o ScImmutableStringArray) Length() int32

type ScInitFunc

type ScInitFunc struct {
	ScView
	// contains filtered or unexported fields
}

func NewScInitFunc

func NewScInitFunc(ctx ScFuncCallContext, hContract, hFunction ScHname, keys []Key, indexes []Key32) *ScInitFunc

func (*ScInitFunc) Call

func (f *ScInitFunc) Call()

func (*ScInitFunc) OfContract

func (f *ScInitFunc) OfContract(hContract ScHname) *ScInitFunc

func (*ScInitFunc) Params

func (f *ScInitFunc) Params() []interface{}

type ScMutableAddress

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

func NewScMutableAddress

func NewScMutableAddress(objID int32, keyID Key32) ScMutableAddress

func (ScMutableAddress) Exists

func (o ScMutableAddress) Exists() bool

func (ScMutableAddress) SetValue

func (o ScMutableAddress) SetValue(value ScAddress)

func (ScMutableAddress) String

func (o ScMutableAddress) String() string

func (ScMutableAddress) Value

func (o ScMutableAddress) Value() ScAddress

type ScMutableAddressArray

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

func (ScMutableAddressArray) Clear

func (o ScMutableAddressArray) Clear()

func (ScMutableAddressArray) GetAddress

func (o ScMutableAddressArray) GetAddress(index int32) ScMutableAddress

func (ScMutableAddressArray) Immutable

func (ScMutableAddressArray) Length

func (o ScMutableAddressArray) Length() int32

type ScMutableAgentID

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

func NewScMutableAgentID

func NewScMutableAgentID(objID int32, keyID Key32) ScMutableAgentID

func (ScMutableAgentID) Exists

func (o ScMutableAgentID) Exists() bool

func (ScMutableAgentID) SetValue

func (o ScMutableAgentID) SetValue(value ScAgentID)

func (ScMutableAgentID) String

func (o ScMutableAgentID) String() string

func (ScMutableAgentID) Value

func (o ScMutableAgentID) Value() ScAgentID

type ScMutableAgentIDArray

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

func (ScMutableAgentIDArray) Clear

func (o ScMutableAgentIDArray) Clear()

func (ScMutableAgentIDArray) GetAgentID

func (o ScMutableAgentIDArray) GetAgentID(index int32) ScMutableAgentID

func (ScMutableAgentIDArray) Immutable

func (ScMutableAgentIDArray) Length

func (o ScMutableAgentIDArray) Length() int32

type ScMutableBytes

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

func NewScMutableBytes

func NewScMutableBytes(objID int32, keyID Key32) ScMutableBytes

func (ScMutableBytes) Exists

func (o ScMutableBytes) Exists() bool

func (ScMutableBytes) SetValue

func (o ScMutableBytes) SetValue(value []byte)

func (ScMutableBytes) String

func (o ScMutableBytes) String() string

func (ScMutableBytes) Value

func (o ScMutableBytes) Value() []byte

type ScMutableBytesArray

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

func (ScMutableBytesArray) Clear

func (o ScMutableBytesArray) Clear()

func (ScMutableBytesArray) GetBytes

func (o ScMutableBytesArray) GetBytes(index int32) ScMutableBytes

func (ScMutableBytesArray) Immutable

func (ScMutableBytesArray) Length

func (o ScMutableBytesArray) Length() int32

type ScMutableChainID

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

func NewScMutableChainID

func NewScMutableChainID(objID int32, keyID Key32) ScMutableChainID

func (ScMutableChainID) Exists

func (o ScMutableChainID) Exists() bool

func (ScMutableChainID) SetValue

func (o ScMutableChainID) SetValue(value ScChainID)

func (ScMutableChainID) String

func (o ScMutableChainID) String() string

func (ScMutableChainID) Value

func (o ScMutableChainID) Value() ScChainID

type ScMutableChainIDArray

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

func (ScMutableChainIDArray) Clear

func (o ScMutableChainIDArray) Clear()

func (ScMutableChainIDArray) GetChainID

func (o ScMutableChainIDArray) GetChainID(index int32) ScMutableChainID

func (ScMutableChainIDArray) Immutable

func (ScMutableChainIDArray) Length

func (o ScMutableChainIDArray) Length() int32

type ScMutableColor

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

func NewScMutableColor

func NewScMutableColor(objID int32, keyID Key32) ScMutableColor

func (ScMutableColor) Exists

func (o ScMutableColor) Exists() bool

func (ScMutableColor) SetValue

func (o ScMutableColor) SetValue(value ScColor)

func (ScMutableColor) String

func (o ScMutableColor) String() string

func (ScMutableColor) Value

func (o ScMutableColor) Value() ScColor

type ScMutableColorArray

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

func (ScMutableColorArray) Clear

func (o ScMutableColorArray) Clear()

func (ScMutableColorArray) GetColor

func (o ScMutableColorArray) GetColor(index int32) ScMutableColor

func (ScMutableColorArray) Immutable

func (ScMutableColorArray) Length

func (o ScMutableColorArray) Length() int32

type ScMutableHash

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

func NewScMutableHash

func NewScMutableHash(objID int32, keyID Key32) ScMutableHash

func (ScMutableHash) Exists

func (o ScMutableHash) Exists() bool

func (ScMutableHash) SetValue

func (o ScMutableHash) SetValue(value ScHash)

func (ScMutableHash) String

func (o ScMutableHash) String() string

func (ScMutableHash) Value

func (o ScMutableHash) Value() ScHash

type ScMutableHashArray

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

func (ScMutableHashArray) Clear

func (o ScMutableHashArray) Clear()

func (ScMutableHashArray) GetHash

func (o ScMutableHashArray) GetHash(index int32) ScMutableHash

func (ScMutableHashArray) Immutable

func (ScMutableHashArray) Length

func (o ScMutableHashArray) Length() int32

type ScMutableHname

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

func NewScMutableHname

func NewScMutableHname(objID int32, keyID Key32) ScMutableHname

func (ScMutableHname) Exists

func (o ScMutableHname) Exists() bool

func (ScMutableHname) SetValue

func (o ScMutableHname) SetValue(value ScHname)

func (ScMutableHname) String

func (o ScMutableHname) String() string

func (ScMutableHname) Value

func (o ScMutableHname) Value() ScHname

type ScMutableHnameArray

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

func (ScMutableHnameArray) Clear

func (o ScMutableHnameArray) Clear()

func (ScMutableHnameArray) GetHname

func (o ScMutableHnameArray) GetHname(index int32) ScMutableHname

func (ScMutableHnameArray) Immutable

func (ScMutableHnameArray) Length

func (o ScMutableHnameArray) Length() int32

type ScMutableInt16

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

func NewScMutableInt16

func NewScMutableInt16(objID int32, keyID Key32) ScMutableInt16

func (ScMutableInt16) Exists

func (o ScMutableInt16) Exists() bool

func (ScMutableInt16) SetValue

func (o ScMutableInt16) SetValue(value int16)

func (ScMutableInt16) String

func (o ScMutableInt16) String() string

func (ScMutableInt16) Value

func (o ScMutableInt16) Value() int16

type ScMutableInt16Array

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

func (ScMutableInt16Array) Clear

func (o ScMutableInt16Array) Clear()

func (ScMutableInt16Array) GetInt16

func (o ScMutableInt16Array) GetInt16(index int32) ScMutableInt16

func (ScMutableInt16Array) Immutable

func (ScMutableInt16Array) Length

func (o ScMutableInt16Array) Length() int32

type ScMutableInt32

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

func NewScMutableInt32

func NewScMutableInt32(objID int32, keyID Key32) ScMutableInt32

func (ScMutableInt32) Exists

func (o ScMutableInt32) Exists() bool

func (ScMutableInt32) SetValue

func (o ScMutableInt32) SetValue(value int32)

func (ScMutableInt32) String

func (o ScMutableInt32) String() string

func (ScMutableInt32) Value

func (o ScMutableInt32) Value() int32

type ScMutableInt32Array

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

func (ScMutableInt32Array) Clear

func (o ScMutableInt32Array) Clear()

func (ScMutableInt32Array) GetInt32

func (o ScMutableInt32Array) GetInt32(index int32) ScMutableInt32

func (ScMutableInt32Array) Immutable

func (ScMutableInt32Array) Length

func (o ScMutableInt32Array) Length() int32

type ScMutableInt64

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

func NewScMutableInt64

func NewScMutableInt64(objID int32, keyID Key32) ScMutableInt64

func (ScMutableInt64) Exists

func (o ScMutableInt64) Exists() bool

func (ScMutableInt64) SetValue

func (o ScMutableInt64) SetValue(value int64)

func (ScMutableInt64) String

func (o ScMutableInt64) String() string

func (ScMutableInt64) Value

func (o ScMutableInt64) Value() int64

type ScMutableInt64Array

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

func (ScMutableInt64Array) Clear

func (o ScMutableInt64Array) Clear()

func (ScMutableInt64Array) GetInt64

func (o ScMutableInt64Array) GetInt64(index int32) ScMutableInt64

func (ScMutableInt64Array) Immutable

func (ScMutableInt64Array) Length

func (o ScMutableInt64Array) Length() int32

type ScMutableMap

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

func NewScMutableMap

func NewScMutableMap() *ScMutableMap

func (ScMutableMap) CallFunc

func (o ScMutableMap) CallFunc(keyID Key32, params []byte) []byte

func (ScMutableMap) Clear

func (o ScMutableMap) Clear()

func (ScMutableMap) GetAddress

func (o ScMutableMap) GetAddress(key MapKey) ScMutableAddress

func (ScMutableMap) GetAddressArray

func (o ScMutableMap) GetAddressArray(key MapKey) ScMutableAddressArray

func (ScMutableMap) GetAgentID

func (o ScMutableMap) GetAgentID(key MapKey) ScMutableAgentID

func (ScMutableMap) GetAgentIDArray

func (o ScMutableMap) GetAgentIDArray(key MapKey) ScMutableAgentIDArray

func (ScMutableMap) GetBytes

func (o ScMutableMap) GetBytes(key MapKey) ScMutableBytes

func (ScMutableMap) GetBytesArray

func (o ScMutableMap) GetBytesArray(key MapKey) ScMutableBytesArray

func (ScMutableMap) GetChainID

func (o ScMutableMap) GetChainID(key MapKey) ScMutableChainID

func (ScMutableMap) GetChainIDArray

func (o ScMutableMap) GetChainIDArray(key MapKey) ScMutableChainIDArray

func (ScMutableMap) GetColor

func (o ScMutableMap) GetColor(key MapKey) ScMutableColor

func (ScMutableMap) GetColorArray

func (o ScMutableMap) GetColorArray(key MapKey) ScMutableColorArray

func (ScMutableMap) GetHash

func (o ScMutableMap) GetHash(key MapKey) ScMutableHash

func (ScMutableMap) GetHashArray

func (o ScMutableMap) GetHashArray(key MapKey) ScMutableHashArray

func (ScMutableMap) GetHname

func (o ScMutableMap) GetHname(key MapKey) ScMutableHname

func (ScMutableMap) GetHnameArray

func (o ScMutableMap) GetHnameArray(key MapKey) ScMutableHnameArray

func (ScMutableMap) GetInt16

func (o ScMutableMap) GetInt16(key MapKey) ScMutableInt16

func (ScMutableMap) GetInt16Array

func (o ScMutableMap) GetInt16Array(key MapKey) ScMutableInt16Array

func (ScMutableMap) GetInt32

func (o ScMutableMap) GetInt32(key MapKey) ScMutableInt32

func (ScMutableMap) GetInt32Array

func (o ScMutableMap) GetInt32Array(key MapKey) ScMutableInt32Array

func (ScMutableMap) GetInt64

func (o ScMutableMap) GetInt64(key MapKey) ScMutableInt64

func (ScMutableMap) GetInt64Array

func (o ScMutableMap) GetInt64Array(key MapKey) ScMutableInt64Array

func (ScMutableMap) GetMap

func (o ScMutableMap) GetMap(key MapKey) ScMutableMap

func (ScMutableMap) GetMapArray

func (o ScMutableMap) GetMapArray(key MapKey) ScMutableMapArray

func (ScMutableMap) GetRequestID

func (o ScMutableMap) GetRequestID(key MapKey) ScMutableRequestID

func (ScMutableMap) GetRequestIDArray

func (o ScMutableMap) GetRequestIDArray(key MapKey) ScMutableRequestIDArray

func (ScMutableMap) GetString

func (o ScMutableMap) GetString(key MapKey) ScMutableString

func (ScMutableMap) GetStringArray

func (o ScMutableMap) GetStringArray(key MapKey) ScMutableStringArray

func (ScMutableMap) Immutable

func (o ScMutableMap) Immutable() ScImmutableMap

func (ScMutableMap) MapID

func (o ScMutableMap) MapID() int32

type ScMutableMapArray

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

func (ScMutableMapArray) Clear

func (o ScMutableMapArray) Clear()

func (ScMutableMapArray) GetMap

func (o ScMutableMapArray) GetMap(index int32) ScMutableMap

func (ScMutableMapArray) Immutable

func (o ScMutableMapArray) Immutable() ScImmutableMapArray

func (ScMutableMapArray) Length

func (o ScMutableMapArray) Length() int32

type ScMutableRequestID

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

func NewScMutableRequestID

func NewScMutableRequestID(objID int32, keyID Key32) ScMutableRequestID

func (ScMutableRequestID) Exists

func (o ScMutableRequestID) Exists() bool

func (ScMutableRequestID) SetValue

func (o ScMutableRequestID) SetValue(value ScRequestID)

func (ScMutableRequestID) String

func (o ScMutableRequestID) String() string

func (ScMutableRequestID) Value

func (o ScMutableRequestID) Value() ScRequestID

type ScMutableRequestIDArray

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

func (ScMutableRequestIDArray) Clear

func (o ScMutableRequestIDArray) Clear()

func (ScMutableRequestIDArray) GetRequestID

func (o ScMutableRequestIDArray) GetRequestID(index int32) ScMutableRequestID

func (ScMutableRequestIDArray) Immutable

func (ScMutableRequestIDArray) Length

func (o ScMutableRequestIDArray) Length() int32

type ScMutableString

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

func NewScMutableString

func NewScMutableString(objID int32, keyID Key32) ScMutableString

func (ScMutableString) Exists

func (o ScMutableString) Exists() bool

func (ScMutableString) SetValue

func (o ScMutableString) SetValue(value string)

func (ScMutableString) String

func (o ScMutableString) String() string

func (ScMutableString) Value

func (o ScMutableString) Value() string

type ScMutableStringArray

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

func (ScMutableStringArray) Clear

func (o ScMutableStringArray) Clear()

func (ScMutableStringArray) GetString

func (o ScMutableStringArray) GetString(index int32) ScMutableString

func (ScMutableStringArray) Immutable

func (ScMutableStringArray) Length

func (o ScMutableStringArray) Length() int32

type ScRequestID

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

func NewScRequestIDFromBytes

func NewScRequestIDFromBytes(bytes []byte) ScRequestID

func (ScRequestID) Bytes

func (o ScRequestID) Bytes() []byte

func (ScRequestID) KeyID

func (o ScRequestID) KeyID() Key32

func (ScRequestID) String

func (o ScRequestID) String() string

type ScTransfers

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

func NewScTransfer

func NewScTransfer(color ScColor, amount int64) ScTransfers

special constructor for simplifying single transfers

func NewScTransferIotas

func NewScTransferIotas(amount int64) ScTransfers

special constructor for simplifying iota transfers

func NewScTransfers

func NewScTransfers() ScTransfers

func NewScTransfersFromBalances

func NewScTransfersFromBalances(balances ScBalances) ScTransfers

func NoScTransfers

func NoScTransfers() ScTransfers

func (ScTransfers) Set

func (ctx ScTransfers) Set(color ScColor, amount int64)

transfers the specified amount of tokens of the specified color

type ScUtility

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

func (ScUtility) Base58Decode

func (ctx ScUtility) Base58Decode(value string) []byte

decodes the specified base58-encoded string value to its original bytes

func (ScUtility) Base58Encode

func (ctx ScUtility) Base58Encode(value []byte) string

encodes the specified bytes to a base-58-encoded string

func (ScUtility) BlsAddressFromPubKey

func (ctx ScUtility) BlsAddressFromPubKey(pubKey []byte) ScAddress

func (ScUtility) BlsAggregateSignatures

func (ctx ScUtility) BlsAggregateSignatures(pubKeys, sigs [][]byte) ([]byte, []byte)

func (ScUtility) BlsValidSignature

func (ctx ScUtility) BlsValidSignature(data, pubKey, signature []byte) bool

func (ScUtility) Ed25519AddressFromPubKey

func (ctx ScUtility) Ed25519AddressFromPubKey(pubKey []byte) ScAddress

func (ScUtility) Ed25519ValidSignature

func (ctx ScUtility) Ed25519ValidSignature(data, pubKey, signature []byte) bool

func (ScUtility) HashBlake2b

func (ctx ScUtility) HashBlake2b(value []byte) ScHash

hashes the specified value bytes using blake2b hashing and returns the resulting 32-byte hash

func (ScUtility) HashSha3

func (ctx ScUtility) HashSha3(value []byte) ScHash

hashes the specified value bytes using sha3 hashing and returns the resulting 32-byte hash

func (ScUtility) Hname

func (ctx ScUtility) Hname(value string) ScHname

hashes the specified value bytes using blake2b hashing and returns the resulting 32-byte hash

func (ScUtility) Random

func (ctx ScUtility) Random(max int64) int64

generates a random value from 0 to max (exclusive max) using a deterministic RNG

func (ScUtility) String

func (ctx ScUtility) String(value int64) string

converts an integer to its string representation

type ScView

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

func NewScView

func NewScView(ctx ScViewCallContext, hContract, hFunction ScHname) *ScView

func (*ScView) Call

func (v *ScView) Call()

func (*ScView) OfContract

func (v *ScView) OfContract(hContract ScHname) *ScView

func (*ScView) SetPtrs

func (v *ScView) SetPtrs(paramsID, resultsID *int32)

type ScViewCallContext

type ScViewCallContext interface {
	InitViewCallContext()
}

type ScViewContext

type ScViewContext struct {
	ScBaseContext
}

smart contract interface with immutable access to state

func (ScViewContext) Call

func (ctx ScViewContext) Call(contract, function ScHname, params *ScMutableMap) ScImmutableMap

calls a smart contract function

func (ScViewContext) CallSelf

func (ctx ScViewContext) CallSelf(function ScHname, params *ScMutableMap) ScImmutableMap

calls a smart contract function on the current contract

func (ScViewContext) InitViewCallContext

func (ctx ScViewContext) InitViewCallContext()

func (ScViewContext) State

func (ctx ScViewContext) State() ScImmutableMap

access to immutable state storage

Directories

Path Synopsis
corecontracts

Jump to

Keyboard shortcuts

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