Documentation
¶
Index ¶
- Variables
- type AutoSwap
- func (autoSwap *AutoSwap) Disable() (any, error)
- func (autoSwap *AutoSwap) Enable() (any, error)
- func (autoSwap *AutoSwap) ExecuteRecommendations(request *autoswaprpc.ExecuteRecommendationsRequest) (*autoswaprpc.ExecuteRecommendationsResponse, error)
- func (autoSwap *AutoSwap) GetChainConfig() (*autoswaprpc.ChainConfig, error)
- func (autoSwap *AutoSwap) GetConfig() (*autoswaprpc.Config, error)
- func (autoSwap *AutoSwap) GetLightningConfig() (*autoswaprpc.LightningConfig, error)
- func (autoSwap *AutoSwap) GetRecommendations() (*autoswaprpc.GetRecommendationsResponse, error)
- func (autoSwap *AutoSwap) GetStatus() (*autoswaprpc.GetStatusResponse, error)
- func (autoSwap *AutoSwap) ReloadConfig() (*autoswaprpc.Config, error)
- func (autoSwap *AutoSwap) ResetConfig(swapper AutoSwapType) (*autoswaprpc.Config, error)
- func (autoSwap *AutoSwap) SetChainConfigValue(key string, value any) (*autoswaprpc.Config, error)
- func (autoSwap *AutoSwap) SetConfigValue(swapper AutoSwapType, key string, value any) (*autoswaprpc.Config, error)
- func (autoSwap *AutoSwap) SetLightningConfigValue(key string, value any) (*autoswaprpc.Config, error)
- func (autoSwap *AutoSwap) UpdateChainConfig(request *autoswaprpc.UpdateChainConfigRequest) (*autoswaprpc.Config, error)
- func (autoSwap *AutoSwap) UpdateLightningConfig(request *autoswaprpc.UpdateLightningConfigRequest) (*autoswaprpc.Config, error)
- type AutoSwapType
- type Connection
- type Lightz
- func (lightz *Lightz) BakeMacaroon(request *lightzrpc.BakeMacaroonRequest) (*lightzrpc.BakeMacaroonResponse, error)
- func (lightz *Lightz) BumpTransaction(request *lightzrpc.BumpTransactionRequest) (*lightzrpc.BumpTransactionResponse, error)
- func (lightz *Lightz) ChangeWalletPassword(old string, new string) error
- func (lightz *Lightz) ClaimSwaps(request *lightzrpc.ClaimSwapsRequest) (*lightzrpc.ClaimSwapsResponse, error)
- func (lightz *Lightz) CreateChainSwap(request *lightzrpc.CreateChainSwapRequest) (*lightzrpc.ChainSwapInfo, error)
- func (lightz *Lightz) CreateReverseSwap(request *lightzrpc.CreateReverseSwapRequest) (*lightzrpc.CreateReverseSwapResponse, error)
- func (lightz *Lightz) CreateSwap(request *lightzrpc.CreateSwapRequest) (*lightzrpc.CreateSwapResponse, error)
- func (lightz *Lightz) CreateTenant(name string) (*lightzrpc.Tenant, error)
- func (lightz *Lightz) CreateWallet(params *lightzrpc.WalletParams) (*lightzrpc.CreateWalletResponse, error)
- func (lightz *Lightz) GetInfo() (*lightzrpc.GetInfoResponse, error)
- func (lightz *Lightz) GetPairInfo(swapType lightzrpc.SwapType, pair *lightzrpc.Pair) (*lightzrpc.PairInfo, error)
- func (lightz *Lightz) GetPairs() (*lightzrpc.GetPairsResponse, error)
- func (lightz *Lightz) GetSendFee(request *lightzrpc.WalletSendRequest) (*lightzrpc.WalletSendFee, error)
- func (lightz *Lightz) GetStats(request *lightzrpc.GetStatsRequest) (*lightzrpc.GetStatsResponse, error)
- func (lightz *Lightz) GetSubaccounts(walletId uint64) (*lightzrpc.GetSubaccountsResponse, error)
- func (lightz *Lightz) GetSwapInfo(id string) (*lightzrpc.GetSwapInfoResponse, error)
- func (lightz *Lightz) GetSwapInfoByPaymentHash(paymentHash []byte) (*lightzrpc.GetSwapInfoResponse, error)
- func (lightz *Lightz) GetSwapInfoStream(id string) (lightzrpc.Lightz_GetSwapInfoStreamClient, error)
- func (lightz *Lightz) GetSwapMnemonic() (*lightzrpc.GetSwapMnemonicResponse, error)
- func (lightz *Lightz) GetTenant(name string) (*lightzrpc.Tenant, error)
- func (lightz *Lightz) GetWallet(name string) (*lightzrpc.Wallet, error)
- func (lightz *Lightz) GetWalletById(id uint64) (*lightzrpc.Wallet, error)
- func (lightz *Lightz) GetWalletCredentials(id uint64, password *string) (*lightzrpc.WalletCredentials, error)
- func (lightz *Lightz) GetWallets(currency *lightzrpc.Currency, includeReadonly bool) (*lightzrpc.Wallets, error)
- func (lightz *Lightz) HasPassword() (bool, error)
- func (lightz *Lightz) ImportWallet(params *lightzrpc.WalletParams, credentials *lightzrpc.WalletCredentials) (*lightzrpc.Wallet, error)
- func (lightz *Lightz) ListSwaps(request *lightzrpc.ListSwapsRequest) (*lightzrpc.ListSwapsResponse, error)
- func (lightz *Lightz) ListTenants() (*lightzrpc.ListTenantsResponse, error)
- func (lightz *Lightz) ListWalletTransactions(request *lightzrpc.ListWalletTransactionsRequest) (*lightzrpc.ListWalletTransactionsResponse, error)
- func (lightz *Lightz) RefundSwap(request *lightzrpc.RefundSwapRequest) (*lightzrpc.GetSwapInfoResponse, error)
- func (lightz *Lightz) RemoveTenant(name string) error
- func (lightz *Lightz) RemoveWallet(id uint64) (*lightzrpc.RemoveWalletResponse, error)
- func (lightz *Lightz) SetSubaccount(walletId uint64, subaccount *uint64) (*lightzrpc.Subaccount, error)
- func (lightz *Lightz) SetSwapMnemonic(request *lightzrpc.SetSwapMnemonicRequest) (*lightzrpc.SetSwapMnemonicResponse, error)
- func (lightz *Lightz) Stop() error
- func (lightz *Lightz) Unlock(password string) error
- func (lightz *Lightz) VerifyWalletPassword(password string) (bool, error)
- func (lightz *Lightz) WalletReceive(id uint64) (*lightzrpc.WalletReceiveResponse, error)
- func (lightz *Lightz) WalletSend(request *lightzrpc.WalletSendRequest) (*lightzrpc.WalletSendResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var FullPermissions = []*lightzrpc.MacaroonPermissions{ {Action: lightzrpc.MacaroonAction_READ}, {Action: lightzrpc.MacaroonAction_WRITE}, }
View Source
var ReadPermissions = []*lightzrpc.MacaroonPermissions{ {Action: lightzrpc.MacaroonAction_READ}, }
Functions ¶
This section is empty.
Types ¶
type AutoSwap ¶
type AutoSwap struct {
Connection
Client autoswaprpc.AutoSwapClient
}
func NewAutoSwapClient ¶
func NewAutoSwapClient(conn Connection) AutoSwap
func (*AutoSwap) ExecuteRecommendations ¶
func (autoSwap *AutoSwap) ExecuteRecommendations(request *autoswaprpc.ExecuteRecommendationsRequest) (*autoswaprpc.ExecuteRecommendationsResponse, error)
func (*AutoSwap) GetChainConfig ¶
func (autoSwap *AutoSwap) GetChainConfig() (*autoswaprpc.ChainConfig, error)
func (*AutoSwap) GetLightningConfig ¶
func (autoSwap *AutoSwap) GetLightningConfig() (*autoswaprpc.LightningConfig, error)
func (*AutoSwap) GetRecommendations ¶
func (autoSwap *AutoSwap) GetRecommendations() (*autoswaprpc.GetRecommendationsResponse, error)
func (*AutoSwap) GetStatus ¶
func (autoSwap *AutoSwap) GetStatus() (*autoswaprpc.GetStatusResponse, error)
func (*AutoSwap) ReloadConfig ¶
func (autoSwap *AutoSwap) ReloadConfig() (*autoswaprpc.Config, error)
func (*AutoSwap) ResetConfig ¶
func (autoSwap *AutoSwap) ResetConfig(swapper AutoSwapType) (*autoswaprpc.Config, error)
func (*AutoSwap) SetChainConfigValue ¶
func (*AutoSwap) SetConfigValue ¶
func (autoSwap *AutoSwap) SetConfigValue(swapper AutoSwapType, key string, value any) (*autoswaprpc.Config, error)
func (*AutoSwap) SetLightningConfigValue ¶
func (*AutoSwap) UpdateChainConfig ¶
func (autoSwap *AutoSwap) UpdateChainConfig(request *autoswaprpc.UpdateChainConfigRequest) (*autoswaprpc.Config, error)
func (*AutoSwap) UpdateLightningConfig ¶
func (autoSwap *AutoSwap) UpdateLightningConfig(request *autoswaprpc.UpdateLightningConfigRequest) (*autoswaprpc.Config, error)
type AutoSwapType ¶
type AutoSwapType string
const ( LnAutoSwap AutoSwapType = "lightning" ChainAutoSwap AutoSwapType = "chain" )
type Connection ¶
type Connection struct {
*grpc.ClientConn
Host string
Port int
TlsCertPath string
NoMacaroons bool
MacaroonPath string
Password string
Ctx context.Context
}
func (*Connection) Connect ¶
func (connection *Connection) Connect() error
func (*Connection) SetMacaroon ¶
func (connection *Connection) SetMacaroon(macaroon string)
func (*Connection) SetPassword ¶
func (connection *Connection) SetPassword(password string)
func (*Connection) SetTenant ¶
func (connection *Connection) SetTenant(tenant any)
type Lightz ¶
type Lightz struct {
Connection
Client lightzrpc.LightzClient
}
func NewLightzClient ¶
func NewLightzClient(conn Connection) Lightz
func (*Lightz) BakeMacaroon ¶
func (lightz *Lightz) BakeMacaroon(request *lightzrpc.BakeMacaroonRequest) (*lightzrpc.BakeMacaroonResponse, error)
func (*Lightz) BumpTransaction ¶
func (lightz *Lightz) BumpTransaction(request *lightzrpc.BumpTransactionRequest) (*lightzrpc.BumpTransactionResponse, error)
func (*Lightz) ChangeWalletPassword ¶
func (*Lightz) ClaimSwaps ¶
func (lightz *Lightz) ClaimSwaps(request *lightzrpc.ClaimSwapsRequest) (*lightzrpc.ClaimSwapsResponse, error)
func (*Lightz) CreateChainSwap ¶
func (lightz *Lightz) CreateChainSwap(request *lightzrpc.CreateChainSwapRequest) (*lightzrpc.ChainSwapInfo, error)
func (*Lightz) CreateReverseSwap ¶
func (lightz *Lightz) CreateReverseSwap(request *lightzrpc.CreateReverseSwapRequest) (*lightzrpc.CreateReverseSwapResponse, error)
func (*Lightz) CreateSwap ¶
func (lightz *Lightz) CreateSwap(request *lightzrpc.CreateSwapRequest) (*lightzrpc.CreateSwapResponse, error)
func (*Lightz) CreateTenant ¶
func (*Lightz) CreateWallet ¶
func (lightz *Lightz) CreateWallet(params *lightzrpc.WalletParams) (*lightzrpc.CreateWalletResponse, error)
func (*Lightz) GetPairInfo ¶
func (*Lightz) GetSendFee ¶
func (lightz *Lightz) GetSendFee(request *lightzrpc.WalletSendRequest) (*lightzrpc.WalletSendFee, error)
func (*Lightz) GetStats ¶
func (lightz *Lightz) GetStats(request *lightzrpc.GetStatsRequest) (*lightzrpc.GetStatsResponse, error)
func (*Lightz) GetSubaccounts ¶
func (lightz *Lightz) GetSubaccounts(walletId uint64) (*lightzrpc.GetSubaccountsResponse, error)
func (*Lightz) GetSwapInfo ¶
func (lightz *Lightz) GetSwapInfo(id string) (*lightzrpc.GetSwapInfoResponse, error)
func (*Lightz) GetSwapInfoByPaymentHash ¶
func (lightz *Lightz) GetSwapInfoByPaymentHash(paymentHash []byte) (*lightzrpc.GetSwapInfoResponse, error)
func (*Lightz) GetSwapInfoStream ¶
func (lightz *Lightz) GetSwapInfoStream(id string) (lightzrpc.Lightz_GetSwapInfoStreamClient, error)
func (*Lightz) GetSwapMnemonic ¶
func (lightz *Lightz) GetSwapMnemonic() (*lightzrpc.GetSwapMnemonicResponse, error)
func (*Lightz) GetWalletById ¶
func (*Lightz) GetWalletCredentials ¶
func (*Lightz) GetWallets ¶
func (*Lightz) HasPassword ¶
func (*Lightz) ImportWallet ¶
func (lightz *Lightz) ImportWallet(params *lightzrpc.WalletParams, credentials *lightzrpc.WalletCredentials) (*lightzrpc.Wallet, error)
func (*Lightz) ListSwaps ¶
func (lightz *Lightz) ListSwaps(request *lightzrpc.ListSwapsRequest) (*lightzrpc.ListSwapsResponse, error)
func (*Lightz) ListTenants ¶
func (lightz *Lightz) ListTenants() (*lightzrpc.ListTenantsResponse, error)
func (*Lightz) ListWalletTransactions ¶
func (lightz *Lightz) ListWalletTransactions(request *lightzrpc.ListWalletTransactionsRequest) (*lightzrpc.ListWalletTransactionsResponse, error)
func (*Lightz) RefundSwap ¶
func (lightz *Lightz) RefundSwap(request *lightzrpc.RefundSwapRequest) (*lightzrpc.GetSwapInfoResponse, error)
func (*Lightz) RemoveTenant ¶
func (*Lightz) RemoveWallet ¶
func (lightz *Lightz) RemoveWallet(id uint64) (*lightzrpc.RemoveWalletResponse, error)
func (*Lightz) SetSubaccount ¶
func (*Lightz) SetSwapMnemonic ¶
func (lightz *Lightz) SetSwapMnemonic(request *lightzrpc.SetSwapMnemonicRequest) (*lightzrpc.SetSwapMnemonicResponse, error)
func (*Lightz) VerifyWalletPassword ¶
func (*Lightz) WalletReceive ¶
func (lightz *Lightz) WalletReceive(id uint64) (*lightzrpc.WalletReceiveResponse, error)
func (*Lightz) WalletSend ¶
func (lightz *Lightz) WalletSend(request *lightzrpc.WalletSendRequest) (*lightzrpc.WalletSendResponse, error)
Click to show internal directories.
Click to hide internal directories.