> ## Documentation Index
> Fetch the complete documentation index at: https://cobo.com/developers/llms.txt
> Use this file to discover all available pages before exploring further.

# TSS Node callback mechanism

> Understanding the TSS Node callback mechanism architecture and workflow

<Tip>
  Try [Cobo WaaS Skill](/developers/v2/guides/overview/cobo-waas-skill) in your AI coding assistant (Claude Code, Cursor, etc.). Describe your needs in natural language to auto-generate production-ready SDK code and debug faster 🚀
</Tip>

The TSS Node callback mechanism is a critical component in the server co-signer solution that enables custom risk control implementation. When enabled, it reviews and approves all task requests before the TSS Node executes them.

## Sample callback server

Cobo provides example callback server implementations in multiple programming languages to help you quickly develop your callback server. You can find these examples in our [GitHub repository](https://github.com/CoboGlobal/cobo-mpc-callback-server-v2-template).

## How it works

After startup, the TSS Node establishes a persistent connection with the Cobo WaaS service to receive task requests. These tasks fall into three categories:

* **Key generation (KeyGen)**: Creating new key shares for your MPC Wallets.
* **Key signing (KeySign)**: Signing transactions or messages.
* **Key resharing (KeyReshare)**: Redistributing key shares among participants.

Without the callback mechanism, the TSS Node executes tasks directly or waits for approval from the [embedded risk control module](/developers/v2/guides/mpc-wallets/server-co-signer/embedded-risk-controls) if it is enabled. With the callback mechanism enabled, the TSS Node requests approval from your TSS Node callback servers for each task. The TSS Node only executes tasks that all of your callback servers approve.

## Callback request types

Each callback request carries a `request_type` field that identifies the operation the TSS Node asks your callback server to approve.

| `request_type` | Name             | Meaning                                                               |
| -------------- | ---------------- | --------------------------------------------------------------------- |
| `0`            | `TypePing`       | Heartbeat check that verifies your callback server is reachable.      |
| `1`            | `TypeKeyGen`     | A request to create new key shares for your MPC Wallets.              |
| `2`            | `TypeKeySign`    | A request to sign a transaction or message.                           |
| `3`            | `TypeKeyReshare` | A request to redistribute key shares to a new key share holder group. |

For the full payload schema of each request type, and for the HTTP response your callback server must return, see [Callback request and response formats](/developers/v2/guides/mpc-wallets/server-co-signer/callback-server-data-structure).

<Note>
  These callback `request_type` values are sent by the TSS Node to your callback server for approval. They are distinct from Cobo webhook event types (such as `wallets.transaction.*` and `wallets.mpc.tss_request.*`), which the WaaS service sends to notify your application of status changes. For webhook event types, see [Webhook event types](/developers/v2/guides/webhooks-callbacks/webhook-event-type).
</Note>

## Communication security

The TSS Node and callback server communicate via HTTP, using JSON Web Token (JWT) with RS256 signing algorithm to ensure secure data transmission. This involves:

1. **Key generation**: Both the TSS Node and callback server generate their own RSA key pairs.
2. **Key exchange**: Each component configures the other's RSA public key in their system.
3. **Request signing**: All requests are signed using the sender's private key.
4. **Signature verification**: Recipients verify signatures using the sender's public key.

To learn more about JWTs, see [Introduction to JSON Web Tokens](https://jwt.io/introduction).

## Implementation steps

To implement the callback mechanism:

1. [Deploy your TSS Node callback server](/developers/v2/guides/mpc-wallets/server-co-signer/callback-server-deploy).
2. [Configure callback keys](/developers/v2/guides/mpc-wallets/server-co-signer/callback-server-configure).
3. Start both the TSS Node and callback server.
