@@ -7,3 +7,46 @@ API responsible for deploying SSO smart accounts.
77- ` POST /api/deploy-account ` - Deploy a new smart account with passkey
88 authentication
99- ` GET /api/health ` - Health check endpoint
10+
11+ ## Prividium Mode Setup
12+
13+ When Prividium mode is enabled, the auth server requires user authentication via
14+ Prividium and routes all deployments through the Prividium RPC proxy.
15+
16+ ### Configuration
17+
18+ Set the following environment variables to enable Prividium mode:
19+
20+ ``` env
21+ PRIVIDIUM_MODE=true
22+ PRIVIDIUM_RPC_PROXY_BASE_URL=https://rpc.prividium.io
23+ PRIVIDIUM_PERMISSIONS_BASE_URL=https://permissions.prividium.io
24+ PRIVIDIUM_ADMIN_PRIVATE_KEY=0x... # Private key of a user with 'admin' role in Prividium
25+ PRIVIDIUM_TEMPLATE_KEY=sso-smart-account # Template key for whitelisting deployed contracts
26+ SSO_AUTH_SERVER_BASE_URL=https://sso.example.com # Base URL of the SSO auth server frontend (used as SIWE domain for admin authorization)
27+ ```
28+
29+ ### Prividium Admin Panel Setup
30+
31+ 1 . Create a ** Contract Permission Template** in the Prividium admin panel with
32+ the key ` sso-smart-account ` (or the value you set for
33+ ` PRIVIDIUM_TEMPLATE_KEY ` )
34+ 2 . Configure the template with the required permissions listed below
35+
36+ ### Contract ABI
37+
38+ The SSO smart account contract ABI is available at:
39+ [ ` packages/erc4337-contracts/out/ModularSmartAccount.sol/ModularSmartAccount.json ` ] ( ../erc4337-contracts/out/ModularSmartAccount.sol/ModularSmartAccount.json )
40+ after compiling the contracts.
41+
42+ ### Required Permissions
43+
44+ Configure the following method permissions in your contract template:
45+
46+ | Function | Permission Level | Access Details |
47+ | ----------------- | ---------------- | -------------- |
48+ | ` ENTRY_POINT_V08 ` | All Users | |
49+ | ` accountId ` | All Users | |
50+ | ` domainSeparator ` | All Users | |
51+ | ` eip712Domain ` | All Users | |
52+ | ` entryPoint ` | All Users | |
0 commit comments