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

# ChainKey

> Protobuf class ChainKey generated from WAProto.

Defined in: [WAProto/index.d.ts:10945](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L10945)

## Implements

* [`IChainKey`](/proto-reference/SessionStructure/Chain/interfaces/IChainKey)

## Constructors

### new ChainKey()

> **new ChainKey**(`p`?): [`ChainKey`](/proto-reference/SessionStructure/Chain/classes/ChainKey)

Defined in: [WAProto/index.d.ts:10946](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L10946)

#### Parameters

##### p?

[`IChainKey`](/proto-reference/SessionStructure/Chain/interfaces/IChainKey)

#### Returns

[`ChainKey`](/proto-reference/SessionStructure/Chain/classes/ChainKey)

## Properties

### index?

> `optional` **index**: `null` | `number`

Defined in: [WAProto/index.d.ts:10947](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L10947)

#### Implementation of

[`IChainKey`](/proto-reference/SessionStructure/Chain/interfaces/IChainKey).[`index`](/proto-reference/SessionStructure/Chain/interfaces/IChainKey#index)

***

### key?

> `optional` **key**: `null` | `Uint8Array`\<`ArrayBufferLike`>

Defined in: [WAProto/index.d.ts:10948](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L10948)

#### Implementation of

[`IChainKey`](/proto-reference/SessionStructure/Chain/interfaces/IChainKey).[`key`](/proto-reference/SessionStructure/Chain/interfaces/IChainKey#key)

## Methods

### create()

> `static` **create**(`properties`?): [`ChainKey`](/proto-reference/SessionStructure/Chain/classes/ChainKey)

Defined in: [WAProto/index.d.ts:10949](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L10949)

#### Parameters

##### properties?

[`IChainKey`](/proto-reference/SessionStructure/Chain/interfaces/IChainKey)

#### Returns

[`ChainKey`](/proto-reference/SessionStructure/Chain/classes/ChainKey)

***

### decode()

> `static` **decode**(`r`, `l`?): [`ChainKey`](/proto-reference/SessionStructure/Chain/classes/ChainKey)

Defined in: [WAProto/index.d.ts:10951](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L10951)

#### Parameters

##### r

`Uint8Array`\<`ArrayBufferLike`> | `Reader`

##### l?

`number`

#### Returns

[`ChainKey`](/proto-reference/SessionStructure/Chain/classes/ChainKey)

***

### encode()

> `static` **encode**(`m`, `w`?): `Writer`

Defined in: [WAProto/index.d.ts:10950](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L10950)

#### Parameters

##### m

[`IChainKey`](/proto-reference/SessionStructure/Chain/interfaces/IChainKey)

##### w?

`Writer`

#### Returns

`Writer`

***

### fromObject()

> `static` **fromObject**(`d`): [`ChainKey`](/proto-reference/SessionStructure/Chain/classes/ChainKey)

Defined in: [WAProto/index.d.ts:10952](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L10952)

#### Parameters

##### d

#### Returns

[`ChainKey`](/proto-reference/SessionStructure/Chain/classes/ChainKey)

***

### getTypeUrl()

> `static` **getTypeUrl**(`typeUrlPrefix`?): `string`

Defined in: [WAProto/index.d.ts:10955](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L10955)

#### Parameters

##### typeUrlPrefix?

`string`

#### Returns

`string`

***

### toJSON()

> **toJSON**(): `object`

Defined in: [WAProto/index.d.ts:10954](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L10954)

#### Returns

`object`

***

### toObject()

> `static` **toObject**(`m`, `o`?): `object`

Defined in: [WAProto/index.d.ts:10953](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L10953)

#### Parameters

##### m

[`ChainKey`](/proto-reference/SessionStructure/Chain/classes/ChainKey)

##### o?

`IConversionOptions`

#### Returns

`object`
