Versions in this module Expand all Collapse all v0 v0.2.0 Jul 21, 2026 v0.1.2 Jul 19, 2026 v0.1.1 Jul 19, 2026 Changes in this version + const ReasonPossessionFailed + func At(body any, path string) (any, bool) + func Canonical(v any) []byte + func EffectNames(mask Effect) string + func IsBatch(body any) bool + func MatchBody(pred map[string]any, body any) bool + func MatchPath(pattern, path string) bool + func MethodName(bit Method) string + func NewKeypair() (pub string, priv ed25519.PrivateKey, err error) + func NormalizeResource(resource string) string + func ReceiptHash(r *Receipt, prev string) string + func VerifyBytes(pubHex string, msg []byte, sigHex string) bool + type Adapter struct + Classify []ClassifyRule + Default struct{ ... } + Vendor string + Version string + type Caveats struct + Budget *float64 + Ceiling *[]string + Depth *int + Effects *Effect + Exp *int64 + Methods *Method + Resources *[]string + Scopes *[]string + type Chain []Slip + func Narrow(parent Chain, c Caveats, childPub string, parentSigner Signer, nonce string) (Chain, []string, error) + type ChainStatus struct + BrokenAt string + Count int + Reason string + Unsigned int + Verified bool + func VerifyReceiptChain(receipts []Receipt, pub string) ChainStatus + type Classified struct + Action string + Cost float64 + Effect Effect + Method Method + Resource string + Scopes []string + Unknown bool + func Classify(a Adapter, r Request) Classified + type ClassifyRule struct + Effect string + ID string + Match *MatchSpec + Meters []string + Method *string + Scopes []string + type Clock interface + NowMillis func() int64 + type Decision struct + Allow bool + Reason string + func Authorize(e SlipBody, c Classified) Decision + type Ed25519Signer struct + func NewEd25519Signer(priv ed25519.PrivateKey) Ed25519Signer + func (s Ed25519Signer) Public() string + func (s Ed25519Signer) Sign(msg []byte) (string, error) + type Effect uint + const EffectDestructive + const EffectExternal + const EffectRead + const EffectSpends + const EffectUnknown + const EffectWrite + func EffectByName(name string) (Effect, bool) + type MapRootStore map[string]string + func (m MapRootStore) IssuerPubKey(iss string) (string, bool) + type MatchSpec struct + Action *string + Body map[string]any + Method *string + Path *string + type Method uint + const MethodDELETE + const MethodGET + const MethodPATCH + const MethodPOST + const MethodPUT + func MethodByName(name string) (Method, bool) + type Receipt struct + CreatedAt int64 + Decision string + Effect string + Handle string + Hash string + ID string + OverAsk bool + PrevHash string + Principal string + Reason string + Scopes []string + Sig string + Tool string + type Request struct + Action string + Amount float64 + Body any + Resource string + type RootStore interface + IssuerPubKey func(iss string) (string, bool) + type Signer interface + Public func() string + Sign func(msg []byte) (string, error) + type Slip struct + Body SlipBody + Sig string + func SignSlip(body SlipBody, signer Signer) (Slip, error) + type SlipBody struct + Aud string + Budget float64 + Ceiling []string + Depth int + Effects Effect + Exp int64 + Iss string + Methods Method + Nonce string + Resources []string + Scopes []string + V int + Vendor string + func Fold(chain Chain, onAnomaly func(string)) SlipBody + type VerifyResult struct + Anomalies []string + Effective SlipBody + OK bool + Reason string + func VerifyChain(chain Chain, callerPub, callerSig string, reqBytes []byte, roots RootStore, ...) VerifyResult