validator

package
v0.0.0-...-f069fcf Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FabricRuleAddr    = "0x00000000000000000000000000000000000000a0"
	SimFabricRuleAddr = "0x00000000000000000000000000000000000000a1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ECDSASignature

type ECDSASignature struct {
	R, S *big.Int
}

type Engine

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

Engine runs for validation

type FabSimValidator

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

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

func NewFabSimValidator

func NewFabSimValidator(logger logrus.FieldLogger) *FabSimValidator

New a validator instance

func (*FabSimValidator) Verify

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

Verify will check whether the transaction info is valid

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(logger logrus.FieldLogger) *FabV14Validator

New a validator instance

func (*FabV14Validator) EvaluateSignedData

func (vlt *FabV14Validator) EvaluateSignedData(signedData []*protoutil.SignedData, identityDeserializer mspi.IdentityDeserializer, policy policies.Policy) (bool, error)

func (*FabV14Validator) Verify

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

Verify will check whether the transaction info is valid

type Ledger

type Ledger interface {
	// GetCode
	GetCode(*types.Address) []byte
}

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, instances *sync.Map, logger logrus.FieldLogger) *ValidationEngine

New a validator instance

func (*ValidationEngine) Validate

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

Verify will check whether the transaction info is valid

type Validator

type Validator interface {
	Verify(address, from string, proof, payload []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, logger logrus.FieldLogger, instances *sync.Map) *WasmValidator

New a validator instance

func (*WasmValidator) Verify

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

Verify will check whether the transaction info is valid

Directories

Path Synopsis
Package mock_validator is a generated GoMock package.
Package mock_validator is a generated GoMock package.

Jump to

Keyboard shortcuts

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