decode

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeEmpty    = 0
	TypeP2PK     = 1
	TypeP2PKH    = 2
	TypeP2WPKH   = 3
	TypeBech32   = 4
	TypeMultiSig = 5
)
View Source
const (
	Type_Empty    = "Empty"
	Type_P2PK     = "P2PK"
	Type_P2PKH    = "P2PKH"
	Type_P2PSH    = "P2PSH"
	Type_P2WPKH   = "P2WPKH"
	Type_Bech32   = "Bech32"
	Type_MultiSig = "MultiSig"
	Type_NullData = "NullData"
)

Variables

This section is empty.

Functions

func GetTxHash

func GetTxHash(rawTxByte []byte) string

func GetTxNewHash

func GetTxNewHash(rawTxByte []byte) []byte

Types

type RawTransaction

type RawTransaction struct {
	TxID          string
	Size          uint64
	Hex           string
	BlockHash     string
	BlockHeight   uint64
	Confirmations uint64
	Blocktime     int64

	Version  []byte
	Vins     []TxIn
	Vouts    []TxOut
	LockTime []byte
	Witness  bool
	// contains filtered or unexported fields
}

func DecodeRawTransaction

func DecodeRawTransaction(txBytes []byte) (*RawTransaction, error)

type TxIn

type TxIn struct {
	TxID []byte
	Vout []byte
	// contains filtered or unexported fields
}

func (TxIn) GetScriptSig

func (in TxIn) GetScriptSig() string

func (TxIn) GetSequence

func (in TxIn) GetSequence() uint32

func (TxIn) GetTxID

func (in TxIn) GetTxID() string

func (TxIn) GetUTXOType

func (in TxIn) GetUTXOType() int

func (TxIn) GetUTXOTypeStr

func (in TxIn) GetUTXOTypeStr() string

func (TxIn) GetVout

func (in TxIn) GetVout() uint32

type TxOut

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

func (TxOut) GetAmount

func (out TxOut) GetAmount() uint64

func (TxOut) GetIndex

func (out TxOut) GetIndex() uint64

func (TxOut) GetLockScript

func (out TxOut) GetLockScript() string

Jump to

Keyboard shortcuts

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