interop

package
v0.94.0-pre Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: MIT Imports: 0 Imported by: 48

Documentation

Overview

Package interop contains smart contract API functions and type synonyms. Its subpackages can be imported into smart contracts written in Go to provide various functionality. Upon compilation, functions from these packages will be substituted with appropriate NeoVM system calls implemented by Neo. Usually these system calls have additional price in NeoVM, so they're explicitly written in the documentation of respective functions.

Types defined here are used for proper manifest generation. Here is how Go types correspond to smartcontract and VM types:

int-like - Integer
bool - Boolean
[]byte - ByteArray (Buffer in VM)
string - String (ByteString in VM)
(interface{})(nil) - Any
non-byte slice - Array
map[K]V - map

Other types are defined explicitly in this pkg:

Hash160, Hash256, InteropInterface, PublicKey, Signature

Note that unless written otherwise structures defined in this packages can't be correctly created by new() or composite literals, they should be received from some interop functions (and then used as parameters for some other interop functions).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash160

type Hash160 []byte

Hash160 represents 20-byte hash.

type Hash256

type Hash256 []byte

Hash256 represents 32-byte hash.

type Interface

type Interface interface{}

Interface represents interop interface type which is needed for transparent handling of VM-internal types (e.g. storage.Context)

type PublicKey

type PublicKey []byte

PublicKey represents marshalled ecdsa public key.

type Signature

type Signature []byte

Signature represents 64-byte signature.

Directories

Path Synopsis
Package binary provides binary serialization routines.
Package binary provides binary serialization routines.
Package contract provides functions to work with contracts.
Package contract provides functions to work with contracts.
Package convert provides functions for type conversion.
Package convert provides functions for type conversion.
Package crypto provides an interface to cryptographic syscalls.
Package crypto provides an interface to cryptographic syscalls.
Package iterator provides functions to work with Neo iterators.
Package iterator provides functions to work with Neo iterators.
Package json provides various JSON serialization/deserialization routines.
Package json provides various JSON serialization/deserialization routines.
native
gas
neo
Package runtime provides various service functions related to execution environment.
Package runtime provides various service functions related to execution environment.
Package storage provides functions to access and modify contract's storage.
Package storage provides functions to access and modify contract's storage.
Package util contains some special useful functions that are provided by compiler and VM.
Package util contains some special useful functions that are provided by compiler and VM.

Jump to

Keyboard shortcuts

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