testvectors

package
v0.2102.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestVector

type TestVector struct {
	Kind             string                        `json:"kind"`
	SignatureContext string                        `json:"signature_context"`
	Tx               interface{}                   `json:"tx"`
	SignedTx         transaction.SignedTransaction `json:"signed_tx"`
	EncodedTx        []byte                        `json:"encoded_tx"`
	EncodedSignedTx  []byte                        `json:"encoded_signed_tx"`
	// Valid indicates whether the transaction is (statically) valid.
	// NOTE: This means that the transaction passes basic static validation, but
	// it may still not be valid on the given network due to invalid nonce,
	// or due to some specific parameters set on the network.
	Valid            bool                `json:"valid"`
	SignerPrivateKey []byte              `json:"signer_private_key"`
	SignerPublicKey  signature.PublicKey `json:"signer_public_key"`
}

TestVector is an Oasis transaction test vector.

func MakeTestVector

func MakeTestVector(kind string, tx *transaction.Transaction, valid bool) TestVector

MakeTestVector generates a new test vector from a transaction.

func MakeTestVectorWithSigner

func MakeTestVectorWithSigner(kind string, tx *transaction.Transaction, valid bool, signer signature.Signer) TestVector

MakeTestVectorWithSigner generates a new test vector from a transaction using a specific signer.

Jump to

Keyboard shortcuts

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