@pouchy_ai/companion-sdk - v0.63.0
    Preparing search index...

    Function grantsScope

    • Like hasScope, but honours the server's scope subsumptions — so a key granted only wallet.spend still grantsScope(g, 'wallet.read') (the API would serve the balance). Gate a read-only affordance (e.g. showing the wallet balance via getWallet()) on THIS, not hasScope, or the UI hides a feature the server would allow. For non-subsumed scopes it is identical to hasScope.

      Parameters

      • granted: readonly string[]
      • required:
            | "voice"
            | "chat"
            | "call"
            | "files"
            | "events.subscribe"
            | "worldstate.write"
            | "ui.render"
            | "data.activity"
            | "chat.instructions"
            | "memory.read:app"
            | "memory.write:app"
            | "memory.read:core"
            | "memory.write:core"
            | "skills.execute"
            | "wallet.read"
            | "wallet.spend"
            | "social.message"
            | "represent"
            | "expose:knowledge"
            | "expose:facts"
            | "represent:pair"
            | "represent:remember"

      Returns boolean