alby

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 30 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 AlbyInfo added in v1.8.0

type AlbyInfo struct {
	Hub AlbyInfoHub `json:"hub"`
}

type AlbyInfoHub added in v1.8.0

type AlbyInfoHub struct {
	LatestVersion      string `json:"latestVersion"`
	LatestReleaseNotes string `json:"latestReleaseNotes"`
}

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"`
	Subscription     AlbyMeSubscription `json:"subscription"`
}

type AlbyMeHub added in v1.1.0

type AlbyMeHub struct {
	Name string `json:"name"`
}

type AlbyMeSubscription added in v1.11.0

type AlbyMeSubscription struct {
	// PlanCode string `json:"plan_code"`
	Buzz bool `json:"buzz"`
}

type AlbyOAuthService

type AlbyOAuthService interface {
	events.EventSubscriber
	GetInfo(ctx context.Context) (*AlbyInfo, error)
	GetChannelPeerSuggestions(ctx context.Context) ([]ChannelPeerSuggestion, error)
	GetAuthUrl() string
	GetUserIdentifier() (string, error)
	GetLightningAddress() (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)
	GetVssAuthToken(ctx context.Context, nodeIdentifier string) (string, 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"`
	PublicChannelsAllowed bool   `json:"publicChannelsAllowed"`
}

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