wallet

package
v0.0.0-...-ea68448 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(wallet ports.WalletService, nodeRPC string) (*Service, error)

NewService builds the wallet service. nodeRPC is an optional Sequentia node JSON-RPC url (http://user:pass@host:port) used to read the open fee-market exchange rates; when empty, the open fee market is disabled and swaps pay the network fee in the native asset (legacy behavior).

func (*Service) Account

func (s *Service) Account() ports.Account

func (*Service) Close

func (s *Service) Close()

func (*Service) CompleteSwap

func (s *Service) CompleteSwap(
	account string, swapRequest ports.SwapRequest, msatsPerByte uint64,
	feesToAdd bool, blind bool,
) (string, []ports.Utxo, int64, error)

func (*Service) NativeAsset

func (s *Service) NativeAsset() string

func (*Service) Network

func (s *Service) Network() network.Network

Network returns the Sequentia network parameters for the network the ocean wallet reports. The ocean-wallet adapter stringifies the wallet's network enum to "mainnet"/"testnet"/"regtest"; seqnet.ByName also accepts the Sequentia names and "liquid", so the mapping is robust regardless of the exact spelling. The native (policy) asset is genesis-derived and supplied at runtime from the wallet's GetInfo.nativeAsset (read from the node's getsidechaininfo.pegged_asset). Falls back to Sequentia mainnet if the signal is unrecognised.

func (*Service) Notification

func (s *Service) Notification() ports.Notification

func (*Service) RegisterHandlerForTxEvent

func (s *Service) RegisterHandlerForTxEvent(
	handler func(ports.WalletTxNotification) bool,
)

func (*Service) RegisterHandlerForUtxoEvent

func (s *Service) RegisterHandlerForUtxoEvent(
	handler func(ports.WalletUtxoNotification) bool,
)

func (*Service) SendToMany

func (s *Service) SendToMany(
	account string, outs []ports.TxOutput, msatsPerByte uint64,
) (string, error)

func (*Service) Transaction

func (s *Service) Transaction() ports.Transaction

func (*Service) Wallet

func (s *Service) Wallet() ports.Wallet

Jump to

Keyboard shortcuts

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