These notifications are not the same as Cobo webhook events. Cobo sends
wallets.mpc.tss_request.* webhook events from the Cobo platform to the endpoint you register in Cobo Portal, and signs them with Cobo’s webhook signature. The events on this page are sent by your own TSS Node, use the request.* event names, are signed with your node’s RSA key, and are configured in the node configuration file. Subscribing to one does not deliver the other. For Cobo webhook events, see Webhook event types.Before you start
Event notifications use an RSA 2048 key pair. Generate the key pair and store it in the node database before you start the node for the first time:Configure event notifications
Add or uncomment theevent section in the TSS Node configuration file, such as cobo-tss-node-config.yaml:
Top-level parameters
Per-server parameters
Each entry underserver inherits the top-level values, and can override any of them.
The following example sends signing events to one server and the full set of events to an audit server, with a longer retry budget for the audit server:
Supported event types
Subscribe only to the event types your integration acts on, so the node does not spend delivery attempts on events you discard.KeyGen
KeySign
KeyReshare
KeyShareSign
Request format
The node sends each event as a form-encoded POST request, with the JWT in theTSS_JWT_MSG field:
Your server must return
200 OK or 201 Created. The node treats every other status code as a failure and retries.
Event payload
After you decodepackage_data, the event body has the following shape:
Every
data object carries data_type, request_id, request_type, request_status, request_detail, extra_info, failed_reason, and result. The fields inside request_detail and result differ per operation.
Delivery and retries
When a delivery attempt fails, the node waitssleep_seconds and tries again, up to retry_times attempts. The interval is fixed, so the wait between attempts does not grow.
The following behavior applies to every configured server:
- Setting
retry_timesto0retries without limit, until the push succeeds or the node stops. - The node writes each event to its database before the first attempt, with the status
pending. After a restart, it resumes delivery of up to 1000 pending events. - After a successful push, the node deletes the event record. After the retry budget is exhausted, it marks the event
failed.
event_id.
The following table shows how the two retry parameters combine:
Health checks
Whenmonitor_interval is not empty, the node periodically sends a ping request to each event server:
package_data carries event_type set to ping. The node retries a failed ping up to two times, at 3-second intervals.
Handle ping separately from business events: return 200 OK and do no further processing.
Implement a receiving server
Cobo publishes Go and Java event server templates that you can clone and complete with your own business logic:- Repository: cobo-mpc-callback-server-v2-template
- Go implementation:
cobo-mpc-event-server-golang/ - Java implementation:
cobo-mpc-event-server-java/
- Listen for
POST /v2/eventand read the JWT from theTSS_JWT_MSGform field. - Verify the signature with the node’s RSA public key, stored at
configs/tss-node-event-pub.key. Return400 Bad Requestwhen verification fails. - Decode the event JSON from the
package_dataclaim. - Deserialize it into a
TSSEventwith thecobo-waas2SDK, then dispatch on the event type. - Return
200 OKon success. Return200 OKforpingevents without further processing.
README.md and source of each template in the repository.
Recommended configuration
The following configuration keeps critical events from being dropped, and setstoken_expire_minutes above request_timeout so a token does not expire before the request times out:
token_expire_minutes when you use a long sleep_seconds.
FAQ
How do I get the public key for signature verification?
How do I get the public key for signature verification?
Run
./tss-node event key info on the node. The command prints the public key in PEM format. Configure that key on your receiving server.Can the same event be delivered more than once?
Can the same event be delivered more than once?
Yes. The node retries when the network fails or when your server does not return
200 OK or 201 Created. Deduplicate on event_id, which is a UUID.Are undelivered events lost when the node restarts?
Are undelivered events lost when the node restarts?
No. The node writes each event to its database with the status
pending before the first delivery attempt, and resumes delivery after a restart.What is the difference between setting retry_times to 0 and omitting it?
What is the difference between setting retry_times to 0 and omitting it?
Setting
retry_times to 0 retries without limit. Omitting it applies the default of 60.What value should I use for token_expire_minutes?
What value should I use for token_expire_minutes?
Use a value between 2 and 5 minutes, and keep it above
request_timeout so the token does not expire before the request times out. Raise it further when sleep_seconds is large, because the node generates a new JWT for each retry.Can I configure more than one receiving server?
Can I configure more than one receiving server?
Yes. Add an entry per server under
server. Each server receives events and retries independently.