# Class Address

- Defined in packages/util/src/Address.ts:10

#####
Index

### Constructors

constructor

### Properties

identifier
kind
pubkey
relays

### Methods

toNaddr
toString
from
fromEvent
fromNaddr
isAddress

##
Constructors

### constructor

- new Address(
  kind: number,
  pubkey: string,
  identifier: string,
  relays?: string[],
  ): Address

- #### Parameters

  - kind: number
  - pubkey: string
  - identifier: string
  - relays: string[] = []

  #### Returns Address

  - Defined in packages/util/src/Address.ts:11

##
Properties

### `Readonly` identifier

identifier: string

- Defined in packages/util/src/Address.ts:14

### `Readonly` kind

kind: number

- Defined in packages/util/src/Address.ts:12

### `Readonly` pubkey

pubkey: string

- Defined in packages/util/src/Address.ts:13

### `Readonly` relays

relays: string[] = []

- Defined in packages/util/src/Address.ts:15

##
Methods

### toNaddr

- toNaddr(): `naddr1${string}`

- #### Returns `naddr1${string}`

  - Defined in packages/util/src/Address.ts:55

### toString

- toString(): string

- #### Returns string

  - Defined in packages/util/src/Address.ts:53

### `Static` from

- from(address: string, relays?: string[]): Address

- #### Parameters

  - address: string
  - relays: string[] = []

  #### Returns Address

  - Defined in packages/util/src/Address.ts:22

### `Static` fromEvent

- fromEvent(event: AddressableEvent, relays?: string[]): Address

- #### Parameters

  - event: AddressableEvent
  - relays: string[] = []

  #### Returns Address

  - Defined in packages/util/src/Address.ts:47

### `Static` fromNaddr

- fromNaddr(naddr: string): Address

- #### Parameters

  - naddr: string

  #### Returns Address

  - Defined in packages/util/src/Address.ts:28

### `Static` isAddress

- isAddress(address: string): boolean

- #### Parameters

  - address: string

  #### Returns boolean

  - Defined in packages/util/src/Address.ts:18