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

# primitives/StealthAddress

> Auto-generated API documentation

[**@tevm/voltaire**](../index.mdx)

***

[@tevm/voltaire](../index.mdx) / primitives/StealthAddress

# primitives/StealthAddress

## Classes

### InvalidAnnouncementError

Defined in: [src/primitives/StealthAddress/errors.js:60](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L60)

Invalid announcement format

#### Extends

* [`StealthAddressError`](#stealthaddresserror)

#### Constructors

##### Constructor

> **new InvalidAnnouncementError**(`message`, `options`): [`InvalidAnnouncementError`](#invalidannouncementerror)

Defined in: [src/primitives/StealthAddress/errors.js:61](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L61)

###### Parameters

###### message

`any`

###### options

###### Returns

[`InvalidAnnouncementError`](#invalidannouncementerror)

###### Overrides

[`StealthAddressError`](#stealthaddresserror).[`constructor`](#constructor-4)

#### Properties

##### cause?

> `optional` **cause**: `Error`

Defined in: [src/primitives/errors/AbstractError.ts:56](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L56)

Root cause of this error (for error chaining)

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`cause`](#cause-4)

##### code

> **code**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:39](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L39)

Machine-readable error code for programmatic handling

###### Example

```ts theme={null}
'INVALID_FORMAT', 'INVALID_LENGTH'
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`code`](#code-4)

##### context?

> `optional` **context**: `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:45](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L45)

Additional context metadata for debugging

###### Example

```ts theme={null}
{ value: '0x123', expected: '20 bytes' }
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`context`](#context-4)

##### docsPath?

> `optional` **docsPath**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:51](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L51)

Path to documentation for this error

###### Example

```ts theme={null}
'/primitives/address/from-hex#error-handling'
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`docsPath`](#docspath-4)

##### name

> **name**: `string`

Defined in: [src/primitives/StealthAddress/errors.js:66](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L66)

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`name`](#name-4)

#### Methods

##### getErrorChain()

> **getErrorChain**(): `string`

Defined in: [src/primitives/errors/AbstractError.ts:94](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L94)

Get full error chain as string for logging

###### Returns

`string`

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`getErrorChain`](#geterrorchain-8)

##### toJSON()

> **toJSON**(): `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:110](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L110)

Serialize error to JSON for logging/telemetry

###### Returns

`Record`\<`string`, `unknown`>

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`toJSON`](#tojson-8)

***

### InvalidEphemeralPublicKeyError

Defined in: [src/primitives/StealthAddress/errors.js:47](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L47)

Invalid ephemeral public key

#### Extends

* [`StealthAddressError`](#stealthaddresserror)

#### Constructors

##### Constructor

> **new InvalidEphemeralPublicKeyError**(`message`, `options`): [`InvalidEphemeralPublicKeyError`](#invalidephemeralpublickeyerror)

Defined in: [src/primitives/StealthAddress/errors.js:48](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L48)

###### Parameters

###### message

`any`

###### options

###### Returns

[`InvalidEphemeralPublicKeyError`](#invalidephemeralpublickeyerror)

###### Overrides

[`StealthAddressError`](#stealthaddresserror).[`constructor`](#constructor-4)

#### Properties

##### cause?

> `optional` **cause**: `Error`

Defined in: [src/primitives/errors/AbstractError.ts:56](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L56)

Root cause of this error (for error chaining)

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`cause`](#cause-4)

##### code

> **code**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:39](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L39)

Machine-readable error code for programmatic handling

###### Example

```ts theme={null}
'INVALID_FORMAT', 'INVALID_LENGTH'
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`code`](#code-4)

##### context?

> `optional` **context**: `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:45](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L45)

Additional context metadata for debugging

###### Example

```ts theme={null}
{ value: '0x123', expected: '20 bytes' }
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`context`](#context-4)

##### docsPath?

> `optional` **docsPath**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:51](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L51)

Path to documentation for this error

###### Example

```ts theme={null}
'/primitives/address/from-hex#error-handling'
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`docsPath`](#docspath-4)

##### name

> **name**: `string`

Defined in: [src/primitives/StealthAddress/errors.js:53](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L53)

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`name`](#name-4)

#### Methods

##### getErrorChain()

> **getErrorChain**(): `string`

Defined in: [src/primitives/errors/AbstractError.ts:94](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L94)

Get full error chain as string for logging

###### Returns

`string`

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`getErrorChain`](#geterrorchain-8)

##### toJSON()

> **toJSON**(): `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:110](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L110)

Serialize error to JSON for logging/telemetry

###### Returns

`Record`\<`string`, `unknown`>

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`toJSON`](#tojson-8)

***

### InvalidPublicKeyError

Defined in: [src/primitives/StealthAddress/errors.js:34](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L34)

Invalid public key format or length

#### Extends

* [`StealthAddressError`](#stealthaddresserror)

#### Constructors

##### Constructor

> **new InvalidPublicKeyError**(`message`, `options`): [`InvalidPublicKeyError`](#invalidpublickeyerror)

Defined in: [src/primitives/StealthAddress/errors.js:35](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L35)

###### Parameters

###### message

`any`

###### options

###### Returns

[`InvalidPublicKeyError`](#invalidpublickeyerror)

###### Overrides

[`StealthAddressError`](#stealthaddresserror).[`constructor`](#constructor-4)

#### Properties

##### cause?

> `optional` **cause**: `Error`

Defined in: [src/primitives/errors/AbstractError.ts:56](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L56)

Root cause of this error (for error chaining)

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`cause`](#cause-4)

##### code

> **code**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:39](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L39)

Machine-readable error code for programmatic handling

###### Example

```ts theme={null}
'INVALID_FORMAT', 'INVALID_LENGTH'
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`code`](#code-4)

##### context?

> `optional` **context**: `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:45](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L45)

Additional context metadata for debugging

###### Example

```ts theme={null}
{ value: '0x123', expected: '20 bytes' }
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`context`](#context-4)

##### docsPath?

> `optional` **docsPath**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:51](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L51)

Path to documentation for this error

###### Example

```ts theme={null}
'/primitives/address/from-hex#error-handling'
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`docsPath`](#docspath-4)

##### name

> **name**: `string`

Defined in: [src/primitives/StealthAddress/errors.js:40](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L40)

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`name`](#name-4)

#### Methods

##### getErrorChain()

> **getErrorChain**(): `string`

Defined in: [src/primitives/errors/AbstractError.ts:94](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L94)

Get full error chain as string for logging

###### Returns

`string`

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`getErrorChain`](#geterrorchain-8)

##### toJSON()

> **toJSON**(): `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:110](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L110)

Serialize error to JSON for logging/telemetry

###### Returns

`Record`\<`string`, `unknown`>

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`toJSON`](#tojson-8)

***

### InvalidStealthMetaAddressError

Defined in: [src/primitives/StealthAddress/errors.js:21](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L21)

Invalid stealth meta-address format or length

#### Extends

* [`StealthAddressError`](#stealthaddresserror)

#### Constructors

##### Constructor

> **new InvalidStealthMetaAddressError**(`message`, `options`): [`InvalidStealthMetaAddressError`](#invalidstealthmetaaddresserror)

Defined in: [src/primitives/StealthAddress/errors.js:22](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L22)

###### Parameters

###### message

`any`

###### options

###### Returns

[`InvalidStealthMetaAddressError`](#invalidstealthmetaaddresserror)

###### Overrides

[`StealthAddressError`](#stealthaddresserror).[`constructor`](#constructor-4)

#### Properties

##### cause?

> `optional` **cause**: `Error`

Defined in: [src/primitives/errors/AbstractError.ts:56](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L56)

Root cause of this error (for error chaining)

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`cause`](#cause-4)

##### code

> **code**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:39](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L39)

Machine-readable error code for programmatic handling

###### Example

```ts theme={null}
'INVALID_FORMAT', 'INVALID_LENGTH'
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`code`](#code-4)

##### context?

> `optional` **context**: `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:45](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L45)

Additional context metadata for debugging

###### Example

```ts theme={null}
{ value: '0x123', expected: '20 bytes' }
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`context`](#context-4)

##### docsPath?

> `optional` **docsPath**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:51](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L51)

Path to documentation for this error

###### Example

```ts theme={null}
'/primitives/address/from-hex#error-handling'
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`docsPath`](#docspath-4)

##### name

> **name**: `string`

Defined in: [src/primitives/StealthAddress/errors.js:27](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L27)

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`name`](#name-4)

#### Methods

##### getErrorChain()

> **getErrorChain**(): `string`

Defined in: [src/primitives/errors/AbstractError.ts:94](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L94)

Get full error chain as string for logging

###### Returns

`string`

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`getErrorChain`](#geterrorchain-8)

##### toJSON()

> **toJSON**(): `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:110](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L110)

Serialize error to JSON for logging/telemetry

###### Returns

`Record`\<`string`, `unknown`>

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`toJSON`](#tojson-8)

***

### StealthAddressError

Defined in: [src/primitives/StealthAddress/errors.js:7](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L7)

Base error for StealthAddress operations

#### Extends

* [`PrimitiveError`](../index/index.mdx#primitiveerror)

#### Extended by

* [`InvalidStealthMetaAddressError`](#invalidstealthmetaaddresserror)
* [`InvalidPublicKeyError`](#invalidpublickeyerror)
* [`InvalidEphemeralPublicKeyError`](#invalidephemeralpublickeyerror)
* [`InvalidAnnouncementError`](#invalidannouncementerror)
* [`StealthAddressGenerationError`](#stealthaddressgenerationerror)

#### Constructors

##### Constructor

> **new StealthAddressError**(`message`, `options`): [`StealthAddressError`](#stealthaddresserror)

Defined in: [src/primitives/StealthAddress/errors.js:8](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L8)

###### Parameters

###### message

`any`

###### options

###### Returns

[`StealthAddressError`](#stealthaddresserror)

###### Overrides

[`PrimitiveError`](../index/index.mdx#primitiveerror).[`constructor`](../index/index.mdx#constructor-16)

#### Properties

##### cause?

> `optional` **cause**: `Error`

Defined in: [src/primitives/errors/AbstractError.ts:56](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L56)

Root cause of this error (for error chaining)

###### Inherited from

[`PrimitiveError`](../index/index.mdx#primitiveerror).[`cause`](../index/index.mdx#cause-16)

##### code

> **code**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:39](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L39)

Machine-readable error code for programmatic handling

###### Example

```ts theme={null}
'INVALID_FORMAT', 'INVALID_LENGTH'
```

###### Inherited from

[`PrimitiveError`](../index/index.mdx#primitiveerror).[`code`](../index/index.mdx#code-16)

##### context?

> `optional` **context**: `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:45](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L45)

Additional context metadata for debugging

###### Example

```ts theme={null}
{ value: '0x123', expected: '20 bytes' }
```

###### Inherited from

[`PrimitiveError`](../index/index.mdx#primitiveerror).[`context`](../index/index.mdx#context-16)

##### docsPath?

> `optional` **docsPath**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:51](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L51)

Path to documentation for this error

###### Example

```ts theme={null}
'/primitives/address/from-hex#error-handling'
```

###### Inherited from

[`PrimitiveError`](../index/index.mdx#primitiveerror).[`docsPath`](../index/index.mdx#docspath-16)

##### name

> **name**: `string`

Defined in: [src/primitives/StealthAddress/errors.js:14](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L14)

###### Inherited from

`PrimitiveError.name`

#### Methods

##### getErrorChain()

> **getErrorChain**(): `string`

Defined in: [src/primitives/errors/AbstractError.ts:94](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L94)

Get full error chain as string for logging

###### Returns

`string`

###### Inherited from

[`PrimitiveError`](../index/index.mdx#primitiveerror).[`getErrorChain`](../index/index.mdx#geterrorchain-32)

##### toJSON()

> **toJSON**(): `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:110](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L110)

Serialize error to JSON for logging/telemetry

###### Returns

`Record`\<`string`, `unknown`>

###### Inherited from

[`PrimitiveError`](../index/index.mdx#primitiveerror).[`toJSON`](../index/index.mdx#tojson-32)

***

### StealthAddressGenerationError

Defined in: [src/primitives/StealthAddress/errors.js:73](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L73)

Stealth address generation failed

#### Extends

* [`StealthAddressError`](#stealthaddresserror)

#### Constructors

##### Constructor

> **new StealthAddressGenerationError**(`message`, `options`): [`StealthAddressGenerationError`](#stealthaddressgenerationerror)

Defined in: [src/primitives/StealthAddress/errors.js:74](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L74)

###### Parameters

###### message

`any`

###### options

###### Returns

[`StealthAddressGenerationError`](#stealthaddressgenerationerror)

###### Overrides

[`StealthAddressError`](#stealthaddresserror).[`constructor`](#constructor-4)

#### Properties

##### cause?

> `optional` **cause**: `Error`

Defined in: [src/primitives/errors/AbstractError.ts:56](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L56)

Root cause of this error (for error chaining)

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`cause`](#cause-4)

##### code

> **code**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:39](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L39)

Machine-readable error code for programmatic handling

###### Example

```ts theme={null}
'INVALID_FORMAT', 'INVALID_LENGTH'
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`code`](#code-4)

##### context?

> `optional` **context**: `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:45](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L45)

Additional context metadata for debugging

###### Example

```ts theme={null}
{ value: '0x123', expected: '20 bytes' }
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`context`](#context-4)

##### docsPath?

> `optional` **docsPath**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:51](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L51)

Path to documentation for this error

###### Example

```ts theme={null}
'/primitives/address/from-hex#error-handling'
```

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`docsPath`](#docspath-4)

##### name

> **name**: `string`

Defined in: [src/primitives/StealthAddress/errors.js:79](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/errors.js#L79)

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`name`](#name-4)

#### Methods

##### getErrorChain()

> **getErrorChain**(): `string`

Defined in: [src/primitives/errors/AbstractError.ts:94](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L94)

Get full error chain as string for logging

###### Returns

`string`

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`getErrorChain`](#geterrorchain-8)

##### toJSON()

> **toJSON**(): `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:110](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L110)

Serialize error to JSON for logging/telemetry

###### Returns

`Record`\<`string`, `unknown`>

###### Inherited from

[`StealthAddressError`](#stealthaddresserror).[`toJSON`](#tojson-8)

## Interfaces

### CheckStealthAddressResult

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:92](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L92)

Result of stealth address checking

#### Properties

##### isForRecipient

> **isForRecipient**: `boolean`

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:93](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L93)

##### stealthPrivateKey?

> `optional` **stealthPrivateKey**: `Uint8Array`\<`ArrayBufferLike`>

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:94](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L94)

***

### GenerateStealthAddressResult

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:83](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L83)

Result of stealth address generation

#### Properties

##### ephemeralPublicKey

> **ephemeralPublicKey**: [`EphemeralPublicKey`](#ephemeralpublickey-2)

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:85](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L85)

##### stealthAddress

> **stealthAddress**: [`AddressType`](Address.mdx#addresstype)

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:84](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L84)

##### viewTag

> **viewTag**: `number`

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:86](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L86)

***

### StealthAnnouncement

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:74](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L74)

Stealth address announcement

On-chain data published by sender containing ephemeral public key
and view tag. Enables recipient to scan for stealth addresses.

#### Properties

##### ephemeralPublicKey

> **ephemeralPublicKey**: [`EphemeralPublicKey`](#ephemeralpublickey-2)

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:75](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L75)

##### stealthAddress

> **stealthAddress**: [`AddressType`](Address.mdx#addresstype)

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:77](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L77)

##### viewTag

> **viewTag**: `number`

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:76](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L76)

## Type Aliases

### EphemeralPublicKey

> **EphemeralPublicKey** = `Uint8Array` & `object`

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:55](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L55)

Ephemeral public key (33 bytes compressed)

One-time public key generated by sender and announced on-chain.
Used by recipient to derive shared secret for stealth address detection.

#### Type Declaration

##### \_\_tag

> `readonly` **\_\_tag**: `"EphemeralPublicKey"`

***

### SpendingPublicKey

> **SpendingPublicKey** = `Uint8Array` & `object`

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:35](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L35)

Spending public key (33 bytes compressed)

Compressed secp256k1 public key used for deriving stealth addresses.
Recipient uses corresponding private key to spend from stealth addresses.

#### Type Declaration

##### \_\_tag

> `readonly` **\_\_tag**: `"SpendingPublicKey"`

***

### StealthMetaAddress

> **StealthMetaAddress** = `Uint8Array` & `object`

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:25](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L25)

Stealth meta-address (66 bytes)

Concatenation of spending public key (33 bytes compressed) and
viewing public key (33 bytes compressed). Published by recipient
to enable non-interactive stealth address generation.

Format: spendingPubKey (33) || viewingPubKey (33)

#### Type Declaration

##### \_\_tag

> `readonly` **\_\_tag**: `"StealthMetaAddress"`

#### See

[https://eips.ethereum.org/EIPS/eip-5564#stealth-meta-address-format](https://eips.ethereum.org/EIPS/eip-5564#stealth-meta-address-format)

***

### ViewingPublicKey

> **ViewingPublicKey** = `Uint8Array` & `object`

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:45](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L45)

Viewing public key (33 bytes compressed)

Compressed secp256k1 public key used for scanning blockchain.
Recipient uses corresponding private key to detect stealth addresses.

#### Type Declaration

##### \_\_tag

> `readonly` **\_\_tag**: `"ViewingPublicKey"`

***

### ViewTag

> **ViewTag** = `number`

Defined in: [src/primitives/StealthAddress/StealthAddressType.ts:66](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/StealthAddressType.ts#L66)

View tag (1 byte)

First byte of hashed shared secret. Enables fast rejection
of non-matching stealth addresses (\~255/256 probability).
Reduces scanning overhead by \~6x.

## Variables

### COMPRESSED\_PUBLIC\_KEY\_SIZE

> `const` **COMPRESSED\_PUBLIC\_KEY\_SIZE**: `33` = `33`

Defined in: [src/primitives/StealthAddress/constants.js:19](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/constants.js#L19)

Compressed public key length (33 bytes)
Format: 0x02/0x03 prefix + x-coordinate (32 bytes)

***

### PRIVATE\_KEY\_SIZE

> `const` **PRIVATE\_KEY\_SIZE**: `32` = `32`

Defined in: [src/primitives/StealthAddress/constants.js:30](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/constants.js#L30)

Private key length (32 bytes)

***

### SCHEME\_ID

> `const` **SCHEME\_ID**: `1` = `1`

Defined in: [src/primitives/StealthAddress/constants.js:41](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/constants.js#L41)

ERC-5564 scheme ID for SECP256k1 with view tags

***

### STEALTH\_META\_ADDRESS\_SIZE

> `const` **STEALTH\_META\_ADDRESS\_SIZE**: `66` = `66`

Defined in: [src/primitives/StealthAddress/constants.js:13](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/constants.js#L13)

Stealth meta-address length (66 bytes)
Format: spendingPubKey (33) || viewingPubKey (33)

***

### UNCOMPRESSED\_PUBLIC\_KEY\_SIZE

> `const` **UNCOMPRESSED\_PUBLIC\_KEY\_SIZE**: `64` = `64`

Defined in: [src/primitives/StealthAddress/constants.js:25](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/constants.js#L25)

Uncompressed public key length (64 bytes)
Format: x-coordinate (32) || y-coordinate (32)

***

### VIEW\_TAG\_SIZE

> `const` **VIEW\_TAG\_SIZE**: `1` = `1`

Defined in: [src/primitives/StealthAddress/constants.js:36](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/constants.js#L36)

View tag size (1 byte)
First byte of hashed shared secret

## Functions

### checkStealthAddress()

> **checkStealthAddress**(`viewingPrivateKey`, `ephemeralPublicKey`, `viewTag`, `spendingPublicKey`, `stealthAddress`): [`CheckStealthAddressResult`](#checkstealthaddressresult)

Defined in: [src/primitives/StealthAddress/checkStealthAddress.js:48](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/checkStealthAddress.js#L48)

Check if stealth address belongs to recipient

Implements ERC-5564 stealth address checking:

1. Compute shared secret: ECDH(viewingPrivKey, ephemeralPubKey)
2. Hash shared secret
3. Check view tag matches (fast rejection)
4. If matches, compute stealth private key
5. Derive address and verify match

#### Parameters

##### viewingPrivateKey

`Uint8Array`\<`ArrayBufferLike`>

32-byte viewing private key

##### ephemeralPublicKey

[`EphemeralPublicKey`](#ephemeralpublickey-2)

33-byte compressed ephemeral public key

##### viewTag

`number`

View tag from announcement

##### spendingPublicKey

[`SpendingPublicKey`](#spendingpublickey)

33-byte compressed spending public key

##### stealthAddress

[`AddressType`](Address.mdx#addresstype)

Announced stealth address

#### Returns

[`CheckStealthAddressResult`](#checkstealthaddressresult)

Match result with optional stealth private key

#### See

* [https://eips.ethereum.org/EIPS/eip-5564#stealth-address-checking](https://eips.ethereum.org/EIPS/eip-5564#stealth-address-checking)
* [https://voltaire.tevm.sh/primitives/stealth-address](https://voltaire.tevm.sh/primitives/stealth-address) for StealthAddress documentation

#### Since

0.0.0

#### Example

```javascript theme={null}
import * as StealthAddress from './primitives/StealthAddress/index.js';

// Recipient scans announcements
const result = StealthAddress.checkStealthAddress(
  viewingPrivateKey,
  announcement.ephemeralPublicKey,
  announcement.viewTag,
  spendingPublicKey,
  announcement.stealthAddress
);

if (result.isForRecipient) {
  console.log('Found stealth payment!');
  // Use result.stealthPrivateKey to spend
}
```

***

### compressPublicKey()

> **compressPublicKey**(`uncompressed`): `Uint8Array`\<`ArrayBufferLike`>

Defined in: [src/primitives/StealthAddress/compressPublicKey.js:27](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/compressPublicKey.js#L27)

Compress uncompressed secp256k1 public key

Converts 64-byte uncompressed format (x, y) to 33-byte compressed format.
Uses 0x02 prefix if y is even, 0x03 if y is odd.

#### Parameters

##### uncompressed

`Uint8Array`\<`ArrayBufferLike`>

64-byte uncompressed public key

#### Returns

`Uint8Array`\<`ArrayBufferLike`>

33-byte compressed public key

#### See

[https://voltaire.tevm.sh/primitives/stealth-address](https://voltaire.tevm.sh/primitives/stealth-address) for StealthAddress documentation

#### Since

0.0.0

#### Throws

If input length is invalid

#### Example

```javascript theme={null}
import * as StealthAddress from './primitives/StealthAddress/index.js';
const uncompressed = new Uint8Array(64); // x || y
const compressed = StealthAddress.compressPublicKey(uncompressed);
console.log(compressed.length); // 33
```

***

### computeStealthPrivateKey()

> **computeStealthPrivateKey**(`spendingPrivateKey`, `hashedSharedSecret`): `Uint8Array`\<`ArrayBufferLike`>

Defined in: [src/primitives/StealthAddress/computeStealthPrivateKey.js:32](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/computeStealthPrivateKey.js#L32)

Compute stealth private key from spending private key and shared secret hash

Implements ERC-5564 private key derivation:
stealthPrivateKey = (spendingPrivateKey + hashedSharedSecret) mod n

Where n is the secp256k1 curve order.

#### Parameters

##### spendingPrivateKey

`Uint8Array`\<`ArrayBufferLike`>

32-byte spending private key

##### hashedSharedSecret

`Uint8Array`\<`ArrayBufferLike`>

32-byte hashed shared secret

#### Returns

`Uint8Array`\<`ArrayBufferLike`>

32-byte stealth private key

#### See

* [https://eips.ethereum.org/EIPS/eip-5564#stealth-private-key](https://eips.ethereum.org/EIPS/eip-5564#stealth-private-key)
* [https://voltaire.tevm.sh/primitives/stealth-address](https://voltaire.tevm.sh/primitives/stealth-address) for StealthAddress documentation

#### Since

0.0.0

#### Throws

If computation fails

#### Example

```javascript theme={null}
import * as StealthAddress from './primitives/StealthAddress/index.js';

// After finding matching stealth address
const stealthPrivKey = StealthAddress.computeStealthPrivateKey(
  spendingPrivateKey,
  hashedSharedSecret
);
// Use stealthPrivKey to spend from stealth address
```

***

### computeViewTag()

> **computeViewTag**(`hashedSharedSecret`): `number`

Defined in: [src/primitives/StealthAddress/computeViewTag.js:26](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/computeViewTag.js#L26)

Compute view tag from hashed shared secret

Extracts first byte of hashed shared secret as view tag.
Enables fast rejection of non-matching stealth addresses.

#### Parameters

##### hashedSharedSecret

`Uint8Array`\<`ArrayBufferLike`>

32-byte keccak256 hash of shared secret

#### Returns

`number`

View tag (first byte as number)

#### See

* [https://eips.ethereum.org/EIPS/eip-5564#view-tags](https://eips.ethereum.org/EIPS/eip-5564#view-tags)
* [https://voltaire.tevm.sh/primitives/stealth-address](https://voltaire.tevm.sh/primitives/stealth-address) for StealthAddress documentation

#### Since

0.0.0

#### Example

```javascript theme={null}
import * as StealthAddress from './primitives/StealthAddress/index.js';
import * as Keccak256 from './crypto/Keccak256/index.js';

const sharedSecret = new Uint8Array(32);
const hash = Keccak256.hash(sharedSecret);
const viewTag = StealthAddress.computeViewTag(hash);
console.log(typeof viewTag); // 'number'
console.log(viewTag >= 0 && viewTag <= 255); // true
```

***

### decompressPublicKey()

> **decompressPublicKey**(`compressed`): `Uint8Array`\<`ArrayBufferLike`>

Defined in: [src/primitives/StealthAddress/decompressPublicKey.js:26](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/decompressPublicKey.js#L26)

Decompress compressed secp256k1 public key

Converts 33-byte compressed format to 64-byte uncompressed format.
Decompresses by reconstructing y-coordinate from x and prefix.

#### Parameters

##### compressed

`Uint8Array`\<`ArrayBufferLike`>

33-byte compressed public key

#### Returns

`Uint8Array`\<`ArrayBufferLike`>

64-byte uncompressed public key

#### See

[https://voltaire.tevm.sh/primitives/stealth-address](https://voltaire.tevm.sh/primitives/stealth-address) for StealthAddress documentation

#### Since

0.0.0

#### Throws

If input length is invalid or decompression fails

#### Example

```javascript theme={null}
import * as StealthAddress from './primitives/StealthAddress/index.js';
const compressed = new Uint8Array(33);
compressed[0] = 0x02; // even y
const uncompressed = StealthAddress.decompressPublicKey(compressed);
console.log(uncompressed.length); // 64
```

***

### generateMetaAddress()

> **generateMetaAddress**(`spendingPubKey`, `viewingPubKey`): [`StealthMetaAddress`](#stealthmetaaddress)

Defined in: [src/primitives/StealthAddress/generateMetaAddress.js:36](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/generateMetaAddress.js#L36)

Generate stealth meta-address from spending and viewing public keys

Concatenates 33-byte compressed spending and viewing public keys
into 66-byte stealth meta-address for ERC-5564.

#### Parameters

##### spendingPubKey

[`SpendingPublicKey`](#spendingpublickey)

33-byte compressed spending public key

##### viewingPubKey

[`ViewingPublicKey`](#viewingpublickey)

33-byte compressed viewing public key

#### Returns

[`StealthMetaAddress`](#stealthmetaaddress)

66-byte stealth meta-address

#### See

* [https://eips.ethereum.org/EIPS/eip-5564#stealth-meta-address-format](https://eips.ethereum.org/EIPS/eip-5564#stealth-meta-address-format)
* [https://voltaire.tevm.sh/primitives/stealth-address](https://voltaire.tevm.sh/primitives/stealth-address) for StealthAddress documentation

#### Since

0.0.0

#### Throws

If either public key has invalid length

#### Example

```javascript theme={null}
import * as StealthAddress from './primitives/StealthAddress/index.js';
import * as Secp256k1 from './crypto/Secp256k1/index.js';

const spendingPubKey = StealthAddress.compressPublicKey(
  Secp256k1.derivePublicKey(spendingPrivateKey)
);
const viewingPubKey = StealthAddress.compressPublicKey(
  Secp256k1.derivePublicKey(viewingPrivateKey)
);
const metaAddress = StealthAddress.generateMetaAddress(spendingPubKey, viewingPubKey);
console.log(metaAddress.length); // 66
```

***

### generateStealthAddress()

> **generateStealthAddress**(`metaAddress`, `ephemeralPrivateKey`): [`GenerateStealthAddressResult`](#generatestealthaddressresult)

Defined in: [src/primitives/StealthAddress/generateStealthAddress.js:48](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/generateStealthAddress.js#L48)

Generate stealth address from meta-address

Implements ERC-5564 stealth address generation:

1. Parse meta-address → spending + viewing public keys
2. Compute shared secret: ECDH(ephemeralPrivKey, viewingPubKey)
3. Hash shared secret: keccak256(sharedSecret)
4. Derive view tag: first byte of hash
5. Compute stealth pubkey: spendingPubKey + hash \* G
6. Derive stealth address from pubkey

#### Parameters

##### metaAddress

[`StealthMetaAddress`](#stealthmetaaddress)

66-byte stealth meta-address

##### ephemeralPrivateKey

`Uint8Array`\<`ArrayBufferLike`>

32-byte ephemeral private key

#### Returns

[`GenerateStealthAddressResult`](#generatestealthaddressresult)

Stealth address, ephemeral pubkey, view tag

#### See

* [https://eips.ethereum.org/EIPS/eip-5564#stealth-address-generation](https://eips.ethereum.org/EIPS/eip-5564#stealth-address-generation)
* [https://voltaire.tevm.sh/primitives/stealth-address](https://voltaire.tevm.sh/primitives/stealth-address) for StealthAddress documentation

#### Since

0.0.0

#### Throws

If generation fails

#### Example

```javascript theme={null}
import * as StealthAddress from './primitives/StealthAddress/index.js';
import * as Secp256k1 from './crypto/Secp256k1/index.js';

// Recipient publishes meta-address
const metaAddress = StealthAddress.generateMetaAddress(spendingPubKey, viewingPubKey);

// Sender generates stealth address
const ephemeralPrivKey = new Uint8Array(32);
crypto.getRandomValues(ephemeralPrivKey);
const result = StealthAddress.generateStealthAddress(metaAddress, ephemeralPrivKey);

console.log(result.stealthAddress); // 20-byte address
console.log(result.ephemeralPublicKey); // 33-byte compressed pubkey
console.log(result.viewTag); // 0-255
```

***

### parseAnnouncement()

> **parseAnnouncement**(`announcement`): `object`

Defined in: [src/primitives/StealthAddress/parseAnnouncement.js:26](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/parseAnnouncement.js#L26)

Parse stealth address announcement

Extracts ephemeral public key (33 bytes) and view tag (1 byte)
from announcement data.

#### Parameters

##### announcement

`Uint8Array`\<`ArrayBufferLike`>

Announcement bytes (ephemeralPubKey + viewTag)

#### Returns

`object`

Parsed announcement

##### ephemeralPublicKey

> **ephemeralPublicKey**: [`EphemeralPublicKey`](#ephemeralpublickey-2)

##### viewTag

> **viewTag**: `number`

#### See

* [https://eips.ethereum.org/EIPS/eip-5564#announcement-format](https://eips.ethereum.org/EIPS/eip-5564#announcement-format)
* [https://voltaire.tevm.sh/primitives/stealth-address](https://voltaire.tevm.sh/primitives/stealth-address) for StealthAddress documentation

#### Since

0.0.0

#### Throws

If announcement length is invalid

#### Example

```javascript theme={null}
import * as StealthAddress from './primitives/StealthAddress/index.js';
const announcement = new Uint8Array(34); // 33 + 1
const { ephemeralPublicKey, viewTag } = StealthAddress.parseAnnouncement(announcement);
console.log(ephemeralPublicKey.length); // 33
console.log(typeof viewTag); // 'number'
```

***

### parseMetaAddress()

> **parseMetaAddress**(`metaAddress`): `object`

Defined in: [src/primitives/StealthAddress/parseMetaAddress.js:28](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/StealthAddress/parseMetaAddress.js#L28)

Parse stealth meta-address into spending and viewing public keys

Splits 66-byte meta-address into 33-byte compressed public keys.

#### Parameters

##### metaAddress

[`StealthMetaAddress`](#stealthmetaaddress)

66-byte stealth meta-address

#### Returns

`object`

Parsed public keys

##### spendingPubKey

> **spendingPubKey**: [`SpendingPublicKey`](#spendingpublickey)

##### viewingPubKey

> **viewingPubKey**: [`ViewingPublicKey`](#viewingpublickey)

#### See

* [https://eips.ethereum.org/EIPS/eip-5564#stealth-meta-address-format](https://eips.ethereum.org/EIPS/eip-5564#stealth-meta-address-format)
* [https://voltaire.tevm.sh/primitives/stealth-address](https://voltaire.tevm.sh/primitives/stealth-address) for StealthAddress documentation

#### Since

0.0.0

#### Throws

If meta-address length is invalid

#### Example

```javascript theme={null}
import * as StealthAddress from './primitives/StealthAddress/index.js';
const metaAddress = new Uint8Array(66);
const { spendingPubKey, viewingPubKey } = StealthAddress.parseMetaAddress(metaAddress);
console.log(spendingPubKey.length); // 33
console.log(viewingPubKey.length); // 33
```
