sessionKeys.approveOperation
Approve a prepared installation or removal.
namera.sessionKeys.approveOperation() approve a prepared installation or removal.
Usage
Install @namera-ai/sdk and set NAMERA_API_KEY on your backend. IDs and responses below are illustrative fixtures; replace IDs with your own resources.
import { namera } from "./client";
const result = await namera.sessionKeys.approveOperation({
operationId: "0199dfe1-0000-7000-8000-000000000014",
approval: { type: "1claw" },
});
if (!result.success) throw new Error(result.error.message);
console.log(result.data);Returns
API methods return a Promise<NameraResult<T, E>>. When success is true,
data contains the value described below and error is null. On failure,
data is null and error describes the failure.
The JSON example shows the complete successful data, with illustrative values.
Date-time values use ISO strings in JSON; bigint values use decimal strings.
See Handling Results and Errors for the error shape.
Returns the operation ID and durable status. signed means the signed request was persisted for worker submission; it does not mean the installation is confirmed.
{
"operationId": "0199dfe1-0000-7000-8000-000000000014",
"status": "signed"
}Parameters
operationId
Type: string. Required. ID returned by preparation or recovery. It must belong to this same API-key actor.
import { namera } from "./client";
const result = await namera.sessionKeys.approveOperation({
operationId: "0199dfe1-0000-7000-8000-000000000014",
approval: { type: "1claw" },
});
if (!result.success) throw new Error(result.error.message);
console.log(result.data);approval
Type: object. Required. Use { type: "1claw" } for a managed account owner. This explicitly authorizes managed owner signing. For a passkey owner use { type: "passkey", response }, where response is the browser’s complete assertion over the validated preparation challenge.
import { namera } from "./client";
const result = await namera.sessionKeys.approveOperation({
operationId: "0199dfe1-0000-7000-8000-000000000014",
approval: { type: "1claw" },
});
if (!result.success) throw new Error(result.error.message);
console.log(result.data);approval.response
Type: PasskeyAuthenticationResponse. Required only for type: "passkey". The assertion must match the stored account credential, challenge, RP ID, origin, and counter. Keep API credentials on your backend; the browser returns only its assertion to your application.
Behavior and errors
Requires the matching install/uninstall permission. Authorization is checked again before managed signing and at acceptance; revocation prevents unaccepted work from gaining authority. Only the initiating actor can approve. Transient retries reuse the same operation and exact assertion. Accepted signed work remains subject to reconciliation after API-key revocation. Validate using validateOwnerApproval() or validateManagedOwnerApproval() before this call; the SDK does not silently approve prepared calldata for you. Those helpers require independently reconstructed owner, deployment, call, and fee expectations, not values copied from the preparation.