testutils

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2020 License: LGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitcoinHeader

type BitcoinHeader = btcspv.BitcoinHeader

BitcoinHeader is a parsed Bitcoin header

type BytesToBigUintTC

type BytesToBigUintTC struct {
	Input  HexBytes `json:"input"`
	Output uint     `json:"output"`
}

type CalculateDifficultyTC

type CalculateDifficultyTC struct {
	Input  sdk.Uint `json:"input"`
	Output sdk.Int  `json:"output"`
}

type CalculateTxIDTC

type CalculateTxIDTC struct {
	Input  SPVProof      `json:"input"`
	Output Hash256Digest `json:"output"`
}

type DetermineInputLengthTC

type DetermineInputLengthTC struct {
	Input  HexBytes `json:"input"`
	Output uint64   `json:"output"`
}

type DetermineOutputLengthError

type DetermineOutputLengthError struct {
	Input        HexBytes `json:"input"`
	ErrorMessage string   `json:"golangError"`
}

type DetermineOutputLengthTC

type DetermineOutputLengthTC struct {
	Input  HexBytes `json:"input"`
	Output uint64   `json:"output"`
}

type EncodeP2PKHTC

type EncodeP2PKHTC struct {
	Input  HexBytes `json:"input"`
	Output string   `json:"output"`
}

type EncodeP2SHTC

type EncodeP2SHTC struct {
	Input  HexBytes `json:"input"`
	Output string   `json:"output"`
}

type EncodeP2WPKHTC

type EncodeP2WPKHTC struct {
	Input  HexBytes `json:"input"`
	Output string   `json:"output"`
}

type EncodeP2WSHTC

type EncodeP2WSHTC struct {
	Input  Hash256Digest `json:"input"`
	Output string        `json:"output"`
}

type ExtractHashError

type ExtractHashError struct {
	Input        HexBytes `json:"input"`
	ErrorMessage string   `json:"golangError"`
}

type ExtractHashTC

type ExtractHashTC struct {
	Input  HexBytes `json:"input"`
	Output HexBytes `json:"output"`
}

type ExtractInputAtIndexError

type ExtractInputAtIndexError struct {
	Input        ExtractInputAtIndexInput `json:"input"`
	ErrorMessage string                   `json:"golangError"`
}

type ExtractInputAtIndexInput

type ExtractInputAtIndexInput struct {
	Vin   HexBytes `json:"vin"`
	Index uint     `json:"index"`
}

type ExtractInputAtIndexTC

type ExtractInputAtIndexTC struct {
	Input  ExtractInputAtIndexInput `json:"input"`
	Output HexBytes                 `json:"output"`
}

type ExtractInputTxIDLETC

type ExtractInputTxIDLETC struct {
	Input  HexBytes      `json:"input"`
	Output Hash256Digest `json:"output"`
}

type ExtractOpReturnDataError

type ExtractOpReturnDataError struct {
	Input        HexBytes `json:"input"`
	ErrorMessage string   `json:"golangError"`
}

type ExtractOpReturnDataTC

type ExtractOpReturnDataTC struct {
	Input  HexBytes `json:"input"`
	Output HexBytes `json:"output"`
}

type ExtractOutpointTC

type ExtractOutpointTC struct {
	Input  HexBytes `json:"input"`
	Output HexBytes `json:"output"`
}

type ExtractOutputAtIndexError

type ExtractOutputAtIndexError struct {
	Input        ExtractOutputAtIndexInput `json:"input"`
	ErrorMessage string                    `json:"golangError"`
}

type ExtractOutputAtIndexInput

type ExtractOutputAtIndexInput struct {
	Vout  HexBytes `json:"vout"`
	Index uint     `json:"index"`
}

type ExtractOutputAtIndexTC

type ExtractOutputAtIndexTC struct {
	Input  ExtractOutputAtIndexInput `json:"input"`
	Output HexBytes                  `json:"output"`
}

type ExtractOutputScriptLenTC

type ExtractOutputScriptLenTC struct {
	Input  HexBytes `json:"input"`
	Output uint     `json:"output"`
}

type ExtractScriptSigError

type ExtractScriptSigError struct {
	Input        HexBytes `json:"input"`
	ErrorMessage string   `json:"golangError"`
}

type ExtractScriptSigLenTC

type ExtractScriptSigLenTC struct {
	Input  HexBytes `json:"input"`
	Output []uint64 `json:"output"`
}

type ExtractScriptSigTC

type ExtractScriptSigTC struct {
	Input  HexBytes `json:"input"`
	Output HexBytes `json:"output"`
}

type ExtractSequenceLELegacyError

type ExtractSequenceLELegacyError struct {
	Input        HexBytes `json:"input"`
	ErrorMessage string   `json:"golangError"`
}

type ExtractSequenceLELegacyTC

type ExtractSequenceLELegacyTC struct {
	Input  HexBytes `json:"input"`
	Output HexBytes `json:"output"`
}

type ExtractSequenceLEWitnessTC

type ExtractSequenceLEWitnessTC struct {
	Input  HexBytes `json:"input"`
	Output HexBytes `json:"output"`
}

type ExtractSequenceLegacyError

type ExtractSequenceLegacyError struct {
	Input        HexBytes `json:"input"`
	ErrorMessage string   `json:"golangError"`
}

type ExtractSequenceLegacyTC

type ExtractSequenceLegacyTC struct {
	Input  HexBytes `json:"input"`
	Output uint32   `json:"output"`
}

type ExtractSequenceWitnessTC

type ExtractSequenceWitnessTC struct {
	Input  HexBytes `json:"input"`
	Output uint32   `json:"output"`
}

type ExtractTargetTC

type ExtractTargetTC struct {
	Input  RawHeader `json:"input"`
	Output HexBytes  `json:"output"`
}

type ExtractTimestampTC

type ExtractTimestampTC struct {
	Input  RawHeader `json:"input"`
	Output uint      `json:"output"`
}

type ExtractTxIndexLETC

type ExtractTxIndexLETC struct {
	Input  HexBytes `json:"input"`
	Output HexBytes `json:"output"`
}

type ExtractTxIndexTC

type ExtractTxIndexTC struct {
	Input  HexBytes `json:"input"`
	Output uint     `json:"output"`
}

type ExtractValueLETC

type ExtractValueLETC struct {
	Input  HexBytes `json:"input"`
	Output HexBytes `json:"output"`
}

type ExtractValueTC

type ExtractValueTC struct {
	Input  HexBytes `json:"input"`
	Output uint     `json:"output"`
}

type Hash160Digest

type Hash160Digest = btcspv.Hash160Digest

Hash160Digest is a 20-byte ripemd160+sha2 hash

type Hash160TC

type Hash160TC struct {
	Input  HexBytes      `json:"input"`
	Output Hash160Digest `json:"output"`
}

type Hash256Digest

type Hash256Digest = btcspv.Hash256Digest

Hash256Digest 32-byte double-sha2 digest

type Hash256MerkleStepTC

type Hash256MerkleStepTC struct {
	Input  []HexBytes    `json:"input"`
	Output Hash256Digest `json:"output"`
}

type Hash256TC

type Hash256TC struct {
	Input  HexBytes      `json:"input"`
	Output Hash256Digest `json:"output"`
}

type HexBytes

type HexBytes = btcspv.HexBytes

HexBytes is a type alias to make JSON hex ser/deser easier

type IsLegacyInputTC

type IsLegacyInputTC struct {
	Input  HexBytes `json:"input"`
	Output bool     `json:"output"`
}

type ProveInput

type ProveInput struct {
	TxIdLE       Hash256Digest `json:"txIdLE"`
	MerkleRootLE Hash256Digest `json:"merkleRootLE"`
	Proof        HexBytes      `json:"proof"`
	Index        uint          `json:"index"`
}

type ProveTC

type ProveTC struct {
	Input  ProveInput `json:"input"`
	Output bool       `json:"output"`
}

type RawHeader

type RawHeader = btcspv.RawHeader

RawHeader is an 80-byte raw header

type Retarget

type Retarget struct {
	Hash       Hash256Digest `json:"hash"`
	Version    uint          `json:"version"`
	PrevBlock  Hash256Digest `json:"prev_block"`
	MerkleRoot Hash256Digest `json:"merkle_root"`
	Timestamp  uint          `json:"timestamp"`
	Nbits      HexBytes      `json:"nbits"`
	Nonce      HexBytes      `json:"nonce"`
	Difficulty uint64        `json:"difficulty"`
	Hex        RawHeader     `json:"hex"`
	Height     uint32        `json:"height"`
}

type RetargetAlgorithmTC

type RetargetAlgorithmTC struct {
	Input  []Retarget `json:"input"`
	Output uint64     `json:"output"`
}

type SPVProof

type SPVProof = btcspv.SPVProof

SPVProof is the base struct for an SPV proof

type ValidateHeaderChainError

type ValidateHeaderChainError struct {
	Input        HexBytes `json:"input"`
	ErrorMessage string   `json:"golangError"`
}

type ValidateHeaderChainTC

type ValidateHeaderChainTC struct {
	Input  HexBytes `json:"input"`
	Output uint64   `json:"output"`
}

type ValidateHeaderPrevHashInput

type ValidateHeaderPrevHashInput struct {
	Header   RawHeader     `json:"header"`
	PrevHash Hash256Digest `json:"prevHash"`
}

type ValidateHeaderPrevHashTC

type ValidateHeaderPrevHashTC struct {
	Input  ValidateHeaderPrevHashInput `json:"input"`
	Output bool                        `json:"output"`
}

type ValidateHeaderWorkInput

type ValidateHeaderWorkInput struct {
	Digest Hash256Digest `json:"digest"`
	Target sdk.Uint      `json:"target"`
}

type ValidateHeaderWorkTC

type ValidateHeaderWorkTC struct {
	Input  ValidateHeaderWorkInput `json:"input"`
	Output bool                    `json:"output"`
}

type ValidateVinTC

type ValidateVinTC struct {
	Input  HexBytes `json:"input"`
	Output bool     `json:"output"`
}

type ValidateVoutTC

type ValidateVoutTC struct {
	Input  HexBytes `json:"input"`
	Output bool     `json:"output"`
}

type VerifyHash256MerkleInput

type VerifyHash256MerkleInput struct {
	Proof HexBytes `json:"proof"`
	Index uint     `json:"index"`
}

type VerifyHash256MerkleTC

type VerifyHash256MerkleTC struct {
	Input  VerifyHash256MerkleInput `json:"input"`
	Output bool                     `json:"output"`
}

Jump to

Keyboard shortcuts

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