validator

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IssueValidate

func IssueValidate(c context.Context, ctx *Context) error

func TransferActionValidate

func TransferActionValidate(c context.Context, ctx *Context) error

TransferActionValidate validates the transfer action

func TransferBalanceValidate

func TransferBalanceValidate(c context.Context, ctx *Context) error

TransferBalanceValidate checks that the sum of the inputs is equal to the sum of the outputs

func TransferHTLCValidate

func TransferHTLCValidate(c context.Context, ctx *Context) error

TransferHTLCValidate checks the validity of the HTLC scripts, if any. An HTLC-owned input may only be spent by a 1-to-1 transfer of ownership: exactly one input and exactly one output. Every check below is performed against the input being iterated (`in`), never against a fixed index, so no input can escape validation. A nil input token, a nil output or a signature missing at the index of an HTLC-owned input yields a validation error rather than a panic, regardless of the order in which the validation steps of the pipeline are executed.

func TransferSignatureValidate

func TransferSignatureValidate(c context.Context, ctx *Context) error

TransferSignatureValidate validates the signatures for the inputs spent by an action. A nil input entry, a nil token inside an input, or a nil output entry yields a validation error rather than a panic, regardless of the order in which the validation steps of the pipeline are executed.

Types

type ActionDeserializer

type ActionDeserializer struct {
	Limits driver.ResourceLimits
}

func (*ActionDeserializer) DeserializeActions

type Validator

func NewValidator

func NewValidator(
	logger logging.Logger,
	pp *setup.PublicParams,
	deserializer driver.Deserializer,
	limits driver.ResourceLimits,
	extraTransferValidators []ValidateTransferFunc,
	extraIssuerValidators []ValidateIssueFunc,
	extraAuditorValidators []ValidateAuditingFunc,
) *Validator

Jump to

Keyboard shortcuts

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