transaction

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: MIT Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutPoint

type OutPoint struct {
	Hash bigint.Uint256
	N    uint32
}

func (OutPoint) Pack

func (o OutPoint) Pack(writer io.Writer) error

func (*OutPoint) UnPack

func (o *OutPoint) UnPack(reader io.Reader) error

type OutPointPrintAble

type OutPointPrintAble struct {
	Hash string
	N    uint32
}

type Transaction

type Transaction struct {
	Vin      []TxIn
	Vout     []TxOut
	Version  int32
	LockTime uint32
}

func (Transaction) CalcTrxId

func (t Transaction) CalcTrxId() (bigint.Uint256, error)

func (*Transaction) GetTrxPrintAble

func (t *Transaction) GetTrxPrintAble() TrxPrintAble

func (Transaction) HasWitness

func (t Transaction) HasWitness() bool

func (Transaction) Pack

func (t Transaction) Pack(writer io.Writer) error

func (Transaction) PackNoWitness

func (t Transaction) PackNoWitness(writer io.Writer) error

func (Transaction) PackToHex

func (t Transaction) PackToHex() (string, error)

func (*Transaction) UnPack

func (t *Transaction) UnPack(reader io.Reader) error

func (*Transaction) UnPackFromHex

func (t *Transaction) UnPackFromHex(hexStr string) error

type TrxPrintAble

type TrxPrintAble struct {
	Vin      []TxInPrintAble
	Vout     []TxOutPrintAble
	Version  int32
	LockTime uint32
}

type TxIn

type TxIn struct {
	PrevOut       OutPoint
	ScriptSig     script.Script
	Sequence      uint32
	ScriptWitness script.ScriptWitness
}

func (TxIn) Pack

func (t TxIn) Pack(writer io.Writer) error

func (*TxIn) UnPack

func (t *TxIn) UnPack(reader io.Reader) error

type TxInPrintAble

type TxInPrintAble struct {
	PrevOut       OutPointPrintAble
	ScriptSig     string
	Sequence      uint32
	ScriptWitness []string
}

type TxOut

type TxOut struct {
	Value        int64
	ScriptPubKey script.Script
}

func (TxOut) Pack

func (t TxOut) Pack(writer io.Writer) error

func (*TxOut) UnPack

func (t *TxOut) UnPack(reader io.Reader) error

type TxOutPrintAble

type TxOutPrintAble struct {
	Value        int64
	ScriptPubKey string
	Address      string
	ScriptType   string
}

Jump to

Keyboard shortcuts

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