This guide will walk you through setting up and running the Utila Co-Signer.
Prerequisites
Before running the co-signer, you must have:
- A registered device.
- Downloaded key shares.
If you don’t have these set up yet, follow the Device and Key Shares Setup Guide
Run the Co-Signer
The co-signer can be run in two modes:
- Sign All Transactions Mode, which automatically signs all transactions designated to the service account
- Webhook Mode, which signs transactions designated to the service account, based on a user-supplied webhook.
1. Run in Sign All Transactions Mode
To run the co-signer in its simplest form, which signs all relevant transactions automatically, run the following command:
./utilacli cosigner run --vault-id <vault-id> --device-id <device-id> --sign-all-txs
2. Run in Webhook Mode
To give your own service control over which transactions to sign, use the --webhook-url
flag.
Each transaction awaiting signature will be sent to your webhook. The co-signer will then act based on the webhook’s response.
Don't confuse the co-signer webhook with the Event Webhooks.
Webhook Input
The webhook receives the transaction object, as defined in the GetTransaction response.
Webhook Output
The webhook must respond with:
- HTTP
200 OK
status code. - JSON containing a boolean field
signTransaction
.
Example:
{
"signTransaction": true
}
If true
, the co-signer signs the transaction. If false
, it cancels it.