Documentation
¶
Index ¶
- type Service
- func (s *Service) Account() ports.Account
- func (s *Service) Close()
- func (s *Service) CompleteSwap(account string, swapRequest ports.SwapRequest, msatsPerByte uint64, ...) (string, []ports.Utxo, int64, error)
- func (s *Service) NativeAsset() string
- func (s *Service) Network() network.Network
- func (s *Service) Notification() ports.Notification
- func (s *Service) RegisterHandlerForTxEvent(handler func(ports.WalletTxNotification) bool)
- func (s *Service) RegisterHandlerForUtxoEvent(handler func(ports.WalletUtxoNotification) bool)
- func (s *Service) SendToMany(account string, outs []ports.TxOutput, msatsPerByte uint64) (string, error)
- func (s *Service) Transaction() ports.Transaction
- func (s *Service) Wallet() ports.Wallet
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) CompleteSwap ¶
func (*Service) NativeAsset ¶
func (*Service) 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 (*Service) Transaction ¶
func (s *Service) Transaction() ports.Transaction