Developer Considerations

Key differences when building on Prividium™ chains.
This document provides a high-level overview of developer considerations for Prividium™ chains. For detailed documentation with code examples, see the embedded documentation in the Admin Panel and User Panel.

Prividium™ chains enforce authentication and permissions at the RPC layer. You must adapt standard Web3 patterns to work with these requirements.

Authentication Required

All RPC interactions require authentication. The system rejects unauthenticated requests.

  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 Prividium API.
Use the Prividium™ SDK to manage authentication flows.

Contract Deployment

Chain administrators must grant explicit deployment permissions before you can deploy contracts.

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

Dual RPC Endpoints

Prividium™ provides separate RPC endpoints for different use cases.

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

Transaction Workflow

Browser wallets (MetaMask, etc.) require additional steps compared to public chains when you send transactions.

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

Permission Model

The system checks permissions defined in the Admin Panel for all contract interactions.

  • Read functions: The system checks permissions on eth_call.
  • Write functions: The system checks permissions on both simulation and execution.
  • Default state: All functions default to Forbidden until you configure them.

Configure access rules using permission types: 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