btc

package
v0.2.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package btc defines primitives to work with Bitcoin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broadcaster

type Broadcaster interface {
	// Broadcast broadcasts a raw transaction.
	Broadcast(raw []byte) error
}

Broadcaster is able to broadcast raw Bitcoin transactions.

type Network

type Network string

Network represents a Bitcoin network.

const (
	// NetworkTest3 is an identified for the test Bitcoin network.
	NetworkTest3 Network = "bitcoin:test3"

	// NetworkMain is an identified for the main Bitcoin network.
	NetworkMain Network = "bitcoin:main"
)

func (Network) ID

func (n Network) ID() byte

ID returns the byte ID of the network.

func (Network) String

func (n Network) String() string

String implements fmt.Stringer.

type Output

type Output struct {
	TXHash   types.ReversedBytes32
	PKScript []byte
	Index    int
}

Output represents a transaction output.

type UnspentFinder

type UnspentFinder interface {
	// FindUnspent find unspent outputs for the given address and the
	// required amount. It returns the outputs and the total amount of the
	// outputs.
	FindUnspent(address *types.ReversedBytes20, amount int64) (outputs []Output, total int64, err error)
}

UnspentFinder is find unspent outputs.

Directories

Path Synopsis
Package blockcypher defines primitives to work with the BlockCypher API.
Package blockcypher defines primitives to work with the BlockCypher API.
Package btctesting defines helpers to test Bitcoin.
Package btctesting defines helpers to test Bitcoin.
Package btctimestamper implements a fake Bitcoin timestamper which can be used for testing.
Package btctimestamper implements a fake Bitcoin timestamper which can be used for testing.

Jump to

Keyboard shortcuts

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