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

# SDK Config Types

> TypeScript types for SDK initialization and configuration.

## SDKConfig

```ts theme={null}
interface SDKConfig {
  apiKey: string;
  apiUrl: string;
  environment: SDKEnvironment;
  merchantId?: string;
  mode?: PaymentMode;
  pool?: PoolConfig;
  sessionKey?: SessionKeyConfig;
}
```

See [Initialize](/configuration/initialize) for full field documentation.

***

## SDKEnvironment

```ts theme={null}
type SDKEnvironment = 'sandbox' | 'production';
```

***

## PoolConfig

```ts theme={null}
interface PoolConfig {
  customerId: string;
}
```

***

## SessionKeyConfig

```ts theme={null}
interface SessionKeyConfig {
  walletAddress: string;
  defaultDailyLimit: string;
  autoRenew: boolean;
  durationMs?: number;
  onSignTransaction: (tx: ApprovalTransaction) => Promise<string>;
  onSetupComplete?: () => void;
  onSetupCancel?: () => void;
}
```

***

## ApprovalTransaction

Passed to `onSignTransaction` during session key setup:

```ts theme={null}
interface ApprovalTransaction {
  to: string;    // ERC-20 contract address
  data: string;  // Encoded calldata
  value: string; // ETH value (typically "0" for ERC-20 approvals)
}
```

***

## DeviceRegistrationRequest / Response

Used internally for merchant device registration:

```ts theme={null}
interface DeviceRegistrationRequest {
  merchant_id: string;
  device_key: string;    // PEM-encoded ECDSA public key
  metadata: {
    model: string;
    platform: string;
    os_version: string;
    app_version: string;
    device_uuid: string;
  };
}

interface DeviceRegistrationResponse {
  success: boolean;
  status: 'registered' | 'replaced';
}
```
