nooschain / api/routes/bucket/bucket-key-routes / registerBucketKeyRoutes
Function: registerBucketKeyRoutes()
registerBucketKeyRoutes(
context,resolveActor,persistAndSubmitTransaction):void
Defined in: api/routes/bucket/bucket-key-routes.ts:44
Registers API routes for managing bucket keys, including creating new bucket keys, rotating existing keys, and retrieving the active key for a bucket. The routes enforce appropriate permissions and require an authenticated user actor for key management operations. In non-production environments, the routes also support server-side creation of key envelopes for testing purposes, but this is disabled in production to ensure that key management is performed securely on the client side.
Parameters
context
resolveActor
(headers) => Promise<ApiAuthResult>
persistAndSubmitTransaction
(transaction) => Promise<{ consensusResult: SubmitTxResult; transactionHash: string; }>
Returns
void