> ## Documentation Index
> Fetch the complete documentation index at: https://new-docs.squads.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Transaction Accounts

## Overview

Transactions are split into two types, each with their own execution instructions and parameters. Both types are subject to consensus.

| Type | Description |
| - | - |
| [Vault Transactions](#vault-transactions) | Store, vote, and execute arbitrary Solana instructions |
| [Config Transactions](#config-transactions) | Edit config in the Multisig account (members, spending limits, etc.) |

Both transaction types are bound to a transaction index, which denotes position in the multisig's transaction history. This index is also used for PDA derivation.

## Getting a Transaction Address

```typescript theme={null}
import * as multisig from "@sqds/multisig";
import { PublicKey } from "@solana/web3.js";

async function main() {
    // Public Key of the Multisig PDA
    const multisigPda = new PublicKey("<my multisig>");

    // Fetch the deserialized Multisig account
    const multisigInfo = await multisig.accounts.Multisig.fromAccountAddress(
      connection,
      multisigPda
    );

    // Get the current transaction index
    const currentTransactionIndex = Number(multisigInfo.transactionIndex);
    const transactionIndex = BigInt(currentTransactionIndex + 1);
    // or, if this is your first transaction
    // const transactionIndex = 1n;

    // Can be either a VaultTransaction or ConfigTransaction
    const [transactionPda] = multisig.getTransactionPda({
        multisigPda,
        index: transactionIndex,
    });
}
```

## PDA Derivation

Both transaction types use the same derivation:

```
["multisig", multisig_key (as buffer), "transaction", transaction_index]
```

## Vault Transactions

The most common transaction type. Vault Transactions take a Transaction Message containing arbitrary instructions and save them for voting and execution.

### Fetch Vault Transaction Info

```typescript theme={null}
// Fetch the deserialized account
let transactionAccount =
    await multisig.accounts.VaultTransaction.fromAccountAddress(
        connection,
        transactionPda
    );

// Log the Vault Transaction structure
console.log("Transaction: ", transactionAccount);
```

### Vault Transaction Fields

| Field | Type | Description |
| - | - | - |
| `multisig` | `Pubkey` | The multisig this belongs to |
| `creator` | `Pubkey` | Member who submitted the transaction |
| `index` | `u64` | Index within the multisig |
| `bump` | `u8` | PDA bump |
| `vaultIndex` | `u8` | Index of the vault |
| `vaultBump` | `u8` | Derivation bump of the vault PDA |
| `ephemeralSignerBumps` | `Vec<u8>` | Bumps for additional signers |
| `message` | `VaultTransactionMessage` | Instructions to execute |

## Config Transactions

Used to manage configurations (spending limits, members, time-locks, etc.) on your Multisig. Config transactions consist of predefined actions, with some invalidating all previous transactions on execution.

### Fetch Config Transaction Info

```typescript theme={null}
// Fetch the deserialized account
const configTransactionAccount =
        await multisig.accounts.ConfigTransaction.fromAccountAddress(
                connection,
                transactionPda
        );

// Log the Config Transaction structure
console.log("Config Transaction: ", configTransactionAccount);
```

### Config Transaction Fields

| Field | Type | Description |
| - | - | - |
| `multisig` | `Pubkey` | The multisig this belongs to |
| `creator` | `Pubkey` | Member who submitted the transaction |
| `index` | `u64` | Index within the multisig |
| `bump` | `u8` | PDA bump |
| `actions` | `Vec<ConfigAction>` | Actions to perform on the multisig |

## See Also

* [Create Vault Transaction](/developers/typescript-sdk/instructions/create-vault-transaction)
* [Create Config Transaction](/developers/typescript-sdk/instructions/create-config-transaction)
* [Reference: Vault Transaction](/developers/reference/accounts#vault-transaction)
* [Reference: Config Transaction](/developers/reference/accounts#config-transaction)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.