Developer Considerations

Key differences when building on Prividium™ chains.

Prividium™ chains enforce authentication and permissions at the RPC layer. Standard Web3 patterns require adaptation.

Authentication Required

Every RPC interaction requires authentication. Unauthenticated requests fail.

  1. Users authenticate via OAuth 2.0 (OIDC providers or crypto-native SIWE).
  2. Applications register as OAuth clients in the Admin Panel.
  3. Scripts authenticate programmatically via the Permissions API.
Use the Prividium™ SDK to manage authentication flows.

Contract Deployment

Deploying contracts requires explicit permissions granted by a chain administrator.

  1. Request deployment permissions from your network administrator.
  2. Authenticate before deployment using the CLI proxy, manual token injection, or Foundry headers.
  3. Configure function permissions in the Admin Panel immediately after deployment. All functions default to Forbidden.

Dual RPC Endpoints

Prividium™ uses separate RPC endpoints depending on the use case.

EndpointAuthenticationUsed by
/rpc (Proxy RPC)Bearer token in headerBrowser wallets (MetaMask, etc.)
/wallet/{token} (User RPC)Token embedded in URLScripts (Viem, Ethers.js)

Transaction Workflow

Sending transactions via browser wallets (MetaMask, etc.) requires additional steps compared to public chains.

  1. Pre-fetch parameters: Retrieve nonce, gas estimate, and gas price using an authenticated client.
  2. Enable wallet token: Call enableWalletToken() from the Prividium™ SDK before each transaction.
  3. Send transaction: Include pre-fetched values explicitly.
Wallet tokens are transaction-specific and expire. Enable them immediately before sending.

Permission Model

All contract interactions check permissions defined in the Admin Panel.

  • Read functions: Permissions checked on eth_call.
  • Write functions: Permissions checked on both simulation and execution.
  • Default state: All functions are Forbidden until configured.

Configure access rules using permission types like All Users, Check Role, or Restrict Argument.

Key Differences from Public Chains

AspectPublic ChainPrividium™
RPC AccessOpenAuthenticated
Contract DeploymentPermissionlessRequires permission
Function CallsOpenPermission-controlled
Transaction SigningWallet onlyWallet + token enablement
Network ConfigurationStatic RPCUser-specific RPC URLs

Made with ❤️ by the ZKsync Community