Documentation
¶
Index ¶
- Variables
- func MppPayment(spw SendPayPartWaiter, payreq string, channel string, ...) (string, error)
- type AddPeer
- type AddSuspiciousPeer
- func (g *AddSuspiciousPeer) Call() (jrpc2.Result, error)
- func (c AddSuspiciousPeer) Description() string
- func (g *AddSuspiciousPeer) Get(client *ClightningClient) jrpc2.ServerMethod
- func (c AddSuspiciousPeer) LongDescription() string
- func (g *AddSuspiciousPeer) Name() string
- func (g *AddSuspiciousPeer) New() interface{}
- type AllowSwapRequests
- func (g *AllowSwapRequests) Call() (jrpc2.Result, error)
- func (c AllowSwapRequests) Description() string
- func (g *AllowSwapRequests) Get(client *ClightningClient) jrpc2.ServerMethod
- func (c AllowSwapRequests) LongDescription() string
- func (g *AllowSwapRequests) Name() string
- func (g *AllowSwapRequests) New() interface{}
- type ClightningClient
- func (cl *ClightningClient) AddMessageHandler(f func(peerId string, msgType string, payload []byte) error)
- func (cl *ClightningClient) AddPaymentCallback(f func(swapId string, invoiceType swap.InvoiceType))
- func (cl *ClightningClient) AddPaymentNotifier(swapId string, payreq string, invoiceType swap.InvoiceType)
- func (cl *ClightningClient) BroadcastOpeningTx(unpreparedTxHex string) (txId, txHex string, error error)
- func (cl *ClightningClient) CheckChannel(channelId string, amountSat uint64) error
- func (cl *ClightningClient) CreateCoopSpendingTransaction(swapParams *swap.OpeningParams, claimParams *swap.ClaimParams, ...) (txId, txHex string, error error)
- func (cl *ClightningClient) CreateCsvSpendingTransaction(swapParams *swap.OpeningParams, claimParams *swap.ClaimParams) (txId, txHex string, error error)
- func (cl *ClightningClient) CreateOpeningTransaction(swapParams *swap.OpeningParams) (unpreparedTxHex string, fee uint64, vout uint32, err error)
- func (cl *ClightningClient) CreatePreimageSpendingTransaction(swapParams *swap.OpeningParams, claimParams *swap.ClaimParams) (txId, txHex string, err error)
- func (cl *ClightningClient) DecodePayreq(payreq string) (paymentHash string, amountMsat uint64, expiry int64, err error)
- func (cl *ClightningClient) GetAsset() string
- func (cl *ClightningClient) GetConfig() (*PeerswapClightningConfig, error)
- func (cl *ClightningClient) GetFlatSwapOutFee() (uint64, error)
- func (cl *ClightningClient) GetLightningRpc() *glightning.Lightning
- func (cl *ClightningClient) GetNetwork() string
- func (cl *ClightningClient) GetNodeId() string
- func (cl *ClightningClient) GetOnchainBalance() (uint64, error)
- func (cl *ClightningClient) GetOutputScript(params *swap.OpeningParams) ([]byte, error)
- func (cl *ClightningClient) GetPayreq(amountMsat uint64, preImage string, swapId string, memo string, ...) (string, error)
- func (cl *ClightningClient) GetPeers() []string
- func (cl *ClightningClient) GetPreimage() (lightning.Preimage, error)
- func (cl *ClightningClient) GetRefundFee() (uint64, error)
- func (cl *ClightningClient) NewAddress() (string, error)
- func (cl *ClightningClient) OnConnect(connectEvent *glightning.ConnectEvent)
- func (cl *ClightningClient) OnCustomMsg(event *glightning.CustomMsgReceivedEvent) (*glightning.CustomMsgReceivedResponse, error)
- func (cl *ClightningClient) PayInvoice(payreq string) (preimage string, err error)
- func (cl *ClightningClient) PayInvoiceViaChannel(payreq string, scid string) (preimage string, err error)
- func (cl *ClightningClient) RebalancePayment(payreq string, channel string) (preimage string, err error)
- func (cl *ClightningClient) RegisterMethods() error
- func (cl *ClightningClient) RegisterOptions() error
- func (cl *ClightningClient) SendMessage(peerId string, message []byte, messageType int) error
- func (cl *ClightningClient) SendPayPart(payreq string, bolt11 *glightning.DecodedBolt11, amountMsat uint64, ...) (*glightning.SendPayResult, error)
- func (cl *ClightningClient) SendPayPartAndWait(paymentRequest string, bolt11 *glightning.DecodedBolt11, amountMsat uint64, ...) (*glightning.SendPayFields, error)
- func (cl *ClightningClient) SetReady()
- func (cl *ClightningClient) SetupClients(liquidWallet *wallet.ElementsRpcWallet, swaps *swap.SwapService, ...)
- func (cl *ClightningClient) Start() error
- type GetAddressResponse
- type GetBalanceResponse
- type GetRequestedSwaps
- func (c GetRequestedSwaps) Call() (jrpc2.Result, error)
- func (c GetRequestedSwaps) Description() string
- func (c *GetRequestedSwaps) Get(client *ClightningClient) jrpc2.ServerMethod
- func (c GetRequestedSwaps) LongDescription() string
- func (c GetRequestedSwaps) Name() string
- func (c GetRequestedSwaps) New() interface{}
- type GetSwap
- type Glightninglogger
- type LiquidGetAddress
- func (g *LiquidGetAddress) Call() (jrpc2.Result, error)
- func (g *LiquidGetAddress) Description() string
- func (g *LiquidGetAddress) Get(client *ClightningClient) jrpc2.ServerMethod
- func (g *LiquidGetAddress) LongDescription() string
- func (g *LiquidGetAddress) Name() string
- func (g *LiquidGetAddress) New() interface{}
- type LiquidGetBalance
- func (g *LiquidGetBalance) Call() (jrpc2.Result, error)
- func (g *LiquidGetBalance) Description() string
- func (g *LiquidGetBalance) Get(client *ClightningClient) jrpc2.ServerMethod
- func (g *LiquidGetBalance) LongDescription() string
- func (g *LiquidGetBalance) Name() string
- func (g *LiquidGetBalance) New() interface{}
- type LiquidSendToAddress
- func (s *LiquidSendToAddress) Call() (jrpc2.Result, error)
- func (s *LiquidSendToAddress) Description() string
- func (s *LiquidSendToAddress) Get(client *ClightningClient) jrpc2.ServerMethod
- func (s *LiquidSendToAddress) LongDescription() string
- func (s *LiquidSendToAddress) Name() string
- func (s *LiquidSendToAddress) New() interface{}
- type ListActiveSwaps
- func (g *ListActiveSwaps) Call() (jrpc2.Result, error)
- func (c ListActiveSwaps) Description() string
- func (g *ListActiveSwaps) Get(client *ClightningClient) jrpc2.ServerMethod
- func (c ListActiveSwaps) LongDescription() string
- func (g *ListActiveSwaps) Name() string
- func (g *ListActiveSwaps) New() interface{}
- type ListNodes
- type ListPeers
- type ListSwaps
- type PeerSwapNodes
- type PeerSwapPeer
- type PeerSwapPeerChannel
- type PeerswapClightningConfig
- type PolicyReloader
- type ReloadPolicyFile
- func (c ReloadPolicyFile) Call() (jrpc2.Result, error)
- func (c ReloadPolicyFile) Description() string
- func (c *ReloadPolicyFile) Get(client *ClightningClient) jrpc2.ServerMethod
- func (c *ReloadPolicyFile) LongDescription() string
- func (c ReloadPolicyFile) Name() string
- func (c ReloadPolicyFile) New() interface{}
- type RemovePeer
- type RemoveSuspiciousPeer
- func (g *RemoveSuspiciousPeer) Call() (jrpc2.Result, error)
- func (c RemoveSuspiciousPeer) Description() string
- func (g *RemoveSuspiciousPeer) Get(client *ClightningClient) jrpc2.ServerMethod
- func (c RemoveSuspiciousPeer) LongDescription() string
- func (g *RemoveSuspiciousPeer) Name() string
- func (g *RemoveSuspiciousPeer) New() interface{}
- type SendPayPartWaiter
- type SendToAddressResponse
- type SerializedSwapStateMachine
- type SwapCanceledError
- type SwapIn
- type SwapOut
- type SwapStats
Constants ¶
This section is empty.
Variables ¶
var ErrWaitingForReady = fmt.Errorf("peerswap is still in the process of starting up")
Functions ¶
func MppPayment ¶
func MppPayment(spw SendPayPartWaiter, payreq string, channel string, bolt11 *glightning.DecodedBolt11) (string, error)
MppPayment splits the payment in parts and waits for the payments to finish. We split in 10 parts as this will always result in a set of payments that dont have a "rest" and are all of the exact same size. They match the total amount that we want to transfer. As we only send over a direct channel to a direct peer we also dont need to optimize on a small number of subpayments.
Types ¶
type AddPeer ¶
type AddPeer struct {
PeerPubkey string `json:"peer_pubkey"`
// contains filtered or unexported fields
}
func (AddPeer) Description ¶
func (*AddPeer) Get ¶
func (g *AddPeer) Get(client *ClightningClient) jrpc2.ServerMethod
func (AddPeer) LongDescription ¶
type AddSuspiciousPeer ¶
type AddSuspiciousPeer struct {
PeerPubkey string `json:"peer_pubkey"`
// contains filtered or unexported fields
}
func (AddSuspiciousPeer) Description ¶
func (c AddSuspiciousPeer) Description() string
func (*AddSuspiciousPeer) Get ¶
func (g *AddSuspiciousPeer) Get(client *ClightningClient) jrpc2.ServerMethod
func (AddSuspiciousPeer) LongDescription ¶
func (c AddSuspiciousPeer) LongDescription() string
func (*AddSuspiciousPeer) Name ¶
func (g *AddSuspiciousPeer) Name() string
func (*AddSuspiciousPeer) New ¶
func (g *AddSuspiciousPeer) New() interface{}
type AllowSwapRequests ¶
type AllowSwapRequests struct {
AllowSwapRequestsString string `json:"allow_swap_requests"`
// contains filtered or unexported fields
}
func (AllowSwapRequests) Description ¶
func (c AllowSwapRequests) Description() string
func (*AllowSwapRequests) Get ¶
func (g *AllowSwapRequests) Get(client *ClightningClient) jrpc2.ServerMethod
func (AllowSwapRequests) LongDescription ¶
func (c AllowSwapRequests) LongDescription() string
func (*AllowSwapRequests) Name ¶
func (g *AllowSwapRequests) Name() string
func (*AllowSwapRequests) New ¶
func (g *AllowSwapRequests) New() interface{}
type ClightningClient ¶
type ClightningClient struct {
Plugin *glightning.Plugin
Gelements *gelements.Elements
// contains filtered or unexported fields
}
ClightningClient is the main driver behind c-lightnings plugins system it handles rpc calls and messages
func NewClightningClient ¶
func NewClightningClient(ctx context.Context) (*ClightningClient, <-chan interface{}, error)
NewClightningClient returns a new clightning cl and channel which get closed when the Plugin is initialized
func (*ClightningClient) AddMessageHandler ¶
func (cl *ClightningClient) AddMessageHandler(f func(peerId string, msgType string, payload []byte) error)
AddMessageHandler adds a listener for incoming peermessages
func (*ClightningClient) AddPaymentCallback ¶
func (cl *ClightningClient) AddPaymentCallback(f func(swapId string, invoiceType swap.InvoiceType))
func (*ClightningClient) AddPaymentNotifier ¶
func (cl *ClightningClient) AddPaymentNotifier(swapId string, payreq string, invoiceType swap.InvoiceType)
func (*ClightningClient) BroadcastOpeningTx ¶
func (cl *ClightningClient) BroadcastOpeningTx(unpreparedTxHex string) (txId, txHex string, error error)
func (*ClightningClient) CheckChannel ¶
func (cl *ClightningClient) CheckChannel(channelId string, amountSat uint64) error
CheckChannel checks if a channel is eligable for a swap
func (*ClightningClient) CreateCoopSpendingTransaction ¶
func (cl *ClightningClient) CreateCoopSpendingTransaction(swapParams *swap.OpeningParams, claimParams *swap.ClaimParams, takerSigner swap.Signer) (txId, txHex string, error error)
func (*ClightningClient) CreateCsvSpendingTransaction ¶
func (cl *ClightningClient) CreateCsvSpendingTransaction(swapParams *swap.OpeningParams, claimParams *swap.ClaimParams) (txId, txHex string, error error)
func (*ClightningClient) CreateOpeningTransaction ¶
func (cl *ClightningClient) CreateOpeningTransaction(swapParams *swap.OpeningParams) (unpreparedTxHex string, fee uint64, vout uint32, err error)
func (*ClightningClient) CreatePreimageSpendingTransaction ¶
func (cl *ClightningClient) CreatePreimageSpendingTransaction(swapParams *swap.OpeningParams, claimParams *swap.ClaimParams) (txId, txHex string, err error)
func (*ClightningClient) DecodePayreq ¶
func (cl *ClightningClient) DecodePayreq(payreq string) (paymentHash string, amountMsat uint64, expiry int64, err error)
DecodePayreq decodes a Bolt11 Invoice
func (*ClightningClient) GetAsset ¶
func (cl *ClightningClient) GetAsset() string
func (*ClightningClient) GetConfig ¶
func (cl *ClightningClient) GetConfig() (*PeerswapClightningConfig, error)
GetConfig returns the peerswap config
func (*ClightningClient) GetFlatSwapOutFee ¶
func (cl *ClightningClient) GetFlatSwapOutFee() (uint64, error)
GetFlatSwapOutFee returns an estimated size for the opening transaction. This can be used to calculate the amount of the fee invoice and should cover most but not all cases. For an explanation of the estimation see comments of the onchain.EstimatedOpeningTxSize.
func (*ClightningClient) GetLightningRpc ¶
func (cl *ClightningClient) GetLightningRpc() *glightning.Lightning
func (*ClightningClient) GetNetwork ¶
func (cl *ClightningClient) GetNetwork() string
func (*ClightningClient) GetNodeId ¶
func (cl *ClightningClient) GetNodeId() string
GetNodeId returns the lightning nodes pubkey
func (*ClightningClient) GetOnchainBalance ¶
func (cl *ClightningClient) GetOnchainBalance() (uint64, error)
func (*ClightningClient) GetOutputScript ¶
func (cl *ClightningClient) GetOutputScript(params *swap.OpeningParams) ([]byte, error)
func (*ClightningClient) GetPayreq ¶
func (cl *ClightningClient) GetPayreq(amountMsat uint64, preImage string, swapId string, memo string, invoiceType swap.InvoiceType, expirySeconds, expiryCltv uint64) (string, error)
GetPayreq returns a Bolt11 Invoice
func (*ClightningClient) GetPeers ¶
func (cl *ClightningClient) GetPeers() []string
func (*ClightningClient) GetPreimage ¶
func (cl *ClightningClient) GetPreimage() (lightning.Preimage, error)
GetPreimage returns a random preimage
func (*ClightningClient) GetRefundFee ¶
func (cl *ClightningClient) GetRefundFee() (uint64, error)
func (*ClightningClient) NewAddress ¶
func (cl *ClightningClient) NewAddress() (string, error)
func (*ClightningClient) OnConnect ¶
func (cl *ClightningClient) OnConnect(connectEvent *glightning.ConnectEvent)
OnConnect is called after the connect event. The handler sends out a poll to the peer it connected to.
func (*ClightningClient) OnCustomMsg ¶
func (cl *ClightningClient) OnCustomMsg(event *glightning.CustomMsgReceivedEvent) (*glightning.CustomMsgReceivedResponse, error)
OnCustomMsg is the hook that c-lightning calls
func (*ClightningClient) PayInvoice ¶
func (cl *ClightningClient) PayInvoice(payreq string) (preimage string, err error)
PayInvoice tries to pay a Bolt11 Invoice
func (*ClightningClient) PayInvoiceViaChannel ¶
func (cl *ClightningClient) PayInvoiceViaChannel(payreq string, scid string) (preimage string, err error)
PayInvoiceViaChannel ensures that the invoice is payed via the direct channel to the peer.
func (*ClightningClient) RebalancePayment ¶
func (cl *ClightningClient) RebalancePayment(payreq string, channel string) (preimage string, err error)
RebalancePayment handles the lightning payment that should rebalance the channel if the payment is larger than 4mm sats it forces a mpp payment through the channel
func (*ClightningClient) RegisterMethods ¶
func (cl *ClightningClient) RegisterMethods() error
RegisterMethods registeres rpc methods to c-lightning
func (*ClightningClient) RegisterOptions ¶
func (cl *ClightningClient) RegisterOptions() error
RegisterOptions adds options to clightning
func (*ClightningClient) SendMessage ¶
func (cl *ClightningClient) SendMessage(peerId string, message []byte, messageType int) error
SendMessage sends a hexmessage to a peer
func (*ClightningClient) SendPayPart ¶
func (cl *ClightningClient) SendPayPart(payreq string, bolt11 *glightning.DecodedBolt11, amountMsat uint64, channel string, label string, partId uint64) (*glightning.SendPayResult, error)
SendPayPart sends a payment through a specific channel. If the partId is not 0 it sends only the part of the payment that is set on amountMsat. the final amount is read from the bolt11.
func (*ClightningClient) SendPayPartAndWait ¶
func (cl *ClightningClient) SendPayPartAndWait(paymentRequest string, bolt11 *glightning.DecodedBolt11, amountMsat uint64, channel string, label string, partId uint64) (*glightning.SendPayFields, error)
func (*ClightningClient) SetReady ¶
func (cl *ClightningClient) SetReady()
func (*ClightningClient) SetupClients ¶
func (cl *ClightningClient) SetupClients(liquidWallet *wallet.ElementsRpcWallet, swaps *swap.SwapService, policy PolicyReloader, requestedSwaps *swap.RequestedSwapsPrinter, elements *gelements.Elements, bitcoin *gbitcoin.Bitcoin, bitcoinChain *onchain.BitcoinOnChain, pollService *poll.Service)
SetupClients injects the required services
type GetAddressResponse ¶
type GetAddressResponse struct {
LiquidAddress string `json:"lbtc_address"`
}
type GetBalanceResponse ¶
type GetBalanceResponse struct {
LiquidBalance uint64 `json:"lbtc_balance_sat"`
}
type GetRequestedSwaps ¶
type GetRequestedSwaps struct {
// contains filtered or unexported fields
}
func (GetRequestedSwaps) Description ¶
func (c GetRequestedSwaps) Description() string
func (*GetRequestedSwaps) Get ¶
func (c *GetRequestedSwaps) Get(client *ClightningClient) jrpc2.ServerMethod
func (GetRequestedSwaps) LongDescription ¶
func (c GetRequestedSwaps) LongDescription() string
func (GetRequestedSwaps) Name ¶
func (c GetRequestedSwaps) Name() string
func (GetRequestedSwaps) New ¶
func (c GetRequestedSwaps) New() interface{}
type GetSwap ¶
type GetSwap struct {
SwapId string `json:"swap_id"`
// contains filtered or unexported fields
}
func (*GetSwap) Description ¶
func (*GetSwap) Get ¶
func (g *GetSwap) Get(client *ClightningClient) jrpc2.ServerMethod
func (*GetSwap) LongDescription ¶
type Glightninglogger ¶
type Glightninglogger struct {
// contains filtered or unexported fields
}
func NewGlightninglogger ¶
func NewGlightninglogger(plugin *glightning.Plugin) *Glightninglogger
func (*Glightninglogger) Debugf ¶
func (g *Glightninglogger) Debugf(format string, v ...interface{})
func (*Glightninglogger) Infof ¶
func (g *Glightninglogger) Infof(format string, v ...interface{})
type LiquidGetAddress ¶
type LiquidGetAddress struct {
// contains filtered or unexported fields
}
LiquidGetAddress returns a new liquid address
func (*LiquidGetAddress) Description ¶
func (g *LiquidGetAddress) Description() string
func (*LiquidGetAddress) Get ¶
func (g *LiquidGetAddress) Get(client *ClightningClient) jrpc2.ServerMethod
func (*LiquidGetAddress) LongDescription ¶
func (g *LiquidGetAddress) LongDescription() string
func (*LiquidGetAddress) Name ¶
func (g *LiquidGetAddress) Name() string
func (*LiquidGetAddress) New ¶
func (g *LiquidGetAddress) New() interface{}
type LiquidGetBalance ¶
type LiquidGetBalance struct {
// contains filtered or unexported fields
}
GetBalance returns the liquid balance
func (*LiquidGetBalance) Description ¶
func (g *LiquidGetBalance) Description() string
func (*LiquidGetBalance) Get ¶
func (g *LiquidGetBalance) Get(client *ClightningClient) jrpc2.ServerMethod
func (*LiquidGetBalance) LongDescription ¶
func (g *LiquidGetBalance) LongDescription() string
func (*LiquidGetBalance) Name ¶
func (g *LiquidGetBalance) Name() string
func (*LiquidGetBalance) New ¶
func (g *LiquidGetBalance) New() interface{}
type LiquidSendToAddress ¶
type LiquidSendToAddress struct {
Address string `json:"address"`
AmountSat uint64 `json:"amount_sat"`
// contains filtered or unexported fields
}
LiquidSendToAddress sends
func (*LiquidSendToAddress) Description ¶
func (s *LiquidSendToAddress) Description() string
func (*LiquidSendToAddress) Get ¶
func (s *LiquidSendToAddress) Get(client *ClightningClient) jrpc2.ServerMethod
func (*LiquidSendToAddress) LongDescription ¶
func (s *LiquidSendToAddress) LongDescription() string
func (*LiquidSendToAddress) Name ¶
func (s *LiquidSendToAddress) Name() string
func (*LiquidSendToAddress) New ¶
func (s *LiquidSendToAddress) New() interface{}
type ListActiveSwaps ¶
type ListActiveSwaps struct {
// contains filtered or unexported fields
}
func (ListActiveSwaps) Description ¶
func (c ListActiveSwaps) Description() string
func (*ListActiveSwaps) Get ¶
func (g *ListActiveSwaps) Get(client *ClightningClient) jrpc2.ServerMethod
func (ListActiveSwaps) LongDescription ¶
func (c ListActiveSwaps) LongDescription() string
func (*ListActiveSwaps) Name ¶
func (g *ListActiveSwaps) Name() string
func (*ListActiveSwaps) New ¶
func (g *ListActiveSwaps) New() interface{}
type ListNodes ¶
type ListNodes struct {
// contains filtered or unexported fields
}
func (*ListNodes) Description ¶
func (*ListNodes) Get ¶
func (l *ListNodes) Get(client *ClightningClient) jrpc2.ServerMethod
func (*ListNodes) LongDescription ¶
type ListPeers ¶
type ListPeers struct {
// contains filtered or unexported fields
}
ListPeers lists all peerswap-ready peers
func (*ListPeers) Description ¶
func (*ListPeers) Get ¶
func (l *ListPeers) Get(client *ClightningClient) jrpc2.ServerMethod
func (*ListPeers) LongDescription ¶
type ListSwaps ¶
type ListSwaps struct {
DetailedPrint bool `json:"detailed,omitempty"`
// contains filtered or unexported fields
}
ListSwaps list all active and finished swaps
func (*ListSwaps) Description ¶
func (*ListSwaps) Get ¶
func (g *ListSwaps) Get(client *ClightningClient) jrpc2.ServerMethod
func (*ListSwaps) LongDescription ¶
type PeerSwapNodes ¶
type PeerSwapNodes struct {
Nodes []*glightning.Node `json:"nodes"`
}
type PeerSwapPeer ¶
type PeerSwapPeer struct {
NodeId string `json:"nodeid"`
SwapsAllowed bool `json:"swaps_allowed"`
SupportedAssets []string `json:"supported_assets"`
Channels []*PeerSwapPeerChannel `json:"channels"`
AsSender *SwapStats `json:"sent,omitempty"`
AsReceiver *SwapStats `json:"received,omitempty"`
PaidFee uint64 `json:"total_fee_paid"`
}
type PeerSwapPeerChannel ¶
type PeerswapClightningConfig ¶
type PeerswapClightningConfig struct {
DbPath string
BitcoinRpcUser string
BitcoinRpcPassword string
BitcoinRpcPasswordFile string
BitcoinRpcHost string
BitcoinRpcPort uint
BitcoinCookieFilePath string
LiquidRpcUser string
LiquidRpcPassword string
LiquidRpcPasswordFile string
LiquidRpcHost string
LiquidRpcPort uint
LiquidRpcWallet string
LiquidEnabled bool
PolicyPath string
}
PeerswapClightningConfig contains relevant config params for peerswap
type PolicyReloader ¶
type PolicyReloader interface {
AddToAllowlist(pubkey string) error
RemoveFromAllowlist(pubkey string) error
AddToSuspiciousPeerList(pubkey string) error
RemoveFromSuspiciousPeerList(pubkey string) error
NewSwapsAllowed() bool
DisableSwaps() error
EnableSwaps() error
ReloadFile() error
Get() policy.Policy
}
type ReloadPolicyFile ¶
type ReloadPolicyFile struct {
// contains filtered or unexported fields
}
func (ReloadPolicyFile) Description ¶
func (c ReloadPolicyFile) Description() string
func (*ReloadPolicyFile) Get ¶
func (c *ReloadPolicyFile) Get(client *ClightningClient) jrpc2.ServerMethod
func (*ReloadPolicyFile) LongDescription ¶
func (c *ReloadPolicyFile) LongDescription() string
func (ReloadPolicyFile) Name ¶
func (c ReloadPolicyFile) Name() string
func (ReloadPolicyFile) New ¶
func (c ReloadPolicyFile) New() interface{}
type RemovePeer ¶
type RemovePeer struct {
PeerPubkey string `json:"peer_pubkey"`
// contains filtered or unexported fields
}
func (RemovePeer) Description ¶
func (c RemovePeer) Description() string
func (*RemovePeer) Get ¶
func (g *RemovePeer) Get(client *ClightningClient) jrpc2.ServerMethod
func (RemovePeer) LongDescription ¶
func (c RemovePeer) LongDescription() string
func (*RemovePeer) Name ¶
func (g *RemovePeer) Name() string
func (*RemovePeer) New ¶
func (g *RemovePeer) New() interface{}
type RemoveSuspiciousPeer ¶
type RemoveSuspiciousPeer struct {
PeerPubkey string `json:"peer_pubkey"`
// contains filtered or unexported fields
}
func (RemoveSuspiciousPeer) Description ¶
func (c RemoveSuspiciousPeer) Description() string
func (*RemoveSuspiciousPeer) Get ¶
func (g *RemoveSuspiciousPeer) Get(client *ClightningClient) jrpc2.ServerMethod
func (RemoveSuspiciousPeer) LongDescription ¶
func (c RemoveSuspiciousPeer) LongDescription() string
func (*RemoveSuspiciousPeer) Name ¶
func (g *RemoveSuspiciousPeer) Name() string
func (*RemoveSuspiciousPeer) New ¶
func (g *RemoveSuspiciousPeer) New() interface{}
type SendPayPartWaiter ¶
type SendPayPartWaiter interface {
SendPayPartAndWait(paymentRequest string, bolt11 *glightning.DecodedBolt11, amountMsat uint64, channel string, label string, partId uint64) (*glightning.SendPayFields, error)
}
type SendToAddressResponse ¶
type SendToAddressResponse struct {
TxId string `json:"txid"`
}
type SerializedSwapStateMachine ¶
type SerializedSwapStateMachine struct {
*swap.SwapStateMachine
Type string `json:"type"`
Role string `json:"role"`
}
SerializedSwapStateMachine is the serialized representation of the internal state machine with all these massive (and unnecessary) amounts of data.
func MSerializedSwapStateMachine ¶
func MSerializedSwapStateMachine(swapStateMachine *swap.SwapStateMachine) *SerializedSwapStateMachine
type SwapCanceledError ¶
type SwapCanceledError string
func (SwapCanceledError) Error ¶
func (e SwapCanceledError) Error() string
type SwapIn ¶
type SwapIn struct {
SatAmt uint64 `json:"amt_sat"`
ShortChannelId string `json:"short_channel_id"`
Asset string `json:"asset"`
Force bool `json:"force"`
// contains filtered or unexported fields
}
SwapIn Starts a new swap in(providing onchain liquidity)
func (*SwapIn) Description ¶
func (*SwapIn) Get ¶
func (g *SwapIn) Get(client *ClightningClient) jrpc2.ServerMethod
func (*SwapIn) LongDescription ¶
type SwapOut ¶
type SwapOut struct {
SatAmt uint64 `json:"amt_sat"`
ShortChannelId string `json:"short_channel_id"`
Asset string `json:"asset"`
Force bool `json:"force"`
// contains filtered or unexported fields
}
SwapOut starts a new swapout (paying an Invoice for onchain liquidity)
func (*SwapOut) Description ¶
func (*SwapOut) Get ¶
func (g *SwapOut) Get(client *ClightningClient) jrpc2.ServerMethod