interop

package
v0.97.2-pre Latest Latest
Warning

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

Go to latest
Published: Aug 6, 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 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 math provides access to useful numeric functions available in Neo VM.
Package math provides access to useful numeric functions available in Neo VM.
native
crypto
Package crypto provides interface to CryptoLib native contract.
Package crypto provides interface to CryptoLib native contract.
gas
Package gas provides interface to GasToken native contract.
Package gas provides interface to GasToken native contract.
ledger
Package ledger provides interface to LedgerContract native contract.
Package ledger provides interface to LedgerContract native contract.
management
Package management provides interface to ContractManagement native contract.
Package management provides interface to ContractManagement native contract.
neo
Package neo provides interface to NeoToken native contract.
Package neo provides interface to NeoToken native contract.
notary
Package notary provides interface to Notary native contract.
Package notary provides interface to Notary native contract.
oracle
Package oracle provides interface to OracleContract native contract.
Package oracle provides interface to OracleContract native contract.
policy
Package policy provides interface to PolicyContract native contract.
Package policy provides interface to PolicyContract native contract.
roles
Package roles provides interface to RoleManagement native contract.
Package roles provides interface to RoleManagement native contract.
std
Package std provides interface to StdLib native contract.
Package std provides interface to StdLib native contract.
Package neogointernal contains definitions of compiler intrinsics.
Package neogointernal contains definitions of compiler intrinsics.
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