Creates an unsigned transaction for merging two Solana stake accounts.

Supports both standard recent blockhash nonces (default) and durable nonces (more information [here](https://solana.com/docs/core/transactions/durable-nonces)):

- For standard recent blockhash nonces, leave `nonce_account` and `nonce_authority` empty.
- For durable nonces, define a `nonce_account`.

### Parameters

| Parameter                           | Type              | Required | Description |
|-------------------------------------|-------------------|----------|-------------|
| **network**                         | string            | required | Solana network to build transaction for (`mainnet`, `testnet`, `devnet`). |
| **source_stake_account**           | string            | required | Source stake account pubkey. |
| **destination_stake_account**      | string            | required | Destination stake account pubkey. |
| **funding_account_pubkey**         | string            |          | Pubkey of the account that will fund the transaction. Defaults to the stake authority of the source stake account. |
| **nonce_account**                   | string  null |          | Pubkey of the on-chain nonce account. Enables offline signing without the 60–90s blockhash expiry. |
| **nonce_authority**                 | string  null |          | Pubkey of the account authorized to advance the nonce. Defaults to the fee payer if omitted. |

### Responses

#### 201  Transaction Created

```json
{
  "data": {
    "network": "devnet",
    "signing_payload": "0xSigningPayload",
    "unsigned_transaction_serialized": "0xSerializedTransaction",
    "unsigned_tx_serialized_hex": "0xSerializedTransaction",
    "unsigned_tx_serialized_base64": "0xSerializedTransaction",
    "last_valid_block_height": 359339325,
    "nonce_value": "GNP8nFAjKFBxL6Bfmti9gBGxCRF7gMaGmEiKfJKpJAaG",
    "is_durable_nonce": true
  }
}
```

#### 400  Invalid Request

#### 422  Invalid Request

### Example Curl Command

```bash
curl --request POST \
     --url https://api.figment.io/solana/merge \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-api-key: your-api-key-here' \
     --data '
{
  "network": "mainnet"
}
'
```
