-
Notifications
You must be signed in to change notification settings - Fork 3
/
lnurl.go
35 lines (31 loc) · 930 Bytes
/
lnurl.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package main
import "github.com/fiatjaf/go-lnurl"
const (
payRequestTag = "payRequest"
withdrawRequestTag = "withdrawRequest"
k1Param = "k1"
sigParam = "sig"
keyParam = "key"
amountParam = "amount"
commentParam = "comment"
nostrParam = "nostr"
prParam = "pr"
quantityParam = "quantity"
sizeParam = "size"
)
type LnUrlPayParams struct {
Callback string `json:"callback"`
MinSendable int64 `json:"minSendable"`
MaxSendable int64 `json:"maxSendable"`
EncodedMetadata string `json:"metadata"`
CommentAllowed int64 `json:"commentAllowed"`
AllowsNostr bool `json:"allowsNostr"`
NostrPubkey string `json:"nostrPubkey,omitempty"`
Tag string `json:"tag"`
}
func successMessage(message string) *lnurl.SuccessAction {
return &lnurl.SuccessAction{
Tag: "message",
Message: message,
}
}