Documentation
¶
Index ¶
- Constants
- func NewAlbyOAuthService(db *gorm.DB, cfg config.Config, keys keys.Keys, ...) *albyOAuthService
- func NewAlbyService() *albyService
- type AlbyInfo
- type AlbyInfoHub
- type AlbyInfoIncident
- type AlbyLinkAccountRequest
- type AlbyMe
- type AlbyMeHub
- type AlbyMeSubscription
- type AlbyOAuthService
- type AlbyService
- type AutoChannelRequest
- type AutoChannelResponse
- type BitcoinRate
- type ChannelPeerSuggestion
- type CreateLightningAddressResponse
- type Currency
- type ErrorResponse
- type LSPChannelOffer
- type LSPChannelPayment
- type LSPChannelPaymentBolt11
- type LSPChannelRequest
- type LSPChannelResponse
- type LSPInfo
Constants ¶
View Source
const ALBY_ACCOUNT_APP_NAME = "getalby.com"
Variables ¶
This section is empty.
Functions ¶
func NewAlbyOAuthService ¶
func NewAlbyService ¶ added in v1.19.0
func NewAlbyService() *albyService
Types ¶
type AlbyInfo ¶ added in v1.8.0
type AlbyInfo struct {
Hub AlbyInfoHub `json:"hub"`
Status string `json:"status"`
Healthy bool `json:"healthy"`
AccountAvailable bool `json:"accountAvailable"` // false if country is blocked (can still use Alby Hub without an Alby Account)
Incidents []AlbyInfoIncident `json:"incidents"`
}
type AlbyInfoHub ¶ added in v1.8.0
type AlbyInfoIncident ¶ added in v1.13.0
type AlbyLinkAccountRequest ¶ added in v1.1.0
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"`
Hub AlbyMeHub `json:"hub"`
Subscription AlbyMeSubscription `json:"subscription"`
}
type AlbyMeSubscription ¶ added in v1.11.0
type AlbyMeSubscription struct {
PlanCode string `json:"plan_code"`
}
type AlbyOAuthService ¶
type AlbyOAuthService interface {
events.EventSubscriber
GetLSPChannelOffer(ctx context.Context) (*LSPChannelOffer, error)
GetLSPInfo(ctx context.Context, lsp, network string) (*LSPInfo, error)
CreateLSPOrder(ctx context.Context, lsp, network string, lspChannelRequest *LSPChannelRequest) (*LSPChannelResponse, error)
GetAuthUrl() string
GetUserIdentifier() (string, error)
GetLightningAddress() (string, error)
IsConnected(ctx context.Context) bool
LinkAccount(ctx context.Context, lnClient lnclient.LNClient, budgetSat uint64, renewal string) error
CallbackHandler(ctx context.Context, code string) error
GetMe(ctx context.Context) (*AlbyMe, 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)
RemoveOAuthAccessToken() error
CreateLightningAddress(ctx context.Context, address string, appId uint) (*CreateLightningAddressResponse, error)
DeleteLightningAddress(ctx context.Context, address string) error
}
type AlbyService ¶ added in v1.19.0
type AutoChannelRequest ¶ added in v1.3.0
type AutoChannelRequest struct {
IsPublic bool `json:"isPublic"`
}
type AutoChannelResponse ¶ added in v1.3.0
type BitcoinRate ¶ added in v1.14.0
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"` // deprecated
MinimumChannelSizeSat uint64 `json:"minimumChannelSizeSat"`
MaximumChannelSize uint64 `json:"maximumChannelSize"` // deprecated
MaximumChannelSizeSat uint64 `json:"maximumChannelSizeSat"`
MaximumChannelExpiryBlocks *uint32 `json:"maximumChannelExpiryBlocks"`
Name string `json:"name"`
Image string `json:"image"`
Identifier string `json:"identifier"`
ContactUrl string `json:"contactUrl"`
Type string `json:"type"`
Terms string `json:"terms"`
Description string `json:"description"`
Note string `json:"note"`
PublicChannelsAllowed bool `json:"publicChannelsAllowed"`
FeeTotalSat1m *uint32 `json:"feeTotalSat1m"`
FeeTotalSat2m *uint32 `json:"feeTotalSat2m"`
FeeTotalSat3m *uint32 `json:"feeTotalSat3m"`
}
type CreateLightningAddressResponse ¶ added in v1.18.0
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
type LSPChannelOffer ¶ added in v1.19.0
type LSPChannelOffer struct {
LspName string `json:"lspName"`
LspContactUrl string `json:"lspContactUrl"`
LspBalanceSat uint64 `json:"lspBalanceSat"`
FeeTotalSat uint64 `json:"feeTotalSat"`
FeeTotalUsd uint64 `json:"feeTotalUsd"` // in cents
CurrentPaymentMethod string `json:"currentPaymentMethod"`
Terms string `json:"terms"`
LspDescription string `json:"lspDescription"`
}
type LSPChannelPayment ¶ added in v1.20.0
type LSPChannelPayment struct {
Bolt11 LSPChannelPaymentBolt11 `json:"bolt11"`
}
type LSPChannelPaymentBolt11 ¶ added in v1.20.0
type LSPChannelRequest ¶ added in v1.20.0
type LSPChannelRequest struct {
PublicKey string `json:"public_key"`
LSPBalanceSat string `json:"lsp_balance_sat"`
ClientBalanceSat string `json:"client_balance_sat"`
RequiredChannelConfirmations uint64 `json:"required_channel_confirmations"`
FundingConfirmsWithinBlocks uint64 `json:"funding_confirms_within_blocks"`
ChannelExpiryBlocks uint64 `json:"channel_expiry_blocks"`
Token string `json:"token"`
RefundOnchainAddress string `json:"refund_onchain_address"`
AnnounceChannel bool `json:"announce_channel"`
}
type LSPChannelResponse ¶ added in v1.20.0
type LSPChannelResponse struct {
Payment *LSPChannelPayment `json:"payment"`
}
Click to show internal directories.
Click to hide internal directories.