# closeAp2OpenMandate

closeAp2OpenMandate in @provenanceauth/rails/ap2, Rails. Slice 2: the agent closes an open mandate for one transaction (AP2's Human Not Present mode): an SD-JWT signed with the agent's private key (the open mandate's `cnf.jwk`), disclosing the closed mandate, naming the verifier's origin (`aud`) and binding the open SD-JWT by `sd_hash`.

## Signature

```ts
closeAp2OpenMandate(openSdJwt: string, input: { holderKey: { kty?: string; crv?: string; x: string; y: string; d: string }; content: Record<string, unknown>; aud: string; nonce?: string; iat?: number; }): Promise<string>
```

## Parameters

- `openSdJwt` (string)
- `input` ({ holderKey: { kty?: string; crv?: string; x: string; y: string; d: string }; content: Record<string, unknown>; aud: string; nonce?: string; iat?: number; })

## Returns

`Promise<string>`

Runs locally, with no request to the API.
