bitcoin

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: GPL-3.0 Imports: 11 Imported by: 7

Documentation

Index

Constants

View Source
const Version int32 = 2

Version of Bitcoin transactions supported by the multichain.

Variables

This section is empty.

Functions

func NewAddressDecoder

func NewAddressDecoder(defaultNet *chaincfg.Params) bitcoincompat.AddressDecoder

NewAddressDecoder returns an implementation of the address decoder interface from the Bitcoin Compat API, and exposes the functionality to decode strings into addresses.

func NewTxBuilder

func NewTxBuilder() bitcoincompat.TxBuilder

NewTxBuilder returns an implementation of the transaction builder interface from the Bitcoin Compat API, and exposes the functionality to build simple Bitcoin transactions.

Types

type Tx

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

Tx represents a simple Bitcoin transaction that implements the Bitcoin Compat API.

func (*Tx) Hash

func (tx *Tx) Hash() pack.Bytes32

func (*Tx) Serialize

func (tx *Tx) Serialize() (pack.Bytes, error)

func (*Tx) Sighashes

func (tx *Tx) Sighashes() ([]pack.Bytes32, error)

func (*Tx) Sign

func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error

Jump to

Keyboard shortcuts

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