# VirtualMaster.getMasterId

Derives the 4-byte TIP-1022 `masterId` from a master address and salt.

[TIP-1022](https://docs.tempo.xyz/protocol/tips/tip-1022)

This returns bytes `[4:8]` of the registration hash, regardless of whether the salt satisfies the proof-of-work requirement.

Master addresses must satisfy TIP-1022 registration constraints: they cannot be the zero address, another virtual address, or a TIP-20 token address.

## Imports

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

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

## Examples

```ts twoslash
import { Address, Hex } from 'ox'
import { VirtualMaster } from 'ox/tempo'

const masterId = VirtualMaster.getMasterId({
  address: Address.from(
    '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
  ),
  salt: Hex.from(
    '0x00000000000000000000000000000000000000000000000000000000abf52baf'
  )
})

masterId
// @log: '0x58e21090'
```

## Definition

```ts
function getMasterId(
  value: getMasterId.Value,
): Hex.Hex
```

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

## Parameters

### value

* **Type:** `getMasterId.Value`

Master address and salt.

## Return Type

The derived master identifier.

`Hex.Hex`
