phoenixd

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPhoenixService

func NewPhoenixService(address string, authorization string) (result lnclient.LNClient, err error)

Types

type BalanceResponse

type BalanceResponse struct {
	BalanceSat   int64 `json:"balanceSat"`
	FeeCreditSat int64 `json:"feeCreditSat"`
}

type InfoResponse

type InfoResponse struct {
	NodeId string `json:"nodeId"`
}

type InvoiceResponse

type InvoiceResponse struct {
	PaymentHash string `json:"paymentHash"`
	Preimage    string `json:"preimage"`
	ExternalId  string `json:"externalId"`
	Description string `json:"description"`
	Invoice     string `json:"invoice"`
	IsPaid      bool   `json:"isPaid"`
	ReceivedSat int64  `json:"receivedSat"`
	Fees        int64  `json:"fees"`
	CompletedAt int64  `json:"completedAt"`
	CreatedAt   int64  `json:"createdAt"`
}

type MakeInvoiceResponse

type MakeInvoiceResponse struct {
	AmountSat   int64  `json:"amountSat"`
	PaymentHash string `json:"paymentHash"`
	Serialized  string `json:"serialized"`
}

type OutgoingPaymentResponse

type OutgoingPaymentResponse struct {
	PaymentHash string `json:"paymentHash"`
	Preimage    string `json:"preimage"`
	Invoice     string `json:"invoice"`
	IsPaid      bool   `json:"isPaid"`
	Sent        int64  `json:"sent"`
	Fees        int64  `json:"fees"`
	CompletedAt int64  `json:"completedAt"`
	CreatedAt   int64  `json:"createdAt"`
}

type PayResponse

type PayResponse struct {
	PaymentHash     string `json:"paymentHash"`
	PaymentId       string `json:"paymentId"`
	PaymentPreimage string `json:"paymentPreimage"`
	RoutingFeeSat   int64  `json:"routingFeeSat"`
}

type PhoenixService

type PhoenixService struct {
	Address       string
	Authorization string
}

func (*PhoenixService) CloseChannel

func (svc *PhoenixService) CloseChannel(ctx context.Context, closeChannelRequest *lnclient.CloseChannelRequest) (*lnclient.CloseChannelResponse, error)

func (*PhoenixService) ConnectPeer

func (svc *PhoenixService) ConnectPeer(ctx context.Context, connectPeerRequest *lnclient.ConnectPeerRequest) error

func (*PhoenixService) DisconnectPeer

func (svc *PhoenixService) DisconnectPeer(ctx context.Context, peerId string) error

func (*PhoenixService) GetBalance

func (svc *PhoenixService) GetBalance(ctx context.Context) (balance int64, err error)

func (*PhoenixService) GetBalances

func (svc *PhoenixService) GetBalances(ctx context.Context) (*lnclient.BalancesResponse, error)

func (*PhoenixService) GetInfo

func (svc *PhoenixService) GetInfo(ctx context.Context) (info *lnclient.NodeInfo, err error)

func (*PhoenixService) GetLogOutput

func (svc *PhoenixService) GetLogOutput(ctx context.Context, maxLen int) ([]byte, error)

func (*PhoenixService) GetNetworkGraph

func (svc *PhoenixService) GetNetworkGraph(nodeIds []string) (lnclient.NetworkGraphResponse, error)

func (*PhoenixService) GetNewOnchainAddress

func (svc *PhoenixService) GetNewOnchainAddress(ctx context.Context) (string, error)

func (*PhoenixService) GetNodeConnectionInfo

func (svc *PhoenixService) GetNodeConnectionInfo(ctx context.Context) (nodeConnectionInfo *lnclient.NodeConnectionInfo, err error)

func (*PhoenixService) GetNodeStatus

func (svc *PhoenixService) GetNodeStatus(ctx context.Context) (nodeStatus *lnclient.NodeStatus, err error)

func (*PhoenixService) GetOnchainBalance

func (svc *PhoenixService) GetOnchainBalance(ctx context.Context) (*lnclient.OnchainBalanceResponse, error)

func (*PhoenixService) GetStorageDir

func (svc *PhoenixService) GetStorageDir() (string, error)

func (*PhoenixService) GetSupportedNIP47Methods

func (svc *PhoenixService) GetSupportedNIP47Methods() []string

func (*PhoenixService) GetSupportedNIP47NotificationTypes

func (svc *PhoenixService) GetSupportedNIP47NotificationTypes() []string

func (*PhoenixService) ListChannels

func (svc *PhoenixService) ListChannels(ctx context.Context) ([]lnclient.Channel, error)

func (*PhoenixService) ListPeers

func (svc *PhoenixService) ListPeers(ctx context.Context) ([]lnclient.PeerDetails, error)

func (*PhoenixService) ListTransactions

func (svc *PhoenixService) ListTransactions(ctx context.Context, from, until, limit, offset uint64, unpaid bool, invoiceType string) (transactions []lnclient.Transaction, err error)

func (*PhoenixService) LookupInvoice

func (svc *PhoenixService) LookupInvoice(ctx context.Context, paymentHash string) (transaction *lnclient.Transaction, err error)

func (*PhoenixService) MakeInvoice

func (svc *PhoenixService) MakeInvoice(ctx context.Context, amount int64, description string, descriptionHash string, expiry int64) (transaction *lnclient.Transaction, err error)

func (*PhoenixService) OpenChannel

func (svc *PhoenixService) OpenChannel(ctx context.Context, openChannelRequest *lnclient.OpenChannelRequest) (*lnclient.OpenChannelResponse, error)

func (*PhoenixService) RedeemOnchainFunds

func (svc *PhoenixService) RedeemOnchainFunds(ctx context.Context, toAddress string) (txId string, err error)

func (*PhoenixService) ResetRouter

func (svc *PhoenixService) ResetRouter(key string) error

func (*PhoenixService) SendKeysend

func (svc *PhoenixService) SendKeysend(ctx context.Context, amount uint64, destination, preimage string, custom_records []lnclient.TLVRecord) (respPreimage string, err error)

func (*PhoenixService) SendPaymentProbes

func (svc *PhoenixService) SendPaymentProbes(ctx context.Context, invoice string) error

func (*PhoenixService) SendPaymentSync

func (svc *PhoenixService) SendPaymentSync(ctx context.Context, payReq string) (*lnclient.PayInvoiceResponse, error)

func (*PhoenixService) SendSpontaneousPaymentProbes

func (svc *PhoenixService) SendSpontaneousPaymentProbes(ctx context.Context, amountMsat uint64, nodeId string) error

func (*PhoenixService) Shutdown

func (svc *PhoenixService) Shutdown() error

func (*PhoenixService) SignMessage

func (svc *PhoenixService) SignMessage(ctx context.Context, message string) (string, error)

func (*PhoenixService) UpdateChannel

func (svc *PhoenixService) UpdateChannel(ctx context.Context, updateChannelRequest *lnclient.UpdateChannelRequest) error

func (*PhoenixService) UpdateLastWalletSyncRequest

func (svc *PhoenixService) UpdateLastWalletSyncRequest()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL