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

# offlineExportPrivateKey

> Exports a private key offline using key shares without server communication

## Function Signature

```typescript theme={"system"}
offlineExportPrivateKey(params: {
  keyShares: (EcdsaKeygenResult | Ed25519KeygenResult)[];
  derivationPath?: string;
}): Promise<{ derivedPrivateKey: string }>
```

## Description

Exports a private key offline using key shares without requiring server communication. This function reconstructs the private key from the provided key shares locally.

## Parameters

### Required Parameters

* **`keyShares`** (`(EcdsaKeygenResult | Ed25519KeygenResult)[]`) - Array of key shares to reconstruct the private key

### Optional Parameters

* **`derivationPath`** (`string`) - BIP-44 derivation path (defaults to "m/44'/60'/0'/0/0")

## Returns

* **`Promise<{ derivedPrivateKey: string }>`** - Object containing the exported private key

## Example

```typescript theme={"system"}
import { authenticatedEvmClient } from './client';

const evmClient = await authenticatedEvmClient();

const result = await evmClient.offlineExportPrivateKey({
  keyShares: [
    // EcdsaKeygenResult or Ed25519KeygenResult objects
  ],
  derivationPath: 'm/44\'/60\'/0\'/0/0', // optional
});

console.log('Offline private key:', result.derivedPrivateKey);
```

## Key Share Format

```typescript theme={"system"}
// Key shares can be either EcdsaKeygenResult or Ed25519KeygenResult
const keyShares: (EcdsaKeygenResult | Ed25519KeygenResult)[] = [
  // Key share objects
];
```

## Error Handling

```typescript theme={"system"}
try {
  const result = await evmClient.offlineExportPrivateKey({
    keyShares,
    derivationPath: 'm/44\'/60\'/0\'/0/0',
  });
  console.log('Offline private key exported successfully');
} catch (error) {
  console.error('Failed to export offline private key:', error);
}
```

## Security Considerations

* **Offline Operation**: This function works without server communication
* **Key Share Security**: Ensure key shares are kept secure
* **Local Processing**: Private key reconstruction happens locally
* **Derivation Path**: Use appropriate derivation path for your use case

## Related Functions

* [`exportPrivateKey()`](/node/reference/evm/export-private-key) - Export private key with server communication
* [`createWalletAccount()`](/node/reference/evm/create-wallet-account) - Create a new wallet account
