validator

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FabricRuleAddr = "0x00000000000000000000000000000000000000a0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Validate(address, from string, proof []byte, validators string) (bool, error)
}

Engine runs for validation

type FabV14Validator

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

Validator is the instance that can use wasm to verify transaction validity

func NewFabV14Validator

func NewFabV14Validator(ledger ledger.Ledger, logger logrus.FieldLogger) *FabV14Validator

New a validator instance

func (*FabV14Validator) Verify

func (vlt *FabV14Validator) Verify(address, from string, proof []byte, validators string) (bool, error)

Verify will check whether the transaction info is valid

type ValidationEngine

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

Validator is the instance that can use wasm to verify transaction validity

func NewValidationEngine

func NewValidationEngine(ledger ledger.Ledger, logger logrus.FieldLogger) *ValidationEngine

New a validator instance

func (*ValidationEngine) Validate

func (ve *ValidationEngine) Validate(address, from string, proof []byte, validators string) (bool, error)

Verify will check whether the transaction info is valid

type Validator

type Validator interface {
	Verify(address, from string, proof []byte, validators string) (bool, error)
}

Validator chooses specific method to verify transaction

type WasmValidator

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

Validator is the instance that can use wasm to verify transaction validity

func NewWasmValidator

func NewWasmValidator(ledger ledger.Ledger, logger logrus.FieldLogger) *WasmValidator

New a validator instance

func (*WasmValidator) Verify

func (vlt *WasmValidator) Verify(address, from string, proof []byte, validators string) (bool, error)

Verify will check whether the transaction info is valid

Jump to

Keyboard shortcuts

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