smartcontract

package
v0.51.0-pre Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMultiSigRedeemScript

func CreateMultiSigRedeemScript(m int, publicKeys keys.PublicKeys) ([]byte, error)

CreateMultiSigRedeemScript will create a script runnable by the VM.

Types

type ContextItem

type ContextItem struct {
	Script     util.Uint160
	Parameters []Parameter
	Signatures []Signature
}

ContextItem represents a transaction context item.

type ParamType

type ParamType int

ParamType represent the Type of the contract parameter

const (
	SignatureType ParamType = iota
	BoolType
	IntegerType
	Hash160Type
	Hash256Type
	ByteArrayType
	PublicKeyType
	StringType
	ArrayType
)

A list of supported smart contract parameter types.

func (ParamType) MarshalJSON

func (pt ParamType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (ParamType) String

func (pt ParamType) String() string

type Parameter

type Parameter struct {
	// Type of the parameter
	Type ParamType `json:"type"`
	// The actual value of the parameter.
	Value interface{} `json:"value"`
}

Parameter represents a smart contract parameter.

func NewParameter

func NewParameter(t ParamType) Parameter

NewParameter returns a Parameter with proper initialized Value of the given ParamType.

type ParameterContext

type ParameterContext struct{}

ParameterContext holds the parameter context.

type Signature

type Signature struct {
	Data      []byte
	PublicKey []byte
}

Signature represents a transaction signature.

Jump to

Keyboard shortcuts

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