> 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/utils/decode-transaction.md).

# Decode Transaction

We also provided a utility function to decode the encrypted transactions received from signature requests.

<pre class="language-typescript"><code class="lang-typescript">const data: IDecodeTransaction = {
         signatureRequest: message,
         username: 'user-b'
      };

<strong>const decodedTx:ITransaction = await multisig.utils.decodeTransaction(data);
</strong></code></pre>

Under the hood, `decodeTransaction()`will validate the authorities of the transaction and then decrypt the transaction through Keychain if it is valid.&#x20;

Once the transaction has been decoded, the user can then sign the request.

### IDecodeTransaction object

<table><thead><tr><th width="191.33333333333331">Property</th><th width="328">Description</th><th>Type</th></tr></thead><tbody><tr><td>signatureRequest</td><td> An array of <code>SignatureRequest</code> objects. </td><td>SignatureRequest[]</td></tr><tr><td>username</td><td>The username of the user that is decoding the transaction. </td><td>stringenum</td></tr></tbody></table>

### ITransaction object

| Property           | Description                                                      | Type                  |
| ------------------ | ---------------------------------------------------------------- | --------------------- |
| signer             | The Signer object received inside the `SignatureRequest` object. | Signer                |
| signatureRequestId | The signature request id assigned by the backend.                | number                |
| transaction        | A dhive `Transaction` object                                     | dhive Transaction     |
| method             | The keyType used when initiating the transaction                 | KeychainKeyTypes enum |
| username           | The username of the signer                                       | string                |
