Documentation ¶
Index ¶
- Constants
- type AutoSwap
- func (autoSwap *AutoSwap) Error() string
- func (autoSwap *AutoSwap) GetChainSwapper(tenantId database.Id) *ChainSwapper
- func (autoSwap *AutoSwap) GetConfig(tenantId *database.Id) *Config
- func (c *AutoSwap) GetCurrentBudget(createIfMissing bool, swapperType SwapperType, cfg budgetConfig, ...) (*Budget, error)
- func (autoSwap *AutoSwap) GetLnSwapper() *LightningSwapper
- func (autoSwap *AutoSwap) Init(db *database.Database, onchain *onchain.Onchain, configPath string, ...)
- func (autoSwap *AutoSwap) LoadConfig() error
- func (autoSwap *AutoSwap) UpdateChainConfig(request *autoswaprpc.UpdateChainConfigRequest, tenant database.Tenant) error
- func (autoSwap *AutoSwap) UpdateLightningConfig(request *autoswaprpc.UpdateLightningConfigRequest) error
- func (autoSwap *AutoSwap) WalletUsed(id database.Id) bool
- type Balance
- type Budget
- type ChainConfig
- func (cfg *ChainConfig) CheckAndExecute(accepted *autoswaprpc.ChainSwap, force bool) error
- func (cfg *ChainConfig) Description() string
- func (cfg *ChainConfig) GetCurrentBudget(createIfMissing bool) (*Budget, error)
- func (cfg *ChainConfig) GetRecommendation() (*autoswaprpc.ChainRecommendation, error)
- func (cfg *ChainConfig) GetTenantId() database.Id
- func (cfg *ChainConfig) Init() (err error)
- type ChainRecommendation
- type ChainSwap
- type ChainSwapper
- type Config
- type DismissedChannels
- type LightningConfig
- func (cfg *LightningConfig) AllowNormalSwaps() bool
- func (cfg *LightningConfig) AllowReverseSwaps() bool
- func (cfg *LightningConfig) Allowed(swapType boltz.SwapType) bool
- func (cfg *LightningConfig) CheckAndExecute(accepted []*autoswaprpc.LightningRecommendation, force bool) error
- func (cfg *LightningConfig) Description() string
- func (cfg *LightningConfig) GetCurrentBudget(createIfMissing bool) (*Budget, error)
- func (cfg *LightningConfig) GetPair(swapType boltzrpc.SwapType) *boltzrpc.Pair
- func (cfg *LightningConfig) GetSwapRecommendations(includeAll bool) ([]*autoswaprpc.LightningRecommendation, error)
- func (cfg *LightningConfig) Init() error
- func (cfg *LightningConfig) InitWallet() (err error)
- type LightningRecommendation
- type LightningSwap
- type LightningSwapper
- type MockRpcProvider
- func (_m *MockRpcProvider) CreateAutoChainSwap(tenant *database.Tenant, request *boltzrpc.CreateChainSwapRequest) error
- func (_m *MockRpcProvider) CreateAutoReverseSwap(tenant *database.Tenant, request *boltzrpc.CreateReverseSwapRequest) error
- func (_m *MockRpcProvider) CreateAutoSwap(tenant *database.Tenant, request *boltzrpc.CreateSwapRequest) error
- func (_m *MockRpcProvider) EXPECT() *MockRpcProvider_Expecter
- func (_m *MockRpcProvider) GetAutoSwapPairInfo(swapType boltzrpc.SwapType, pair *boltzrpc.Pair) (*boltzrpc.PairInfo, error)
- func (_m *MockRpcProvider) GetBlockUpdates(currency boltz.Currency) (<-chan *onchain.BlockEpoch, func())
- func (_m *MockRpcProvider) GetLightningChannels() ([]*lightning.LightningChannel, error)
- func (_m *MockRpcProvider) WalletSendFee(request *boltzrpc.WalletSendRequest) (*boltzrpc.WalletSendFee, error)
- type MockRpcProvider_CreateAutoChainSwap_Call
- func (_c *MockRpcProvider_CreateAutoChainSwap_Call) Return(_a0 error) *MockRpcProvider_CreateAutoChainSwap_Call
- func (_c *MockRpcProvider_CreateAutoChainSwap_Call) Run(run func(tenant *database.Tenant, request *boltzrpc.CreateChainSwapRequest)) *MockRpcProvider_CreateAutoChainSwap_Call
- func (_c *MockRpcProvider_CreateAutoChainSwap_Call) RunAndReturn(run func(*database.Tenant, *boltzrpc.CreateChainSwapRequest) error) *MockRpcProvider_CreateAutoChainSwap_Call
- type MockRpcProvider_CreateAutoReverseSwap_Call
- func (_c *MockRpcProvider_CreateAutoReverseSwap_Call) Return(_a0 error) *MockRpcProvider_CreateAutoReverseSwap_Call
- func (_c *MockRpcProvider_CreateAutoReverseSwap_Call) Run(run func(tenant *database.Tenant, request *boltzrpc.CreateReverseSwapRequest)) *MockRpcProvider_CreateAutoReverseSwap_Call
- func (_c *MockRpcProvider_CreateAutoReverseSwap_Call) RunAndReturn(run func(*database.Tenant, *boltzrpc.CreateReverseSwapRequest) error) *MockRpcProvider_CreateAutoReverseSwap_Call
- type MockRpcProvider_CreateAutoSwap_Call
- func (_c *MockRpcProvider_CreateAutoSwap_Call) Return(_a0 error) *MockRpcProvider_CreateAutoSwap_Call
- func (_c *MockRpcProvider_CreateAutoSwap_Call) Run(run func(tenant *database.Tenant, request *boltzrpc.CreateSwapRequest)) *MockRpcProvider_CreateAutoSwap_Call
- func (_c *MockRpcProvider_CreateAutoSwap_Call) RunAndReturn(run func(*database.Tenant, *boltzrpc.CreateSwapRequest) error) *MockRpcProvider_CreateAutoSwap_Call
- type MockRpcProvider_Expecter
- func (_e *MockRpcProvider_Expecter) CreateAutoChainSwap(tenant interface{}, request interface{}) *MockRpcProvider_CreateAutoChainSwap_Call
- func (_e *MockRpcProvider_Expecter) CreateAutoReverseSwap(tenant interface{}, request interface{}) *MockRpcProvider_CreateAutoReverseSwap_Call
- func (_e *MockRpcProvider_Expecter) CreateAutoSwap(tenant interface{}, request interface{}) *MockRpcProvider_CreateAutoSwap_Call
- func (_e *MockRpcProvider_Expecter) GetAutoSwapPairInfo(swapType interface{}, pair interface{}) *MockRpcProvider_GetAutoSwapPairInfo_Call
- func (_e *MockRpcProvider_Expecter) GetBlockUpdates(currency interface{}) *MockRpcProvider_GetBlockUpdates_Call
- func (_e *MockRpcProvider_Expecter) GetLightningChannels() *MockRpcProvider_GetLightningChannels_Call
- func (_e *MockRpcProvider_Expecter) WalletSendFee(request interface{}) *MockRpcProvider_WalletSendFee_Call
- type MockRpcProvider_GetAutoSwapPairInfo_Call
- func (_c *MockRpcProvider_GetAutoSwapPairInfo_Call) Return(_a0 *boltzrpc.PairInfo, _a1 error) *MockRpcProvider_GetAutoSwapPairInfo_Call
- func (_c *MockRpcProvider_GetAutoSwapPairInfo_Call) Run(run func(swapType boltzrpc.SwapType, pair *boltzrpc.Pair)) *MockRpcProvider_GetAutoSwapPairInfo_Call
- func (_c *MockRpcProvider_GetAutoSwapPairInfo_Call) RunAndReturn(run func(boltzrpc.SwapType, *boltzrpc.Pair) (*boltzrpc.PairInfo, error)) *MockRpcProvider_GetAutoSwapPairInfo_Call
- type MockRpcProvider_GetBlockUpdates_Call
- func (_c *MockRpcProvider_GetBlockUpdates_Call) Return(_a0 <-chan *onchain.BlockEpoch, _a1 func()) *MockRpcProvider_GetBlockUpdates_Call
- func (_c *MockRpcProvider_GetBlockUpdates_Call) Run(run func(currency boltz.Currency)) *MockRpcProvider_GetBlockUpdates_Call
- func (_c *MockRpcProvider_GetBlockUpdates_Call) RunAndReturn(run func(boltz.Currency) (<-chan *onchain.BlockEpoch, func())) *MockRpcProvider_GetBlockUpdates_Call
- type MockRpcProvider_GetLightningChannels_Call
- func (_c *MockRpcProvider_GetLightningChannels_Call) Return(_a0 []*lightning.LightningChannel, _a1 error) *MockRpcProvider_GetLightningChannels_Call
- func (_c *MockRpcProvider_GetLightningChannels_Call) Run(run func()) *MockRpcProvider_GetLightningChannels_Call
- func (_c *MockRpcProvider_GetLightningChannels_Call) RunAndReturn(run func() ([]*lightning.LightningChannel, error)) *MockRpcProvider_GetLightningChannels_Call
- type MockRpcProvider_WalletSendFee_Call
- func (_c *MockRpcProvider_WalletSendFee_Call) Return(_a0 *boltzrpc.WalletSendFee, _a1 error) *MockRpcProvider_WalletSendFee_Call
- func (_c *MockRpcProvider_WalletSendFee_Call) Run(run func(request *boltzrpc.WalletSendRequest)) *MockRpcProvider_WalletSendFee_Call
- func (_c *MockRpcProvider_WalletSendFee_Call) RunAndReturn(run func(*boltzrpc.WalletSendRequest) (*boltzrpc.WalletSendFee, error)) *MockRpcProvider_WalletSendFee_Call
- type RpcProvider
- type SerializedChainConfig
- type SerializedLnConfig
- type Strategy
- type SwapperType
Constants ¶
const ( ReasonMaxFeePercent = "fee exceeds maximum percentage" ReasonAmountBelowMin = "amount below minimal" ReasonBudgetExceeded = "budget exceeded" ReasonPendingSwap = "pending swap" ReasonFailedSwap = "failed swap" ReasonInsufficientFunds = "insufficient funds" )
const DefaultReserve = boltz.Percentage(10)
const MinReserve = uint64(10000)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoSwap ¶
type AutoSwap struct {
// contains filtered or unexported fields
}
func (*AutoSwap) GetChainSwapper ¶
func (autoSwap *AutoSwap) GetChainSwapper(tenantId database.Id) *ChainSwapper
func (*AutoSwap) GetCurrentBudget ¶
func (*AutoSwap) GetLnSwapper ¶
func (autoSwap *AutoSwap) GetLnSwapper() *LightningSwapper
func (*AutoSwap) LoadConfig ¶
func (*AutoSwap) UpdateChainConfig ¶
func (autoSwap *AutoSwap) UpdateChainConfig(request *autoswaprpc.UpdateChainConfigRequest, tenant database.Tenant) error
func (*AutoSwap) UpdateLightningConfig ¶
func (autoSwap *AutoSwap) UpdateLightningConfig(request *autoswaprpc.UpdateLightningConfigRequest) error
type Balance ¶
type Balance struct { Absolute uint64 Relative boltz.Percentage }
func (Balance) IsAbsolute ¶
type ChainConfig ¶
type ChainConfig struct { *SerializedChainConfig // contains filtered or unexported fields }
func NewChainConfig ¶
func NewChainConfig(serialized *SerializedChainConfig, shared shared) *ChainConfig
func (*ChainConfig) CheckAndExecute ¶
func (cfg *ChainConfig) CheckAndExecute(accepted *autoswaprpc.ChainSwap, force bool) error
func (*ChainConfig) Description ¶
func (cfg *ChainConfig) Description() string
func (*ChainConfig) GetCurrentBudget ¶
func (cfg *ChainConfig) GetCurrentBudget(createIfMissing bool) (*Budget, error)
func (*ChainConfig) GetRecommendation ¶
func (cfg *ChainConfig) GetRecommendation() (*autoswaprpc.ChainRecommendation, error)
func (*ChainConfig) GetTenantId ¶
func (cfg *ChainConfig) GetTenantId() database.Id
func (*ChainConfig) Init ¶
func (cfg *ChainConfig) Init() (err error)
type ChainRecommendation ¶
type ChainSwapper ¶
type ChainSwapper = swapper[*ChainConfig]
type Config ¶
type Config = autoswaprpc.Config
type DismissedChannels ¶
type LightningConfig ¶
type LightningConfig struct { *SerializedLnConfig // contains filtered or unexported fields }
func NewLightningConfig ¶
func NewLightningConfig(serialized *SerializedLnConfig, shared shared) *LightningConfig
func (*LightningConfig) AllowNormalSwaps ¶
func (cfg *LightningConfig) AllowNormalSwaps() bool
func (*LightningConfig) AllowReverseSwaps ¶
func (cfg *LightningConfig) AllowReverseSwaps() bool
func (*LightningConfig) CheckAndExecute ¶
func (cfg *LightningConfig) CheckAndExecute(accepted []*autoswaprpc.LightningRecommendation, force bool) error
func (*LightningConfig) Description ¶
func (cfg *LightningConfig) Description() string
func (*LightningConfig) GetCurrentBudget ¶
func (cfg *LightningConfig) GetCurrentBudget(createIfMissing bool) (*Budget, error)
func (*LightningConfig) GetPair ¶
func (cfg *LightningConfig) GetPair(swapType boltzrpc.SwapType) *boltzrpc.Pair
func (*LightningConfig) GetSwapRecommendations ¶
func (cfg *LightningConfig) GetSwapRecommendations(includeAll bool) ([]*autoswaprpc.LightningRecommendation, error)
func (*LightningConfig) Init ¶
func (cfg *LightningConfig) Init() error
func (*LightningConfig) InitWallet ¶
func (cfg *LightningConfig) InitWallet() (err error)
type LightningRecommendation ¶
type LightningRecommendation struct { Swap *LightningSwap Channel *lightning.LightningChannel Thresholds *autoswaprpc.LightningThresholds }
type LightningSwap ¶
func (*LightningSwap) GetAmount ¶
func (lightningSwap *LightningSwap) GetAmount() uint64
type LightningSwapper ¶
type LightningSwapper = swapper[*LightningConfig]
type MockRpcProvider ¶
MockRpcProvider is an autogenerated mock type for the RpcProvider type
func NewMockRpcProvider ¶
func NewMockRpcProvider(t interface { mock.TestingT Cleanup(func()) }) *MockRpcProvider
NewMockRpcProvider creates a new instance of MockRpcProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockRpcProvider) CreateAutoChainSwap ¶
func (_m *MockRpcProvider) CreateAutoChainSwap(tenant *database.Tenant, request *boltzrpc.CreateChainSwapRequest) error
CreateAutoChainSwap provides a mock function with given fields: tenant, request
func (*MockRpcProvider) CreateAutoReverseSwap ¶
func (_m *MockRpcProvider) CreateAutoReverseSwap(tenant *database.Tenant, request *boltzrpc.CreateReverseSwapRequest) error
CreateAutoReverseSwap provides a mock function with given fields: tenant, request
func (*MockRpcProvider) CreateAutoSwap ¶
func (_m *MockRpcProvider) CreateAutoSwap(tenant *database.Tenant, request *boltzrpc.CreateSwapRequest) error
CreateAutoSwap provides a mock function with given fields: tenant, request
func (*MockRpcProvider) EXPECT ¶
func (_m *MockRpcProvider) EXPECT() *MockRpcProvider_Expecter
func (*MockRpcProvider) GetAutoSwapPairInfo ¶
func (_m *MockRpcProvider) GetAutoSwapPairInfo(swapType boltzrpc.SwapType, pair *boltzrpc.Pair) (*boltzrpc.PairInfo, error)
GetAutoSwapPairInfo provides a mock function with given fields: swapType, pair
func (*MockRpcProvider) GetBlockUpdates ¶
func (_m *MockRpcProvider) GetBlockUpdates(currency boltz.Currency) (<-chan *onchain.BlockEpoch, func())
GetBlockUpdates provides a mock function with given fields: currency
func (*MockRpcProvider) GetLightningChannels ¶
func (_m *MockRpcProvider) GetLightningChannels() ([]*lightning.LightningChannel, error)
GetLightningChannels provides a mock function with given fields:
func (*MockRpcProvider) WalletSendFee ¶
func (_m *MockRpcProvider) WalletSendFee(request *boltzrpc.WalletSendRequest) (*boltzrpc.WalletSendFee, error)
WalletSendFee provides a mock function with given fields: request
type MockRpcProvider_CreateAutoChainSwap_Call ¶
MockRpcProvider_CreateAutoChainSwap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAutoChainSwap'
func (*MockRpcProvider_CreateAutoChainSwap_Call) Return ¶
func (_c *MockRpcProvider_CreateAutoChainSwap_Call) Return(_a0 error) *MockRpcProvider_CreateAutoChainSwap_Call
func (*MockRpcProvider_CreateAutoChainSwap_Call) Run ¶
func (_c *MockRpcProvider_CreateAutoChainSwap_Call) Run(run func(tenant *database.Tenant, request *boltzrpc.CreateChainSwapRequest)) *MockRpcProvider_CreateAutoChainSwap_Call
func (*MockRpcProvider_CreateAutoChainSwap_Call) RunAndReturn ¶
func (_c *MockRpcProvider_CreateAutoChainSwap_Call) RunAndReturn(run func(*database.Tenant, *boltzrpc.CreateChainSwapRequest) error) *MockRpcProvider_CreateAutoChainSwap_Call
type MockRpcProvider_CreateAutoReverseSwap_Call ¶
MockRpcProvider_CreateAutoReverseSwap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAutoReverseSwap'
func (*MockRpcProvider_CreateAutoReverseSwap_Call) Return ¶
func (_c *MockRpcProvider_CreateAutoReverseSwap_Call) Return(_a0 error) *MockRpcProvider_CreateAutoReverseSwap_Call
func (*MockRpcProvider_CreateAutoReverseSwap_Call) Run ¶
func (_c *MockRpcProvider_CreateAutoReverseSwap_Call) Run(run func(tenant *database.Tenant, request *boltzrpc.CreateReverseSwapRequest)) *MockRpcProvider_CreateAutoReverseSwap_Call
func (*MockRpcProvider_CreateAutoReverseSwap_Call) RunAndReturn ¶
func (_c *MockRpcProvider_CreateAutoReverseSwap_Call) RunAndReturn(run func(*database.Tenant, *boltzrpc.CreateReverseSwapRequest) error) *MockRpcProvider_CreateAutoReverseSwap_Call
type MockRpcProvider_CreateAutoSwap_Call ¶
MockRpcProvider_CreateAutoSwap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAutoSwap'
func (*MockRpcProvider_CreateAutoSwap_Call) Return ¶
func (_c *MockRpcProvider_CreateAutoSwap_Call) Return(_a0 error) *MockRpcProvider_CreateAutoSwap_Call
func (*MockRpcProvider_CreateAutoSwap_Call) Run ¶
func (_c *MockRpcProvider_CreateAutoSwap_Call) Run(run func(tenant *database.Tenant, request *boltzrpc.CreateSwapRequest)) *MockRpcProvider_CreateAutoSwap_Call
func (*MockRpcProvider_CreateAutoSwap_Call) RunAndReturn ¶
func (_c *MockRpcProvider_CreateAutoSwap_Call) RunAndReturn(run func(*database.Tenant, *boltzrpc.CreateSwapRequest) error) *MockRpcProvider_CreateAutoSwap_Call
type MockRpcProvider_Expecter ¶
type MockRpcProvider_Expecter struct {
// contains filtered or unexported fields
}
func (*MockRpcProvider_Expecter) CreateAutoChainSwap ¶
func (_e *MockRpcProvider_Expecter) CreateAutoChainSwap(tenant interface{}, request interface{}) *MockRpcProvider_CreateAutoChainSwap_Call
CreateAutoChainSwap is a helper method to define mock.On call
- tenant *database.Tenant
- request *boltzrpc.CreateChainSwapRequest
func (*MockRpcProvider_Expecter) CreateAutoReverseSwap ¶
func (_e *MockRpcProvider_Expecter) CreateAutoReverseSwap(tenant interface{}, request interface{}) *MockRpcProvider_CreateAutoReverseSwap_Call
CreateAutoReverseSwap is a helper method to define mock.On call
- tenant *database.Tenant
- request *boltzrpc.CreateReverseSwapRequest
func (*MockRpcProvider_Expecter) CreateAutoSwap ¶
func (_e *MockRpcProvider_Expecter) CreateAutoSwap(tenant interface{}, request interface{}) *MockRpcProvider_CreateAutoSwap_Call
CreateAutoSwap is a helper method to define mock.On call
- tenant *database.Tenant
- request *boltzrpc.CreateSwapRequest
func (*MockRpcProvider_Expecter) GetAutoSwapPairInfo ¶
func (_e *MockRpcProvider_Expecter) GetAutoSwapPairInfo(swapType interface{}, pair interface{}) *MockRpcProvider_GetAutoSwapPairInfo_Call
GetAutoSwapPairInfo is a helper method to define mock.On call
- swapType boltzrpc.SwapType
- pair *boltzrpc.Pair
func (*MockRpcProvider_Expecter) GetBlockUpdates ¶
func (_e *MockRpcProvider_Expecter) GetBlockUpdates(currency interface{}) *MockRpcProvider_GetBlockUpdates_Call
GetBlockUpdates is a helper method to define mock.On call
- currency boltz.Currency
func (*MockRpcProvider_Expecter) GetLightningChannels ¶
func (_e *MockRpcProvider_Expecter) GetLightningChannels() *MockRpcProvider_GetLightningChannels_Call
GetLightningChannels is a helper method to define mock.On call
func (*MockRpcProvider_Expecter) WalletSendFee ¶
func (_e *MockRpcProvider_Expecter) WalletSendFee(request interface{}) *MockRpcProvider_WalletSendFee_Call
WalletSendFee is a helper method to define mock.On call
- request *boltzrpc.WalletSendRequest
type MockRpcProvider_GetAutoSwapPairInfo_Call ¶
MockRpcProvider_GetAutoSwapPairInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAutoSwapPairInfo'
func (*MockRpcProvider_GetAutoSwapPairInfo_Call) Return ¶
func (_c *MockRpcProvider_GetAutoSwapPairInfo_Call) Return(_a0 *boltzrpc.PairInfo, _a1 error) *MockRpcProvider_GetAutoSwapPairInfo_Call
func (*MockRpcProvider_GetAutoSwapPairInfo_Call) Run ¶
func (_c *MockRpcProvider_GetAutoSwapPairInfo_Call) Run(run func(swapType boltzrpc.SwapType, pair *boltzrpc.Pair)) *MockRpcProvider_GetAutoSwapPairInfo_Call
func (*MockRpcProvider_GetAutoSwapPairInfo_Call) RunAndReturn ¶
func (_c *MockRpcProvider_GetAutoSwapPairInfo_Call) RunAndReturn(run func(boltzrpc.SwapType, *boltzrpc.Pair) (*boltzrpc.PairInfo, error)) *MockRpcProvider_GetAutoSwapPairInfo_Call
type MockRpcProvider_GetBlockUpdates_Call ¶
MockRpcProvider_GetBlockUpdates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlockUpdates'
func (*MockRpcProvider_GetBlockUpdates_Call) Return ¶
func (_c *MockRpcProvider_GetBlockUpdates_Call) Return(_a0 <-chan *onchain.BlockEpoch, _a1 func()) *MockRpcProvider_GetBlockUpdates_Call
func (*MockRpcProvider_GetBlockUpdates_Call) Run ¶
func (_c *MockRpcProvider_GetBlockUpdates_Call) Run(run func(currency boltz.Currency)) *MockRpcProvider_GetBlockUpdates_Call
func (*MockRpcProvider_GetBlockUpdates_Call) RunAndReturn ¶
func (_c *MockRpcProvider_GetBlockUpdates_Call) RunAndReturn(run func(boltz.Currency) (<-chan *onchain.BlockEpoch, func())) *MockRpcProvider_GetBlockUpdates_Call
type MockRpcProvider_GetLightningChannels_Call ¶
MockRpcProvider_GetLightningChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLightningChannels'
func (*MockRpcProvider_GetLightningChannels_Call) Return ¶
func (_c *MockRpcProvider_GetLightningChannels_Call) Return(_a0 []*lightning.LightningChannel, _a1 error) *MockRpcProvider_GetLightningChannels_Call
func (*MockRpcProvider_GetLightningChannels_Call) Run ¶
func (_c *MockRpcProvider_GetLightningChannels_Call) Run(run func()) *MockRpcProvider_GetLightningChannels_Call
func (*MockRpcProvider_GetLightningChannels_Call) RunAndReturn ¶
func (_c *MockRpcProvider_GetLightningChannels_Call) RunAndReturn(run func() ([]*lightning.LightningChannel, error)) *MockRpcProvider_GetLightningChannels_Call
type MockRpcProvider_WalletSendFee_Call ¶
MockRpcProvider_WalletSendFee_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WalletSendFee'
func (*MockRpcProvider_WalletSendFee_Call) Return ¶
func (_c *MockRpcProvider_WalletSendFee_Call) Return(_a0 *boltzrpc.WalletSendFee, _a1 error) *MockRpcProvider_WalletSendFee_Call
func (*MockRpcProvider_WalletSendFee_Call) Run ¶
func (_c *MockRpcProvider_WalletSendFee_Call) Run(run func(request *boltzrpc.WalletSendRequest)) *MockRpcProvider_WalletSendFee_Call
func (*MockRpcProvider_WalletSendFee_Call) RunAndReturn ¶
func (_c *MockRpcProvider_WalletSendFee_Call) RunAndReturn(run func(*boltzrpc.WalletSendRequest) (*boltzrpc.WalletSendFee, error)) *MockRpcProvider_WalletSendFee_Call
type RpcProvider ¶
type RpcProvider interface { GetAutoSwapPairInfo(swapType boltzrpc.SwapType, pair *boltzrpc.Pair) (*boltzrpc.PairInfo, error) GetLightningChannels() ([]*lightning.LightningChannel, error) GetBlockUpdates(currency boltz.Currency) (<-chan *onchain.BlockEpoch, func()) WalletSendFee(request *boltzrpc.WalletSendRequest) (*boltzrpc.WalletSendFee, error) CreateAutoSwap(tenant *database.Tenant, request *boltzrpc.CreateSwapRequest) error CreateAutoReverseSwap(tenant *database.Tenant, request *boltzrpc.CreateReverseSwapRequest) error CreateAutoChainSwap(tenant *database.Tenant, request *boltzrpc.CreateChainSwapRequest) error }
type SerializedChainConfig ¶
type SerializedChainConfig = autoswaprpc.ChainConfig
type SerializedLnConfig ¶
type SerializedLnConfig = autoswaprpc.LightningConfig
func DefaultLightningConfig ¶
func DefaultLightningConfig() *SerializedLnConfig
type Strategy ¶
type Strategy = func(channels []*lightning.LightningChannel) []*LightningRecommendation
type SwapperType ¶
type SwapperType string
const ( Lightning SwapperType = "lightning" Chain SwapperType = "chain" )