wasmlib

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: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPolicyEnvelope

func GetPolicyEnvelope(policy string) ([]byte, error)

func GetSignatureSet

func GetSignatureSet(artifact *valiadationArtifacts) []*protoutil.SignedData

func New

func New() (*wasmer.Imports, error)

func UnmarshalPrivateKey

func UnmarshalPrivateKey(data []byte, opt AlgorithmOption) (crypto.PrivateKey, error)

func UnmarshalPublicKey

func UnmarshalPublicKey(data []byte, opt AlgorithmOption) (crypto.PublicKey, error)

func UnmarshalValidatorInfo

func UnmarshalValidatorInfo(validatorBytes []byte) (*validatorInfo, error)

func ValidateChainCodeID

func ValidateChainCodeID(prp []byte, name string) error

func ValidateV14

func ValidateV14(proof, policyBytes []byte, confByte []string, cid string) error

Types

type AlgorithmOption

type AlgorithmOption string
const (
	// Secp256k1 secp256k1 algorithm
	Secp256k1 AlgorithmOption = "Secp256k1"
	// Secp256r1 secp256r1 algorithm
	Secp256r1 AlgorithmOption = "Secp256r1"
)

type ECDSASignature

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

type Imports

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

type PolicyEvaluator

type PolicyEvaluator struct {
	msp.IdentityDeserializer
}

func NewPolicyEvaluator

func NewPolicyEvaluator(confBytes []string) (*PolicyEvaluator, error)

func (*PolicyEvaluator) Evaluate

func (id *PolicyEvaluator) Evaluate(policyBytes []byte, signatureSet []*protoutil.SignedData) error

type PrivateKey

type PrivateKey struct {
	K *ecdsa.PrivateKey
}

func (*PrivateKey) Bytes

func (priv *PrivateKey) Bytes() ([]byte, error)

Bytes returns a serialized, storable representation of this key

type PublicKey

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

PublicKey ECDSA public key. never new(PublicKey), use NewPublicKey()

func (*PublicKey) Bytes

func (pub *PublicKey) Bytes() ([]byte, error)

Jump to

Keyboard shortcuts

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