rawdecodebtc

package module
v0.0.0-...-d44008d Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: MIT Imports: 8 Imported by: 0

README

Decode bitcoin raw transaction using btcsuite.

README: TO DO

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateVinList

func CreateVinList(mtx *wire.MsgTx) []btcjson.Vin

CreateVinList returns a slice of JSON objects for the inputs of the passed transaction.

func CreateVoutList

func CreateVoutList(mtx *wire.MsgTx, chainParams *chaincfg.Params, filterAddrMap map[string]struct{}) []btcjson.Vout

CreateVoutList returns a slice of JSON objects for the outputs of the passed transaction.

func HexDecodeRawTxString

func HexDecodeRawTxString(rawTx string) (hexDecodedTx []byte, err error)

HexDecodeRawTxString hex decodes a rawTx string and returns it as byte slice.

Types

type TxRawDecodeResult

type TxRawDecodeResult struct {
	Txid                  string         `json:"txid"`
	Version               int32          `json:"version"`
	Locktime              uint32         `json:"locktime"`
	SerializeSizeStripped int            `json:"sizestripped"`
	SerializeSize         int            `json:"size"`
	Vin                   []btcjson.Vin  `json:"vin"`
	Vout                  []btcjson.Vout `json:"vout"`
}

TxRawDecodeResult models the data from the decoderawtransaction command.

func FromHex

func FromHex(message string, net string) (txReply TxRawDecodeResult, err error)

FromHex decodes raw transaction from Hex payload

func FromMessage

func FromMessage(rawTx []byte, net string) (txReply TxRawDecodeResult, err error)

FromMessage decodes raw transaction from raw payload

func FromWire

func FromWire(mtx *wire.MsgTx, net string) (txReply TxRawDecodeResult, err error)

FromWire decodes wire msg

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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