Documentation
¶
Index ¶
- Constants
- Variables
- type BuildInfo
- type Notification
- type Service
- func (s *Service) AddDefaultSettings(ctx context.Context) error
- func (s *Service) ClaimVHTLC(ctx context.Context, preimage []byte, vhtlc_id string) (string, error)
- func (s *Service) ConnectLN(ctx context.Context, lnUrl string) error
- func (s *Service) DisconnectLN()
- func (s *Service) GetAddress(ctx context.Context, sats uint64) (string, string, string, string, string, error)
- func (s *Service) GetBalanceLN(ctx context.Context) (balance uint64, err error)
- func (s *Service) GetDelegatePublicKey(ctx context.Context) (string, error)
- func (s *Service) GetInvoice(ctx context.Context, amount uint64) (SwapResponse, error)
- func (s *Service) GetLnConnectUrl() string
- func (s *Service) GetRound(ctx context.Context, roundId string) (*indexer.CommitmentTx, error)
- func (s *Service) GetSettings(ctx context.Context) (*domain.Settings, error)
- func (s *Service) GetSwapHistory(ctx context.Context) ([]domain.Swap, error)
- func (s *Service) GetSyncedUpdate() <-chan types.SyncEvent
- func (s *Service) GetTotalBalance(ctx context.Context) (uint64, error)
- func (s *Service) GetVHTLC(ctx context.Context, receiverPubkey, senderPubkey *btcec.PublicKey, ...) (string, string, *vhtlc.VHTLCScript, *vhtlc.Opts, error)
- func (s *Service) GetVirtualTxs(ctx context.Context, txids []string) ([]string, error)
- func (s *Service) GetVtxoNotifications(ctx context.Context) <-chan Notification
- func (s *Service) GetWalletUpdates() <-chan WalletUpdate
- func (s *Service) IncreaseInboundCapacity(ctx context.Context, amount uint64) (string, error)
- func (s *Service) IncreaseOutboundCapacity(ctx context.Context, amount uint64) (SwapResponse, error)
- func (s *Service) IsConnectedLN() bool
- func (s *Service) IsInitialized() bool
- func (s *Service) IsInvoiceSettled(ctx context.Context, invoice string) (bool, error)
- func (s *Service) IsLocked(ctx context.Context) bool
- func (s *Service) IsPreConfiguredLN() bool
- func (s *Service) IsSynced() (bool, error)
- func (s *Service) ListVHTLC(ctx context.Context, vhtlc_id string) ([]types.Vtxo, []domain.Vhtlc, error)
- func (s *Service) ListWatchedAddresses(ctx context.Context) ([]domain.VtxoRolloverTarget, error)
- func (s *Service) LockNode(ctx context.Context) error
- func (s *Service) NewSettings(ctx context.Context, settings domain.Settings) error
- func (s *Service) PayInvoice(ctx context.Context, invoice string) (*SwapResponse, error)
- func (s *Service) PayOffer(ctx context.Context, offer string) (*SwapResponse, error)
- func (s *Service) RefundVHTLC(ctx context.Context, swapId, vhtlc_id string, withReceiver bool) (string, error)
- func (s *Service) ResetWallet(ctx context.Context) error
- func (s *Service) SendOnChain(ctx context.Context, addr string, amount uint64) (string, error)
- func (s *Service) Settle(ctx context.Context) (string, error)
- func (s *Service) Setup(ctx context.Context, serverUrl, password, privateKey string) (err error)
- func (s *Service) SetupFromMnemonic(ctx context.Context, serverUrl, password, mnemonic string) error
- func (s *Service) SubscribeForAddresses(ctx context.Context, addresses []string) error
- func (s *Service) UnlockNode(ctx context.Context, password string) error
- func (s *Service) UnsubscribeForAddresses(ctx context.Context, addresses []string) error
- func (s *Service) UnwatchAddress(ctx context.Context, address string) error
- func (s *Service) UpdateSettings(ctx context.Context, settings domain.Settings) error
- func (s *Service) WatchAddressForRollover(ctx context.Context, address, destinationAddress string, taprootTree []string) error
- func (s *Service) WhenNextSettlement(ctx context.Context) time.Time
- type SwapResponse
- type WalletUpdate
Constants ¶
View Source
const ( WalletInit = "init" WalletUnlock = "unlock" WalletReset = "reset" )
Variables ¶
View Source
var ErrorNoVtxosFound = fmt.Errorf("no vtxos found for the given vhtlc opts")
Functions ¶
This section is empty.
Types ¶
type Notification ¶
type Service ¶
type Service struct {
BuildInfo BuildInfo
arksdk.ArkClient
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) AddDefaultSettings ¶
func (*Service) ClaimVHTLC ¶
func (*Service) DisconnectLN ¶
func (s *Service) DisconnectLN()
func (*Service) GetAddress ¶
func (*Service) GetBalanceLN ¶
func (*Service) GetDelegatePublicKey ¶
func (*Service) GetInvoice ¶
func (*Service) GetLnConnectUrl ¶ added in v0.3.0
func (*Service) GetSettings ¶
func (*Service) GetSwapHistory ¶ added in v0.1.12
func (*Service) GetSyncedUpdate ¶ added in v0.3.0
func (*Service) GetTotalBalance ¶
func (*Service) GetVHTLC ¶
func (s *Service) GetVHTLC( ctx context.Context, receiverPubkey, senderPubkey *btcec.PublicKey, preimageHash []byte, refundLocktimeParam *arklib.AbsoluteLocktime, unilateralClaimDelayParam *arklib.RelativeLocktime, unilateralRefundDelayParam *arklib.RelativeLocktime, unilateralRefundWithoutReceiverDelayParam *arklib.RelativeLocktime, ) (string, string, *vhtlc.VHTLCScript, *vhtlc.Opts, error)
func (*Service) GetVirtualTxs ¶ added in v0.3.0
func (*Service) GetVtxoNotifications ¶
func (s *Service) GetVtxoNotifications(ctx context.Context) <-chan Notification
func (*Service) GetWalletUpdates ¶ added in v0.1.12
func (s *Service) GetWalletUpdates() <-chan WalletUpdate
func (*Service) IncreaseInboundCapacity ¶
ln -> ark (reverse submarine swap)
func (*Service) IncreaseOutboundCapacity ¶
func (s *Service) IncreaseOutboundCapacity( ctx context.Context, amount uint64, ) (SwapResponse, error)
ark -> ln (submarine swap)
func (*Service) IsConnectedLN ¶
func (*Service) IsInitialized ¶ added in v0.3.0
func (*Service) IsInvoiceSettled ¶
func (*Service) IsPreConfiguredLN ¶ added in v0.3.0
func (*Service) ListWatchedAddresses ¶
func (*Service) NewSettings ¶
func (*Service) PayInvoice ¶
func (*Service) RefundVHTLC ¶ added in v0.1.4
func (*Service) ResetWallet ¶ added in v0.1.8
func (*Service) SendOnChain ¶ added in v0.3.0
func (*Service) SetupFromMnemonic ¶
func (*Service) SubscribeForAddresses ¶
func (*Service) UnlockNode ¶
func (*Service) UnsubscribeForAddresses ¶
func (*Service) UnwatchAddress ¶
func (*Service) UpdateSettings ¶
func (*Service) WatchAddressForRollover ¶
type SwapResponse ¶ added in v0.3.0
type SwapResponse struct {
TxId string
SwapStatus domain.SwapStatus
Invoice string
}
type WalletUpdate ¶ added in v0.1.12
Click to show internal directories.
Click to hide internal directories.