Skip to content

Commit fc1935c

Browse files
committed
fix: add readme
1 parent 8818510 commit fc1935c

File tree

2 files changed

+47
-4
lines changed

2 files changed

+47
-4
lines changed

packages/auth-server-api/.env.example

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ DEPLOYER_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf
1111
# Blockchain Configuration
1212
RPC_URL=http://127.0.0.1:8545
1313

14+
# Rate Limiting Configuration
15+
RATE_LIMIT_DEPLOY_MAX=20
16+
RATE_LIMIT_DEPLOY_WINDOW_MS=3600000 # 1 hour
17+
1418
# Contract Addresses (OPTIONAL - will fall back to src/contracts.json if not provided)
1519
# You can provide these via environment variables OR update src/contracts.json
1620
# To deploy contracts, run: pnpm nx run demo-app:deploy-contracts-erc4337
@@ -27,7 +31,3 @@ RPC_URL=http://127.0.0.1:8545
2731
# PRIVIDIUM_ADMIN_PRIVATE_KEY=0x... # Private key of a user with 'admin' role in Prividium
2832
# PRIVIDIUM_TEMPLATE_KEY=sso-smart-account # Template key for whitelisting deployed contracts
2933
# SSO_AUTH_SERVER_BASE_URL=https://sso.example.com # Base URL of the SSO auth server frontend (used as SIWE domain for admin authorization)
30-
31-
# Rate Limiting Configuration
32-
RATE_LIMIT_DEPLOY_MAX=20
33-
RATE_LIMIT_DEPLOY_WINDOW_MS=3600000

packages/auth-server-api/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)