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

# Withdrawals

> SDK methods for creating withdrawal requests

Create and execute withdrawal requests. Supports both Bitcoin (multi-address) and Ethereum (single-address) networks.

## Methods

### `createWithdraw()`

Create a withdrawal request.

**Signature:**

```typescript theme={null}
createWithdraw(
  request: CreateWithdrawRequest,
  requestOptions?: RequestOptions
): Promise<WithdrawResponse>
```

**Parameters:**

| Parameter             | Type       | Required | Description                       |
| --------------------- | ---------- | -------- | --------------------------------- |
| `request.networkId`   | `string`   | Yes      | Network ID (from `getNetworks()`) |
| `request.from`        | `string[]` | Yes      | Array of source addresses         |
| `request.to`          | `string`   | Yes      | Recipient address                 |
| `request.amount`      | `string`   | Yes      | Amount to withdraw                |
| `request.clientShare` | `string`   | Yes      | Client share for signing          |

**Example - Bitcoin (Multi-address):**

```typescript theme={null}
const withdrawal = await client.withdraw.createWithdraw({
  networkId: 'your-btc-network-id',
  from: [
    'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
    'bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4'
  ],
  to: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
  amount: '0.001',
  clientShare: 'your-client-share'
});

console.log('Withdrawal ID:', withdrawal.data.data?.id);
console.log('Status:', withdrawal.data.data?.status);
```

**Example - Ethereum (Single-address):**

```typescript theme={null}
const withdrawal = await client.withdraw.createWithdraw({
  networkId: 'your-eth-network-id',
  from: [
    '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
  ],
  to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
  amount: '0.1',
  clientShare: 'your-client-share'
});

// For Ethereum, id is the transaction hash
console.log('Transaction Hash:', withdrawal.data.data?.id);
```

<Warning>
  **Network Differences**: Bitcoin supports multi-address withdrawals (withdraw from multiple addresses in one transaction), while Ethereum only supports single-address withdrawals.
</Warning>
