wallet

package
v2.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAutoConsolidateThreshold = uint64(200)
View Source
const GapLimit = 100
View Source
const MaxInputs = uint64(256)

Variables

View Source
var ErrSubAccountNotSet = errors.New("subaccount not set")
View Source
var TransactionNotifier = utils.ForwardChannel(make(chan TransactionNotification), 0, false)

Functions

func GenerateMnemonic

func GenerateMnemonic() (string, error)

func Init

func Init(walletConfig Config) error

func Initialized

func Initialized() bool

func UpdateConfig

func UpdateConfig(walletConfig Config)

Types

type AuthHandler

type AuthHandler = *C.struct_GA_auth_handler

type Config

type Config struct {
	DataDir                  string
	Network                  *boltz.Network
	Debug                    bool
	Electrum                 onchain.ElectrumConfig
	AutoConsolidateThreshold uint64
	MaxInputs                uint64
}

func (*Config) Validate

func (c *Config) Validate() error

type Json

type Json = *C.GA_json

type Notification

type Notification string

type Session

type Session = *C.struct_GA_session

type Subaccount

type Subaccount struct {
	Pointer         uint64   `json:"pointer"`
	Name            string   `json:"name"`
	Type            string   `json:"type"`
	Used            bool     `json:"bip44_discovered"`
	CoreDescriptors []string `json:"core_descriptors"`
}

type TransactionNotification

type TransactionNotification struct {
	TxId     string
	Currency boltz.Currency
}

type Wallet

type Wallet struct {
	onchain.WalletInfo
	// contains filtered or unexported fields
}

func Login

func Login(credentials *onchain.WalletCredentials) (*Wallet, error)

func (*Wallet) ApplyTransaction added in v2.8.1

func (wallet *Wallet) ApplyTransaction(txHex string) error

func (*Wallet) BumpTransactionFee added in v2.5.0

func (wallet *Wallet) BumpTransactionFee(txId string, satPerVbyte float64) (string, error)

func (*Wallet) Connect

func (wallet *Wallet) Connect() error

func (*Wallet) CurrentSubaccount

func (wallet *Wallet) CurrentSubaccount() (uint64, error)

func (*Wallet) Disconnect

func (wallet *Wallet) Disconnect() error

func (*Wallet) GetBalance

func (wallet *Wallet) GetBalance() (*onchain.Balance, error)

func (*Wallet) GetOutputs

func (wallet *Wallet) GetOutputs(address string) ([]*onchain.Output, error)

func (*Wallet) GetSendFee

func (wallet *Wallet) GetSendFee(args onchain.WalletSendArgs) (send uint64, fee uint64, err error)

func (*Wallet) GetSubaccount

func (wallet *Wallet) GetSubaccount(pointer uint64) (*Subaccount, error)

func (*Wallet) GetSubaccountBalance

func (wallet *Wallet) GetSubaccountBalance(subaccount uint64) (*onchain.Balance, error)

func (*Wallet) GetSubaccounts

func (wallet *Wallet) GetSubaccounts(refresh bool) ([]*Subaccount, error)

func (*Wallet) GetTransactions

func (wallet *Wallet) GetTransactions(limit, offset uint64) ([]*onchain.WalletTransaction, error)

func (*Wallet) GetWalletInfo

func (wallet *Wallet) GetWalletInfo() onchain.WalletInfo

func (*Wallet) NewAddress

func (wallet *Wallet) NewAddress() (string, error)

func (*Wallet) Ready

func (wallet *Wallet) Ready() bool

func (*Wallet) SendToAddress

func (wallet *Wallet) SendToAddress(args onchain.WalletSendArgs) (tx string, err error)

func (*Wallet) SetSubaccount

func (wallet *Wallet) SetSubaccount(subaccount *uint64) (*uint64, error)

func (*Wallet) Sync added in v2.8.0

func (wallet *Wallet) Sync() error

Jump to

Keyboard shortcuts

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