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

    Function permissionsToScopes

    • Inverse of grantPermissions: flatten grouped permissions back into the string[] form a grant is signed with.

      Output is canonical (scopes in code-unit order, read before write, no duplicates), so permissionsToScopes(grantPermissions(scopes)) is the canonical form of scopes, and grantPermissions(permissionsToScopes(p)) is the canonical form of p. Rows with no actions contribute nothing; a row with an action the grammar does not define throws rather than being dropped.

      Parameters

      • permissions: readonly GrantPermission[]

        Grouped permissions, in any order, possibly repeating a scope.

      Returns string[]

      The scope entries, one per (scope, action) pair.

      InvalidScopeEntryError when a scope or action does not fit the grammar.