📄️createRole
The createRole function from peaq SDK allows to create new roles in the network's Role-Based Access Control (RBAC) system, which manages roles and permissions within the blockchain ecosystem. The function returns a JSON object with roleId.
📄️assignRoleToUser
The assignRoleToUser function allows to assign a specific role to a user in a permission management system. This function returns a JSON object with role and user details.
📄️assignRoleToGroup
The assignRoleToGroup function allows you to assign a specific role to a group within a permission management system. This function returns a JSON object with role and group details.
📄️disableRole
The disableRole function allows to disable a specified role. A role typically represents a set of permissions and access rights within the system. This function returns a JSON object with the roleId.
📄️fetchRole
The fetchRole function allows to retrieve role information from a network's RBAC (Role-Based Access Control) system based on the provided parameters. This function returns a JSON object with role info.
📄️fetchRoles
The fetchRoles function fetches the roles associated with a user (owner) from the network's RBAC system. It takes the owner as a required parameter. It returns an array of role objects.
📄️fetchRolePermissions
The fetchRolePermissions function allows to retrieve permissions associated with a specific role from the network's Role-Based Access Control (RBAC) system. This function returns a JSON object with permission and role info.
📄️fetchUserRoles
The fetchUserRoles function is designed to retrieve roles associated with a specific user from the network's RBAC (Role-Based Access Control) system. The function returns an array of roles.
📄️unassignRoleToGroup
The unassignRoleToGroup function allows to unassign a role from a specific group within the peaq network's RBAC system. This function returns a JSON object with role and group IDs.
📄️unassignRoleToUser
The unassignRoleToUser function allows to unassign a role from a specific user within the network's RBAC system. This function returns a JSON object with role and user IDs.
📄️updateRole
The updateRole function allows you to modify the name of a role in the network's Role-Based Access Control (RBAC) system. This function returns a JSON object with a role ID and a new name.