Blockchain Drive can operate in two modes: mock mode, where all quota and permission checks run against the application database only, and real-contracts mode, where the server communicates with deployed Ethereum smart contracts for quota enforcement, permission verification, and share recording. These endpoints expose the current runtime configuration and let you query the on-chain quota state for your wallet without leaving the API. Both endpoints require an authenticated session cookie.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ankit-bista/Final-Project/llms.txt
Use this file to discover all available pages before exploring further.
GET /blockchain/status
Returns the current blockchain configuration derived from server-side environment variables. Use this to determine which contract features are active before making contract-dependent calls.true when the server is connected to live Ethereum contracts (USE_REAL_CONTRACTS=true). false in mock/development mode.The JSON-RPC endpoint the server is connected to (e.g. an Alchemy or Infura URL), or
null in mock mode.Deployed address of the
StorageAlloc contract, or null if not configured.Deployed address of the
DriveV2 contract, or null if not configured.When
true, the server checks the on-chain quota before accepting an upload and rejects it with QUOTA_EXCEEDED if the user is over their limit.When
true, file-level permission checks consult the DriveV2 contract in addition to the database RBAC table.When
true, share operations must succeed on-chain before the application records them.In development environments,
useRealContracts is typically false and all enforce* flags are false. Quota and permission decisions fall back to the application database in that case.GET /blockchain/quota
Returns on-chain quota statistics for the wallet address linked to the authenticated session. When running in mock mode the contract fields are returned asnull and mode is set to "mock".
Ethereum wallet address associated with the authenticated user.
"real" when the response reflects live contract state, "mock" otherwise.Storage tier assigned by the contract (e.g.
free, pro). null in mock mode.On-chain quota ceiling in bytes (returned as a string to preserve BigInt precision).
null in mock mode.Bytes consumed according to the contract.
null in mock mode.Remaining contract quota in bytes.
null in mock mode.Usage as a percentage (0–100).
null in mock mode.