Documentation
¶
Index ¶
- Constants
- func CalculateFeeReserveMsat(amountMsat uint64) uint64
- func NewInsufficientBalanceError() error
- func NewNotFoundError() error
- func NewQuotaExceededError() error
- func NewTransactionsService(db *gorm.DB, eventPublisher events.EventPublisher) *transactionsService
- type Boostagram
- type StringOrNumber
- type Transaction
- type TransactionsService
Constants ¶
View Source
const ( BoostagramTlvType = 7629169 WhatsatTlvType = 34349334 CustomKeyTlvType = 696969 )
Variables ¶
This section is empty.
Functions ¶
func CalculateFeeReserveMsat ¶ added in v1.13.0
max of 1% or 10000 millisats (10 sats)
func NewInsufficientBalanceError ¶
func NewInsufficientBalanceError() error
func NewNotFoundError ¶
func NewNotFoundError() error
func NewQuotaExceededError ¶
func NewQuotaExceededError() error
func NewTransactionsService ¶
func NewTransactionsService(db *gorm.DB, eventPublisher events.EventPublisher) *transactionsService
Types ¶
type Boostagram ¶ added in v1.5.0
type Boostagram struct {
AppName string `json:"app_name"`
Name string `json:"name"`
Podcast string `json:"podcast"`
URL string `json:"url"`
Episode StringOrNumber `json:"episode,omitempty"`
FeedId StringOrNumber `json:"feedID,omitempty"`
ItemId StringOrNumber `json:"itemID,omitempty"`
Timestamp int64 `json:"ts,omitempty"`
Message string `json:"message,omitempty"`
SenderId StringOrNumber `json:"sender_id"`
SenderName string `json:"sender_name"`
Time string `json:"time"`
Action string `json:"action"`
ValueMsatTotal int64 `json:"value_msat_total"`
}
type StringOrNumber ¶ added in v1.10.2
func (StringOrNumber) String ¶ added in v1.10.2
func (sn StringOrNumber) String() string
func (*StringOrNumber) UnmarshalJSON ¶ added in v1.10.2
func (sn *StringOrNumber) UnmarshalJSON(data []byte) error
type Transaction ¶
type Transaction = db.Transaction
type TransactionsService ¶
type TransactionsService interface {
events.EventSubscriber
MakeInvoice(ctx context.Context, amount uint64, description string, descriptionHash string, expiry uint64, metadata map[string]interface{}, lnClient lnclient.LNClient, appId *uint, requestEventId *uint, throughNodePubkey *string) (*Transaction, error)
LookupTransaction(ctx context.Context, paymentHash string, transactionType *string, lnClient lnclient.LNClient, appId *uint) (*Transaction, error)
ListTransactions(ctx context.Context, from, until, limit, offset uint64, unpaidOutgoing bool, unpaidIncoming bool, transactionType *string, lnClient lnclient.LNClient, appId *uint, forceFilterByAppId bool) (transactions []Transaction, totalCount uint64, err error)
SendPaymentSync(payReq string, amountMsat *uint64, metadata map[string]interface{}, lnClient lnclient.LNClient, appId *uint, requestEventId *uint) (*Transaction, error)
SendKeysend(amount uint64, destination string, customRecords []lnclient.TLVRecord, preimage string, lnClient lnclient.LNClient, appId *uint, requestEventId *uint) (*Transaction, error)
MakeHoldInvoice(ctx context.Context, amount uint64, description string, descriptionHash string, expiry uint64, paymentHash string, metadata map[string]interface{}, lnClient lnclient.LNClient, appId *uint, requestEventId *uint) (*Transaction, error)
SettleHoldInvoice(ctx context.Context, preimage string, lnClient lnclient.LNClient) (*Transaction, error)
CancelHoldInvoice(ctx context.Context, paymentHash string, lnClient lnclient.LNClient) error
SetTransactionMetadata(ctx context.Context, id uint, metadata map[string]interface{}) error
}
Click to show internal directories.
Click to hide internal directories.