txhelper

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: ISC Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TxDirectionInvalid     int32 = -1
	TxDirectionSent        int32 = 0
	TxDirectionReceived    int32 = 1
	TxDirectionTransferred int32 = 2
	TxDirectionAll         int32 = 3

	TxTypeRegular        = "Regular"
	TxTypeMixed          = "Mixed"
	TxTypeCoinBase       = "Coinbase"
	TxTypeTicketPurchase = "Ticket"
	TxTypeVote           = "Vote"
	TxTypeRevocation     = "Revocation"
)

Variables

This section is empty.

Functions

func FormatTransactionType

func FormatTransactionType(txType wallet.TransactionType) string

func MakeBTCTxChangeSource

func MakeBTCTxChangeSource(destAddr string, net *btccfg.Params) (*btctxauthor.ChangeSource, error)

func MakeBTCTxOutput

func MakeBTCTxOutput(address string, amountInSatoshi int64, net *btcchaincfg.Params) (output *btcWire.TxOut, err error)

func MakeLTCTxChangeSource

func MakeLTCTxChangeSource(destAddr string, net *ltccfg.Params) (*ltctxauthor.ChangeSource, error)

func MakeLTCTxOutput

func MakeLTCTxOutput(address string, amountInLitoshi int64, net *ltcchaincfg.Params) (output *ltcWire.TxOut, err error)

func MakeTxOutput

func MakeTxOutput(address string, amountInAtom int64, net dcrutil.AddressParams) (output *wire.TxOut, err error)

func MsgTxFeeSizeRate

func MsgTxFeeSizeRate(transactionHex string) (msgTx *wire.MsgTx, fee dcrutil.Amount, size int, feeRate dcrutil.Amount, err error)

func TransactionAmountAndDirection

func TransactionAmountAndDirection(inputTotal, outputTotal, fee int64) (amount int64, direction int32)

func TxDirectionString added in v1.1.0

func TxDirectionString(direction int32) string

Types

type TxChangeSource

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

implements Script() and ScriptSize() functions of txauthor.ChangeSource

func MakeTxChangeSource

func MakeTxChangeSource(destAddr string, net dcrutil.AddressParams) (*TxChangeSource, error)

func (*TxChangeSource) Script

func (src *TxChangeSource) Script() ([]byte, uint16, error)

func (*TxChangeSource) ScriptSize

func (src *TxChangeSource) ScriptSize() int

Jump to

Keyboard shortcuts

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