---
title: "Threshold key generation, final round"
method: POST
path: "/v1/keys/tss/keygen/complete"
tags: ["Key Custody"]
---

# Threshold key generation, final round

`POST /v1/keys/tss/keygen/complete`

## Request

- Base URL: `https://api.1claw.co`
- URL: `https://api.1claw.co/v1/keys/tss/keygen/complete`
- Auth: HTTP bearer

Needs `X-Passkey-Token` from a tx-assert with `action: tss_keygen` and
`tx_digest` = hex SHA-256 of the session id. Creates the `client_tss`
wallet and returns its address. The browser derives the same public key
package from the packages it already holds; store your share with
`PUT /v1/keys/{key_id}/client-share` next.

## Headers

- `X-Passkey-Token` string, required

## Request body

- object
  - `session_id` string, uuid, required
  - `client_round2` string, required: Base64 FROST DKG round-2 package from participant 2, addressed to the vault.
  - `recovery_round2` string, required: Base64 FROST DKG round-2 package from participant 3, addressed to the vault.
  - `kit_group_public_key` string, required: Hex group public key the device sealed its offline recovery kit for, before this call. The vault commits the key (and sweeps a re-keyed wallet into it) only if it matches, and records kit coverage for share generation 1.
  - `kit_proof` string, required: Base64 Schnorr proof of possession of share 3 for generation 1 (`@1claw/tss-wasm` `kit_share_proof`), proving the page that sealed the kit held this key's recovery share. Required alongside `kit_group_public_key`: missing, malformed or not matching is a 400 and no key is created.

## Response `201`

Wallet created

- object
  - `key_id` string, uuid
  - `chain` string
  - `curve` string
  - `custody` 'client_tss'
  - `address` string
  - `public_key_hex` string
  - `public_key_package` string: Base64 FROST public key package.

## Other responses

- `400`: Invalid request
- `401`: Authentication required or invalid
- `403`: Insufficient permissions
- `404`: Resource not found
- `409`: Resource already exists or conflict

---

[API](https://skmtc.dev/1claw/apis/1claw-api.md) · [All operations](https://skmtc.dev/1claw/apis/1claw-api/llms.txt) · [OpenAPI document](https://skmtc.dev/1claw/apis/1claw-api/revisions/5fa0918f3b41?raw)
