[**@sodot/sodot-web-sdk**](/web/api-ref) • **Docs**

***

[@sodot/sodot-web-sdk](/web/api-ref) / BIP340KeygenResult

# Class: BIP340KeygenResult

An BIP340 key generation result, generated by the `BIP340.keygen` function.
It contains a public key for BIP340 that can be used to derive addresses from.
It also contains a hex string of the secret share itself.
This **must be kept secret!** Note this data is **not** stored by the SDK itself.

## Constructors

### new BIP340KeygenResult()

> **new BIP340KeygenResult**(`pubkey`, `secretShare`): [`BIP340KeygenResult`](/web/api-ref/classes/BIP340KeygenResult)

#### Parameters

• **pubkey**: `Uint8Array`

An Uint8Array that represents the public key generated.

• **secretShare**: `string`

A hex string that represents the **secret** share created during key generation.

#### Returns

[`BIP340KeygenResult`](/web/api-ref/classes/BIP340KeygenResult)

A new BIP340KeygenResult object

## Properties

### pubkey

> **pubkey**: `Uint8Array`

***

### secretShare

> **secretShare**: `string`
