btc

package
v0.0.0-...-5ed304f Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCoinbase

func GenerateCoinbase(
	version, lockTime uint32,
	address string,
	amount, blockHeight, nTime uint64,
	extraData, defaultWitness string,
	prefixP2PKH, prefixP2SH []byte,
) ([]byte, []byte, error)

func ValidateAddress

func ValidateAddress(address string) bool

Types

type Node

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

func New

func New(mainnet bool, rawPriv, blockchairKey string) (*Node, error)

func (Node) Address

func (node Node) Address() string

func (Node) BroadcastTx

func (node Node) BroadcastTx(tx string) (string, error)

func (Node) Chain

func (node Node) Chain() string

func (Node) CreateTx

func (node Node) CreateTx(inputs []*types.TxInput, outputs []*types.TxOutput) (string, string, error)

func (Node) GetAccountingType

func (node Node) GetAccountingType() types.AccountingType

func (Node) GetAddressExplorerURL

func (node Node) GetAddressExplorerURL(address string) string

func (Node) GetAddressPrefix

func (node Node) GetAddressPrefix() string

func (Node) GetBalance

func (node Node) GetBalance() (*big.Int, error)

func (Node) GetTx

func (node Node) GetTx(txid string) (*types.TxResponse, error)

func (Node) GetTxExplorerURL

func (node Node) GetTxExplorerURL(txid string) string

func (Node) GetUnits

func (node Node) GetUnits() *types.Number

func (Node) Name

func (node Node) Name() string

func (Node) ShouldMergeUTXOs

func (node Node) ShouldMergeUTXOs() bool

func (Node) ValidateAddress

func (node Node) ValidateAddress(address string) bool

Jump to

Keyboard shortcuts

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