create db/lnd/email packages
This commit is contained in:
parent
6153edd0c3
commit
9545e5bd4e
12 changed files with 255 additions and 736 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
"encoding/json"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"net/http"
|
||||
"github.com/boltcard/boltcard/db"
|
||||
)
|
||||
|
||||
/**
|
||||
|
|
@ -55,7 +56,7 @@ func new_card_request(w http.ResponseWriter, req *http.Request) {
|
|||
|
||||
lnurlw_base := "lnurlw://" + req.Host + "/ln"
|
||||
|
||||
c, err := db_get_new_card(a)
|
||||
c, err := db.Get_new_card(a)
|
||||
|
||||
if err == sql.ErrNoRows {
|
||||
log.Debug(err)
|
||||
|
|
@ -69,19 +70,19 @@ func new_card_request(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
k1_decrypt_key := db_get_setting("AES_DECRYPT_KEY")
|
||||
k1_decrypt_key := db.Get_setting("AES_DECRYPT_KEY")
|
||||
|
||||
response := NewCardResponse{}
|
||||
response.PROTOCOL_NAME = "create_bolt_card_response"
|
||||
response.PROTOCOL_VERSION = 2
|
||||
response.CARD_NAME = c.card_name
|
||||
response.CARD_NAME = c.Card_name
|
||||
response.LNURLW_BASE = lnurlw_base
|
||||
response.K0 = c.k0_auth_key
|
||||
response.K0 = c.K0_auth_key
|
||||
response.K1 = k1_decrypt_key
|
||||
response.K2 = c.k2_cmac_key
|
||||
response.K3 = c.k3
|
||||
response.K4 = c.k4
|
||||
response.UID_PRIVACY = c.uid_privacy
|
||||
response.K2 = c.K2_cmac_key
|
||||
response.K3 = c.K3
|
||||
response.K4 = c.K4
|
||||
response.UID_PRIVACY = c.Uid_privacy
|
||||
|
||||
log.SetFormatter(&log.JSONFormatter{
|
||||
DisableHTMLEscape: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue