> ## 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.

# offlineExportKey

> Exports a key offline using key shares without server communication

## Function Signature

```typescript theme={"system"}
offlineExportKey(params: {
  chainName: string;
  keyShares: any[];
  derivationPath?: string;
}): Promise<string>
```

## Description

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

## Parameters

### Required Parameters

* **`chainName`** (`string`) - The name of the blockchain chain (e.g., 'base-sepolia')
* **`keyShares`** (`any[]`) - Array of key shares to reconstruct the key

### Optional Parameters

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

## Returns

* **`Promise<string>`** - The exported key as a hex string

## Example

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

const evmClient = await authenticatedEvmClient();

const offlineKey = await evmClient.offlineExportKey({
  chainName: 'base-sepolia',
  keyShares: [
    {
      chainName: 'base-sepolia',
      keyShare: '0x1234567890',
    },
  ],
  derivationPath: 'm/44\'/60\'/0\'/0/0', // optional
});

console.log('Offline key:', offlineKey);
```

## Key Share Format

```typescript theme={"system"}
interface KeyShare {
  chainName: string;
  keyShare: string;
}

const keyShares: KeyShare[] = [
  {
    chainName: 'base-sepolia', // or your specific chain
    keyShare: '0x1234567890', // the actual key share
  },
];
```

## Error Handling

```typescript theme={"system"}
try {
  const offlineKey = await evmClient.offlineExportKey({
    chainName: 'base-sepolia',
    keyShares,
    derivationPath: 'm/44\'/60\'/0\'/0/0',
  });
  console.log('Key exported offline successfully');
} catch (error) {
  console.error('Failed to export key offline:', error);
}
```

## Security Considerations

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

## Related Functions

* [`offlineExportPrivateKey()`](/node/reference/evm/offline-export-private-key) - Export private key offline
* [`exportKey()`](/node/reference/evm/export-key) - Export key with server communication
