> For the complete documentation index, see [llms.txt](https://multisig-doc.hive-keychain.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://multisig-doc.hive-keychain.com/websocket-flow/3-user-b-receives-the-signature-request.md).

# 3 - User B receives the signature request

The user can receive signature requests either through [subscribing to Websocket](/websocket-flow/1-users-connect-to-the-websocket.md) or through the following process.&#x20;

When the user has successfully subscribed to the WebSocket, they may then proceed to subscribe to real-time signature request notifications.

```typescript
const signRequestCallback:SignatureRequestCallback =  async (message: SignatureRequest) => {
   // the user can decode the transaction here
   console.log(message);
  };

await multisig.wss.onReceiveSignRequest(signRequestCallback);
```

### SignatureRequestCallback type

| Field                    | Description                                                       | Type     |
| ------------------------ | ----------------------------------------------------------------- | -------- |
| SignatureRequestCallback | A function that accepts a SignatureRequest object as an argument. | function |

### SignatureRequest object

| Property       | Description                                                                                                        | Type                  |
| -------------- | ------------------------------------------------------------------------------------------------------------------ | --------------------- |
| id             | An id assigned by the backend.                                                                                     | number                |
| expirationDate | The expiration date set by the initiator.                                                                          | Date                  |
| threshold      | The minimum number of weight required before broadcasting the transaction.                                         | number                |
| keyType        | The type of key subscribing to the WebSocket. Can be "Active" or "Posting"                                         | KeychainKeyTypes enum |
| initiator      | The username of transaction initiator.                                                                             | string                |
| broadcasted    | The flag set by the backend when a transaction hahs been broadcasted. True when it is broadcasted otherwise False. | boolean               |
| createdAt      | Creation date of the request.                                                                                      | Date                  |
| signers        | An array of Signer object                                                                                          | Signer object         |
| status         | The current status of the signature request set by the backend. It can be Pending, Expired, or Broadcasted.        | string                |

### Signer object

| Property            | Description                                                                       | Type              |
| ------------------- | --------------------------------------------------------------------------------- | ----------------- |
| id                  | An id assigned by the backend.                                                    | number            |
| publicKey           | The public key of the signer with respect to the keyType used in the transaction. | string            |
| encrptedTransaction | The encrypted transaction string.                                                 | string            |
| weight              | The weight of the signer.                                                         | number            |
| signature           | The signature of the signer                                                       | string (optional) |
