Files
lspd/lnd/macaroon_credential.go
2023-03-24 23:45:15 +01:00

26 lines
481 B
Go

package lnd
import (
"context"
)
type MacaroonCredential struct {
MacaroonHex string
}
func NewMacaroonCredential(hex string) *MacaroonCredential {
return &MacaroonCredential{
MacaroonHex: hex,
}
}
func (m *MacaroonCredential) RequireTransportSecurity() bool {
return true
}
func (m *MacaroonCredential) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) {
md := make(map[string]string)
md["macaroon"] = m.MacaroonHex
return md, nil
}