ports

package
v0.0.0-...-7880ed1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitcoinStatus

type BitcoinStatus struct {
	ChainTipHeight uint32
	ChainTipTime   int64
	Synced         bool
	MinRelayTxFee  chainfee.SatPerKVByte
}

type Cypher

type Cypher interface {
	Encrypt(ctx context.Context, seed []byte, password string) (encryptedSeed []byte, err error)
	Decrypt(ctx context.Context, encryptedSeed []byte, password string) (seed []byte, err error)
}

Cypher is a service encrypting and decrypting seed data.

type Nbxplorer

type Nbxplorer interface {
	GetBitcoinStatus(ctx context.Context) (*BitcoinStatus, error)
	GetTransaction(ctx context.Context, txid string) (*TransactionDetails, error)
	ScanUtxoSet(ctx context.Context, derivationScheme string, gapLimit int) <-chan ScanUtxoSetProgress
	Track(ctx context.Context, derivationScheme string) error
	GetUtxos(ctx context.Context, derivationScheme string) ([]Utxo, error)
	GetScriptPubKeyDetails(ctx context.Context, derivationScheme string, script string) (*ScriptPubKeyDetails, error)
	GetNewUnusedAddress(ctx context.Context, derivationScheme string, change bool, skip int) (string, error)
	EstimateFeeRate(ctx context.Context) (chainfee.SatPerKVByte, error)
	BroadcastTransaction(ctx context.Context, txs ...string) (string, error)

	WatchAddresses(ctx context.Context, addresses ...string) error
	UnwatchAddresses(ctx context.Context, addresses ...string) error
	GetAddressNotifications(ctx context.Context) (<-chan []Utxo, error)

	Close() error
}

Nbxplorer acts as the "backend" for the wallet Service

type ScanUtxoSetProgress

type ScanUtxoSetProgress struct {
	Progress int
	Done     bool
}

type ScriptPubKeyDetails

type ScriptPubKeyDetails struct {
	KeyPath string
}

type SeedRepository

type SeedRepository interface {
	IsInitialized(context.Context) bool
	GetEncryptedSeed(context.Context) ([]byte, error)
	AddEncryptedSeed(context.Context, []byte) error
	Close()
}

SeedRepository is the service storing the encrypted seed data.

type TransactionDetails

type TransactionDetails struct {
	TxID          string
	Hex           string
	Height        uint32
	Timestamp     int64
	Confirmations uint32
}

type Utxo

type Utxo struct {
	wire.OutPoint
	Value         uint64
	Script        string
	Address       string
	Confirmations uint32
}

Jump to

Keyboard shortcuts

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