opreturn

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: ISC Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OPRNameMap = map[OPReturnType]string{
	OPReturnType(txscript.OP_MEER_LOCK): "LockAmount",
}

Functions

func GetOPReturnTxOutput

func GetOPReturnTxOutput(opr IOPReturn) *types.TxOutput

func IsOPReturn

func IsOPReturn(pks []byte) bool

func UseLogger

func UseLogger(logger l.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type IOPReturn

type IOPReturn interface {
	GetType() OPReturnType
	Verify(tx *types.Transaction) error
	Init(ops []txscript.ParsedOpcode) error
	PKScript() []byte
}

Exclusive to Coinbase OP Return function

func NewOPReturnFrom

func NewOPReturnFrom(pks []byte) (IOPReturn, error)

type LockAmount

type LockAmount struct {
	// contains filtered or unexported fields
}

func NewShowAmount

func NewShowAmount(amount int64) *LockAmount

func (*LockAmount) GetAmount

func (a *LockAmount) GetAmount() int64

func (*LockAmount) GetType

func (a *LockAmount) GetType() OPReturnType

func (*LockAmount) Init

func (a *LockAmount) Init(ops []txscript.ParsedOpcode) error

func (*LockAmount) PKScript

func (a *LockAmount) PKScript() []byte

func (*LockAmount) Verify

func (a *LockAmount) Verify(tx *types.Transaction) error

type OPReturnType

type OPReturnType byte

func (OPReturnType) Name

func (t OPReturnType) Name() string

Jump to

Keyboard shortcuts

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