wasmtypes

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Copyright 2020 IOTA Stiftung SPDX-License-Identifier: Apache-2.0

Copyright 2020 IOTA Stiftung SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	ScAddressAlias   byte = 8
	ScAddressEd25519 byte = 0
	ScAddressNFT     byte = 16
	ScAddressEth     byte = 32

	ScLengthAlias   = 33
	ScLengthEd25519 = 33
	ScLengthNFT     = 33
	ScLengthEth     = 20

	ScAddressLength = ScLengthEd25519
)
View Source
const (
	ScAgentIDNil      byte = 0
	ScAgentIDAddress  byte = 1
	ScAgentIDContract byte = 2
	ScAgentIDEthereum byte = 3
)
View Source
const (
	ScBoolLength = 1
	ScBoolFalse  = 0x00
	ScBoolTrue   = 0x01
)
View Source
const ScChainIDLength = 32
View Source
const ScHashLength = 32
View Source
const ScHnameLength = 4
View Source
const ScInt16Length = 2
View Source
const ScInt32Length = 4
View Source
const ScInt64Length = 8
View Source
const ScInt8Length = 1
View Source
const ScNftIDLength = 32
View Source
const (
	ScRequestIDLength = 34
)
View Source
const ScTokenIDLength = 38
View Source
const ScUint16Length = 2
View Source
const ScUint32Length = 4
View Source
const ScUint64Length = 8
View Source
const ScUint8Length = 1

Variables

View Source
var (
	Bech32Decode func(bech32 string) ScAddress
	Bech32Encode func(addr ScAddress) string
	HashKeccak   func(buf []byte) ScHash
	HashName     func(name string) ScHname
	HexDecode    func(hex string) []byte
	HexEncode    func(buf []byte) string
)

sandbox function wrappers for simplified use by hashtypes

Functions

func AddressEncode

func AddressEncode(enc *WasmEncoder, value ScAddress)

func AddressToBytes

func AddressToBytes(value ScAddress) []byte

func AddressToString

func AddressToString(value ScAddress) string

func AgentIDEncode

func AgentIDEncode(enc *WasmEncoder, value ScAgentID)

func AgentIDToBytes

func AgentIDToBytes(value ScAgentID) []byte

func AgentIDToString

func AgentIDToString(value ScAgentID) string

func BigIntEncode added in v0.3.0

func BigIntEncode(enc *WasmEncoder, value ScBigInt)

func BigIntToBytes added in v0.3.0

func BigIntToBytes(value ScBigInt) []byte

func BigIntToString added in v0.3.0

func BigIntToString(value ScBigInt) string

func BoolDecode

func BoolDecode(dec *WasmDecoder) bool

func BoolEncode

func BoolEncode(enc *WasmEncoder, value bool)

func BoolFromBytes

func BoolFromBytes(buf []byte) bool

func BoolFromString added in v0.3.0

func BoolFromString(value string) bool

func BoolToBytes

func BoolToBytes(value bool) []byte

func BoolToString

func BoolToString(value bool) string

func BytesDecode

func BytesDecode(dec *WasmDecoder) []byte

func BytesEncode

func BytesEncode(enc *WasmEncoder, value []byte)

func BytesFromBytes

func BytesFromBytes(buf []byte) []byte

func BytesFromString added in v0.3.0

func BytesFromString(value string) []byte

func BytesToBytes

func BytesToBytes(value []byte) []byte

func BytesToString

func BytesToString(value []byte) string

func ChainIDEncode

func ChainIDEncode(enc *WasmEncoder, value ScChainID)

func ChainIDToBytes

func ChainIDToBytes(value ScChainID) []byte

func ChainIDToString

func ChainIDToString(value ScChainID) string

func HashEncode

func HashEncode(enc *WasmEncoder, value ScHash)

func HashToBytes

func HashToBytes(value ScHash) []byte

func HashToString

func HashToString(value ScHash) string

func HnameEncode

func HnameEncode(enc *WasmEncoder, value ScHname)

func HnameToBytes

func HnameToBytes(value ScHname) []byte

func HnameToString

func HnameToString(value ScHname) string

func Int16Decode

func Int16Decode(dec *WasmDecoder) int16

func Int16Encode

func Int16Encode(enc *WasmEncoder, value int16)

func Int16FromBytes

func Int16FromBytes(buf []byte) int16

func Int16FromString added in v0.3.0

func Int16FromString(value string) int16

func Int16ToBytes

func Int16ToBytes(value int16) []byte

func Int16ToString

func Int16ToString(value int16) string

func Int32Decode

func Int32Decode(dec *WasmDecoder) int32

func Int32Encode

func Int32Encode(enc *WasmEncoder, value int32)

func Int32FromBytes

func Int32FromBytes(buf []byte) int32

func Int32FromString added in v0.3.0

func Int32FromString(value string) int32

func Int32ToBytes

func Int32ToBytes(value int32) []byte

func Int32ToString

func Int32ToString(value int32) string

func Int64Decode

func Int64Decode(dec *WasmDecoder) int64

func Int64Encode

func Int64Encode(enc *WasmEncoder, value int64)

func Int64FromBytes

func Int64FromBytes(buf []byte) int64

func Int64FromString added in v0.3.0

func Int64FromString(value string) int64

func Int64ToBytes

func Int64ToBytes(value int64) []byte

func Int64ToString

func Int64ToString(value int64) string

func Int8Decode

func Int8Decode(dec *WasmDecoder) int8

func Int8Encode

func Int8Encode(enc *WasmEncoder, value int8)

func Int8FromBytes

func Int8FromBytes(buf []byte) int8

func Int8FromString added in v0.3.0

func Int8FromString(value string) int8

func Int8ToBytes

func Int8ToBytes(value int8) []byte

func Int8ToString

func Int8ToString(value int8) string

func IntFromString added in v0.3.0

func IntFromString(value string, bits int) int64

func NftIDEncode added in v0.3.0

func NftIDEncode(enc *WasmEncoder, value ScNftID)

func NftIDToBytes added in v0.3.0

func NftIDToBytes(value ScNftID) []byte

func NftIDToString added in v0.3.0

func NftIDToString(value ScNftID) string

func RequestIDEncode

func RequestIDEncode(enc *WasmEncoder, value ScRequestID)

func RequestIDToBytes

func RequestIDToBytes(value ScRequestID) []byte

func RequestIDToString

func RequestIDToString(value ScRequestID) string

func StringDecode

func StringDecode(dec *WasmDecoder) string

func StringEncode

func StringEncode(enc *WasmEncoder, value string)

func StringFromBytes

func StringFromBytes(buf []byte) string

func StringFromString added in v0.3.0

func StringFromString(value string) string

func StringToBytes

func StringToBytes(value string) []byte

func StringToString

func StringToString(value string) string

func TokenIDEncode added in v0.3.0

func TokenIDEncode(enc *WasmEncoder, value ScTokenID)

func TokenIDToBytes added in v0.3.0

func TokenIDToBytes(value ScTokenID) []byte

func TokenIDToString added in v0.3.0

func TokenIDToString(value ScTokenID) string

func Uint16Decode

func Uint16Decode(dec *WasmDecoder) uint16

func Uint16Encode

func Uint16Encode(enc *WasmEncoder, value uint16)

func Uint16FromBytes

func Uint16FromBytes(buf []byte) uint16

func Uint16FromString added in v0.3.0

func Uint16FromString(value string) uint16

func Uint16ToBytes

func Uint16ToBytes(value uint16) []byte

func Uint16ToString

func Uint16ToString(value uint16) string

func Uint32Decode

func Uint32Decode(dec *WasmDecoder) uint32

func Uint32Encode

func Uint32Encode(enc *WasmEncoder, value uint32)

func Uint32FromBytes

func Uint32FromBytes(buf []byte) uint32

func Uint32FromString added in v0.3.0

func Uint32FromString(value string) uint32

func Uint32ToBytes

func Uint32ToBytes(value uint32) []byte

func Uint32ToString

func Uint32ToString(value uint32) string

func Uint64Decode

func Uint64Decode(dec *WasmDecoder) uint64

func Uint64Encode

func Uint64Encode(enc *WasmEncoder, value uint64)

func Uint64FromBytes

func Uint64FromBytes(buf []byte) uint64

func Uint64FromString added in v0.3.0

func Uint64FromString(value string) uint64

func Uint64ToBytes

func Uint64ToBytes(value uint64) []byte

func Uint64ToString

func Uint64ToString(value uint64) string

func Uint8Decode

func Uint8Decode(dec *WasmDecoder) uint8

func Uint8Encode

func Uint8Encode(enc *WasmEncoder, value uint8)

func Uint8FromBytes

func Uint8FromBytes(buf []byte) uint8

func Uint8FromString added in v0.3.0

func Uint8FromString(value string) uint8

func Uint8ToBytes

func Uint8ToBytes(value uint8) []byte

func Uint8ToString

func Uint8ToString(value uint8) string

func UintFromString added in v0.3.0

func UintFromString(value string, bits int) uint64

Types

type IKvStore

type IKvStore interface {
	Bytes() []byte
	Delete(key []byte)
	Exists(key []byte) bool
	Get(key []byte) []byte
	Set(key, value []byte)
}

type Proxy

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

func NewProxy

func NewProxy(kvStore IKvStore) Proxy

func (Proxy) Append

func (p Proxy) Append() Proxy

Append returns a Proxy for a newly appended null element Note that this will essentially return the element at Length()

func (Proxy) Bytes added in v1.0.3

func (p Proxy) Bytes() []byte

func (Proxy) ClearArray

func (p Proxy) ClearArray()

ClearArray clears an array by deleting all elements TODO Note that this does not delete recursive container elements

func (Proxy) ClearMap

func (p Proxy) ClearMap()

ClearMap clears a map by deleting all elements TODO Note that this does not delete recursive container elements

func (Proxy) Delete

func (p Proxy) Delete()

func (Proxy) Exists

func (p Proxy) Exists() bool

func (Proxy) Get

func (p Proxy) Get() []byte

func (Proxy) Index

func (p Proxy) Index(index uint32) Proxy

Index gets a Proxy for an element of an Array by its index

func (Proxy) Key

func (p Proxy) Key(key []byte) Proxy

Key gets a Proxy for an element of a Map by its key

func (Proxy) Length

func (p Proxy) Length() uint32

Length returns the number of elements in an Array Never try to access an index >= Length()

func (Proxy) Root

func (p Proxy) Root(key string) Proxy

Root returns a Proxy for an element of a root container (Params/Results/State). The key is always a string.

func (Proxy) Set

func (p Proxy) Set(value []byte)

type ScAddress

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

func AddressDecode

func AddressDecode(dec *WasmDecoder) ScAddress

func AddressFromBytes

func AddressFromBytes(buf []byte) ScAddress

func AddressFromString added in v0.3.0

func AddressFromString(value string) ScAddress

func (ScAddress) AsAgentID

func (o ScAddress) AsAgentID() ScAgentID

func (ScAddress) Bytes

func (o ScAddress) Bytes() []byte

func (ScAddress) String

func (o ScAddress) String() string

type ScAgentID

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

func AgentIDDecode

func AgentIDDecode(dec *WasmDecoder) ScAgentID

func AgentIDFromBytes

func AgentIDFromBytes(buf []byte) (a ScAgentID)

func AgentIDFromString added in v0.3.0

func AgentIDFromString(value string) ScAgentID

func NewScAgentID

func NewScAgentID(address ScAddress, hname ScHname) ScAgentID

func ScAgentIDForEthereum added in v1.0.3

func ScAgentIDForEthereum(chainAddress ScAddress, ethAddress ScAddress) ScAgentID

func ScAgentIDFromAddress added in v1.0.3

func ScAgentIDFromAddress(address ScAddress) ScAgentID

func (ScAgentID) Address

func (o ScAgentID) Address() ScAddress

func (ScAgentID) Bytes

func (o ScAgentID) Bytes() []byte

func (ScAgentID) EthAddress added in v1.0.3

func (o ScAgentID) EthAddress() ScAddress

func (ScAgentID) Hname

func (o ScAgentID) Hname() ScHname

func (ScAgentID) IsAddress

func (o ScAgentID) IsAddress() bool

func (ScAgentID) IsContract added in v0.3.0

func (o ScAgentID) IsContract() bool

func (ScAgentID) String

func (o ScAgentID) String() string

type ScBigInt added in v0.3.0

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

func BigIntDecode added in v0.3.0

func BigIntDecode(dec *WasmDecoder) ScBigInt

func BigIntFromBytes added in v0.3.0

func BigIntFromBytes(buf []byte) ScBigInt

func BigIntFromString added in v0.3.0

func BigIntFromString(value string) ScBigInt

func NewScBigInt added in v0.3.0

func NewScBigInt(value ...uint64) ScBigInt

func (ScBigInt) Add added in v0.3.0

func (o ScBigInt) Add(rhs ScBigInt) ScBigInt

func (ScBigInt) Bytes added in v0.3.0

func (o ScBigInt) Bytes() []byte

func (ScBigInt) Cmp added in v0.3.0

func (o ScBigInt) Cmp(rhs ScBigInt) int

func (ScBigInt) Div added in v0.3.0

func (o ScBigInt) Div(rhs ScBigInt) ScBigInt

func (ScBigInt) DivMod added in v0.3.0

func (o ScBigInt) DivMod(rhs ScBigInt) (ScBigInt, ScBigInt)

func (ScBigInt) IsUint64 added in v0.3.0

func (o ScBigInt) IsUint64() bool

func (ScBigInt) IsZero added in v0.3.0

func (o ScBigInt) IsZero() bool

func (ScBigInt) Modulo added in v0.3.0

func (o ScBigInt) Modulo(rhs ScBigInt) ScBigInt

func (ScBigInt) Mul added in v0.3.0

func (o ScBigInt) Mul(rhs ScBigInt) ScBigInt

func (ScBigInt) Shl added in v0.3.0

func (o ScBigInt) Shl(shift uint32) ScBigInt

func (ScBigInt) Shr added in v0.3.0

func (o ScBigInt) Shr(shift uint32) ScBigInt

func (ScBigInt) String added in v0.3.0

func (o ScBigInt) String() string

func (ScBigInt) Sub added in v0.3.0

func (o ScBigInt) Sub(rhs ScBigInt) ScBigInt

func (ScBigInt) Uint64 added in v0.3.0

func (o ScBigInt) Uint64() uint64

type ScChainID

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

func ChainIDDecode

func ChainIDDecode(dec *WasmDecoder) ScChainID

func ChainIDFromBytes

func ChainIDFromBytes(buf []byte) ScChainID

func ChainIDFromString added in v0.3.0

func ChainIDFromString(value string) ScChainID

func (ScChainID) Address

func (o ScChainID) Address() ScAddress

Address returns the alias address that the chain ID actually represents

func (ScChainID) Bytes

func (o ScChainID) Bytes() []byte

func (ScChainID) String

func (o ScChainID) String() string

type ScHash

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

func HashDecode

func HashDecode(dec *WasmDecoder) ScHash

func HashFromBytes

func HashFromBytes(buf []byte) ScHash

func HashFromString added in v0.3.0

func HashFromString(value string) ScHash

func (ScHash) Bytes

func (o ScHash) Bytes() []byte

func (ScHash) String

func (o ScHash) String() string

type ScHname

type ScHname uint32

func HnameDecode

func HnameDecode(dec *WasmDecoder) ScHname

func HnameFromBytes

func HnameFromBytes(buf []byte) ScHname

func HnameFromString added in v0.3.0

func HnameFromString(value string) ScHname

func NewScHname

func NewScHname(name string) ScHname

func (ScHname) Bytes

func (o ScHname) Bytes() []byte

func (ScHname) String

func (o ScHname) String() string

type ScImmutableAddress

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

func NewScImmutableAddress

func NewScImmutableAddress(proxy Proxy) 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 ScImmutableAgentID

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

func NewScImmutableAgentID

func NewScImmutableAgentID(proxy Proxy) 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 ScImmutableBigInt added in v0.3.0

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

func NewScImmutableBigInt added in v0.3.0

func NewScImmutableBigInt(proxy Proxy) ScImmutableBigInt

func (ScImmutableBigInt) Exists added in v0.3.0

func (o ScImmutableBigInt) Exists() bool

func (ScImmutableBigInt) String added in v0.3.0

func (o ScImmutableBigInt) String() string

func (ScImmutableBigInt) Value added in v0.3.0

func (o ScImmutableBigInt) Value() ScBigInt

type ScImmutableBool

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

func NewScImmutableBool

func NewScImmutableBool(proxy Proxy) ScImmutableBool

func (ScImmutableBool) Exists

func (o ScImmutableBool) Exists() bool

func (ScImmutableBool) String

func (o ScImmutableBool) String() string

func (ScImmutableBool) Value

func (o ScImmutableBool) Value() bool

type ScImmutableBytes

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

func NewScImmutableBytes

func NewScImmutableBytes(proxy Proxy) 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 ScImmutableChainID

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

func NewScImmutableChainID

func NewScImmutableChainID(proxy Proxy) 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 ScImmutableHash

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

func NewScImmutableHash

func NewScImmutableHash(proxy Proxy) 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 ScImmutableHname

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

func NewScImmutableHname

func NewScImmutableHname(proxy Proxy) 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 ScImmutableInt16

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

func NewScImmutableInt16

func NewScImmutableInt16(proxy Proxy) 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 ScImmutableInt32

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

func NewScImmutableInt32

func NewScImmutableInt32(proxy Proxy) 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 ScImmutableInt64

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

func NewScImmutableInt64

func NewScImmutableInt64(proxy Proxy) 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 ScImmutableInt8

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

func NewScImmutableInt8

func NewScImmutableInt8(proxy Proxy) ScImmutableInt8

func (ScImmutableInt8) Exists

func (o ScImmutableInt8) Exists() bool

func (ScImmutableInt8) String

func (o ScImmutableInt8) String() string

func (ScImmutableInt8) Value

func (o ScImmutableInt8) Value() int8

type ScImmutableNftID added in v0.3.0

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

func NewScImmutableNftID added in v0.3.0

func NewScImmutableNftID(proxy Proxy) ScImmutableNftID

func (ScImmutableNftID) Exists added in v0.3.0

func (o ScImmutableNftID) Exists() bool

func (ScImmutableNftID) String added in v0.3.0

func (o ScImmutableNftID) String() string

func (ScImmutableNftID) Value added in v0.3.0

func (o ScImmutableNftID) Value() ScNftID

type ScImmutableRequestID

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

func NewScImmutableRequestID

func NewScImmutableRequestID(proxy Proxy) ScImmutableRequestID

func (ScImmutableRequestID) Exists

func (o ScImmutableRequestID) Exists() bool

func (ScImmutableRequestID) String

func (o ScImmutableRequestID) String() string

func (ScImmutableRequestID) Value

type ScImmutableString

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

func NewScImmutableString

func NewScImmutableString(proxy Proxy) 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 ScImmutableTokenID added in v0.3.0

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

func NewScImmutableTokenID added in v0.3.0

func NewScImmutableTokenID(proxy Proxy) ScImmutableTokenID

func (ScImmutableTokenID) Exists added in v0.3.0

func (o ScImmutableTokenID) Exists() bool

func (ScImmutableTokenID) String added in v0.3.0

func (o ScImmutableTokenID) String() string

func (ScImmutableTokenID) Value added in v0.3.0

func (o ScImmutableTokenID) Value() ScTokenID

type ScImmutableUint16

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

func NewScImmutableUint16

func NewScImmutableUint16(proxy Proxy) ScImmutableUint16

func (ScImmutableUint16) Exists

func (o ScImmutableUint16) Exists() bool

func (ScImmutableUint16) String

func (o ScImmutableUint16) String() string

func (ScImmutableUint16) Value

func (o ScImmutableUint16) Value() uint16

type ScImmutableUint32

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

func NewScImmutableUint32

func NewScImmutableUint32(proxy Proxy) ScImmutableUint32

func (ScImmutableUint32) Exists

func (o ScImmutableUint32) Exists() bool

func (ScImmutableUint32) String

func (o ScImmutableUint32) String() string

func (ScImmutableUint32) Value

func (o ScImmutableUint32) Value() uint32

type ScImmutableUint64

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

func NewScImmutableUint64

func NewScImmutableUint64(proxy Proxy) ScImmutableUint64

func (ScImmutableUint64) Exists

func (o ScImmutableUint64) Exists() bool

func (ScImmutableUint64) String

func (o ScImmutableUint64) String() string

func (ScImmutableUint64) Value

func (o ScImmutableUint64) Value() uint64

type ScImmutableUint8

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

func NewScImmutableUint8

func NewScImmutableUint8(proxy Proxy) ScImmutableUint8

func (ScImmutableUint8) Exists

func (o ScImmutableUint8) Exists() bool

func (ScImmutableUint8) String

func (o ScImmutableUint8) String() string

func (ScImmutableUint8) Value

func (o ScImmutableUint8) Value() uint8

type ScMutableAddress

type ScMutableAddress struct {
	ScImmutableAddress
}

func NewScMutableAddress

func NewScMutableAddress(proxy Proxy) ScMutableAddress

func (ScMutableAddress) Delete

func (o ScMutableAddress) Delete()

func (ScMutableAddress) SetValue

func (o ScMutableAddress) SetValue(value ScAddress)

type ScMutableAgentID

type ScMutableAgentID struct {
	ScImmutableAgentID
}

func NewScMutableAgentID

func NewScMutableAgentID(proxy Proxy) ScMutableAgentID

func (ScMutableAgentID) Delete

func (o ScMutableAgentID) Delete()

func (ScMutableAgentID) SetValue

func (o ScMutableAgentID) SetValue(value ScAgentID)

type ScMutableBigInt added in v0.3.0

type ScMutableBigInt struct {
	ScImmutableBigInt
}

func NewScMutableBigInt added in v0.3.0

func NewScMutableBigInt(proxy Proxy) ScMutableBigInt

func (ScMutableBigInt) Delete added in v0.3.0

func (o ScMutableBigInt) Delete()

func (ScMutableBigInt) SetValue added in v0.3.0

func (o ScMutableBigInt) SetValue(value ScBigInt)

type ScMutableBool

type ScMutableBool struct {
	ScImmutableBool
}

func NewScMutableBool

func NewScMutableBool(proxy Proxy) ScMutableBool

func (ScMutableBool) Delete

func (o ScMutableBool) Delete()

func (ScMutableBool) SetValue

func (o ScMutableBool) SetValue(value bool)

type ScMutableBytes

type ScMutableBytes struct {
	ScImmutableBytes
}

func NewScMutableBytes

func NewScMutableBytes(proxy Proxy) ScMutableBytes

func (ScMutableBytes) Delete

func (o ScMutableBytes) Delete()

func (ScMutableBytes) SetValue

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

type ScMutableChainID

type ScMutableChainID struct {
	ScImmutableChainID
}

func NewScMutableChainID

func NewScMutableChainID(proxy Proxy) ScMutableChainID

func (ScMutableChainID) Delete

func (o ScMutableChainID) Delete()

func (ScMutableChainID) SetValue

func (o ScMutableChainID) SetValue(value ScChainID)

type ScMutableHash

type ScMutableHash struct {
	ScImmutableHash
}

func NewScMutableHash

func NewScMutableHash(proxy Proxy) ScMutableHash

func (ScMutableHash) Delete

func (o ScMutableHash) Delete()

func (ScMutableHash) SetValue

func (o ScMutableHash) SetValue(value ScHash)

type ScMutableHname

type ScMutableHname struct {
	ScImmutableHname
}

func NewScMutableHname

func NewScMutableHname(proxy Proxy) ScMutableHname

func (ScMutableHname) Delete

func (o ScMutableHname) Delete()

func (ScMutableHname) SetValue

func (o ScMutableHname) SetValue(value ScHname)

type ScMutableInt16

type ScMutableInt16 struct {
	ScImmutableInt16
}

func NewScMutableInt16

func NewScMutableInt16(proxy Proxy) ScMutableInt16

func (ScMutableInt16) Delete

func (o ScMutableInt16) Delete()

func (ScMutableInt16) SetValue

func (o ScMutableInt16) SetValue(value int16)

type ScMutableInt32

type ScMutableInt32 struct {
	ScImmutableInt32
}

func NewScMutableInt32

func NewScMutableInt32(proxy Proxy) ScMutableInt32

func (ScMutableInt32) Delete

func (o ScMutableInt32) Delete()

func (ScMutableInt32) SetValue

func (o ScMutableInt32) SetValue(value int32)

type ScMutableInt64

type ScMutableInt64 struct {
	ScImmutableInt64
}

func NewScMutableInt64

func NewScMutableInt64(proxy Proxy) ScMutableInt64

func (ScMutableInt64) Delete

func (o ScMutableInt64) Delete()

func (ScMutableInt64) SetValue

func (o ScMutableInt64) SetValue(value int64)

type ScMutableInt8

type ScMutableInt8 struct {
	ScImmutableInt8
}

func NewScMutableInt8

func NewScMutableInt8(proxy Proxy) ScMutableInt8

func (ScMutableInt8) Delete

func (o ScMutableInt8) Delete()

func (ScMutableInt8) SetValue

func (o ScMutableInt8) SetValue(value int8)

type ScMutableNftID added in v0.3.0

type ScMutableNftID struct {
	ScImmutableNftID
}

func NewScMutableNftID added in v0.3.0

func NewScMutableNftID(proxy Proxy) ScMutableNftID

func (ScMutableNftID) Delete added in v0.3.0

func (o ScMutableNftID) Delete()

func (ScMutableNftID) SetValue added in v0.3.0

func (o ScMutableNftID) SetValue(value ScNftID)

type ScMutableRequestID

type ScMutableRequestID struct {
	ScImmutableRequestID
}

func NewScMutableRequestID

func NewScMutableRequestID(proxy Proxy) ScMutableRequestID

func (ScMutableRequestID) Delete

func (o ScMutableRequestID) Delete()

func (ScMutableRequestID) SetValue

func (o ScMutableRequestID) SetValue(value ScRequestID)

type ScMutableString

type ScMutableString struct {
	ScImmutableString
}

func NewScMutableString

func NewScMutableString(proxy Proxy) ScMutableString

func (ScMutableString) Delete

func (o ScMutableString) Delete()

func (ScMutableString) SetValue

func (o ScMutableString) SetValue(value string)

type ScMutableTokenID added in v0.3.0

type ScMutableTokenID struct {
	ScImmutableTokenID
}

func NewScMutableTokenID added in v0.3.0

func NewScMutableTokenID(proxy Proxy) ScMutableTokenID

func (ScMutableTokenID) Delete added in v0.3.0

func (o ScMutableTokenID) Delete()

func (ScMutableTokenID) SetValue added in v0.3.0

func (o ScMutableTokenID) SetValue(value ScTokenID)

type ScMutableUint16

type ScMutableUint16 struct {
	ScImmutableUint16
}

func NewScMutableUint16

func NewScMutableUint16(proxy Proxy) ScMutableUint16

func (ScMutableUint16) Delete

func (o ScMutableUint16) Delete()

func (ScMutableUint16) SetValue

func (o ScMutableUint16) SetValue(value uint16)

type ScMutableUint32

type ScMutableUint32 struct {
	ScImmutableUint32
}

func NewScMutableUint32

func NewScMutableUint32(proxy Proxy) ScMutableUint32

func (ScMutableUint32) Delete

func (o ScMutableUint32) Delete()

func (ScMutableUint32) SetValue

func (o ScMutableUint32) SetValue(value uint32)

type ScMutableUint64

type ScMutableUint64 struct {
	ScImmutableUint64
}

func NewScMutableUint64

func NewScMutableUint64(proxy Proxy) ScMutableUint64

func (ScMutableUint64) Delete

func (o ScMutableUint64) Delete()

func (ScMutableUint64) SetValue

func (o ScMutableUint64) SetValue(value uint64)

type ScMutableUint8

type ScMutableUint8 struct {
	ScImmutableUint8
}

func NewScMutableUint8

func NewScMutableUint8(proxy Proxy) ScMutableUint8

func (ScMutableUint8) Delete

func (o ScMutableUint8) Delete()

func (ScMutableUint8) SetValue

func (o ScMutableUint8) SetValue(value uint8)

type ScNftID added in v0.3.0

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

func NftIDDecode added in v0.3.0

func NftIDDecode(dec *WasmDecoder) ScNftID

func NftIDFromBytes added in v0.3.0

func NftIDFromBytes(buf []byte) ScNftID

func NftIDFromString added in v0.3.0

func NftIDFromString(value string) ScNftID

func (ScNftID) Bytes added in v0.3.0

func (o ScNftID) Bytes() []byte

func (ScNftID) String added in v0.3.0

func (o ScNftID) String() string

type ScRequestID

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

func RequestIDDecode

func RequestIDDecode(dec *WasmDecoder) ScRequestID

func RequestIDFromBytes

func RequestIDFromBytes(buf []byte) ScRequestID

func RequestIDFromString added in v0.3.0

func RequestIDFromString(value string) ScRequestID

func (ScRequestID) Bytes

func (o ScRequestID) Bytes() []byte

func (ScRequestID) String

func (o ScRequestID) String() string

type ScTokenID added in v0.3.0

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

func TokenIDDecode added in v0.3.0

func TokenIDDecode(dec *WasmDecoder) ScTokenID

func TokenIDFromBytes added in v0.3.0

func TokenIDFromBytes(buf []byte) ScTokenID

func TokenIDFromString added in v0.3.0

func TokenIDFromString(value string) ScTokenID

func (ScTokenID) Bytes added in v0.3.0

func (o ScTokenID) Bytes() []byte

func (ScTokenID) String added in v0.3.0

func (o ScTokenID) String() string

type WasmDecoder

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

WasmDecoder decodes separate entities from a byte buffer

func NewWasmDecoder

func NewWasmDecoder(buf []byte) *WasmDecoder

func (*WasmDecoder) Byte

func (d *WasmDecoder) Byte() byte

Byte decodes the next byte from the byte buffer

func (*WasmDecoder) Bytes

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

Bytes decodes the next variable sized slice of bytes from the byte buffer

func (*WasmDecoder) Close

func (d *WasmDecoder) Close()

Close finalizes decoding by panicking if any bytes remain in the byte buffer

func (*WasmDecoder) FixedBytes

func (d *WasmDecoder) FixedBytes(length uint32) []byte

FixedBytes decodes the next fixed size slice of bytes from the byte buffer

func (*WasmDecoder) Length added in v1.0.3

func (d *WasmDecoder) Length() uint32

Length returns the number of bytes left in the byte buffer

func (*WasmDecoder) Peek

func (d *WasmDecoder) Peek() byte

Peek peeks at the next byte in the byte buffer

func (*WasmDecoder) VliDecode

func (d *WasmDecoder) VliDecode(bits int) int64

VliDecode: Variable Length Integer decoder, uses modified LEB128

func (*WasmDecoder) VluDecode

func (d *WasmDecoder) VluDecode(bits int) uint64

VluDecode: Variable Length Unsigned decoder, uses ULEB128

type WasmEncoder

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

WasmEncoder encodes separate entities into a byte buffer

func NewWasmEncoder

func NewWasmEncoder() *WasmEncoder

func (*WasmEncoder) Buf

func (e *WasmEncoder) Buf() []byte

Buf retrieves the encoded byte buffer

func (*WasmEncoder) Byte

func (e *WasmEncoder) Byte(value uint8) *WasmEncoder

Byte encodes a single byte into the byte buffer

func (*WasmEncoder) Bytes

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

Bytes encodes a variable sized slice of bytes into the byte buffer

func (*WasmEncoder) FixedBytes

func (e *WasmEncoder) FixedBytes(value []byte, length uint32) *WasmEncoder

FixedBytes encodes a fixed size slice of bytes into the byte buffer

func (*WasmEncoder) VliEncode

func (e *WasmEncoder) VliEncode(value int64) *WasmEncoder

VliEncode Variable Length Integer encoder, uses modified LEB128

func (*WasmEncoder) VluEncode

func (e *WasmEncoder) VluEncode(value uint64) *WasmEncoder

VluEncode Variable Length Unsigned encoder, uses ULEB128

Jump to

Keyboard shortcuts

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