alby

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ALBY_ACCOUNT_APP_NAME = "getalby.com"

Variables

This section is empty.

Functions

func NewAlbyOAuthService

func NewAlbyOAuthService(db *gorm.DB, cfg config.Config, keys keys.Keys, eventPublisher events.EventPublisher) *albyOAuthService

Types

type AlbyBalance

type AlbyBalance struct {
	Balance  int64  `json:"balance"`
	Unit     string `json:"unit"`
	Currency string `json:"currency"`
}

type AlbyBalanceResponse

type AlbyBalanceResponse struct {
	Sats int64 `json:"sats"`
}

type AlbyLinkAccountRequest added in v1.1.0

type AlbyLinkAccountRequest struct {
	Budget  uint64 `json:"budget"`
	Renewal string `json:"renewal"`
}

type AlbyMe

type AlbyMe struct {
	Identifier       string    `json:"identifier"`
	NPub             string    `json:"nostr_pubkey"`
	LightningAddress string    `json:"lightning_address"`
	Email            string    `json:"email"`
	Name             string    `json:"name"`
	Avatar           string    `json:"avatar"`
	KeysendPubkey    string    `json:"keysend_pubkey"`
	SharedNode       bool      `json:"shared_node"`
	Hub              AlbyMeHub `json:"hub"`
}

type AlbyMeHub added in v1.1.0

type AlbyMeHub struct {
	LatestVersion string `json:"latest_version"`
}

type AlbyOAuthService

type AlbyOAuthService interface {
	events.EventSubscriber
	GetChannelPeerSuggestions(ctx context.Context) ([]ChannelPeerSuggestion, error)
	GetAuthUrl() string
	GetUserIdentifier() (string, error)
	IsConnected(ctx context.Context) bool
	LinkAccount(ctx context.Context, lnClient lnclient.LNClient, budget uint64, renewal string) error
	CallbackHandler(ctx context.Context, code string, lnClient lnclient.LNClient) error
	GetBalance(ctx context.Context) (*AlbyBalance, error)
	GetMe(ctx context.Context) (*AlbyMe, error)
	SendPayment(ctx context.Context, invoice string) error
	DrainSharedWallet(ctx context.Context, lnClient lnclient.LNClient) error
	UnlinkAccount(ctx context.Context) error
	RequestAutoChannel(ctx context.Context, lnClient lnclient.LNClient, isPublic bool) (*AutoChannelResponse, error)
}

type AlbyPayRequest

type AlbyPayRequest struct {
	Invoice string `json:"invoice"`
}

type AutoChannelRequest added in v1.3.0

type AutoChannelRequest struct {
	IsPublic bool `json:"isPublic"`
}

type AutoChannelResponse added in v1.3.0

type AutoChannelResponse struct {
	Invoice     string `json:"invoice"`
	ChannelSize uint64 `json:"channelSize"`
	Fee         uint64 `json:"fee"`
}

type ChannelPeerSuggestion

type ChannelPeerSuggestion struct {
	Network            string `json:"network"`
	PaymentMethod      string `json:"paymentMethod"`
	Pubkey             string `json:"pubkey"`
	Host               string `json:"host"`
	MinimumChannelSize uint64 `json:"minimumChannelSize"`
	MaximumChannelSize uint64 `json:"maximumChannelSize"`
	Name               string `json:"name"`
	Image              string `json:"image"`
	BrokenLspUrl       string `json:"lsp_url"`
	BrokenLspType      string `json:"lsp_type"`
	LspUrl             string `json:"lspUrl"`
	LspType            string `json:"lspType"`
}

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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