func (t *Token) BaseMacaroon() *macaroon.Macaroon {
	return t.baseMac.Clone()
}
BaseMacaroon returns the base macaroon as received from the authentication
server.
package lsat
import (
	"bytes"
	"encoding/binary"
	"fmt"
	"time"
	"github.com/lightningnetwork/lnd/lntypes"
	"github.com/lightningnetwork/lnd/lnwire"
	"gopkg.in/macaroon.v2"
)
var (
	zeroPreimage lntypes.Preimage
)
type Token struct {
	PaymentHash lntypes.Hash
	Preimage lntypes.Preimage
	AmountPaid lnwire.MilliSatoshi
	RoutingFeePaid lnwire.MilliSatoshi
	TimeCreated time.Time
	baseMac *macaroon.Macaroon
}
func tokenFromChallenge(baseMac []byte, paymentHash *[32]byte) (*Token, error) {
	mac := &macaroon.Macaroon{}
	err := mac.UnmarshalBinary(baseMac)
	if err != nil {
		return nil, fmt.Errorf("unable to unmarshal macaroon: %v", err)
	}
	token := &Token{
		TimeCreated: time.Now(),
		baseMac:     mac,
		Preimage:    zeroPreimage,
	}
	hash, err := lntypes.MakeHash(paymentHash[:])
	if err != nil {
		return nil, err
	}
	token.PaymentHash = hash
	return token, nil
}