Co-Signer

The co-signer is a tool integrated in the Utila CLI which allows you to sign transactions automatically.

The co-signer polls the transactions in a given vault, and operates on any transaction which is awaiting signature only when the authenticated service account is set as the designated signer.

The co-signer has two modes of operation:

Sign all transactions - the co-signer signs all the transactions which are designated to it.

Webhook - the co-signer sends transactions which are designated to it, to the specified webhook, and signs or cancels the transaction depending on the webhook's response.

Setup

In order to setup the co-signer, a device and a keyshare need to be created. Follow the steps under the Device Creation section in Utila CLI.

Sign all transactions

In order to run the co-signer in its basic configuration, which signs all of the relevant transactions, run the following command:

./utilacli cosigner run --vault-id <vault-id> --device-id <device-id> --sign-all-txs

Co-signer with webhook

You can configure a webhook for the co-signer using the --webhook-url flag.

Each transaction which is awaiting signtaure and designated to the authenticated service account will be sent to the specified webhook and based on the response the co-signer will sign or cancel the transaction.

Note: Don't confuse the co-signer webhook with the event webhooks, which are configured using the console.

Webhook Input&#xA;The webhook will get the transaction object, which is defined in the GetTransaction response.

Webhook Output&#xA;The webhook is expected to respond with a status of 200 OK and a JSON containing a boolean field signTransaction, which indicates if the transaction should be signed or canceled. For example:

{
  "signTransaction": true
}