Documentation
¶
Index ¶
- func IssueValidate(c context.Context, ctx *Context) error
- func TransferActionValidate(c context.Context, ctx *Context) error
- func TransferBalanceValidate(c context.Context, ctx *Context) error
- func TransferHTLCValidate(c context.Context, ctx *Context) error
- func TransferSignatureValidate(c context.Context, ctx *Context) error
- type ActionDeserializer
- type Context
- type ValidateAuditingFunc
- type ValidateIssueFunc
- type ValidateTransferFunc
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TransferActionValidate ¶
TransferActionValidate validates the transfer action
func TransferBalanceValidate ¶
TransferBalanceValidate checks that the sum of the inputs is equal to the sum of the outputs
func TransferHTLCValidate ¶
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 ¶
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 ¶
func (a *ActionDeserializer) DeserializeActions(tr *driver.TokenRequest) ([]*actions.IssueAction, []*actions.TransferAction, error)
type Context ¶
type Context = common.Context[*setup.PublicParams, *actions.Output, *actions.TransferAction, *actions.IssueAction, driver.Deserializer]
type ValidateAuditingFunc ¶
type ValidateAuditingFunc = common.ValidateAuditingFunc[*setup.PublicParams, *actions.Output, *actions.TransferAction, *actions.IssueAction, driver.Deserializer]
type ValidateIssueFunc ¶
type ValidateIssueFunc = common.ValidateIssueFunc[*setup.PublicParams, *actions.Output, *actions.TransferAction, *actions.IssueAction, driver.Deserializer]
type ValidateTransferFunc ¶
type ValidateTransferFunc = common.ValidateTransferFunc[*setup.PublicParams, *actions.Output, *actions.TransferAction, *actions.IssueAction, driver.Deserializer]
type Validator ¶
type Validator = common.Validator[*setup.PublicParams, *actions.Output, *actions.TransferAction, *actions.IssueAction, driver.Deserializer]
func NewValidator ¶
func NewValidator( logger logging.Logger, pp *setup.PublicParams, deserializer driver.Deserializer, limits driver.ResourceLimits, extraTransferValidators []ValidateTransferFunc, extraIssuerValidators []ValidateIssueFunc, extraAuditorValidators []ValidateAuditingFunc, ) *Validator