# VirtualAddress.from

Builds a TIP-1022 virtual address from a `masterId` and `userTag`.

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

TIP-1022 encodes virtual addresses as: `[4-byte masterId][10-byte VIRTUAL_MAGIC][6-byte userTag]`

## Imports

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

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

## Examples

```ts twoslash
import { VirtualAddress } from 'ox/tempo'

const address = VirtualAddress.from({
  masterId: '0x58e21090',
  userTag: '0x010203040506'
})

address
// @log: '0x58e21090fdfdfdfdfdfdfdfdfdfd010203040506'
```

## Definition

```ts
function from(
  value: from.Value,
): Address.Address
```

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

## Parameters

### value

* **Type:** `from.Value`

The virtual address parts.

#### value.masterId

* **Type:** `Part`

4-byte master identifier.

#### value.userTag

* **Type:** `Part`

6-byte opaque user tag.

## Return Type

The virtual address.

`Address.Address`
