policy

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: GPL-3.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Namespace = 'n'
	Container = 'c'
	IAM       = 'i'
)
View Source
const (
	// ErrNotAuthorized is returned when the none of the transaction signers
	// belongs to the list of autorized keys.
	ErrNotAuthorized = "none of the signers is authorized to change the contract"
)

Variables

This section is empty.

Functions

func AddChain

func AddChain(entity Kind, entityName string, name []byte, chain []byte)

func GetAdmin

func GetAdmin() interop.Hash160

func GetChain

func GetChain(entity Kind, entityName string, name []byte) []byte

func IteratorChainsByPrefix

func IteratorChainsByPrefix(entity Kind, entityName string, prefix []byte) iterator.Iterator

func ListChains

func ListChains(namespace, container string, name []byte) [][]byte

ListChains lists all chains for the namespace by prefix. container may be empty.

func ListChainsByPrefix

func ListChainsByPrefix(entity Kind, entityName string, prefix []byte) [][]byte

ListChainsByPrefix list all chains for the provided kind and entity by prefix.

func ListTargets

func ListTargets(entity Kind) iterator.Iterator

ListTargets iterates over targets for which rules are defined.

func RemoveChain

func RemoveChain(entity Kind, entityName string, name []byte)

func RemoveChainsByPrefix

func RemoveChainsByPrefix(entity Kind, entityName string, name []byte)

func SetAdmin

func SetAdmin(addr interop.Hash160)

func Update added in v0.19.1

func Update(script []byte, manifest []byte, data any)

Update method updates contract source code and manifest. It can be invoked by committee only.

func Version

func Version() int

Version returns the version of the contract.

Types

type Kind

type Kind byte

Kind represents the object the chain is attached to. Currently only namespace and container are supported.

Jump to

Keyboard shortcuts

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