mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-25 13:54:05 -06:00
62 lines
1.7 KiB
TypeScript
62 lines
1.7 KiB
TypeScript
import { BytesLike } from "ethers";
|
|
/**
|
|
* Roles are used to handle permissions on modules that extend {@link ModuleWithRoles}.
|
|
* @public
|
|
*/
|
|
export interface IRoles {
|
|
/**
|
|
* This admin role allows the wallet to modify contract metadata and {@link ModuleWithRoles.grantRole | grant} and {@link ModuleWithRoles.revokeRole | revoke} Roles.
|
|
* @public
|
|
*/
|
|
admin: "admin";
|
|
/**
|
|
* The minter role allows the wallet to mint new assets.
|
|
* ({@link NFTModule.mint | NFTs}, {@link TokenModule.mint | Tokens}, {@link PackModule.create | Packs}, etc)
|
|
* @public
|
|
*/
|
|
minter: "minter";
|
|
/**
|
|
* The pauser role allows the wallet to pause all external contract interactions.
|
|
* @public
|
|
*/
|
|
pauser: "pauser";
|
|
/**
|
|
* The transfer role allows the wallet to transfer and receive assets
|
|
* **even** when the module is set to be non-transferrable.
|
|
* @public
|
|
*/
|
|
transfer: "transfer";
|
|
/**
|
|
* The editor role allows the wallet to edit data in the {@link DatastoreModule}.
|
|
* @alpha
|
|
*/
|
|
editor: "editor";
|
|
/**
|
|
* The lister role allows the wallet to list assets on the {@link MarketModule}.
|
|
* @public
|
|
*/
|
|
lister: "lister";
|
|
/**
|
|
* The contract address allowed to list assets from
|
|
* @internal
|
|
*/
|
|
asset: "asset";
|
|
}
|
|
/**
|
|
* {@inheritDoc IRoles}
|
|
* @public
|
|
*/
|
|
export declare type Role = keyof IRoles;
|
|
export declare type SetAllRoles = {
|
|
[key in keyof IRoles]?: string[];
|
|
};
|
|
/**
|
|
*
|
|
* @internal
|
|
*/
|
|
export declare const RolesMap: IRoles;
|
|
/**
|
|
* @internal
|
|
*/
|
|
export declare function getRoleHash(role: Role): BytesLike;
|