Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) Balance() (*lnrpc.WalletBalanceResponse, error)
- func (c *Client) ChangePassphrase(old, new string) error
- func (c *Client) Create(passphrase string) (string, []string, error)
- func (c *Client) FetchTransactions() ([]*lnrpc.Transaction, error)
- func (c *Client) FinalizePsbt(packet *psbt.Packet) (*chainutil.Tx, error)
- func (c *Client) FundPsbt(addrToAmount map[string]int64, lokiPerVbyte uint64, ...) (*FundedPsbt, error)
- func (c *Client) GetNextAddress(addrType lnrpc.AddressType) (chainutil.Address, error)
- func (c *Client) Health() <-chan *Update
- func (c *Client) IsLocked() (bool, error)
- func (c *Client) IsSynced() (bool, uint32, error)
- func (c *Client) ListAddresses() ([]*walletrpc.AccountWithAddresses, error)
- func (c *Client) LoadMacaroon(path string) error
- func (c *Client) PublishTransaction(tx *chainutil.Tx) error
- func (c *Client) ReleaseOutputs(locks []*OutputLock) error
- func (c *Client) RestoreByEncipheredSeed(strEncipheredSeed, passphrase string) ([]string, error)
- func (c *Client) RestoreByMnemonic(mnemonic []string, passphrase string) (string, error)
- func (c *Client) SetMaxTransactionsLimit(limit uint32)
- func (c *Client) SimpleManyTransfer(addrToAmount map[string]int64, lokiPerVbyte uint64) (string, error)
- func (c *Client) SimpleManyTransferFee(addrToAmount map[string]int64) (*lnrpc.EstimateFeeResponse, error)
- func (c *Client) SimpleTransfer(address chainutil.Address, amount chainutil.Amount, lokiPerVbyte uint64) (string, error)
- func (c *Client) SimpleTransferFee(address chainutil.Address, amount chainutil.Amount) (*lnrpc.EstimateFeeResponse, error)
- func (c *Client) Unlock(passphrase string) error
- func (c *Client) WalletExists() (bool, error)
- type FundedPsbt
- type OutputLock
- type Service
- func (s *Service) Balance() (*lnrpc.WalletBalanceResponse, error)
- func (s *Service) ChangePassphrase(old, new string) error
- func (s *Service) CreateWallet(passphrase string) (string, []string, error)
- func (s *Service) Fee(address chainutil.Address, amount chainutil.Amount) (*lnrpc.EstimateFeeResponse, error)
- func (s *Service) FetchTransactions() ([]*lnrpc.Transaction, error)
- func (s *Service) FinalizePsbt(packet *psbt.Packet) (*chainutil.Tx, error)
- func (s *Service) FundPsbt(addrToAmount map[string]int64, lokiPerVbyte uint64, ...) (*FundedPsbt, error)
- func (s *Service) GetLastEvent() *Update
- func (s *Service) GetNextAddress(t lnrpc.AddressType) (chainutil.Address, error)
- func (s *Service) IsLocked() (bool, error)
- func (s *Service) PublishTransaction(tx *chainutil.Tx) error
- func (s *Service) ReleaseOutputs(locks []*OutputLock) error
- func (s *Service) Restart(pctx context.Context)
- func (s *Service) RestoreByEncipheredSeed(strEncipheredSeed, passphrase string) ([]string, error)
- func (s *Service) RestoreByMnemonic(mnemonic []string, passphrase string) (string, error)
- func (s *Service) Stop()
- func (s *Service) Subscribe() <-chan *Update
- func (s *Service) Transfer(address chainutil.Address, amount chainutil.Amount, lokiPerVbyte uint64) (string, error)
- func (s *Service) Unlock(passphrase string) error
- func (s *Service) Unsubscribe(ch <-chan *Update)
- func (s *Service) WalletExists() (bool, error)
- type ServiceConfig
- type Status
- type Update
Constants ¶
View Source
const (
FlndEndpoint = "localhost:10005"
)
Variables ¶
View Source
var ( ErrWalletNotFound = errors.New("wallet not found") ErrWalletAlreadyExists = errors.New("wallet already exists") ErrWalletMustBeLocked = errors.New("wallet must be locked to change password") )
View Source
var (
ErrDaemonNotRunning = errors.New("daemon is not running")
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ChangePassphrase ¶
func (*Client) FetchTransactions ¶
func (c *Client) FetchTransactions() ([]*lnrpc.Transaction, error)
func (*Client) FinalizePsbt ¶
func (*Client) GetNextAddress ¶
func (*Client) ListAddresses ¶
func (c *Client) ListAddresses() ([]*walletrpc.AccountWithAddresses, error)
func (*Client) LoadMacaroon ¶
func (*Client) ReleaseOutputs ¶
func (c *Client) ReleaseOutputs(locks []*OutputLock) error
func (*Client) RestoreByEncipheredSeed ¶
func (*Client) RestoreByMnemonic ¶
func (*Client) SetMaxTransactionsLimit ¶
func (*Client) SimpleManyTransfer ¶
func (*Client) SimpleManyTransferFee ¶
func (*Client) SimpleTransfer ¶
func (*Client) SimpleTransferFee ¶
func (*Client) WalletExists ¶
type FundedPsbt ¶
type FundedPsbt struct {
Packet *psbt.Packet
Locks []*OutputLock
}
type OutputLock ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ChangePassphrase ¶
func (*Service) CreateWallet ¶
func (*Service) FetchTransactions ¶
func (s *Service) FetchTransactions() ([]*lnrpc.Transaction, error)
func (*Service) FinalizePsbt ¶
func (*Service) GetLastEvent ¶
func (*Service) GetNextAddress ¶
func (*Service) ReleaseOutputs ¶
func (s *Service) ReleaseOutputs(locks []*OutputLock) error
func (*Service) RestoreByEncipheredSeed ¶
func (*Service) RestoreByMnemonic ¶
func (*Service) Unsubscribe ¶
func (*Service) WalletExists ¶
type ServiceConfig ¶
type ServiceConfig struct {
Walletdir string `short:"w" long:"walletdir" description:"Directory for Flokicoin Lightning Network"`
RegressionTest bool `long:"regtest" description:"Use the regression test network"`
Testnet bool `long:"testnet" description:"Use the test network"`
ConnectionTimeout time.Duration `` /* 141-byte string literal not displayed */
DebugLevel string `` /* 133-byte string literal not displayed */
ConnectPeers []string `long:"connect" description:"Connect only to the specified peers at startup"`
Feeurl string `long:"feeurl" description:"Custom fee estimation API endpoint (Required on mainnet)"`
MaxTransactionsLimit int `long:"maxtransactionslimit" description:"Maximum number of transactions to fetch per request"`
TLSExtraIPs []string `long:"tlsextraip" description:"Adds an extra ip to the generated certificate"`
TLSExtraDomains []string `long:"tlsextradomain" description:"Adds an extra domain to the generated certificate"`
TLSAutoRefresh bool `long:"tlsautorefresh" description:"Re-generate TLS certificate and key if the IPs or domains are changed"`
RawRPCListeners []string `long:"rpclisten" description:"Add an interface/port/socket to listen for RPC connections"`
RawRESTListeners []string `long:"restlisten" description:"Add an interface/port/socket to listen for REST connections"`
RawListeners []string `long:"listen" description:"Add an interface/port to listen for peer connections"`
RestCORS []string `long:"restcors" description:"Add an ip:port/hostname to allow cross origin access from. To allow all origins, set as \"*\"."`
Network *chaincfg.Params
}
type Status ¶
type Status string
const ( StatusInit Status = "init" StatusNone Status = "none" StatusLocked Status = "locked" StatusUnlocked Status = "unlocked" StatusSyncing Status = "syncing" StatusReady Status = "ready" StatusNoWallet Status = "noWallet" StatusDown Status = "down" StatusTransaction Status = "tx" StatusBlock Status = "block" StatusScanning Status = "scanning" StatusQuit Status = "quit" )
Click to show internal directories.
Click to hide internal directories.