txmass

package
v0.0.0-...-f9d1cc6 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: ISC Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TransactionOutputEstimatedSerializedSize

func TransactionOutputEstimatedSerializedSize(output *externalapi.DomainTransactionOutput) uint64

TransactionOutputEstimatedSerializedSize is the same as transactionEstimatedSerializedSize but for outputs only

Types

type Calculator

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

Calculator exposes methods to calculate the mass of a transaction

func NewCalculator

func NewCalculator(massPerTxByte, massPerScriptPubKeyByte, massPerSigOp uint64) *Calculator

NewCalculator creates a new instance of Calculator

func (*Calculator) CalculateTransactionMass

func (c *Calculator) CalculateTransactionMass(transaction *externalapi.DomainTransaction) uint64

CalculateTransactionMass calculates the mass of the given transaction

func (*Calculator) MassPerScriptPubKeyByte

func (c *Calculator) MassPerScriptPubKeyByte() uint64

MassPerScriptPubKeyByte returns the mass per ScriptPublicKey byte configured for this Calculator

func (*Calculator) MassPerSigOp

func (c *Calculator) MassPerSigOp() uint64

MassPerSigOp returns the mass per SigOp byte configured for this Calculator

func (*Calculator) MassPerTxByte

func (c *Calculator) MassPerTxByte() uint64

MassPerTxByte returns the mass per transaction byte configured for this Calculator

Jump to

Keyboard shortcuts

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