btcwallet

package
v0.0.0-...-02d61d7 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotLoaded          = fmt.Errorf("wallet not loaded, create or unlock it first")
	ErrNotSynced          = fmt.Errorf("wallet still syncing, please retry later")
	ErrNotReady           = fmt.Errorf("wallet not ready, please init and wait for it to complete syncing")
	ErrNotUnlocked        = fmt.Errorf("wallet is locked, please unlock it to perform this operation")
	ErrAlreadyInitialized = fmt.Errorf("wallet already initialized")
)

Functions

func NewService

func NewService(cfg WalletConfig, options ...WalletOption) (ports.WalletService, error)

NewService creates the wallet service, an option must be set to configure the chain source.

Types

type WalletConfig

type WalletConfig struct {
	Datadir string
	Network common.Network
}

type WalletOption

type WalletOption func(*service) error

func WithBitcoindZMQ

func WithBitcoindZMQ(block, tx string, host, user, pass string) WalletOption

func WithNeutrino

func WithNeutrino(initialPeer string, esploraURL string) WalletOption

WithNeutrino creates a start a neutrino node using the provided service datadir

func WithPollingBitcoind

func WithPollingBitcoind(host, user, pass string) WalletOption

Jump to

Keyboard shortcuts

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