# KeyAuthorization.toRpc

Converts an [`KeyAuthorization.KeyAuthorization`](/tempo/reference/KeyAuthorization/types#keyauthorization) to an [`KeyAuthorization.Rpc`](/tempo/reference/KeyAuthorization/types#rpc).

## Imports

:::code-group
```ts [Named]
import { KeyAuthorization } from 'ox/tempo'
```

```ts [Entrypoint]
import * as KeyAuthorization from 'ox/tempo/KeyAuthorization'
```
:::

## Examples

```ts twoslash
import { KeyAuthorization } from 'ox/tempo'
import { Value } from 'ox'

const authorization = KeyAuthorization.toRpc({
  address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',
  chainId: 4217n,
  expiry: 1234567890,
  type: 'secp256k1',
  limits: [
    {
      token: '0x20c0000000000000000000000000000000000001',
      limit: Value.from('10', 6)
    }
  ],
  signature: {
    type: 'secp256k1',
    signature: {
      r: '0x635dc2033e60185bb36709c29c75d64ea51dfbd91c32ef4be198e4ceb169fb4d',
      s: '0x50c2667ac4c771072746acfdcf1f1483336dcca8bd2df47cd83175dbe60f0540',
      yParity: 0
    }
  }
})
```

## Definition

```ts
function toRpc(
  authorization: toRpc.Input,
): Rpc
```

**Source:** [src/tempo/KeyAuthorization.ts](https://github.com/wevm/ox/blob/main/src/tempo/KeyAuthorization.ts#L1190)

## Parameters

### authorization

* **Type:** `toRpc.Input`

A Key Authorization.

## Return Type

An RPC-formatted Key Authorization.

`Rpc`
