Skip to main content

PrivateKeyBundleV1

Class: PrivateKeyBundleV1

Implements

  • PrivateKeyBundleV1

Constructors

constructor

new PrivateKeyBundleV1(bundle)

Parameters

NameType
bundlePrivateKeyBundleV1

Defined in

crypto/PrivateKeyBundle.ts:138

Properties

identityKey

identityKey: PrivateKey

Implementation of

proto.PrivateKeyBundleV1.identityKey

Defined in

crypto/PrivateKeyBundle.ts:134


preKeys

preKeys: PrivateKey[]

Implementation of

proto.PrivateKeyBundleV1.preKeys

Defined in

crypto/PrivateKeyBundle.ts:135


version

version: number = 1

Defined in

crypto/PrivateKeyBundle.ts:136

Methods

addPreKey

addPreKey(): Promise<void>

Returns

Promise<void>

Defined in

crypto/PrivateKeyBundle.ts:176


encode

encode(): Uint8Array

Returns

Uint8Array

Defined in

crypto/PrivateKeyBundle.ts:227


findPreKey

findPreKey(which): PrivateKey

Parameters

NameType
whichPublicKey

Returns

PrivateKey

Defined in

crypto/PrivateKeyBundle.ts:167


getCurrentPreKey

getCurrentPreKey(): PrivateKey

Returns

PrivateKey

Defined in

crypto/PrivateKeyBundle.ts:162


getPublicKeyBundle

getPublicKeyBundle(): PublicKeyBundle

Returns

PublicKeyBundle

Defined in

crypto/PrivateKeyBundle.ts:183


sharedSecret

sharedSecret(peer, myPreKey, isRecipient): Promise<Uint8Array>

Parameters

NameType
peerSignedPublicKeyBundle | PublicKeyBundle
myPreKeyPublicKey
isRecipientboolean

Returns

Promise<Uint8Array>

Defined in

crypto/PrivateKeyBundle.ts:195


generate

Static generate(wallet?): Promise<PrivateKeyBundleV1>

Parameters

NameType
wallet?Signer

Returns

Promise<PrivateKeyBundleV1>

Defined in

crypto/PrivateKeyBundle.ts:148