standard

package
v0.92.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package standard contains interfaces for well-defined standards and function for checking if arbitrary manifest complies with them.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMethodMissing         = errors.New("method missing")
	ErrEventMissing          = errors.New("event missing")
	ErrInvalidReturnType     = errors.New("invalid return type")
	ErrInvalidParameterCount = errors.New("invalid parameter count")
	ErrInvalidParameterType  = errors.New("invalid parameter type")
	ErrSafeMethodMismatch    = errors.New("method has wrong safe flag")
)

Various validation errors.

Functions

func Check

func Check(m *manifest.Manifest, standards ...string) error

Check checks if manifest complies with all provided standards. Currently only NEP-17 is supported.

func Comply

func Comply(m, st *manifest.Manifest) error

Comply if m has all methods and event from st manifest and they have the same signature. Parameter names are ignored.

func IsNEP17

func IsNEP17(m *manifest.Manifest) error

IsNEP17 checks if m is NEP-17 compliant.

Types

This section is empty.

Jump to

Keyboard shortcuts

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