Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateUserWithInitialWallet(userName, walletName, adminId string, email string) (wal User, err error)
- func (c *Client) CreateWallet(userId, walletName, adminId string) (wal Wallet, err error)
- func (c *Client) GetUser(userId string) (user User, err error)
- func (c Client) Info(w Wallet) (wtx Wallet, err error)
- func (c Client) Payment(w Wallet, payment_hash string) (payment LNbitsPayment, err error)
- func (c Client) Payments(w Wallet) (wtx Payments, err error)
- func (c Client) Wallets(w User) (wtx []Wallet, err error)
- type DisplaySettings
- type Error
- type Invoice
- type InvoiceParams
- type LNbitsPayment
- type NodeSettings
- type NostrSettings
- type PayParams
- type Payment
- type PaymentParams
- type Payments
- type Settings
- type TransferParams
- type User
- type UserStateKey
- type Wallet
Constants ¶
View Source
const ( UserStateConfirmPayment = iota + 1 UserStateConfirmSend UserStateLNURLEnterAmount UserStateConfirmLNURLPay UserEnterAmount UserHasEnteredAmount UserEnterUser UserHasEnteredUser UserEnterShopTitle UserStateShopItemSendPhoto UserStateShopItemSendTitle UserStateShopItemSendDescription UserStateShopItemSendPrice UserStateShopItemSendItemFile UserEnterShopsDescription UserEnterDallePrompt )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) CreateUserWithInitialWallet ¶
func (c *Client) CreateUserWithInitialWallet(userName, walletName, adminId string, email string) (wal User, err error)
CreateUserWithInitialWallet creates new user with initial wallet
func (*Client) CreateWallet ¶
CreateWallet creates a new wallet.
func (Client) Payment ¶
func (c Client) Payment(w Wallet, payment_hash string) (payment LNbitsPayment, err error)
Payment state of a payment
type DisplaySettings ¶
type DisplaySettings struct {
DisplayCurrency string `json:"displaycurrency"`
}
type InvoiceParams ¶
type InvoiceParams struct { Out bool `json:"out"` // must be True if invoice is payed, False if invoice is received Amount int64 `json:"amount"` // amount in Satoshi Memo string `json:"memo,omitempty"` // the invoice memo. Webhook string `json:"webhook,omitempty"` // the webhook to fire back to when payment is received. DescriptionHash string `json:"description_hash,omitempty"` // the invoice description hash. UnhashedDescription string `json:"unhashed_description,omitempty"` // the unhashed invoice description. }
type LNbitsPayment ¶
type NodeSettings ¶
type NodeSettings struct { NodeType string `json:"nodetype"` LNDParams *satdress.LNDParams `gorm:"embedded;embeddedPrefix:lndparams_"` LNbitsParams *satdress.LNBitsParams `gorm:"embedded;embeddedPrefix:lnbitsparams_"` }
type NostrSettings ¶
type NostrSettings struct {
PubKey string `json:"pubkey"`
}
type Payment ¶
type Payment struct { CheckingID string `json:"checking_id"` Pending bool `json:"pending"` Amount int64 `json:"amount"` Fee int64 `json:"fee"` Memo string `json:"memo"` Time int `json:"time"` Bolt11 string `json:"bolt11"` Preimage string `json:"preimage"` PaymentHash string `json:"payment_hash"` Extra struct{} `json:"extra"` WalletID string `json:"wallet_id"` Webhook interface{} `json:"webhook"` WebhookStatus interface{} `json:"webhook_status"` }
type PaymentParams ¶
type Settings ¶
type Settings struct { ID string `json:"id" gorm:"primarykey"` Display DisplaySettings `gorm:"embedded;embeddedPrefix:display_"` Node NodeSettings `gorm:"embedded;embeddedPrefix:node_"` Nostr NostrSettings `gorm:"embedded;embeddedPrefix:nostr_"` }
type TransferParams ¶
type User ¶
type User struct { ID string `json:"id"` Name string `json:"name" gorm:"primaryKey"` Initialized bool `json:"initialized"` Telegram *tb.User `gorm:"embedded;embeddedPrefix:telegram_"` Wallet *Wallet `gorm:"embedded;embeddedPrefix:wallet_"` StateKey UserStateKey `json:"stateKey"` StateData string `json:"stateData"` CreatedAt time.Time `json:"created"` UpdatedAt time.Time `json:"updated"` AnonID string `json:"anon_id"` AnonIDSha256 string `json:"anon_id_sha256"` UUID string `json:"uuid"` Banned bool `json:"banned"` Settings *Settings `json:"settings" gorm:"foreignKey:id"` }
func (User) LinkingKey ¶
from fiatjaf/lnurl-go
func (*User) ResetState ¶
func (u *User) ResetState()
type UserStateKey ¶
type UserStateKey int
type Wallet ¶
type Wallet struct { ID string `json:"id" gorm:"id"` Adminkey string `json:"adminkey"` Inkey string `json:"inkey"` Balance int64 `json:"balance"` Name string `json:"name"` User string `json:"user"` }
Click to show internal directories.
Click to hide internal directories.