Vana SDK - v4.1.0
    Preparing search index...

    Function grantPermissions

    • Group a grant's scope entries into one { scope, actions } row per scope pattern - the view builders and consent UIs should render instead of the raw strings.

      The result is canonical: rows are ordered by scope (code-unit order), actions within a row follow SCOPE_ACTIONS order, and neither rows nor actions repeat, whatever order or duplication the input had.

      Fails closed: if any entry does not fit the grammar this throws InvalidScopeEntryError rather than silently dropping it, so a grant carrying an operation this SDK does not know is never shown as narrower than it is.

      Parameters

      • scopes: readonly string[]

        A grant's scopes array, verbatim.

      Returns GrantPermission[]

      The grouped, canonically ordered permissions.

      InvalidScopeEntryError when any entry does not fit the grammar.