Documentation
¶
Index ¶
- Variables
- func BakeSuperMacaroon(ctx context.Context, lnd lnrpc.LightningClient, rootKeyID uint64, ...) (string, error)
- func IsSuperMacaroon(macHex string) bool
- func NewSuperMacaroonRootKeyID(id [4]byte) uint64
- func ParseMacaroon(macHex string) (*macaroon.Macaroon, error)
- func RootKeyIDFromMacaroon(mac *macaroon.Macaroon) (uint64, error)
- type Baker
- type SuperMacaroonValidator
Constants ¶
This section is empty.
Variables ¶
View Source
var SuperMacaroonRootKeyPrefix = [4]byte{0xFF, 0xEE, 0xDD, 0xCC}
SuperMacaroonRootKeyPrefix is the prefix we set on a super macaroon's root key to clearly mark it as such.
Functions ¶
func BakeSuperMacaroon ¶
func BakeSuperMacaroon(ctx context.Context, lnd lnrpc.LightningClient, rootKeyID uint64, perms []bakery.Op, caveats []macaroon.Caveat) (string, error)
BakeSuperMacaroon uses the lnd client to bake a macaroon that can include permissions for multiple daemons.
func IsSuperMacaroon ¶
IsSuperMacaroon returns true if the given hex encoded macaroon is a super macaroon baked by LiT which can be identified by its root key ID.
func NewSuperMacaroonRootKeyID ¶
NewSuperMacaroonRootKeyID returns a new macaroon root key ID that has the prefix to mark it as a super macaroon root key.
func ParseMacaroon ¶
ParseMacaroon parses a hex encoded macaroon into its native struct.
func RootKeyIDFromMacaroon ¶
RootKeyIDFromMacaroon extracts the root key ID of the passed macaroon.
Types ¶
Click to show internal directories.
Click to hide internal directories.