domain

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 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 Settings

type Settings struct {
	ApiRoot     string
	ServerUrl   string
	EsploraUrl  string
	Currency    string
	EventServer string
	FullNode    string
	LnUrl       string
	Unit        string
}

type SettingsRepository

type SettingsRepository interface {
	AddDefaultSettings(ctx context.Context) error
	AddSettings(ctx context.Context, settings Settings) error
	GetSettings(ctx context.Context) (*Settings, error)
	CleanSettings(ctx context.Context) error
	UpdateSettings(ctx context.Context, settings Settings) error
	Close()
}

type SubscribedScriptRepository added in v0.1.13

type SubscribedScriptRepository interface {
	Get(ctx context.Context) ([]string, error)
	Add(ctx context.Context, subscribedScripts []string) (count int, err error)
	Delete(ctx context.Context, subscribedScripts []string) (count int, err error)
	Close()
}

type Swap added in v0.1.12

type Swap struct {
	Id          string
	Amount      uint64
	Timestamp   int64
	To          boltz.Currency
	From        boltz.Currency
	Status      SwapStatus
	Invoice     string
	VhtlcOpts   vhtlc.Opts
	FundingTxId string // the txid of the virtual tx that funded the vhtlc
	RedeemTxId  string // the txid of the virtual tx that redeemed the funds, by either "claiming" or "refunding"
}

type SwapRepository added in v0.1.12

type SwapRepository interface {
	GetAll(ctx context.Context) ([]Swap, error)
	Get(ctx context.Context, swapId string) (*Swap, error)
	Add(ctx context.Context, swap Swap) error
	Close()
}

SwapRepository stores the Swap initiated by the wallet

type SwapStatus added in v0.1.12

type SwapStatus int
const (
	SwapPending SwapStatus = iota
	SwapFailed
	SwapSuccess
)

type VHTLCRepository

type VHTLCRepository interface {
	GetAll(ctx context.Context) ([]vhtlc.Opts, error)
	Get(ctx context.Context, preimageHash string) (*vhtlc.Opts, error)
	Add(ctx context.Context, opts vhtlc.Opts) error
	Close()
}

VHTLCRepository stores the VHTLC options owned by the wallet

type VtxoRolloverRepository

type VtxoRolloverRepository interface {
	AddTarget(ctx context.Context, target VtxoRolloverTarget) error
	GetTarget(ctx context.Context, address string) (*VtxoRolloverTarget, error)
	GetAllTargets(ctx context.Context) ([]VtxoRolloverTarget, error)
	DeleteTarget(ctx context.Context, address string) error
	Close()
}

type VtxoRolloverTarget

type VtxoRolloverTarget struct {
	Address            string   // The address being watched
	TaprootTree        []string // Full taproot tree as list of hex tapscripts
	DestinationAddress string   // Where VTXO should be rolled over to
}

VtxoRolloverTarget represents an address being watched for rollover

Jump to

Keyboard shortcuts

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