operation

package
v1.7.10 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OP_SPENDING is the operation code for the spending state transaction
	OP_SPENDING = Operation("0001")

	// OP_FEEDING is the operation code for the feeding state transaction
	OP_FEEDING = Operation("0010")

	// OP_OPTOUT is the operation code for the opt-out transaction
	OP_OPTOUT = Operation("0100")

	// OP_OBLIVION is the operation code for the oblivion transactions
	OP_OBLIVION = Operation("1000")
)

Variables

View Source
var Enabled = []Operation{OP_SPENDING, OP_FEEDING, OP_OPTOUT, OP_OBLIVION} // TODO Enrich for each new operation

Enabled lists the currently allowed operations

Functions

func Contains

func Contains(slice []Operation, item Operation) bool

Contains ...

Types

type Operation

type Operation model.Binary

Operation ... NB: if the instantiated value is not the representation of an existing Operation code, it will not throw an error but rather return an empty or nil item when its methods are called.

func ToOperation

func ToOperation(bytes []byte) Operation

ToOperation ...

func (Operation) Binary

func (o Operation) Binary() model.Binary

Binary ...

func (Operation) Bytes

func (o Operation) Bytes() []byte

Bytes ...

func (Operation) String

func (o Operation) String() string

String ...

Jump to

Keyboard shortcuts

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